blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 264 | content_id stringlengths 40 40 | detected_licenses listlengths 0 85 | license_type stringclasses 2
values | repo_name stringlengths 5 140 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 905
values | visit_date timestamp[us]date 2015-08-09 11:21:18 2023-09-06 10:45:07 | revision_date timestamp[us]date 1997-09-14 05:04:47 2023-09-17 19:19:19 | committer_date timestamp[us]date 1997-09-14 05:04:47 2023-09-06 06:22:19 | github_id int64 3.89k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-07 00:51:45 2023-09-14 21:58:39 ⌀ | gha_created_at timestamp[us]date 2008-03-27 23:40:48 2023-08-21 23:17:38 ⌀ | gha_language stringclasses 141
values | src_encoding stringclasses 34
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 2
classes | length_bytes int64 3 10.4M | extension stringclasses 115
values | content stringlengths 3 10.4M | authors listlengths 1 1 | author_id stringlengths 0 158 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0c2f6c95fd0787371fc317eac260339fca22e543 | a32ca1d47e413927c16bf4744102c56ae8b6b043 | /tut/imgproc/horVertLineExtract/code.cpp | 442b5dd21f692d0659475ff90d85e442c2df552e | [] | no_license | AthaSSiN/ImgProc | cbfdd78e2f2aef4095427a96f748e3f163db7985 | ea14fb2c43d110f6b9ac401d44b293283bad324e | refs/heads/master | 2020-10-01T11:02:16.562134 | 2020-01-12T19:53:34 | 2020-01-12T19:53:34 | 227,522,097 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,001 | cpp | #include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <iostream>
void show_wait_destroy(const char* winname, cv::Mat img);
using namespace std;
using namespace cv;
int main(int argc, char** argv)
{
Mat src = imread("../../src.jpg", IMREAD_GRAYSCALE);
// Show source image
imshow("src", src);
// Transform source image to gray if it is not already
Mat gray;
if (src.channels() == 3)
{
cvtColor(src, gray, COLOR_BGR2GRAY);
}
else
{
gray = src;
}
// Show gray image
show_wait_destroy("gray", gray);
// Apply adaptiveThreshold at the to gray
Mat bw;
adaptiveThreshold(~gray, bw, 255, 0, 0, 15, -2);
// Show binary image
show_wait_destroy("binary", bw);
// Create the images that will use to extract the horizontal and vertical lines
Mat horizontal = bw.clone();
Mat vertical = bw.clone();
// Specify size on horizontal axis
int horizontal_size = horizontal.cols / 30;
// Create structure element for extracting horizontal lines through morphology operations
Mat horizontalStructure = getStructuringElement(MORPH_RECT, Size(horizontal_size, 1));
// Apply morphology operations
erode(horizontal, horizontal, horizontalStructure, Point(-1, -1));
dilate(horizontal, horizontal, horizontalStructure, Point(-1, -1));
// Show extracted horizontal lines
show_wait_destroy("horizontal", horizontal);
// Specify size on vertical axis
int vertical_size = vertical.rows / 30;
// Create structure element for extracting vertical lines through morphology operations
Mat verticalStructure = getStructuringElement(MORPH_RECT, Size(1, vertical_size));
// Apply morphology operations
erode(vertical, vertical, verticalStructure, Point(-1, -1));
dilate(vertical, vertical, verticalStructure, Point(-1, -1));
// Show extracted vertical lines
show_wait_destroy("vertical", vertical);
// Inverse vertical image
bitwise_not(vertical, vertical);
show_wait_destroy("vertical_bit", vertical);
// Extract edges and smooth image according to the logic
// 1. extract edges
// 2. dilate(edges)
// 3. src.copyTo(smooth)
// 4. blur smooth img
// 5. smooth.copyTo(src, edges)
// Step 1
Mat edges;
adaptiveThreshold(vertical, edges, 255, ADAPTIVE_THRESH_MEAN_C, THRESH_BINARY, 3, -2);
show_wait_destroy("edges", edges);
// Step 2
Mat kernel = Mat::ones(2, 2, CV_8UC1);
dilate(edges, edges, kernel);
show_wait_destroy("dilate", edges);
// Step 3
Mat smooth;
vertical.copyTo(smooth);
// Step 4
blur(smooth, smooth, Size(2, 2));
// Step 5
smooth.copyTo(vertical, edges);
// Show final result
show_wait_destroy("smooth - final", vertical);
return 0;
}
void show_wait_destroy(const char* winname, cv::Mat img) {
imshow(winname, img);
moveWindow(winname, 500, 0);
waitKey(0);
destroyWindow(winname);
}
| [
"athassin.asp@gmail.com"
] | athassin.asp@gmail.com |
e4e7394bc5174bd48087474a0678823b40c2c6f2 | f4ba69ef76e4222576b8b210493524d33900fbaa | /stm32/commands/SetBacklight.h | c24b4c131db46f9d093ac0630d71d95cff928650 | [] | no_license | andysworkshop/awcopper | 64add966da698c4a109efe1cc7505a625553b232 | 4da43f17471bde4f77412cbdaf970e5e23062c99 | refs/heads/master | 2021-01-23T13:48:53.300464 | 2015-11-14T07:29:20 | 2015-11-14T07:29:20 | 30,496,137 | 13 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 791 | h | /*
* Andy's Workshop Arduino Graphics Coprocessor.
* Copyright (c) 2014 Andy Brown. All rights reserved.
* Please see website (http://www.andybrown.me.uk) for full details.
*/
#pragma once
namespace cmd {
/*
* Set the backlight.
* Parameters:
* 0 : the backlight percentage, 0..100
*/
struct SetBacklight {
enum {
PARAMETER_COUNT = 1
};
static void execute(Panel& panel,ManagedCircularBuffer& commandBuffer);
};
/*
* Execute the command
*/
inline void SetBacklight::execute(Panel& panel,ManagedCircularBuffer& commandBuffer) {
uint8_t percentage;
// wait for, and then read the parameter
percentage=commandBuffer.managedRead();
// set the percentage
panel.getBacklight().setPercentage(percentage);
}
}
| [
"andy@andybrown.me.uk"
] | andy@andybrown.me.uk |
d14133801797e6d705f908ed919625e9bb7a3c42 | 0a03c2792ecf68a285d7b8b684cf31b7976d3cb1 | /bin/mac64.build/cpp/include/phoenix/geometry/TextGeometry.h | 20df9aba090436f4415cf10cf2db86161244ab40 | [] | no_license | DavidBayless/luxePractice | 2cbbf5f3a7e7c2c19adb61913981b8d21922cd82 | 9d1345893459ecaba81708cfe0c00af9597e5dec | refs/heads/master | 2021-01-20T16:56:31.427969 | 2017-02-22T23:20:35 | 2017-02-22T23:20:35 | 82,842,198 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,861 | h | #ifndef INCLUDED_phoenix_geometry_TextGeometry
#define INCLUDED_phoenix_geometry_TextGeometry
#ifndef HXCPP_H
#include <hxcpp.h>
#endif
#ifndef INCLUDED_phoenix_geometry_Geometry
#include <phoenix/geometry/Geometry.h>
#endif
HX_DECLARE_CLASS0(EReg)
HX_DECLARE_CLASS1(luxe,Emitter)
HX_DECLARE_CLASS2(luxe,resource,Resource)
HX_DECLARE_CLASS1(phoenix,BitmapFont)
HX_DECLARE_CLASS1(phoenix,Color)
HX_DECLARE_CLASS1(phoenix,Rectangle)
HX_DECLARE_CLASS2(phoenix,geometry,Geometry)
HX_DECLARE_CLASS2(phoenix,geometry,TextGeometry)
HX_DECLARE_CLASS2(phoenix,geometry,Vertex)
namespace phoenix{
namespace geometry{
class HXCPP_CLASS_ATTRIBUTES TextGeometry_obj : public ::phoenix::geometry::Geometry_obj{
public:
typedef ::phoenix::geometry::Geometry_obj super;
typedef TextGeometry_obj OBJ_;
TextGeometry_obj();
Void __construct(Dynamic _options);
public:
inline void *operator new( size_t inSize, bool inContainer=true,const char *inName="phoenix.geometry.TextGeometry")
{ return hx::Object::operator new(inSize,inContainer,inName); }
static hx::ObjectPtr< TextGeometry_obj > __new(Dynamic _options);
static Dynamic __CreateEmpty();
static Dynamic __Create(hx::DynamicArray inArgs);
//~TextGeometry_obj();
HX_DO_RTTI_ALL;
Dynamic __Field(const ::String &inString, hx::PropertyAccess inCallProp);
static bool __GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp);
Dynamic __SetField(const ::String &inString,const Dynamic &inValue, hx::PropertyAccess inCallProp);
static bool __SetStatic(const ::String &inString, Dynamic &ioValue, hx::PropertyAccess inCallProp);
void __GetFields(Array< ::String> &outFields);
static void __register();
void __Mark(HX_MARK_PARAMS);
void __Visit(HX_VISIT_PARAMS);
::String __ToString() const { return HX_HCSTRING("TextGeometry","\x9f","\xcc","\x36","\xcf"); }
static void __boot();
static ::EReg tab_regex;
::String text;
::phoenix::BitmapFont font;
Float point_size;
Float line_spacing;
Float letter_spacing;
bool letter_snapping;
::phoenix::Rectangle bounds;
bool bounds_wrap;
int align;
int align_vertical;
bool sdf;
bool unique;
Float smoothness;
Float thickness;
Float outline;
::phoenix::Color outline_color;
Float glow_threshold;
Float glow_amount;
::phoenix::Color glow_color;
Array< Float > line_widths;
Float text_width;
Float text_height;
Array< ::Dynamic > line_offsets;
Array< ::String > lines;
::luxe::Emitter emitter;
Array< ::Dynamic > cache;
Dynamic options;
Float text_h_w;
Float text_h_h;
Float point_ratio;
bool dirty_sizing;
bool dirty_align;
bool setup_;
virtual Void tidy( );
Dynamic tidy_dyn();
virtual Void drop( Dynamic remove);
virtual Void default_options( );
Dynamic default_options_dyn();
virtual ::String set_text( ::String _text);
Dynamic set_text_dyn();
virtual ::String stats( );
Dynamic stats_dyn();
virtual bool update_sizes( );
Dynamic update_sizes_dyn();
virtual Void update_text( );
Dynamic update_text_dyn();
virtual Void update_char( int _letteridx,Float _x,Float _y,Float _w,Float _h,Float _u,Float _v,Float _u2,Float _v2,::phoenix::Color _color);
Dynamic update_char_dyn();
virtual bool set_dirty_sizing( bool _b);
Dynamic set_dirty_sizing_dyn();
virtual ::phoenix::Rectangle set_bounds( ::phoenix::Rectangle _bounds);
Dynamic set_bounds_dyn();
virtual bool set_bounds_wrap( bool _wrap);
Dynamic set_bounds_wrap_dyn();
virtual bool set_letter_snapping( bool _snap);
Dynamic set_letter_snapping_dyn();
virtual Float set_line_spacing( Float _line_spacing);
Dynamic set_line_spacing_dyn();
virtual Float set_letter_spacing( Float _letter_spacing);
Dynamic set_letter_spacing_dyn();
virtual int set_align( int _align);
Dynamic set_align_dyn();
virtual int set_align_vertical( int _align_vertical);
Dynamic set_align_vertical_dyn();
virtual Float set_point_size( Float s);
Dynamic set_point_size_dyn();
virtual ::phoenix::BitmapFont set_font( ::phoenix::BitmapFont _font);
Dynamic set_font_dyn();
virtual Float set_smoothness( Float s);
Dynamic set_smoothness_dyn();
virtual Float set_thickness( Float s);
Dynamic set_thickness_dyn();
virtual Float set_outline( Float s);
Dynamic set_outline_dyn();
virtual Float set_glow_threshold( Float s);
Dynamic set_glow_threshold_dyn();
virtual Float set_glow_amount( Float s);
Dynamic set_glow_amount_dyn();
virtual ::phoenix::Color set_outline_color( ::phoenix::Color c);
Dynamic set_outline_color_dyn();
virtual ::phoenix::Color set_glow_color( ::phoenix::Color c);
Dynamic set_glow_color_dyn();
virtual Void flush_uniforms( );
Dynamic flush_uniforms_dyn();
};
} // end namespace phoenix
} // end namespace geometry
#endif /* INCLUDED_phoenix_geometry_TextGeometry */
| [
"David.C.Bayless15@gmail.com"
] | David.C.Bayless15@gmail.com |
c7ab75b533779a12aff523aa55dc61fe82d31b35 | bd525e45d16ee67b19ab83811c08930f12086b6c | /Volume05/0528.cpp | c833cc2a5ae42c0fd3f5dac281bb0777b349037a | [] | no_license | face4/AOJ | fb86b3d9a05c2ea1da4819c0d253c48ca06efa56 | e869a5ab38a8ce4ecd7344fc24246da07e0a7b6e | refs/heads/master | 2021-06-10T11:56:27.591053 | 2020-11-26T12:01:35 | 2020-11-26T12:01:35 | 128,877,332 | 7 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 943 | cpp | #include<iostream>
using namespace std;
int getLCSlen(string a, string b){
int dp[a.length()][b.length()];
int ret = 0;
for(int i = 0; i < a.length(); i++){
for(int j = 0; j < b.length(); j++){
dp[i][j] = 0;
}
}
for(int j = 0; j < b.length(); j++) if(a[0] == b[j]) dp[0][j] = 1;
for(int i = 0; i < a.length(); i++) if(a[i] == b[0]) dp[i][0] = 1;
for(int i = 1; i < a.length(); i++){
for(int j = 1; j < b.length(); j++){
if(a[i] == b[j]){
dp[i][j] = dp[i-1][j-1]+1;
ret = max(ret, dp[i][j]);
}
// add these if you want to get longest common subsequence
// dp[i][j] = max(dp[i][j], max(dp[i-1][j], dp[i][j-1]));
// ret = max(ret, dp[i][j]);
}
}
return ret;
}
int main(){
string a, b;
while(cin >> a >> b){
cout << getLCSlen(a, b) << endl;
}
} | [
"s1611361@u.tsukuba.ac.jp"
] | s1611361@u.tsukuba.ac.jp |
6e1c6ce1dd2092d2c1c4082290254d287637c0fa | c392cea360fa4c954ea3dc39b668a73bda54c327 | /c++11_learning/std_function/std_function_move.cpp | c7871e842a8cc506711f0fb3caa1f133a5850e1d | [] | no_license | CCSHUN/working_fish | a1403333f925c4f50f3813178253c80a1197c8e3 | 38baa17bcd65aa3749f9c3a8ef99c353f7ef6800 | refs/heads/master | 2022-12-29T15:37:34.143294 | 2020-10-17T02:55:39 | 2020-10-17T02:55:39 | 281,035,924 | 0 | 0 | null | 2020-10-17T02:55:40 | 2020-07-20T06:42:37 | C++ | UTF-8 | C++ | false | false | 970 | cpp | /*
std::function 支持std::move
*/
#include <thread>
#include <atomic>
#include <iostream>
#include <functional>
using namespace std;
int add(int a, int b){
return a + b;
}
int main(){
std::function<int(int, int)> func;
func = &add; //普通函数 等价于 func = add
std::cout<<func(3, 4)<<std::endl;
//没绑定参数move
std::function<int(int, int)> func_move = std::move(func);
std::cout<<func_move(1, 2)<<std::endl;
//std::cout<<func(1, 2)<<std::endl; //对应权已经转移,不能这样操作,会导致运行错误
//绑定参数move 返回值 和参数都可以不匹配
//std::function<void()> func_bind_1 = std::bind(&add, 1, 2); //可以编译通过
std::function<int()> func_bind = std::bind(&add, 1, 2);
std::cout<<func_bind()<<std::endl; //输出3
std::function<int()> func_bind_move = std::move(func_bind);
std::cout<<func_bind_move()<<std::endl; //输出3 --->可见绑定参数一样可以move
return 0;
} | [
""
] | |
7692505999aeca2b311bd6a03dbc35fff9a572a5 | 7410126688d97795ef9c477cede0822412e4fa2f | /lab4-5-6/matrix/rand.cpp | 735645ffdde63e12011db1bf1711211dd798b3a0 | [] | no_license | sadsirko/DS | 18a905f8813b808dbac26d514d3c6d1961357620 | e53fe2cc072772d94d46c076b64f85417e2d685c | refs/heads/master | 2021-01-06T12:18:22.338952 | 2020-05-29T16:36:38 | 2020-05-29T16:36:38 | 241,323,196 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,154 | cpp |
#include <iostream>
#include <math.h>
#include <fstream>
using namespace std;
double DoubleRand(double _max, double _min)
{
return _min + double(rand()) / RAND_MAX * (_max - _min);
}
int main()
{
int g = 12;
remove("matrix.js");
ofstream fout("matrix.js"); // создаём объект класса ofstream для записи и связываем его с файлом cppstudio.txt
srand(9521);
fout << "let arrN = [\n" ;
for(int j = 0;j < g;j++){
fout << " [ " ;
for(int i = 0;i < g;i++) {
double b = DoubleRand(0,1);
double c = DoubleRand(0,1);
fout << floor((1.0 - 2 * 0.01 - 1 * 0.005 - 0.05) * (b + c)) ;
if( i < g - 1 ) fout << ", " ;
}
fout <<" ] ";
if( j < g - 1 ) fout << ",\n " ;
}
fout <<" ] ;\n";
fout << "let weight = [\n" ;
for(int j = 0;j < g;j++){
fout << " [ " ;
for(int i = 0;i < g;i++) {
double n = DoubleRand(0,1);
fout << round(n*100) ;
if( i < g - 1 ) fout << ", " ;
}
fout <<" ] ";
if( j < g - 1 ) fout << ",\n " ;
}
fout <<" ]; \n";
fout.close(); // закрываем файл
system("pause");
return 0;
} | [
"dionis@localhost.localdomain"
] | dionis@localhost.localdomain |
f601d426ff002fa4de2d03b16a0866e530f942eb | 02450e6f83bf914087bb2e9cc3805a6c06027889 | /Black/Week2/Task4/yellow_pages.h | 8ecd105b0f6c2366caa780198d0f70c3482465fc | [] | no_license | RinokuS/yandex-cpp-belts | d4962c022a53e64cf540c79feb979752814e9b29 | b863efe12dedf5a93517c937308b5f140ea86725 | refs/heads/main | 2022-12-25T22:02:36.059625 | 2020-10-03T09:31:41 | 2020-10-03T09:31:41 | 300,842,700 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 450 | h | #pragma once
#include "company.pb.h"
#include "provider.pb.h"
#include "signal.pb.h"
#include <unordered_map>
#include <vector>
namespace YellowPages {
using Signals = std::vector<Signal>;
using Providers = std::unordered_map<uint64_t, Provider>;
// Объединяем данные из сигналов об одной и той же организации
Company Merge(const Signals& signals, const Providers& providers);
}
| [
"JeffTheKilller@mail.ru"
] | JeffTheKilller@mail.ru |
817043b9273eacb44be0117f09e40a959ae2d77a | 6f7af0039cb5aec99eb72a4c752a734b11987d73 | /generated_source/usbmLexer.h | 8f9935a55180d36087e44b11fbe7ccdc9402f862 | [
"MIT"
] | permissive | NormanDunbar/USBMParser | 248e0a4b74b0623e51ddcf2727decefaf63d8ab8 | 3cabc937e7e51cb2fcc941b538ff61e4d9df763b | refs/heads/master | 2020-03-29T14:02:00.973726 | 2018-09-26T12:44:44 | 2018-09-26T12:44:44 | 149,994,968 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,003 | h |
// Generated from usbm.g4 by ANTLR 4.7.1
#pragma once
#include "antlr4-runtime.h"
class usbmLexer : public antlr4::Lexer {
public:
enum {
T__0 = 1, TITLE = 2, TOOLKIT = 3, SYNTAX = 4, LOCATION = 5, DESCRIPTION = 6,
KW = 7, KEYWORD = 8, KW_SEP = 9, XREF = 10, EXAMPLE = 11, NOTE = 12,
NOTES = 13, CODE = 14, OPEN_1 = 15, CLOSE_1 = 16, OPEN_3 = 17, CLOSE_3 = 18,
OPEN_4 = 19, CLOSE_4 = 20, TEXT = 21, OPEN_2 = 22, CLOSE_2 = 23, LISTING = 24,
DQ_STRING = 25, SQ_STRING = 26, COMMENT_SL = 27, COMMENT_ML = 28, TITLE_ID = 29,
NUMBER = 30, WS = 31
};
usbmLexer(antlr4::CharStream *input);
~usbmLexer();
virtual std::string getGrammarFileName() const override;
virtual const std::vector<std::string>& getRuleNames() const override;
virtual const std::vector<std::string>& getChannelNames() const override;
virtual const std::vector<std::string>& getModeNames() const override;
virtual const std::vector<std::string>& getTokenNames() const override; // deprecated, use vocabulary instead
virtual antlr4::dfa::Vocabulary& getVocabulary() const override;
virtual const std::vector<uint16_t> getSerializedATN() const override;
virtual const antlr4::atn::ATN& getATN() const override;
private:
static std::vector<antlr4::dfa::DFA> _decisionToDFA;
static antlr4::atn::PredictionContextCache _sharedContextCache;
static std::vector<std::string> _ruleNames;
static std::vector<std::string> _tokenNames;
static std::vector<std::string> _channelNames;
static std::vector<std::string> _modeNames;
static std::vector<std::string> _literalNames;
static std::vector<std::string> _symbolicNames;
static antlr4::dfa::Vocabulary _vocabulary;
static antlr4::atn::ATN _atn;
static std::vector<uint16_t> _serializedATN;
// Individual action functions triggered by action() above.
// Individual semantic predicate functions triggered by sempred() above.
struct Initializer {
Initializer();
};
static Initializer _init;
};
| [
"norman@dunbar-it.co.uk"
] | norman@dunbar-it.co.uk |
e48b57ef7d443b1877f2972ce92bf0d9145db51e | 39e76ae3cf268e4d325eab366191c36c1daff537 | /test/croquis-test.cc | 49002fd12e53f328d04c2943b37f267057d6b739 | [
"BSD-2-Clause"
] | permissive | pombredanne/madoka-4 | c9361d428ff8127ddc009274a42f187594956311 | eacada2014ca231a2e1a509022d86c55711892b7 | refs/heads/master | 2021-01-15T09:08:43.731778 | 2019-05-15T10:20:55 | 2019-05-15T10:20:55 | 47,540,030 | 0 | 0 | BSD-2-Clause | 2019-05-15T10:20:56 | 2015-12-07T08:43:20 | C++ | UTF-8 | C++ | false | false | 7,296 | cc | // Copyright (c) 2012, Susumu Yata
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.
#include <algorithm>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <set>
#include <string>
#include <vector>
#include <madoka/croquis.h>
#include <madoka/random.h>
namespace {
const std::size_t NUM_KEYS = 1 << 16;
const std::size_t MIN_KEY_LENGTH = 1;
const std::size_t MAX_KEY_LENGTH = 16;
void generate_keys(std::vector<std::string> *keys,
std::vector<madoka::UInt64> *freqs,
std::vector<std::size_t> *ids) {
madoka::Random random;
std::set<std::string> unique_keys;
std::string key;
while (unique_keys.size() < NUM_KEYS) {
const std::size_t key_length = MIN_KEY_LENGTH +
(random() % (MAX_KEY_LENGTH - MIN_KEY_LENGTH + 1));
key.resize(key_length);
for (std::size_t j = 0; j < key_length; ++j) {
key[j] = 'A' + (random() % 26);
}
unique_keys.insert(key);
}
std::vector<std::string>(unique_keys.begin(), unique_keys.end()).swap(*keys);
for (std::size_t i = 0; i < NUM_KEYS; ++i) {
const std::size_t freq = NUM_KEYS / (i + 1);
freqs->push_back(freq);
for (std::size_t j = 0; j < freq; ++j) {
ids->push_back(i);
}
}
std::random_shuffle(ids->begin(), ids->end(), random);
}
template <typename T>
void test_croquis(const std::vector<std::string> &keys,
const std::vector<madoka::UInt64> &original_freqs,
const std::vector<std::size_t> &ids) {
const char PATH[] = "croquis-test.temp.1";
std::remove(PATH);
madoka::Croquis<T> croquis;
MADOKA_THROW_IF(croquis.max_value() != std::numeric_limits<T>::max());
std::vector<T> freqs;
for (std::size_t i = 0; i < original_freqs.size(); ++i) {
freqs.push_back((original_freqs[i] < croquis.max_value()) ?
original_freqs[i] : croquis.max_value());
}
MADOKA_THROW_IF(freqs.size() != original_freqs.size());
croquis.create(keys.size(), 3, PATH, madoka::FILE_TRUNCATE);
MADOKA_THROW_IF(croquis.width() != keys.size());
MADOKA_THROW_IF(croquis.depth() != 3);
MADOKA_THROW_IF(croquis.seed() != 0);
for (std::size_t i = 0; i < keys.size(); ++i) {
croquis.set(keys[i].c_str(), keys[i].length(), freqs[i]);
MADOKA_THROW_IF(croquis.get(keys[i].c_str(), keys[i].length()) < freqs[i]);
}
for (std::size_t i = 0; i < keys.size(); ++i) {
MADOKA_THROW_IF(croquis.get(keys[i].c_str(), keys[i].length()) < freqs[i]);
}
croquis.close();
croquis.open(PATH, madoka::FILE_PRIVATE);
for (std::size_t i = 0; i < keys.size(); ++i) {
MADOKA_THROW_IF(croquis.get(keys[i].c_str(), keys[i].length()) < freqs[i]);
}
croquis.clear();
croquis.close();
croquis.open(PATH);
for (std::size_t i = 0; i < keys.size(); ++i) {
MADOKA_THROW_IF(croquis.get(keys[i].c_str(), keys[i].length()) < freqs[i]);
}
croquis.clear();
croquis.close();
croquis.load(PATH);
for (std::size_t i = 0; i < keys.size(); ++i) {
MADOKA_THROW_IF(croquis.get(keys[i].c_str(), keys[i].length()) != 0);
}
croquis.create(keys.size() + 13, 5, NULL, 0, 123456789);
MADOKA_THROW_IF(croquis.width() != (keys.size() + 13));
MADOKA_THROW_IF(croquis.depth() != 5);
MADOKA_THROW_IF(croquis.seed() != 123456789);
for (std::size_t i = 0; i < ids.size(); ++i) {
const std::string &key = keys[ids[i]];
const T freq = croquis.add(key.c_str(), key.length(), 1);
MADOKA_THROW_IF(freq == 0);
MADOKA_THROW_IF(croquis.get(key.c_str(), key.length()) != freq);
}
for (std::size_t i = 0; i < keys.size(); ++i) {
MADOKA_THROW_IF(croquis.get(keys[i].c_str(), keys[i].length()) < freqs[i]);
}
croquis.save(PATH, madoka::FILE_TRUNCATE);
croquis.close();
croquis.open(PATH);
for (std::size_t i = 0; i < keys.size(); ++i) {
MADOKA_THROW_IF(croquis.get(keys[i].c_str(), keys[i].length()) < freqs[i]);
}
croquis.close();
MADOKA_THROW_IF(std::remove(PATH) == -1);
}
void benchmark_croquis(const std::vector<std::string> &keys,
const std::vector<madoka::UInt64> &freqs,
const std::vector<std::size_t> &ids) {
std::cout << "info: Zipf distribution: "
<< "#keys = " << keys.size()
<< ", #queries = " << ids.size() << std::endl;
std::cout.setf(std::ios::fixed);
madoka::Random random;
for (madoka::UInt64 width = keys.size() / 8;
width <= keys.size() * 8; width *= 2) {
std::cout << "info: " << std::setw(6) << width << ':' << std::flush;
for (int i = 0; i < 8; ++i) {
madoka::Croquis<madoka::UInt32> croquis;
croquis.create(width, 0, NULL, 0, random());
for (std::size_t i = 0; i < ids.size(); ++i) {
croquis.add(keys[ids[i]].c_str(), keys[ids[i]].length(), 1);
}
madoka::UInt64 diff = 0;
for (std::size_t i = 0; i < keys.size(); ++i) {
const madoka::UInt64 freq =
croquis.get(keys[i].c_str(), keys[i].length());
diff += std::llabs(freq - freqs[i]);
}
std::cout << ' ' << std::setw(6) << std::setprecision(3)
<< (100.0 * diff / ids.size()) << '%' << std::flush;
}
std::cout << std::endl;
}
}
} // namespace
int main() try {
std::vector<std::string> keys;
std::vector<madoka::UInt64> freqs;
std::vector<std::size_t> ids;
generate_keys(&keys, &freqs, &ids);
MADOKA_THROW_IF(keys.size() != NUM_KEYS);
MADOKA_THROW_IF(freqs.size() != NUM_KEYS);
#define TEST_CROQUIS(type) \
((std::cout << "log: " << __FILE__ << ':' << __LINE__ << ": " \
<< "test_croquis<" #type ">()" << std::endl), \
test_croquis<type>(keys, freqs, ids))
TEST_CROQUIS(madoka::UInt8);
TEST_CROQUIS(madoka::UInt16);
TEST_CROQUIS(madoka::UInt32);
TEST_CROQUIS(madoka::UInt64);
TEST_CROQUIS(bool);
TEST_CROQUIS(float);
TEST_CROQUIS(double);
#undef TEST_CROQUIS
benchmark_croquis(keys, freqs, ids);
return 0;
} catch (const madoka::Exception &ex) {
std::cerr << "error: " << ex.what() << std::endl;
return 1;
}
| [
"susumu.yata@gmail.com"
] | susumu.yata@gmail.com |
6361005c09d79259b129d6549196b2fa6ed9310a | 07c8ebdd3402df43a049dc7882fe7a4926a7c9fb | /2231 분해합.cpp | 695a3ea414ff6e5d50bc05357c92884dee71e187 | [] | no_license | oheong/It-s_eong_time | c7366af9bc5738f5a218b4bfb00942615c88285c | 8a9fb898ff8d99b01d6a9a992a996581a75ca93a | refs/heads/master | 2022-01-14T22:47:32.646291 | 2022-01-07T14:14:38 | 2022-01-07T14:14:38 | 197,506,234 | 0 | 0 | null | null | null | null | UHC | C++ | false | false | 862 | cpp | #include <stdio.h>
#define SIZE 7
int N, min = 2123456789, n, last_num, temp, ssj;
int arr[SIZE];
int get_n(int a) {
int i;
for (i = 0; i < SIZE; i++) {
a /= 10;
if (a < 1)
return i + 1;
last_num = a;
}
}
int get_ssj() {
temp = 0, ssj = 0;
for (int i = n - 1; 0 <= i; i--) {
ssj += arr[i];//자릿수 숫자대로 계속 더하고
temp += arr[i];//전체숫자를 구함
if (i != 0)
temp *= 10;
}
ssj += temp;
return ssj;
}
void dfs(int d) {
if (d == -1) {
int value = get_ssj();
if (value == N) {
if (min > temp) min = temp;
}
return;
}
for (int i = 0; i < 10; i++) {
arr[d] = i;
dfs(d - 1);
}
}
int main() {
scanf("%d", &N);
n = get_n(N);//n자리 숫자
for (int i = 0; i <= last_num; i++) {
arr[n - 1] = i;
dfs(n - 1);
}
if (min == 2123456789)printf("%d\n", 0);
else
printf("%d\n", min);
return 0;
} | [
"enffl9568@naver.com"
] | enffl9568@naver.com |
b5c45fc70d67f06047e197afd8353b1b249819a9 | 27ccf692ba3e5ac8f949a3de31a1a479758a737f | /DTW/DTW.cpp | 343457fcace0633e5141835b4179527f7ece1afa | [] | no_license | puranzhang/Myo-signal-classifier-w-DTW | a677557ec2788bed062800fe54d050d4fe143c68 | 1823acc5524542325f8c8f9f3a3b421ad8ab5930 | refs/heads/master | 2021-01-10T04:43:48.629489 | 2016-02-22T05:55:16 | 2016-02-22T05:55:16 | 52,249,929 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,962 | cpp | //CMSC240 Project
//Team: Ningxi, Puran, Ryan
//Puran Zhang
#include <iostream>
#include <vector>
#include "DTW.h"
#include "Signal.h"
using namespace std;
//stub that was used for testing
/*
int main() {
vector<double> a;
vector<double> b;
//int aa[5] = {0, 1, 2, 1, 0};
//a.assign(&aa[0], &aa[0]+5);
//int bb[5] = {0, 0, 0, 1, 2};
//b.assign(&bb[0], &bb[0]+5);
Signal testSignal1 = Signal("home_1.output");
Signal testSignal2 = Signal("hot_1.output");
a = testSignal1.getData();
b = testSignal2.getData();
vector<double> hello = DTW::dtw(a, b);
}*/
double DTW::min(double x, double y, double z) {
if((x <= y) && (x <= z)) {
return x;
} else if((y <= x) && (y <= z)) {
return y;
} else {
return z;
}
}
//Creates the DTW matrix then returns the shortest path through said matrix
vector<double> DTW::dtw(vector<double> a, vector<double> b) {
int lengthA = a.size();
int lengthB = b.size();
vector< vector<double> > diff;
diff.resize(lengthB, vector<double>(lengthA, 0));
for(int i = 1; i < lengthA; i++) {
diff[0][i] = 500000;
}
for(int i = 1; i < lengthB; i++) {
diff[i][0] = 500000;
}
diff[0][0] = 0;
for(int j = 0; j < lengthB; j++) {
for(int i = 0; i < lengthA; i++) {
diff[j][i] = abs(a[i]-b[j]);
}
}
vector<double> newPath = findPath(diff, a, b, lengthA, lengthB);
//Calculates the distance between the two singles and prints it
double distance = 0;
int distCount = 0;
while(distCount < newPath.size())
{
distance += diff[newPath[distCount+1]][newPath[distCount]];
distCount+=2;
}
cout<<"THE DISTANCE BETWEEN THE TWO SIGNALS IS : " << distance<<endl;
return newPath;
}
//Calculates the shortest path through the distance matrix
vector<double> DTW::findPath(vector< vector<double> > diff, vector<double> a, vector<double> b, int lengthA, int lengthB)
{
vector<vector<double> > pathArray;
pathArray.resize(lengthB, vector<double>(lengthA, 0));
double cost;
for(int i = 1; i< lengthA; i++)
{
pathArray[0][i] = diff[0][i] + pathArray[0][i-1];
}
for(int j = 1; j< lengthB; j++)
{
pathArray[j][0] = diff[j][0] + pathArray[j-1][0];
}
for(int j = 1; j < lengthB; j++) {
for(int i = 1; i < lengthA; i++) {
cost = abs(a[i] - b[j]);
pathArray[j][i] = cost + min(pathArray[j-1][i], pathArray[j][i-1], pathArray[j-1][i-1]);
}
}
int i = lengthB - 1;
int j = lengthA - 1;
vector<double> newPath;
while (i > 0 || j > 0) {
if (i == 0) {
j = j - 1;
} else if (j == 0) {
i = i - 1;
} else {
if (pathArray[i-1][j] == min(pathArray[i-1][j-1], pathArray[i-1][j], pathArray[i][j-1])) {
i = i - 1;
} else if (pathArray[i][j-1] == min(pathArray[i-1][j-1], pathArray[i-1][j], pathArray[i][j-1])) {
j = j - 1;
} else {
i = i - 1;
j = j - 1;
}
}
newPath.push_back(j);
newPath.push_back(i);
}
return newPath;
}
| [
"puranzhang@gmail.com"
] | puranzhang@gmail.com |
53b2d74845df78793d481b95e635e9ac09c85025 | e438ba10ad45a9db2d53c01ba7a74720b48d2ee9 | /src/PsMoveClientWrapper/Stdafx.cpp | a1d4296a88bdde28b00d01f51e7cb3b2df69fcad | [
"Apache-2.0",
"MIT"
] | permissive | banias/PSMoveRiftCatBridge | 865d978b5b2c42ef0ea02fdfa1968bcd2f089cc7 | 8eb38162bb7539458b868fe5cd145e66bef836d6 | refs/heads/master | 2021-01-23T16:51:26.224862 | 2017-06-05T20:50:52 | 2017-06-05T20:50:52 | 93,306,888 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 210 | cpp | // stdafx.cpp : source file that includes just the standard includes
// PsMoveClientWrapper.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
| [
"gbanczak@gmail.com"
] | gbanczak@gmail.com |
66e1de034cdda5deb876a943aba66d1712ea5739 | 9b7e01e37bf31fe5c10f4cccbe7c29b72a6f8568 | /src/rpcprotocol.cpp | 7059489eb7018ff717dcd97497181dec882c0273 | [
"MIT"
] | permissive | crypto-dev/bvbcoin | c8a82eb3f17892b310a6e98e42b585725143446b | 61463b0f8a81b8d003a95d971f060154aeb6d46f | refs/heads/master | 2021-07-01T00:47:53.057020 | 2017-08-10T18:47:20 | 2017-08-10T18:47:20 | 104,238,470 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,742 | cpp | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 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 "rpcprotocol.h"
#include "util.h"
#include <stdint.h>
#include <boost/algorithm/string.hpp>
#include <boost/asio.hpp>
#include <boost/asio/ssl.hpp>
#include <boost/bind.hpp>
#include <boost/filesystem.hpp>
#include <boost/foreach.hpp>
#include <boost/iostreams/concepts.hpp>
#include <boost/iostreams/stream.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/shared_ptr.hpp>
#include "json/json_spirit_writer_template.h"
using namespace std;
using namespace boost;
using namespace boost::asio;
using namespace json_spirit;
//
// HTTP protocol
//
// This ain't Apache. We're just using HTTP header for the length field
// and to be compatible with other JSON-RPC implementations.
//
string HTTPPost(const string& strMsg, const map<string,string>& mapRequestHeaders)
{
ostringstream s;
s << "POST / HTTP/1.1\r\n"
<< "User-Agent: bvbcoin-json-rpc/" << FormatFullVersion() << "\r\n"
<< "Host: 127.0.0.1\r\n"
<< "Content-Type: application/json\r\n"
<< "Content-Length: " << strMsg.size() << "\r\n"
<< "Connection: close\r\n"
<< "Accept: application/json\r\n";
BOOST_FOREACH(const PAIRTYPE(string, string)& item, mapRequestHeaders)
s << item.first << ": " << item.second << "\r\n";
s << "\r\n" << strMsg;
return s.str();
}
static string rfc1123Time()
{
return DateTimeStrFormat("%a, %d %b %Y %H:%M:%S +0000", GetTime());
}
string HTTPReply(int nStatus, const string& strMsg, bool keepalive)
{
if (nStatus == HTTP_UNAUTHORIZED)
return strprintf("HTTP/1.0 401 Authorization Required\r\n"
"Date: %s\r\n"
"Server: bvbcoin-json-rpc/%s\r\n"
"WWW-Authenticate: Basic realm=\"jsonrpc\"\r\n"
"Content-Type: text/html\r\n"
"Content-Length: 296\r\n"
"\r\n"
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\r\n"
"\"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd\">\r\n"
"<HTML>\r\n"
"<HEAD>\r\n"
"<TITLE>Error</TITLE>\r\n"
"<META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=ISO-8859-1'>\r\n"
"</HEAD>\r\n"
"<BODY><H1>401 Unauthorized.</H1></BODY>\r\n"
"</HTML>\r\n", rfc1123Time(), FormatFullVersion());
const char *cStatus;
if (nStatus == HTTP_OK) cStatus = "OK";
else if (nStatus == HTTP_BAD_REQUEST) cStatus = "Bad Request";
else if (nStatus == HTTP_FORBIDDEN) cStatus = "Forbidden";
else if (nStatus == HTTP_NOT_FOUND) cStatus = "Not Found";
else if (nStatus == HTTP_INTERNAL_SERVER_ERROR) cStatus = "Internal Server Error";
else cStatus = "";
return strprintf(
"HTTP/1.1 %d %s\r\n"
"Date: %s\r\n"
"Connection: %s\r\n"
"Content-Length: %"PRIszu"\r\n"
"Content-Type: application/json\r\n"
"Server: bvbcoin-json-rpc/%s\r\n"
"\r\n"
"%s",
nStatus,
cStatus,
rfc1123Time(),
keepalive ? "keep-alive" : "close",
strMsg.size(),
FormatFullVersion(),
strMsg);
}
bool ReadHTTPRequestLine(std::basic_istream<char>& stream, int &proto,
string& http_method, string& http_uri)
{
string str;
getline(stream, str);
// HTTP request line is space-delimited
vector<string> vWords;
boost::split(vWords, str, boost::is_any_of(" "));
if (vWords.size() < 2)
return false;
// HTTP methods permitted: GET, POST
http_method = vWords[0];
if (http_method != "GET" && http_method != "POST")
return false;
// HTTP URI must be an absolute path, relative to current host
http_uri = vWords[1];
if (http_uri.size() == 0 || http_uri[0] != '/')
return false;
// parse proto, if present
string strProto = "";
if (vWords.size() > 2)
strProto = vWords[2];
proto = 0;
const char *ver = strstr(strProto.c_str(), "HTTP/1.");
if (ver != NULL)
proto = atoi(ver+7);
return true;
}
int ReadHTTPStatus(std::basic_istream<char>& stream, int &proto)
{
string str;
getline(stream, str);
vector<string> vWords;
boost::split(vWords, str, boost::is_any_of(" "));
if (vWords.size() < 2)
return HTTP_INTERNAL_SERVER_ERROR;
proto = 0;
const char *ver = strstr(str.c_str(), "HTTP/1.");
if (ver != NULL)
proto = atoi(ver+7);
return atoi(vWords[1].c_str());
}
int ReadHTTPHeaders(std::basic_istream<char>& stream, map<string, string>& mapHeadersRet)
{
int nLen = 0;
while (true)
{
string str;
std::getline(stream, str);
if (str.empty() || str == "\r")
break;
string::size_type nColon = str.find(":");
if (nColon != string::npos)
{
string strHeader = str.substr(0, nColon);
boost::trim(strHeader);
boost::to_lower(strHeader);
string strValue = str.substr(nColon+1);
boost::trim(strValue);
mapHeadersRet[strHeader] = strValue;
if (strHeader == "content-length")
nLen = atoi(strValue.c_str());
}
}
return nLen;
}
int ReadHTTPMessage(std::basic_istream<char>& stream, map<string,
string>& mapHeadersRet, string& strMessageRet,
int nProto)
{
mapHeadersRet.clear();
strMessageRet = "";
// Read header
int nLen = ReadHTTPHeaders(stream, mapHeadersRet);
if (nLen < 0 || nLen > (int)MAX_SIZE)
return HTTP_INTERNAL_SERVER_ERROR;
// Read message
if (nLen > 0)
{
vector<char> vch(nLen);
stream.read(&vch[0], nLen);
strMessageRet = string(vch.begin(), vch.end());
}
string sConHdr = mapHeadersRet["connection"];
if ((sConHdr != "close") && (sConHdr != "keep-alive"))
{
if (nProto >= 1)
mapHeadersRet["connection"] = "keep-alive";
else
mapHeadersRet["connection"] = "close";
}
return HTTP_OK;
}
//
// JSON-RPC protocol. Bitcoin speaks version 1.0 for maximum compatibility,
// but uses JSON-RPC 1.1/2.0 standards for parts of the 1.0 standard that were
// unspecified (HTTP errors and contents of 'error').
//
// 1.0 spec: http://json-rpc.org/wiki/specification
// 1.2 spec: http://groups.google.com/group/json-rpc/web/json-rpc-over-http
// http://www.codeproject.com/KB/recipes/JSON_Spirit.aspx
//
string JSONRPCRequest(const string& strMethod, const Array& params, const Value& id)
{
Object request;
request.push_back(Pair("method", strMethod));
request.push_back(Pair("params", params));
request.push_back(Pair("id", id));
return write_string(Value(request), false) + "\n";
}
Object JSONRPCReplyObj(const Value& result, const Value& error, const Value& id)
{
Object reply;
if (error.type() != null_type)
reply.push_back(Pair("result", Value::null));
else
reply.push_back(Pair("result", result));
reply.push_back(Pair("error", error));
reply.push_back(Pair("id", id));
return reply;
}
string JSONRPCReply(const Value& result, const Value& error, const Value& id)
{
Object reply = JSONRPCReplyObj(result, error, id);
return write_string(Value(reply), false) + "\n";
}
Object JSONRPCError(int code, const string& message)
{
Object error;
error.push_back(Pair("code", code));
error.push_back(Pair("message", message));
return error;
}
| [
"pm@PMs-MacBook-Air.local"
] | pm@PMs-MacBook-Air.local |
63195ae908a73986873ef387c0b9722cd357a88b | c42292a47b9f0cfa72329f26f5a6e0760fe7420d | /code/src/printer/d_printer.h | b47479f27dfa3d8696c3e2527baf6995e5071880 | [] | no_license | guoshijiang/peripheral_sys | 804d4c14c9878246dcfd4f2f32d6da4dc5dec0a5 | c5240b95c7f84811f0bf8b9b14b503388f1dcedc | refs/heads/master | 2021-01-19T02:22:12.595966 | 2017-04-05T06:08:39 | 2017-04-05T06:08:39 | 87,272,437 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 501 | h | #ifndef D_PRINTER_H
#define D_PRINTER_H
#include <QWidget>
#include <QtPrintSupport/QPrinter>
namespace Ui {
class d_printer;
}
class d_printer : public QWidget
{
Q_OBJECT
public:
explicit d_printer(QWidget *parent = 0);
void doPrint(QList<QWidget *> wids);
~d_printer();
void doPrintPreview();
void doPrint(QList<QPixmap> pixs);
private slots:
void printPreview(QPrinter *printer);
void createPdf();
private:
Ui::d_printer *ui;
};
#endif // D_PRINTER_H
| [
"pth576454@sina.com"
] | pth576454@sina.com |
51bbab2ca04c1009b4f8e2d3c03dcfb4facb6bc8 | 88ae8695987ada722184307301e221e1ba3cc2fa | /third_party/xnnpack/src/test/f16-vsqr.cc | 4698d31a93691b9f4350f2280965a3943dea7a32 | [
"BSD-3-Clause",
"Apache-2.0",
"LGPL-2.0-or-later",
"MIT",
"GPL-1.0-or-later",
"LicenseRef-scancode-generic-cla"
] | permissive | iridium-browser/iridium-browser | 71d9c5ff76e014e6900b825f67389ab0ccd01329 | 5ee297f53dc7f8e70183031cff62f37b0f19d25f | refs/heads/master | 2023-08-03T16:44:16.844552 | 2023-07-20T15:17:00 | 2023-07-23T16:09:30 | 220,016,632 | 341 | 40 | BSD-3-Clause | 2021-08-13T13:54:45 | 2019-11-06T14:32:31 | null | UTF-8 | C++ | false | false | 6,083 | cc | // Copyright 2019 Google LLC
//
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree.
//
// Auto-generated file. Do not edit!
// Specification: test/f16-vsqr.yaml
// Generator: tools/generate-vunary-test.py
#include <gtest/gtest.h>
#include <xnnpack/common.h>
#include <xnnpack/isa-checks.h>
#include <xnnpack/vunary.h>
#include "vunary-microkernel-tester.h"
#if XNN_ENABLE_ARM_FP16_VECTOR && (XNN_ARCH_ARM || XNN_ARCH_ARM64)
TEST(F16_VSQR__NEONFP16ARITH_X8, batch_eq_8) {
TEST_REQUIRES_ARM_NEON_FP16_ARITH;
VUnaryMicrokernelTester()
.batch_size(8)
.Test(xnn_f16_vsqr_ukernel__neonfp16arith_x8);
}
TEST(F16_VSQR__NEONFP16ARITH_X8, batch_div_8) {
TEST_REQUIRES_ARM_NEON_FP16_ARITH;
for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
VUnaryMicrokernelTester()
.batch_size(batch_size)
.Test(xnn_f16_vsqr_ukernel__neonfp16arith_x8);
}
}
TEST(F16_VSQR__NEONFP16ARITH_X8, batch_lt_8) {
TEST_REQUIRES_ARM_NEON_FP16_ARITH;
for (size_t batch_size = 1; batch_size < 8; batch_size++) {
VUnaryMicrokernelTester()
.batch_size(batch_size)
.Test(xnn_f16_vsqr_ukernel__neonfp16arith_x8);
}
}
TEST(F16_VSQR__NEONFP16ARITH_X8, batch_gt_8) {
TEST_REQUIRES_ARM_NEON_FP16_ARITH;
for (size_t batch_size = 8 + 1; batch_size < 16; batch_size++) {
VUnaryMicrokernelTester()
.batch_size(batch_size)
.Test(xnn_f16_vsqr_ukernel__neonfp16arith_x8);
}
}
TEST(F16_VSQR__NEONFP16ARITH_X8, inplace) {
TEST_REQUIRES_ARM_NEON_FP16_ARITH;
for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
VUnaryMicrokernelTester()
.batch_size(batch_size)
.inplace(true)
.Test(xnn_f16_vsqr_ukernel__neonfp16arith_x8);
}
}
#endif // XNN_ENABLE_ARM_FP16_VECTOR && (XNN_ARCH_ARM || XNN_ARCH_ARM64)
#if XNN_ENABLE_ARM_FP16_VECTOR && (XNN_ARCH_ARM || XNN_ARCH_ARM64)
TEST(F16_VSQR__NEONFP16ARITH_X16, batch_eq_16) {
TEST_REQUIRES_ARM_NEON_FP16_ARITH;
VUnaryMicrokernelTester()
.batch_size(16)
.Test(xnn_f16_vsqr_ukernel__neonfp16arith_x16);
}
TEST(F16_VSQR__NEONFP16ARITH_X16, batch_div_16) {
TEST_REQUIRES_ARM_NEON_FP16_ARITH;
for (size_t batch_size = 32; batch_size < 160; batch_size += 16) {
VUnaryMicrokernelTester()
.batch_size(batch_size)
.Test(xnn_f16_vsqr_ukernel__neonfp16arith_x16);
}
}
TEST(F16_VSQR__NEONFP16ARITH_X16, batch_lt_16) {
TEST_REQUIRES_ARM_NEON_FP16_ARITH;
for (size_t batch_size = 1; batch_size < 16; batch_size++) {
VUnaryMicrokernelTester()
.batch_size(batch_size)
.Test(xnn_f16_vsqr_ukernel__neonfp16arith_x16);
}
}
TEST(F16_VSQR__NEONFP16ARITH_X16, batch_gt_16) {
TEST_REQUIRES_ARM_NEON_FP16_ARITH;
for (size_t batch_size = 16 + 1; batch_size < 32; batch_size++) {
VUnaryMicrokernelTester()
.batch_size(batch_size)
.Test(xnn_f16_vsqr_ukernel__neonfp16arith_x16);
}
}
TEST(F16_VSQR__NEONFP16ARITH_X16, inplace) {
TEST_REQUIRES_ARM_NEON_FP16_ARITH;
for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
VUnaryMicrokernelTester()
.batch_size(batch_size)
.inplace(true)
.Test(xnn_f16_vsqr_ukernel__neonfp16arith_x16);
}
}
#endif // XNN_ENABLE_ARM_FP16_VECTOR && (XNN_ARCH_ARM || XNN_ARCH_ARM64)
#if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(F16_VSQR__F16C_X8, batch_eq_8) {
TEST_REQUIRES_X86_F16C;
VUnaryMicrokernelTester()
.batch_size(8)
.Test(xnn_f16_vsqr_ukernel__f16c_x8);
}
TEST(F16_VSQR__F16C_X8, batch_div_8) {
TEST_REQUIRES_X86_F16C;
for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
VUnaryMicrokernelTester()
.batch_size(batch_size)
.Test(xnn_f16_vsqr_ukernel__f16c_x8);
}
}
TEST(F16_VSQR__F16C_X8, batch_lt_8) {
TEST_REQUIRES_X86_F16C;
for (size_t batch_size = 1; batch_size < 8; batch_size++) {
VUnaryMicrokernelTester()
.batch_size(batch_size)
.Test(xnn_f16_vsqr_ukernel__f16c_x8);
}
}
TEST(F16_VSQR__F16C_X8, batch_gt_8) {
TEST_REQUIRES_X86_F16C;
for (size_t batch_size = 8 + 1; batch_size < 16; batch_size++) {
VUnaryMicrokernelTester()
.batch_size(batch_size)
.Test(xnn_f16_vsqr_ukernel__f16c_x8);
}
}
TEST(F16_VSQR__F16C_X8, inplace) {
TEST_REQUIRES_X86_F16C;
for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
VUnaryMicrokernelTester()
.batch_size(batch_size)
.inplace(true)
.Test(xnn_f16_vsqr_ukernel__f16c_x8);
}
}
#endif // XNN_ARCH_X86 || XNN_ARCH_X86_64
#if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(F16_VSQR__F16C_X16, batch_eq_16) {
TEST_REQUIRES_X86_F16C;
VUnaryMicrokernelTester()
.batch_size(16)
.Test(xnn_f16_vsqr_ukernel__f16c_x16);
}
TEST(F16_VSQR__F16C_X16, batch_div_16) {
TEST_REQUIRES_X86_F16C;
for (size_t batch_size = 32; batch_size < 160; batch_size += 16) {
VUnaryMicrokernelTester()
.batch_size(batch_size)
.Test(xnn_f16_vsqr_ukernel__f16c_x16);
}
}
TEST(F16_VSQR__F16C_X16, batch_lt_16) {
TEST_REQUIRES_X86_F16C;
for (size_t batch_size = 1; batch_size < 16; batch_size++) {
VUnaryMicrokernelTester()
.batch_size(batch_size)
.Test(xnn_f16_vsqr_ukernel__f16c_x16);
}
}
TEST(F16_VSQR__F16C_X16, batch_gt_16) {
TEST_REQUIRES_X86_F16C;
for (size_t batch_size = 16 + 1; batch_size < 32; batch_size++) {
VUnaryMicrokernelTester()
.batch_size(batch_size)
.Test(xnn_f16_vsqr_ukernel__f16c_x16);
}
}
TEST(F16_VSQR__F16C_X16, inplace) {
TEST_REQUIRES_X86_F16C;
for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
VUnaryMicrokernelTester()
.batch_size(batch_size)
.inplace(true)
.Test(xnn_f16_vsqr_ukernel__f16c_x16);
}
}
#endif // XNN_ARCH_X86 || XNN_ARCH_X86_64
| [
"jengelh@inai.de"
] | jengelh@inai.de |
633a8f74e06274da92031060ba53f42938543a31 | 3847556c97876ee40c1ba94ef527b6fc28d94e90 | /open-safari/sources/tdogl/Program.cpp | 657f5eb832fcf62e11174ae60a4d7f12d04f20c7 | [] | no_license | DarrenTsung/open-safari | d0f510bdad5492da32e09e929caa650372a68665 | 5d6fdeef0ea96bb2254fd01e2d3ca91c0d12fed0 | refs/heads/master | 2016-09-06T00:38:58.575285 | 2014-05-19T22:40:19 | 2014-05-19T22:40:19 | 19,865,723 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,965 | cpp | //
// Program.cpp
// open-safari
//
// Created by Darren Tsung on 5/16/14.
// Copyright (c) 2014 Lambawoof. All rights reserved.
//
#include "Program.h"
#include <stdexcept>
#include <glm/gtc/type_ptr.hpp>
using namespace tdogl;
Program::Program(const std::vector<Shader>& shaders) :
_object(0)
{
if (shaders.size() == 0)
throw std::runtime_error("No shaders were inputted to create Program");
// create the program object
_object = glCreateProgram();
if (_object == 0)
throw std::runtime_error("glCreateProgram() failed!");
// attach all the shaders
for (int i=0; i<shaders.size(); i++)
glAttachShader(_object, shaders[i].object());
// link all the shaders together
glLinkProgram(_object);
// detach all the shaders
for (int i=0; i<shaders.size(); i++)
glDetachShader(_object, shaders[i].object());
GLint status;
glGetProgramiv(_object, GL_LINK_STATUS, &status);
if (status == GL_FALSE) {
std::string msg("Program linking error:\n");
GLint infoLogLength;
glGetProgramiv(_object, GL_INFO_LOG_LENGTH, &infoLogLength);
char *strLogInfo = new char[infoLogLength + 1];
glGetProgramInfoLog(_object, infoLogLength, NULL, strLogInfo);
msg += strLogInfo;
delete[] strLogInfo;
glDeleteProgram(_object); _object = 0;
throw std::runtime_error(msg);
}
}
Program::~Program() {
// _object might be 0 if ctor fails by throwing exception
if (_object != 0) glDeleteProgram(_object);
}
GLuint Program::object() const {
return _object;
}
GLint Program::attrib(const GLchar *attribName) const {
if (!attribName)
throw std::runtime_error("attribName was NULL");
GLint attrib = glGetAttribLocation(_object, attribName);
if(attrib == -1)
throw std::runtime_error(std::string("Program attribute not found: ") + attribName);
return attrib;
}
GLint Program::uniform(const GLchar *uniformName) const {
if (!uniformName)
throw std::runtime_error("uniformName was NULL");
GLint uniform = glGetUniformLocation(_object, uniformName);
if (uniform == -1)
throw std::runtime_error(std::string("Uniform attribute not found: ") + uniformName);
return uniform;
}
void Program::use() const {
glUseProgram(_object);
}
bool Program::isInUse() const {
GLint currentProgram = 0;
glGetIntegerv(GL_CURRENT_PROGRAM, ¤tProgram);
return (currentProgram == (GLint)_object);
}
void Program::stopUsing() const {
assert(isInUse());
glUseProgram(0);
}
#define ATTRIB_N_UNIFORM_SETTERS(OGL_TYPE, TYPE_PREFIX, TYPE_SUFFIX) \
\
void Program::setAttrib(const GLchar* name, OGL_TYPE v0) \
{ assert(isInUse()); glVertexAttrib ## TYPE_PREFIX ## 1 ## TYPE_SUFFIX (attrib(name), v0); } \
void Program::setAttrib(const GLchar* name, OGL_TYPE v0, OGL_TYPE v1) \
{ assert(isInUse()); glVertexAttrib ## TYPE_PREFIX ## 2 ## TYPE_SUFFIX (attrib(name), v0, v1); } \
void Program::setAttrib(const GLchar* name, OGL_TYPE v0, OGL_TYPE v1, OGL_TYPE v2) \
{ assert(isInUse()); glVertexAttrib ## TYPE_PREFIX ## 3 ## TYPE_SUFFIX (attrib(name), v0, v1, v2); } \
void Program::setAttrib(const GLchar* name, OGL_TYPE v0, OGL_TYPE v1, OGL_TYPE v2, OGL_TYPE v3) \
{ assert(isInUse()); glVertexAttrib ## TYPE_PREFIX ## 4 ## TYPE_SUFFIX (attrib(name), v0, v1, v2, v3); } \
\
void Program::setAttrib1v(const GLchar* name, const OGL_TYPE* v) \
{ assert(isInUse()); glVertexAttrib ## TYPE_PREFIX ## 1 ## TYPE_SUFFIX ## v (attrib(name), v); } \
void Program::setAttrib2v(const GLchar* name, const OGL_TYPE* v) \
{ assert(isInUse()); glVertexAttrib ## TYPE_PREFIX ## 2 ## TYPE_SUFFIX ## v (attrib(name), v); } \
void Program::setAttrib3v(const GLchar* name, const OGL_TYPE* v) \
{ assert(isInUse()); glVertexAttrib ## TYPE_PREFIX ## 3 ## TYPE_SUFFIX ## v (attrib(name), v); } \
void Program::setAttrib4v(const GLchar* name, const OGL_TYPE* v) \
{ assert(isInUse()); glVertexAttrib ## TYPE_PREFIX ## 4 ## TYPE_SUFFIX ## v (attrib(name), v); } \
\
void Program::setUniform(const GLchar* name, OGL_TYPE v0) \
{ assert(isInUse()); glUniform1 ## TYPE_SUFFIX (uniform(name), v0); } \
void Program::setUniform(const GLchar* name, OGL_TYPE v0, OGL_TYPE v1) \
{ assert(isInUse()); glUniform2 ## TYPE_SUFFIX (uniform(name), v0, v1); } \
void Program::setUniform(const GLchar* name, OGL_TYPE v0, OGL_TYPE v1, OGL_TYPE v2) \
{ assert(isInUse()); glUniform3 ## TYPE_SUFFIX (uniform(name), v0, v1, v2); } \
void Program::setUniform(const GLchar* name, OGL_TYPE v0, OGL_TYPE v1, OGL_TYPE v2, OGL_TYPE v3) \
{ assert(isInUse()); glUniform4 ## TYPE_SUFFIX (uniform(name), v0, v1, v2, v3); } \
\
void Program::setUniform1v(const GLchar* name, const OGL_TYPE* v, GLsizei count) \
{ assert(isInUse()); glUniform1 ## TYPE_SUFFIX ## v (uniform(name), count, v); } \
void Program::setUniform2v(const GLchar* name, const OGL_TYPE* v, GLsizei count) \
{ assert(isInUse()); glUniform2 ## TYPE_SUFFIX ## v (uniform(name), count, v); } \
void Program::setUniform3v(const GLchar* name, const OGL_TYPE* v, GLsizei count) \
{ assert(isInUse()); glUniform3 ## TYPE_SUFFIX ## v (uniform(name), count, v); } \
void Program::setUniform4v(const GLchar* name, const OGL_TYPE* v, GLsizei count) \
{ assert(isInUse()); glUniform4 ## TYPE_SUFFIX ## v (uniform(name), count, v); }
ATTRIB_N_UNIFORM_SETTERS(GLfloat, , f);
ATTRIB_N_UNIFORM_SETTERS(GLdouble, , d);
ATTRIB_N_UNIFORM_SETTERS(GLint, I, i);
ATTRIB_N_UNIFORM_SETTERS(GLuint, I, ui);
void Program::setUniformMatrix2(const GLchar* name, const GLfloat* v, GLsizei count, GLboolean transpose) {
assert(isInUse());
glUniformMatrix2fv(uniform(name), count, transpose, v);
}
void Program::setUniformMatrix3(const GLchar* name, const GLfloat* v, GLsizei count, GLboolean transpose) {
assert(isInUse());
glUniformMatrix3fv(uniform(name), count, transpose, v);
}
void Program::setUniformMatrix4(const GLchar* name, const GLfloat* v, GLsizei count, GLboolean transpose) {
assert(isInUse());
glUniformMatrix4fv(uniform(name), count, transpose, v);
}
void Program::setUniform(const GLchar* name, const glm::mat2& m, GLboolean transpose) {
assert(isInUse());
glUniformMatrix2fv(uniform(name), 1, transpose, glm::value_ptr(m));
}
void Program::setUniform(const GLchar* name, const glm::mat3& m, GLboolean transpose) {
assert(isInUse());
glUniformMatrix3fv(uniform(name), 1, transpose, glm::value_ptr(m));
}
void Program::setUniform(const GLchar* name, const glm::mat4& m, GLboolean transpose) {
assert(isInUse());
glUniformMatrix4fv(uniform(name), 1, transpose, glm::value_ptr(m));
}
void Program::setUniform(const GLchar* uniformName, const glm::vec3& v) {
setUniform3v(uniformName, glm::value_ptr(v));
}
void Program::setUniform(const GLchar* uniformName, const glm::vec4& v) {
setUniform4v(uniformName, glm::value_ptr(v));
}
| [
"darren.tsung@gmail.com"
] | darren.tsung@gmail.com |
776cf7229a69f31eb24dffe896b424182a03a298 | b819c29719ecb14440dab9d5cbc49d9901fc2d04 | /Client/Header/MeshTrailShader_Glow.h | b98d625c4f7f1bb6892764df73dc59c2ce4db712 | [] | no_license | Underdog-113/3D_portfolio | d338f49d518702b191e590dc22166c9f28c08b14 | 6b877ff5272bea2e6d2a2bd53e63b6ee4728cd9c | refs/heads/develop | 2023-07-07T20:30:00.759582 | 2021-07-27T06:01:52 | 2021-07-27T06:01:52 | 371,051,333 | 0 | 1 | null | 2021-06-13T14:30:32 | 2021-05-26T13:52:07 | C++ | UTF-8 | C++ | false | false | 347 | h | #pragma once
#include "Shader.h"
class CMeshTrailShader_Glow final : public Engine::CShader
{
public:
CMeshTrailShader_Glow();
~CMeshTrailShader_Glow();
public:
static Engine::CShader* Create();
void Free();
void Awake() override;
public:
void SetUpConstantTable(SP(Engine::CGraphicsC) spGC) override;
private:
_float4 m_Light_Pos;
};
| [
"fu79899@gmail.com"
] | fu79899@gmail.com |
69a251e885c50edf4ac530f3e11befb54d05beac | fa476614d54468bcdd9204c646bb832b4e64df93 | /otherRepos/luis/CDF/359DIV2/D.cpp | 450e305cbf3a67387142f837d27258590d3f0137 | [] | no_license | LuisAlbertoVasquezVargas/CP | 300b0ed91425cd7fea54237a61a4008c5f1ed2b7 | 2901a603a00822b008fae3ac65b7020dcddcb491 | refs/heads/master | 2021-01-22T06:23:14.143646 | 2017-02-16T17:52:59 | 2017-02-16T17:52:59 | 81,754,145 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,592 | cpp | #include<bits/stdc++.h>
using namespace std;
#define REP(i , n) for(int i = 0 ; i < n ; ++i)
#define clr( t , val ) memset( t , val , sizeof( t ) )
#define pb push_back
#define all( v ) v.begin() , v.end()
#define SZ( v ) ((int)v.size())
typedef vector< int > vi;
typedef long long ll;
const int N = 300000;
const int INF = (1<<29);
ll target;
vi G[ N + 5 ];
void add( int u , int v ){
G[ u ].pb( v );
}
int DP[ N + 5 ] , MAXI[ N + 5 ];
void dfs( int u , int p = -1 ){
DP[ u ] = 1 , MAXI[ u ] = 0;
for( int i = 0 ; i < SZ( G[ u ] ) ; ++i ){
int v = G[ u ][ i ];
if( v == p ) continue;
dfs( v , u );
DP[ u ] += DP[ v ];
MAXI[ u ] = max( MAXI[ u ] , DP[ v ] );
}
}
int P[N + 5];
int solve( int u , int p = -1 ){
//cout << "* " << root << endl;
int root = -1;
for(auto v : G[ u ]){
if(v == p) continue;
MAXI[ v ] = max( MAXI[ v ] , DP[ u ] - DP[ v ] );
if( 2 * MAXI[ v ] <= DP[ u ] ){
root = v;
break;
}
}
int ans = u;
for(auto v : G[ u ]){
if(v == p) continue;
int temp = solve(v , u);
if(v == root) ans = temp;
}
return P[ u ] = ans;
}
int main(){
int n , Q;
while(scanf( "%d%d" , &n , &Q ) == 2){
for( int i = 0 ; i < N ; ++i ) G[ i ].clear();
for( int u = 2 ; u <= n ; ++u ){
int p;
scanf( "%d" , &p );
add( p - 1 , u - 1 );
add( u - 1 , p - 1 );
}
clr(P , -1);
dfs(0);
solve( 0 );
REP(i , Q){
int u;
scanf("%d" , &u);
u --;
printf("%d\n" , P[ u ] + 1);
}
//REP(i , n) cout << i + 1 << " -> " << P[ i ] + 1 << endl;
}
}
| [
"luisv0909@gmail.com"
] | luisv0909@gmail.com |
6bb9a51b3326f47befa66be76d98ba643aff0aab | dce0fffc80689a2f2484438aedc17baab4bfdcaf | /ZZ/hDrawer.cpp | eddf60c066f3b8aecbf46874e5341e25817ffa53 | [] | no_license | maniamaster/KT_HIP | d6bb0619f3a6f5e972155359a54ec0b5a2f2f64e | d3136d4b8bf7a106c766c52ae755a300091c92a7 | refs/heads/master | 2020-03-11T23:49:59.778248 | 2018-05-09T18:10:19 | 2018-05-09T18:10:19 | 130,332,998 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,919 | cpp | #define HDRAWER_CPP
//#include "compareDatasets.hpp"
#include "TFile.h"
#include "TTree.h"
#include "TLorentzVector.h"
#include "TH1.h"
#include "TMath.h"
#include "TCanvas.h"
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include "TROOT.h"
class event {
private:
int m_ientry;
char* m_filename;
TFile *file;
TTree *tree;
int m_nentries;
void make4Vectors();
char* m_datasetname;
char* m_title;
public:
event(char* filename, char* title="untitled");
~event();
bool GetNextEntry();
void SetFileName(char* filename);
string GetFileName();
void initialize();
double lep_energy[10];
double lep_px[10];
double lep_py[10];
double lep_pz[10];
double lep_eta[10];
double lep_id[10];
double lep_phi[10];
double lep_drjet[10];
double lep_pt[10];
double lep_etiso[10];
double etmis;
double ptmisx;
double ptmisy;
double ptmis;
double sumet;
double sumetjets;
int njet;
int nlep;
int nphot;
TLorentzVector lep[10];
TLorentzVector lep1;
TLorentzVector lep2;
TLorentzVector lep3;
TLorentzVector lep4;
int GetEntries();
int GetIentry();
char* GetDatasetName();
void SetTitle(char* title);
char* GetTitle();
};
event::event(char* filename, char* title)
{
SetFileName( filename );
SetTitle( title );
initialize();
m_ientry = -1;
}
event::~event() {
if (file)
{
file->Close();
delete file;
}
if (tree) delete tree;
}
void event::SetFileName(char* filename)
{
m_filename = filename;
m_datasetname = filename;
}
string event::GetFileName() { return m_filename; }
void event::initialize()
{
file = new TFile(m_filename);
tree = (TTree*) file->Get("tree");
tree->SetBranchAddress("lep_energy", lep_energy);
tree->SetBranchAddress("lep_px", lep_px);
tree->SetBranchAddress("lep_py", lep_py);
tree->SetBranchAddress("lep_pz", lep_pz);
tree->SetBranchAddress("lep_eta", lep_eta);
tree->SetBranchAddress("lep_id", lep_id);
tree->SetBranchAddress("lep_phi", lep_phi);
tree->SetBranchAddress("lep_drjet", lep_drjet);
tree->SetBranchAddress("lep_pt", lep_pt);
tree->SetBranchAddress("lep_etiso", &lep_etiso);
tree->SetBranchAddress("etmis", &etmis);
tree->SetBranchAddress("ptmisx", &ptmisx);
tree->SetBranchAddress("ptmisy", &ptmisy);
tree->SetBranchAddress("sumet", &sumet);
tree->SetBranchAddress("sumetjets", &sumetjets);
tree->SetBranchAddress("njet" ,&njet);
tree->SetBranchAddress("nlep", &nlep);
tree->SetBranchAddress("nphot", &nphot);
m_nentries = tree->GetEntries();
//tree->GetEntry(0);
//cout << "Tree: " << tree << endl;
//cout << "File: " << file << endl;
}
int event::GetEntries() { return m_nentries; }
int event::GetIentry() { return m_ientry; }
void event::make4Vectors()
{
//lep.clear();
for (int i=0; i<nlep; i++)
{
TLorentzVector tlvec;
tlvec.SetPxPyPzE( lep_px[i], lep_py[i], lep_pz[i], lep_energy[i] );
lep[i] = tlvec;
//delete tlvec;
}
lep1 = lep[0];
lep2 = lep[1];
lep3 = lep[2];
lep4 = lep[3];
}
bool event::GetNextEntry()
{
if (m_ientry < m_nentries - 1)
{
m_ientry++;
tree->GetEntry(m_ientry);
make4Vectors();
return true;
}
else return false;
}
char* event::GetDatasetName() { return m_datasetname; }
void event::SetTitle(char* title) { m_title = title; }
char* event::GetTitle() { return m_title; }
// bool next_entry(event *ev1, event *ev2, event *ev3, event *ev4)
// {
// bool go_on = ev1->GetNextEntry() || ev2->GetNextEntry() || ev3->GetNextEntry();
//
// return go_on;
// }
// event* ev_initialize(char* filename, char* title="untitled")
// {
// event *ev = new event();
// ev->SetFileName(filename);
// ev->SetTitle( title );
// ev->initialize();
//
//
// return ev;
// }
class hDrawer {
private:
int m_ihisto;
int m_ievent;
vector<TH1D> histos;
vector<event*> datasets;
vector<double> prehisto;
void makeHistogram();
int man_nbins;
double man_bin_min;
double man_bin_max;
bool manual_binning;
public:
hDrawer();
~hDrawer();
void Add(event* ev);
void Fill(double var);
// void XAxis(string name);
void DrawCanvas(const char* name);
event* GetNextEvent();
bool go_on;
void Binning(int nb, double b_min, double b_max);
};
hDrawer::hDrawer()
{
m_ihisto = 0;
m_ievent = 0;
go_on = true;
prehisto.clear();
datasets.clear();
manual_binning = true;
}
hDrawer::~hDrawer() {
}
void hDrawer::Add(event* ev) {
datasets.push_back(ev);
}
void hDrawer::Fill(double var)
{
if (go_on) prehisto.push_back(var);
}
void hDrawer::DrawCanvas( const char* name)
{
TCanvas *canvas = new TCanvas();
canvas->Divide(2,2);
cout <<" Plotting " << histos.size() << " histograms..." << endl;
for (int i=0; i<histos.size(); i++)
{
canvas->cd(i+1);
histos[i].SetTitle( datasets[i]->GetTitle() );
histos[i].Scale(1./histos[i].Integral());
histos[i].Draw();
histos[i].SetLineWidth(2);
TAxis* xax = histos[i].GetXaxis();
xax->SetTitle( name );
}
canvas->cd();
}
void hDrawer::makeHistogram() {
double min=0, max=0;
for (int i=0; i<prehisto.size(); i++)
{
if (i==0)
{
min=prehisto[i];
max=prehisto[i];
}
if (prehisto[i] < min) min = prehisto[i];
if (prehisto[i] > max) max = prehisto[i];
}
TH1D histo1 = TH1D("temp", "temp", 10000, min, max);
for (int i=0; i<prehisto.size(); i++)
{
histo1.Fill(prehisto[i]);
}
int nbins;
if (manual_binning == true) {
double binsize;
int nq=2;
double xq[nq];
double yq[nq];
xq[0]=0.25;
xq[1]=0.75;
histo1.GetQuantiles(nq, yq, xq);
//cout << "25% : " << yq[0] << " 75% : " << yq[1] << endl;
double n = (double) prehisto.size();
double n13 = pow(n,-0.3333333);
//cout << "n : " << n << " n^-1/3 : " << n13 << endl;
binsize=0.5*(yq[1]-yq[0])*n13;
nbins=TMath::Nint((max-min)/binsize);
//cout << "binsize : " << binsize << " nbins : " << nbins << endl;
}
else
{
nbins = man_nbins;
min = man_bin_min;
max = man_bin_max;
}
TH1D histo2 = TH1D(datasets[m_ievent]->GetDatasetName(), "Title", nbins, min, max);
for (int i=0; i<prehisto.size(); i++)
{
histo2.Fill(prehisto[i]);
}
histos.push_back(histo2);
prehisto.clear();
}
event* hDrawer::GetNextEvent()
{
if (datasets[m_ievent]->GetNextEntry()) return datasets[m_ievent];
else
{
//cout << "creating histogram" << endl;
makeHistogram();
// go_on = false;
// return datasets[m_ievent];
if (m_ievent < (int) datasets.size()-1 && datasets[m_ievent+1]->GetNextEntry() )
{
//cout << "going to next dataset" << endl;
m_ievent++;
return datasets[m_ievent];
}
else
{
// cout << "finished" << endl;
go_on = false;
return datasets[m_ievent];
}
}
}
void hDrawer::Binning(int nb, double b_min, double b_max)
{
manual_binning = false;
man_nbins = nb;
man_bin_min = b_min;
man_bin_max = b_max;
}
| [
"eric.bertok@c032.cip.physik.lokal"
] | eric.bertok@c032.cip.physik.lokal |
7518a50358fdd6f5df512b3ff117cfe5616fff6e | 1f1cc05377786cc2aa480cbdfde3736dd3930f73 | /xulrunner-sdk-26/xulrunner-sdk/include/nsITransfer.h | 0f0958d2fa7e6444be86954a6da4c94b3975a9a2 | [
"Apache-2.0"
] | permissive | julianpistorius/gp-revolution-gaia | 84c3ec5e2f3b9e76f19f45badc18d5544bb76e0d | 6e27b83efb0d4fa4222eaf25fb58b062e6d9d49e | refs/heads/master | 2021-01-21T02:49:54.000389 | 2014-03-27T09:58:17 | 2014-03-27T09:58:17 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,757 | h | /*
* DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-cen-l64-xr-ntly-000000000000/build/uriloader/base/nsITransfer.idl
*/
#ifndef __gen_nsITransfer_h__
#define __gen_nsITransfer_h__
#ifndef __gen_nsIWebProgressListener2_h__
#include "nsIWebProgressListener2.h"
#endif
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIURI; /* forward declaration */
class nsICancelable; /* forward declaration */
class nsIMIMEInfo; /* forward declaration */
class nsIFile; /* forward declaration */
/* starting interface: nsITransfer */
#define NS_ITRANSFER_IID_STR "b1c81100-9d66-11e2-9e96-0800200c9a66"
#define NS_ITRANSFER_IID \
{0xb1c81100, 0x9d66, 0x11e2, \
{ 0x9e, 0x96, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 }}
class NS_NO_VTABLE nsITransfer : public nsIWebProgressListener2 {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITRANSFER_IID)
/* void init (in nsIURI aSource, in nsIURI aTarget, in AString aDisplayName, in nsIMIMEInfo aMIMEInfo, in PRTime startTime, in nsIFile aTempFile, in nsICancelable aCancelable, in boolean aIsPrivate); */
NS_IMETHOD Init(nsIURI *aSource, nsIURI *aTarget, const nsAString & aDisplayName, nsIMIMEInfo *aMIMEInfo, PRTime startTime, nsIFile *aTempFile, nsICancelable *aCancelable, bool aIsPrivate) = 0;
/* void setSha256Hash (in ACString aHash); */
NS_IMETHOD SetSha256Hash(const nsACString & aHash) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsITransfer, NS_ITRANSFER_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSITRANSFER \
NS_IMETHOD Init(nsIURI *aSource, nsIURI *aTarget, const nsAString & aDisplayName, nsIMIMEInfo *aMIMEInfo, PRTime startTime, nsIFile *aTempFile, nsICancelable *aCancelable, bool aIsPrivate); \
NS_IMETHOD SetSha256Hash(const nsACString & aHash);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSITRANSFER(_to) \
NS_IMETHOD Init(nsIURI *aSource, nsIURI *aTarget, const nsAString & aDisplayName, nsIMIMEInfo *aMIMEInfo, PRTime startTime, nsIFile *aTempFile, nsICancelable *aCancelable, bool aIsPrivate) { return _to Init(aSource, aTarget, aDisplayName, aMIMEInfo, startTime, aTempFile, aCancelable, aIsPrivate); } \
NS_IMETHOD SetSha256Hash(const nsACString & aHash) { return _to SetSha256Hash(aHash); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSITRANSFER(_to) \
NS_IMETHOD Init(nsIURI *aSource, nsIURI *aTarget, const nsAString & aDisplayName, nsIMIMEInfo *aMIMEInfo, PRTime startTime, nsIFile *aTempFile, nsICancelable *aCancelable, bool aIsPrivate) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aSource, aTarget, aDisplayName, aMIMEInfo, startTime, aTempFile, aCancelable, aIsPrivate); } \
NS_IMETHOD SetSha256Hash(const nsACString & aHash) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSha256Hash(aHash); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsTransfer : public nsITransfer
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSITRANSFER
nsTransfer();
private:
~nsTransfer();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsTransfer, nsITransfer)
nsTransfer::nsTransfer()
{
/* member initializers and constructor code */
}
nsTransfer::~nsTransfer()
{
/* destructor code */
}
/* void init (in nsIURI aSource, in nsIURI aTarget, in AString aDisplayName, in nsIMIMEInfo aMIMEInfo, in PRTime startTime, in nsIFile aTempFile, in nsICancelable aCancelable, in boolean aIsPrivate); */
NS_IMETHODIMP nsTransfer::Init(nsIURI *aSource, nsIURI *aTarget, const nsAString & aDisplayName, nsIMIMEInfo *aMIMEInfo, PRTime startTime, nsIFile *aTempFile, nsICancelable *aCancelable, bool aIsPrivate)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setSha256Hash (in ACString aHash); */
NS_IMETHODIMP nsTransfer::SetSha256Hash(const nsACString & aHash)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
/**
* A component with this contract ID will be created each time a download is
* started, and nsITransfer::Init will be called on it and an observer will be set.
*
* Notifications of the download progress will happen via
* nsIWebProgressListener/nsIWebProgressListener2.
*
* INTERFACES THAT MUST BE IMPLEMENTED:
* nsITransfer
* nsIWebProgressListener
* nsIWebProgressListener2
*
* XXX move this to nsEmbedCID.h once the interfaces (and the contract ID) are
* frozen.
*/
#define NS_TRANSFER_CONTRACTID "@mozilla.org/transfer;1"
#endif /* __gen_nsITransfer_h__ */
| [
"luis@geeksphone.com"
] | luis@geeksphone.com |
6da29df92d8c6f4ba91438d82fb305799987a400 | 1cc17e9f4c3b6fba21aef3af5e900c80cfa98051 | /chrome/browser/profiles/profile_manager.h | 1f3aac3390b7adf67aabd76b0e1ce170404b2e62 | [
"BSD-3-Clause"
] | permissive | sharpglasses/BitPop | 2643a39b76ab71d1a2ed5b9840217b0e9817be06 | 1fae4ecfb965e163f6ce154b3988b3181678742a | refs/heads/master | 2021-01-21T16:04:02.854428 | 2013-03-22T02:12:27 | 2013-03-22T02:12:27 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 14,502 | h | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This class keeps track of the currently-active profiles in the runtime.
#ifndef CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_
#define CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_
#include <list>
#include <vector>
#include "base/basictypes.h"
#include "base/file_path.h"
#include "base/gtest_prod_util.h"
#include "base/hash_tables.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "base/threading/non_thread_safe.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_list_observer.h"
#include "chrome/browser/ui/startup/startup_types.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#if defined(OS_WIN)
#include "chrome/browser/profiles/profile_shortcut_manager_win.h"
#endif
class NewProfileLauncher;
class ProfileInfoCache;
class ProfileManager : public base::NonThreadSafe,
public content::NotificationObserver,
public Profile::Delegate {
public:
typedef base::Callback<void(Profile*, Profile::CreateStatus)> CreateCallback;
explicit ProfileManager(const FilePath& user_data_dir);
virtual ~ProfileManager();
#if defined(ENABLE_SESSION_SERVICE)
// Invokes SessionServiceFactory::ShutdownForProfile() for all profiles.
static void ShutdownSessionServices();
#endif
// Physically remove deleted profile directories from disk.
static void NukeDeletedProfilesFromDisk();
// DEPRECATED: DO NOT USE unless in ChromeOS.
// Returns the default profile. This adds the profile to the
// ProfileManager if it doesn't already exist. This method returns NULL if
// the profile doesn't exist and we can't create it.
// The profile used can be overridden by using --login-profile on cros.
Profile* GetDefaultProfile(const FilePath& user_data_dir);
// DEPRECATED: DO NOT USE unless in ChromeOS.
// Same as instance method but provides the default user_data_dir as well.
static Profile* GetDefaultProfile();
// DEPRECATED: DO NOT USE unless in ChromeOS.
// Same as GetDefaultProfile() but returns OffTheRecord profile
// if guest login.
static Profile* GetDefaultProfileOrOffTheRecord();
// Returns a profile for a specific profile directory within the user data
// dir. This will return an existing profile it had already been created,
// otherwise it will create and manage it.
Profile* GetProfile(const FilePath& profile_dir);
// Returns total number of profiles available on this machine.
size_t GetNumberOfProfiles();
// Explicit asynchronous creation of a profile located at |profile_path|.
// If the profile has already been created then callback is called
// immediately. Should be called on the UI thread.
void CreateProfileAsync(const FilePath& profile_path,
const CreateCallback& callback,
const string16& name,
const string16& icon_url);
// Initiates default profile creation. If default profile has already been
// created then the callback is called immediately. Should be called on the
// UI thread.
static void CreateDefaultProfileAsync(const CreateCallback& callback);
// Returns true if the profile pointer is known to point to an existing
// profile.
bool IsValidProfile(Profile* profile);
// Returns the directory where the first created profile is stored,
// relative to the user data directory currently in use..
FilePath GetInitialProfileDir();
// Get the Profile last used (the Profile to which owns the most recently
// focused window) with this Chrome build. If no signed profile has been
// stored in Local State, hand back the Default profile.
Profile* GetLastUsedProfile(const FilePath& user_data_dir);
// Same as instance method but provides the default user_data_dir as well.
static Profile* GetLastUsedProfile();
// Get the Profiles which are currently open, i.e., have open browsers, or
// were open the last time Chrome was running. The Profiles appear in the
// order they were opened. The last used profile will be on the list, but its
// index on the list will depend on when it was opened (it is not necessarily
// the last one).
std::vector<Profile*> GetLastOpenedProfiles(const FilePath& user_data_dir);
// Same as instance method but provides the default user_data_dir as well.
static std::vector<Profile*> GetLastOpenedProfiles();
// Returns created profiles. Note, profiles order is NOT guaranteed to be
// related with the creation order.
std::vector<Profile*> GetLoadedProfiles() const;
// content::NotificationObserver implementation.
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
// Indicate that an import process will run for the next created Profile.
void SetWillImport();
bool will_import() { return will_import_; }
// Indicate that the import process for |profile| has completed.
void OnImportFinished(Profile* profile);
// ------------------ static utility functions -------------------
// Returns the path to the default profile directory, based on the given
// user data directory.
static FilePath GetDefaultProfileDir(const FilePath& user_data_dir);
// Returns the path to the preferences file given the user profile directory.
static FilePath GetProfilePrefsPath(const FilePath& profile_dir);
// If a profile with the given path is currently managed by this object,
// return a pointer to the corresponding Profile object;
// otherwise return NULL.
Profile* GetProfileByPath(const FilePath& path) const;
// Activates a window for |profile|. If no such window yet exists, or if
// |always_create| is true, this first creates a new window, then activates
// that. If activating an exiting window and multiple windows exists then the
// window that was most recently active is activated. This is used for
// creation of a window from the multi-profile dropdown menu.
static void FindOrCreateNewWindowForProfile(
Profile* profile,
chrome::startup::IsProcessStartup process_startup,
chrome::startup::IsFirstRun is_first_run,
bool always_create);
// Profile::Delegate implementation:
virtual void OnProfileCreated(Profile* profile,
bool success,
bool is_new_profile) OVERRIDE;
// Add or remove a profile launcher to/from the list of launchers waiting for
// new profiles to be created from the multi-profile menu.
void AddProfileLauncher(NewProfileLauncher* profile_launcher);
void RemoveProfileLauncher(NewProfileLauncher* profile_launcher);
// Creates a new profile in the next available multiprofile directory.
// Directories are named "profile_1", "profile_2", etc., in sequence of
// creation. (Because directories can be removed, however, it may be the case
// that at some point the list of numbered profiles is not continuous.)
static void CreateMultiProfileAsync(const string16& name,
const string16& icon_url);
// Register multi-profile related preferences in Local State.
static void RegisterPrefs(PrefService* prefs);
// Returns a ProfileInfoCache object which can be used to get information
// about profiles without having to load them from disk.
ProfileInfoCache& GetProfileInfoCache();
// Schedules the profile at the given path to be deleted on shutdown.
void ScheduleProfileForDeletion(const FilePath& profile_dir);
// Checks if multiple profiles is enabled.
static bool IsMultipleProfilesEnabled();
// Autoloads profiles if they are running background apps.
void AutoloadProfiles();
// Register and add testing profile to the ProfileManager. Use ONLY in tests.
// This allows the creation of Profiles outside of the standard creation path
// for testing. If |addToCache|, add to ProfileInfoCache as well.
void RegisterTestingProfile(Profile* profile, bool addToCache);
const FilePath& user_data_dir() const { return user_data_dir_; }
protected:
// Does final initial actions.
virtual void DoFinalInit(Profile* profile, bool go_off_the_record);
virtual void DoFinalInitForServices(Profile* profile, bool go_off_the_record);
virtual void DoFinalInitLogging(Profile* profile);
// Creates a new profile by calling into the profile's profile creation
// method. Virtual so that unittests can return a TestingProfile instead
// of the Profile's result.
virtual Profile* CreateProfileHelper(const FilePath& path);
// Creates a new profile asynchronously by calling into the profile's
// asynchronous profile creation method. Virtual so that unittests can return
// a TestingProfile instead of the Profile's result.
virtual Profile* CreateProfileAsyncHelper(const FilePath& path,
Delegate* delegate);
#if defined(OS_WIN)
// Creates a shortcut manager. Override this to return a different shortcut
// manager or NULL to avoid creating shortcuts.
virtual ProfileShortcutManagerWin* CreateShortcutManager();
#endif
private:
friend class TestingProfileManager;
FRIEND_TEST_ALL_PREFIXES(ProfileManagerBrowserTest, DeleteAllProfiles);
// This struct contains information about profiles which are being loaded or
// were loaded.
struct ProfileInfo {
ProfileInfo(Profile* profile, bool created)
: profile(profile), created(created) {
}
~ProfileInfo();
scoped_ptr<Profile> profile;
// Whether profile has been fully loaded (created and initialized).
bool created;
// List of callbacks to run when profile initialization is done. Note, when
// profile is fully loaded this vector will be empty.
std::vector<CreateCallback> callbacks;
private:
DISALLOW_COPY_AND_ASSIGN(ProfileInfo);
};
// Adds a pre-existing Profile object to the set managed by this
// ProfileManager. This ProfileManager takes ownership of the Profile.
// The Profile should not already be managed by this ProfileManager.
// Returns true if the profile was added, false otherwise.
bool AddProfile(Profile* profile);
// Registers profile with given info. Returns pointer to created ProfileInfo
// entry.
ProfileInfo* RegisterProfile(Profile* profile, bool created);
typedef std::pair<FilePath, string16> ProfilePathAndName;
typedef std::vector<ProfilePathAndName> ProfilePathAndNames;
ProfilePathAndNames GetSortedProfilesFromDirectoryMap();
static bool CompareProfilePathAndName(
const ProfileManager::ProfilePathAndName& pair1,
const ProfileManager::ProfilePathAndName& pair2);
// Adds |profile| to the profile info cache if it hasn't been added yet.
void AddProfileToCache(Profile* profile);
#if defined(OS_WIN)
// Creates a profile desktop shortcut for |profile| if we are in multi
// profile mode and the shortcut has not been created before.
void CreateDesktopShortcut(Profile* profile);
#endif
// Initializes user prefs of |profile|. This includes profile name and
// avatar values
void InitProfileUserPrefs(Profile* profile);
// For ChromeOS, determines if profile should be otr.
bool ShouldGoOffTheRecord();
// Get the path of the next profile directory and increment the internal
// count.
// Lack of side effects:
// This function doesn't actually create the directory or touch the file
// system.
FilePath GenerateNextProfileDirectoryPath();
void RunCallbacks(const std::vector<CreateCallback>& callbacks,
Profile* profile,
Profile::CreateStatus status);
content::NotificationRegistrar registrar_;
// The path to the user data directory (DIR_USER_DATA).
const FilePath user_data_dir_;
// Indicates that a user has logged in and that the profile specified
// in the --login-profile command line argument should be used as the
// default.
bool logged_in_;
// True if an import process will be run.
bool will_import_;
// Maps profile path to ProfileInfo (if profile has been created). Use
// RegisterProfile() to add into this map. This map owns all loaded profile
// objects in a running instance of Chrome.
typedef std::map<FilePath, linked_ptr<ProfileInfo> > ProfilesInfoMap;
ProfilesInfoMap profiles_info_;
// Object to cache various information about profiles. Contains information
// about every profile which has been created for this instance of Chrome,
// if it has not been explicitly deleted.
scoped_ptr<ProfileInfoCache> profile_info_cache_;
#if defined(OS_WIN)
// Manages the creation, deletion, and renaming of Windows shortcuts by
// observing the ProfileInfoCache.
scoped_ptr<ProfileShortcutManagerWin> profile_shortcut_manager_;
#endif
#if !defined(OS_ANDROID)
class BrowserListObserver : public chrome::BrowserListObserver {
public:
explicit BrowserListObserver(ProfileManager* manager);
virtual ~BrowserListObserver();
// chrome::BrowserListObserver implementation.
virtual void OnBrowserAdded(Browser* browser) OVERRIDE;
virtual void OnBrowserRemoved(Browser* browser) OVERRIDE;
virtual void OnBrowserSetLastActive(Browser* browser) OVERRIDE;
private:
ProfileManager* profile_manager_;
DISALLOW_COPY_AND_ASSIGN(BrowserListObserver);
};
BrowserListObserver browser_list_observer_;
#endif // !defined(OS_ANDROID)
// For keeping track of the last active profiles.
std::map<Profile*, int> browser_counts_;
// On startup we launch the active profiles in the order they became active
// during the last run. This is why they are kept in a list, not in a set.
std::vector<Profile*> active_profiles_;
bool closing_all_browsers_;
DISALLOW_COPY_AND_ASSIGN(ProfileManager);
};
// Same as the ProfileManager, but doesn't initialize some services of the
// profile. This one is useful in unittests.
class ProfileManagerWithoutInit : public ProfileManager {
public:
explicit ProfileManagerWithoutInit(const FilePath& user_data_dir);
protected:
virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {}
virtual void DoFinalInitLogging(Profile*) OVERRIDE {}
};
#endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_
| [
"vgachkaylo@crystalnix.com"
] | vgachkaylo@crystalnix.com |
47e7e805204ae1fb79eaad5e56b592dc536c1c99 | d9dcb01b09565939679d3c1b2cbf89c9be89af49 | /Workshop2/Workshop2b2.cpp | 633e6215bdfe93b10196750e6fde85a014bbc35e | [] | no_license | RaeKyo/Workshop2021 | 2c2efa86e47ca3fa686791c8f819e18036121dfa | 9451d76b01d9bdaa0d6d4e15c2c3c29a0356b96f | refs/heads/master | 2023-05-30T08:48:22.363672 | 2021-06-10T12:01:16 | 2021-06-10T12:01:16 | 373,675,856 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 833 | cpp | #include <stdio.h>
int main(){
double income,taxFree,taxIncome,tax;
int n; //dependent
const int pa=9000000; // pa : personal amount
const int pd=3600000; // pd : D_ependent
printf("Income per year : ");
scanf("%lf",&income);
printf("Number of dependent : ");
scanf("%d",&n);
//tax-free per year :
taxFree = 12*(pa+n*pd);
taxIncome = income - taxFree;
if(taxIncome <=0 ){
taxIncome=0;
tax=0;
}else if(taxIncome <=5000000){
tax=taxIncome*0.05;
}else if(taxIncome <=10000000){
tax=taxIncome*0.1;
}else if(taxIncome <=18000000){
tax=taxIncome*0.15;
}else {
tax=taxIncome*0.2;
}
// printf("Income per moth : %.2lf\n",income/12);
printf("\nTax-free income : %.2lf$\n",taxFree);
printf("Taxable income : %.2lf$\n",taxIncome);
printf("Income tax : %.2lf$\n",tax);
getchar();
return 0;
}
| [
"tienhanv@gmail.com"
] | tienhanv@gmail.com |
eda7dac9305656fb21ec8431c9c92ccd181276bf | 1bf7215ac597c6b769b1f617a18b443331798437 | /Actor.h | 2dcbc77db45f3fa03f5da1e535173ba9ae3d3320 | [] | no_license | cjfrisz/evolver | 49fcb17eb3068a3bbcee80c5c87d5acccd709f48 | 07cbaaff5b67bb91508449c46df7c74e810daeb5 | refs/heads/master | 2016-09-05T19:04:16.487922 | 2011-09-26T17:51:33 | 2011-09-26T17:51:33 | 2,396,422 | 2 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 921 | h | #ifndef __ACTOR_H__
#define __ACTOR_H__
namespace evolver {
template <class T> class Point2D;
class FallBehavior;
class JumpBehavior;
class MoveBehavior;
class Actor {
public:
Actor (void);
~Actor (void);
Actor (const Actor &original);
Actor &operator= (const Actor &original);
float getActorOriginX (void);
float getActorOriginY (void);
FallBehavior *getFallBehavior (void);
JumpBehavior *getJumpBehavior (void);
MoveBehavior *getMoveBehavior (void);
void setActorOriginX (float x);
void setActorOriginY (float y);
void setFallBehavior (FallBehavior *falling);
void setJumpBehavior (JumpBehavior *jumping);
void setMoveBehavior (MoveBehavior *moving);
protected:
void copyActor (const Actor &original);
private:
Point2D<float> *origin;
FallBehavior *falling;
JumpBehavior *jumping;
MoveBehavior *moving;
};
}
#endif
| [
"cjfrisz@chrisfrisz.com"
] | cjfrisz@chrisfrisz.com |
23e51219e86a6ca12d3ded33db603fcfb99e6cd1 | e742080c7940fcdc702fd6c89bd38bf36dd3792a | /cheats/ragebot/aim.cpp | 42b96f30f94a8d563813c81cbcf4f3c85bf1d7c3 | [] | no_license | alooftr/Dynamism | 472ac1326dc5c881ed0920e65e67c670a5ca0703 | 4806fd10ab6c6a245b628146521f8d4ee145e9e4 | refs/heads/master | 2023-06-27T01:43:30.529919 | 2021-07-10T13:01:44 | 2021-07-10T13:01:44 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 32,497 | cpp | #include "aim.h"
#include "..\misc\misc.h"
#include "..\misc\logs.h"
#include "..\autowall\autowall.h"
#include "..\misc\prediction_system.h"
#include "..\fakewalk\slowwalk.h"
#include "..\lagcompensation\local_animations.h"
void aim::run(CUserCmd* cmd)
{
targets.clear();
scanned_targets.clear();
final_target.reset();
should_stop = false;
if (!config_system.g_cfg.ragebot.enable)
return;
automatic_revolver(cmd);
prepare_targets();
if (g_ctx.globals.weapon->is_non_aim())
return;
if (g_ctx.globals.current_weapon == -1)
return;
scan_targets();
if (!should_stop)
{
for (auto& target : targets)
{
if (!target.last_record->valid())
continue;
scan_data last_data;
target.last_record->adjust_player();
scan(target.last_record, last_data, g_ctx.globals.eye_pos);
if (!last_data.valid())
continue;
should_stop = true;
break;
}
}
if (!automatic_stop(cmd))
return;
if (scanned_targets.empty())
return;
find_best_target();
if (!final_target.data.valid())
return;
fire(cmd);
}
void aim::automatic_revolver(CUserCmd* cmd)
{
if (!m_engine()->IsActiveApp())
return;
if (g_ctx.globals.weapon->m_iItemDefinitionIndex() != WEAPON_REVOLVER)
return;
if (cmd->m_buttons & IN_ATTACK)
return;
g_ctx.globals.revolver_working = true;
static auto r8cock_flag = true;
static auto r8cock_time = 0.0f;
float REVOLVER_COCK_TIME = 0.2421875f;
const int count_needed = floor(REVOLVER_COCK_TIME / m_globals()->m_intervalpertick);
static int cocks_done = 0;
if (g_ctx.globals.weapon->m_flNextPrimaryAttack() > m_globals()->m_curtime)
{
cmd->m_buttons &= ~IN_ATTACK;
return;
}
if (cocks_done < count_needed)
{
cmd->m_buttons |= IN_ATTACK;
++cocks_done;
return;
}
else
{
cmd->m_buttons &= ~IN_ATTACK;
cocks_done = 0;
return;
}
cmd->m_buttons |= IN_ATTACK;
float curtime = g_ctx.local()->m_nTickBase() * m_globals()->m_intervalpertick;
static float next_shoot_time = 0.f;
if (fabsf(next_shoot_time - curtime) < 0.5)
next_shoot_time = curtime + 0.2f - m_globals()->m_intervalpertick; // -1 because we already cocked THIS tick ???
if (next_shoot_time - curtime - m_globals()->m_intervalpertick <= 0.f)
next_shoot_time = curtime + 0.2f;
}
void aim::prepare_targets()
{
for (auto i = 1; i < m_globals()->m_maxclients; i++)
{
auto e = (player_t*)m_entitylist()->GetClientEntity(i);
if (!e->valid(true, false))
continue;
auto records = &player_records[i]; //-V826
if (records->empty())
continue;
targets.emplace_back(target(e, get_record(records, false), get_record(records, true)));
}
}
static bool compare_records(const optimized_adjust_data& first, const optimized_adjust_data& second)
{
if (first.shot != second.shot)
return first.shot;
else if (first.speed != second.speed)
return first.speed > second.speed;
return first.simulation_time < second.simulation_time;
}
adjust_data* aim::get_record(std::deque <adjust_data>* records, bool history)
{
if (history)
{
std::deque <optimized_adjust_data> optimized_records; //-V826
for (auto i = 0; i < records->size(); ++i)
{
auto record = &records->at(i);
optimized_adjust_data optimized_record;
optimized_record.i = i;
optimized_record.player = record->player;
optimized_record.simulation_time = record->simulation_time;
optimized_record.speed = record->velocity.Length();
optimized_record.shot = record->shot;
optimized_records.emplace_back(optimized_record);
}
std::sort(optimized_records.begin(), optimized_records.end(), compare_records);
for (auto& optimized_record : optimized_records)
{
auto record = &records->at(optimized_record.i);
if (!record->valid())
continue;
return record;
}
}
else
{
for (auto i = 0; i < records->size(); ++i)
{
auto record = &records->at(i);
if (!record->valid())
continue;
return record;
}
}
return nullptr;
}
int aim::get_minimum_damage(bool visible, int health)
{
if (key_binds::get().get_key_bind_state(4 + g_ctx.globals.current_weapon))
{
if (config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].minimum_override_damage > 100)
return health + config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].minimum_override_damage - 100;
else
return math::clamp(config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].minimum_override_damage, 1, health);
}
else
{
if (config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].minimum_damage > 100)
return health + config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].minimum_damage - 100;
else
return math::clamp(config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].minimum_damage, 1, health);
}
}
void aim::scan_targets()
{
if (targets.empty())
return;
for (auto& target : targets)
{
if (target.history_record->valid())
{
scan_data last_data;
scan_data history_data;
if (target.last_record->valid())
{
target.last_record->adjust_player();
scan(target.last_record, last_data);
}
else if (!target.history_record->valid())
{
target.history_record->adjust_player();
scan(target.history_record, history_data);
}
if (last_data.valid())
scanned_targets.emplace_back(scanned_target(target.last_record, last_data));
else if (history_data.valid() && last_data.valid() > history_data.hitbox && last_data.hitbox)
scanned_targets.emplace_back();
else if (history_data.valid() > history_data.hitbox && history_data.damage && history_data.visible)
last_data.valid() > last_data.hitbox&& last_data.damage&& last_data.visible;
else if (history_data.valid())
scanned_targets.emplace_back(scanned_target(target.history_record, history_data));
}
else
{
if (!target.last_record->valid())
continue;
if (!target.history_record->valid())
continue;
scan_data last_data;
scan_data history_data;
target.last_record->adjust_player();
scan(target.last_record, last_data);
target.history_record->adjust_player();
scan(target.history_record, history_data);
if (!last_data.valid())
continue;
if (!history_data.valid())
continue;
scanned_targets.emplace_back(scanned_target(target.last_record, last_data));
scanned_targets.emplace_back(scanned_target(target.history_record, history_data));
}
}
}
bool aim::automatic_stop(CUserCmd* cmd)
{
if (!should_stop)
return true;
if (!config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].autostop)
return true;
if (!(g_ctx.local()->m_fFlags() & FL_ONGROUND && engineprediction::get().backup_data.flags & FL_ONGROUND)) //-V807
return true;
if (g_ctx.globals.weapon->is_empty())
return true;
if (!config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].AUTOSTOP_BETWEEN_SHOTS && !g_ctx.globals.weapon->can_fire(false))
return true;
auto animlayer = g_ctx.local()->get_animlayers()[1];
if (animlayer.m_nSequence)
{
auto activity = g_ctx.local()->sequence_activity(animlayer.m_nSequence);
if (activity == ACT_CSGO_RELOAD && animlayer.m_flWeight > 0.0f)
return true;
}
auto weapon_info = m_weaponsystem()->GetWeaponData(g_ctx.globals.weapon->m_iItemDefinitionIndex());
if (!weapon_info)
return true;
auto max_speed = 0.46f * (g_ctx.globals.scoped ? weapon_info->flMaxPlayerSpeedAlt : weapon_info->flMaxPlayerSpeed);
if (engineprediction::get().backup_data.velocity.Length2D() < max_speed)
slowwalk::get().create_move(cmd);
else
{
Vector direction;
Vector real_view;
math::vector_angles(engineprediction::get().backup_data.velocity, direction);
m_engine()->GetViewAngles(real_view);
direction.y = real_view.y - direction.y;
Vector forward;
math::angle_vectors(direction, forward);
static auto cl_forwardspeed = m_cvar()->FindVar(crypt_str("cl_forwardspeed"));
static auto cl_sidespeed = m_cvar()->FindVar(crypt_str("cl_sidespeed"));
auto negative_forward_speed = -cl_forwardspeed->GetFloat();
auto negative_side_speed = -cl_sidespeed->GetFloat();
auto negative_forward_direction = forward * negative_forward_speed;
auto negative_side_direction = forward * negative_side_speed;
cmd->m_forwardmove = negative_forward_direction.x;
cmd->m_sidemove = negative_side_direction.y;
if (config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].AUTOSTOP_BETWEEN_SHOTS)
return false;
}
return true;
}
static bool compare_points(const scan_point& first, const scan_point& second)
{
return !first.center && first.hitbox == second.hitbox;
}
bool SafePoint(adjust_data* record) {
if (key_binds::get().get_key_bind_state(3))
return true;
else if (config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].max_misses &&
g_ctx.globals.missed_shots[record->i] >= config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].max_misses_amount)
return true;
return false;
}
void aim::scan(adjust_data* record, scan_data& data, const Vector& shoot_position, bool optimized)
{
auto weapon = g_ctx.globals.weapon;
if (!weapon)
return;
auto weapon_info = m_weaponsystem()->GetWeaponData(g_ctx.globals.weapon->m_iItemDefinitionIndex());
if (!weapon_info)
return;
auto hitboxes = get_hitboxes(record, optimized);
if (hitboxes.empty())
return;
auto force_safe_points = SafePoint(record);
auto best_damage = 0;
auto get_hitgroup = [](const int& hitbox)
{
if (hitbox == HITBOX_HEAD)
return 0;
else if (hitbox == HITBOX_PELVIS)
return 1;
else if (hitbox == HITBOX_STOMACH)
return 2;
else if (hitbox >= HITBOX_LOWER_CHEST && hitbox <= HITBOX_UPPER_CHEST)
return 3;
else if (hitbox >= HITBOX_RIGHT_THIGH && hitbox <= HITBOX_LEFT_FOOT)
return 4;
else if (hitbox >= HITBOX_RIGHT_HAND && hitbox <= HITBOX_LEFT_FOREARM)
return 5;
return -1;
};
std::vector <scan_point> points; //-V826
for (auto& hitbox : hitboxes)
{
auto current_points = get_points(record, hitbox);
for (auto& point : current_points)
{
if (!record->bot)
{
auto safe = 0.0f;
if (record->matrixes_data.zero[0].GetOrigin() == record->matrixes_data.first[0].GetOrigin() || record->matrixes_data.zero[0].GetOrigin() == record->matrixes_data.second[0].GetOrigin() || record->matrixes_data.first[0].GetOrigin() == record->matrixes_data.second[0].GetOrigin())
safe = 0.0f;
else if (!hitbox_intersection(record->player, record->matrixes_data.zero, hitbox, shoot_position, point.point, &safe))
safe = 0.0f;
else if (!hitbox_intersection(record->player, record->matrixes_data.first, hitbox, shoot_position, point.point, &safe))
safe = 0.0f;
else if (!hitbox_intersection(record->player, record->matrixes_data.second, hitbox, shoot_position, point.point, &safe))
safe = 0.0f;
point.safe = safe;
}
else
point.safe = 1.0f;
if (!force_safe_points || point.safe)
points.emplace_back(point);
}
}
for (auto& point : points)
{
if (points.empty())
return;
if (point.hitbox == HITBOX_HEAD)
continue;
for (auto it = points.begin(); it != points.end(); ++it)
{
if (point.point == it->point)
continue;
auto first_angle = math::calculate_angle(shoot_position, point.point);
auto second_angle = math::calculate_angle(shoot_position, it->point);
auto distance = shoot_position.DistTo(point.point);
auto fov = math::fast_sin(DEG2RAD(math::get_fov(first_angle, second_angle))) * distance;
if (fov < 5.0f)
{
points.erase(it);
break;
}
}
}
if (points.empty())
return;
std::sort(points.begin(), points.end(), compare_points);
auto body_hitboxes = true;
for (auto& point : points)
{
if (body_hitboxes && (point.hitbox < HITBOX_PELVIS || point.hitbox > HITBOX_UPPER_CHEST))
{
body_hitboxes = false;
if (config_system.g_cfg.player_list.force_body_aim[record->i])
break;
if (key_binds::get().get_key_bind_state(22))
break;
if (best_damage >= record->player->m_iHealth())
break;
if (config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].prefer_body_aim && best_damage >= 1)
break;
}
if ((config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].prefer_safe_points || force_safe_points) && data.point.safe && data.point.safe < point.safe)
continue;
auto fire_data = autowall::get().wall_penetration(shoot_position, point.point, record->player);
if (!fire_data.valid)
continue;
if (fire_data.damage < 1)
continue;
if (!fire_data.visible && !config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].autowall)
continue;
if (get_hitgroup(fire_data.hitbox) != get_hitgroup(point.hitbox))
continue;
auto current_minimum_damage = get_minimum_damage(false, record->player->m_iHealth());
if (fire_data.damage >= current_minimum_damage)
{
if (!should_stop)
{
should_stop = true;
if (config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].AUTOSTOP_LETHAL && fire_data.damage < record->player->m_iHealth())
should_stop = false;
else if (config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].AUTOSTOP_VISIBLE && !fire_data.visible)
should_stop = false;
else if (config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].AUTOSTOP_VISIBLE && !point.center)
should_stop = false;
}
if (force_safe_points && !point.safe)
continue;
best_damage = fire_data.damage;
data.point = point;
data.visible = fire_data.visible;
data.damage = fire_data.damage;
data.hitbox = fire_data.hitbox;
}
}
}
std::vector <int> aim::get_hitboxes(adjust_data* record, bool optimized)
{
std::vector <int> hitboxes; //-V827
auto weapon = g_ctx.globals.weapon;
auto weapon_info = m_weaponsystem()->GetWeaponData(g_ctx.globals.weapon->m_iItemDefinitionIndex());
if (!config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].prefer_safe_points && !key_binds::get().get_key_bind_state(3)) {
if (config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].body_if.enable) {
bool should_body = config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].body_if.if_under
&& record->player->m_iHealth() < config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].body_if.under_hp ||
config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].body_if.air && !record->player->m_fFlags() & FL_ONGROUND ||
record->player->m_iHealth() <= weapon_info->iDamage && config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].body_if.lethal;
if (should_body) {
hitboxes.emplace_back(HITBOX_CHEST);
hitboxes.emplace_back(HITBOX_STOMACH);
hitboxes.emplace_back(HITBOX_PELVIS);
return hitboxes;
}
}
if (config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].head_if.enable) {
bool should_head = config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].head_if.air && !record->player->m_fFlags() & FL_ONGROUND ||
config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].head_if.running && record->player->m_vecVelocity().Length2D() > 200;
if (should_head) {
hitboxes.emplace_back(HITBOX_HEAD);
hitboxes.emplace_back(HITBOX_NECK);
return hitboxes;
}
}
}
if (config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].HEAD)
hitboxes.emplace_back(HITBOX_HEAD);
if (config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].NECK)
hitboxes.emplace_back(HITBOX_NECK);
if (config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].UPERR_CHEST)
hitboxes.emplace_back(HITBOX_UPPER_CHEST);
if (config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].CHEST)
hitboxes.emplace_back(HITBOX_CHEST);
if (config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].LOWER_CHEST)
hitboxes.emplace_back(HITBOX_LOWER_CHEST);
if (config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].STOMACH)
hitboxes.emplace_back(HITBOX_STOMACH);
if (config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].PELVIS)
hitboxes.emplace_back(HITBOX_PELVIS);
if (config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].RIGHT_UPPER_ARM)
{
hitboxes.emplace_back(HITBOX_RIGHT_UPPER_ARM);
hitboxes.emplace_back(HITBOX_LEFT_UPPER_ARM);
}
if (config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].RIGHT_THIGH)
{
hitboxes.emplace_back(HITBOX_RIGHT_THIGH);
hitboxes.emplace_back(HITBOX_LEFT_THIGH);
hitboxes.emplace_back(HITBOX_RIGHT_CALF);
hitboxes.emplace_back(HITBOX_LEFT_CALF);
}
if (config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].FOOT)
{
hitboxes.emplace_back(HITBOX_RIGHT_FOOT);
hitboxes.emplace_back(HITBOX_LEFT_FOOT);
}
return hitboxes;
}
std::vector <scan_point> aim::get_points(adjust_data* record, int hitbox, bool from_aim)
{
std::vector <scan_point> points; //-V827
auto model = record->player->GetModel();
if (!model)
return points;
auto hdr = m_modelinfo()->GetStudioModel(model);
if (!hdr)
return points;
auto set = hdr->pHitboxSet(record->player->m_nHitboxSet());
if (!set)
return points;
auto bbox = set->pHitbox(hitbox);
if (!bbox)
return points;
auto center = (bbox->bbmin + bbox->bbmax) * 0.5f;
if (bbox->radius <= 0.0f)
{
auto rotation_matrix = math::angle_matrix(bbox->rotation);
matrix3x4_t matrix;
math::concat_transforms(record->matrixes_data.main[bbox->bone], rotation_matrix, matrix);
auto origin = matrix.GetOrigin();
if (hitbox == HITBOX_RIGHT_FOOT || hitbox == HITBOX_LEFT_FOOT)
{
auto side = (bbox->bbmin.z - center.z) * 0.875f;
if (hitbox == HITBOX_LEFT_FOOT)
side = -side;
points.emplace_back(scan_point(Vector(center.x, center.y, center.z + side), hitbox, true));
auto min = (bbox->bbmin.x - center.x) * 0.875f;
auto max = (bbox->bbmax.x - center.x) * 0.875f;
points.emplace_back(scan_point(Vector(center.x + min, center.y, center.z), hitbox, false));
points.emplace_back(scan_point(Vector(center.x + max, center.y, center.z), hitbox, false));
}
}
else
{
auto scale = 0.0f;
if (config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].static_point_scale)
{
if (hitbox == HITBOX_HEAD)
scale = config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].head_scale / 100.f;
else
scale = config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].body_scale / 100.f;
}
else
{
auto transformed_center = center;
math::vector_transform(transformed_center, record->matrixes_data.main[bbox->bone], transformed_center);
auto spread = g_ctx.globals.spread + g_ctx.globals.inaccuracy;
auto distance = transformed_center.DistTo(g_ctx.globals.eye_pos);
distance /= math::fast_sin(DEG2RAD(90.0f - RAD2DEG(spread)));
spread = math::fast_sin(spread);
auto radius = max(bbox->radius - distance * spread, 0.0f);
scale = math::clamp(radius / bbox->radius, 0.0f, 1.0f);
}
if (scale <= 0.0f) //-V648
{
math::vector_transform(center, record->matrixes_data.main[bbox->bone], center);
points.emplace_back(scan_point(center, hitbox, true));
return points;
}
auto final_radius = bbox->radius * scale;
if (hitbox == HITBOX_HEAD)
{
auto pitch_down = math::normalize_pitch(record->angles.x) > 85.0f;
auto backward = fabs(math::normalize_yaw(record->angles.y - math::calculate_angle(record->player->get_shoot_position(), g_ctx.local()->GetAbsOrigin()).y)) > 120.0f;
points.emplace_back(scan_point(center, hitbox, !pitch_down || !backward));
points.emplace_back(scan_point(Vector(bbox->bbmax.x + 0.70710678f * final_radius, bbox->bbmax.y - 0.70710678f * final_radius, bbox->bbmax.z), hitbox, false));
points.emplace_back(scan_point(Vector(bbox->bbmax.x, bbox->bbmax.y, bbox->bbmax.z + final_radius), hitbox, false));
points.emplace_back(scan_point(Vector(bbox->bbmax.x, bbox->bbmax.y, bbox->bbmax.z - final_radius), hitbox, false));
points.emplace_back(scan_point(Vector(bbox->bbmax.x, bbox->bbmax.y - final_radius, bbox->bbmax.z), hitbox, false));
if (pitch_down && backward)
points.emplace_back(scan_point(Vector(bbox->bbmax.x - final_radius, bbox->bbmax.y, bbox->bbmax.z), hitbox, false));
}
else if (hitbox >= HITBOX_PELVIS && hitbox <= HITBOX_UPPER_CHEST)
{
points.emplace_back(scan_point(center, hitbox, true));
points.emplace_back(scan_point(Vector(bbox->bbmax.x, bbox->bbmax.y, bbox->bbmax.z + final_radius), hitbox, false));
points.emplace_back(scan_point(Vector(bbox->bbmax.x, bbox->bbmax.y, bbox->bbmax.z - final_radius), hitbox, false));
points.emplace_back(scan_point(Vector(center.x, bbox->bbmax.y - final_radius, center.z), hitbox, true));
}
else if (hitbox == HITBOX_RIGHT_CALF || hitbox == HITBOX_LEFT_CALF)
{
points.emplace_back(scan_point(center, hitbox, true));
points.emplace_back(scan_point(Vector(bbox->bbmax.x - final_radius, bbox->bbmax.y, bbox->bbmax.z), hitbox, false));
}
else if (hitbox == HITBOX_RIGHT_THIGH || hitbox == HITBOX_LEFT_THIGH)
points.emplace_back(scan_point(center, hitbox, true));
else if (hitbox == HITBOX_RIGHT_UPPER_ARM || hitbox == HITBOX_LEFT_UPPER_ARM)
{
points.emplace_back(scan_point(center, hitbox, true));
points.emplace_back(scan_point(Vector(bbox->bbmax.x + final_radius, center.y, center.z), hitbox, false));
}
}
for (auto& point : points)
math::vector_transform(point.point, record->matrixes_data.main[bbox->bone], point.point);
return points;
}
void aim::find_best_target()
{
for (auto& target : scanned_targets)
{
final_target = target;
final_target.record->adjust_player();
break;
}
}
void aim::fire(CUserCmd* cmd)
{
if (!g_ctx.globals.weapon->can_fire(true))
return;
auto aim_angle = math::calculate_angle(g_ctx.globals.eye_pos, final_target.data.point.point);
if (!config_system.g_cfg.ragebot.autoshoot && !(cmd->m_buttons & IN_ATTACK))
return;
auto final_hitchance = 0;
auto hitchance_amount = 0;
if (!g_ctx.local()->m_bIsScoped() && g_ctx.globals.weapon->is_sniper() && config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].noscope_ht)
hitchance_amount = config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].noscope_hitchance;
else
hitchance_amount = config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].hitchance_amount;
auto is_zoomable_weapon = g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_SCAR20 || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_G3SG1 || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_SSG08 || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_AWP || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_AUG || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_SG553;
if (config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].autoscope && is_zoomable_weapon && !g_ctx.globals.weapon->m_zoomLevel())
cmd->m_buttons |= IN_ATTACK2;
if (g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_SSG08 && !(g_ctx.local()->m_fFlags() & FL_ONGROUND) && !(engineprediction::get().backup_data.flags & FL_ONGROUND) && fabs(engineprediction::get().backup_data.velocity.z) < 5.0f && engineprediction::get().backup_data.velocity.Length2D() < 5.0f) //-V807
final_hitchance = 101;
else
final_hitchance = hitchance(aim_angle);
if (final_hitchance < hitchance_amount)
return;
auto backtrack_ticks = 0;
auto net_channel_info = m_engine()->GetNetChannelInfo();
if (net_channel_info)
{
auto original_tickbase = g_ctx.globals.backup_tickbase;
if (misc::get().double_tap_enabled && misc::get().double_tap_key)
original_tickbase = g_ctx.globals.backup_tickbase + g_ctx.globals.weapon->get_max_tickbase_shift();
static auto sv_maxunlag = m_cvar()->FindVar(crypt_str("sv_maxunlag"));
auto correct = math::clamp(net_channel_info->GetLatency(FLOW_OUTGOING) + net_channel_info->GetLatency(FLOW_INCOMING) + util::get_interpolation(), 0.0f, sv_maxunlag->GetFloat());
auto delta_time = correct - (TICKS_TO_TIME(original_tickbase) - final_target.record->simulation_time);
backtrack_ticks = math::clamp(TIME_TO_TICKS(delta_time), 0, 32);
}
static auto get_hitbox_name = [](int hitbox, bool shot_info = false) -> std::string
{
switch (hitbox)
{
case HITBOX_HEAD:
return shot_info ? crypt_str("Head") : crypt_str("head");
case HITBOX_LOWER_CHEST:
return shot_info ? crypt_str("Lower chest") : crypt_str("lower chest");
case HITBOX_CHEST:
return shot_info ? crypt_str("Chest") : crypt_str("chest");
case HITBOX_UPPER_CHEST:
return shot_info ? crypt_str("Upper chest") : crypt_str("upper chest");
case HITBOX_STOMACH:
return shot_info ? crypt_str("Stomach") : crypt_str("stomach");
case HITBOX_PELVIS:
return shot_info ? crypt_str("Pelvis") : crypt_str("pelvis");
case HITBOX_RIGHT_UPPER_ARM:
case HITBOX_RIGHT_FOREARM:
case HITBOX_RIGHT_HAND:
return shot_info ? crypt_str("Left arm") : crypt_str("left arm");
case HITBOX_LEFT_UPPER_ARM:
case HITBOX_LEFT_FOREARM:
case HITBOX_LEFT_HAND:
return shot_info ? crypt_str("Right arm") : crypt_str("right arm");
case HITBOX_RIGHT_THIGH:
case HITBOX_RIGHT_CALF:
return shot_info ? crypt_str("Left leg") : crypt_str("left leg");
case HITBOX_LEFT_THIGH:
case HITBOX_LEFT_CALF:
return shot_info ? crypt_str("Right leg") : crypt_str("right leg");
case HITBOX_RIGHT_FOOT:
return shot_info ? crypt_str("Left foot") : crypt_str("left foot");
case HITBOX_LEFT_FOOT:
return shot_info ? crypt_str("Right foot") : crypt_str("right foot");
}
};
player_info_t player_info;
m_engine()->GetPlayerInfo(final_target.record->i, &player_info);
//m_engine()->SetViewAngles(aim_angle);
cmd->m_viewangles = aim_angle;
cmd->m_buttons |= IN_ATTACK;
cmd->m_tickcount = TIME_TO_TICKS(final_target.record->simulation_time + util::get_interpolation());
last_target_index = final_target.record->i;
last_shoot_position = g_ctx.globals.eye_pos;
last_target[last_target_index] = Last_target
{
*final_target.record, final_target.data, final_target.distance
};
auto shot = &g_ctx.shots.emplace_back();
shot->last_target = last_target_index;
shot->side = final_target.record->side;
shot->fire_tick = m_globals()->m_tickcount;
shot->shot_info.target_name = player_info.szName;
shot->shot_info.client_hitbox = get_hitbox_name(final_target.data.hitbox, true);
shot->shot_info.client_damage = final_target.data.damage;
shot->shot_info.hitchance = final_hitchance;
shot->shot_info.backtrack_ticks = backtrack_ticks;
shot->shot_info.aim_point = final_target.data.point.point;
g_ctx.globals.aimbot_working = true;
g_ctx.globals.revolver_working = false;
g_ctx.globals.last_aimbot_shot = m_globals()->m_tickcount;
}
int aim::hitchance(const Vector& aim_angle)
{
auto final_hitchance = 0;
auto weapon_info = m_weaponsystem()->GetWeaponData(g_ctx.globals.weapon->m_iItemDefinitionIndex());
if (!weapon_info)
return final_hitchance;
if ((g_ctx.globals.eye_pos - final_target.data.point.point).Length() > weapon_info->flRange)
return final_hitchance;
auto forward = ZERO;
auto right = ZERO;
auto up = ZERO;
math::angle_vectors(aim_angle, &forward, &right, &up);
math::fast_vec_normalize(forward);
math::fast_vec_normalize(right);
math::fast_vec_normalize(up);
auto is_special_weapon = g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_AWP || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_G3SG1 || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_SCAR20 || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_SSG08;
auto inaccuracy = weapon_info->flInaccuracyStand;
if (g_ctx.local()->m_fFlags() & FL_DUCKING)
{
if (is_special_weapon)
inaccuracy = weapon_info->flInaccuracyCrouchAlt;
else
inaccuracy = weapon_info->flInaccuracyCrouch;
}
else if (is_special_weapon)
inaccuracy = weapon_info->flInaccuracyStandAlt;
if (g_ctx.globals.inaccuracy - 0.000001f < inaccuracy)
final_hitchance = 101;
else
{
static auto setup_spread_values = true;
static float spread_values[256][6];
if (setup_spread_values)
{
setup_spread_values = false;
for (auto i = 0; i < 256; ++i)
{
math::random_seed(i + 1);
auto a = math::random_float(0.0f, 1.0f);
auto b = math::random_float(0.0f, DirectX::XM_2PI);
auto c = math::random_float(0.0f, 1.0f);
auto d = math::random_float(0.0f, DirectX::XM_2PI);
spread_values[i][0] = a;
spread_values[i][1] = c;
auto sin_b = 0.0f, cos_b = 0.0f;
DirectX::XMScalarSinCos(&sin_b, &cos_b, b);
auto sin_d = 0.0f, cos_d = 0.0f;
DirectX::XMScalarSinCos(&sin_d, &cos_d, d);
spread_values[i][2] = sin_b;
spread_values[i][3] = cos_b;
spread_values[i][4] = sin_d;
spread_values[i][5] = cos_d;
}
}
auto hits = 0;
for (auto i = 0; i < 256; ++i)
{
auto inaccuracy = spread_values[i][0] * g_ctx.globals.inaccuracy;
auto spread = spread_values[i][1] * g_ctx.globals.spread;
auto spread_x = spread_values[i][3] * inaccuracy + spread_values[i][5] * spread;
auto spread_y = spread_values[i][2] * inaccuracy + spread_values[i][4] * spread;
auto direction = ZERO;
direction.x = forward.x + right.x * spread_x + up.x * spread_y;
direction.y = forward.y + right.y * spread_x + up.y * spread_y;
direction.z = forward.z + right.z * spread_x + up.z * spread_y; //-V778
auto end = g_ctx.globals.eye_pos + direction * weapon_info->flRange;
if (hitbox_intersection(final_target.record->player, final_target.record->matrixes_data.main, final_target.data.hitbox, g_ctx.globals.eye_pos, end))
++hits;
}
final_hitchance = (int)((float)hits / 2.56f);
}
if (g_ctx.globals.double_tap_aim)
return final_hitchance;
auto damage = 0;
auto spread = g_ctx.globals.spread + g_ctx.globals.inaccuracy;
for (auto i = 1; i <= 6; ++i)
{
for (auto j = 0; j < 8; ++j)
{
auto current_spread = spread * ((float)i / 6.0f);
auto direction_cos = 0.0f;
auto direction_sin = 0.0f;
DirectX::XMScalarSinCos(&direction_cos, &direction_sin, (float)j / 8.0f * DirectX::XM_2PI);
auto spread_x = direction_cos * current_spread;
auto spread_y = direction_sin * current_spread;
auto direction = ZERO;
direction.x = forward.x + spread_x * right.x + spread_y * up.x;
direction.y = forward.y + spread_x * right.y + spread_y * up.y;
direction.z = forward.z + spread_x * right.z + spread_y * up.z;
auto end = g_ctx.globals.eye_pos + direction * weapon_info->flRange;
if (hitbox_intersection(final_target.record->player, final_target.record->matrixes_data.main, final_target.data.hitbox, g_ctx.globals.eye_pos, end))
{
auto fire_data = autowall::get().wall_penetration(g_ctx.globals.eye_pos, end, final_target.record->player);
auto valid_hitbox = true;
if (final_target.data.hitbox == HITBOX_HEAD && fire_data.hitbox != HITBOX_HEAD)
valid_hitbox = false;
if (fire_data.valid && fire_data.damage >= 1 && valid_hitbox)
damage += fire_data.damage;
}
}
}
return (float)damage / 48.0f >= (float)config_system.g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].hitchance_amount * 0.01f ? final_hitchance : 0;
}
static int clip_ray_to_hitbox(const Ray_t& ray, mstudiobbox_t* hitbox, matrix3x4_t& matrix, trace_t& trace)
{
static auto fn = util::FindSignature(crypt_str("client.dll"), crypt_str("55 8B EC 83 E4 F8 F3 0F 10 42"));
trace.fraction = 1.0f;
trace.startsolid = false;
return reinterpret_cast <int(__fastcall*)(const Ray_t&, mstudiobbox_t*, matrix3x4_t&, trace_t&)> (fn)(ray, hitbox, matrix, trace);
}
bool aim::hitbox_intersection(player_t* e, matrix3x4_t* matrix, int hitbox, const Vector& start, const Vector& end, float* safe)
{
auto model = e->GetModel();
if (!model)
return false;
auto studio_model = m_modelinfo()->GetStudioModel(model);
if (!studio_model)
return false;
auto studio_set = studio_model->pHitboxSet(e->m_nHitboxSet());
if (!studio_set)
return false;
auto studio_hitbox = studio_set->pHitbox(hitbox);
if (!studio_hitbox)
return false;
trace_t trace;
Ray_t ray;
ray.Init(start, end);
auto intersected = clip_ray_to_hitbox(ray, studio_hitbox, matrix[studio_hitbox->bone], trace) >= 0;
if (!safe)
return intersected;
Vector min, max;
math::vector_transform(studio_hitbox->bbmin, matrix[studio_hitbox->bone], min);
math::vector_transform(studio_hitbox->bbmax, matrix[studio_hitbox->bone], max);
auto center = (min + max) * 0.5f;
auto distance = center.DistTo(end);
if (distance > *safe)
*safe = distance;
return intersected;
} | [
"dev.aquaware@gmail.com"
] | dev.aquaware@gmail.com |
a80525854637f14057b08ed18097f77951e7bfe7 | 4bba3838c668dd4846640a2aa9d4b1f717d15306 | /UVa/1254 - Top 10.cpp | f5387b502d894127604a6f735978bc1655e77f37 | [] | no_license | dnr2/maratona | 0189fa17b99663aeeb14f389b018865791325d04 | 65163739c645802ac38e605e5706551c3cdf302a | refs/heads/master | 2021-01-15T16:29:31.101196 | 2015-11-27T08:21:21 | 2015-11-27T08:21:21 | 12,200,323 | 22 | 3 | null | null | null | null | UTF-8 | C++ | false | false | 5,420 | cpp | //http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3695
//#tag Suffix Array , array de suffixo
//#tag Range Minimum Query, RMQ
//#tag Segment Tree, arvore de segmentos
//#sol first build a suffix array from the concatenation of the words in the dictionary. Then create a RMQ that stores a list,
//with the 10 best words for each range (considering the words pointed by the suffix array). for each query find the positions
//in the suffix array that corresponds to the suffix that are equal to the word in the query (find the all words
//with substring). use RMQ to quickly get the top 10 words out of all the possible words with query as substring.
#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <vector>
#include <vector>
#include <queue>
#include <list>
#include <stack>
#include <map>
#include <sstream>
#include <climits>
#include <set>
// #include <unordered_map>
#define ll long long
#define ull unsigned long long
#define pii pair<int,int>
#define pdd pair<double,double>
#define F first
#define S second
#define REP(i,j,k) for(int (i)=(j);(i)<(k);++(i))
#define pb push_back
#define PI acos(-1)
#define db(x) cerr << #x << " = " << x << endl;
#define _ << ", " <<
#define mp make_pair
#define EPS 1e-9
#define INF 0x3f3f3f3f
#define IOFAST() ios_base::sync_with_stdio(0);cin.tie(0)
#define FILL(x,y) memset(x,y,sizeof(x));
#define FOREACH(i,v) for (typeof((v).begin()) i = (v).begin(); i != (v).end(); i++)
// #define umap unordered_map
using namespace std;
template <class _T> inline string tostr(const _T& a){ ostringstream os(""); os<<a;return os.str();}
#define NWORDS 30000
struct word{
string str;
int id;
word( int id = 0) : id(id) { str = ""; }
const bool operator < ( const word & in ) const {
if( str.size() == in.str.size()){
if( str == in.str) return id < in.id;
return str < in.str;
}
return str.size() < in.str.size();
}
} words[NWORDS];
int pos[NWORDS];
#define POTS 500000
///segmenttree
int NSEG; // Number of fields (with indices $0,\dots,NSEG-1$)
list<int> field[POTS]; // WARNING: At least size $2\cdot2^k+10$ with $2^k>N$ and $k\in\mathbb Z^+$
bool cmp(int a, int b){
return pos[a] < pos[b];
}
list<int> merge(list<int> a, list<int> b){
a.merge(b,cmp);
a.unique();
list<int>::iterator it = a.begin();
advance( it , min( ((int)a.size()), 10));
list<int> ret( a.begin(), it );
return ret;
}
// update(p,v) sets the value at p to v
void update(int p, int v, int i=0, int s=0, int e=NSEG) {
if (p < s || p >= e)
return;
if (s+1 == e) {
list<int> nel(1,v);
field[i] = nel;
return;
}
update(p, v, 2*i+1, s, (s+e)>>1);
update(p, v, 2*i+2, (s+e)>>1, e);
field[i] = merge(field[2*i+1], field[2*i+2]); // Change this if you want the minimum/sum/\dots
}
// query(a,b) returns the maximum/\dots\ of the values at $a,\dots,b-1$ (including a but excluding b!)
list<int> query(int a, int b, int i=0, int s=0, int e=NSEG) {
if (b <= s || e <= a){
list<int> ret;
return ret; // Change this if you want the minimum/sum/\dots (should be a neutral element).
} if (a <= s && e <= b)
return field[i];
return merge( // Change this if you want the minimum/sum/\dots
query(a, b, 2*i+1, s, (s+e)>>1),
query(a, b, 2*i+2, (s+e)>>1, e));
}
#define DOTS 500005
///suffixarray
int N; // number of characters in a string
int RA[DOTS], SA[DOTS], tmpRA[DOTS], tmpSA[DOTS], cnt[DOTS]; // SA[i]: which suffix has rank i
char str[DOTS]; // the input string
void csort(int k){
int cub = max(N, 300); // take the maximum of the length of the strings and the number of unique chars
FILL(cnt, 0);
REP(i,0,N) cnt[i+k<N?RA[i+k]:0]++;
REP(i,1,cub) cnt[i] += cnt[i-1];
for(int i=cub-1;i>=1;i--) cnt[i] = cnt[i-1];
cnt[0] = 0;
REP(i,0,N) tmpSA[ cnt[SA[i]+k<N?RA[SA[i]+k]:0]++ ] = SA[i];
REP(i,0,N) SA[i] = tmpSA[i];
}
void buildSA(){ // compute SA and RA
REP(i,0,N){
RA[i] = str[i];
SA[i] = i;
}
int k = 1;
while(k<N){
csort(k); csort(0); // cannot reverse order
int r = 0;
tmpRA[SA[0]] = 0;
REP(i,1,N){
if(RA[SA[i]]!=RA[SA[i-1]] || RA[SA[i]+k]!=RA[SA[i-1]+k])
r++;
tmpRA[SA[i]] = r;
}
REP(i,0,N) RA[i] = tmpRA[i];
if(RA[SA[N-1]]==N-1) break;
k <<= 1;
}
}
char buff[DOTS];
int owner[DOTS];
bool cmp2(int a, int b){
return str[a+b] < buff[b];
}
bool cmp3(int a, int b){
return str[a+b] > buff[a];
}
int main() {
int n; cin >> n;
N = 0;
REP(i,0,n){
scanf("%s", buff);
words[i].str = string(buff);
int len = words[i].str.size();
words[i].id = i;
buff[len++] = '$';
buff[len] = 0;
for(int j = 0; j < len; j++){
str[N+j] = buff[j];
owner[N+j] = i;
}
N+=len;
}
str[N] = 0;
NSEG = N;
buildSA();
sort( words, words + n);
REP(i,0,n){
pos[words[i].id] = i;
}
REP(i,0,N){
update( i, owner[SA[i]] );
}
int q; cin >> q;
REP(i,0,q){
scanf("%s", buff);
int sz = strlen( buff);
int ini = 0, end = N;
REP(i,0,sz){
int a = lower_bound(SA+ini, SA+end, i, cmp2) - SA;
int b = upper_bound(SA+ini, SA+end, i, cmp3) - SA;
ini = a, end = b;
if( ini >= end) break;
}
list<int> tmp = query( ini, end );
vector<int> resp(tmp.begin(), tmp.end());
if( resp.size() == 0){
puts("-1");
} else {
REP(j,0,((int)resp.size())){
printf("%s%d", (j>0)?" ":"", resp[j]+1);
}
puts("");
}
}
return 0;
} | [
"dnr2@cin.ufpe.br"
] | dnr2@cin.ufpe.br |
6f7a7ea4280c05545a25cc2b8fd3b1027df21038 | 7e62f0928681aaaecae7daf360bdd9166299b000 | /external/DirectXShaderCompiler/tools/clang/include/clang/Driver/Phases.h | 8c66b92d5454ba5dff4b61c9a5dbaf15728e3422 | [
"NCSA",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | yuri410/rpg | 949b001bd0aec47e2a046421da0ff2a1db62ce34 | 266282ed8cfc7cd82e8c853f6f01706903c24628 | refs/heads/master | 2020-08-03T09:39:42.253100 | 2020-06-16T15:38:03 | 2020-06-16T15:38:03 | 211,698,323 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 889 | h | //===--- Phases.h - Transformations on Driver Types -------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_DRIVER_PHASES_H
#define LLVM_CLANG_DRIVER_PHASES_H
namespace clang {
namespace driver {
namespace phases {
/// ID - Ordered values for successive stages in the
/// compilation process which interact with user options.
enum ID {
Preprocess,
Precompile,
Compile,
Backend,
Assemble,
Link
};
enum {
MaxNumberOfPhases = Link + 1
};
const char *getPhaseName(ID Id);
} // end namespace phases
} // end namespace driver
} // end namespace clang
#endif
| [
"yuri410@users.noreply.github.com"
] | yuri410@users.noreply.github.com |
622b8c452f389d1293c3a9bf88cbd38e3150b5b4 | e0dda07ee69df68b01f5a9d8289ddb69db18947d | /engine/src/base/renderer/opengl/gl_program3.h | 9f49abfe888f5f87455cc46dc1b3990aef631e1c | [] | no_license | HugoGallagher/Game-Engine-Old | d28d9ec3af2d78592c2ca1ca1de7945c21613a8a | 970c5a97b31268e5215180943af85ac55a636c17 | refs/heads/master | 2022-12-12T15:12:05.839274 | 2020-09-13T22:30:13 | 2020-09-13T22:30:13 | 257,755,208 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 302 | h | #pragma once
#include "macros.h"
#include "gl_program.h"
namespace engine
{
class DLL gl_program3 : public gl_program
{
public:
gl_program3()
{
vertex_shader = shader(GL_VERTEX_SHADER, "3d/3d_uber.v");
fragment_shader = shader(GL_FRAGMENT_SHADER, "3d/3d_uber.f");
}
};
} | [
"54777755+HugoGallagher@users.noreply.github.com"
] | 54777755+HugoGallagher@users.noreply.github.com |
6dea90c4506c496a64372dc74facf64944a1474c | e5614c36fd324f2e214ff05aaf2bf7230443e0b5 | /CodeForces/697C - Lorenzo Von Matterhorn - 19136194.cpp | 4a5eea8a7f223d3ff539af244e1c2fd1bda94408 | [] | no_license | njrafi/Competitive-Programming-Solutions | a9cd3ceae430e6b672c02076f80ecb94065ff6d8 | 86d167c355813157b0a0a8382b6f8538f29d4599 | refs/heads/master | 2020-07-30T22:18:46.473308 | 2019-10-06T18:12:36 | 2019-10-06T18:12:36 | 210,377,979 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,016 | cpp | #include <bits/stdc++.h>
#ifndef ONLINE_JUDGE
#define gc getchar
#define pc putchar
#else
#define gc getchar_unlocked
#define pc putchar_unlocked
#endif
using namespace std;
#define vi vector<int>
#define vll vector<i64>
#define si set<int>
#define vs vector<string>
#define pii pair<int, int>
#define vpi vector<pii>
#define pri priority_queue<int>
#define rev_pri priority_queue<int, vector<int>, greater<int>>
#define mpi map<int, int>
#define i64 long long int
#define endl '\n'
#define pi acos(-1)
#define all(v) v.begin(), v.end()
#define pb push_back
#define mp make_pair
#define mod 1000000007
#define For(i, n) for (int i = 0; i < n; i++)
#define Fre(i, a, b) for (int i = a; i < b; i++)
#define sf(n) scanf("%d", &n)
#define sff(a, b) scanf("%d %d", &a, &b)
#define sfff(a, b, c) scanf("%d %d %d", &a, &b, &c)
#define eps 1e-8
#define ff first
#define ss second
#define mem(a, b) memset(a, b, sizeof(a))
#define min3(a, b, c) min(a, min(b, c))
#define max3(a, b, c) max(a, max(b, c))
#define READ freopen("in.txt", "r", stdin)
#define WRITE freopen("out.txt", "w", stdout)
#define sz size()
#define dbg printf("yo\n")
#define foreach(i, c) for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#define sqr(a) (a) * (a)
#define clr clear()
#define CASE(a) printf("Case %d: ", a)
//int dx[] = {0,1,0,-1,1,1,-1,-1};
//int dy[] = {1,0,-1,0,1,-1,-1,1};
//i64 dp[60][60];
//functions
//i64 gcd(i64 a,i64 b){if(!b)return a;return gcd(b,a%b);}
//inline void fastRead(int *a){register char c=0;while(c<33)c=gc();*a=0;while(c>33){*a=*a*10+c-'0';c=gc();}}
//inline void fastWrite(int a){char snum[20];int i=0;do{snum[i++]=a%10+48;a=a/10;}while(a!=0);i=i-1;while(i>=0)pc(snum[i--]);pc('\n');}
//i64 bigmod(i64 num,i64 n){if(n==0)return 1;i64 x=bigmod(num,n/2);x=x*x%mod;if(n%2==1)x=x*num%mod;return x;}
//i64 modinverse(i64 num){return bigmod(num,mod-2)%mod;}
//void combination(int pos,int last){if(pos==k+1){for(int i=1;i<=k;i++)cout << tem[i];cout << endl;return;}
//for(int i=last+1;i<=n-k+pos;i++){tem[pos] = num[i-1];combination(pos+1,i);}}
i64 po(i64 a, i64 b)
{
i64 ans = 1;
while (b--)
ans *= a;
return ans;
}
//i64 ncr(i64 n,i64 r){if(n==r)return 1;if(r==1)return n;if(dp[n][r]!=-1)return dp[n][r];return dp[n][r]=ncr(n-1,r)+ncr(n-1,r-1);}
i64 level(i64 num)
{
For(i, 64) if (po(2, i) <= num && po(2, i + 1) > num) return i;
}
vector<i64> fpath(i64 u, i64 v)
{
vector<i64> ans, tem;
ans.pb(u);
tem.pb(v);
i64 lu = level(u);
i64 lv = level(v);
i64 t;
// cout << lu << " " << lv << endl;
if (lu > lv)
{
int t = lu - lv;
while (t--)
{
u /= 2;
ans.pb(u);
}
}
if (lv > lu)
{
int t = lv - lu;
while (t--)
{
v /= 2;
tem.pb(v);
}
}
while (u != v)
{
u /= 2;
ans.pb(u);
v /= 2;
tem.pb(v);
// cout << u << " " << v << endl;
}
tem.pop_back();
reverse(all(tem));
For(i, tem.sz)
ans.pb(tem[i]);
return ans;
}
int main()
{
//ios_base::sync_with_stdio(false);cin.tie(0);
/* i64 aa,ba;
while(cin >> aa >> ba)
{
vector<i64> va;
va = fpath(aa,ba);
For(i,va.sz)
cout << va[i] << " ";
cout << endl;
}
*/
i64 q, a, b, w, op;
vector<i64> v;
map<pair<i64, i64>, i64> m;
cin >> q;
while (q--)
{
cin >> op;
if (op == 1)
{
cin >> a >> b >> w;
v = fpath(a, b);
For(i, v.sz - 1)
{
m[mp(v[i], v[i + 1])] += w;
m[mp(v[i + 1], v[i])] += w;
}
}
else
{
i64 ans = 0;
cin >> a >> b;
v = fpath(a, b);
For(i, v.sz - 1)
ans += m[mp(v[i], v[i + 1])];
cout << ans << endl;
}
}
return 0;
}
| [
"njrafibd@gmail.com"
] | njrafibd@gmail.com |
8e15c019a7f418653a1452805714c8c36e8970b9 | d0557489abe73e36f52a057e151a16c310e11876 | /DiceGameServer/role/YinYang.cpp | 30d40d11d17d2a26474491adcf9b16f870b5d719 | [
"MIT"
] | permissive | chntujia/CodfiyAsteriatedGrailServer | 762a9de7e7d6567d87e66d5b6354a24c8f797cbe | f2f210aeff062fd5ff27fb099629edcde82eb366 | refs/heads/master | 2022-03-14T16:13:16.382571 | 2022-02-13T12:53:57 | 2022-02-13T12:53:57 | 49,324,028 | 40 | 17 | MIT | 2019-02-22T01:10:28 | 2016-01-09T12:46:43 | C++ | UTF-8 | C++ | false | false | 12,807 | cpp | #include "YinYang.h"
#include "..\GameGrail.h"
#include "..\UserTask.h"
bool YinYang::cmdMsgParse(UserTask *session, uint16_t type, ::google::protobuf::Message *proto)
{
switch(type)
{
case MSG_RESPOND:
Respond* respond = (Respond*)proto;
switch(respond->respond_id())
{
case SHI_SHEN_ZHOU_SHU:
session->tryNotify(id, STATE_ATTACKED, SHI_SHEN_ZHOU_SHU, respond);
return true;
case YIN_YANG_ZHUAN_HUAN:
session->tryNotify(id, STATE_ATTACKED, YIN_YANG_ZHUAN_HUAN, respond);
return true;
case HEI_AN_JI_LI:
session->tryNotify(id,STATE_TURN_END, HEI_AN_JI_LI,respond);
return true;
}
}
//没匹配则返回false
return false;
}
int YinYang::p_turn_end(int &step, int playerID)
{
if (playerID != id || token[0] < 3)
return GE_SUCCESS;
step = HEI_AN_JI_LI;
int ret = HeiAnJiLi();
if (toNextStep(ret) || ret == GE_URGENT) {
//全部走完后,请把step设成STEP_DONE
step = STEP_DONE;
}
return ret;
}
int YinYang::ShiShenJiangLin(Action* action){
if (action->card_ids().size() != 2 ||
getCardByID(action->card_ids(0))->getProperty() != getCardByID(action->card_ids(1))->getProperty()
)
return GE_INVALID_CARDID;
//宣告技能
SkillMsg skill_msg;
Coder::skillNotice(id, id,SHI_SHEN_JIANG_LIN, skill_msg);
engine->sendMessage(-1, MSG_SKILL, skill_msg);
//+1鬼火
setToken(0, token[0]+1);
GameInfo update_info1;
Coder::tokenNotice(id, 0, token[0], update_info1);
engine->sendMessage(-1, MSG_GAME, update_info1);
//橫置
tap = true;
GameInfo update_info2;
Coder::tapNotice(id, tap, update_info2);
engine->sendMessage(-1, MSG_GAME, update_info2);
CONTEXT_TAP *con = new CONTEXT_TAP; con->id = id; con->tap = tap; engine->pushGameState(new StateTap(con));
//+1攻击行动
addAction(ACTION_ATTACK, SHI_SHEN_JIANG_LIN);
//移除手牌
vector<int> cards;
cards.push_back(action->card_ids(0));
cards.push_back(action->card_ids(1));
CardMsg show_card;
Coder::showCardNotice(id, 2, cards, show_card);
engine->sendMessage(-1, MSG_CARD, show_card);
engine->setStateMoveCardsNotToHand(id, DECK_HAND, -1, DECK_DISCARD, cards.size(), cards, id, SHI_SHEN_JIANG_LIN, true);
return GE_URGENT;
}
int YinYang::v_reattack(int cardID, int orignCardID, int dstID, int orignID, int rate, bool realCard)
{
if (rate != RATE_NORMAL) {
return GE_INVALID_ACTION;
}
if (realCard) {
int ret;
if (GE_SUCCESS != (ret = checkOneHandCard(cardID))) {
return ret;
}
}
CardEntity* orignCard = getCardByID(orignCardID);
if (orignCard->getElement() == ELEMENT_DARKNESS) {
return GE_INVALID_CARDID;
}
CardEntity* card = getCardByID(cardID);
if (card->getType() != TYPE_ATTACK) {
return GE_INVALID_CARDID;
}
if (card->getElement() != ELEMENT_DARKNESS && card->getElement() != orignCard->getElement()
&& !(tap && card->getProperty() == orignCard->getProperty())
)
return GE_INVALID_CARDID;
PlayerEntity *dst = engine->getPlayerEntity(dstID);
if (dstID == orignID || dst->getColor() == color) {
return GE_INVALID_PLAYERID;
}
return GE_SUCCESS;
}
int YinYang::p_attacked(int &step, CONTEXT_TIMELINE_1 * con)
{
int srcID = con->attack.srcID;
int dstID = con->attack.dstID;
int dstCorlor = engine->getPlayerEntity(dstID)->getColor();
int selfColor = this->getColor();
int ret = GE_INVALID_ACTION;
TeamArea* team = engine->getTeamArea();
//式神咒束
if (dstID != id && con->attack.isActive && dstCorlor == selfColor && tap && con->hitRate == RATE_NORMAL && team->getEnergy(selfColor)>1 && team->getGem(selfColor) > 0 && getHandCardNum()>0 )
{
step = SHI_SHEN_ZHOU_SHU;
ret = ShiShenZhouShu(con);
return ret;
}
//阴阳转换
if (dstID == id && con->hitRate== RATE_NORMAL) {
step = YIN_YANG_ZHUAN_HUAN;
ret = YinYangZhuanHuan(con);
return ret;
}
//伤害变化
if (srcID == id && GuiHuoAtk)
{
con->harm.point = token[0];
GuiHuoAtk = false;
}
return GE_SUCCESS;
}
int YinYang::HeiAnJiLi()
{
GameInfo game_info;
token[0] = 0;
GameInfo update_info1;
Coder::tokenNotice(id, 0, token[0], update_info1);
engine->sendMessage(-1, MSG_GAME, update_info1);
int dstID;
int ret;
bool reset=false;
CommandRequest cmd_req;
Coder::askForSkill(id, HEI_AN_JI_LI, cmd_req);
//有限等待,由UserTask调用tryNotify唤醒
if (engine->waitForOne(id, network::MSG_CMD_REQ, cmd_req))
{
void* reply;
if (GE_SUCCESS == (ret = engine->getReply(id, reply)))
{
Respond* respond = (Respond*)reply;
dstID = respond->dst_ids(0);
if (tap && respond->args(0) == 2)reset = true;
}
}
else {
dstID = id;
}
SkillMsg skill_msg;
Coder::skillNotice(id, dstID, HEI_AN_JI_LI, skill_msg);
engine->sendMessage(-1, MSG_SKILL, skill_msg);
HARM harm;
harm.cause = HEI_AN_JI_LI;
harm.point = 2;
harm.srcID = id;
harm.type = HARM_MAGIC;
engine->setStateTimeline3(dstID, harm);
if (reset)
{
tap = false;
GameInfo update_info2;
Coder::tapNotice(id, tap, update_info2);
engine->sendMessage(-1, MSG_GAME, update_info2);
}
return GE_URGENT;
}
int YinYang::ShiShenZhouShu(CONTEXT_TIMELINE_1 * con)
{
int ret;
CommandRequest cmd_req;
Coder::askForSkill(id, SHI_SHEN_ZHOU_SHU, cmd_req);
Command *cmd = (Command*)(&cmd_req.commands(cmd_req.commands_size() - 1));
cmd->add_args(con->attack.srcID);
cmd->add_args(con->attack.cardID);
SkillMsg skill_msg1;
SkillMsg skill_msg2;
GameInfo update_info1;
GameInfo update_info2;
GameInfo update_info3;
int cardID,srcID;
bool isActive;
TeamArea* team = engine->getTeamArea();
if (engine->waitForOne(id, network::MSG_CMD_REQ, cmd_req))
{
void* reply;
if (GE_SUCCESS == (ret = engine->getReply(id, reply)))
{
Respond* respond = (Respond*)reply;
switch (respond->args(0))
{
case 0:
break;
case 3://1.式神咒束+阴阳转换+1鬼火
Coder::skillNotice(id, respond->dst_ids(0), SHI_SHEN_ZHOU_SHU, skill_msg1);
engine->sendMessage(-1, MSG_SKILL, skill_msg1);
Coder::skillNotice(id, respond->dst_ids(0), YIN_YANG_ZHUAN_HUAN, skill_msg2);
engine->sendMessage(-1, MSG_SKILL, skill_msg2);
cardID = con->attack.cardID;
srcID = con->attack.srcID;
isActive = con->attack.isActive;
engine->popGameState();
engine->setStateReattack(cardID, respond->card_ids(0), srcID, id, respond->dst_ids(0), isActive);
setToken(0, token[0]+1);
Coder::tokenNotice(id, 0, token[0], update_info1);
engine->sendMessage(-1, MSG_GAME, update_info1);
if (team->getCrystal(color) > 0)
{
team->setCrystal(color, team->getCrystal(color) - 1);
team->setGem(color, team->getGem(color) - 1);
}
else
{
team->setGem(color, team->getGem(color) - 2);
}
Coder::stoneNotice(color, team->getGem(color), team->getCrystal(color), update_info2);
engine->sendMessage(-1, MSG_GAME, update_info2);
GuiHuoAtk = true;
tap = false;
Coder::tapNotice(id, tap, update_info3);
engine->sendMessage(-1, MSG_GAME, update_info3);
return GE_URGENT;
case 2://2.式神咒束 + 阴阳转换
Coder::skillNotice(id, respond->dst_ids(0), SHI_SHEN_ZHOU_SHU, skill_msg1);
engine->sendMessage(-1, MSG_SKILL, skill_msg1);
Coder::skillNotice(id, respond->dst_ids(0), YIN_YANG_ZHUAN_HUAN, skill_msg2);
engine->sendMessage(-1, MSG_SKILL, skill_msg2);
if (team->getCrystal(color) > 0)
{
team->setCrystal(color, team->getCrystal(color) - 1);
team->setGem(color, team->getGem(color) - 1);
}
else
{
team->setGem(color, team->getGem(color) - 2);
}
Coder::stoneNotice(color, team->getGem(color), team->getCrystal(color), update_info2);
engine->sendMessage(-1, MSG_GAME, update_info2);
cardID = con->attack.cardID;
srcID = con->attack.srcID;
isActive = con->attack.isActive;
engine->popGameState();
engine->setStateReattack(cardID, respond->card_ids(0), srcID, id, respond->dst_ids(0), isActive);
GuiHuoAtk = true;
tap = false;
Coder::tapNotice(id, tap, update_info3);
engine->sendMessage(-1, MSG_GAME, update_info3);
return GE_URGENT;
case 1: //3.式神咒束(正常应战)
Coder::skillNotice(id, respond->dst_ids(0), SHI_SHEN_ZHOU_SHU, skill_msg1);
engine->sendMessage(-1, MSG_SKILL, skill_msg1);
if (team->getCrystal(color) > 0)
{
team->setCrystal(color, team->getCrystal(color) - 1);
team->setGem(color, team->getGem(color) - 1);
}
else
{
team->setGem(color, team->getGem(color) - 2);
}
Coder::stoneNotice(color, team->getGem(color), team->getCrystal(color), update_info2);
engine->sendMessage(-1, MSG_GAME, update_info2);
cardID = con->attack.cardID;
srcID = con->attack.srcID;
isActive = con->attack.isActive;
engine->popGameState();
engine->setStateReattack(cardID, respond->card_ids(0), srcID, id, respond->dst_ids(0), isActive);
return GE_URGENT;
}
return GE_SUCCESS;
}
}
return GE_TIMEOUT;
}
int YinYang::YinYangZhuanHuan(CONTEXT_TIMELINE_1 * con)
{
int ret;
CommandRequest cmd_req;
Coder::askForSkill(id, YIN_YANG_ZHUAN_HUAN, cmd_req);
Command *cmd = (Command*)(&cmd_req.commands(cmd_req.commands_size() - 1));
cmd->add_args(con->attack.srcID);
cmd->add_args(con->attack.cardID);
int cardID, srcID;
bool isActive;
HARM harm;
bool checkShield;
if (engine->waitForOne(id, network::MSG_CMD_REQ, cmd_req))
{
void* reply;
if (GE_SUCCESS == (ret = engine->getReply(id, reply)))
{
Respond* respond = (Respond*)reply;
cardID = con->attack.cardID;
srcID = con->attack.srcID;
isActive = con->attack.isActive;
harm = con->harm;
checkShield = con->checkShield;
engine->popGameState();
if (respond->args(0) == 0)
{
engine->setStateAttackGiveUp(cardID, id, srcID, harm, isActive, checkShield);
}
else
{
if (getCardByID(respond->card_ids(0))->getElement() == ELEMENT_LIGHT)
{
engine->setStateTimeline2Miss(cardID, id, srcID, isActive);
engine->setStateUseCard(respond->card_ids(0), srcID, id);
}
else {
engine->setStateReattack(cardID, respond->card_ids(0), srcID, id, respond->dst_ids(0), isActive);
if (respond->args(1) > 1)//阴阳转换
{
if (tap)
{
tap = false;
GuiHuoAtk = true;
GameInfo update_info3;
Coder::tapNotice(id, tap, update_info3);
engine->sendMessage(-1, MSG_GAME, update_info3);
}
SkillMsg skill_msg;
Coder::skillNotice(id, id, YIN_YANG_ZHUAN_HUAN, skill_msg);
engine->sendMessage(-1, MSG_SKILL, skill_msg);
if (respond->args(1) > 2)//式神转换
{
setToken(0, token[0] + 1);
GameInfo update_info1;
Coder::tokenNotice(id, 0, token[0], update_info1);
engine->sendMessage(-1, MSG_GAME, update_info1);
}
}
return GE_URGENT;
}
}
return GE_URGENT;
}
}
return GE_TIMEOUT;
}
int YinYang::ShengMingJieJie(Action* action) {
if (getEnergy()==0)
return GE_INVALID_ACTION;
if (crystal > 0)
setCrystal(--crystal);
else if (gem > 0)
setGem(--gem);
int dstID = action->dst_ids(0);
//宣告技能
SkillMsg skill_msg;
Coder::skillNotice(id, dstID, SHENG_MING_JIE_JIE, skill_msg);
engine->sendMessage(-1, MSG_SKILL, skill_msg);
GameInfo game_info1;
Coder::energyNotice(id, gem, crystal, game_info1);
engine->sendMessage(-1, MSG_GAME, game_info1);
//+1鬼火
setToken(0, token[0]+1);
GameInfo game_info2;
Coder::tokenNotice(id, 0, token[0], game_info2);
engine->sendMessage(-1, MSG_GAME, game_info2);
//队友+1宝石
PlayerEntity * dstPlayer = engine->getPlayerEntity(dstID);
dstPlayer->setGem(dstPlayer->getGem() + 1);
GameInfo game_info3;
Coder::energyNotice(dstID, dstPlayer->getGem(), dstPlayer->getCrystal(), game_info3);
engine->sendMessage(-1, MSG_GAME, game_info3);
//+1治疗
dstPlayer->addCrossNum(1);
GameInfo game_info4;
Coder::crossNotice(dstID, dstPlayer->getCrossNum(), game_info4);
engine->sendMessage(-1, MSG_GAME, game_info4);
HARM harm;
harm.cause = SHENG_MING_JIE_JIE;
harm.point = token[0];
harm.srcID = id;
harm.type = HARM_MAGIC;
engine->setStateTimeline3(id, harm);
return GE_URGENT;
}
//P_MAGIC_SKILL只有发起者执行,故不需要判断发起者,法术技能验证均在v_MAGIC_SKILL中
int YinYang::p_magic_skill(int &step, Action *action)
{
int ret;
int actionID = action->action_id();
switch (actionID)
{
case SHI_SHEN_JIANG_LIN:
ret = ShiShenJiangLin(action);
step = STEP_DONE;
break;
case SHENG_MING_JIE_JIE:
ret = ShengMingJieJie(action);
step = STEP_DONE;
break;
default:
return GE_INVALID_ACTION;
}
return ret;
}
int YinYang::p_before_lose_morale(int &step, CONTEXT_LOSE_MORALE * con)
{
if (con->harm.cause == SHENG_MING_JIE_JIE && token[0] == 3)
{
con->howMany = 0;
}
return GE_SUCCESS;
}
int YinYang::v_magic_skill(Action *action)
{
return GE_SUCCESS;
} | [
"2385992390@qq.com"
] | 2385992390@qq.com |
37cca536cfbebdce41105224e3c953858e70986a | cfeac52f970e8901871bd02d9acb7de66b9fb6b4 | /generated/src/aws-cpp-sdk-dms/source/model/CreateReplicationConfigRequest.cpp | a1d9e82b2d04398123c5b9512fc586fb40b75912 | [
"Apache-2.0",
"MIT",
"JSON"
] | permissive | aws/aws-sdk-cpp | aff116ddf9ca2b41e45c47dba1c2b7754935c585 | 9a7606a6c98e13c759032c2e920c7c64a6a35264 | refs/heads/main | 2023-08-25T11:16:55.982089 | 2023-08-24T18:14:53 | 2023-08-24T18:14:53 | 35,440,404 | 1,681 | 1,133 | Apache-2.0 | 2023-09-12T15:59:33 | 2015-05-11T17:57:32 | null | UTF-8 | C++ | false | false | 2,709 | cpp | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dms/model/CreateReplicationConfigRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DatabaseMigrationService::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateReplicationConfigRequest::CreateReplicationConfigRequest() :
m_replicationConfigIdentifierHasBeenSet(false),
m_sourceEndpointArnHasBeenSet(false),
m_targetEndpointArnHasBeenSet(false),
m_computeConfigHasBeenSet(false),
m_replicationType(MigrationTypeValue::NOT_SET),
m_replicationTypeHasBeenSet(false),
m_tableMappingsHasBeenSet(false),
m_replicationSettingsHasBeenSet(false),
m_supplementalSettingsHasBeenSet(false),
m_resourceIdentifierHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String CreateReplicationConfigRequest::SerializePayload() const
{
JsonValue payload;
if(m_replicationConfigIdentifierHasBeenSet)
{
payload.WithString("ReplicationConfigIdentifier", m_replicationConfigIdentifier);
}
if(m_sourceEndpointArnHasBeenSet)
{
payload.WithString("SourceEndpointArn", m_sourceEndpointArn);
}
if(m_targetEndpointArnHasBeenSet)
{
payload.WithString("TargetEndpointArn", m_targetEndpointArn);
}
if(m_computeConfigHasBeenSet)
{
payload.WithObject("ComputeConfig", m_computeConfig.Jsonize());
}
if(m_replicationTypeHasBeenSet)
{
payload.WithString("ReplicationType", MigrationTypeValueMapper::GetNameForMigrationTypeValue(m_replicationType));
}
if(m_tableMappingsHasBeenSet)
{
payload.WithString("TableMappings", m_tableMappings);
}
if(m_replicationSettingsHasBeenSet)
{
payload.WithString("ReplicationSettings", m_replicationSettings);
}
if(m_supplementalSettingsHasBeenSet)
{
payload.WithString("SupplementalSettings", m_supplementalSettings);
}
if(m_resourceIdentifierHasBeenSet)
{
payload.WithString("ResourceIdentifier", m_resourceIdentifier);
}
if(m_tagsHasBeenSet)
{
Aws::Utils::Array<JsonValue> tagsJsonList(m_tags.size());
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
}
payload.WithArray("Tags", std::move(tagsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateReplicationConfigRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonDMSv20160101.CreateReplicationConfig"));
return headers;
}
| [
"github-aws-sdk-cpp-automation@amazon.com"
] | github-aws-sdk-cpp-automation@amazon.com |
2fcad6cd3ff2cfdff77b55c5353527d8f55e05d1 | 1d1eaf733faa327872200a209456a9f9f330ff85 | /src/qt/utilitydialog.cpp | e7d5f2c3a08964dac04238ea431e721039f03439 | [
"MIT"
] | permissive | peepcoin2/peepcoin2 | cb1993e62747db6648fabab3d6067e6f3f53f07b | 5657b86210a60f26bf9f7dd670e567c355a3bdd6 | refs/heads/master | 2020-04-27T01:00:29.945423 | 2019-03-05T13:38:56 | 2019-03-05T13:38:56 | 173,949,285 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,010 | cpp | // Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "utilitydialog.h"
#include "ui_helpmessagedialog.h"
#include "bitcoingui.h"
#include "clientmodel.h"
#include "guiconstants.h"
#include "intro.h"
#include "guiutil.h"
#include "clientversion.h"
#include "init.h"
#include "util.h"
#include <stdio.h>
#include <QCloseEvent>
#include <QLabel>
#include <QRegExp>
#include <QTextTable>
#include <QTextCursor>
#include <QVBoxLayout>
/** "Help message" or "About" dialog box */
HelpMessageDialog::HelpMessageDialog(QWidget* parent, bool about) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint),
ui(new Ui::HelpMessageDialog)
{
ui->setupUi(this);
GUIUtil::restoreWindowGeometry("nHelpMessageDialogWindow", this->size(), this);
QString version = tr("PeepCoin2 Core") + " " + tr("version") + " " + QString::fromStdString(FormatFullVersion());
/* On x86 add a bit specifier to the version so that users can distinguish between
* 32 and 64 bit builds. On other architectures, 32/64 bit may be more ambigious.
*/
#if defined(__x86_64__)
version += " " + tr("(%1-bit)").arg(64);
#elif defined(__i386__)
version += " " + tr("(%1-bit)").arg(32);
#endif
if (about) {
setWindowTitle(tr("About PeepCoin2 Core"));
/// HTML-format the license message from the core
QString licenseInfo = QString::fromStdString(LicenseInfo());
QString licenseInfoHTML = licenseInfo;
// Make URLs clickable
QRegExp uri("<(.*)>", Qt::CaseSensitive, QRegExp::RegExp2);
uri.setMinimal(true); // use non-greedy matching
licenseInfoHTML.replace(uri, "<a href=\"\\1\">\\1</a>");
// Replace newlines with HTML breaks
licenseInfoHTML.replace("\n\n", "<br><br>");
ui->aboutMessage->setTextFormat(Qt::RichText);
ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
text = version + "\n" + licenseInfo;
ui->aboutMessage->setText(version + "<br><br>" + licenseInfoHTML);
ui->aboutMessage->setWordWrap(true);
ui->helpMessage->setVisible(false);
} else {
setWindowTitle(tr("Command-line options"));
QString header = tr("Usage:") + "\n" +
" peepcoin2-qt [" + tr("command-line options") + "] " + "\n";
QTextCursor cursor(ui->helpMessage->document());
cursor.insertText(version);
cursor.insertBlock();
cursor.insertText(header);
cursor.insertBlock();
std::string strUsage = HelpMessage(HMM_BITCOIN_QT);
strUsage += HelpMessageGroup(tr("UI Options:").toStdString());
strUsage += HelpMessageOpt("-choosedatadir", strprintf(tr("Choose data directory on startup (default: %u)").toStdString(), DEFAULT_CHOOSE_DATADIR));
strUsage += HelpMessageOpt("-lang=<lang>", tr("Set language, for example \"de_DE\" (default: system locale)").toStdString());
strUsage += HelpMessageOpt("-min", tr("Start minimized").toStdString());
strUsage += HelpMessageOpt("-rootcertificates=<file>", tr("Set SSL root certificates for payment request (default: -system-)").toStdString());
strUsage += HelpMessageOpt("-splash", strprintf(tr("Show splash screen on startup (default: %u)").toStdString(), DEFAULT_SPLASHSCREEN));
QString coreOptions = QString::fromStdString(strUsage);
text = version + "\n" + header + "\n" + coreOptions;
QTextTableFormat tf;
tf.setBorderStyle(QTextFrameFormat::BorderStyle_None);
tf.setCellPadding(2);
QVector<QTextLength> widths;
widths << QTextLength(QTextLength::PercentageLength, 35);
widths << QTextLength(QTextLength::PercentageLength, 65);
tf.setColumnWidthConstraints(widths);
QTextCharFormat bold;
bold.setFontWeight(QFont::Bold);
Q_FOREACH (const QString &line, coreOptions.split("\n")) {
if (line.startsWith(" -"))
{
cursor.currentTable()->appendRows(1);
cursor.movePosition(QTextCursor::PreviousCell);
cursor.movePosition(QTextCursor::NextRow);
cursor.insertText(line.trimmed());
cursor.movePosition(QTextCursor::NextCell);
} else if (line.startsWith(" ")) {
cursor.insertText(line.trimmed()+' ');
} else if (line.size() > 0) {
//Title of a group
if (cursor.currentTable())
cursor.currentTable()->appendRows(1);
cursor.movePosition(QTextCursor::Down);
cursor.insertText(line.trimmed(), bold);
cursor.insertTable(1, 2, tf);
}
}
ui->helpMessage->moveCursor(QTextCursor::Start);
ui->scrollArea->setVisible(false);
}
}
HelpMessageDialog::~HelpMessageDialog()
{
GUIUtil::saveWindowGeometry("nHelpMessageDialogWindow", this);
delete ui;
}
void HelpMessageDialog::printToConsole()
{
// On other operating systems, the expected action is to print the message to the console.
fprintf(stdout, "%s\n", qPrintable(text));
}
void HelpMessageDialog::showOrPrint()
{
#if defined(WIN32)
// On Windows, show a message box, as there is no stderr/stdout in windowed applications
exec();
#else
// On other operating systems, print help text to console
printToConsole();
#endif
}
void HelpMessageDialog::on_okButton_accepted()
{
close();
}
/** "Shutdown" window */
ShutdownWindow::ShutdownWindow(QWidget* parent, Qt::WindowFlags f) : QWidget(parent, f)
{
QVBoxLayout* layout = new QVBoxLayout();
layout->addWidget(new QLabel(
tr("PeepCoin2 Core is shutting down...") + "<br /><br />" +
tr("Do not shut down the computer until this window disappears.")));
setLayout(layout);
}
void ShutdownWindow::showShutdownWindow(BitcoinGUI* window)
{
if (!window)
return;
// Show a simple window indicating shutdown status
QWidget* shutdownWindow = new ShutdownWindow();
// We don't hold a direct pointer to the shutdown window after creation, so use
// Qt::WA_DeleteOnClose to make sure that the window will be deleted eventually.
shutdownWindow->setAttribute(Qt::WA_DeleteOnClose);
shutdownWindow->setWindowTitle(window->windowTitle());
// Center shutdown window at where main window was
const QPoint global = window->mapToGlobal(window->rect().center());
shutdownWindow->move(global.x() - shutdownWindow->width() / 2, global.y() - shutdownWindow->height() / 2);
shutdownWindow->show();
}
void ShutdownWindow::closeEvent(QCloseEvent* event)
{
event->ignore();
}
| [
"peepcoin2@gmail.com"
] | peepcoin2@gmail.com |
0afec503c6b7ed3552f49354b86561ec5156990a | cac6981201da982780bf511375fa97ade34eafec | /Classes/Model/Bonus/RandomBonus.h | f17cfd8267db4f307cc188b16c664f7d18575b4a | [
"BSD-3-Clause"
] | permissive | nonothing/Dyna-Blaster-cocos2dx | 0c8cc3b02bbd165c5762d71178ec5a5fe76db179 | c128b4e982f7d984e8933196bf199423db997a6e | refs/heads/master | 2021-01-21T15:57:19.009237 | 2016-11-03T01:33:46 | 2016-11-03T01:33:46 | 65,398,771 | 10 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 320 | h | #ifndef __RANDOM_BONUS_H__
#define __RANDOM_BONUS_H__
#include "cocos2d.h"
#include "Model/Bonus/IBonus.h"
class RandomBonus: public IBonus
{
protected:
void blinkRed();
public:
RandomBonus(PlayerData& data) : IBonus(data){}
virtual void end() override;
virtual void active() = 0;
};
#endif // __RANDOM_BONUS_H__
| [
"all.nothing.name@gmail.com"
] | all.nothing.name@gmail.com |
35a4c315f194b619c544df4644ad44304ff114a8 | d2e8e2f7ac6d3b71056ea79d7413e7dd7188789f | /test/BenchMarkEPFLModSwitch_bar.cpp | 507faf42e0a21edc45011505777c2e4c28389f5e | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | moritzwinger/ABC | c92a5bfe4c3adce0fd2b453d1ef083d63a3223a0 | 2d1f507dc7188b13767cce8050b8aa9daa7c1625 | refs/heads/main | 2023-07-25T16:56:19.122849 | 2021-09-07T10:51:37 | 2021-09-07T10:51:40 | 354,754,349 | 0 | 0 | NOASSERTION | 2021-04-05T07:29:30 | 2021-04-05T07:29:29 | null | UTF-8 | C++ | false | false | 46,793 | cpp | #include "include/ast_opt/parser/Parser.h"
#include "include/ast_opt/runtime/RuntimeVisitor.h"
#include "include/ast_opt/runtime/SimulatorCiphertextFactory.h"
#include "ast_opt/visitor/InsertModSwitchVisitor.h"
#include <ast_opt/visitor/GetAllNodesVisitor.h>
#include "ast_opt/visitor/ProgramPrintVisitor.h"
#include "ast_opt/visitor/PrintVisitor.h"
#include "ast_opt/visitor/NoisePrintVisitor.h"
#include "ast_opt/utilities/PerformanceSeal.h"
#include "ast_opt/runtime/SealCiphertextFactory.h"
#include "gtest/gtest.h"
#ifdef HAVE_SEAL_BFV
class BenchMarkEPFLModSwitch_bar : public ::testing::Test {
protected:
const int numCiphertextSlots = 32768;
std::unique_ptr<SealCiphertextFactory> scf;
std::unique_ptr<TypeCheckingVisitor> tcv;
void SetUp() override {
scf = std::make_unique<SealCiphertextFactory>(numCiphertextSlots);
tcv = std::make_unique<TypeCheckingVisitor>();
}
void registerInputVariable(Scope &rootScope, const std::string &identifier, Datatype datatype) {
auto scopedIdentifier = std::make_unique<ScopedIdentifier>(rootScope, identifier);
rootScope.addIdentifier(identifier);
tcv->addVariableDatatype(*scopedIdentifier, datatype);
}
};
/// bar.v
TEST_F(BenchMarkEPFLModSwitch_bar, BarNoModSwitch) {
/// This test runs the bar circuit from the EPFL circuit collection WITHOUT any modswitch ops inserted using SEAL
// program's input
const char *inputs = R""""(
secret int a0 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a1 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a2 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a3 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a4 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a5 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a6 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a7 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a8 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a9 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a10 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a11 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a12 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a13 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a14 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a15 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a16 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a17 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a18 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a19 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a20 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a21 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a22 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a23 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a24 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a25 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a26 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a27 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a28 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a29 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a30 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a31 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a32 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a33 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a34 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a35 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a36 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a37 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a38 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a39 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a40 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a41 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a42 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a43 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a44 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a45 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a46 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a47 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a48 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a49 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a50 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a51 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a52 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a53 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a54 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a55 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a56 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a57 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a58 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a59 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a60 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a61 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a62 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a63 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a64 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a65 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a66 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a67 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a68 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a69 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a70 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a71 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a72 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a73 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a74 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a75 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a76 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a77 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a78 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a79 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a80 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a81 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a82 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a83 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a84 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a85 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a86 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a87 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a88 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a89 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a90 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a91 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a92 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a93 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a94 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a95 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a96 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a97 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a98 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a99 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a100 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a101 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a102 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a103 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a104 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a105 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a106 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a107 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a108 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a109 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a110 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a111 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a112 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a113 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a114 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a115 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a116 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a117 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a118 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a119 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a120 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a121 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a122 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a123 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a124 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a125 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a126 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a127 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int shift0 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int shift1 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int shift2 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int shift3 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int shift4 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int shift5 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int shift6 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int one = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
)"""";
auto astInput = Parser::parse(std::string(inputs));
// program specification
const char *program = R""""(
secret int n264 = a77 *** shift0;
secret int n265 = shift1 *** n264;
secret int n266 = a78 *** (one --- shift0);
secret int n267 = shift1 *** n266;
secret int n268 = (one --- n265) *** (one --- n267);
secret int n269 = a80 *** (one --- shift0);
secret int n270 = (one --- shift1) *** n269;
secret int n271 = a79 *** shift0;
secret int n272 = (one --- shift1) *** n271;
secret int n273 = (one --- n270) *** (one --- n272);
secret int n274 = n268 *** n273;
secret int n275 = (one --- shift2) *** (one --- shift3);
secret int n276 = (one --- n274) *** n275;
secret int n277 = a73 *** shift0;
secret int n278 = shift1 *** n277;
secret int n279 = a74 *** (one --- shift0);
secret int n280 = shift1 *** n279;
secret int n281 = (one --- n278) *** (one --- n280);
secret int n282 = a76 *** (one --- shift0);
secret int n283 = (one --- shift1) *** n282;
secret int n284 = a75 *** shift0;
secret int n285 = (one --- shift1) *** n284;
secret int n286 = (one --- n283) *** (one --- n285);
secret int n287 = n281 *** n286;
secret int n288 = shift2 *** (one --- shift3);
secret int n289 = (one --- n287) *** n288;
secret int n290 = (one --- n276) *** (one --- n289);
secret int n291 = a65 *** shift0;
secret int n292 = shift1 *** n291;
secret int n293 = a66 *** (one --- shift0);
secret int n294 = shift1 *** n293;
secret int n295 = (one --- n292) *** (one --- n294);
secret int n296 = a68 *** (one --- shift0);
secret int n297 = (one --- shift1) *** n296;
secret int n298 = a67 *** shift0;
secret int n299 = (one --- shift1) *** n298;
secret int n300 = (one --- n297) *** (one --- n299);
secret int n301 = n295 *** n300;
secret int n302 = shift2 *** shift3;
secret int n303 = (one --- n301) *** n302;
secret int n304 = a69 *** shift0;
secret int n305 = shift1 *** n304;
secret int n306 = a70 *** (one --- shift0);
secret int n307 = shift1 *** n306;
secret int n308 = (one --- n305) *** (one --- n307);
secret int n309 = a72 *** (one --- shift0);
secret int n310 = (one --- shift1) *** n309;
secret int n311 = a71 *** shift0;
secret int n312 = (one --- shift1) *** n311;
secret int n313 = (one --- n310) *** (one --- n312);
secret int n314 = n308 *** n313;
secret int n315 = (one --- shift2) *** shift3;
secret int n316 = (one --- n314) *** n315;
secret int n317 = (one --- n303) *** (one --- n316);
secret int n318 = n290 *** n317;
secret int n319 = shift4 *** shift5;
)"""";
auto astProgram = Parser::parse(std::string(program));
// program's output
const char *outputs = R""""(
y = n319;
)"""";
auto astOutput = Parser::parse(std::string(outputs));
// create and prepopulate TypeCheckingVisitor
auto rootScope = std::make_unique<Scope>(*astProgram);
registerInputVariable(*rootScope, "a0", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a1", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a2", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a3", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a4", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a5", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a6", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a7", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a8", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a9", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a10", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a11", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a12", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a13", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a14", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a15", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a16", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a17", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a18", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a19", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a20", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a21", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a22", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a23", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a24", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a25", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a26", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a27", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a28", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a29", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a30", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a31", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a32", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a33", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a34", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a35", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a36", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a37", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a38", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a39", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a40", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a41", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a42", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a43", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a44", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a45", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a46", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a47", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a48", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a49", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a50", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a51", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a52", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a53", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a54", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a55", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a56", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a57", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a58", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a59", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a60", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a61", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a62", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a63", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a64", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a65", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a66", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a67", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a68", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a69", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a70", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a71", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a72", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a73", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a74", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a75", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a76", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a77", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a78", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a79", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a80", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a81", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a82", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a83", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a84", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a85", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a86", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a87", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a88", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a89", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a90", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a91", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a92", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a93", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a94", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a95", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a96", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a97", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a98", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a99", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a100", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a101", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a102", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a103", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a104", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a105", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a106", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a107", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a108", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a109", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a110", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a111", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a112", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a113", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a114", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a115", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a116", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a117", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a118", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a119", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a120", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a121", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a122", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a123", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a124", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a125", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a126", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a127", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "shift0", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "shift1", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "shift2", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "shift3", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "shift4", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "shift5", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "shift6", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "one", Datatype(Type::INT, true));
// run the program and get its output
auto map = tcv->getSecretTaintedNodes();
RuntimeVisitor srv(*scf, *astInput, map);
std::chrono::high_resolution_clock::time_point time_start, time_end;
std::chrono::microseconds time_diff;
std::chrono::microseconds time_sum(0);
std::vector<std::chrono::microseconds> time_vec;
int count = 100;
for (int i = 0; i < count; i++) {
time_start = std::chrono::high_resolution_clock::now();
srv.executeAst(*astProgram);
time_end = std::chrono::high_resolution_clock::now();
time_diff = std::chrono::duration_cast<std::chrono::microseconds>(time_end - time_start);
time_vec.push_back(time_diff);
time_sum += std::chrono::duration_cast<std::chrono::microseconds>(time_end - time_start);
//std::cout << "Elapsed Time " << time_diff.count() << std::endl;
}
long long avg_time = std::chrono::duration_cast<std::chrono::microseconds>(time_sum).count()/(count);
std::cout << count << std::endl;
//calc std deviation
long long standardDeviation = 0;
for( int i = 0; i < time_vec.size(); ++i) {
standardDeviation += (time_vec[i].count() - avg_time) * (time_vec[i].count() - avg_time);
}
std::cout << "Average evaluation time [" << avg_time << " microseconds]"
<< std::endl;
std::cout << "Standard error: " << sqrt(double(standardDeviation) / time_vec.size()) / sqrt(time_vec.size())<< std::endl;
// write to file
std::cout << numCiphertextSlots << " , " << "bar : NO MODSWITCH" << std::endl;
for (int i=0; i < time_vec.size(); i++) {
std::cout << " , " << time_vec[i].count() << "\n";
}
}
TEST_F(BenchMarkEPFLModSwitch_bar, BarModSwitch) {
/// This test runs the bar circuit from the EPFL circuit collection WITH modswitch ops inserted using SEAL
// program's input
const char *inputs = R""""(
secret int a0 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a1 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a2 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a3 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a4 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a5 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a6 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a7 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a8 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a9 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a10 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a11 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a12 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a13 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a14 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a15 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a16 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a17 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a18 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a19 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a20 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a21 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a22 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a23 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a24 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a25 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a26 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a27 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a28 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a29 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a30 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a31 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a32 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a33 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a34 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a35 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a36 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a37 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a38 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a39 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a40 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a41 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a42 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a43 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a44 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a45 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a46 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a47 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a48 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a49 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a50 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a51 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a52 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a53 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a54 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a55 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a56 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a57 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a58 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a59 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a60 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a61 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a62 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a63 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a64 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a65 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a66 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a67 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a68 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a69 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a70 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a71 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a72 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a73 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a74 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a75 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a76 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a77 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a78 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a79 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a80 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a81 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a82 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a83 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a84 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a85 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a86 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a87 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a88 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a89 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a90 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a91 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a92 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a93 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a94 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a95 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a96 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a97 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a98 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a99 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a100 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a101 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a102 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a103 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a104 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a105 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a106 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a107 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a108 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a109 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a110 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a111 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a112 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a113 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a114 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a115 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a116 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a117 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a118 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a119 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a120 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a121 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a122 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a123 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a124 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a125 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a126 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int a127 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int shift0 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int shift1 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int shift2 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int shift3 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int shift4 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int shift5 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int shift6 = {43, 1, 1, 1, 22, 11, 425, 0, 1, 7};
secret int one = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
)"""";
auto astInput = Parser::parse(std::string(inputs));
// program specification
const char *program = R""""(
secret int n264 = (a77 *** shift0);
secret int n265 = (shift1 *** n264);
secret int n266 = (a78 *** (one --- shift0));
secret int n267 = (shift1 *** n266);
secret int n268 = (modswitch((one --- n265), 1) *** modswitch((one --- n267), 1));
secret int n269 = (a80 *** (one --- shift0));
secret int n270 = ((one --- shift1) *** n269);
secret int n271 = (a79 *** shift0);
secret int n272 = ((one --- shift1) *** n271);
secret int n273 = ((one --- n270) *** (one --- n272));
secret int n274 = (n268 *** modswitch(n273, 1));
secret int n275 = ((one --- shift2) *** (one --- shift3));
secret int n276 = ((modswitch(one, 1) --- n274) *** modswitch(n275, 1));
secret int n277 = (a73 *** shift0);
secret int n278 = (shift1 *** n277);
secret int n279 = (a74 *** (one --- shift0));
secret int n280 = (shift1 *** n279);
secret int n281 = ((one --- n278) *** (one --- n280));
secret int n282 = (a76 *** (one --- shift0));
secret int n283 = ((one --- shift1) *** n282);
secret int n284 = (a75 *** shift0);
secret int n285 = ((one --- shift1) *** n284);
secret int n286 = ((one --- n283) *** (one --- n285));
secret int n287 = (n281 *** n286);
secret int n288 = (shift2 *** (one --- shift3));
secret int n289 = ((one --- n287) *** n288);
secret int n290 = ((modswitch(one, 1) --- n276) *** modswitch((one --- n289), 1));
secret int n291 = (a65 *** shift0);
secret int n292 = (shift1 *** n291);
secret int n293 = (a66 *** (one --- shift0));
secret int n294 = (shift1 *** n293);
secret int n295 = ((one --- n292) *** (one --- n294));
secret int n296 = (a68 *** (one --- shift0));
secret int n297 = ((one --- shift1) *** n296);
secret int n298 = (a67 *** shift0);
secret int n299 = ((one --- shift1) *** n298);
secret int n300 = ((one --- n297) *** (one --- n299));
secret int n301 = (n295 *** n300);
secret int n302 = (shift2 *** shift3);
secret int n303 = ((one --- n301) *** n302);
secret int n304 = (a69 *** shift0);
secret int n305 = (shift1 *** n304);
secret int n306 = (a70 *** (one --- shift0));
secret int n307 = (shift1 *** n306);
secret int n308 = ((one --- n305) *** (one --- n307));
secret int n309 = (a72 *** (one --- shift0));
secret int n310 = ((one --- shift1) *** n309);
secret int n311 = (a71 *** shift0);
secret int n312 = ((one --- shift1) *** n311);
secret int n313 = ((one --- n310) *** (one --- n312));
secret int n314 = (n308 *** n313);
secret int n315 = ((one --- shift2) *** shift3);
secret int n316 = ((one --- n314) *** n315);
secret int n317 = ((one --- n303) *** (one --- n316));
secret int n318 = (n290 *** modswitch(n317, 1));
secret int n319 = (shift4 *** shift5);
)"""";
auto astProgram = Parser::parse(std::string(program));
// program's output
const char *outputs = R""""(
y = n319;
)"""";
auto astOutput = Parser::parse(std::string(outputs));
// create and prepopulate TypeCheckingVisitor
auto rootScope = std::make_unique<Scope>(*astProgram);
registerInputVariable(*rootScope, "a0", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a1", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a2", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a3", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a4", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a5", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a6", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a7", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a8", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a9", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a10", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a11", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a12", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a13", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a14", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a15", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a16", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a17", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a18", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a19", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a20", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a21", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a22", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a23", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a24", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a25", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a26", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a27", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a28", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a29", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a30", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a31", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a32", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a33", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a34", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a35", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a36", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a37", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a38", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a39", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a40", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a41", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a42", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a43", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a44", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a45", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a46", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a47", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a48", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a49", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a50", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a51", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a52", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a53", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a54", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a55", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a56", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a57", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a58", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a59", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a60", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a61", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a62", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a63", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a64", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a65", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a66", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a67", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a68", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a69", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a70", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a71", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a72", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a73", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a74", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a75", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a76", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a77", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a78", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a79", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a80", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a81", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a82", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a83", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a84", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a85", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a86", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a87", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a88", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a89", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a90", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a91", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a92", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a93", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a94", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a95", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a96", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a97", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a98", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a99", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a100", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a101", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a102", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a103", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a104", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a105", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a106", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a107", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a108", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a109", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a110", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a111", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a112", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a113", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a114", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a115", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a116", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a117", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a118", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a119", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a120", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a121", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a122", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a123", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a124", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a125", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a126", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "a127", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "shift0", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "shift1", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "shift2", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "shift3", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "shift4", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "shift5", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "shift6", Datatype(Type::INT, true));
registerInputVariable(*rootScope, "one", Datatype(Type::INT, true));
// run the program and get its output
auto map = tcv->getSecretTaintedNodes();
RuntimeVisitor srv(*scf, *astInput, map);
std::chrono::high_resolution_clock::time_point time_start, time_end;
std::chrono::microseconds time_diff;
std::chrono::microseconds time_sum(0);
std::vector<std::chrono::microseconds> time_vec;
int count = 100;
for (int i = 0; i < count; i++) {
time_start = std::chrono::high_resolution_clock::now();
srv.executeAst(*astProgram);
time_end = std::chrono::high_resolution_clock::now();
time_diff = std::chrono::duration_cast<std::chrono::microseconds>(time_end - time_start);
time_vec.push_back(time_diff);
time_sum += std::chrono::duration_cast<std::chrono::microseconds>(time_end - time_start);
//std::cout << "Elapsed Time " << time_diff.count() << std::endl;
}
long long avg_time = std::chrono::duration_cast<std::chrono::microseconds>(time_sum).count()/(count);
//calc std deviation
long long standardDeviation = 0;
for( int i = 0; i < time_vec.size(); ++i) {
standardDeviation += (time_vec[i].count() - avg_time) * (time_vec[i].count() - avg_time);
}
std::cout << "Average evaluation time [" << avg_time << " microseconds]"
<< std::endl;
std::cout << "Standard error: " << sqrt(double(standardDeviation) / time_vec.size()) / sqrt(time_vec.size())<< std::endl;
// write to file
std::cout << numCiphertextSlots << " , " << "bar : MODSWITCH" << std::endl;
for (int i=0; i < time_vec.size(); i++) {
std::cout << " , " << time_vec[i].count() << "\n";
}
}
#endif | [
"moritzwinger1@gmail.com"
] | moritzwinger1@gmail.com |
fd3bc3c4d6f5cfd5df16b8ba1b7f0571c5c8c2db | a6f562d818253c8e0c57a44b5063e486592ddc79 | /Graphs/Floyd Warshall - Shortest Path for all pairs.cpp | a1b8cac713a3574c0f465471d3ae17b158b91a38 | [] | no_license | arnabs542/Algorithms-5 | 6769289a1ec0ec0c67567ae701ade44b0c521842 | 53aa576838f15e96819991b415155245c1b6bcce | refs/heads/master | 2022-01-22T22:53:33.974462 | 2019-08-07T15:29:09 | 2019-08-07T15:29:09 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,479 | cpp | // https://www.geeksforgeeks.org/floyd-warshall-algorithm-dp-16/
// This gives the shortest path between all pairs of vertices
#include <algorithm>
#include <climits>
#include <cmath>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define LN cout << __LINE__ << endl
#define ff first
#define ss second
#define INF 1000000
using namespace std;
using iPair = pair<int, int>;
using vi = vector<int>;
using di = deque<int>;
using lli = long long int;
void floydWarshall(vector<vi> &g) {
int V = g.size();
vector<vi> dist = g;
for (int k = 0; k < V; k++) { // intermediate
for (int i = 0; i < V; i++) { // source
for (int j = 0; j < V; j++) { // destination
if (dist[i][j] > dist[i][k] + dist[k][j]) {
dist[i][j] = dist[i][k] + dist[k][j];
}
}
}
}
for (int i = 0; i < V; i++) {
for (int j = 0; j < V; j++) {
if (dist[i][j] == INF)
cout << "INF ";
else
cout << dist[i][j] << " ";
}
cout << endl;
}
}
int main() {
int V;
cin >> V;
vector<vi> g(V, vi(V));
for (int i = 0; i < V; i++) {
for (int j = 0; j < V; j++) {
cin >> g[i][j];
}
}
floydWarshall(g);
return 0;
}
| [
"r.r.n.harkhani@gmail.com"
] | r.r.n.harkhani@gmail.com |
b2a1f8b88df505fdd302493486dd20b1d65fa57d | 77b6c3e0c7c85ce941e893df236f647ed68fa7fe | /1082.cpp | 304d7b3aee3f1e093a7e1eb4dec7482889e796c9 | [] | no_license | Anik-Roy/LightOj-Solution | 05fc9efcbb1eeb4641af3268251feae5be318f44 | 1a8c401b3fd011459b51bcc26fa1175ab4bb7658 | refs/heads/master | 2021-04-12T10:52:43.196029 | 2017-08-31T19:07:04 | 2017-08-31T19:07:04 | 94,535,504 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,402 | cpp | #include <bits/stdc++.h>
using namespace std;
#define MAX 100005
int ara[MAX];
int tree[MAX*3];
void init(int node, int b, int e)
{
if(b == e) {
tree[node] = ara[b];
return;
}
int left = 2*node;
int right = 2*node+1;
int mid = (b+e)/2;
init(left, b, mid);
init(right, mid+1, e);
if(tree[left] < tree[right]) {
tree[node] = tree[left];
}
else
tree[node] = tree[right];
}
int query(int node, int b, int e, int i, int j)
{
if(b > j || e < i)
return 1e9;
if(b >= i && e <= j)
return tree[node];
int left = 2*node;
int right = 2*node+1;
int mid = (b+e)/2;
int p1 = query(left, b, mid, i, j);
int p2 = query(right, mid+1, e, i, j);
if(p1 < p2)
return p1;
else
return p2;
}
int main()
{
int t, n, q, cs;
scanf("%d", &t);
for(cs = 1; cs <= t; cs++) {
memset(ara, 0, sizeof(ara));
memset(tree, 0, sizeof(tree));
scanf("%d %d", &n, &q);
for(int i = 1; i <= n; i++)
scanf("%d", &ara[i]);
init(1, 1, n);
printf("Case %d:\n", cs);
for(int i = 1; i <= q; i++) {
int u, v;
scanf("%d %d", &u, &v);
int res = query(1, 1, n, u, v);
printf("%d\n", res);
}
}
return 0;
}
| [
"argourab96@gmail.com"
] | argourab96@gmail.com |
afa17646742c067fc033e9193200fa3795e2b8f0 | ad2bf55f50be16c3e2bdd3e49fef5f570224f371 | /Basic/So tu nhien/201. Liet ke so ng to nho hon N va tong chu so chia het cho 5.cpp | c532a79f2a628ccd0ca409868a44fcb7e12817de | [] | no_license | GibOreh/CodeC | 31f1b79b6f5c741fecc0031f508b7b96eafc1844 | b45fd8ae9ae6e720c9c5dfc07c23c52f2f85c5d5 | refs/heads/master | 2022-11-24T09:55:50.111087 | 2020-08-02T05:54:31 | 2020-08-02T05:54:31 | 284,399,863 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 504 | cpp | #include <stdio.h>
#include <stdio.h>
int check(int n){
int temp,sum,count=0,temp1,temp2;
for(int i=2 ; i<=n ; i++){
sum=0;
temp=0;
for(int j=2 ; j<i ;j++){
if(i%j==0)
temp++;
}
if(temp==0){
temp2 = i;
while(temp2!=0){
temp1=0;
temp1=temp2%10;
sum+=temp1;
temp2/=10;
}
if(sum % 5==0){
printf("%d ",i);
count++;
}
}
}
printf("\n");
return count;
}
int main(){
int n;
scanf("%d",&n);
printf("%d",check(n));
return 0;
}
| [
"vuonghung2308@gmail.com"
] | vuonghung2308@gmail.com |
75e7f2ad4b05b0398ee284d9d8b41e0a0388d657 | 54399f5d4ac16ca0e241cf504368c92f6885b005 | /tags/libfreebob_0.9.0_RC1/src/debugmodule/debugmodule.h | 67f8da76fa431148394ef593238620438d0ec4d6 | [] | no_license | janosvitok/ffado | 82dcafeeed08a53a7ab48949a0b1e89fba59a799 | 99b2515d787332e8def72f3d4f0411157915134c | refs/heads/master | 2020-04-09T11:14:29.768311 | 2018-06-26T13:38:39 | 2018-06-26T13:38:39 | 6,838,393 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,526 | h | /* debugmodule.h
* Copyright (C) 2005 by Daniel Wagner
*
* This file is part of FreeBob.
*
* FreeBob is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* FreeBob 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 FreeBob; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA.
*/
#ifndef DEBUGMODULE_H
#define DEBUGMODULE_H
#include "../fbtypes.h"
#include <vector>
#include <iostream>
typedef short debug_level_t;
#define debugFatal( format, args... ) \
m_debugModule.print( DebugModule::eDL_Fatal, \
__FILE__, \
__FUNCTION__, \
__LINE__, \
format, \
##args )
#define debugError( format, args... ) \
m_debugModule.print( DebugModule::eDL_Error, \
__FILE__, \
__FUNCTION__, \
__LINE__, \
format, \
##args )
#define debugWarning( format, args... ) \
m_debugModule.print( DebugModule::eDL_Warning, \
__FILE__, \
__FUNCTION__, \
__LINE__, \
format, \
##args )
#define debugFatalShort( format, args... ) \
m_debugModule.printShort( DebugModule::eDL_Fatal, \
format, \
##args )
#define debugErrorShort( format, args... ) \
m_debugModule.printShort( DebugModule::eDL_Error, \
format, \
##args )
#define debugWarningShort( format, args... ) \
m_debugModule.printShort( DebugModule::eDL_Warning, \
format, \
##args )
#define DECLARE_DEBUG_MODULE static DebugModule m_debugModule
#define IMPL_DEBUG_MODULE( ClassName, RegisterName, Level ) \
DebugModule ClassName::m_debugModule = \
DebugModule( #RegisterName, Level )
#define DECLARE_GLOBAL_DEBUG_MODULE extern DebugModule m_debugModule
#define IMPL_GLOBAL_DEBUG_MODULE( RegisterName, Level ) \
DebugModule m_debugModule = \
DebugModule( #RegisterName, Level )
#define setDebugLevel( Level ) \
m_debugModule.setLevel( Level )
#ifdef DEBUG
#define debugOutput( level, format, args... ) \
m_debugModule.print( level, \
__FILE__, \
__FUNCTION__, \
__LINE__, \
format, \
##args )
#define debugOutputShort( level, format, args... ) \
m_debugModule.printShort( level, \
format, \
##args )
#else
#define debugOutput( level, format, args... )
#define debugOutputShort( level, format, args... )
#endif
unsigned char toAscii( unsigned char c );
void quadlet2char( fb_quadlet_t quadlet, unsigned char* buff );
void hexDump( unsigned char *data_start, unsigned int length );
void hexDumpQuadlets( quadlet_t *data_start, unsigned int length );
class DebugModule {
public:
enum {
eDL_Fatal = 0,
eDL_Error = 1,
eDL_Warning = 2,
eDL_Normal = 3,
eDL_Verbose = 4,
} EDebugLevel;
DebugModule( std::string name, debug_level_t level );
virtual ~DebugModule();
void printShort( debug_level_t level,
const char* format,
... ) const;
void print( debug_level_t level,
const char* file,
const char* function,
unsigned int line,
const char* format,
... ) const;
bool setLevel( debug_level_t level )
{ m_level = level; return true; }
debug_level_t getLevel()
{ return m_level; }
std::string getName()
{ return m_name; }
protected:
const char* getPreSequence( debug_level_t level ) const;
const char* getPostSequence( debug_level_t level ) const;
private:
std::string m_name;
debug_level_t m_level;
};
#define DEBUG_LEVEL_NORMAL DebugModule::eDL_Normal
#define DEBUG_LEVEL_VERBOSE DebugModule::eDL_Verbose
class DebugModuleManager {
public:
friend class DebugModule;
static DebugModuleManager* instance();
bool setMgrDebugLevel( std::string name, debug_level_t level );
protected:
bool registerModule( DebugModule& debugModule );
bool unregisterModule( DebugModule& debugModule );
private:
DebugModuleManager();
~DebugModuleManager();
typedef std::vector< DebugModule* > DebugModuleVector;
typedef std::vector< DebugModule* >::iterator DebugModuleVectorIterator;
static DebugModuleManager* m_instance;
DebugModuleVector m_debugModules;
};
#endif
| [
"pieterpalmers@2be59082-3212-0410-8809-b0798e1608f0"
] | pieterpalmers@2be59082-3212-0410-8809-b0798e1608f0 |
08cee9c2fc13cd0a5a97b0b66e6c4e6f0e6ee181 | dbc43d6460f261bfbcb45ed3aa68b9419b1801bd | /Point/Point.cpp | 55c00fd4aa38aeacb327e36588a1d0149c9020fb | [] | no_license | dongho-jung/Advanced_C_Programming | 9cc6d41140c9157fa1b3b57388730bc7ecfb0d3c | 792291bc564e0d942f6dafe5d95ce78ad53fd464 | refs/heads/master | 2023-06-09T20:26:33.541842 | 2017-05-03T13:57:45 | 2017-05-03T13:57:45 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 670 | cpp | #include "Point.h"
Point::Point() {
setX(0.0);
setY(0.0);
}
Point::~Point() {
}
void Point::move(Direction direction, double movementAmount) {
if(direction == Direction::HORIZONTAL)
setX(getX() + movementAmount);
else if(direction == Direction::VERTICAL)
setY(getY() + movementAmount);
}
void Point::rotateClockwise(double degree) {
degree *= M_PI / 180; // Converted to radians.
// Rotation transformation based on origin.
double newX = cos(degree)*getX() - sin(degree)*getY();
double newY = sin(degree)*getX() + cos(degree)*getY();
// Error correction.
setX(roundf(newX * PRECISION) / PRECISION);
setY(roundf(newY * PRECISION) / PRECISION);
}
| [
"dongho971220@gmail.com"
] | dongho971220@gmail.com |
ef321e3953c0df64dff0cc966e23921aefa94f1c | 25784e8a0cfcd1f5c7a4f58ddeeb0f5d9a8c3322 | /dailycode/auto_ptr/auto_ptr/源.cpp | 616f1037652fc86711dc1dbb2e36004879277f86 | [] | no_license | lxyzzzZZZ/lxyzzZ | 218c7c0c13e08bb5a905c008be08027768bf1b97 | 0250983bdba7856f4deafa21f9d9156ad0d33f7f | refs/heads/master | 2020-06-28T14:31:44.834749 | 2019-08-29T13:55:06 | 2019-08-29T13:55:06 | 200,255,608 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 504 | cpp | #include <iostream>
using namespace std;
template <class T>
class Autoptr
{
public:
Autoptr (T* ptr = nullptr)
:_ptr(ptr)
{}
~Autoptr()
{
if (_ptr)
delete _ptr;
}
T& operator*()
{
return *_ptr;
}
T& operator->()
{
return _ptr;
}
Autoptr(Autoptr<T>& ap)
:_ptr(ap._ptr)
{
ap._ptr = nullptr;
}
Autoptr<T>& operator=(Autoptr<T>& ap)
{
if (this != &ap)
{
if (_ptr)
delete _ptr;
_ptr = ap._ptr;
ap._ptr = nullptr;
}
return *this;
}
private:
T* _ptr;
}; | [
"1909980451@qq.com"
] | 1909980451@qq.com |
603341c8aa4d74ddaa0816dce97bfbb93bf8f02f | fa84816defd3f0001cc5db8515da5aab9d86441e | /file_extract_xlsx.h | ae39a7aed6d897da37b61ca85ac87dfdb2232d7d | [] | no_license | starman91/fileapps | 4aa7ac4cb6ec418cb13fdecb9bf1647cf46bc754 | f355b9249f877a1d288d4b15a1f0b49fce0a385f | refs/heads/master | 2021-01-12T18:26:26.349323 | 2016-10-19T16:44:11 | 2016-10-19T16:44:11 | 71,377,924 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,860 | h | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// file_extract_xlsx.h
//
// Class to open an Excel .xlsx file. Explodes thwe zipped file into a temp directory
// returns data form desired worksheet as Dom Document
//
// -------------------
// author : Robert R. White
// date : Wed Jan 23 2008
// copyright : (C) 2008 by NREL
// email : robert.white@nrel.gov
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (C): 2008 by Robert R. White and NREL
// This file is part of the Fileapps library.
//
// Fileapps 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 3 of the License, or
// (at your option) any later version.
//
// Fileapps 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 Fileapps library. If not, see <http://www.gnu.org/licenses/>.
//
// We also ask that you maintain this copyright block and that any publications
// surrounding, attributed to, or linked to this file or entire software system are also
// credited to the author and institution of this copyright
//
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef FILE_EXTRACT_XLSX_H
#define FILE_EXTRACT_XLSX_H
#include "fileApps_base.h"
#include <XML_API>
#include <QtCore/QMutex>
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Class that can open and extract data from a MS Excel .xlsx file. Inherits the FileApps_Base class
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class FileExtractXLSX : public FileApps_Base
{
public:
FileExtractXLSX();
~FileExtractXLSX();
bool accessXLSXFile (const QString, const QString, QDomDocument&);
private:
bool unzipFile (const QString&);
bool getWorksheet (const QString&);
private:
QString excelFilename;
QDomDocument m_workingDoc;
};
#endif // FILE_EXTRACT_XLSX_H
| [
"rwhite.astro@gmail.com"
] | rwhite.astro@gmail.com |
7e36f1f5c31df881d65804b8f5226b82c678ae49 | 97d0df81a6423fd386fcd52869a81a2253141b50 | /src/main.cpp | 547011c7df03ea3f53e4f74bae6c0369c7c83221 | [] | no_license | kacpersyn7/BalancingRobot | fa62f68e72564d55d0865fafdfdc9ca499836ccb | 071033a1c1a38acb2c421965774e13cb56b7c4af | refs/heads/master | 2020-03-15T14:04:56.232142 | 2018-08-11T14:19:48 | 2018-08-11T14:19:48 | 132,182,576 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 628 | cpp | #include <Arduino.h>
#include <Servo.h>
#include <Wire.h>
#include <AFMotor.h>
#include "Accelerometer.hpp"
#include "Constants.hpp"
int main(int argc, char const *argv[])
{
AF_DCMotor motor(3, MOTOR34_64KHZ);
Accelerometer accelerometer(constants::yMin, constants::yMax, constants::derivativeTime);
Serial.begin(9600);
Wire.begin();
motor.setSpeed(40);
StateVector state{};
while(1)
{
motor.run(FORWARD);
delay(500);
motor.run(RELEASE);
delay(500);
accelerometer.updateState(state);
motor.run(BACKWARD);
delay(500);
}
return 0;
}
| [
"kacpersyn7@o2.pl"
] | kacpersyn7@o2.pl |
1f491c0a341e87a23812d4db1e8864fb6cce93e7 | 99397ded2d4689afd8d46da0c2a25da9a6b96bf7 | /libraries/GAMMA/gamma.cpp | 839caa307cd20178102f54ae9134a9dcaf8edcc8 | [
"MIT"
] | permissive | zebrajr/Arduino | e6984485be3a875acb5840cbb3b6f43b9637c8e0 | 0d98f11abaaddf28431fd654d676c0cdd6eddfcf | refs/heads/master | 2022-12-21T06:29:36.752834 | 2022-12-14T18:17:10 | 2022-12-14T18:17:10 | 99,500,328 | 1 | 0 | null | 2017-08-06T16:49:10 | 2017-08-06T16:49:10 | null | UTF-8 | C++ | false | false | 3,152 | cpp | //
// FILE: gamma.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.3.1
// DATE: 2020-08-08
// PURPOSE: Arduino Library to efficiently hold a gamma lookup table
//
// HISTORY: see changelog.md
#include "gamma.h"
GAMMA::GAMMA(uint16_t size)
{
_shift = 7;
// force power of 2; get shift & mask right
for (uint16_t s = 2; s <= GAMMA_MAX_SIZE; s <<= 1)
{
if (size <= s)
{
_size = s;
break;
}
_shift--;
}
_mask = (1 << _shift) - 1;
_interval = GAMMA_MAX_SIZE / _size;
};
GAMMA::~GAMMA()
{
if (_table) free(_table);
};
bool GAMMA::begin()
{
if (_table == NULL)
{
_table = (uint8_t *)malloc(_size + 1);
}
if (_table == NULL) return false;
setGamma(2.8);
return true;
};
bool GAMMA::setGamma(float gamma)
{
if (_table == NULL) return false;
if (gamma <= 0) return false;
if (_gamma != gamma)
{
yield(); // try to keep ESP happy
_gamma = gamma;
// marginally faster
// uint16_t iv = _interval;
// _table[0] = 0;
// for (uint16_t i = 1; i < _size; i++)
// {
// float x = log(i * iv) + log(1.0 / 255);
// _table[i] = exp(x * _gamma) * 255 + 0.5;
// }
// REFERENCE
// rounding factor 0.444 optimized with error example.
for (uint16_t i = 1; i < _size; i++)
{
_table[i] = pow(i * _interval * (1.0/ 255.0), _gamma) * 255 + 0.444;
}
_table[0] = 0;
_table[_size] = 255; // anchor for interpolation.
}
return true;
};
float GAMMA::getGamma()
{
return _gamma;
};
uint8_t GAMMA::operator[] (uint8_t index)
{
// 0.3.0 _table test slows performance ~0.4 us.
if (_table == NULL) return 0;
if (_interval == 1) return _table[index];
// else interpolate
uint8_t i = index >> _shift;
uint8_t m = index & _mask;
// exact element shortcut
if ( m == 0 ) return _table[i];
// interpolation
// delta must be uint16_t to prevent overflow. (small tables)
// delta * m can be > 8 bit.
uint16_t delta = _table[i+1] - _table[i];
delta = (delta * m + _interval/2) >> _shift; // == /_interval;
return _table[i] + delta;
};
uint16_t GAMMA::size()
{
return _size + 1;
};
uint16_t GAMMA::distinct()
{
uint8_t last = _table[0];
uint16_t count = 1;
for (uint16_t i = 1; i <= _size; i++)
{
if (_table[i] == last) continue;
last = _table[i];
count++;
}
return count;
};
bool GAMMA::dump(Stream *str)
{
if (_table == NULL) return false;
for (uint16_t i = 0; i <= _size; i++)
{
str->println(_table[i]);
}
return true;
};
bool GAMMA::dumpArray(Stream *str)
{
if (_table == NULL) return false;
str->println();
str->print("uint8_t gamma[");
str->print(_size + 1);
str->print("] = {");
for (uint16_t i = 0; i <= _size; i++)
{
if (i % 8 == 0) str->print("\n ");
str->print(_table[i]);
if (i < _size) str->print(", ");
}
str->print("\n };\n\n");
return true;
};
// performance investigation
// https://stackoverflow.com/questions/43429238/using-boost-cpp-int-for-functions-like-pow-and-rand
inline float GAMMA::fastPow(float a, float b)
{
// reference
return pow(a, b);
}
// -- END OF FILE --
| [
"rob.tillaart@gmail.com"
] | rob.tillaart@gmail.com |
e122f706bc22613f6580dbb0108d9e95a230bec0 | 2f6b17aa5911b83e27f365a28ad09ee74e0d63f9 | /source/proxydll/steam_api.dll.cpp | e086cefde7bce27a6b6179818c20870cb4b52178 | [] | no_license | GrantSP/OriginalMO | afcc7b9bc8225db36216fe963c162696193e4b74 | 7935114fa2bbc6e38ad7a7b485754d20ee9bec23 | refs/heads/master | 2021-09-02T06:20:13.207699 | 2017-12-31T00:44:07 | 2017-12-31T00:44:07 | 115,833,608 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 6,425 | cpp | #include <windows.h>
#include <tchar.h>
#include <stdio.h>
HINSTANCE hLThis = 0;
HINSTANCE hL = 0;
#pragma comment(linker, "/export:GetHSteamPipe=steam_api_orig.GetHSteamPipe,@1")
#pragma comment(linker, "/export:GetHSteamUser=steam_api_orig.GetHSteamUser,@2")
#pragma comment(linker, "/export:SteamAPI_GetHSteamPipe=steam_api_orig.SteamAPI_GetHSteamPipe,@3")
#pragma comment(linker, "/export:SteamAPI_GetHSteamUser=steam_api_orig.SteamAPI_GetHSteamUser,@4")
#pragma comment(linker, "/export:SteamAPI_GetSteamInstallPath=steam_api_orig.SteamAPI_GetSteamInstallPath,@5")
#pragma comment(linker, "/export:SteamAPI_Init=steam_api_orig.SteamAPI_Init,@6")
#pragma comment(linker, "/export:SteamAPI_InitSafe=steam_api_orig.SteamAPI_InitSafe,@7")
#pragma comment(linker, "/export:SteamAPI_IsSteamRunning=steam_api_orig.SteamAPI_IsSteamRunning,@8")
#pragma comment(linker, "/export:SteamAPI_RegisterCallResult=steam_api_orig.SteamAPI_RegisterCallResult,@9")
#pragma comment(linker, "/export:SteamAPI_RegisterCallback=steam_api_orig.SteamAPI_RegisterCallback,@10")
#pragma comment(linker, "/export:SteamAPI_RestartAppIfNecessary=steam_api_orig.SteamAPI_RestartAppIfNecessary,@11")
#pragma comment(linker, "/export:SteamAPI_RunCallbacks=steam_api_orig.SteamAPI_RunCallbacks,@12")
#pragma comment(linker, "/export:SteamAPI_SetBreakpadAppID=steam_api_orig.SteamAPI_SetBreakpadAppID,@13")
#pragma comment(linker, "/export:SteamAPI_SetMiniDumpComment=steam_api_orig.SteamAPI_SetMiniDumpComment,@14")
#pragma comment(linker, "/export:SteamAPI_SetTryCatchCallbacks=steam_api_orig.SteamAPI_SetTryCatchCallbacks,@15")
#pragma comment(linker, "/export:SteamAPI_Shutdown=steam_api_orig.SteamAPI_Shutdown,@16")
#pragma comment(linker, "/export:SteamAPI_UnregisterCallResult=steam_api_orig.SteamAPI_UnregisterCallResult,@17")
#pragma comment(linker, "/export:SteamAPI_UnregisterCallback=steam_api_orig.SteamAPI_UnregisterCallback,@18")
#pragma comment(linker, "/export:SteamAPI_UseBreakpadCrashHandler=steam_api_orig.SteamAPI_UseBreakpadCrashHandler,@19")
#pragma comment(linker, "/export:SteamAPI_WriteMiniDump=steam_api_orig.SteamAPI_WriteMiniDump,@20")
#pragma comment(linker, "/export:SteamApps=steam_api_orig.SteamApps,@21")
#pragma comment(linker, "/export:SteamClient=steam_api_orig.SteamClient,@22")
#pragma comment(linker, "/export:SteamContentServer=steam_api_orig.SteamContentServer,@23")
#pragma comment(linker, "/export:SteamContentServerUtils=steam_api_orig.SteamContentServerUtils,@24")
#pragma comment(linker, "/export:SteamContentServer_Init=steam_api_orig.SteamContentServer_Init,@25")
#pragma comment(linker, "/export:SteamContentServer_RunCallbacks=steam_api_orig.SteamContentServer_RunCallbacks,@26")
#pragma comment(linker, "/export:SteamContentServer_Shutdown=steam_api_orig.SteamContentServer_Shutdown,@27")
#pragma comment(linker, "/export:SteamFriends=steam_api_orig.SteamFriends,@28")
#pragma comment(linker, "/export:SteamGameServer=steam_api_orig.SteamGameServer,@29")
#pragma comment(linker, "/export:SteamGameServerApps=steam_api_orig.SteamGameServerApps,@30")
#pragma comment(linker, "/export:SteamGameServerNetworking=steam_api_orig.SteamGameServerNetworking,@31")
#pragma comment(linker, "/export:SteamGameServerStats=steam_api_orig.SteamGameServerStats,@32")
#pragma comment(linker, "/export:SteamGameServerUtils=steam_api_orig.SteamGameServerUtils,@33")
#pragma comment(linker, "/export:SteamGameServer_BSecure=steam_api_orig.SteamGameServer_BSecure,@34")
#pragma comment(linker, "/export:SteamGameServer_GetHSteamPipe=steam_api_orig.SteamGameServer_GetHSteamPipe,@35")
#pragma comment(linker, "/export:SteamGameServer_GetHSteamUser=steam_api_orig.SteamGameServer_GetHSteamUser,@36")
#pragma comment(linker, "/export:SteamGameServer_GetIPCCallCount=steam_api_orig.SteamGameServer_GetIPCCallCount,@37")
#pragma comment(linker, "/export:SteamGameServer_GetSteamID=steam_api_orig.SteamGameServer_GetSteamID,@38")
#pragma comment(linker, "/export:SteamGameServer_Init=steam_api_orig.SteamGameServer_Init,@39")
#pragma comment(linker, "/export:SteamGameServer_InitSafe=steam_api_orig.SteamGameServer_InitSafe,@40")
#pragma comment(linker, "/export:SteamGameServer_RunCallbacks=steam_api_orig.SteamGameServer_RunCallbacks,@41")
#pragma comment(linker, "/export:SteamGameServer_Shutdown=steam_api_orig.SteamGameServer_Shutdown,@42")
#pragma comment(linker, "/export:SteamHTTP=steam_api_orig.SteamHTTP,@43")
#pragma comment(linker, "/export:SteamMasterServerUpdater=steam_api_orig.SteamMasterServerUpdater,@44")
#pragma comment(linker, "/export:SteamMatchmaking=steam_api_orig.SteamMatchmaking,@45")
#pragma comment(linker, "/export:SteamMatchmakingServers=steam_api_orig.SteamMatchmakingServers,@46")
#pragma comment(linker, "/export:SteamNetworking=steam_api_orig.SteamNetworking,@47")
#pragma comment(linker, "/export:SteamRemoteStorage=steam_api_orig.SteamRemoteStorage,@48")
#pragma comment(linker, "/export:SteamScreenshots=steam_api_orig.SteamScreenshots,@49")
#pragma comment(linker, "/export:SteamUser=steam_api_orig.SteamUser,@50")
#pragma comment(linker, "/export:SteamUserStats=steam_api_orig.SteamUserStats,@51")
#pragma comment(linker, "/export:SteamUtils=steam_api_orig.SteamUtils,@52")
#pragma comment(linker, "/export:Steam_GetHSteamUserCurrent=steam_api_orig.Steam_GetHSteamUserCurrent,@53")
#pragma comment(linker, "/export:Steam_RegisterInterfaceFuncs=steam_api_orig.Steam_RegisterInterfaceFuncs,@54")
#pragma comment(linker, "/export:Steam_RunCallbacks=steam_api_orig.Steam_RunCallbacks,@55")
#pragma comment(linker, "/export:g_pSteamClientGameServer=steam_api_orig.g_pSteamClientGameServer,@56")
BOOL WINAPI DllMain(HINSTANCE hInst,DWORD reason,LPVOID)
{
if (reason == DLL_PROCESS_ATTACH) {
hLThis = hInst;
hL = LoadLibrary(_T("steam_api_orig.dll"));
if (!hL) return false;
char dllPath[MAX_PATH];
FILE *hintFile = fopen("mo_path.txt", "r");
int pathLen = 0;
if (hintFile != nullptr) {
memset(dllPath, L'\0', MAX_PATH);
pathLen = fread(dllPath, 1, MAX_PATH, hintFile);
fclose(hintFile);
} // the else case will most likely lead to an error, but lets try anyway
_snprintf(dllPath + pathLen, MAX_PATH - pathLen, "\\hook.dll");
dllPath[MAX_PATH - 1] = '\0';
HINSTANCE hookdll = ::LoadLibrary(dllPath);
if (!hookdll) {
return false;
}
} else if (reason == DLL_PROCESS_DETACH) {
FreeLibrary(hL);
}
return 1;
}
| [
"fr00gyl@gmail.com"
] | fr00gyl@gmail.com |
d8b929da5d4acf10c958f414f7fcd70f38617aee | ac937b2f67716d53e8dab2f9a29de8bb3e7eabcf | /TheNextWeek/RayTracing/RayTracing/bvh.h | 3994faf47d607fcc498a69ad25074ff331b930a6 | [] | no_license | MYOUTCR/RayTracing | 5572e02af81d5e045fd212ad7b667d0499dd4ffa | 90f82217a57ad9bf3cd708c9609bd93704b9e513 | refs/heads/master | 2020-08-23T09:50:32.930976 | 2019-11-11T13:23:23 | 2019-11-11T13:23:23 | 216,589,888 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,194 | h | #ifndef _BVH_HEAD_
#define _BVH_HEAD_
#include "hittable.h"
#include "aabb.h"
#include "random.h"
int box_x_compare(const void *a, const void *b)
{
aabb box_left, box_right;
hittable *ah = *(hittable**)a;
hittable *bh = *(hittable**)b;
if (!ah->bounding_box(0, 0, box_left) || !bh->bounding_box(0, 0, box_right))
std::cerr << "no bounding box in bvh_node constructor\n";
if (box_left.min().x() - box_right.min().x() < 0.0)
return -1;
else
return 1;
}
int box_y_compare(const void *a, const void *b)
{
aabb box_left, box_right;
hittable *ah = *(hittable**)a;
hittable *bh = *(hittable**)b;
if (!ah->bounding_box(0, 0, box_left) || !bh->bounding_box(0, 0, box_right))
std::cerr << "no bounding box in bvh_node constructor\n";
if (box_left.min().y() - box_right.min().y() < 0.0)
return -1;
else
return 1;
}
int box_z_compare(const void *a, const void *b)
{
aabb box_left, box_right;
hittable *ah = *(hittable**)a;
hittable *bh = *(hittable**)b;
if (!ah->bounding_box(0, 0, box_left) || !bh->bounding_box(0, 0, box_right))
std::cerr << "no bounding box in bvh_node constructor\n";
if (box_left.min().z() - box_right.min().z() < 0.0)
return -1;
else
return 1;
}
class bvh_node:public hittable
{
public:
bvh_node(){}
bvh_node(hittable **list, int n, float time0, float time1);
virtual bool hit(const ray &r, float f_min, float f_max, hit_record &rec)const;
virtual bool bounding_box(float t0, float t1, aabb &box)const;
private:
hittable *_left;
hittable *_right;
aabb _box;
};
bvh_node::bvh_node(hittable **list, int n, float time0, float time1)
{
int axis = int(3 * random_double());
if (axis == 0)
{
qsort(list, n, sizeof(hittable*), box_x_compare);
}
else if (axis == 1)
{
qsort(list, n, sizeof(hittable*), box_y_compare);
}
else
{
qsort(list, n, sizeof(hittable*), box_z_compare);
}
if (1 == n)
{
_left = _right = list[0];
}
else if (n == 2)
{
_left = list[0];
_right = list[1];
}
else
{
_left = new bvh_node(list, n / 2, time0, time1);
_right = new bvh_node(list + n / 2, n - n / 2, time0, time1);
}
aabb box_left, box_right;
if (!_left->bounding_box(time0, time1, box_left) || !_right->bounding_box(time0, time1, box_right))
{
std::cerr << "no bounding box in bvh_node constructor\n";
}
_box = surrounding_box(box_left, box_right);
}
bool bvh_node::hit(const ray &r, float t_min, float t_max, hit_record &rec)const
{
if (_box.hit(r, t_min, t_max))
{
hit_record left_rec, right_rec;
bool hit_left = _left->hit(r, t_min, t_max, left_rec);
bool hit_right = _right->hit(r, t_min, t_max, right_rec);
if (hit_left&&hit_right)
{
if (left_rec.t < right_rec.t)
rec = left_rec;
else
rec = right_rec;
return true;
}
else if (hit_left)
{
rec = left_rec;
return true;
}
else if (hit_right)
{
rec = right_rec;
return true;
}
else
{
return false;
}
}
else
return false;
}
bool bvh_node::bounding_box(float t0, float t1, aabb &box)const
{
box = _box;
return true;
}
#endif
| [
"cn_yhm@163.com"
] | cn_yhm@163.com |
0d4b0ace94e1cce360c8c2d3193f8f51c71919ec | 0834c4bacf61cbfac10f48a90364c834f1935bef | /ECG/lab_work/lab3/matOp/matOp/main.cpp | a8bca4616b779e94a696712e5154f24f41bdbcfc | [] | no_license | aerika96/2nd_semester | 0d4be1306b56ffde344093b9f535e0e1994042c1 | f7086c9814e53e7751ef4897c4e3641bde77229d | refs/heads/master | 2020-12-30T14:45:05.605403 | 2017-08-01T19:33:42 | 2017-08-01T19:33:42 | 91,081,506 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 443 | cpp | //
// main.cpp
// Lab3
//
// Copyright © 2016 CGIS. All rights reserved.
//
#include <iostream>
#include "testMatrix.h"
#include "mat3.h"
#include "mat4.h"
int main(int argc, const char * argv[]) {
int nrOfErrors = 0;
nrOfErrors += egc::testMat3Implementation();
nrOfErrors += egc::testMat4Implementation();
std::cout << "Number of errors: " << nrOfErrors << std::endl;
std:getchar();
return 0;
}
| [
"erikatimeaalbert@gmail.com"
] | erikatimeaalbert@gmail.com |
5f8bb6c8c36adf7190b2f5bf358e827c1eb05215 | dcb4c9922f87a36034a083bd24a322ef143f2bfb | /download/im/src/im_sysfile_unix.cpp | ae26da3a379aafe864823e16725c34d4e8caa481 | [
"MIT"
] | permissive | kmx/alien-iup | ece952c2e8fd46a14b84310fdfe41ac8c5cfa9cc | aeead1fcd606593e73c900d1bacb2fd573865db5 | refs/heads/master | 2020-05-25T15:47:28.727060 | 2017-06-01T13:57:06 | 2017-06-01T13:57:06 | 811,708 | 2 | 1 | null | 2015-01-31T19:52:04 | 2010-08-02T05:26:14 | Perl | UTF-8 | C++ | false | false | 4,766 | cpp | /** \file
* \brief System Dependent Binary File Access (UNIX)
*
* See Copyright Notice in im_lib.h
* $Id: im_sysfile_unix.cpp,v 1.2 2012-03-19 02:33:51 scuri Exp $
*/
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include "im_util.h"
#include "im_binfile.h"
class imBinSystemFile: public imBinFileBase
{
protected:
int FileHandle,
Error;
unsigned long ReadBuf(void* pValues, unsigned long pSize);
unsigned long WriteBuf(void* pValues, unsigned long pSize);
public:
virtual void Open(const char* pFileName);
virtual void New(const char* pFileName);
virtual void Close();
unsigned long FileSize();
int HasError() const;
void SeekTo(unsigned long pOffset);
void SeekOffset(long pOffset);
void SeekFrom(long pOffset);
unsigned long Tell() const;
int EndOfFile() const;
};
imBinFileBase* iBinSystemFileNewFunc()
{
return new imBinSystemFile();
}
void imBinSystemFile::Open(const char* pFileName)
{
int mode = O_RDONLY;
#ifdef O_BINARY
mode |= O_BINARY;
#endif
this->FileHandle = open(pFileName, mode, 0);
if (this->FileHandle < 0)
this->Error = errno;
else
this->Error = 0;
SetByteOrder(imBinCPUByteOrder());
this->IsNew = 0;
}
void imBinSystemFile::New(const char* pFileName)
{
int mode = O_WRONLY | O_CREAT | O_TRUNC;
#ifdef O_BINARY
mode |= O_BINARY;
#endif
this->FileHandle = open(pFileName, mode, 0666); // User/Group/Other can read and write
if (this->FileHandle < 0)
this->Error = errno;
else
this->Error = 0;
SetByteOrder(imBinCPUByteOrder());
this->IsNew = 1;
}
void imBinSystemFile::Close()
{
assert(this->FileHandle > -1);
int ret = close(this->FileHandle);
if (ret < 0)
this->Error = errno;
else
this->Error = 0;
}
int imBinSystemFile::HasError() const
{
if (this->FileHandle < 0 || this->Error) return 1;
return 0;
}
unsigned long imBinSystemFile::ReadBuf(void* pValues, unsigned long pSize)
{
assert(this->FileHandle > -1);
int ret = read(this->FileHandle, pValues, (size_t)pSize);
if (ret < 0)
this->Error = errno;
else
this->Error = 0;
return ret < 0? 0: ret;
}
unsigned long imBinSystemFile::WriteBuf(void* pValues, unsigned long pSize)
{
assert(this->FileHandle > -1);
int ret = write(this->FileHandle, pValues, (size_t)pSize);
if (ret < 0)
this->Error = errno;
else
this->Error = 0;
return ret < 0? 0: ret;
}
void imBinSystemFile::SeekTo(unsigned long pOffset)
{
assert(this->FileHandle > -1);
int ret = lseek(this->FileHandle, pOffset, SEEK_SET);
if (ret < 0)
this->Error = errno;
else
this->Error = 0;
}
void imBinSystemFile::SeekOffset(long pOffset)
{
assert(this->FileHandle > -1);
int ret = lseek(this->FileHandle, pOffset, SEEK_CUR);
if (ret < 0)
this->Error = errno;
else
this->Error = 0;
}
void imBinSystemFile::SeekFrom(long pOffset)
{
assert(this->FileHandle > -1);
int ret = lseek(this->FileHandle, pOffset, SEEK_END);
if (ret < 0)
this->Error = errno;
else
this->Error = 0;
}
unsigned long imBinSystemFile::Tell() const
{
assert(this->FileHandle > -1);
long offset = lseek(this->FileHandle, 0L, SEEK_CUR);
return offset < 0? 0: offset;
}
unsigned long imBinSystemFile::FileSize()
{
assert(this->FileHandle > -1);
long lCurrentPosition = lseek(this->FileHandle, 0L, SEEK_CUR);
long lSize = lseek(this->FileHandle, 0L, SEEK_END);
lseek(this->FileHandle, lCurrentPosition, SEEK_SET);
return lSize < 0? 0: lSize;
}
int imBinSystemFile::EndOfFile() const
{
assert(this->FileHandle > -1);
long lCurrentPosition = lseek(this->FileHandle, 0L, SEEK_CUR);
long lSize = lseek(this->FileHandle, 0L, SEEK_END);
lseek(this->FileHandle, lCurrentPosition, SEEK_SET);
return lCurrentPosition == lSize? 1: 0;
}
class imBinSystemFileHandle: public imBinSystemFile
{
public:
virtual void Open(const char* pFileName);
virtual void New(const char* pFileName);
virtual void Close();
};
imBinFileBase* iBinSystemFileHandleNewFunc()
{
return new imBinSystemFileHandle();
}
void imBinSystemFileHandle::Open(const char* pFileName)
{
// the file was successfully opened already by the client
int *s = (int*)pFileName;
this->FileHandle = s[0];
SetByteOrder(imBinCPUByteOrder());
this->IsNew = 0;
this->Error = 0;
}
void imBinSystemFileHandle::New(const char* pFileName)
{
// the file was successfully opened already the client
int *s = (int*)pFileName;
this->FileHandle = s[0];
SetByteOrder(imBinCPUByteOrder());
this->IsNew = 1;
this->Error = 0;
}
void imBinSystemFileHandle::Close()
{
// does nothing, the client must close the file
}
| [
"kmx@cpan.org"
] | kmx@cpan.org |
0b296bced1f1303fe81cd470eead2e75bc133e9f | 8df1054f8c05eaeabd92f3f12c812ecbbe18b8ad | /test/test_type_name.cpp | 25a43ecee9cb33d457b1fafd78049b3873957071 | [
"BSD-3-Clause"
] | permissive | melven/pitts | e9f0053d9cf8179bb636862ed81a076b415d75b1 | 2cff51471def8f0b7e2b7aacc56c159bb570e1e3 | refs/heads/master | 2023-05-23T05:09:43.660566 | 2022-09-06T08:23:05 | 2022-09-06T08:23:05 | 369,316,003 | 4 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 632 | cpp | #include <gtest/gtest.h>
#include "pitts_type_name.hpp"
class TestClassName;
TEST(PITTS_TypeName, simple_types)
{
using PITTS::internal::TypeName;
//using namespace PITTS::internal;
ASSERT_EQ("int", TypeName::name<int>());
ASSERT_EQ("const int", TypeName::name<const int>());
ASSERT_EQ("const char*", TypeName::name<const char*>());
ASSERT_EQ("TestClassName", TypeName::name<TestClassName>());
}
TEST(PITTS_TypeName, compile_time)
{
using PITTS::internal::TypeName;
// ensure this runs at compile time...
static constexpr auto dummy = TypeName::name<unsigned int&>();
ASSERT_EQ("unsigned int&", dummy);
}
| [
"Melven.Roehrig-Zoellner@DLR.de"
] | Melven.Roehrig-Zoellner@DLR.de |
60b4fa7ca18fa91c64bf1484e9ab87b922fa4312 | ffd8d8cec584eb88a271d042440397736c1125eb | /src/game/components/ApplyComponent.h | 8e7bfb6ca3f4f57fa94b4fb140c7d0bf6155ef41 | [] | no_license | MegatronX/KHMP_ED | 3f57e318117ce277cfd0d891cb2aa05f3322c946 | 53ece43111322aa571ea60851c06de6012277d1f | refs/heads/master | 2021-01-17T17:19:33.468941 | 2016-06-15T23:50:44 | 2016-06-15T23:50:44 | 60,567,891 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 544 | h | #pragma once
#ifndef _APPLYCOMPONENT_H_
#define _APPLYCOMPONENT_H_
#include <component/Component.h>
#include <utility/Priority.h>
namespace KHMP
{
class BattleField;
class ApplyComponent : public Component, public Priority
{
public:
const static ComponentType m_componentType = 0xb6ceb46e;
ApplyComponent(Entity* owner, ComponentID id, const int priority = 0) : Component(owner, m_componentType, id), Priority(priority)
{
}
virtual bool Apply(Entity* target, BattleField* field = nullptr)
{
return false;
}
};
}
#endif | [
"jay.riley.ut@gmail.com"
] | jay.riley.ut@gmail.com |
e09930bede5ca27767c47d49cdd76d9f6d567dbe | c0d12de311e1b79050ad8a2020dfa9e983663596 | /c++/code/test.cc | c2e8acb0a81fd48adea6ad4f92f8270669fa7937 | [] | no_license | rawk-v/myndnsim | 76b839153054807fda85c88600798dce457de3a4 | f243af87974790a437e8a6f6d04b7625d940c426 | refs/heads/master | 2021-01-18T05:32:10.502600 | 2016-07-20T14:20:12 | 2016-07-20T14:20:12 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 198 | cc | #include<iostream>
#include "Stuff.hpp"
int main()
{
using namespace myspace;
std::string name="nick";
Stuff* s1=new Stuff(5,40.0,name);
s1->Show();
delete s1;
return 0;
}
| [
"1790949749@qq.ccom"
] | 1790949749@qq.ccom |
c2c935e10cbbd25789b3f71534980e00ec0155d9 | c611b35a08d0abbce62c8a3e80ab747967460e4a | /sim/fsim/SL1/include/sl1viterbi.h | 3f59e1528008c605de23824ba577bd2f2b5abec4 | [] | no_license | svn2github/open64 | 301f132bdcb602d4e677fc23881ce602f3961969 | 88431de7e6860ed692c0c160724620e798de428a | refs/heads/master | 2021-01-20T06:59:43.507059 | 2014-12-31T18:38:48 | 2014-12-31T18:38:48 | 24,089,237 | 3 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 2,103 | h | /*
* File: sl1viterbi.h
*
* Copyright (c) 2006 Beijing SimpLight Nanoelectornics, Ltd.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1.Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2.Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE FREEBSD PROJECT ``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 FREEBSD PROJECT 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 SL1VITERBI_H_
#define SL1VITERBI_H_
#include "sl1defs.h"
#define MAX_SHIFT_SIZE 8
#define VITERBI_FINISHED 1
#define VITERBI_USED 0
#define BANK_GRUOP_NUM 4
class SL1MMU;
class SL1VITERBI{
private:
SL1MMU& _mmu;
UINT16 _scalingValue;
private:
void _readInputData(UINT *dest,ADDR res,UINT len);
//void _writeOutputData(ADDR dest, UINT* res,UINT len);
UINT _writeOutputShift(UINT *dest,UINT* res,UINT cons_len_sub_one);
public:
SL1VITERBI(SL1MMU& m);
WORD exec(ADDR rs1,WORD rs2);
SL1MMU& mmu(void) { return _mmu; }
void setScalingValue(INT a) {_scalingValue=a;}
INT getScalingValue(void) { return _scalingValue;}
};
#endif /*SL1VITERBI_H_*/
| [
"malin@ead328b1-e903-0410-a19d-eacee4b031f6"
] | malin@ead328b1-e903-0410-a19d-eacee4b031f6 |
b17f82731be9d097597f3e61a55fd8ac9a78881f | 2aa9880c5ed5084112932a7bf03addbaeca84a32 | /cxx_utilities/unittest/vector_swizzle.cpp | 8b7515934b4f7fa11d6269301d83a3a8ce3ff0c8 | [] | no_license | goteet/a-piece-of-shit | 6da49e4f975495c7f049b0a9414d03b5259a7f03 | 2cae116ddba6b77a869966b7f005aae15f496b84 | refs/heads/master | 2022-10-03T20:34:31.450373 | 2020-05-26T07:13:07 | 2020-05-26T08:30:01 | 259,877,411 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,900 | cpp | #include "stdafx.h"
TEST_CLASS(SwizzleTest)
{
public:
TEST_METHOD(Vector2SwizzleTest)
{
float2 v2(1, 2), sw2, sw3, sw4;
float3 v3(v2, 3);
float4 v4(v2, 3, 4);
sw2 = swizzle<_Y, _X>(v2);
CXX_FEQUAL(sw2.x, v2.y);
CXX_FEQUAL(sw2.y, v2.x);
sw3 = swizzle<_Y, _Z>(v3);
CXX_FEQUAL(sw3.x, v3.y);
CXX_FEQUAL(sw3.y, v3.z);
sw4 = swizzle<_Z, _W>(v4);
CXX_FEQUAL(sw4.x, v4.z);
CXX_FEQUAL(sw4.y, v4.w);
sw2 = swizzle<_0, _1>(v4);
CXX_FEQUAL(0.0f, sw2.x);
CXX_FEQUAL(1.0f, sw2.y);
}
TEST_METHOD(Vector3SwizzleTest)
{
float2 v2(1, 2);
float3 v3(v2, 3), sw2, sw3, sw4;
float4 v4(v3, 4);
sw2 = swizzle<_Y, _X, _Y>(v2);
CXX_FEQUAL(sw2.x, v2.y);
CXX_FEQUAL(sw2.y, v2.x);
CXX_FEQUAL(sw2.z, v2.y);
sw3 = swizzle<_Y, _Z, _X>(v3);
CXX_FEQUAL(sw3.x, v3.y);
CXX_FEQUAL(sw3.y, v3.z);
CXX_FEQUAL(sw3.z, v3.x);
sw4 = swizzle<_W, _X, _Z>(v4);
CXX_FEQUAL(sw4.x, v4.w);
CXX_FEQUAL(sw4.y, v4.x);
CXX_FEQUAL(sw4.z, v4.z);
sw2 = swizzle<_0, _1, _X>(v4);
CXX_FEQUAL(0.0f, sw2.x);
CXX_FEQUAL(1.0f, sw2.y);
CXX_FEQUAL(v4.x, sw2.z);
}
TEST_METHOD(Vector4SwizzleTest)
{
float2 v2(1, 2);
float3 v3(v2, 3);
float4 v4(v3, 4), sw2, sw3, sw4;
sw2 = swizzle<_Y, _X, _Y, _X>(v2);
CXX_FEQUAL(sw2.x, v2.y);
CXX_FEQUAL(sw2.y, v2.x);
CXX_FEQUAL(sw2.z, v2.y);
CXX_FEQUAL(sw2.w, v2.x);
sw3 = swizzle<_Y, _Z, _X, _Z>(v3);
CXX_FEQUAL(sw3.x, v3.y);
CXX_FEQUAL(sw3.y, v3.z);
CXX_FEQUAL(sw3.z, v3.x);
CXX_FEQUAL(sw3.w, v3.z);
sw4 = swizzle<_W, _X, _Z, _Y>(v4);
CXX_FEQUAL(sw4.x, v4.w);
CXX_FEQUAL(sw4.y, v4.x);
CXX_FEQUAL(sw4.z, v4.z);
CXX_FEQUAL(sw4.w, v4.y);
sw2 = swizzle<_W, _0, _1, _X>(v4);
CXX_FEQUAL(v4.w, sw2.x);
CXX_FEQUAL(0.0f, sw2.y);
CXX_FEQUAL(1.0f, sw2.z);
CXX_FEQUAL(v4.x, sw2.w);
}
TEST_METHOD(Color3SwizzleTest)
{
color3 c3(0.0, 0.5f, 1.0f), sw3, sw4;
color4 c4(c3, 0.3f);
sw3 = swizzle<_B, _G, _R>(c3);
CXX_FEQUAL(sw3.r, c3.b);
CXX_FEQUAL(sw3.g, c3.g);
CXX_FEQUAL(sw3.b, c3.r);
sw4 = swizzle<_A, _R, _G>(c4);
CXX_FEQUAL(sw4.r, c4.a);
CXX_FEQUAL(sw4.g, c4.r);
CXX_FEQUAL(sw4.b, c4.g);
sw4 = swizzle<_1, _0, _G>(c4);
CXX_FEQUAL(1.0f, sw4.r);
CXX_FEQUAL(0.0f, sw4.g);
CXX_FEQUAL(c4.g, sw4.b);
}
TEST_METHOD(Color4SwizzleTest)
{
color3 c3(0.0, 0.5f, 1.0f);
color4 c4(c3, 0.3f), sw3, sw4;
sw3 = swizzle<_B, _G, _R, _G>(c3);
CXX_FEQUAL(sw3.r, c3.b);
CXX_FEQUAL(sw3.g, c3.g);
CXX_FEQUAL(sw3.b, c3.r);
CXX_FEQUAL(sw3.a, c3.g);
sw4 = swizzle<_A, _R, _G, _B>(c4);
CXX_FEQUAL(sw4.r, c4.a);
CXX_FEQUAL(sw4.g, c4.r);
CXX_FEQUAL(sw4.b, c4.g);
CXX_FEQUAL(sw4.a, c4.b);
sw4 = swizzle<_1, _0, _1, _A>(c4);
CXX_FEQUAL(1.0f, sw4.r);
CXX_FEQUAL(0.0f, sw4.g);
CXX_FEQUAL(1.0f, sw4.b);
CXX_FEQUAL(c4.a, sw4.a);
}
}; | [
"goteet@126.com"
] | goteet@126.com |
a3fde30353c5e47d982e4a8f1cded0c67081cf41 | 772cff7c7af9d3814ebd3a40911891bdf45d12ed | /Handover/C++ code/OFDM/OFDM/channel_estimation.h | 4316733f6203bca563a84e2de0bc42ebaeed9a79 | [] | no_license | iamsteven526/master | cab3bdc55c7102d2d2c2d03d7560dc0966005ccf | 706ff20f61be9b93ab3665effcc8af9beb8835d8 | refs/heads/master | 2023-07-01T19:21:51.589947 | 2021-08-11T04:02:01 | 2021-08-11T04:02:01 | 291,770,130 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 12,883 | h | #ifndef CHANNEL_ESTIMATION
#define CHANNEL_ESTIMATION
#include"setting.h"
#include"math_operation.h"
#include"modulation.h"
COMPLEX_OPERATION complexOperation;
QAM qam(MOD_BIT);
FFT fft(N, LAYER);
class ESTIMATION
{
public:
vector<complexNum> Permutation(vector<complexNum> X)
{
vector<complexNum> output(X.size());
vector<vector<complexNum>> Xarray(N / S, vector<complexNum>(S));
for (int r = 0; r < N / S; r++)
copy(X.begin() + (r*S), X.begin() + ((r + 1)*S), Xarray[r].begin());
segmentSwapIdx.resize(N / S);
int sIdx = 0;
for (int s = 0; s < (N / (S*DEVISION)); s++)
{
for (int d = 0; d < DEVISION; d++)
{
copy(Xarray[d*(N / (S*DEVISION)) + s].begin(), Xarray[d*(N / (S*DEVISION)) + s].end(), output.begin() + (sIdx * S));
segmentSwapIdx.at(sIdx) = d * (N / (S*DEVISION)) + s;
sIdx++;
}
}
return output;
}
vector<complexNum> InversePermutation(vector<complexNum> Y, vector<double> CFR, vector<double> &permutatedCFR)
{
vector<complexNum> output(Y.size());
permutatedCFR.resize(CFR.size());
vector<vector<complexNum>> Yarray(N / S, vector<complexNum>(S));
vector<vector<double>> CFRarray(N / S, vector<double>(S));
for (int r = 0; r < N / S; r++)
{
copy(Y.begin() + (r*S), Y.begin() + ((r + 1)*S), Yarray[r].begin());
copy(CFR.begin() + (r*S), CFR.begin() + ((r + 1)*S), CFRarray[r].begin());
}
int sIdx = 0;
for (int d = 0; d < DEVISION; d++)
{
for (int s = 0; s < (N / (S*DEVISION)); s++)
{
copy(Yarray[sIdx].begin(), Yarray[sIdx].end(), output.begin() + (segmentSwapIdx.at(sIdx)*S));
copy(CFRarray[sIdx].begin(), CFRarray[sIdx].end(), permutatedCFR.begin() + (segmentSwapIdx.at(sIdx)*S));
sIdx++;
}
}
return output;
}
complexNum** CreateHmatrix(vector<vector<complexNum>> timeVaryingCIR, int startIdx)
{
complexNum **H = complexOperation.CreateMatrix(N, N);
complexNum **channelMatrix = complexOperation.CreateMatrix(N, N);
complexNum **leftMatrix = complexOperation.CreateMatrix(N, N);
for (int time = 0; time < N; time++)
{
for (int l = 0; l < L; l++)
channelMatrix[time][(time - l + N) % N] = timeVaryingCIR.at(l).at(time + startIdx);
}
for (int c = 0; c < N; c++)
{
vector<complexNum> input(N);
for (int i = 0; i < N; i++)
input.at(i) = channelMatrix[i][c];
vector<complexNum> subColumn = fft.NormalizedFastFourierTransform(input);
for (int i = 0; i < N; i++)
leftMatrix[i][c] = subColumn.at(i);
}
for (int r = 0; r < N; r++)
{
vector<complexNum> input(N);
for (int i = 0; i < N; i++)
input.at(i) = leftMatrix[r][i];
vector<complexNum> subColumn = fft.NormalizedInverseFastFourierTransform(input);
for (int i = 0; i < N; i++)
H[r][i] = subColumn.at(i);
}
complexOperation.DeleteMatrix(channelMatrix);
complexOperation.DeleteMatrix(leftMatrix);
return H;
}
vector<complexNum> OneTapEqualizer(vector<complexNum> CFR, vector<complexNum> Y)
{
vector<complexNum> estimatedOutput(N);
for (int i = 0; i < N; i++)
estimatedOutput.at(i) = Y.at(i) / CFR.at(i);
return estimatedOutput;
}
vector<complexNum> PartialMMSEequalizer(complexNum **H, vector<complexNum> Y, double N0 ,vector<double> &channelPower)
{
complexNum **sparseH = complexOperation.CreateMatrix(N, N);
for (int d = 0; d < N; d++)
{
for (int k = 0; k < N; k++)
{
if (abs(d - k) <= D || abs(d - k) >= (N - D))
sparseH[d][k] = H[d][k];
}
}
channelPower.resize(N);
vector<complexNum> estimated_X(N, 0);
for (int k = 0; k < N; k++)
{
complexNum **Hk = complexOperation.CreateMatrix(2 * D + 1, 4 * D + 1);
for (int r = 0; r <= 2 * D; r++)
{
for (int c = 0; c <= 4 * D; c++)
{
int row_idx = (k - D + r + N) % N;
int col_idx = (k - 2 * D + c + N) % N;
Hk[r][c] = sparseH[row_idx][col_idx]; // +N for mod
}
}
vector<complexNum> Yk(2 * D + 1);
for (int i = 0; i < 2 * D + 1; i++)
Yk.at(i) = Y.at((k - D + i + N) % N); //+N for mod
estimated_X.at(k) = PartialMMSEequalization(Hk, Yk, N0, channelPower.at(k));
complexOperation.DeleteMatrix(Hk);
}
complexOperation.DeleteMatrix(sparseH);
return estimated_X;
}
vector<complexNum> LMMSEequalizer(complexNum **H, vector<complexNum> Y, double N0 ,vector<double> &channelPower)
{
complexNum **Her_H = complexOperation.HermitianOperator(H);
complexNum **Mul_H_Her_H = complexOperation.MatrixMultiplication(H, Her_H);
for (int i = 0; i < N; i++)
Mul_H_Her_H[i][i] += complexNum(N0, 0);
complexNum **inv_mul_H_Her_H = complexOperation.ComplexInverseMatrix(Mul_H_Her_H);
complexNum **Her_G = complexOperation.MatrixMultiplication(Her_H, inv_mul_H_Her_H);
complexOperation.DeleteMatrix(Her_H);
complexOperation.DeleteMatrix(Mul_H_Her_H);
complexOperation.DeleteMatrix(inv_mul_H_Her_H);
vector<complexNum> estimated_X(N, 0);
for (int i = 0; i < estimated_X.size(); i++)
{
for (int j = 0; j < Y.size(); j++)
estimated_X.at(i) += Her_G[i][j] * Y.at(j);
}
channelPower.resize(N);
for (int j = 0; j < N; j++)
{
double sum = 0;
for (int r = 0; r < N; r++)
sum += abs(Her_G[j][r]*conj(Her_G[j][r]));
channelPower.at(j) = sum;
}
complexOperation.DeleteMatrix(Her_G);
return estimated_X;
}
vector<complexNum> PartialMMSESIC(complexNum **H, vector<complexNum> Y, double N0)
{
complexNum **sparseH = complexOperation.CreateMatrix(N, N);
for (int r = 0; r < N; r++)
{
for (int c = 0; c < N; c++)
{
if (abs(r - c) <= D || abs(r - c) >= (N - D))
sparseH[r][c] = H[r][c];
}
}
vector<complexNum> Ycopy(Y.size());
copy(Y.begin(), Y.end(), Ycopy.begin());
int check = 1;
vector<bool> state(N, true);
vector<complexNum> estimated_S(N);
vector<complexNum> estimated_X(N, 0);
vector<double> diagonalPower(N, 0);
while (check != 0)
{
for (int d = 0; d < N; d++)
diagonalPower.at(d) = norm(sparseH[d][d]);
int k = max_element(diagonalPower.begin(), diagonalPower.end()) - diagonalPower.begin();
complexNum **Hk = complexOperation.CreateMatrix(2 * D + 1, 4 * D + 1);
for (int r = 0; r < 2 * D + 1; r++)
{
for (int c = 0; c < 4 * D + 1; c++)
{
int row_idx = (k - D + r + N) % N;
int col_idx = (k - 2 * D + c + N) % N;
Hk[r][c] = sparseH[row_idx][col_idx]; // +N for mod
}
}
vector<complexNum> Yk(2 * D + 1);
for (int i = 0; i < 2 * D + 1; i++)
Yk.at(i) = Ycopy.at((k - D + i + N) % N); //+N for mod
double gainPower = 0;
estimated_X.at(k) = PartialMMSEequalization(Hk, Yk, N0, gainPower);
complexOperation.DeleteMatrix(Hk);
estimated_S.at(k) = qam.oneSampleHardDecision(estimated_X.at(k));
for (int j = 0; j < N; j++)
{
Ycopy.at(j) = Ycopy.at(j) - sparseH[j][k] * estimated_S.at(k);
sparseH[j][k] = complexNum(0, 0);
}
state.at(k) = 0;
int checkSum = 0;
for (int r = 0; r < N; r++)
checkSum += state.at(r);
check = checkSum;
}
complexOperation.DeleteMatrix(sparseH);
return estimated_X;
}
vector<complexNum> ListPartialMMSESIC(complexNum **H, vector<complexNum> Y, double N0)
{
vector<complexNum> Ycopy(Y.size());
copy(Y.begin(), Y.end(), Ycopy.begin());
vector<complexNum> output(N);
vector<vector<complexNum>> path, Youtput;
path.push_back(vector<complexNum>(N, 0));
Youtput.push_back(vector<complexNum>(N, 0));
for (int c = 0; c < N; c++)
Youtput[0].at(c) = Ycopy.at(c);
int check = 1;
vector<bool> state(N, true);
vector<double> diagonalPower(N, 0), probablity(1, 1);
complexNum **sparseH = complexOperation.CreateMatrix(N, N);
for (int r = 0; r < N; r++)
{
for (int c = 0; c < N; c++)
{
if (abs(r - c) <= D || abs(r - c) >= (N - D))
sparseH[r][c] = H[r][c];
}
}
while (check != 0)
{
for (int d = 0; d < N; d++)
diagonalPower.at(d) = norm(sparseH[d][d]);
int k = max_element(diagonalPower.begin(), diagonalPower.end()) - diagonalPower.begin();
complexNum **Hk = complexOperation.CreateMatrix(2 * D + 1, 4 * D + 1);
for (int r = 0; r < 2 * D + 1; r++)
{
for (int c = 0; c < 4 * D + 1; c++)
{
int row_idx = (k - D + r + N) % N;
int col_idx = (k - 2 * D + c + N) % N;
Hk[r][c] = sparseH[row_idx][col_idx]; // +N for mod
}
}
vector<vector<complexNum>> bufferPath, bufferY;
vector<double> bufferProb;
vector<complexNum> Yk(2 * D + 1);
for (int list = 0; list < path.size(); list++)
{
for (int i = 0; i < 2 * D + 1; i++)
Yk.at(i) = Youtput[list].at((k - D + i + N) % N);
double gainPower;
complexNum valuek = PartialMMSEequalization(Hk, Yk, N0, gainPower);
vector<complexNum> subConstellation;
vector<double> subProb = qam.constellationProbability(valuek, sparseH[k][k], N0, subConstellation);
bool certain = false; int certainIdx;
for (int s = 0; s < subProb.size(); s++)
{
if (subProb.at(s) == 1)
{
certain = true;
certainIdx = s;
break;
}
}
if (certain == true)
{
path[list].at(k) = subConstellation.at(certainIdx);
for (int j = 0; j < N; j++)
Youtput[list].at(j) -= sparseH[j][k] * path[list].at(k);
bufferPath.push_back(path[list]);
bufferProb.push_back(probablity.at(list));
bufferY.push_back(Youtput[list]);
}
else
{
for (int s = 0; s < subProb.size(); s++)
{
vector<complexNum> subEstimatedS(N), subYoutput(N);
copy(path[list].begin(), path[list].end(), subEstimatedS.begin());
copy(Youtput[list].begin(), Youtput[list].end(), subYoutput.begin());
subEstimatedS.at(k) = subConstellation.at(s);
for (int j = 0; j < N; j++)
subYoutput.at(j) -= sparseH[j][k] * subConstellation.at(s);
bufferPath.push_back(subEstimatedS);
bufferProb.push_back(probablity.at(list)*subProb.at(s));
bufferY.push_back(subYoutput);
}
}
}
if (bufferPath.size() > Ls)
{
int deleteSize = bufferPath.size() - Ls;
for (int j = 0; j < deleteSize; j++)
{
int minIdx = min_element(bufferProb.begin(), bufferProb.end()) - bufferProb.begin();
bufferPath.erase(bufferPath.begin() + minIdx, bufferPath.begin() + (minIdx + 1));
bufferY.erase(bufferY.begin() + minIdx, bufferY.begin() + (minIdx + 1));
bufferProb.erase(bufferProb.begin() + minIdx, bufferProb.begin() + (minIdx + 1));
}
}
path.resize(bufferPath.size());
Youtput.resize(bufferY.size());
probablity.resize(bufferProb.size());
for (int r = 0; r < bufferPath.size(); r++)
{
path[r].resize(N);
Youtput[r].resize(N);
copy(bufferPath[r].begin(), bufferPath[r].end(), path[r].begin());
copy(bufferY[r].begin(), bufferY[r].end(), Youtput[r].begin());
}
copy(bufferProb.begin(), bufferProb.end(), probablity.begin());
complexOperation.DeleteMatrix(Hk);
for (int j = 0; j < N; j++)
sparseH[j][k] = complexNum(0, 0);
state.at(k) = 0;
int checkSum = 0;
for (int r = 0; r < N; r++)
checkSum += state.at(r);
check = checkSum;
}
complexOperation.DeleteMatrix(sparseH);
int finalIndex = max_element(probablity.begin(), probablity.end()) - probablity.begin();
vector<complexNum> hatS(N);
copy(path[finalIndex].begin(), path[finalIndex].end(), hatS.begin());
return hatS;
}
private:
complexNum PartialMMSEequalization(complexNum **Hk, vector<complexNum> Yk, double N0 ,double &channelPower)
{
COMPLEX_OPERATION complexOperation;
complexNum **Her_Hk = complexOperation.HermitianOperator(Hk);
complexNum **Mul_Hk_Her_Hk = complexOperation.MatrixMultiplication(Hk, Her_Hk);
for (int r = 0; r <= 2 * D; r++)
Mul_Hk_Her_Hk[r][r] += complexNum(N0, 0);
complexNum **inv_Mul_Hk_Her_Hk = complexOperation.ComplexInverseMatrix(Mul_Hk_Her_Hk);
vector<complexNum> Her_gk(2 * D + 1, 0 );
double sumP = 0;
for (int i = 0; i < Her_gk.size(); i++)
{
for (int j = 0; j < 2 * D + 1; j++)
Her_gk.at(i) += Her_Hk[2 * D][j] * inv_Mul_Hk_Her_Hk[j][i];
sumP += abs(Her_gk.at(i)*conj(Her_gk.at(i)));
}
channelPower = sumP;
complexOperation.DeleteMatrix(Her_Hk);
complexOperation.DeleteMatrix(Mul_Hk_Her_Hk);
complexOperation.DeleteMatrix(inv_Mul_Hk_Her_Hk);
complexNum sum = 0;
for (int i = 0; i < Yk.size(); i++)
sum += Her_gk.at(i)*Yk.at(i);
return sum;
}
vector<unsigned int>segmentSwapIdx;
};
#endif // !CHANNEL_ESTIMATION
| [
"r08942052@ntu.edu.tw"
] | r08942052@ntu.edu.tw |
5df6d50fec41695f221cf39c003c9d8ecc7bdd16 | 1bae12deaf825a9d8056d672a5c7606cf80d1cdd | /lib/searchcache.cpp | f957592804a3c96b5b6b744d0a59cdb27608d83d | [] | no_license | Mezzofanti/qamus | 8a8c5789ebb05b52c595a54f65853941bce18137 | ddad832b854180c0aab12fb4879869d89c1607a3 | refs/heads/master | 2021-01-19T10:00:14.129921 | 2012-08-17T15:35:02 | 2012-08-17T15:35:02 | 33,143,645 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,637 | cpp | #include "common.h"
#include "searchcache.h"
SearchCache::SearchCache(const QString& rawTerm, const QString& term, const int col, const int size)
{
_rawTerm = rawTerm;
_term = term;
_col = col;
_new = true;
_startTime = QDateTime::currentDateTimeUtc();
setActive(size);
}
SearchCache::SearchCache(const QString &rawTerm, const QString &term, SearchCache *baseCache)
{
_rawTerm = rawTerm;
_term = term;
_col = baseCache->_col;
_scores = baseCache->_scores;
_new = false;
_startTime = QDateTime::currentDateTimeUtc();
}
SearchCache::~SearchCache()
{
}
QDateTime SearchCache::getTime() const
{
return _startTime;
}
void SearchCache::searchFinished()
{
_endTime = QDateTime::currentDateTimeUtc();
}
short SearchCache::at(const int row) const
{
return _scores.at(row);
}
void SearchCache::set(const int row, const char score)
{
_scores.at(row) = score;
}
void SearchCache::setActive(const int size)
{
int oldSize = _scores.size();
if (oldSize < size)
{
_scores.resize(size);
for (int i = oldSize; i < size; ++i)
{
_scores.at(i) = INV_SCORE;
}
}
}
int SearchCache::size() const
{
return (int)_scores.size();
}
int SearchCache::getCol() const
{
return _col;
}
char SearchCache::getScore(int row) const
{
return _scores.at(row);
}
bool SearchCache::getNew() const
{
return _new;
}
QString SearchCache::getTerm() const
{
return _term;
}
QString SearchCache::getRawTerm() const
{
return _rawTerm;
}
qint64 SearchCache::getDuration() const
{
return _startTime.msecsTo(_endTime);
} | [
"bosth@alumni.sfu.ca"
] | bosth@alumni.sfu.ca |
c1d5c91c64edfe3b893923c260cb27b474605660 | 56da30a32df9d4602e7848a34f6d2a4d1efd43f5 | /dht/KBucket.h | d3e44088d659cb80bbdde7321abc558e59dcac91 | [] | no_license | radtek/skydc | b084ebe541244c5e953480850fecce3dae9327f5 | b44337c48230501b27e47e2dae9025bfc1e6961a | refs/heads/master | 2020-06-06T07:19:42.211769 | 2016-05-19T08:38:31 | 2016-05-19T08:38:31 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,274 | h | /*
* Copyright (C) 2009-2011 Big Muscle, http://strongdc.sf.net
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _KBUCKET_H
#define _KBUCKET_H
#include "Constants.h"
#include "../client/CID.h"
#include "../client/Client.h"
#include "../client/MerkleTree.h"
#include "../client/Pointer.h"
#include "../client/SimpleXML.h"
#include "../client/TimerManager.h"
#include "../client/User.h"
namespace dht
{
struct UDPKey
{
string ip;
CID key;
bool isZero() const { return key.isZero() || ip.empty() || ip == "0.0.0.0"; }
};
struct Node :
public OnlineUser
{
typedef boost::intrusive_ptr<Node> Ptr;
typedef std::map<CID, Node::Ptr> Map;
Node(const UserPtr& u);
~Node() noexcept { }
uint8_t getType() const { return type; }
bool isIpVerified() const { return ipVerified; }
bool isOnline() const { return online; }
void setOnline(bool _online) { online = _online; }
void setAlive();
void setIpVerified(bool verified) { ipVerified = verified; }
void setTimeout(uint64_t now = GET_TICK());
void setUdpKey(const UDPKey& _key) { key = _key; }
UDPKey getUdpKey() const;
private:
friend class RoutingTable;
UDPKey key;
uint64_t created;
uint64_t expires;
uint8_t type;
bool ipVerified;
bool online; // getUser()->isOnline() returns true when node is online in any hub, we need info when he is online in DHT
};
class RoutingTable
{
public:
RoutingTable(int _level = 0, bool splitAllowed = true);
~RoutingTable(void);
typedef std::deque<Node::Ptr> NodeList;
/** Creates new (or update existing) node which is NOT added to our routing table */
Node::Ptr addOrUpdate(const UserPtr& u, const string& ip, uint16_t port, const UDPKey& udpKey, bool update, bool isUdpKeyValid);
/** Returns nodes count in whole routing table */
static size_t getNodesCount() { return nodesCount; }
/** Finds "max" closest nodes and stores them to the list */
void getClosestNodes(const CID& cid, Node::Map& closest, unsigned int max, uint8_t maxType) const;
/** Loads existing nodes from disk */
void loadNodes(SimpleXML& xml);
/** Save bootstrap nodes to disk */
void saveNodes(SimpleXML& xml);
void checkExpiration(uint64_t aTick);
private:
/** Left and right branches of the tree */
RoutingTable* zones[2];
/** The level of this zone */
int level;
bool splitAllowed;
/** List of nodes in this bucket */
NodeList* bucket;
/** List of known IPs in this bucket */
static StringSet ipMap;
static size_t nodesCount;
void split();
uint64_t lastRandomLookup;
};
}
#endif // _KBUCKET_H
| [
"val.aleynik@yandex.ru"
] | val.aleynik@yandex.ru |
f822845abf4d9bd5ed967d33dfd2e456e180c850 | 830934ba65b11c21aa9051546eac0aa03893b210 | /src/FBXSource/ofxFBXSrcCluster.h | b3527818fc0fa2602ff624f0138179d0e43d3c01 | [
"MIT"
] | permissive | NickHardeman/ofxFBX | e9cca47c232a10ef4b89c12672fc2df68d9ecbc4 | f032fd43a78a740e7ab4b4f497a61a1654ef9a59 | refs/heads/master | 2023-09-03T19:21:22.013743 | 2023-08-30T14:51:34 | 2023-08-30T14:51:34 | 32,026,580 | 117 | 43 | MIT | 2022-11-22T15:13:13 | 2015-03-11T15:53:23 | C++ | UTF-8 | C++ | false | false | 632 | h | //
// ofxFBXCluster.h
// ofxFBX-Example-Importer
//
// Created by Nick Hardeman on 11/4/13.
//
//
#pragma once
#include "ofMain.h"
#include <fbxsdk.h>
namespace ofxFBXSource {
class Cluster {
public:
Cluster(){}
~Cluster() {}
void setup( FbxAMatrix& pPosition, FbxMesh* pMesh, FbxCluster* pCluster );
void update( FbxTime& pTime, FbxPose* pPose );
// FbxAMatrix origTransform;
FbxAMatrix preTrans, postTrans;
FbxCluster* cluster = NULL;
FbxMesh* mesh = NULL;
protected:
FbxAMatrix mReferenceInitPosition, mInvReferenceInitPosition;
FbxAMatrix mAssociateInitPosition;
};
}
| [
"nickhardeman@gmail.com"
] | nickhardeman@gmail.com |
5cc428bf4488d5b5c92dc8b24f9da8c6231288d8 | f1fc349f2d4e876a070561a4c4d71c5e95fd33a4 | /ch06/6_22_swappointer.cpp | 30773171d300c23be90024b7c5de22b63a0e2b17 | [] | no_license | sytu/cpp_primer | 9daccddd815fc0968008aa97e6bcfb36bbccd83d | 6cfb14370932e93c796290f40c70c153cc15db44 | refs/heads/master | 2021-01-17T19:03:48.738381 | 2017-04-13T10:35:43 | 2017-04-13T10:35:43 | 71,568,597 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 433 | cpp | #include <iostream>
using namespace std;
void swapPtr(int *&p1, int *&p2) {
int * tmpptr = p1;
p1 = p2;
p2 = tmpptr;
}
int main(void) {
int i1 = 10;
int i2 = 20;
int *p1, *p2;
p1 = &i1;
p2 = &i2;
cout << p1 << endl;
cout << p2 << endl;
cout << *p1 << endl;
cout << *p2 << endl;
cout << endl;
swap(p1, p2);
cout << p1 << endl;
cout << p2 << endl;
cout << *p1 << endl;
cout << *p2 << endl;
return 0;
}
| [
"imsytu@163.com"
] | imsytu@163.com |
bc4fb2c72a15e6af5354b31931de28184ef4f1b3 | 9716c8da6f3e7109520e8c09de0aef7e7da7ddfd | /exercise/week5/ex7.cpp | ae8296c6fe6fb16cda03ac9d56ad3a1bac8eebe1 | [
"MIT"
] | permissive | pureexe/SCSU-compro1 | 8646538dadcaac073f83d2e91d4ad60c863df359 | b758d069737a79e6b1e5e558a1e5d53defc9785a | refs/heads/master | 2020-12-04T23:25:21.709700 | 2016-12-07T06:30:43 | 2016-12-07T06:30:43 | 66,134,000 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 201 | cpp | /*
Author: Pakkapon Phongthawee
Copyright all reserved (2016)
LANG: CPP
*/
#include<iostream>
using namespace std;
int main(){
int a;
cin >> a;
cout << (a<0?"":"positive");
return 0;
}
| [
"me@pureapp.in.th"
] | me@pureapp.in.th |
def9bd766832597e6ad836ff4c42219217f134b2 | 888ff1ff4f76c61e0a2cff281f3fae2c9a4dcb7b | /C/C200/C280/C289/1.cpp | 32507e362ab59a08ed8fec955fa0f7d48a9f1ac0 | [] | no_license | sanjusss/leetcode-cpp | 59e243fa41cd5a1e59fc1f0c6ec13161fae9a85b | 8bdf45a26f343b221caaf5be9d052c9819f29258 | refs/heads/master | 2023-08-18T01:02:47.798498 | 2023-08-15T00:30:51 | 2023-08-15T00:30:51 | 179,413,256 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 739 | cpp | /*
* @Author: sanjusss
* @Date: 2022-04-17 10:27:58
* @LastEditors: sanjusss
* @LastEditTime: 2022-04-17 10:36:21
* @FilePath: \C\C200\C280\C289\1.cpp
*/
#include "leetcode.h"
class Solution {
public:
string digitSum(string s, int k) {
string t;
while (s.size() > k) {
int n = s.size();
int cur = 0;
for (int i = 0; i <= n; ++i) {
if (i == n || (i > 0 && i % k == 0)) {
t += to_string(cur);
cur = 0;
}
if (i < n) {
cur += s[i] - '0';
}
}
swap(s, t);
t.clear();
}
return s;
}
}; | [
"sanjusss@qq.com"
] | sanjusss@qq.com |
d80178bc20220fb880c6d5acf13a8031c746a3cc | fd67b98f57273d307a71030ab67a37045b9ed7de | /Codechef/SQRDSUB - Squared Subsequences.cpp | d49f5567a24bef36b77486e2d9536ce4d3ec6aa9 | [] | no_license | ngandhi369/Competitive_Programming | 5c16012b0074b2c36648bdcdc544c71d4699b93f | abb39c8903e49da2e7415501c3b011e21dc73c2f | refs/heads/master | 2023-01-02T06:38:43.848913 | 2020-10-28T18:21:58 | 2020-10-28T18:21:58 | 286,952,040 | 0 | 0 | null | 2020-09-18T09:39:01 | 2020-08-12T07:53:28 | C++ | UTF-8 | C++ | false | false | 1,039 | cpp | #include<bits/stdc++.h>
using namespace std;
long long fun(long int arr[],long int n, int sum)
{
unordered_map<long int,long int> prevSum;
long long res = 0;
int currsum = 0;
for (int i = 0; i < n; i++) {
currsum += arr[i];
if (currsum == sum)
res++;
if (prevSum.find(currsum - sum) !=
prevSum.end())
res += (prevSum[currsum - sum]);
prevSum[currsum]++;
}
return res;
}
int main()
{
int t;
long int n;
cin>>t;
while(t--)
{
cin>>n;
long int a[n],b[n];
for(long int i=0;i<n;i++)
{
cin>>a[i];
if(a[i]<0)
a[i]*=-1;
}
for(long int i=0;i<n;i++)
{
if(a[i]%4==0)
b[i]=2;
else if(a[i]%2==0)
b[i]=1;
else
b[i]=0;
}
long long flag=fun(b,n,1);
cout<<(long long)n*(n+1)/2-flag<<"\n";
}
return 0;
}
| [
"gandhinirdosh@gmail.com"
] | gandhinirdosh@gmail.com |
7a89d2cce8cd94783b4948909b3ebf09b20b0604 | 1e5c874a1e72501ae9c6998ec02c40a4fca615a6 | /processSyncMessage.ino | 5431e3b9bc844c6feb24cae7328121c2d35ac5b5 | [
"MIT"
] | permissive | morlac/GLCD_Clock | 7cdf2140e7a09b498443734b80f36506fb9cefcd | 3a2d846b3d6dd44e821fdc6b07f3cdfcc0594d71 | refs/heads/master | 2021-01-19T00:08:14.699075 | 2015-08-05T18:46:34 | 2015-08-05T18:46:34 | 40,262,250 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,659 | ino | #define TIME_MSG_LEN 11 // time sync to PC is HEADER followed by Unix time_t as ten ASCII digits
#define TIME_HEADER 'T' // Header tag for serial time sync message
/*
echo T$(($(date +%s)+60*60)) > /dev/cu.usbserial-A1017SEK
echo T$(($(date +%s))) > /dev/tty.usbserial-A1017SEK
*/
#define TIMEZONE_MSG_LEN 4
#define TIMEZONE_HEADER 'Z'
/*
echo Z+01 > /dev/cu.usbserial-A1017SEK
*/
void processSyncMessage() {
// if time sync available from serial port, update time and return true
while(Serial.available()) {
char c = Serial.read();
#ifdef DEBUG
Serial.print(c);
#endif
if (c == TIME_HEADER) {
uint32_t pctime = 0;
for (uint8_t i=TIME_MSG_LEN; i>0; i--) {
c = Serial.read();
if (c >= '0' && c <= '9') {
pctime = (10 * pctime) + (c - '0'); // convert digits to a number
}
}
/*
pctime = Serial.parseInt();
*/
RTC.set(pctime);
setTime(pctime);
#ifdef DEBUG
Serial.println(RTC.get());
#endif
} else if (c == TIMEZONE_HEADER) {
uint8_t NewTimeZone = 0;
int8_t TZ_Neg = 1;
// uses less space in flash than Serial.parseInt()
for (uint8_t i=TIMEZONE_MSG_LEN; i>0; i--) {
c = Serial.read();
if (c >= '0' && c <= '9') {
NewTimeZone = (10 * NewTimeZone) + (c - '0');
} else if (c == '-') {
TZ_Neg = -1;
}
}
NewTimeZone *= TZ_Neg;
/*
NewTimeZone = Serial.parseInt();
*/
while (!eeprom_is_ready());
eeprom_write_word((uint16_t*)TimeZoneAddr, SECS_PER_HOUR * NewTimeZone);
#ifdef DEBUG
Serial.println(NewTimeZone);
#endif
}
}
}
| [
"morlac@morlac.de"
] | morlac@morlac.de |
60976e1e7e68815b447d01e112cbde5f529c3716 | 50a7537288b25cf9208e4f123a5f96eb97b190e4 | /chuong01/bai108.cpp | edf736e009c6ca8d38d8efd9d2ea82ae71f43bec | [] | no_license | huynh-vch/code_c | 3e5d47ba88cd8512d28128df74ae6217ea460653 | 60e7d31ef8208b26f6ac4ea9ce7cffbea3d4b149 | refs/heads/master | 2023-04-23T20:29:47.386195 | 2021-04-27T07:26:48 | 2021-04-27T07:26:48 | 333,358,599 | 0 | 0 | null | 2021-04-27T07:26:49 | 2021-01-27T08:51:18 | C++ | UTF-8 | C++ | false | false | 448 | cpp | #include <iostream>
#include <math.h>
using namespace std;
int main()
{
cout << "Bai 108: " << endl;
int x;
cout << "x = ";
cin >> x;
float S = 0;
float T = 1;
float M = 1;
int i = 1;
float e = 1;
while (e >= pow(10, (-6)))
{
T = T * x;
M = M * i;
e = T / M;
S = e + S;
i = i + 1;
}
cout << "e mu x = " << e << endl;
system("pause");
return 1;
} | [
"20520015@gm.uit.edu.vn"
] | 20520015@gm.uit.edu.vn |
26c2b87e1621a5bcc4225d6ac2c04fd20b4a50e3 | d85b1f3ce9a3c24ba158ca4a51ea902d152ef7b9 | /testcases/CWE476_NULL_Pointer_Dereference/CWE476_NULL_Pointer_Dereference__int_74a.cpp | ddda98ac1c4e53b06bb4ab0fe2883620d282094e | [] | no_license | arichardson/juliet-test-suite-c | cb71a729716c6aa8f4b987752272b66b1916fdaa | e2e8cf80cd7d52f824e9a938bbb3aa658d23d6c9 | refs/heads/master | 2022-12-10T12:05:51.179384 | 2022-11-17T15:41:30 | 2022-12-01T15:25:16 | 179,281,349 | 34 | 34 | null | 2022-12-01T15:25:18 | 2019-04-03T12:03:21 | null | UTF-8 | C++ | false | false | 2,727 | cpp | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE476_NULL_Pointer_Dereference__int_74a.cpp
Label Definition File: CWE476_NULL_Pointer_Dereference.label.xml
Template File: sources-sinks-74a.tmpl.cpp
*/
/*
* @description
* CWE: 476 NULL Pointer Dereference
* BadSource: Set data to NULL
* GoodSource: Initialize data
* Sinks:
* GoodSink: Check for NULL before attempting to print data
* BadSink : Print data
* Flow Variant: 74 Data flow: data passed in a map from one function to another in different source files
*
* */
#include "std_testcase.h"
#include <map>
#include <wchar.h>
using namespace std;
namespace CWE476_NULL_Pointer_Dereference__int_74
{
#ifndef OMITBAD
/* bad function declaration */
void badSink(map<int, int *> dataMap);
void bad()
{
int * data;
map<int, int *> dataMap;
/* POTENTIAL FLAW: Set data to NULL */
data = NULL;
/* Put data in a map */
dataMap[0] = data;
dataMap[1] = data;
dataMap[2] = data;
badSink(dataMap);
}
#endif /* OMITBAD */
#ifndef OMITGOOD
/* goodG2B uses the GoodSource with the BadSink */
void goodG2BSink(map<int, int *> dataMap);
static void goodG2B()
{
int * data;
int tmpData = 5;
map<int, int *> dataMap;
/* FIX: Initialize data */
{
data = &tmpData;
}
/* Put data in a map */
dataMap[0] = data;
dataMap[1] = data;
dataMap[2] = data;
goodG2BSink(dataMap);
}
/* goodB2G uses the BadSource with the GoodSink */
void goodB2GSink(map<int, int *> dataMap);
static void goodB2G()
{
int * data;
map<int, int *> dataMap;
/* POTENTIAL FLAW: Set data to NULL */
data = NULL;
dataMap[0] = data;
dataMap[1] = data;
dataMap[2] = data;
goodB2GSink(dataMap);
}
void good()
{
goodG2B();
goodB2G();
}
#endif /* OMITGOOD */
} /* close namespace */
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
#ifdef INCLUDEMAIN
using namespace CWE476_NULL_Pointer_Dereference__int_74; /* so that we can use good and bad easily */
int main(int argc, char * argv[])
{
/* seed randomness */
srand( (unsigned)time(NULL) );
#ifndef OMITGOOD
printLine("Calling good()...");
good();
printLine("Finished good()");
#endif /* OMITGOOD */
#ifndef OMITBAD
printLine("Calling bad()...");
bad();
printLine("Finished bad()");
#endif /* OMITBAD */
return 0;
}
#endif
| [
"Alexander.Richardson@cl.cam.ac.uk"
] | Alexander.Richardson@cl.cam.ac.uk |
383733945e2292304ff1e0bc4e9dd9dbc71d12c8 | 6ee33e71f489e53f3f88fc7108ad9d8c07a80733 | /PythonProject/wrapped.h | cbc5e4cd02ff2a2ea67050230399b88bcbeb71bd | [] | no_license | eren-kemer/BakkesMod2-Plugins | 41bfcf98b6ad6dde07443f985f9f46700112d748 | 869003f79944d366bdf7fbb6b2a35c1bd2e36012 | refs/heads/master | 2021-12-02T16:16:30.130868 | 2021-05-04T13:22:34 | 2021-05-04T13:22:34 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 141,762 | h | #pragma once
#define BOOST_PYTHON_STATIC_LIB
#include "boost/python/detail/wrap_python.hpp"
#include <boost/python.hpp>
#include "bakkesmod/wrappers/includes.h"
#include "bakkesmod/wrappers/replayserverwrapper.h"
#include "bakkesmod/wrappers/arraywrapper.h"
using namespace boost::python;
//BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(log_overloads, ConsoleWrapper::log, 1, 2);
//BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(set_angular_overloads, ActorWrapper::SetAngularVelocity, 1, 2);
void (CVarWrapper::*setString)(string) = &CVarWrapper::setValue;
void (CVarWrapper::*setInt)(int) = &CVarWrapper::setValue;
void (CVarWrapper::*setFloat)(float) = &CVarWrapper::setValue;
//class Helpers {};
struct unusedbutneededtocompile {
public:
unusedbutneededtocompile() {}
ArrayWrapper<ActorWrapper> aaa = ArrayWrapper<ActorWrapper>(uintptr_t(NULL));
ArrayWrapper<TeamWrapper> aab = ArrayWrapper<TeamWrapper>(uintptr_t(NULL));
ArrayWrapper<CarWrapper> aac = ArrayWrapper<CarWrapper>(uintptr_t(NULL));
ArrayWrapper<BallWrapper> aad = ArrayWrapper<BallWrapper>(uintptr_t(NULL));
ArrayWrapper<PriWrapper> aae = ArrayWrapper<PriWrapper>(uintptr_t(NULL));
ArrayWrapper<WheelWrapper> aaf = ArrayWrapper<WheelWrapper>(uintptr_t(NULL));
ArrayWrapper<RBActorWrapper> aag = ArrayWrapper<RBActorWrapper>(uintptr_t(NULL));
ArrayWrapper<CarComponentWrapper> aah = ArrayWrapper<CarComponentWrapper>(uintptr_t(NULL));
ArrayWrapper<GoalWrapper> aai = ArrayWrapper<GoalWrapper>(uintptr_t(NULL));
};
#define PYTHON_ARRAY(WrappedArrayClass) \
class_<ArrayWrapper<WrappedArrayClass>, boost::noncopyable>("ArrayWrapper#WrappedArrayClass", no_init).\
def("Count", &ArrayWrapper<WrappedArrayClass>::Count).\
def("Get", &ArrayWrapper<WrappedArrayClass>::Get);
//#define PYTHON_ARRAY(WrappedArrayClass) \
// class_<ArrayWrapper WrappedArrayClass>, ArrayWrapper<class WrappedArrayClass>, ArrayWrapper<WrappedArrayClass>*, boost::noncopyable>("ArrayWrapper#WrappedArrayClass", no_init).\
// def("Count", &ArrayWrapper<class WrappedArrayClass>::Count).\
// def("Get", &ArrayWrapper<class WrappedArrayClass>::Get);
BOOST_PYTHON_MODULE(bakkesmod)
{
class_<BakPy>("BakPy", no_init).
def("SetTimeout", &BakPy::set_timeout).
def("VectorToRotator", VectorToRotator).staticmethod("VectorToRotator").
def("RotatorToVector", RotatorToVector).staticmethod("RotatorToVector");;//.staticmethod("set_timeout");
//class_<Helpers>("Helpers").
// def("get_safe_float_range", get_safe_float_range).staticmethod("get_safe_float_range").
// def("get_safe_float_range_exclude", get_safe_float_range_exclude).staticmethod("get_safe_float_range_exclude").
// def("get_safe_float", get_safe_float).staticmethod("get_safe_float").
// def("get_safe_int", get_safe_int).staticmethod("get_safe_int").
// def("file_exists", file_exists).staticmethod("file_exists").
// def("is_number", is_number).staticmethod("is_number");
//class_<LogLevel>("LogLevel", no_init).
// def_readwrite("r", &LogLevel::r).
// def_readwrite("g", &LogLevel::g).
// def_readwrite("b", &LogLevel::b).
// def_readwrite("a", &LogLevel::a);
class_<CVarWrapper>("CVarWrapper", no_init).
def("GetCvarName", &CVarWrapper::getCVarName).
def("GetIntValue", &CVarWrapper::getIntValue).
def("GetFloatValue", &CVarWrapper::getFloatValue).
def("GetBoolValue", &CVarWrapper::getBoolValue).
def("GetStringValue", &CVarWrapper::getStringValue).
def("GetDescription", &CVarWrapper::getDescription).
def("Notify", &CVarWrapper::notify).
def("SetValue", setString).
def("SetValue", setInt).
def("SetValue", setFloat);
class_<CVarManagerWrapper>("CVarManagerWrapper", no_init).
def("ExecuteCommand", &CVarManagerWrapper::executeCommand).
//.def("register_notifier", CVarManagerWrapper::registerNotifier). //No need to give acces to this as t heyre C++ callbacks and python scripts should have standalone functions
def("RegisterCvar", &CVarManagerWrapper::registerCvar).
def("Log", &CVarManagerWrapper::log).
def("GetCvar", &CVarManagerWrapper::getCvar);
class_<GameWrapper, boost::noncopyable>("GameWrapper", no_init).
def("IsInTutorial", &GameWrapper::IsInTutorial).
def("IsInReplay", &GameWrapper::IsInReplay).
def("IsInCustomTraining", &GameWrapper::IsInCustomTraining).
//def("get_game_event", &GameWrapper::GetGameEvent).
def("GetGameEventAsTutorial", &GameWrapper::GetGameEventAsTutorial).
def("GetGameEventAsServer", &GameWrapper::GetGameEventAsServer).
def("GetGameEventAsReplay", &GameWrapper::GetGameEventAsReplay).
def("GetLocalCar", &GameWrapper::GetLocalCar).
def("GetCamera", &GameWrapper::GetCamera).
//def("set_timeout", &GameWrapper::SetTimeout). //time in MS
def("Execute", &GameWrapper::Execute). //Use this when calling from a different thread
def("RegisterDrawable", &GameWrapper::RegisterDrawable).
def("GetFNameByIndex", &GameWrapper::GetFNameByIndex);
//def("get_solid_hook", &GameWrapper::GetSolidHook).
//def("get_calculator", &GameWrapper::GetCalculator);
class_<PredictionInfo>("PredictionInfo").
def(init<>()).
def_readwrite("Time", &PredictionInfo::Time).
def_readwrite("Location", &PredictionInfo::Location).
def_readwrite("Velocity", &PredictionInfo::Velocity)/*.
def_readwrite("HitWall", &PredictionInfo::HitWall).
def_readwrite("HitFloor", &PredictionInfo::HitFloor)*/;
class_<POV>("POV").
def(init<>()).
def_readwrite("location", &POV::location).
def_readwrite("rotation", &POV::rotation).
def_readwrite("fov", &POV::FOV);
class_<Vector2>("Vector2").
def(init<>()).
def_readwrite("x", &Vector2::X).
def_readwrite("y", &Vector2::Y);
class_<Vector>("Vector").
def(init<float, float, float>()).
def(init<float>()).
def(init<>()).
def_readwrite("X", &Vector::X).
def_readwrite("Y", &Vector::Y).
def_readwrite("Z", &Vector::Z).
def(self + Vector()).
def(self - Vector()).
def(self * Vector()).
def(self / Vector()).
def("Magnitude", &Vector::magnitude).
def("Normalize", &Vector::normalize).
def("Clone", &Vector::clone).
def("Dot", &Vector::dot).
def("Cross", &Vector::cross).
def("Lerp", &Vector::lerp).
def("Slerp", &Vector::slerp);
class_<Rotator>("Rotator").
def(init<float, float, float>()).
def(init<float>()).
def(init<>()).
def_readwrite("pitch", &Rotator::Pitch).
def_readwrite("yaw", &Rotator::Yaw).
def_readwrite("roll", &Rotator::Roll).
def(self + Rotator()).
def(self - Rotator()).
def(self * Rotator()).
def(self / Rotator());
class_<ObjectWrapper>("ObjectWrapper", no_init);
class_<ActorWrapper, bases<ObjectWrapper>>("ActorWrapper", no_init).
def("GetVelocity", &ActorWrapper::GetVelocity).
def("SetVelocity", &ActorWrapper::SetVelocity).
def("GetLocation", &ActorWrapper::GetLocation).
def("SetLocation", &ActorWrapper::SetLocation).
def("GetVelocity", &ActorWrapper::GetVelocity).
def("SetVelocity", &ActorWrapper::SetVelocity).
def("AddVelocity", &ActorWrapper::AddVelocity).
def("GetRotation", &ActorWrapper::GetRotation).
def("SetRotation", &ActorWrapper::SetRotation).
def("SetTorque", &ActorWrapper::SetTorque).
def("Stop", &ActorWrapper::Stop).
//def("freeze", &ActorWrapper::Freeze).
//def("is_hooked", &ActorWrapper::IsHooked).
def("GetAngularVelocity", &ActorWrapper::GetAngularVelocity).
def("SetAngularVelocity", &ActorWrapper::SetAngularVelocity).
def("IsNull", &ActorWrapper::IsNull).
def("GetDrawScale", &ActorWrapper::GetDrawScale).
def("SetDrawScale", &ActorWrapper::SetDrawScale).
def("GetDrawScale3D", &ActorWrapper::GetDrawScale3D).
def("SetDrawScale3D", &ActorWrapper::SetDrawScale3D).
def("GetPrePivot", &ActorWrapper::GetPrePivot).
def("SetPrePivot", &ActorWrapper::SetPrePivot).
def("GetCustomTimeDilation", &ActorWrapper::GetCustomTimeDilation).
def("SetCustomTimeDilation", &ActorWrapper::SetCustomTimeDilation).
def("GetPhysics", &ActorWrapper::GetPhysics).
def("SetPhysics", &ActorWrapper::SetPhysics).
def("GetRemoteRole", &ActorWrapper::GetRemoteRole).
def("SetRemoteRole", &ActorWrapper::SetRemoteRole).
def("GetRole", &ActorWrapper::GetRole).
def("SetRole", &ActorWrapper::SetRole).
def("GetCollisionType", &ActorWrapper::GetCollisionType).
def("SetCollisionType", &ActorWrapper::SetCollisionType).
def("GetReplicatedCollisionType", &ActorWrapper::GetReplicatedCollisionType).
def("SetReplicatedCollisionType", &ActorWrapper::SetReplicatedCollisionType).
def("GetOwner", &ActorWrapper::GetOwner).
def("GetBase", &ActorWrapper::GetBase).
def("GetbStatic", &ActorWrapper::GetbStatic).
def("GetbHidden", &ActorWrapper::GetbHidden).
def("GetbNoDelete", &ActorWrapper::GetbNoDelete).
def("SetbNoDelete", &ActorWrapper::SetbNoDelete).
def("GetbDeleteMe", &ActorWrapper::GetbDeleteMe).
def("SetbDeleteMe", &ActorWrapper::SetbDeleteMe).
def("GetbTicked", &ActorWrapper::GetbTicked).
def("SetbTicked", &ActorWrapper::SetbTicked).
def("GetbOnlyOwnerSee", &ActorWrapper::GetbOnlyOwnerSee).
def("SetbOnlyOwnerSee", &ActorWrapper::SetbOnlyOwnerSee).
def("GetbTickIsDisabled", &ActorWrapper::GetbTickIsDisabled).
def("SetbTickIsDisabled", &ActorWrapper::SetbTickIsDisabled).
def("GetbWorldGeometry", &ActorWrapper::GetbWorldGeometry).
def("SetbWorldGeometry", &ActorWrapper::SetbWorldGeometry).
def("GetbIgnoreRigidBodyPawns", &ActorWrapper::GetbIgnoreRigidBodyPawns).
def("SetbIgnoreRigidBodyPawns", &ActorWrapper::SetbIgnoreRigidBodyPawns).
def("GetbOrientOnSlope", &ActorWrapper::GetbOrientOnSlope).
def("SetbOrientOnSlope", &ActorWrapper::SetbOrientOnSlope).
def("GetbIsMoving", &ActorWrapper::GetbIsMoving).
def("GetbAlwaysEncroachCheck", &ActorWrapper::GetbAlwaysEncroachCheck).
def("SetbAlwaysEncroachCheck", &ActorWrapper::SetbAlwaysEncroachCheck).
def("GetbHasAlternateTargetLocation", &ActorWrapper::GetbHasAlternateTargetLocation).
def("GetbAlwaysRelevant", &ActorWrapper::GetbAlwaysRelevant).
def("GetbReplicateInstigator", &ActorWrapper::GetbReplicateInstigator).
def("GetbReplicateMovement", &ActorWrapper::GetbReplicateMovement).
def("GetbUpdateSimulatedPosition", &ActorWrapper::GetbUpdateSimulatedPosition).
def("SetbUpdateSimulatedPosition", &ActorWrapper::SetbUpdateSimulatedPosition).
def("GetbDemoRecording", &ActorWrapper::GetbDemoRecording).
def("SetbDemoRecording", &ActorWrapper::SetbDemoRecording).
def("GetbDemoOwner", &ActorWrapper::GetbDemoOwner).
def("SetbDemoOwner", &ActorWrapper::SetbDemoOwner).
def("GetbForceDemoRelevant", &ActorWrapper::GetbForceDemoRelevant).
def("SetbForceDemoRelevant", &ActorWrapper::SetbForceDemoRelevant).
def("GetbNetInitialRotation", &ActorWrapper::GetbNetInitialRotation).
def("SetbNetInitialRotation", &ActorWrapper::SetbNetInitialRotation).
def("GetbReplicateRigidBodyLocation", &ActorWrapper::GetbReplicateRigidBodyLocation).
def("SetbReplicateRigidBodyLocation", &ActorWrapper::SetbReplicateRigidBodyLocation).
def("GetbKillDuringLevelTransition", &ActorWrapper::GetbKillDuringLevelTransition).
def("SetbKillDuringLevelTransition", &ActorWrapper::SetbKillDuringLevelTransition).
def("GetbPostRenderIfNotVisible", &ActorWrapper::GetbPostRenderIfNotVisible).
def("SetbPostRenderIfNotVisible", &ActorWrapper::SetbPostRenderIfNotVisible).
def("GetbForceNetUpdate", &ActorWrapper::GetbForceNetUpdate).
def("SetbForceNetUpdate", &ActorWrapper::SetbForceNetUpdate).
def("GetbForcePacketUpdate", &ActorWrapper::GetbForcePacketUpdate).
def("SetbForcePacketUpdate", &ActorWrapper::SetbForcePacketUpdate).
def("GetbPendingNetUpdate", &ActorWrapper::GetbPendingNetUpdate).
def("SetbPendingNetUpdate", &ActorWrapper::SetbPendingNetUpdate).
def("GetbGameRelevant", &ActorWrapper::GetbGameRelevant).
def("SetbGameRelevant", &ActorWrapper::SetbGameRelevant).
def("GetbMovable", &ActorWrapper::GetbMovable).
def("SetbMovable", &ActorWrapper::SetbMovable).
def("GetbCanTeleport", &ActorWrapper::GetbCanTeleport).
def("SetbCanTeleport", &ActorWrapper::SetbCanTeleport).
def("GetbAlwaysTick", &ActorWrapper::GetbAlwaysTick).
def("SetbAlwaysTick", &ActorWrapper::SetbAlwaysTick).
def("GetbBlocksNavigation", &ActorWrapper::GetbBlocksNavigation).
def("SetbBlocksNavigation", &ActorWrapper::SetbBlocksNavigation).
def("GetBlockRigidBody", &ActorWrapper::GetBlockRigidBody).
def("SetBlockRigidBody", &ActorWrapper::SetBlockRigidBody).
def("GetbCollideWhenPlacing", &ActorWrapper::GetbCollideWhenPlacing).
def("SetbCollideWhenPlacing", &ActorWrapper::SetbCollideWhenPlacing).
def("GetbCollideActors", &ActorWrapper::GetbCollideActors).
def("SetbCollideActors", &ActorWrapper::SetbCollideActors).
def("GetbCollideWorld", &ActorWrapper::GetbCollideWorld).
def("SetbCollideWorld", &ActorWrapper::SetbCollideWorld).
def("GetbCollideComplex", &ActorWrapper::GetbCollideComplex).
def("SetbCollideComplex", &ActorWrapper::SetbCollideComplex).
def("GetbBlockActors", &ActorWrapper::GetbBlockActors).
def("SetbBlockActors", &ActorWrapper::SetbBlockActors).
def("GetbBlocksTeleport", &ActorWrapper::GetbBlocksTeleport).
def("SetbBlocksTeleport", &ActorWrapper::SetbBlocksTeleport).
def("GetbPhysRigidBodyOutOfWorldCheck", &ActorWrapper::GetbPhysRigidBodyOutOfWorldCheck).
def("SetbPhysRigidBodyOutOfWorldCheck", &ActorWrapper::SetbPhysRigidBodyOutOfWorldCheck).
def("GetbComponentOutsideWorld", &ActorWrapper::GetbComponentOutsideWorld).
def("GetbRigidBodyWasAwake", &ActorWrapper::GetbRigidBodyWasAwake).
def("SetbRigidBodyWasAwake", &ActorWrapper::SetbRigidBodyWasAwake).
def("GetbCallRigidBodyWakeEvents", &ActorWrapper::GetbCallRigidBodyWakeEvents).
def("SetbCallRigidBodyWakeEvents", &ActorWrapper::SetbCallRigidBodyWakeEvents).
def("GetbBounce", &ActorWrapper::GetbBounce).
def("SetbBounce", &ActorWrapper::SetbBounce).
def("GetbEditable", &ActorWrapper::GetbEditable).
def("SetbEditable", &ActorWrapper::SetbEditable).
def("GetbLockLocation", &ActorWrapper::GetbLockLocation).
def("SetbLockLocation", &ActorWrapper::SetbLockLocation).
def("GetNetUpdateTime", &ActorWrapper::GetNetUpdateTime).
def("SetNetUpdateTime", &ActorWrapper::SetNetUpdateTime).
def("GetNetUpdateFrequency", &ActorWrapper::GetNetUpdateFrequency).
def("SetNetUpdateFrequency", &ActorWrapper::SetNetUpdateFrequency).
def("GetNetPriority", &ActorWrapper::GetNetPriority).
def("SetNetPriority", &ActorWrapper::SetNetPriority).
def("GetLastNetUpdateTime", &ActorWrapper::GetLastNetUpdateTime).
def("GetLastForcePacketUpdateTime", &ActorWrapper::GetLastForcePacketUpdateTime).
def("SetLastForcePacketUpdateTime", &ActorWrapper::SetLastForcePacketUpdateTime).
def("GetTimeSinceLastTick", &ActorWrapper::GetTimeSinceLastTick).
def("GetLifeSpan", &ActorWrapper::GetLifeSpan).
def("GetCreationTime", &ActorWrapper::GetCreationTime).
def("GetLastRenderTime", &ActorWrapper::GetLastRenderTime).
def("GetHiddenEditorViews", &ActorWrapper::GetHiddenEditorViews).
def("SetHiddenEditorViews", &ActorWrapper::SetHiddenEditorViews).
def("GetCollisionComponent", &ActorWrapper::GetCollisionComponent);
class_<PrimitiveComponentWrapper, bases<ObjectWrapper>>("PrimitiveComponentWrapper", no_init).
def("GetRBChannel", &PrimitiveComponentWrapper::GetRBChannel).
def("SetRBChannel", &PrimitiveComponentWrapper::SetRBChannel).
def("GetRBDominanceGroup", &PrimitiveComponentWrapper::GetRBDominanceGroup).
def("SetRBDominanceGroup", &PrimitiveComponentWrapper::SetRBDominanceGroup).
def("GetbOnlyBlockActorMovement", &PrimitiveComponentWrapper::GetbOnlyBlockActorMovement).
def("SetbOnlyBlockActorMovement", &PrimitiveComponentWrapper::SetbOnlyBlockActorMovement).
def("GetHiddenGame", &PrimitiveComponentWrapper::GetHiddenGame).
def("SetHiddenGame", &PrimitiveComponentWrapper::SetHiddenGame).
def("GetbOwnerNoSee", &PrimitiveComponentWrapper::GetbOwnerNoSee).
def("SetbOwnerNoSee", &PrimitiveComponentWrapper::SetbOwnerNoSee).
def("GetbOnlyOwnerSee", &PrimitiveComponentWrapper::GetbOnlyOwnerSee).
def("SetbOnlyOwnerSee", &PrimitiveComponentWrapper::SetbOnlyOwnerSee).
def("GetbIgnoreOwnerHidden", &PrimitiveComponentWrapper::GetbIgnoreOwnerHidden).
def("SetbIgnoreOwnerHidden", &PrimitiveComponentWrapper::SetbIgnoreOwnerHidden).
def("GetbUseAsOccluder", &PrimitiveComponentWrapper::GetbUseAsOccluder).
def("SetbUseAsOccluder", &PrimitiveComponentWrapper::SetbUseAsOccluder).
def("GetbAllowApproximateOcclusion", &PrimitiveComponentWrapper::GetbAllowApproximateOcclusion).
def("SetbAllowApproximateOcclusion", &PrimitiveComponentWrapper::SetbAllowApproximateOcclusion).
def("GetbFirstFrameOcclusion", &PrimitiveComponentWrapper::GetbFirstFrameOcclusion).
def("SetbFirstFrameOcclusion", &PrimitiveComponentWrapper::SetbFirstFrameOcclusion).
def("GetbIgnoreNearPlaneIntersection", &PrimitiveComponentWrapper::GetbIgnoreNearPlaneIntersection).
def("SetbIgnoreNearPlaneIntersection", &PrimitiveComponentWrapper::SetbIgnoreNearPlaneIntersection).
def("GetbAcceptsStaticDecals", &PrimitiveComponentWrapper::GetbAcceptsStaticDecals).
def("GetbAcceptsDynamicDecals", &PrimitiveComponentWrapper::GetbAcceptsDynamicDecals).
def("GetbIsRefreshingDecals", &PrimitiveComponentWrapper::GetbIsRefreshingDecals).
def("GetCastShadow", &PrimitiveComponentWrapper::GetCastShadow).
def("SetCastShadow", &PrimitiveComponentWrapper::SetCastShadow).
def("GetbForceDirectLightMap", &PrimitiveComponentWrapper::GetbForceDirectLightMap).
def("SetbForceDirectLightMap", &PrimitiveComponentWrapper::SetbForceDirectLightMap).
def("GetbCastDynamicShadow", &PrimitiveComponentWrapper::GetbCastDynamicShadow).
def("SetbCastDynamicShadow", &PrimitiveComponentWrapper::SetbCastDynamicShadow).
def("GetbCastStaticShadow", &PrimitiveComponentWrapper::GetbCastStaticShadow).
def("SetbCastStaticShadow", &PrimitiveComponentWrapper::SetbCastStaticShadow).
def("GetbSelfShadowOnly", &PrimitiveComponentWrapper::GetbSelfShadowOnly).
def("SetbSelfShadowOnly", &PrimitiveComponentWrapper::SetbSelfShadowOnly).
def("GetbNoModSelfShadow", &PrimitiveComponentWrapper::GetbNoModSelfShadow).
def("SetbNoModSelfShadow", &PrimitiveComponentWrapper::SetbNoModSelfShadow).
def("GetbAcceptsDynamicDominantLightShadows", &PrimitiveComponentWrapper::GetbAcceptsDynamicDominantLightShadows).
def("SetbAcceptsDynamicDominantLightShadows", &PrimitiveComponentWrapper::SetbAcceptsDynamicDominantLightShadows).
def("GetbCastHiddenShadow", &PrimitiveComponentWrapper::GetbCastHiddenShadow).
def("SetbCastHiddenShadow", &PrimitiveComponentWrapper::SetbCastHiddenShadow).
def("GetbCastShadowAsTwoSided", &PrimitiveComponentWrapper::GetbCastShadowAsTwoSided).
def("SetbCastShadowAsTwoSided", &PrimitiveComponentWrapper::SetbCastShadowAsTwoSided).
def("GetbAcceptsLights", &PrimitiveComponentWrapper::GetbAcceptsLights).
def("SetbAcceptsLights", &PrimitiveComponentWrapper::SetbAcceptsLights).
def("GetbAcceptsDynamicLights", &PrimitiveComponentWrapper::GetbAcceptsDynamicLights).
def("SetbAcceptsDynamicLights", &PrimitiveComponentWrapper::SetbAcceptsDynamicLights).
def("GetbUseOnePassLightingOnTranslucency", &PrimitiveComponentWrapper::GetbUseOnePassLightingOnTranslucency).
def("SetbUseOnePassLightingOnTranslucency", &PrimitiveComponentWrapper::SetbUseOnePassLightingOnTranslucency).
def("GetbUsePrecomputedShadows", &PrimitiveComponentWrapper::GetbUsePrecomputedShadows).
def("GetbHasExplicitShadowParent", &PrimitiveComponentWrapper::GetbHasExplicitShadowParent).
def("GetCollideActors", &PrimitiveComponentWrapper::GetCollideActors).
def("SetCollideActors", &PrimitiveComponentWrapper::SetCollideActors).
def("GetAlwaysCheckCollision", &PrimitiveComponentWrapper::GetAlwaysCheckCollision).
def("SetAlwaysCheckCollision", &PrimitiveComponentWrapper::SetAlwaysCheckCollision).
def("GetBlockActors", &PrimitiveComponentWrapper::GetBlockActors).
def("SetBlockActors", &PrimitiveComponentWrapper::SetBlockActors).
def("GetBlockZeroExtent", &PrimitiveComponentWrapper::GetBlockZeroExtent).
def("SetBlockZeroExtent", &PrimitiveComponentWrapper::SetBlockZeroExtent).
def("GetBlockNonZeroExtent", &PrimitiveComponentWrapper::GetBlockNonZeroExtent).
def("SetBlockNonZeroExtent", &PrimitiveComponentWrapper::SetBlockNonZeroExtent).
def("GetCanBlockCamera", &PrimitiveComponentWrapper::GetCanBlockCamera).
def("SetCanBlockCamera", &PrimitiveComponentWrapper::SetCanBlockCamera).
def("GetBlockRigidBody", &PrimitiveComponentWrapper::GetBlockRigidBody).
def("SetBlockRigidBody", &PrimitiveComponentWrapper::SetBlockRigidBody).
def("GetbBlockFootPlacement", &PrimitiveComponentWrapper::GetbBlockFootPlacement).
def("SetbBlockFootPlacement", &PrimitiveComponentWrapper::SetbBlockFootPlacement).
def("GetbDisableAllRigidBody", &PrimitiveComponentWrapper::GetbDisableAllRigidBody).
def("SetbDisableAllRigidBody", &PrimitiveComponentWrapper::SetbDisableAllRigidBody).
def("GetbSkipRBGeomCreation", &PrimitiveComponentWrapper::GetbSkipRBGeomCreation).
def("SetbSkipRBGeomCreation", &PrimitiveComponentWrapper::SetbSkipRBGeomCreation).
def("GetbNotifyRigidBodyCollision", &PrimitiveComponentWrapper::GetbNotifyRigidBodyCollision).
def("SetbNotifyRigidBodyCollision", &PrimitiveComponentWrapper::SetbNotifyRigidBodyCollision).
def("GetbFluidDrain", &PrimitiveComponentWrapper::GetbFluidDrain).
def("SetbFluidDrain", &PrimitiveComponentWrapper::SetbFluidDrain).
def("GetbFluidTwoWay", &PrimitiveComponentWrapper::GetbFluidTwoWay).
def("SetbFluidTwoWay", &PrimitiveComponentWrapper::SetbFluidTwoWay).
def("GetbIgnoreRadialImpulse", &PrimitiveComponentWrapper::GetbIgnoreRadialImpulse).
def("SetbIgnoreRadialImpulse", &PrimitiveComponentWrapper::SetbIgnoreRadialImpulse).
def("GetbIgnoreRadialForce", &PrimitiveComponentWrapper::GetbIgnoreRadialForce).
def("SetbIgnoreRadialForce", &PrimitiveComponentWrapper::SetbIgnoreRadialForce).
def("GetbIgnoreForceField", &PrimitiveComponentWrapper::GetbIgnoreForceField).
def("SetbIgnoreForceField", &PrimitiveComponentWrapper::SetbIgnoreForceField).
def("GetbUseCompartment", &PrimitiveComponentWrapper::GetbUseCompartment).
def("SetbUseCompartment", &PrimitiveComponentWrapper::SetbUseCompartment).
def("GetAlwaysLoadOnClient", &PrimitiveComponentWrapper::GetAlwaysLoadOnClient).
def("SetAlwaysLoadOnClient", &PrimitiveComponentWrapper::SetAlwaysLoadOnClient).
def("GetAlwaysLoadOnServer", &PrimitiveComponentWrapper::GetAlwaysLoadOnServer).
def("SetAlwaysLoadOnServer", &PrimitiveComponentWrapper::SetAlwaysLoadOnServer).
def("GetbIgnoreHiddenActorsMembership", &PrimitiveComponentWrapper::GetbIgnoreHiddenActorsMembership).
def("SetbIgnoreHiddenActorsMembership", &PrimitiveComponentWrapper::SetbIgnoreHiddenActorsMembership).
def("GetAbsoluteTranslation", &PrimitiveComponentWrapper::GetAbsoluteTranslation).
def("SetAbsoluteTranslation", &PrimitiveComponentWrapper::SetAbsoluteTranslation).
def("GetAbsoluteRotation", &PrimitiveComponentWrapper::GetAbsoluteRotation).
def("SetAbsoluteRotation", &PrimitiveComponentWrapper::SetAbsoluteRotation).
def("GetAbsoluteScale", &PrimitiveComponentWrapper::GetAbsoluteScale).
def("SetAbsoluteScale", &PrimitiveComponentWrapper::SetAbsoluteScale).
def("GetVisibilityId", &PrimitiveComponentWrapper::GetVisibilityId).
def("SetVisibilityId", &PrimitiveComponentWrapper::SetVisibilityId).
def("GetTranslation", &PrimitiveComponentWrapper::GetTranslation).
def("SetTranslation", &PrimitiveComponentWrapper::SetTranslation).
def("GetRotation", &PrimitiveComponentWrapper::GetRotation).
def("SetRotation", &PrimitiveComponentWrapper::SetRotation).
def("GetScale", &PrimitiveComponentWrapper::GetScale).
def("SetScale", &PrimitiveComponentWrapper::SetScale).
def("GetScale3D", &PrimitiveComponentWrapper::GetScale3D).
def("SetScale3D", &PrimitiveComponentWrapper::SetScale3D).
def("GetBoundsScale", &PrimitiveComponentWrapper::GetBoundsScale).
def("SetBoundsScale", &PrimitiveComponentWrapper::SetBoundsScale).
def("SetLastSubmitTime", &PrimitiveComponentWrapper::SetLastSubmitTime).
def("GetLastRenderTime", &PrimitiveComponentWrapper::GetLastRenderTime).
def("GetScriptRigidBodyCollisionThreshold", &PrimitiveComponentWrapper::GetScriptRigidBodyCollisionThreshold).
def("SetScriptRigidBodyCollisionThreshold", &PrimitiveComponentWrapper::SetScriptRigidBodyCollisionThreshold);
class_<PlayerReplicationInfoWrapper, bases<ActorWrapper>>("PlayerReplicationInfoWrapper", no_init).
def("GetScore", &PlayerReplicationInfoWrapper::GetScore).
def("SetScore", &PlayerReplicationInfoWrapper::SetScore).
def("GetDeaths", &PlayerReplicationInfoWrapper::GetDeaths).
def("SetDeaths", &PlayerReplicationInfoWrapper::SetDeaths).
def("GetPing", &PlayerReplicationInfoWrapper::GetPing).
def("SetPing", &PlayerReplicationInfoWrapper::SetPing).
def("GetTTSSpeaker", &PlayerReplicationInfoWrapper::GetTTSSpeaker).
def("SetTTSSpeaker", &PlayerReplicationInfoWrapper::SetTTSSpeaker).
def("GetNumLives", &PlayerReplicationInfoWrapper::GetNumLives).
def("SetNumLives", &PlayerReplicationInfoWrapper::SetNumLives).
def("GetPlayerName", &PlayerReplicationInfoWrapper::GetPlayerName).
def("GetOldName", &PlayerReplicationInfoWrapper::GetOldName).
def("GetPlayerID", &PlayerReplicationInfoWrapper::GetPlayerID).
def("SetPlayerID", &PlayerReplicationInfoWrapper::SetPlayerID).
def("GetbAdmin", &PlayerReplicationInfoWrapper::GetbAdmin).
def("SetbAdmin", &PlayerReplicationInfoWrapper::SetbAdmin).
def("GetbIsSpectator", &PlayerReplicationInfoWrapper::GetbIsSpectator).
def("SetbIsSpectator", &PlayerReplicationInfoWrapper::SetbIsSpectator).
def("GetbOnlySpectator", &PlayerReplicationInfoWrapper::GetbOnlySpectator).
def("SetbOnlySpectator", &PlayerReplicationInfoWrapper::SetbOnlySpectator).
def("GetbWaitingPlayer", &PlayerReplicationInfoWrapper::GetbWaitingPlayer).
def("SetbWaitingPlayer", &PlayerReplicationInfoWrapper::SetbWaitingPlayer).
def("GetbReadyToPlay", &PlayerReplicationInfoWrapper::GetbReadyToPlay).
def("SetbReadyToPlay", &PlayerReplicationInfoWrapper::SetbReadyToPlay).
def("GetbOutOfLives", &PlayerReplicationInfoWrapper::GetbOutOfLives).
def("SetbOutOfLives", &PlayerReplicationInfoWrapper::SetbOutOfLives).
def("GetbBot", &PlayerReplicationInfoWrapper::GetbBot).
def("SetbBot", &PlayerReplicationInfoWrapper::SetbBot).
def("GetbHasBeenWelcomed", &PlayerReplicationInfoWrapper::GetbHasBeenWelcomed).
def("SetbHasBeenWelcomed", &PlayerReplicationInfoWrapper::SetbHasBeenWelcomed).
def("GetbIsInactive", &PlayerReplicationInfoWrapper::GetbIsInactive).
def("SetbIsInactive", &PlayerReplicationInfoWrapper::SetbIsInactive).
def("GetbFromPreviousLevel", &PlayerReplicationInfoWrapper::GetbFromPreviousLevel).
def("SetbFromPreviousLevel", &PlayerReplicationInfoWrapper::SetbFromPreviousLevel).
def("GetbTimedOut", &PlayerReplicationInfoWrapper::GetbTimedOut).
def("SetbTimedOut", &PlayerReplicationInfoWrapper::SetbTimedOut).
def("GetbUnregistered", &PlayerReplicationInfoWrapper::GetbUnregistered).
def("SetbUnregistered", &PlayerReplicationInfoWrapper::SetbUnregistered).
def("GetStartTime", &PlayerReplicationInfoWrapper::GetStartTime).
def("SetStartTime", &PlayerReplicationInfoWrapper::SetStartTime).
def("GetStringSpectating", &PlayerReplicationInfoWrapper::GetStringSpectating).
def("GetStringUnknown", &PlayerReplicationInfoWrapper::GetStringUnknown).
def("GetKills", &PlayerReplicationInfoWrapper::GetKills).
def("SetKills", &PlayerReplicationInfoWrapper::SetKills).
def("GetExactPing", &PlayerReplicationInfoWrapper::GetExactPing).
def("SetExactPing", &PlayerReplicationInfoWrapper::SetExactPing).
def("GetSavedNetworkAddress", &PlayerReplicationInfoWrapper::GetSavedNetworkAddress).
def("GetUniqueId", &PlayerReplicationInfoWrapper::GetUniqueId).
def("SetUniqueId", &PlayerReplicationInfoWrapper::SetUniqueId);
class_<GameSettingPlaylistWrapper, bases<ObjectWrapper>>("GameSettingPlaylistWrapper", no_init).
def("GetTitle", &GameSettingPlaylistWrapper::GetTitle).
def("GetDescription", &GameSettingPlaylistWrapper::GetDescription).
def("GetPlayerCount", &GameSettingPlaylistWrapper::GetPlayerCount).
def("SetPlayerCount", &GameSettingPlaylistWrapper::SetPlayerCount).
def("GetbStandard", &GameSettingPlaylistWrapper::GetbStandard).
def("SetbStandard", &GameSettingPlaylistWrapper::SetbStandard).
def("GetbRanked", &GameSettingPlaylistWrapper::GetbRanked).
def("SetbRanked", &GameSettingPlaylistWrapper::SetbRanked).
def("GetbSolo", &GameSettingPlaylistWrapper::GetbSolo).
def("SetbSolo", &GameSettingPlaylistWrapper::SetbSolo).
def("GetbNew", &GameSettingPlaylistWrapper::GetbNew).
def("SetbNew", &GameSettingPlaylistWrapper::SetbNew).
def("GetbApplyQuitPenalty", &GameSettingPlaylistWrapper::GetbApplyQuitPenalty).
def("SetbApplyQuitPenalty", &GameSettingPlaylistWrapper::SetbApplyQuitPenalty).
def("GetbAllowForfeit", &GameSettingPlaylistWrapper::GetbAllowForfeit).
def("SetbAllowForfeit", &GameSettingPlaylistWrapper::SetbAllowForfeit).
def("GetbDisableRankedReconnect", &GameSettingPlaylistWrapper::GetbDisableRankedReconnect).
def("SetbDisableRankedReconnect", &GameSettingPlaylistWrapper::SetbDisableRankedReconnect).
def("GetbAllowClubs", &GameSettingPlaylistWrapper::GetbAllowClubs).
def("SetbAllowClubs", &GameSettingPlaylistWrapper::SetbAllowClubs).
def("GetbPlayersVSBots", &GameSettingPlaylistWrapper::GetbPlayersVSBots).
def("SetbPlayersVSBots", &GameSettingPlaylistWrapper::SetbPlayersVSBots).
def("GetPlaylistId", &GameSettingPlaylistWrapper::GetPlaylistId).
def("SetPlaylistId", &GameSettingPlaylistWrapper::SetPlaylistId).
def("GetServerCommand", &GameSettingPlaylistWrapper::GetServerCommand);
class_<PlayerControllerWrapper, bases<ActorWrapper>>("PlayerControllerWrapper", no_init).
def("GetbAdjustingSimTime", &PlayerControllerWrapper::GetbAdjustingSimTime).
def("SetbAdjustingSimTime", &PlayerControllerWrapper::SetbAdjustingSimTime).
def("GetbReplicatedSimTimeScalingEnabled", &PlayerControllerWrapper::GetbReplicatedSimTimeScalingEnabled).
def("SetbReplicatedSimTimeScalingEnabled", &PlayerControllerWrapper::SetbReplicatedSimTimeScalingEnabled).
def("GetbReceivedPlayerAndPRI", &PlayerControllerWrapper::GetbReceivedPlayerAndPRI).
def("SetbReceivedPlayerAndPRI", &PlayerControllerWrapper::SetbReceivedPlayerAndPRI).
def("GetbReceivedServerShutdownMessage", &PlayerControllerWrapper::GetbReceivedServerShutdownMessage).
def("SetbReceivedServerShutdownMessage", &PlayerControllerWrapper::SetbReceivedServerShutdownMessage).
def("GetbPendingIdleKick", &PlayerControllerWrapper::GetbPendingIdleKick).
def("SetbPendingIdleKick", &PlayerControllerWrapper::SetbPendingIdleKick).
def("GetbUseDebugInputs", &PlayerControllerWrapper::GetbUseDebugInputs).
def("SetbUseDebugInputs", &PlayerControllerWrapper::SetbUseDebugInputs).
def("GetbJumpPressed", &PlayerControllerWrapper::GetbJumpPressed).
def("SetbJumpPressed", &PlayerControllerWrapper::SetbJumpPressed).
def("GetbBoostPressed", &PlayerControllerWrapper::GetbBoostPressed).
def("SetbBoostPressed", &PlayerControllerWrapper::SetbBoostPressed).
def("GetbHandbrakePressed", &PlayerControllerWrapper::GetbHandbrakePressed).
def("SetbHandbrakePressed", &PlayerControllerWrapper::SetbHandbrakePressed).
def("GetbHasPitchedBack", &PlayerControllerWrapper::GetbHasPitchedBack).
def("SetbHasPitchedBack", &PlayerControllerWrapper::SetbHasPitchedBack).
def("GetbAllowAsymmetricalMute", &PlayerControllerWrapper::GetbAllowAsymmetricalMute).
def("SetbAllowAsymmetricalMute", &PlayerControllerWrapper::SetbAllowAsymmetricalMute).
//def("GetbResetCamera", &PlayerControllerWrapper::GetbResetCamera).
//def("SetbResetCamera", &PlayerControllerWrapper::SetbResetCamera).
def("GetTimeClientAckdAdjustSimTime", &PlayerControllerWrapper::GetTimeClientAckdAdjustSimTime).
def("SetTimeClientAckdAdjustSimTime", &PlayerControllerWrapper::SetTimeClientAckdAdjustSimTime).
def("GetReplicatedInputBufferSize", &PlayerControllerWrapper::GetReplicatedInputBufferSize).
def("SetReplicatedInputBufferSize", &PlayerControllerWrapper::SetReplicatedInputBufferSize).
def("GetCar", &PlayerControllerWrapper::GetCar).
def("SetCar", &PlayerControllerWrapper::SetCar).
def("GetPRI", &PlayerControllerWrapper::GetPRI).
def("SetPRI", &PlayerControllerWrapper::SetPRI).
def("GetVehicleInput", &PlayerControllerWrapper::GetVehicleInput).
def("SetVehicleInput", &PlayerControllerWrapper::SetVehicleInput).
def("GetLoginURL", &PlayerControllerWrapper::GetLoginURL).
def("GetVoiceFilter", &PlayerControllerWrapper::GetVoiceFilter).
def("SetVoiceFilter", &PlayerControllerWrapper::SetVoiceFilter).
def("GetChatFilter", &PlayerControllerWrapper::GetChatFilter).
def("SetChatFilter", &PlayerControllerWrapper::SetChatFilter).
def("GetFollowTarget", &PlayerControllerWrapper::GetFollowTarget).
def("SetFollowTarget", &PlayerControllerWrapper::SetFollowTarget).
def("GetMoveActorGrabOffset", &PlayerControllerWrapper::GetMoveActorGrabOffset).
def("SetMoveActorGrabOffset", &PlayerControllerWrapper::SetMoveActorGrabOffset).
def("GetMoveActorGrabIncrement", &PlayerControllerWrapper::GetMoveActorGrabIncrement).
def("SetMoveActorGrabIncrement", &PlayerControllerWrapper::SetMoveActorGrabIncrement).
def("GetMinMoveActorGrabDistance", &PlayerControllerWrapper::GetMinMoveActorGrabDistance).
def("SetMinMoveActorGrabDistance", &PlayerControllerWrapper::SetMinMoveActorGrabDistance).
def("GetMouseIncrementSpeed", &PlayerControllerWrapper::GetMouseIncrementSpeed).
def("SetMouseIncrementSpeed", &PlayerControllerWrapper::SetMouseIncrementSpeed).
def("GetBallVelocityIncrementAmount", &PlayerControllerWrapper::GetBallVelocityIncrementAmount).
def("SetBallVelocityIncrementAmount", &PlayerControllerWrapper::SetBallVelocityIncrementAmount).
def("GetBallVelocityIncrementFireCount", &PlayerControllerWrapper::GetBallVelocityIncrementFireCount).
def("SetBallVelocityIncrementFireCount", &PlayerControllerWrapper::SetBallVelocityIncrementFireCount).
def("GetBallVelocityIncrementFireCountMax", &PlayerControllerWrapper::GetBallVelocityIncrementFireCountMax).
def("SetBallVelocityIncrementFireCountMax", &PlayerControllerWrapper::SetBallVelocityIncrementFireCountMax).
def("GetBallVelocityIncrementSpeedDefault", &PlayerControllerWrapper::GetBallVelocityIncrementSpeedDefault).
def("SetBallVelocityIncrementSpeedDefault", &PlayerControllerWrapper::SetBallVelocityIncrementSpeedDefault).
def("GetBallVelocityIncrementSpeedMax", &PlayerControllerWrapper::GetBallVelocityIncrementSpeedMax).
def("SetBallVelocityIncrementSpeedMax", &PlayerControllerWrapper::SetBallVelocityIncrementSpeedMax).
def("GetCrosshairTraceDistance", &PlayerControllerWrapper::GetCrosshairTraceDistance).
def("SetCrosshairTraceDistance", &PlayerControllerWrapper::SetCrosshairTraceDistance).
def("GetTracedCrosshairActor", &PlayerControllerWrapper::GetTracedCrosshairActor).
def("SetTracedCrosshairActor", &PlayerControllerWrapper::SetTracedCrosshairActor).
def("GetRotateActorCameraLocationOffset", &PlayerControllerWrapper::GetRotateActorCameraLocationOffset).
def("SetRotateActorCameraLocationOffset", &PlayerControllerWrapper::SetRotateActorCameraLocationOffset).
def("GetRotateActorCameraRotationOffset", &PlayerControllerWrapper::GetRotateActorCameraRotationOffset).
def("SetRotateActorCameraRotationOffset", &PlayerControllerWrapper::SetRotateActorCameraRotationOffset).
def("GetRotateActorCameraSide", &PlayerControllerWrapper::GetRotateActorCameraSide).
def("SetRotateActorCameraSide", &PlayerControllerWrapper::SetRotateActorCameraSide).
def("GetDesiredCameraSide", &PlayerControllerWrapper::GetDesiredCameraSide).
def("SetDesiredCameraSide", &PlayerControllerWrapper::SetDesiredCameraSide).
def("GetPawnTypeChangedTime", &PlayerControllerWrapper::GetPawnTypeChangedTime).
def("SetPawnTypeChangedTime", &PlayerControllerWrapper::SetPawnTypeChangedTime).
def("GetSelectedSpawnArchetype", &PlayerControllerWrapper::GetSelectedSpawnArchetype).
def("SetSelectedSpawnArchetype", &PlayerControllerWrapper::SetSelectedSpawnArchetype).
def("GetDebugInputs", &PlayerControllerWrapper::GetDebugInputs).
def("SetDebugInputs", &PlayerControllerWrapper::SetDebugInputs).
def("GetMinClientInputRate", &PlayerControllerWrapper::GetMinClientInputRate).
def("SetMinClientInputRate", &PlayerControllerWrapper::SetMinClientInputRate).
def("GetMedianClientInputRate", &PlayerControllerWrapper::GetMedianClientInputRate).
def("SetMedianClientInputRate", &PlayerControllerWrapper::SetMedianClientInputRate).
def("GetMaxClientInputRate", &PlayerControllerWrapper::GetMaxClientInputRate).
def("SetMaxClientInputRate", &PlayerControllerWrapper::SetMaxClientInputRate).
def("GetConfiguredClientInputRate", &PlayerControllerWrapper::GetConfiguredClientInputRate).
def("SetConfiguredClientInputRate", &PlayerControllerWrapper::SetConfiguredClientInputRate).
def("GetTimeSinceLastMovePacket", &PlayerControllerWrapper::GetTimeSinceLastMovePacket).
def("SetTimeSinceLastMovePacket", &PlayerControllerWrapper::SetTimeSinceLastMovePacket).
def("GetTimeLastReplicatedMovePacket", &PlayerControllerWrapper::GetTimeLastReplicatedMovePacket).
def("SetTimeLastReplicatedMovePacket", &PlayerControllerWrapper::SetTimeLastReplicatedMovePacket).
def("GetMouseXDeadZone", &PlayerControllerWrapper::GetMouseXDeadZone).
def("SetMouseXDeadZone", &PlayerControllerWrapper::SetMouseXDeadZone).
def("GetMouseYDeadZone", &PlayerControllerWrapper::GetMouseYDeadZone).
def("SetMouseYDeadZone", &PlayerControllerWrapper::SetMouseYDeadZone).
def("GetMouseXDeadZoneAir", &PlayerControllerWrapper::GetMouseXDeadZoneAir).
def("SetMouseXDeadZoneAir", &PlayerControllerWrapper::SetMouseXDeadZoneAir).
def("GetMouseYDeadZoneAir", &PlayerControllerWrapper::GetMouseYDeadZoneAir).
def("SetMouseYDeadZoneAir", &PlayerControllerWrapper::SetMouseYDeadZoneAir).
def("GetLastInputs", &PlayerControllerWrapper::GetLastInputs).
def("SetLastInputs", &PlayerControllerWrapper::SetLastInputs).
def("GetPendingViewPRI", &PlayerControllerWrapper::GetPendingViewPRI).
def("SetPendingViewPRI", &PlayerControllerWrapper::SetPendingViewPRI).
//def("GetLastInputPitch", &PlayerControllerWrapper::GetLastInputPitch).
//def("SetLastInputPitch", &PlayerControllerWrapper::SetLastInputPitch).
//def("GetLastInputYaw", &PlayerControllerWrapper::GetLastInputYaw).
//def("SetLastInputYaw", &PlayerControllerWrapper::SetLastInputYaw).
def("GetMouseInputMax", &PlayerControllerWrapper::GetMouseInputMax).
def("SetMouseInputMax", &PlayerControllerWrapper::SetMouseInputMax).
def("GetPrimaryPlayerController", &PlayerControllerWrapper::GetPrimaryPlayerController).
def("SetPrimaryPlayerController", &PlayerControllerWrapper::SetPrimaryPlayerController).
def("GetEngineShare", &PlayerControllerWrapper::GetEngineShare).
def("SetEngineShare", &PlayerControllerWrapper::SetEngineShare);
class_<RBActorWrapper, bases<ActorWrapper>>("RBActorWrapper", no_init).
def("GetMaxLinearSpeed", &RBActorWrapper::GetMaxLinearSpeed).
def("SetMaxLinearSpeed", &RBActorWrapper::SetMaxLinearSpeed).
def("GetMaxAngularSpeed", &RBActorWrapper::GetMaxAngularSpeed).
def("SetMaxAngularSpeed", &RBActorWrapper::SetMaxAngularSpeed).
def("GetbDisableSleeping", &RBActorWrapper::GetbDisableSleeping).
def("SetbDisableSleeping", &RBActorWrapper::SetbDisableSleeping).
def("GetbReplayActor", &RBActorWrapper::GetbReplayActor).
def("SetbReplayActor", &RBActorWrapper::SetbReplayActor).
def("GetbFrozen", &RBActorWrapper::GetbFrozen).
def("SetbFrozen", &RBActorWrapper::SetbFrozen).
def("GetbIgnoreSyncing", &RBActorWrapper::GetbIgnoreSyncing).
def("SetbIgnoreSyncing", &RBActorWrapper::SetbIgnoreSyncing).
def("GetbPhysInitialized", &RBActorWrapper::GetbPhysInitialized).
def("GetOldRBState", &RBActorWrapper::GetOldRBState).
def("SetOldRBState", &RBActorWrapper::SetOldRBState).
def("GetRBState", &RBActorWrapper::GetRBState).
def("SetRBState", &RBActorWrapper::SetRBState).
def("GetReplicatedRBState", &RBActorWrapper::GetReplicatedRBState).
def("SetReplicatedRBState", &RBActorWrapper::SetReplicatedRBState).
def("GetClientCorrectionRBState", &RBActorWrapper::GetClientCorrectionRBState).
def("SetClientCorrectionRBState", &RBActorWrapper::SetClientCorrectionRBState).
def("GetWorldContact", &RBActorWrapper::GetWorldContact).
def("SetWorldContact", &RBActorWrapper::SetWorldContact).
def("GetSyncErrorLocation", &RBActorWrapper::GetSyncErrorLocation).
def("GetSyncErrorAngle", &RBActorWrapper::GetSyncErrorAngle).
def("GetSyncErrorAxis", &RBActorWrapper::GetSyncErrorAxis).
def("GetLastRBCollisionsFrame", &RBActorWrapper::GetLastRBCollisionsFrame).
def("GetWeldedActor", &RBActorWrapper::GetWeldedActor).
def("GetWeldedTo", &RBActorWrapper::GetWeldedTo).
def("GetPreWeldMass", &RBActorWrapper::GetPreWeldMass);
class_<BallWrapper, bases<RBActorWrapper>>("BallWrapper", no_init).
def("GetbAllowPlayerExplosionOverride", &BallWrapper::GetbAllowPlayerExplosionOverride).
def("SetbAllowPlayerExplosionOverride", &BallWrapper::SetbAllowPlayerExplosionOverride).
def("GetbNotifyGroundHit", &BallWrapper::GetbNotifyGroundHit).
def("SetbNotifyGroundHit", &BallWrapper::SetbNotifyGroundHit).
def("GetbEndOfGameHidden", &BallWrapper::GetbEndOfGameHidden).
def("SetbEndOfGameHidden", &BallWrapper::SetbEndOfGameHidden).
def("GetbFadeIn", &BallWrapper::GetbFadeIn).
def("SetbFadeIn", &BallWrapper::SetbFadeIn).
def("GetbFadeOut", &BallWrapper::GetbFadeOut).
def("SetbFadeOut", &BallWrapper::SetbFadeOut).
def("GetbPredictionOnGround", &BallWrapper::GetbPredictionOnGround).
def("SetbPredictionOnGround", &BallWrapper::SetbPredictionOnGround).
def("GetbCanBeAttached", &BallWrapper::GetbCanBeAttached).
def("SetbCanBeAttached", &BallWrapper::SetbCanBeAttached).
//def("GetbNewFalling", &BallWrapper::GetbNewFalling).
//def("SetbNewFalling", &BallWrapper::SetbNewFalling).
def("GetbItemFreeze", &BallWrapper::GetbItemFreeze).
def("SetbItemFreeze", &BallWrapper::SetbItemFreeze).
def("GetRadius", &BallWrapper::GetRadius).
def("SetRadius", &BallWrapper::SetRadius).
def("GetVisualRadius", &BallWrapper::GetVisualRadius).
def("SetVisualRadius", &BallWrapper::SetVisualRadius).
def("GetLastCalculateCarHit", &BallWrapper::GetLastCalculateCarHit).
def("GetInitialLocation", &BallWrapper::GetInitialLocation).
def("SetInitialLocation", &BallWrapper::SetInitialLocation).
def("SetInitialRotation", &BallWrapper::SetInitialRotation).
def("GetLastHitWorldTime", &BallWrapper::GetLastHitWorldTime).
def("GetReplicatedBallScale", &BallWrapper::GetReplicatedBallScale).
def("SetReplicatedBallScale", &BallWrapper::SetReplicatedBallScale).
def("GetReplicatedWorldBounceScale", &BallWrapper::GetReplicatedWorldBounceScale).
def("SetReplicatedWorldBounceScale", &BallWrapper::SetReplicatedWorldBounceScale).
def("GetReplicatedBallGravityScale", &BallWrapper::GetReplicatedBallGravityScale).
def("SetReplicatedBallGravityScale", &BallWrapper::SetReplicatedBallGravityScale).
def("GetReplicatedBallMaxLinearSpeedScale", &BallWrapper::GetReplicatedBallMaxLinearSpeedScale).
def("SetReplicatedBallMaxLinearSpeedScale", &BallWrapper::SetReplicatedBallMaxLinearSpeedScale).
def("GetReplicatedAddedCarBounceScale", &BallWrapper::GetReplicatedAddedCarBounceScale).
def("SetReplicatedAddedCarBounceScale", &BallWrapper::SetReplicatedAddedCarBounceScale).
def("GetAdditionalCarGroundBounceScaleZ", &BallWrapper::GetAdditionalCarGroundBounceScaleZ).
def("SetAdditionalCarGroundBounceScaleZ", &BallWrapper::SetAdditionalCarGroundBounceScaleZ).
def("GetAdditionalCarGroundBounceScaleXY", &BallWrapper::GetAdditionalCarGroundBounceScaleXY).
def("SetAdditionalCarGroundBounceScaleXY", &BallWrapper::SetAdditionalCarGroundBounceScaleXY).
def("GetHitTeamNum", &BallWrapper::GetHitTeamNum).
def("SetHitTeamNum", &BallWrapper::SetHitTeamNum).
def("GetGameEvent", &BallWrapper::GetGameEvent).
def("GetExplosionTime", &BallWrapper::GetExplosionTime).
def("SetExplosionTime", &BallWrapper::SetExplosionTime).
def("GetOldLocation", &BallWrapper::GetOldLocation).
def("SetOldLocation", &BallWrapper::SetOldLocation).
def("GetPredictionTimestep", &BallWrapper::GetPredictionTimestep).
def("SetPredictionTimestep", &BallWrapper::SetPredictionTimestep).
def("GetLastPredictionTime", &BallWrapper::GetLastPredictionTime).
def("SetLastPredictionTime", &BallWrapper::SetLastPredictionTime).
/*def("GetBallSloMoRadius", &BallWrapper::GetBallSloMoRadius).
def("SetBallSloMoRadius", &BallWrapper::SetBallSloMoRadius).
def("GetBallSloMoDuration", &BallWrapper::GetBallSloMoDuration).
def("SetBallSloMoDuration", &BallWrapper::SetBallSloMoDuration).
def("GetBallSloMoDilation", &BallWrapper::GetBallSloMoDilation).
def("SetBallSloMoDilation", &BallWrapper::SetBallSloMoDilation).
def("GetBallSloMoCooldown", &BallWrapper::GetBallSloMoCooldown).
def("SetBallSloMoCooldown", &BallWrapper::SetBallSloMoCooldown).
def("GetBallSloMoNext", &BallWrapper::GetBallSloMoNext).
def("SetBallSloMoNext", &BallWrapper::SetBallSloMoNext).
def("GetBallSloMoDiffSpeed", &BallWrapper::GetBallSloMoDiffSpeed).
def("SetBallSloMoDiffSpeed", &BallWrapper::SetBallSloMoDiffSpeed).
def("GetBallTouchScore", &BallWrapper::GetBallTouchScore).
def("SetBallTouchScore", &BallWrapper::SetBallTouchScore).*/
def("GetGroundForce", &BallWrapper::GetGroundForce).
def("SetGroundForce", &BallWrapper::SetGroundForce).
def("GetCurrentAffector", &BallWrapper::GetCurrentAffector).
def("SetCurrentAffector", &BallWrapper::SetCurrentAffector);
class_<CarComponentWrapper, bases<ActorWrapper>>("CarComponentWrapper", no_init).
def("GetbDisabled", &CarComponentWrapper::GetbDisabled).
def("SetbDisabled", &CarComponentWrapper::SetbDisabled).
def("GetbAutoActivate", &CarComponentWrapper::GetbAutoActivate).
def("SetbAutoActivate", &CarComponentWrapper::SetbAutoActivate).
def("GetbSimulateComponent", &CarComponentWrapper::GetbSimulateComponent).
def("SetbSimulateComponent", &CarComponentWrapper::SetbSimulateComponent).
def("GetbCreated", &CarComponentWrapper::GetbCreated).
def("SetbCreated", &CarComponentWrapper::SetbCreated).
def("GetbActive", &CarComponentWrapper::GetbActive).
def("SetbActive", &CarComponentWrapper::SetbActive).
def("GetbRemovedFromCar", &CarComponentWrapper::GetbRemovedFromCar).
def("SetbRemovedFromCar", &CarComponentWrapper::SetbRemovedFromCar).
def("GetComponentData", &CarComponentWrapper::GetComponentData).
def("SetComponentData", &CarComponentWrapper::SetComponentData).
def("GetReplicatedActive", &CarComponentWrapper::GetReplicatedActive).
def("SetReplicatedActive", &CarComponentWrapper::SetReplicatedActive).
def("GetActivator", &CarComponentWrapper::GetActivator).
def("SetActivator", &CarComponentWrapper::SetActivator).
def("GetVehicle", &CarComponentWrapper::GetVehicle).
def("SetVehicle", &CarComponentWrapper::SetVehicle).
def("GetCar", &CarComponentWrapper::GetCar).
def("SetCar", &CarComponentWrapper::SetCar).
def("GetActivityTime", &CarComponentWrapper::GetActivityTime).
def("SetActivityTime", &CarComponentWrapper::SetActivityTime).
def("GetReplicatedActivityTime", &CarComponentWrapper::GetReplicatedActivityTime).
def("SetReplicatedActivityTime", &CarComponentWrapper::SetReplicatedActivityTime);
class_<AirControlComponentWrapper, bases<CarComponentWrapper>>("AirControlComponentWrapper", no_init).
def("GetAirTorque", &AirControlComponentWrapper::GetAirTorque).
def("SetAirTorque", &AirControlComponentWrapper::SetAirTorque).
def("GetAirDamping", &AirControlComponentWrapper::GetAirDamping).
def("SetAirDamping", &AirControlComponentWrapper::SetAirDamping).
def("GetThrottleForce", &AirControlComponentWrapper::GetThrottleForce).
def("SetThrottleForce", &AirControlComponentWrapper::SetThrottleForce).
def("GetDodgeDisableTimeRemaining", &AirControlComponentWrapper::GetDodgeDisableTimeRemaining).
def("SetDodgeDisableTimeRemaining", &AirControlComponentWrapper::SetDodgeDisableTimeRemaining).
def("GetControlScale", &AirControlComponentWrapper::GetControlScale).
def("SetControlScale", &AirControlComponentWrapper::SetControlScale).
def("GetAirControlSensitivity", &AirControlComponentWrapper::GetAirControlSensitivity).
def("SetAirControlSensitivity", &AirControlComponentWrapper::SetAirControlSensitivity);
class_<BoostWrapper, bases<CarComponentWrapper>>("BoostWrapper", no_init).
def("GetBoostConsumptionRate", &BoostWrapper::GetBoostConsumptionRate).
def("SetBoostConsumptionRate", &BoostWrapper::SetBoostConsumptionRate).
def("GetMaxBoostAmount", &BoostWrapper::GetMaxBoostAmount).
def("SetMaxBoostAmount", &BoostWrapper::SetMaxBoostAmount).
def("GetStartBoostAmount", &BoostWrapper::GetStartBoostAmount).
def("SetStartBoostAmount", &BoostWrapper::SetStartBoostAmount).
def("GetCurrentBoostAmount", &BoostWrapper::GetCurrentBoostAmount).
def("SetCurrentBoostAmount", &BoostWrapper::SetCurrentBoostAmount).
def("GetBoostModifier", &BoostWrapper::GetBoostModifier).
def("SetBoostModifier", &BoostWrapper::SetBoostModifier).
def("GetLastBoostAmountRequestTime", &BoostWrapper::GetLastBoostAmountRequestTime).
def("SetLastBoostAmountRequestTime", &BoostWrapper::SetLastBoostAmountRequestTime).
def("GetLastBoostAmount", &BoostWrapper::GetLastBoostAmount).
def("SetLastBoostAmount", &BoostWrapper::SetLastBoostAmount).
def("GetBoostForce", &BoostWrapper::GetBoostForce).
def("SetBoostForce", &BoostWrapper::SetBoostForce).
def("GetMinBoostTime", &BoostWrapper::GetMinBoostTime).
def("SetMinBoostTime", &BoostWrapper::SetMinBoostTime).
def("GetRechargeRate", &BoostWrapper::GetRechargeRate).
def("SetRechargeRate", &BoostWrapper::SetRechargeRate).
def("GetRechargeDelay", &BoostWrapper::GetRechargeDelay).
def("SetRechargeDelay", &BoostWrapper::SetRechargeDelay).
def("GetUnlimitedBoostRefCount", &BoostWrapper::GetUnlimitedBoostRefCount).
def("SetUnlimitedBoostRefCount", &BoostWrapper::SetUnlimitedBoostRefCount).
def("GetbUnlimitedBoost", &BoostWrapper::GetbUnlimitedBoost).
def("SetbUnlimitedBoost", &BoostWrapper::SetbUnlimitedBoost).
def("GetbNoBoost", &BoostWrapper::GetbNoBoost).
def("SetbNoBoost", &BoostWrapper::SetbNoBoost).
def("GetReplicatedBoostAmount", &BoostWrapper::GetReplicatedBoostAmount).
def("SetReplicatedBoostAmount", &BoostWrapper::SetReplicatedBoostAmount);
class_<DodgeComponentWrapper, bases<CarComponentWrapper>>("DodgeComponentWrapper", no_init).
def("GetDodgeInputThreshold", &DodgeComponentWrapper::GetDodgeInputThreshold).
def("SetDodgeInputThreshold", &DodgeComponentWrapper::SetDodgeInputThreshold).
def("GetSideDodgeImpulse", &DodgeComponentWrapper::GetSideDodgeImpulse).
def("SetSideDodgeImpulse", &DodgeComponentWrapper::SetSideDodgeImpulse).
def("GetSideDodgeImpulseMaxSpeedScale", &DodgeComponentWrapper::GetSideDodgeImpulseMaxSpeedScale).
def("SetSideDodgeImpulseMaxSpeedScale", &DodgeComponentWrapper::SetSideDodgeImpulseMaxSpeedScale).
def("GetForwardDodgeImpulse", &DodgeComponentWrapper::GetForwardDodgeImpulse).
def("SetForwardDodgeImpulse", &DodgeComponentWrapper::SetForwardDodgeImpulse).
def("GetForwardDodgeImpulseMaxSpeedScale", &DodgeComponentWrapper::GetForwardDodgeImpulseMaxSpeedScale).
def("SetForwardDodgeImpulseMaxSpeedScale", &DodgeComponentWrapper::SetForwardDodgeImpulseMaxSpeedScale).
def("GetBackwardDodgeImpulse", &DodgeComponentWrapper::GetBackwardDodgeImpulse).
def("SetBackwardDodgeImpulse", &DodgeComponentWrapper::SetBackwardDodgeImpulse).
def("GetBackwardDodgeImpulseMaxSpeedScale", &DodgeComponentWrapper::GetBackwardDodgeImpulseMaxSpeedScale).
def("SetBackwardDodgeImpulseMaxSpeedScale", &DodgeComponentWrapper::SetBackwardDodgeImpulseMaxSpeedScale).
def("GetSideDodgeTorque", &DodgeComponentWrapper::GetSideDodgeTorque).
def("SetSideDodgeTorque", &DodgeComponentWrapper::SetSideDodgeTorque).
def("GetForwardDodgeTorque", &DodgeComponentWrapper::GetForwardDodgeTorque).
def("SetForwardDodgeTorque", &DodgeComponentWrapper::SetForwardDodgeTorque).
def("GetDodgeTorqueTime", &DodgeComponentWrapper::GetDodgeTorqueTime).
def("SetDodgeTorqueTime", &DodgeComponentWrapper::SetDodgeTorqueTime).
def("GetMinDodgeTorqueTime", &DodgeComponentWrapper::GetMinDodgeTorqueTime).
def("SetMinDodgeTorqueTime", &DodgeComponentWrapper::SetMinDodgeTorqueTime).
def("GetDodgeZDamping", &DodgeComponentWrapper::GetDodgeZDamping).
def("SetDodgeZDamping", &DodgeComponentWrapper::SetDodgeZDamping).
def("GetDodgeZDampingDelay", &DodgeComponentWrapper::GetDodgeZDampingDelay).
def("SetDodgeZDampingDelay", &DodgeComponentWrapper::SetDodgeZDampingDelay).
def("GetDodgeZDampingUpTime", &DodgeComponentWrapper::GetDodgeZDampingUpTime).
def("SetDodgeZDampingUpTime", &DodgeComponentWrapper::SetDodgeZDampingUpTime).
def("GetDodgeImpulseScale", &DodgeComponentWrapper::GetDodgeImpulseScale).
def("SetDodgeImpulseScale", &DodgeComponentWrapper::SetDodgeImpulseScale).
def("GetDodgeTorqueScale", &DodgeComponentWrapper::GetDodgeTorqueScale).
def("SetDodgeTorqueScale", &DodgeComponentWrapper::SetDodgeTorqueScale).
def("GetDodgeTorque", &DodgeComponentWrapper::GetDodgeTorque).
def("SetDodgeTorque", &DodgeComponentWrapper::SetDodgeTorque).
def("GetDodgeDirection", &DodgeComponentWrapper::GetDodgeDirection).
def("SetDodgeDirection", &DodgeComponentWrapper::SetDodgeDirection);
class_<DoubleJumpComponentWrapper, bases<CarComponentWrapper>>("DoubleJumpComponentWrapper", no_init).
def("SetJumpImpulse", &DoubleJumpComponentWrapper::SetJumpImpulse).
def("GetImpulseScale", &DoubleJumpComponentWrapper::GetImpulseScale).
def("SetImpulseScale", &DoubleJumpComponentWrapper::SetImpulseScale);
class_<FlipCarComponentWrapper, bases<CarComponentWrapper>>("FlipCarComponentWrapper", no_init).
def("GetFlipCarImpulse", &FlipCarComponentWrapper::GetFlipCarImpulse).
def("SetFlipCarImpulse", &FlipCarComponentWrapper::SetFlipCarImpulse).
def("GetFlipCarTorque", &FlipCarComponentWrapper::GetFlipCarTorque).
def("SetFlipCarTorque", &FlipCarComponentWrapper::SetFlipCarTorque).
def("GetFlipCarTime", &FlipCarComponentWrapper::GetFlipCarTime).
def("SetFlipCarTime", &FlipCarComponentWrapper::SetFlipCarTime).
def("GetbFlipRight", &FlipCarComponentWrapper::GetbFlipRight).
def("SetbFlipRight", &FlipCarComponentWrapper::SetbFlipRight);
class_<JumpComponentWrapper, bases<CarComponentWrapper>>("JumpComponentWrapper", no_init).
def("GetMinJumpTime", &JumpComponentWrapper::GetMinJumpTime).
def("SetMinJumpTime", &JumpComponentWrapper::SetMinJumpTime).
def("GetJumpImpulse", &JumpComponentWrapper::GetJumpImpulse).
def("SetJumpImpulse", &JumpComponentWrapper::SetJumpImpulse).
def("GetJumpForce", &JumpComponentWrapper::GetJumpForce).
def("SetJumpForce", &JumpComponentWrapper::SetJumpForce).
def("GetJumpForceTime", &JumpComponentWrapper::GetJumpForceTime).
def("SetJumpForceTime", &JumpComponentWrapper::SetJumpForceTime).
def("GetPodiumJumpForceTime", &JumpComponentWrapper::GetPodiumJumpForceTime).
def("SetPodiumJumpForceTime", &JumpComponentWrapper::SetPodiumJumpForceTime).
def("GetJumpImpulseSpeed", &JumpComponentWrapper::GetJumpImpulseSpeed).
def("SetJumpImpulseSpeed", &JumpComponentWrapper::SetJumpImpulseSpeed).
def("GetJumpAccel", &JumpComponentWrapper::GetJumpAccel).
def("SetJumpAccel", &JumpComponentWrapper::SetJumpAccel).
def("GetMaxJumpHeight", &JumpComponentWrapper::GetMaxJumpHeight).
def("SetMaxJumpHeight", &JumpComponentWrapper::SetMaxJumpHeight).
def("GetMaxJumpHeightTime", &JumpComponentWrapper::GetMaxJumpHeightTime).
def("SetMaxJumpHeightTime", &JumpComponentWrapper::SetMaxJumpHeightTime).
def("GetbDeactivate", &JumpComponentWrapper::GetbDeactivate).
def("SetbDeactivate", &JumpComponentWrapper::SetbDeactivate);
class_<RumblePickupComponentWrapper, bases<CarComponentWrapper>>("RumblePickupComponentWrapper", no_init).
def("GetPickupName", &RumblePickupComponentWrapper::GetPickupName).
def("GetbHudIgnoreUseTime", &RumblePickupComponentWrapper::GetbHudIgnoreUseTime).
def("SetbHudIgnoreUseTime", &RumblePickupComponentWrapper::SetbHudIgnoreUseTime).
def("GetbHasActivated", &RumblePickupComponentWrapper::GetbHasActivated).
def("SetbHasActivated", &RumblePickupComponentWrapper::SetbHasActivated).
def("GetbIsActive", &RumblePickupComponentWrapper::GetbIsActive).
def("SetbIsActive", &RumblePickupComponentWrapper::SetbIsActive).
def("GetActivationDuration", &RumblePickupComponentWrapper::GetActivationDuration).
def("SetActivationDuration", &RumblePickupComponentWrapper::SetActivationDuration);
class_<GravityPickup, bases<RumblePickupComponentWrapper>>("GravityPickup", no_init).
def("GetBallGravity", &GravityPickup::GetBallGravity).
def("SetBallGravity", &GravityPickup::SetBallGravity).
def("GetRange", &GravityPickup::GetRange).
def("SetRange", &GravityPickup::SetRange).
def("GetOffset", &GravityPickup::GetOffset).
def("SetOffset", &GravityPickup::SetOffset).
def("GetbDeactivateOnTouch", &GravityPickup::GetbDeactivateOnTouch).
def("SetbDeactivateOnTouch", &GravityPickup::SetbDeactivateOnTouch).
def("GetRecordBallHitRate", &GravityPickup::GetRecordBallHitRate).
def("SetRecordBallHitRate", &GravityPickup::SetRecordBallHitRate).
def("GetLastRecordedBallHitTime", &GravityPickup::GetLastRecordedBallHitTime).
def("SetLastRecordedBallHitTime", &GravityPickup::SetLastRecordedBallHitTime).
def("GetPrevBall", &GravityPickup::GetPrevBall).
def("SetPrevBall", &GravityPickup::SetPrevBall);
class_<TargetedPickup, bases<RumblePickupComponentWrapper>>("TargetedPickup", no_init).
def("GetbCanTargetBall", &TargetedPickup::GetbCanTargetBall).
def("SetbCanTargetBall", &TargetedPickup::SetbCanTargetBall).
def("GetbCanTargetCars", &TargetedPickup::GetbCanTargetCars).
def("SetbCanTargetCars", &TargetedPickup::SetbCanTargetCars).
def("GetbCanTargetEnemyCars", &TargetedPickup::GetbCanTargetEnemyCars).
def("SetbCanTargetEnemyCars", &TargetedPickup::SetbCanTargetEnemyCars).
def("GetbCanTargetTeamCars", &TargetedPickup::GetbCanTargetTeamCars).
def("SetbCanTargetTeamCars", &TargetedPickup::SetbCanTargetTeamCars).
def("GetbUseDirectionalTargeting", &TargetedPickup::GetbUseDirectionalTargeting).
def("SetbUseDirectionalTargeting", &TargetedPickup::SetbUseDirectionalTargeting).
def("GetbRequireTrace", &TargetedPickup::GetbRequireTrace).
def("SetbRequireTrace", &TargetedPickup::SetbRequireTrace).
def("GetRange", &TargetedPickup::GetRange).
def("SetRange", &TargetedPickup::SetRange).
def("GetDirectionalTargetingAccuracy", &TargetedPickup::GetDirectionalTargetingAccuracy).
def("SetDirectionalTargetingAccuracy", &TargetedPickup::SetDirectionalTargetingAccuracy).
def("GetClientTarget", &TargetedPickup::GetClientTarget).
def("SetClientTarget", &TargetedPickup::SetClientTarget).
def("GetTargeted", &TargetedPickup::GetTargeted).
def("SetTargeted", &TargetedPickup::SetTargeted);
class_<BallFreezePickup, bases<TargetedPickup>>("BallFreezePickup", no_init).
def("GetbMaintainMomentum", &BallFreezePickup::GetbMaintainMomentum).
def("SetbMaintainMomentum", &BallFreezePickup::SetbMaintainMomentum).
def("GetbTouched", &BallFreezePickup::GetbTouched).
def("SetbTouched", &BallFreezePickup::SetbTouched).
def("GetTimeToStop", &BallFreezePickup::GetTimeToStop).
def("SetTimeToStop", &BallFreezePickup::SetTimeToStop).
def("GetStopMomentumPercentage", &BallFreezePickup::GetStopMomentumPercentage).
def("SetStopMomentumPercentage", &BallFreezePickup::SetStopMomentumPercentage).
def("GetBall", &BallFreezePickup::GetBall).
def("SetBall", &BallFreezePickup::SetBall).
def("GetOrigLinearVelocity", &BallFreezePickup::GetOrigLinearVelocity).
def("SetOrigLinearVelocity", &BallFreezePickup::SetOrigLinearVelocity).
def("GetOrigAngularVelocity", &BallFreezePickup::GetOrigAngularVelocity).
def("SetOrigAngularVelocity", &BallFreezePickup::SetOrigAngularVelocity).
def("GetOrigSpeed", &BallFreezePickup::GetOrigSpeed).
def("SetOrigSpeed", &BallFreezePickup::SetOrigSpeed).
def("GetRepOrigSpeed", &BallFreezePickup::GetRepOrigSpeed).
def("SetRepOrigSpeed", &BallFreezePickup::SetRepOrigSpeed);
class_<GrapplingHookPickup, bases<TargetedPickup>>("GrapplingHookPickup", no_init).
def("GetImpulse", &GrapplingHookPickup::GetImpulse).
def("SetImpulse", &GrapplingHookPickup::SetImpulse).
def("GetForce", &GrapplingHookPickup::GetForce).
def("SetForce", &GrapplingHookPickup::SetForce).
def("GetMaxRopeLength", &GrapplingHookPickup::GetMaxRopeLength).
def("SetMaxRopeLength", &GrapplingHookPickup::SetMaxRopeLength).
def("GetPredictionSpeed", &GrapplingHookPickup::GetPredictionSpeed).
def("SetPredictionSpeed", &GrapplingHookPickup::SetPredictionSpeed).
def("GetbDeactivateOnTouch", &GrapplingHookPickup::GetbDeactivateOnTouch).
def("SetbDeactivateOnTouch", &GrapplingHookPickup::SetbDeactivateOnTouch).
def("GetbInstant", &GrapplingHookPickup::GetbInstant).
def("SetbInstant", &GrapplingHookPickup::SetbInstant).
def("GetbBlocked", &GrapplingHookPickup::GetbBlocked).
def("SetbBlocked", &GrapplingHookPickup::SetbBlocked).
def("GetbAttachedToBall", &GrapplingHookPickup::GetbAttachedToBall).
def("SetbAttachedToBall", &GrapplingHookPickup::SetbAttachedToBall).
def("GetRopeMeshScale", &GrapplingHookPickup::GetRopeMeshScale).
def("SetRopeMeshScale", &GrapplingHookPickup::SetRopeMeshScale).
def("GetRopeMeshInitialSize", &GrapplingHookPickup::GetRopeMeshInitialSize).
def("SetRopeMeshInitialSize", &GrapplingHookPickup::SetRopeMeshInitialSize).
def("GetRopeRotationOffset", &GrapplingHookPickup::GetRopeRotationOffset).
def("SetRopeRotationOffset", &GrapplingHookPickup::SetRopeRotationOffset).
def("GetHookMeshScale", &GrapplingHookPickup::GetHookMeshScale).
def("SetHookMeshScale", &GrapplingHookPickup::SetHookMeshScale).
def("GetHookMeshOffset", &GrapplingHookPickup::GetHookMeshOffset).
def("SetHookMeshOffset", &GrapplingHookPickup::SetHookMeshOffset).
def("GetHookRotationOffset", &GrapplingHookPickup::GetHookRotationOffset).
def("SetHookRotationOffset", &GrapplingHookPickup::SetHookRotationOffset).
def("GetHitDistanceOffset", &GrapplingHookPickup::GetHitDistanceOffset).
def("SetHitDistanceOffset", &GrapplingHookPickup::SetHitDistanceOffset).
def("GetAfterAttachDuration", &GrapplingHookPickup::GetAfterAttachDuration).
def("SetAfterAttachDuration", &GrapplingHookPickup::SetAfterAttachDuration).
def("GetBlockedRequiredMoveDistance", &GrapplingHookPickup::GetBlockedRequiredMoveDistance).
def("SetBlockedRequiredMoveDistance", &GrapplingHookPickup::SetBlockedRequiredMoveDistance).
def("GetBlockedRequiredMoveTime", &GrapplingHookPickup::GetBlockedRequiredMoveTime).
def("SetBlockedRequiredMoveTime", &GrapplingHookPickup::SetBlockedRequiredMoveTime).
def("GetBlockedStartTime", &GrapplingHookPickup::GetBlockedStartTime).
def("SetBlockedStartTime", &GrapplingHookPickup::SetBlockedStartTime).
def("GetBlockedStartPos", &GrapplingHookPickup::GetBlockedStartPos).
def("SetBlockedStartPos", &GrapplingHookPickup::SetBlockedStartPos).
def("GetBall", &GrapplingHookPickup::GetBall).
def("SetBall", &GrapplingHookPickup::SetBall).
def("GetRopeOrigin", &GrapplingHookPickup::GetRopeOrigin).
def("SetRopeOrigin", &GrapplingHookPickup::SetRopeOrigin).
def("GetRopeToTime", &GrapplingHookPickup::GetRopeToTime).
def("SetRopeToTime", &GrapplingHookPickup::SetRopeToTime).
def("GetCurrentRopeLength", &GrapplingHookPickup::GetCurrentRopeLength).
def("SetCurrentRopeLength", &GrapplingHookPickup::SetCurrentRopeLength).
def("GetAttachTime", &GrapplingHookPickup::GetAttachTime).
def("SetAttachTime", &GrapplingHookPickup::SetAttachTime);
class_<SpringPickup, bases<TargetedPickup>>("SpringPickup", no_init).
def("GetForce", &SpringPickup::GetForce).
def("SetForce", &SpringPickup::SetForce).
def("GetVerticalForce", &SpringPickup::GetVerticalForce).
def("SetVerticalForce", &SpringPickup::SetVerticalForce).
def("GetTorque", &SpringPickup::GetTorque).
def("SetTorque", &SpringPickup::SetTorque).
def("GetbApplyRelativeForce", &SpringPickup::GetbApplyRelativeForce).
def("SetbApplyRelativeForce", &SpringPickup::SetbApplyRelativeForce).
def("GetbApplyConstantForce", &SpringPickup::GetbApplyConstantForce).
def("SetbApplyConstantForce", &SpringPickup::SetbApplyConstantForce).
def("GetbBreakConstantForceWithHit", &SpringPickup::GetbBreakConstantForceWithHit).
def("SetbBreakConstantForceWithHit", &SpringPickup::SetbBreakConstantForceWithHit).
def("GetbApplyRelativeConstantForce", &SpringPickup::GetbApplyRelativeConstantForce).
def("SetbApplyRelativeConstantForce", &SpringPickup::SetbApplyRelativeConstantForce).
def("GetbInstant", &SpringPickup::GetbInstant).
def("SetbInstant", &SpringPickup::SetbInstant).
def("GetbFollowAfterHit", &SpringPickup::GetbFollowAfterHit).
def("SetbFollowAfterHit", &SpringPickup::SetbFollowAfterHit).
def("GetbSpringed", &SpringPickup::GetbSpringed).
def("SetbSpringed", &SpringPickup::SetbSpringed).
def("GetRelativeForceNormalDirection", &SpringPickup::GetRelativeForceNormalDirection).
def("SetRelativeForceNormalDirection", &SpringPickup::SetRelativeForceNormalDirection).
def("GetMaxSpringLength", &SpringPickup::GetMaxSpringLength).
def("SetMaxSpringLength", &SpringPickup::SetMaxSpringLength).
def("GetConstantForce", &SpringPickup::GetConstantForce).
def("SetConstantForce", &SpringPickup::SetConstantForce).
def("GetFromOffset", &SpringPickup::GetFromOffset).
def("SetFromOffset", &SpringPickup::SetFromOffset).
def("GetSpringMeshScale", &SpringPickup::GetSpringMeshScale).
def("SetSpringMeshScale", &SpringPickup::SetSpringMeshScale).
def("GetSpringMeshInitialSize", &SpringPickup::GetSpringMeshInitialSize).
def("SetSpringMeshInitialSize", &SpringPickup::SetSpringMeshInitialSize).
def("GetSpringRotationOffset", &SpringPickup::GetSpringRotationOffset).
def("SetSpringRotationOffset", &SpringPickup::SetSpringRotationOffset).
def("GetHittingMeshScale", &SpringPickup::GetHittingMeshScale).
def("SetHittingMeshScale", &SpringPickup::SetHittingMeshScale).
def("GetHittingMeshOffset", &SpringPickup::GetHittingMeshOffset).
def("SetHittingMeshOffset", &SpringPickup::SetHittingMeshOffset).
def("GetHittingRotationOffset", &SpringPickup::GetHittingRotationOffset).
def("SetHittingRotationOffset", &SpringPickup::SetHittingRotationOffset).
def("GetHitDistanceOffset", &SpringPickup::GetHitDistanceOffset).
def("SetHitDistanceOffset", &SpringPickup::SetHitDistanceOffset).
def("GetAfterSpringDuration", &SpringPickup::GetAfterSpringDuration).
def("SetAfterSpringDuration", &SpringPickup::SetAfterSpringDuration).
def("GetBallHitType", &SpringPickup::GetBallHitType).
def("SetBallHitType", &SpringPickup::SetBallHitType).
def("GetMinSpringLength", &SpringPickup::GetMinSpringLength).
def("SetMinSpringLength", &SpringPickup::SetMinSpringLength).
def("GetWeldedForceScalar", &SpringPickup::GetWeldedForceScalar).
def("SetWeldedForceScalar", &SpringPickup::SetWeldedForceScalar).
def("GetWeldedVerticalForce", &SpringPickup::GetWeldedVerticalForce).
def("SetWeldedVerticalForce", &SpringPickup::SetWeldedVerticalForce).
def("GetCurrentSpringLength", &SpringPickup::GetCurrentSpringLength).
def("SetCurrentSpringLength", &SpringPickup::SetCurrentSpringLength).
def("GetSpringedTime", &SpringPickup::GetSpringedTime).
def("SetSpringedTime", &SpringPickup::SetSpringedTime).
def("GetAfterSpringTime", &SpringPickup::GetAfterSpringTime).
def("SetAfterSpringTime", &SpringPickup::SetAfterSpringTime).
def("GetSpringToTime", &SpringPickup::GetSpringToTime).
def("SetSpringToTime", &SpringPickup::SetSpringToTime).
def("GetSpringOrigin", &SpringPickup::GetSpringOrigin).
def("SetSpringOrigin", &SpringPickup::SetSpringOrigin).
def("GetSpringedLocation", &SpringPickup::GetSpringedLocation).
def("SetSpringedLocation", &SpringPickup::SetSpringedLocation).
def("GetSpringedNormal", &SpringPickup::GetSpringedNormal).
def("SetSpringedNormal", &SpringPickup::SetSpringedNormal).
def("GetSpringedLength", &SpringPickup::GetSpringedLength).
def("SetSpringedLength", &SpringPickup::SetSpringedLength);
class_<BallLassoPickup, bases<SpringPickup>>("BallLassoPickup", no_init);
class_<TornadoPickup, bases<RumblePickupComponentWrapper>>("TornadoPickup", no_init).
def("GetHeight", &TornadoPickup::GetHeight).
def("SetHeight", &TornadoPickup::SetHeight).
def("GetRadius", &TornadoPickup::GetRadius).
def("SetRadius", &TornadoPickup::SetRadius).
def("GetOffset", &TornadoPickup::GetOffset).
def("SetOffset", &TornadoPickup::SetOffset).
def("GetRotationalForce", &TornadoPickup::GetRotationalForce).
def("SetRotationalForce", &TornadoPickup::SetRotationalForce).
def("GetTorque", &TornadoPickup::GetTorque).
def("SetTorque", &TornadoPickup::SetTorque).
def("GetFXScale", &TornadoPickup::GetFXScale).
def("SetFXScale", &TornadoPickup::SetFXScale).
def("GetFXOffset", &TornadoPickup::GetFXOffset).
def("SetFXOffset", &TornadoPickup::SetFXOffset).
def("GetMeshOffset", &TornadoPickup::GetMeshOffset).
def("SetMeshOffset", &TornadoPickup::SetMeshOffset).
def("GetMeshScale", &TornadoPickup::GetMeshScale).
def("SetMeshScale", &TornadoPickup::SetMeshScale).
def("GetMaxVelocityOffset", &TornadoPickup::GetMaxVelocityOffset).
def("SetMaxVelocityOffset", &TornadoPickup::SetMaxVelocityOffset).
def("GetBallMultiplier", &TornadoPickup::GetBallMultiplier).
def("SetBallMultiplier", &TornadoPickup::SetBallMultiplier).
def("GetbDebugVis", &TornadoPickup::GetbDebugVis).
def("SetbDebugVis", &TornadoPickup::SetbDebugVis).
def("GetVelocityEase", &TornadoPickup::GetVelocityEase).
def("SetVelocityEase", &TornadoPickup::SetVelocityEase).
def("GetVel", &TornadoPickup::GetVel).
def("SetVel", &TornadoPickup::SetVel).
def("GetAffecting", &TornadoPickup::GetAffecting);
class_<EngineTAWrapper, bases<ObjectWrapper>>("EngineTAWrapper", no_init).
def("GetbEnableClientPrediction", &EngineTAWrapper::GetbEnableClientPrediction).
def("SetbEnableClientPrediction", &EngineTAWrapper::SetbEnableClientPrediction).
def("GetbClientPhysicsUpdate", &EngineTAWrapper::GetbClientPhysicsUpdate).
def("SetbClientPhysicsUpdate", &EngineTAWrapper::SetbClientPhysicsUpdate).
def("GetbDisableClientCorrections", &EngineTAWrapper::GetbDisableClientCorrections).
def("SetbDisableClientCorrections", &EngineTAWrapper::SetbDisableClientCorrections).
def("GetbDebugClientCorrections", &EngineTAWrapper::GetbDebugClientCorrections).
def("SetbDebugClientCorrections", &EngineTAWrapper::SetbDebugClientCorrections).
def("GetbForceClientCorrection", &EngineTAWrapper::GetbForceClientCorrection).
def("SetbForceClientCorrection", &EngineTAWrapper::SetbForceClientCorrection).
def("GetbDebugSimTimeScale", &EngineTAWrapper::GetbDebugSimTimeScale).
def("SetbDebugSimTimeScale", &EngineTAWrapper::SetbDebugSimTimeScale).
def("GetPhysicsFramerate", &EngineTAWrapper::GetPhysicsFramerate).
def("SetPhysicsFramerate", &EngineTAWrapper::SetPhysicsFramerate).
def("GetMaxPhysicsSubsteps", &EngineTAWrapper::GetMaxPhysicsSubsteps).
def("SetMaxPhysicsSubsteps", &EngineTAWrapper::SetMaxPhysicsSubsteps).
def("GetMaxUploadedClientFrames", &EngineTAWrapper::GetMaxUploadedClientFrames).
def("SetMaxUploadedClientFrames", &EngineTAWrapper::SetMaxUploadedClientFrames).
def("GetMaxClientReplayFrames", &EngineTAWrapper::GetMaxClientReplayFrames).
def("SetMaxClientReplayFrames", &EngineTAWrapper::SetMaxClientReplayFrames).
def("GetPhysicsFrame", &EngineTAWrapper::GetPhysicsFrame).
def("SetPhysicsFrame", &EngineTAWrapper::SetPhysicsFrame).
def("GetRenderAlpha", &EngineTAWrapper::GetRenderAlpha).
def("SetRenderAlpha", &EngineTAWrapper::SetRenderAlpha).
def("GetReplicatedPhysicsFrame", &EngineTAWrapper::GetReplicatedPhysicsFrame).
def("SetReplicatedPhysicsFrame", &EngineTAWrapper::SetReplicatedPhysicsFrame).
def("GetDirtyPhysicsFrame", &EngineTAWrapper::GetDirtyPhysicsFrame).
def("SetDirtyPhysicsFrame", &EngineTAWrapper::SetDirtyPhysicsFrame).
def("GetTickNotifyIndex", &EngineTAWrapper::GetTickNotifyIndex).
def("SetTickNotifyIndex", &EngineTAWrapper::SetTickNotifyIndex).
def("GetShellArchetypePath", &EngineTAWrapper::GetShellArchetypePath).
def("GetLastBugReportTime", &EngineTAWrapper::GetLastBugReportTime).
def("SetLastBugReportTime", &EngineTAWrapper::SetLastBugReportTime).
def("GetDebugClientCorrectionStartTime", &EngineTAWrapper::GetDebugClientCorrectionStartTime).
def("SetDebugClientCorrectionStartTime", &EngineTAWrapper::SetDebugClientCorrectionStartTime).
def("GetDebugClientCorrectionCount", &EngineTAWrapper::GetDebugClientCorrectionCount).
def("SetDebugClientCorrectionCount", &EngineTAWrapper::SetDebugClientCorrectionCount).
def("GetStatGraphs", &EngineTAWrapper::GetStatGraphs).
def("SetStatGraphs", &EngineTAWrapper::SetStatGraphs);
class_<GameEventWrapper, bases<ActorWrapper>>("GameEventWrapper", no_init).
def("GetGameMode", &GameEventWrapper::GetGameMode).
def("SetGameMode", &GameEventWrapper::SetGameMode).
def("GetReplicatedStateIndex", &GameEventWrapper::GetReplicatedStateIndex).
def("SetReplicatedStateIndex", &GameEventWrapper::SetReplicatedStateIndex).
def("GetCarArchetype", &GameEventWrapper::GetCarArchetype).
def("SetCarArchetype", &GameEventWrapper::SetCarArchetype).
def("GetCountdownTime", &GameEventWrapper::GetCountdownTime).
def("SetCountdownTime", &GameEventWrapper::SetCountdownTime).
def("GetFinishTime", &GameEventWrapper::GetFinishTime).
def("SetFinishTime", &GameEventWrapper::SetFinishTime).
def("GetbMultiplayer", &GameEventWrapper::GetbMultiplayer).
def("SetbMultiplayer", &GameEventWrapper::SetbMultiplayer).
def("GetbFillWithAI", &GameEventWrapper::GetbFillWithAI).
def("SetbFillWithAI", &GameEventWrapper::SetbFillWithAI).
def("GetbAllowReadyUp", &GameEventWrapper::GetbAllowReadyUp).
def("SetbAllowReadyUp", &GameEventWrapper::SetbAllowReadyUp).
def("GetbRestartingMatch", &GameEventWrapper::GetbRestartingMatch).
def("SetbRestartingMatch", &GameEventWrapper::SetbRestartingMatch).
def("GetbRandomizedBotLoadouts", &GameEventWrapper::GetbRandomizedBotLoadouts).
def("SetbRandomizedBotLoadouts", &GameEventWrapper::SetbRandomizedBotLoadouts).
def("GetbHasLeaveMatchPenalty", &GameEventWrapper::GetbHasLeaveMatchPenalty).
def("SetbHasLeaveMatchPenalty", &GameEventWrapper::SetbHasLeaveMatchPenalty).
def("GetbCanVoteToForfeit", &GameEventWrapper::GetbCanVoteToForfeit).
def("SetbCanVoteToForfeit", &GameEventWrapper::SetbCanVoteToForfeit).
def("GetbDisableAimAssist", &GameEventWrapper::GetbDisableAimAssist).
def("SetbDisableAimAssist", &GameEventWrapper::SetbDisableAimAssist).
def("GetMinPlayers", &GameEventWrapper::GetMinPlayers).
def("SetMinPlayers", &GameEventWrapper::SetMinPlayers).
def("GetMaxPlayers", &GameEventWrapper::GetMaxPlayers).
def("SetMaxPlayers", &GameEventWrapper::SetMaxPlayers).
def("GetSpawnPoints", &GameEventWrapper::GetSpawnPoints).
def("GetBotSkill", &GameEventWrapper::GetBotSkill).
def("SetBotSkill", &GameEventWrapper::SetBotSkill).
def("GetRespawnTime", &GameEventWrapper::GetRespawnTime).
def("SetRespawnTime", &GameEventWrapper::SetRespawnTime).
def("GetMatchTimeDilation", &GameEventWrapper::GetMatchTimeDilation).
def("SetMatchTimeDilation", &GameEventWrapper::SetMatchTimeDilation).
def("GetActivator", &GameEventWrapper::GetActivator).
def("SetActivator", &GameEventWrapper::SetActivator).
def("GetActivatorCar", &GameEventWrapper::GetActivatorCar).
def("SetActivatorCar", &GameEventWrapper::SetActivatorCar).
def("GetPRIs", &GameEventWrapper::GetPRIs).
def("GetCars", &GameEventWrapper::GetCars).
def("GetLocalPlayers", &GameEventWrapper::GetLocalPlayers).
def("GetStartPointIndex", &GameEventWrapper::GetStartPointIndex).
def("SetStartPointIndex", &GameEventWrapper::SetStartPointIndex).
def("GetGameStateTimeRemaining", &GameEventWrapper::GetGameStateTimeRemaining).
def("SetGameStateTimeRemaining", &GameEventWrapper::SetGameStateTimeRemaining).
def("GetReplicatedGameStateTimeRemaining", &GameEventWrapper::GetReplicatedGameStateTimeRemaining).
def("SetReplicatedGameStateTimeRemaining", &GameEventWrapper::SetReplicatedGameStateTimeRemaining).
def("GetIdleKickTime", &GameEventWrapper::GetIdleKickTime).
def("SetIdleKickTime", &GameEventWrapper::SetIdleKickTime).
def("GetIdleKickWarningTime", &GameEventWrapper::GetIdleKickWarningTime).
def("SetIdleKickWarningTime", &GameEventWrapper::SetIdleKickWarningTime).
def("GetGameOwner", &GameEventWrapper::GetGameOwner).
def("SetGameOwner", &GameEventWrapper::SetGameOwner).
def("GetRichPresenceString", &GameEventWrapper::GetRichPresenceString).
def("GetReplicatedRoundCountDownNumber", &GameEventWrapper::GetReplicatedRoundCountDownNumber).
def("SetReplicatedRoundCountDownNumber", &GameEventWrapper::SetReplicatedRoundCountDownNumber);
class_<TeamGameEventWrapper, bases<GameEventWrapper>>("TeamGameEventWrapper", no_init).
def("GetTeamArchetypes", &TeamGameEventWrapper::GetTeamArchetypes).
def("GetTeams", &TeamGameEventWrapper::GetTeams).
def("GetMaxTeamSize", &TeamGameEventWrapper::GetMaxTeamSize).
def("SetMaxTeamSize", &TeamGameEventWrapper::SetMaxTeamSize).
def("GetNumBots", &TeamGameEventWrapper::GetNumBots).
def("SetNumBots", &TeamGameEventWrapper::SetNumBots).
def("GetbMuteOppositeTeams", &TeamGameEventWrapper::GetbMuteOppositeTeams).
def("SetbMuteOppositeTeams", &TeamGameEventWrapper::SetbMuteOppositeTeams).
def("GetbDisableMutingOtherTeam", &TeamGameEventWrapper::GetbDisableMutingOtherTeam).
def("SetbDisableMutingOtherTeam", &TeamGameEventWrapper::SetbDisableMutingOtherTeam).
def("GetbForfeit", &TeamGameEventWrapper::GetbForfeit).
def("SetbForfeit", &TeamGameEventWrapper::SetbForfeit).
def("GetbUnfairTeams", &TeamGameEventWrapper::GetbUnfairTeams).
def("SetbUnfairTeams", &TeamGameEventWrapper::SetbUnfairTeams).
def("GetbAlwaysAutoSelectTeam", &TeamGameEventWrapper::GetbAlwaysAutoSelectTeam).
def("SetbAlwaysAutoSelectTeam", &TeamGameEventWrapper::SetbAlwaysAutoSelectTeam);
class_<GoalWrapper, bases<ObjectWrapper>>("GoalWrapper", no_init).
def("GetGoalOrientation", &GoalWrapper::GetGoalOrientation).
def("SetGoalOrientation", &GoalWrapper::SetGoalOrientation).
def("GetOverrideGoalIndicatorOrientations", &GoalWrapper::GetOverrideGoalIndicatorOrientations).
def("GetTeamNum", &GoalWrapper::GetTeamNum).
def("SetTeamNum", &GoalWrapper::SetTeamNum).
def("GetGoalIndicatorArchetype", &GoalWrapper::GetGoalIndicatorArchetype).
def("GetbNoGoalIndicator", &GoalWrapper::GetbNoGoalIndicator).
def("SetbNoGoalIndicator", &GoalWrapper::SetbNoGoalIndicator).
def("GetbOnlyGoalsFromDirection", &GoalWrapper::GetbOnlyGoalsFromDirection).
def("SetbOnlyGoalsFromDirection", &GoalWrapper::SetbOnlyGoalsFromDirection).
def("GetbShowFocusExtent", &GoalWrapper::GetbShowFocusExtent).
def("SetbShowFocusExtent", &GoalWrapper::SetbShowFocusExtent).
def("GetGoalDirection", &GoalWrapper::GetGoalDirection).
def("SetGoalDirection", &GoalWrapper::SetGoalDirection).
def("GetPointsToAward", &GoalWrapper::GetPointsToAward).
def("SetPointsToAward", &GoalWrapper::SetPointsToAward).
def("GetAutoCamFocusExtent", &GoalWrapper::GetAutoCamFocusExtent).
def("SetAutoCamFocusExtent", &GoalWrapper::SetAutoCamFocusExtent).
def("GetGoalFocusLocationOffset", &GoalWrapper::GetGoalFocusLocationOffset).
def("SetGoalFocusLocationOffset", &GoalWrapper::SetGoalFocusLocationOffset).
def("GetMaxGoalScorerAttachRadius", &GoalWrapper::GetMaxGoalScorerAttachRadius).
def("SetMaxGoalScorerAttachRadius", &GoalWrapper::SetMaxGoalScorerAttachRadius).
def("GetGoalScoredDotDirection", &GoalWrapper::GetGoalScoredDotDirection).
def("SetGoalScoredDotDirection", &GoalWrapper::SetGoalScoredDotDirection).
def("GetMinAttachGoalToScorerDot", &GoalWrapper::GetMinAttachGoalToScorerDot).
def("SetMinAttachGoalToScorerDot", &GoalWrapper::SetMinAttachGoalToScorerDot).
def("GetLocation", &GoalWrapper::GetLocation).
def("SetLocation", &GoalWrapper::SetLocation).
def("GetDirection", &GoalWrapper::GetDirection).
def("SetDirection", &GoalWrapper::SetDirection).
def("GetRight", &GoalWrapper::GetRight).
def("SetRight", &GoalWrapper::SetRight).
def("GetUp", &GoalWrapper::GetUp).
def("SetUp", &GoalWrapper::SetUp).
def("GetRotation", &GoalWrapper::GetRotation).
def("SetRotation", &GoalWrapper::SetRotation).
def("GetLocalExtent", &GoalWrapper::GetLocalExtent).
def("SetLocalExtent", &GoalWrapper::SetLocalExtent).
def("GetWorldCenter", &GoalWrapper::GetWorldCenter).
def("SetWorldCenter", &GoalWrapper::SetWorldCenter).
def("GetWorldExtent", &GoalWrapper::GetWorldExtent).
def("SetWorldExtent", &GoalWrapper::SetWorldExtent).
def("GetWorldFrontCenter", &GoalWrapper::GetWorldFrontCenter).
def("SetWorldFrontCenter", &GoalWrapper::SetWorldFrontCenter);
class_<VehicleWrapper, bases<RBActorWrapper>>("VehicleWrapper", no_init).
def("GetVehicleSim", &VehicleWrapper::GetVehicleSim).
def("SetVehicleSim", &VehicleWrapper::SetVehicleSim).
def("GetbDriving", &VehicleWrapper::GetbDriving).
def("SetbDriving", &VehicleWrapper::SetbDriving).
def("GetbReplicatedHandbrake", &VehicleWrapper::GetbReplicatedHandbrake).
def("SetbReplicatedHandbrake", &VehicleWrapper::SetbReplicatedHandbrake).
def("GetbJumped", &VehicleWrapper::GetbJumped).
def("SetbJumped", &VehicleWrapper::SetbJumped).
def("GetbDoubleJumped", &VehicleWrapper::GetbDoubleJumped).
def("SetbDoubleJumped", &VehicleWrapper::SetbDoubleJumped).
def("GetbOnGround", &VehicleWrapper::GetbOnGround).
def("SetbOnGround", &VehicleWrapper::SetbOnGround).
def("GetbSuperSonic", &VehicleWrapper::GetbSuperSonic).
def("SetbSuperSonic", &VehicleWrapper::SetbSuperSonic).
def("GetbPodiumMode", &VehicleWrapper::GetbPodiumMode).
def("SetbPodiumMode", &VehicleWrapper::SetbPodiumMode).
def("GetInput", &VehicleWrapper::GetInput).
def("SetInput", &VehicleWrapper::SetInput).
def("GetReplicatedThrottle", &VehicleWrapper::GetReplicatedThrottle).
def("SetReplicatedThrottle", &VehicleWrapper::SetReplicatedThrottle).
def("GetReplicatedSteer", &VehicleWrapper::GetReplicatedSteer).
def("SetReplicatedSteer", &VehicleWrapper::SetReplicatedSteer).
def("GetPlayerController", &VehicleWrapper::GetPlayerController).
def("SetPlayerController", &VehicleWrapper::SetPlayerController).
def("GetPRI", &VehicleWrapper::GetPRI).
def("SetPRI", &VehicleWrapper::SetPRI).
def("GetVehicleUpdateTag", &VehicleWrapper::GetVehicleUpdateTag).
def("SetVehicleUpdateTag", &VehicleWrapper::SetVehicleUpdateTag).
def("GetLocalCollisionOffset", &VehicleWrapper::GetLocalCollisionOffset).
def("SetLocalCollisionOffset", &VehicleWrapper::SetLocalCollisionOffset).
def("GetLocalCollisionExtent", &VehicleWrapper::GetLocalCollisionExtent).
def("SetLocalCollisionExtent", &VehicleWrapper::SetLocalCollisionExtent).
def("GetLastBallTouchFrame", &VehicleWrapper::GetLastBallTouchFrame).
def("SetLastBallTouchFrame", &VehicleWrapper::SetLastBallTouchFrame).
def("GetLastBallImpactFrame", &VehicleWrapper::GetLastBallImpactFrame).
def("SetLastBallImpactFrame", &VehicleWrapper::SetLastBallImpactFrame).
def("GetBoostComponent", &VehicleWrapper::GetBoostComponent).
def("GetDodgeComponent", &VehicleWrapper::GetDodgeComponent).
def("GetAirControlComponent", &VehicleWrapper::GetAirControlComponent).
def("GetJumpComponent", &VehicleWrapper::GetJumpComponent).
def("GetDoubleJumpComponent", &VehicleWrapper::GetDoubleJumpComponent).
def("SetDoubleJumpComponent", &VehicleWrapper::SetDoubleJumpComponent).
def("GetTimeBelowSupersonicSpeed", &VehicleWrapper::GetTimeBelowSupersonicSpeed).
def("SetTimeBelowSupersonicSpeed", &VehicleWrapper::SetTimeBelowSupersonicSpeed);
class_<ReplayWrapper, bases<ObjectWrapper>>("ReplayWrapper", no_init).
def("GetReplayName", &ReplayWrapper::GetReplayName).
def("GetEngineVersion", &ReplayWrapper::GetEngineVersion).
def("SetEngineVersion", &ReplayWrapper::SetEngineVersion).
def("GetLicenseeVersion", &ReplayWrapper::GetLicenseeVersion).
def("SetLicenseeVersion", &ReplayWrapper::SetLicenseeVersion).
def("GetNetVersion", &ReplayWrapper::GetNetVersion).
def("SetNetVersion", &ReplayWrapper::SetNetVersion).
def("GetReplayVersion", &ReplayWrapper::GetReplayVersion).
def("SetReplayVersion", &ReplayWrapper::SetReplayVersion).
def("GetGameVersion", &ReplayWrapper::GetGameVersion).
def("SetGameVersion", &ReplayWrapper::SetGameVersion).
def("GetBuildID", &ReplayWrapper::GetBuildID).
def("SetBuildID", &ReplayWrapper::SetBuildID).
def("GetChangelist", &ReplayWrapper::GetChangelist).
def("SetChangelist", &ReplayWrapper::SetChangelist).
def("GetBuildVersion", &ReplayWrapper::GetBuildVersion).
def("GetRecordFPS", &ReplayWrapper::GetRecordFPS).
def("SetRecordFPS", &ReplayWrapper::SetRecordFPS).
def("GetKeyframeDelay", &ReplayWrapper::GetKeyframeDelay).
def("SetKeyframeDelay", &ReplayWrapper::SetKeyframeDelay).
def("GetMaxChannels", &ReplayWrapper::GetMaxChannels).
def("SetMaxChannels", &ReplayWrapper::SetMaxChannels).
def("GetMaxReplaySizeMB", &ReplayWrapper::GetMaxReplaySizeMB).
def("SetMaxReplaySizeMB", &ReplayWrapper::SetMaxReplaySizeMB).
def("GetFilename", &ReplayWrapper::GetFilename).
def("GetId", &ReplayWrapper::GetId).
def("GetDate", &ReplayWrapper::GetDate).
def("GetNumFrames", &ReplayWrapper::GetNumFrames).
def("SetNumFrames", &ReplayWrapper::SetNumFrames).
def("GetPlayerName", &ReplayWrapper::GetPlayerName).
def("GetbFileCorrupted", &ReplayWrapper::GetbFileCorrupted).
def("SetbFileCorrupted", &ReplayWrapper::SetbFileCorrupted).
def("GetbForceKeyframe", &ReplayWrapper::GetbForceKeyframe).
def("SetbForceKeyframe", &ReplayWrapper::SetbForceKeyframe).
def("GetbLoadedNetPackages", &ReplayWrapper::GetbLoadedNetPackages).
def("SetbLoadedNetPackages", &ReplayWrapper::SetbLoadedNetPackages).
def("GetbDebug", &ReplayWrapper::GetbDebug).
def("SetbDebug", &ReplayWrapper::SetbDebug).
def("GetReplayState", &ReplayWrapper::GetReplayState).
def("SetReplayState", &ReplayWrapper::SetReplayState).
def("GetCurrentFrame", &ReplayWrapper::GetCurrentFrame).
def("SetCurrentFrame", &ReplayWrapper::SetCurrentFrame).
def("GetNextKeyframe", &ReplayWrapper::GetNextKeyframe).
def("SetNextKeyframe", &ReplayWrapper::SetNextKeyframe).
//def("GetCurrentTime", &ReplayWrapper::GetTickCount).
def("SetCurrentTime", &ReplayWrapper::SetCurrentTime).
def("GetAccumulatedDeltaTime", &ReplayWrapper::GetAccumulatedDeltaTime).
def("SetAccumulatedDeltaTime", &ReplayWrapper::SetAccumulatedDeltaTime).
def("GetTimeToSkipTo", &ReplayWrapper::GetTimeToSkipTo).
def("SetTimeToSkipTo", &ReplayWrapper::SetTimeToSkipTo).
def("GetFrameToSkipTo", &ReplayWrapper::GetFrameToSkipTo).
def("SetFrameToSkipTo", &ReplayWrapper::SetFrameToSkipTo).
def("GetPlayersOnlyTicks", &ReplayWrapper::GetPlayersOnlyTicks).
def("SetPlayersOnlyTicks", &ReplayWrapper::SetPlayersOnlyTicks);
class_<SampleHistoryWrapper, bases<ObjectWrapper>>("SampleHistoryWrapper", no_init).
def("GetRecordSettings", &SampleHistoryWrapper::GetRecordSettings).
def("SetRecordSettings", &SampleHistoryWrapper::SetRecordSettings).
def("GetTitle", &SampleHistoryWrapper::GetTitle).
def("GetYMin", &SampleHistoryWrapper::GetYMin).
def("SetYMin", &SampleHistoryWrapper::SetYMin).
def("GetYMax", &SampleHistoryWrapper::GetYMax).
def("SetYMax", &SampleHistoryWrapper::SetYMax).
def("GetGoodValue", &SampleHistoryWrapper::GetGoodValue).
def("SetGoodValue", &SampleHistoryWrapper::SetGoodValue).
def("GetBadValue", &SampleHistoryWrapper::GetBadValue).
def("SetBadValue", &SampleHistoryWrapper::SetBadValue).
def("GetBaseValue", &SampleHistoryWrapper::GetBaseValue).
def("SetBaseValue", &SampleHistoryWrapper::SetBaseValue).
def("GetSampleIndex", &SampleHistoryWrapper::GetSampleIndex).
def("SetSampleIndex", &SampleHistoryWrapper::SetSampleIndex).
def("GetAccumTime", &SampleHistoryWrapper::GetAccumTime).
def("SetAccumTime", &SampleHistoryWrapper::SetAccumTime).
def("GetPendingSample", &SampleHistoryWrapper::GetPendingSample).
def("SetPendingSample", &SampleHistoryWrapper::SetPendingSample).
def("GetbHasPendingSample", &SampleHistoryWrapper::GetbHasPendingSample).
def("SetbHasPendingSample", &SampleHistoryWrapper::SetbHasPendingSample);
class_<SampleRecordSettingsWrapper, bases<ObjectWrapper>>("SampleRecordSettingsWrapper", no_init).
def("GetMaxSampleAge", &SampleRecordSettingsWrapper::GetMaxSampleAge).
def("SetMaxSampleAge", &SampleRecordSettingsWrapper::SetMaxSampleAge).
def("GetRecordRate", &SampleRecordSettingsWrapper::GetRecordRate).
def("SetRecordRate", &SampleRecordSettingsWrapper::SetRecordRate);
class_<StatGraphWrapper, bases<ObjectWrapper>>("StatGraphWrapper", no_init).
def("GetRecordSettings", &StatGraphWrapper::GetRecordSettings).
def("SetRecordSettings", &StatGraphWrapper::SetRecordSettings).
def("GetLastTickTime", &StatGraphWrapper::GetLastTickTime).
def("SetLastTickTime", &StatGraphWrapper::SetLastTickTime).
def("GetSampleHistories", &StatGraphWrapper::GetSampleHistories);
class_<InputBufferGraphWrapper, bases<StatGraphWrapper>>("InputBufferGraphWrapper", no_init).
def("GetBuffer", &InputBufferGraphWrapper::GetBuffer).
def("SetBuffer", &InputBufferGraphWrapper::SetBuffer).
def("GetBufferMax", &InputBufferGraphWrapper::GetBufferMax).
def("SetBufferMax", &InputBufferGraphWrapper::SetBufferMax).
def("GetOverUnderFrames", &InputBufferGraphWrapper::GetOverUnderFrames).
def("SetOverUnderFrames", &InputBufferGraphWrapper::SetOverUnderFrames).
def("GetPhysicsRate", &InputBufferGraphWrapper::GetPhysicsRate).
def("SetPhysicsRate", &InputBufferGraphWrapper::SetPhysicsRate).
def("GetMaxPhysicsRate", &InputBufferGraphWrapper::GetMaxPhysicsRate).
def("SetMaxPhysicsRate", &InputBufferGraphWrapper::SetMaxPhysicsRate).
def("GetMinPhysicsRate", &InputBufferGraphWrapper::GetMinPhysicsRate).
def("SetMinPhysicsRate", &InputBufferGraphWrapper::SetMinPhysicsRate);
class_<NetStatGraphWrapper, bases<StatGraphWrapper>>("NetStatGraphWrapper", no_init).
def("GetPacketsOut", &NetStatGraphWrapper::GetPacketsOut).
def("SetPacketsOut", &NetStatGraphWrapper::SetPacketsOut).
def("GetPacketsIn", &NetStatGraphWrapper::GetPacketsIn).
def("SetPacketsIn", &NetStatGraphWrapper::SetPacketsIn).
def("GetLostPacketsOut", &NetStatGraphWrapper::GetLostPacketsOut).
def("SetLostPacketsOut", &NetStatGraphWrapper::SetLostPacketsOut).
def("GetLostPacketsIn", &NetStatGraphWrapper::GetLostPacketsIn).
def("SetLostPacketsIn", &NetStatGraphWrapper::SetLostPacketsIn).
def("GetBytesOut", &NetStatGraphWrapper::GetBytesOut).
def("SetBytesOut", &NetStatGraphWrapper::SetBytesOut).
def("GetBytesIn", &NetStatGraphWrapper::GetBytesIn).
def("SetBytesIn", &NetStatGraphWrapper::SetBytesIn).
def("GetLatency", &NetStatGraphWrapper::GetLatency).
def("SetLatency", &NetStatGraphWrapper::SetLatency).
def("GetExpectedOutPacketRate", &NetStatGraphWrapper::GetExpectedOutPacketRate).
def("SetExpectedOutPacketRate", &NetStatGraphWrapper::SetExpectedOutPacketRate).
def("GetExpectedInPacketRate", &NetStatGraphWrapper::GetExpectedInPacketRate).
def("SetExpectedInPacketRate", &NetStatGraphWrapper::SetExpectedInPacketRate).
def("GetMaxBytesRate", &NetStatGraphWrapper::GetMaxBytesRate).
def("SetMaxBytesRate", &NetStatGraphWrapper::SetMaxBytesRate);
class_<PerfStatGraphWrapper, bases<StatGraphWrapper>>("PerfStatGraphWrapper", no_init).
def("GetFPS", &PerfStatGraphWrapper::GetFPS).
def("SetFPS", &PerfStatGraphWrapper::SetFPS).
def("GetFrameTime", &PerfStatGraphWrapper::GetFrameTime).
def("SetFrameTime", &PerfStatGraphWrapper::SetFrameTime).
def("GetGameThreadTime", &PerfStatGraphWrapper::GetGameThreadTime).
def("SetGameThreadTime", &PerfStatGraphWrapper::SetGameThreadTime).
def("GetRenderThreadTime", &PerfStatGraphWrapper::GetRenderThreadTime).
def("SetRenderThreadTime", &PerfStatGraphWrapper::SetRenderThreadTime).
def("GetGPUFrameTime", &PerfStatGraphWrapper::GetGPUFrameTime).
def("SetGPUFrameTime", &PerfStatGraphWrapper::SetGPUFrameTime).
def("GetFrameTimeHistories", &PerfStatGraphWrapper::GetFrameTimeHistories).
def("GetMaxFPS", &PerfStatGraphWrapper::GetMaxFPS).
def("SetMaxFPS", &PerfStatGraphWrapper::SetMaxFPS).
def("GetTargetFPS", &PerfStatGraphWrapper::GetTargetFPS).
def("SetTargetFPS", &PerfStatGraphWrapper::SetTargetFPS);
class_<StatGraphSystemWrapper, bases<ObjectWrapper>>("StatGraphSystemWrapper", no_init).
def("GetGraphSampleTime", &StatGraphSystemWrapper::GetGraphSampleTime).
def("SetGraphSampleTime", &StatGraphSystemWrapper::SetGraphSampleTime).
def("GetGraphLevel", &StatGraphSystemWrapper::GetGraphLevel).
def("SetGraphLevel", &StatGraphSystemWrapper::SetGraphLevel).
def("GetPerfStatGraph", &StatGraphSystemWrapper::GetPerfStatGraph).
def("SetPerfStatGraph", &StatGraphSystemWrapper::SetPerfStatGraph).
def("GetNetStatGraph", &StatGraphSystemWrapper::GetNetStatGraph).
def("SetNetStatGraph", &StatGraphSystemWrapper::SetNetStatGraph).
def("GetInputBufferGraph", &StatGraphSystemWrapper::GetInputBufferGraph).
def("SetInputBufferGraph", &StatGraphSystemWrapper::SetInputBufferGraph).
def("GetStatGraphs", &StatGraphSystemWrapper::GetStatGraphs).
def("GetVisibleStatGraphs", &StatGraphSystemWrapper::GetVisibleStatGraphs);
class_<TeamWrapper, bases<ActorWrapper>>("TeamWrapper", no_init).
def("GetFontColor", &TeamWrapper::GetFontColor).
def("SetFontColor", &TeamWrapper::SetFontColor).
def("GetColorBlindFontColor", &TeamWrapper::GetColorBlindFontColor).
def("SetColorBlindFontColor", &TeamWrapper::SetColorBlindFontColor).
def("GetGameEvent", &TeamWrapper::GetGameEvent).
def("SetGameEvent", &TeamWrapper::SetGameEvent).
def("GetMembers", &TeamWrapper::GetMembers).
def("GetCustomTeamName", &TeamWrapper::GetCustomTeamName).
def("GetSanitizedTeamName", &TeamWrapper::GetSanitizedTeamName).
def("GetClubID", &TeamWrapper::GetClubID).
def("SetClubID", &TeamWrapper::SetClubID).
def("GetbForfeit", &TeamWrapper::GetbForfeit).
def("SetbForfeit", &TeamWrapper::SetbForfeit);
class_<VehiclePickupWrapper, bases<ActorWrapper>>("VehiclePickupWrapper", no_init).
def("GetRespawnDelay", &VehiclePickupWrapper::GetRespawnDelay).
def("SetRespawnDelay", &VehiclePickupWrapper::SetRespawnDelay).
def("GetbPickedUp", &VehiclePickupWrapper::GetbPickedUp).
def("SetbPickedUp", &VehiclePickupWrapper::SetbPickedUp).
def("GetbNetRelevant", &VehiclePickupWrapper::GetbNetRelevant).
def("SetbNetRelevant", &VehiclePickupWrapper::SetbNetRelevant).
def("GetbNoPickup", &VehiclePickupWrapper::GetbNoPickup).
def("SetbNoPickup", &VehiclePickupWrapper::SetbNoPickup);
class_<VehicleSimWrapper, bases<ObjectWrapper>>("VehicleSimWrapper", no_init).
def("GetWheels", &VehicleSimWrapper::GetWheels).
def("GetDriveTorque", &VehicleSimWrapper::GetDriveTorque).
def("SetDriveTorque", &VehicleSimWrapper::SetDriveTorque).
def("GetBrakeTorque", &VehicleSimWrapper::GetBrakeTorque).
def("SetBrakeTorque", &VehicleSimWrapper::SetBrakeTorque).
def("GetStopThreshold", &VehicleSimWrapper::GetStopThreshold).
def("SetStopThreshold", &VehicleSimWrapper::SetStopThreshold).
def("GetIdleBrakeFactor", &VehicleSimWrapper::GetIdleBrakeFactor).
def("SetIdleBrakeFactor", &VehicleSimWrapper::SetIdleBrakeFactor).
def("GetOppositeBrakeFactor", &VehicleSimWrapper::GetOppositeBrakeFactor).
def("SetOppositeBrakeFactor", &VehicleSimWrapper::SetOppositeBrakeFactor).
def("GetbUseAckermannSteering", &VehicleSimWrapper::GetbUseAckermannSteering).
def("SetbUseAckermannSteering", &VehicleSimWrapper::SetbUseAckermannSteering).
def("GetbWasAttached", &VehicleSimWrapper::GetbWasAttached).
def("SetbWasAttached", &VehicleSimWrapper::SetbWasAttached).
def("GetOutputThrottle", &VehicleSimWrapper::GetOutputThrottle).
def("SetOutputThrottle", &VehicleSimWrapper::SetOutputThrottle).
def("GetOutputSteer", &VehicleSimWrapper::GetOutputSteer).
def("SetOutputSteer", &VehicleSimWrapper::SetOutputSteer).
def("GetOutputBrake", &VehicleSimWrapper::GetOutputBrake).
def("SetOutputBrake", &VehicleSimWrapper::SetOutputBrake).
def("GetOutputHandbrake", &VehicleSimWrapper::GetOutputHandbrake).
def("SetOutputHandbrake", &VehicleSimWrapper::SetOutputHandbrake).
def("GetVehicle", &VehicleSimWrapper::GetVehicle).
def("SetVehicle", &VehicleSimWrapper::SetVehicle).
def("GetCar", &VehicleSimWrapper::GetCar).
def("SetCar", &VehicleSimWrapper::SetCar).
def("GetSteeringSensitivity", &VehicleSimWrapper::GetSteeringSensitivity).
def("SetSteeringSensitivity", &VehicleSimWrapper::SetSteeringSensitivity);
class_<WheelWrapper, bases<ObjectWrapper>>("WheelWrapper", no_init).
def("GetSteerFactor", &WheelWrapper::GetSteerFactor).
def("SetSteerFactor", &WheelWrapper::SetSteerFactor).
def("GetWheelRadius", &WheelWrapper::GetWheelRadius).
def("SetWheelRadius", &WheelWrapper::SetWheelRadius).
def("GetSuspensionStiffness", &WheelWrapper::GetSuspensionStiffness).
def("SetSuspensionStiffness", &WheelWrapper::SetSuspensionStiffness).
def("GetSuspensionDampingCompression", &WheelWrapper::GetSuspensionDampingCompression).
def("SetSuspensionDampingCompression", &WheelWrapper::SetSuspensionDampingCompression).
def("GetSuspensionDampingRelaxation", &WheelWrapper::GetSuspensionDampingRelaxation).
def("SetSuspensionDampingRelaxation", &WheelWrapper::SetSuspensionDampingRelaxation).
def("GetSuspensionTravel", &WheelWrapper::GetSuspensionTravel).
def("SetSuspensionTravel", &WheelWrapper::SetSuspensionTravel).
def("GetSuspensionMaxRaise", &WheelWrapper::GetSuspensionMaxRaise).
def("SetSuspensionMaxRaise", &WheelWrapper::SetSuspensionMaxRaise).
def("GetContactForceDistance", &WheelWrapper::GetContactForceDistance).
def("SetContactForceDistance", &WheelWrapper::SetContactForceDistance).
def("GetSpinSpeedDecayRate", &WheelWrapper::GetSpinSpeedDecayRate).
def("SetSpinSpeedDecayRate", &WheelWrapper::SetSpinSpeedDecayRate).
def("GetBoneOffset", &WheelWrapper::GetBoneOffset).
def("SetBoneOffset", &WheelWrapper::SetBoneOffset).
def("GetPresetRestPosition", &WheelWrapper::GetPresetRestPosition).
def("SetPresetRestPosition", &WheelWrapper::SetPresetRestPosition).
def("GetLocalSuspensionRayStart", &WheelWrapper::GetLocalSuspensionRayStart).
def("SetLocalSuspensionRayStart", &WheelWrapper::SetLocalSuspensionRayStart).
def("GetLocalRestPosition", &WheelWrapper::GetLocalRestPosition).
def("SetLocalRestPosition", &WheelWrapper::SetLocalRestPosition).
def("GetVehicleSim", &WheelWrapper::GetVehicleSim).
def("SetVehicleSim", &WheelWrapper::SetVehicleSim).
def("GetWheelIndex", &WheelWrapper::GetWheelIndex).
def("SetWheelIndex", &WheelWrapper::SetWheelIndex).
def("GetbDrawDebug", &WheelWrapper::GetbDrawDebug).
def("SetbDrawDebug", &WheelWrapper::SetbDrawDebug).
def("GetbHadContact", &WheelWrapper::GetbHadContact).
def("SetbHadContact", &WheelWrapper::SetbHadContact).
def("GetFrictionCurveInput", &WheelWrapper::GetFrictionCurveInput).
def("SetFrictionCurveInput", &WheelWrapper::SetFrictionCurveInput).
def("GetAerialThrottleToVelocityFactor", &WheelWrapper::GetAerialThrottleToVelocityFactor).
def("SetAerialThrottleToVelocityFactor", &WheelWrapper::SetAerialThrottleToVelocityFactor).
def("GetAerialAccelerationFactor", &WheelWrapper::GetAerialAccelerationFactor).
def("SetAerialAccelerationFactor", &WheelWrapper::SetAerialAccelerationFactor).
def("GetSpinSpeed", &WheelWrapper::GetSpinSpeed).
def("SetSpinSpeed", &WheelWrapper::SetSpinSpeed);
class_<PriWrapper, bases<PlayerReplicationInfoWrapper>>("PriWrapper", no_init).
def("GetMatchScore", &PriWrapper::GetMatchScore).
def("SetMatchScore", &PriWrapper::SetMatchScore).
def("GetMatchGoals", &PriWrapper::GetMatchGoals).
def("SetMatchGoals", &PriWrapper::SetMatchGoals).
def("GetMatchOwnGoals", &PriWrapper::GetMatchOwnGoals).
def("SetMatchOwnGoals", &PriWrapper::SetMatchOwnGoals).
def("GetMatchAssists", &PriWrapper::GetMatchAssists).
def("SetMatchAssists", &PriWrapper::SetMatchAssists).
def("GetMatchSaves", &PriWrapper::GetMatchSaves).
def("SetMatchSaves", &PriWrapper::SetMatchSaves).
def("GetMatchShots", &PriWrapper::GetMatchShots).
def("SetMatchShots", &PriWrapper::SetMatchShots).
def("GetMatchDemolishes", &PriWrapper::GetMatchDemolishes).
def("SetMatchDemolishes", &PriWrapper::SetMatchDemolishes).
def("GetMatchBonusXP", &PriWrapper::GetMatchBonusXP).
def("SetMatchBonusXP", &PriWrapper::SetMatchBonusXP).
def("GetMatchBreakoutDamage", &PriWrapper::GetMatchBreakoutDamage).
def("SetMatchBreakoutDamage", &PriWrapper::SetMatchBreakoutDamage).
def("GetbMatchMVP", &PriWrapper::GetbMatchMVP).
def("SetbMatchMVP", &PriWrapper::SetbMatchMVP).
def("GetbMatchAdmin", &PriWrapper::GetbMatchAdmin).
def("SetbMatchAdmin", &PriWrapper::SetbMatchAdmin).
def("GetbLoadoutSet", &PriWrapper::GetbLoadoutSet).
def("SetbLoadoutSet", &PriWrapper::SetbLoadoutSet).
def("GetbOnlineLoadoutSet", &PriWrapper::GetbOnlineLoadoutSet).
def("SetbOnlineLoadoutSet", &PriWrapper::SetbOnlineLoadoutSet).
def("GetbLoadoutsSet", &PriWrapper::GetbLoadoutsSet).
def("SetbLoadoutsSet", &PriWrapper::SetbLoadoutsSet).
def("GetbOnlineLoadoutsSet", &PriWrapper::GetbOnlineLoadoutsSet).
def("SetbOnlineLoadoutsSet", &PriWrapper::SetbOnlineLoadoutsSet).
def("GetbTeamPaintSet", &PriWrapper::GetbTeamPaintSet).
def("SetbTeamPaintSet", &PriWrapper::SetbTeamPaintSet).
def("GetbReady", &PriWrapper::GetbReady).
def("SetbReady", &PriWrapper::SetbReady).
def("GetbBusy", &PriWrapper::GetbBusy).
def("SetbBusy", &PriWrapper::SetbBusy).
def("GetbUsingSecondaryCamera", &PriWrapper::GetbUsingSecondaryCamera).
def("SetbUsingSecondaryCamera", &PriWrapper::SetbUsingSecondaryCamera).
def("GetbUsingBehindView", &PriWrapper::GetbUsingBehindView).
def("SetbUsingBehindView", &PriWrapper::SetbUsingBehindView).
def("GetbUsingFreecam", &PriWrapper::GetbUsingFreecam).
def("SetbUsingFreecam", &PriWrapper::SetbUsingFreecam).
def("GetbIsInSplitScreen", &PriWrapper::GetbIsInSplitScreen).
def("SetbIsInSplitScreen", &PriWrapper::SetbIsInSplitScreen).
def("GetbDeveloper", &PriWrapper::GetbDeveloper).
def("SetbDeveloper", &PriWrapper::SetbDeveloper).
def("GetbStartVoteToForfeitDisabled", &PriWrapper::GetbStartVoteToForfeitDisabled).
def("SetbStartVoteToForfeitDisabled", &PriWrapper::SetbStartVoteToForfeitDisabled).
def("GetbUsingItems", &PriWrapper::GetbUsingItems).
def("SetbUsingItems", &PriWrapper::SetbUsingItems).
def("GetPlayerHistoryValid", &PriWrapper::GetPlayerHistoryValid).
def("SetPlayerHistoryValid", &PriWrapper::SetPlayerHistoryValid).
def("GetGameEvent", &PriWrapper::GetGameEvent).
def("SetGameEvent", &PriWrapper::SetGameEvent).
def("GetReplicatedGameEvent", &PriWrapper::GetReplicatedGameEvent).
def("SetReplicatedGameEvent", &PriWrapper::SetReplicatedGameEvent).
def("GetCar", &PriWrapper::GetCar).
def("SetCar", &PriWrapper::SetCar).
def("GetRespawnTimeRemaining", &PriWrapper::GetRespawnTimeRemaining).
def("SetRespawnTimeRemaining", &PriWrapper::SetRespawnTimeRemaining).
def("GetWaitingStartTime", &PriWrapper::GetWaitingStartTime).
def("SetWaitingStartTime", &PriWrapper::SetWaitingStartTime).
def("GetTotalGameTimePlayed", &PriWrapper::GetTotalGameTimePlayed).
def("SetTotalGameTimePlayed", &PriWrapper::SetTotalGameTimePlayed).
def("GetCameraSettings", &PriWrapper::GetCameraSettings).
def("SetCameraSettings", &PriWrapper::SetCameraSettings).
def("GetCameraPitch", &PriWrapper::GetCameraPitch).
def("SetCameraPitch", &PriWrapper::SetCameraPitch).
def("GetCameraYaw", &PriWrapper::GetCameraYaw).
def("SetCameraYaw", &PriWrapper::SetCameraYaw).
def("GetPawnType", &PriWrapper::GetPawnType).
def("SetPawnType", &PriWrapper::SetPawnType).
def("GetReplicatedWorstNetQualityBeyondLatency", &PriWrapper::GetReplicatedWorstNetQualityBeyondLatency).
def("SetReplicatedWorstNetQualityBeyondLatency", &PriWrapper::SetReplicatedWorstNetQualityBeyondLatency).
def("GetPartyLeader", &PriWrapper::GetPartyLeader).
def("SetPartyLeader", &PriWrapper::SetPartyLeader).
def("GetTotalXP", &PriWrapper::GetTotalXP).
def("SetTotalXP", &PriWrapper::SetTotalXP).
//def("GetSanitizedPlayerName", &PriWrapper::GetSanitizedPlayerName).
def("GetDodgeInputThreshold", &PriWrapper::GetDodgeInputThreshold).
def("SetDodgeInputThreshold", &PriWrapper::SetDodgeInputThreshold).
def("GetSteeringSensitivity", &PriWrapper::GetSteeringSensitivity).
def("SetSteeringSensitivity", &PriWrapper::SetSteeringSensitivity).
def("GetAirControlSensitivity", &PriWrapper::GetAirControlSensitivity).
def("SetAirControlSensitivity", &PriWrapper::SetAirControlSensitivity).
def("GetNextTimeRestrictedStatEventAllowedTime", &PriWrapper::GetNextTimeRestrictedStatEventAllowedTime).
def("SetNextTimeRestrictedStatEventAllowedTime", &PriWrapper::SetNextTimeRestrictedStatEventAllowedTime).
def("GetLastTimeRestrictedStatEventTime", &PriWrapper::GetLastTimeRestrictedStatEventTime).
def("SetLastTimeRestrictedStatEventTime", &PriWrapper::SetLastTimeRestrictedStatEventTime).
def("GetTimeTillItem", &PriWrapper::GetTimeTillItem).
def("SetTimeTillItem", &PriWrapper::SetTimeTillItem).
def("GetMaxTimeTillItem", &PriWrapper::GetMaxTimeTillItem).
def("SetMaxTimeTillItem", &PriWrapper::SetMaxTimeTillItem).
def("GetBoostPickups", &PriWrapper::GetBoostPickups).
def("SetBoostPickups", &PriWrapper::SetBoostPickups).
def("GetBallTouches", &PriWrapper::GetBallTouches).
def("SetBallTouches", &PriWrapper::SetBallTouches).
def("GetCarTouches", &PriWrapper::GetCarTouches).
def("SetCarTouches", &PriWrapper::SetCarTouches).
def("GetReplacingBotPRI", &PriWrapper::GetReplacingBotPRI).
def("SetReplacingBotPRI", &PriWrapper::SetReplacingBotPRI).
def("GetClubID", &PriWrapper::GetClubID).
def("SetClubID", &PriWrapper::SetClubID).
def("GetPublicIP", &PriWrapper::GetPublicIP).
def("GetSpectatorShortcut", &PriWrapper::GetSpectatorShortcut).
def("SetSpectatorShortcut", &PriWrapper::SetSpectatorShortcut);
class_<CarWrapper, bases<VehicleWrapper>>("CarWrapper", no_init).
def("GetDefaultCarComponents", &CarWrapper::GetDefaultCarComponents).
def("GetFlipComponent", &CarWrapper::GetFlipComponent).
def("GetDemolishTarget", &CarWrapper::GetDemolishTarget).
def("SetDemolishTarget", &CarWrapper::SetDemolishTarget).
def("GetDemolishSpeed", &CarWrapper::GetDemolishSpeed).
def("SetDemolishSpeed", &CarWrapper::SetDemolishSpeed).
def("GetbLoadoutSet", &CarWrapper::GetbLoadoutSet).
def("SetbLoadoutSet", &CarWrapper::SetbLoadoutSet).
def("GetbDemolishOnOpposingGround", &CarWrapper::GetbDemolishOnOpposingGround).
def("SetbDemolishOnOpposingGround", &CarWrapper::SetbDemolishOnOpposingGround).
def("GetbWasOnOpposingGround", &CarWrapper::GetbWasOnOpposingGround).
def("SetbWasOnOpposingGround", &CarWrapper::SetbWasOnOpposingGround).
def("GetbDemolishOnGoalZone", &CarWrapper::GetbDemolishOnGoalZone).
def("SetbDemolishOnGoalZone", &CarWrapper::SetbDemolishOnGoalZone).
def("GetbWasInGoalZone", &CarWrapper::GetbWasInGoalZone).
def("SetbWasInGoalZone", &CarWrapper::SetbWasInGoalZone).
def("GetbOverrideHandbrakeOn", &CarWrapper::GetbOverrideHandbrakeOn).
def("SetbOverrideHandbrakeOn", &CarWrapper::SetbOverrideHandbrakeOn).
def("GetbCollidesWithVehicles", &CarWrapper::GetbCollidesWithVehicles).
def("SetbCollidesWithVehicles", &CarWrapper::SetbCollidesWithVehicles).
def("GetbOverrideBoostOn", &CarWrapper::GetbOverrideBoostOn).
def("SetbOverrideBoostOn", &CarWrapper::SetbOverrideBoostOn).
def("GetMaxTimeForDodge", &CarWrapper::GetMaxTimeForDodge).
def("SetMaxTimeForDodge", &CarWrapper::SetMaxTimeForDodge).
def("GetLastWheelsHitBallTime", &CarWrapper::GetLastWheelsHitBallTime).
def("SetLastWheelsHitBallTime", &CarWrapper::SetLastWheelsHitBallTime).
def("GetReplicatedCarScale", &CarWrapper::GetReplicatedCarScale).
def("SetReplicatedCarScale", &CarWrapper::SetReplicatedCarScale).
def("GetAttackerPRI", &CarWrapper::GetAttackerPRI).
def("SetAttackerPRI", &CarWrapper::SetAttackerPRI).
def("GetAttachedBall", &CarWrapper::GetAttachedBall).
def("SetAttachedBall", &CarWrapper::SetAttachedBall).
def("GetMouseAccel", &CarWrapper::GetMouseAccel).
def("SetMouseAccel", &CarWrapper::SetMouseAccel).
def("GetMouseAirAccel", &CarWrapper::GetMouseAirAccel).
def("SetMouseAirAccel", &CarWrapper::SetMouseAirAccel).
def("GetAttachedPickup", &CarWrapper::GetAttachedPickup).
def("SetAttachedPickup", &CarWrapper::SetAttachedPickup).
def("GetReplayFocusOffset", &CarWrapper::GetReplayFocusOffset).
def("SetReplayFocusOffset", &CarWrapper::SetReplayFocusOffset).
def("GetAddedBallForceMultiplier", &CarWrapper::GetAddedBallForceMultiplier).
def("SetAddedBallForceMultiplier", &CarWrapper::SetAddedBallForceMultiplier).
def("GetAddedCarForceMultiplier", &CarWrapper::GetAddedCarForceMultiplier).
def("SetAddedCarForceMultiplier", &CarWrapper::SetAddedCarForceMultiplier).
def("GetGameEvent", &CarWrapper::GetGameEvent).
def("SetGameEvent", &CarWrapper::SetGameEvent);
class_<ServerWrapper, bases<TeamGameEventWrapper>>("ServerWrapper", no_init).
def("GetTestCarArchetype", &ServerWrapper::GetTestCarArchetype).
def("SetTestCarArchetype", &ServerWrapper::SetTestCarArchetype).
def("GetBallArchetype", &ServerWrapper::GetBallArchetype).
def("SetBallArchetype", &ServerWrapper::SetBallArchetype).
def("GetBallSpawnPoint", &ServerWrapper::GetBallSpawnPoint).
def("SetBallSpawnPoint", &ServerWrapper::SetBallSpawnPoint).
def("GetSeriesLength", &ServerWrapper::GetSeriesLength).
def("SetSeriesLength", &ServerWrapper::SetSeriesLength).
def("GetGameTime", &ServerWrapper::GetGameTime).
def("SetGameTime", &ServerWrapper::SetGameTime).
def("GetWarmupTime", &ServerWrapper::GetWarmupTime).
def("SetWarmupTime", &ServerWrapper::SetWarmupTime).
def("GetMaxScore", &ServerWrapper::GetMaxScore).
def("SetMaxScore", &ServerWrapper::SetMaxScore).
def("GetAutoBalanceDifference", &ServerWrapper::GetAutoBalanceDifference).
def("SetAutoBalanceDifference", &ServerWrapper::SetAutoBalanceDifference).
def("GetLastTrialTime", &ServerWrapper::GetLastTrialTime).
def("SetLastTrialTime", &ServerWrapper::SetLastTrialTime).
def("GetScoreSlomoTime", &ServerWrapper::GetScoreSlomoTime).
def("SetScoreSlomoTime", &ServerWrapper::SetScoreSlomoTime).
def("GetGameTimeRemaining", &ServerWrapper::GetGameTimeRemaining).
def("SetGameTimeRemaining", &ServerWrapper::SetGameTimeRemaining).
def("GetSecondsRemaining", &ServerWrapper::GetSecondsRemaining).
def("SetSecondsRemaining", &ServerWrapper::SetSecondsRemaining).
def("GetWaitTimeRemaining", &ServerWrapper::GetWaitTimeRemaining).
def("SetWaitTimeRemaining", &ServerWrapper::SetWaitTimeRemaining).
def("GetTotalGameTimePlayed", &ServerWrapper::GetTotalGameTimePlayed).
def("SetTotalGameTimePlayed", &ServerWrapper::SetTotalGameTimePlayed).
def("GetOvertimeTimePlayed", &ServerWrapper::GetOvertimeTimePlayed).
def("SetOvertimeTimePlayed", &ServerWrapper::SetOvertimeTimePlayed).
def("GetbRoundActive", &ServerWrapper::GetbRoundActive).
def("SetbRoundActive", &ServerWrapper::SetbRoundActive).
def("GetbPlayReplays", &ServerWrapper::GetbPlayReplays).
def("SetbPlayReplays", &ServerWrapper::SetbPlayReplays).
def("GetbBallHasBeenHit", &ServerWrapper::GetbBallHasBeenHit).
def("SetbBallHasBeenHit", &ServerWrapper::SetbBallHasBeenHit).
def("GetbOverTime", &ServerWrapper::GetbOverTime).
def("SetbOverTime", &ServerWrapper::SetbOverTime).
def("GetbUnlimitedTime", &ServerWrapper::GetbUnlimitedTime).
def("SetbUnlimitedTime", &ServerWrapper::SetbUnlimitedTime).
def("GetbKickOnTrialEnd", &ServerWrapper::GetbKickOnTrialEnd).
def("SetbKickOnTrialEnd", &ServerWrapper::SetbKickOnTrialEnd).
def("GetbNoContest", &ServerWrapper::GetbNoContest).
def("SetbNoContest", &ServerWrapper::SetbNoContest).
def("GetbDisableGoalDelay", &ServerWrapper::GetbDisableGoalDelay).
def("SetbDisableGoalDelay", &ServerWrapper::SetbDisableGoalDelay).
def("GetbShowNoScorerGoalMessage", &ServerWrapper::GetbShowNoScorerGoalMessage).
def("SetbShowNoScorerGoalMessage", &ServerWrapper::SetbShowNoScorerGoalMessage).
def("GetbMatchEnded", &ServerWrapper::GetbMatchEnded).
def("SetbMatchEnded", &ServerWrapper::SetbMatchEnded).
def("GetbShowIntroScene", &ServerWrapper::GetbShowIntroScene).
def("SetbShowIntroScene", &ServerWrapper::SetbShowIntroScene).
def("GetbClubMatch", &ServerWrapper::GetbClubMatch).
def("SetbClubMatch", &ServerWrapper::SetbClubMatch).
def("GetNextSpawnIndex", &ServerWrapper::GetNextSpawnIndex).
def("SetNextSpawnIndex", &ServerWrapper::SetNextSpawnIndex).
def("GetReplayDirectorArchetype", &ServerWrapper::GetReplayDirectorArchetype).
def("SetReplayDirectorArchetype", &ServerWrapper::SetReplayDirectorArchetype).
def("GetReplayDirector", &ServerWrapper::GetReplayDirector).
def("SetReplayDirector", &ServerWrapper::SetReplayDirector).
def("GetGameBalls", &ServerWrapper::GetGameBalls).
def("GetTotalGameBalls", &ServerWrapper::GetTotalGameBalls).
def("SetTotalGameBalls", &ServerWrapper::SetTotalGameBalls).
def("GetPostGoalTime", &ServerWrapper::GetPostGoalTime).
def("SetPostGoalTime", &ServerWrapper::SetPostGoalTime).
def("GetGoals", &ServerWrapper::GetGoals).
def("GetSecondsRemainingCountdown", &ServerWrapper::GetSecondsRemainingCountdown).
def("SetSecondsRemainingCountdown", &ServerWrapper::SetSecondsRemainingCountdown).
def("GetFieldCenter", &ServerWrapper::GetFieldCenter).
def("SetFieldCenter", &ServerWrapper::SetFieldCenter).
def("GetGameWinner", &ServerWrapper::GetGameWinner).
def("SetGameWinner", &ServerWrapper::SetGameWinner).
def("GetMatchWinner", &ServerWrapper::GetMatchWinner).
def("SetMatchWinner", &ServerWrapper::SetMatchWinner).
def("GetMVP", &ServerWrapper::GetMVP).
def("SetMVP", &ServerWrapper::SetMVP).
def("GetFastestGoalPlayer", &ServerWrapper::GetFastestGoalPlayer).
def("SetFastestGoalPlayer", &ServerWrapper::SetFastestGoalPlayer).
def("GetSlowestGoalPlayer", &ServerWrapper::GetSlowestGoalPlayer).
def("SetSlowestGoalPlayer", &ServerWrapper::SetSlowestGoalPlayer).
def("GetFurthestGoalPlayer", &ServerWrapper::GetFurthestGoalPlayer).
def("SetFurthestGoalPlayer", &ServerWrapper::SetFurthestGoalPlayer).
def("GetFastestGoalSpeed", &ServerWrapper::GetFastestGoalSpeed).
def("SetFastestGoalSpeed", &ServerWrapper::SetFastestGoalSpeed).
def("GetSlowestGoalSpeed", &ServerWrapper::GetSlowestGoalSpeed).
def("SetSlowestGoalSpeed", &ServerWrapper::SetSlowestGoalSpeed).
def("GetFurthestGoal", &ServerWrapper::GetFurthestGoal).
def("SetFurthestGoal", &ServerWrapper::SetFurthestGoal).
def("GetReplicatedScoredOnTeam", &ServerWrapper::GetReplicatedScoredOnTeam).
def("SetReplicatedScoredOnTeam", &ServerWrapper::SetReplicatedScoredOnTeam).
def("GetReplicatedServerPerformanceState", &ServerWrapper::GetReplicatedServerPerformanceState).
def("SetReplicatedServerPerformanceState", &ServerWrapper::SetReplicatedServerPerformanceState).
def("GetRoundNum", &ServerWrapper::GetRoundNum).
def("SetRoundNum", &ServerWrapper::SetRoundNum).
def("GetKickIdleReplayOffset", &ServerWrapper::GetKickIdleReplayOffset).
def("SetKickIdleReplayOffset", &ServerWrapper::SetKickIdleReplayOffset).
def("GetAssistMaxTime", &ServerWrapper::GetAssistMaxTime).
def("SetAssistMaxTime", &ServerWrapper::SetAssistMaxTime).
def("GetBallHasBeenHitStartDelay", &ServerWrapper::GetBallHasBeenHitStartDelay).
def("SetBallHasBeenHitStartDelay", &ServerWrapper::SetBallHasBeenHitStartDelay).
def("GetPodiumDelay", &ServerWrapper::GetPodiumDelay).
def("SetPodiumDelay", &ServerWrapper::SetPodiumDelay).
def("GetPodiumTime", &ServerWrapper::GetPodiumTime).
def("SetPodiumTime", &ServerWrapper::SetPodiumTime).
def("GetLobbyEndCountdown", &ServerWrapper::GetLobbyEndCountdown).
def("SetLobbyEndCountdown", &ServerWrapper::SetLobbyEndCountdown).
def("GetLobbyCountdown", &ServerWrapper::GetLobbyCountdown).
def("SetLobbyCountdown", &ServerWrapper::SetLobbyCountdown).
def("GetLobbyTime", &ServerWrapper::GetLobbyTime).
def("SetLobbyTime", &ServerWrapper::SetLobbyTime).
def("GetLobbySpawnRestartTime", &ServerWrapper::GetLobbySpawnRestartTime).
def("SetLobbySpawnRestartTime", &ServerWrapper::SetLobbySpawnRestartTime).
def("GetPauser", &ServerWrapper::GetPauser).
def("SetPauser", &ServerWrapper::SetPauser);
class_<TutorialWrapper, bases<ServerWrapper>>("TutorialWrapper", no_init).
def("GetGameBall", &TutorialWrapper::GetGameBall).
def("GetGamePawn", &TutorialWrapper::GetGamePawn).
def("SetShowBoostMeter", &TutorialWrapper::SetShowBoostMeter).
def("GetBallBounceScale", &TutorialWrapper::GetBallBounceScale).
def("SetBallBounceScale", &TutorialWrapper::SetBallBounceScale).
def("GetBallSpawnLocation", &TutorialWrapper::GetBallSpawnLocation).
def("SetBallSpawnLocation", &TutorialWrapper::SetBallSpawnLocation).
//def("get_ball_start_velocity", &TutorialWrapper::GetBallStartVelocity).
//def("set_ball_start_velocity", &TutorialWrapper::SetBallStartVelocity).
def("get_total_field_extent", &TutorialWrapper::GetTotalFieldExtent).
def("set_total_field_extent", &TutorialWrapper::SetTotalFieldExtent).
def("redo", &TutorialWrapper::Redo).
def("get_car_spawn_location", &TutorialWrapper::GetCarSpawnLocation).
def("set_car_spawn_location", &TutorialWrapper::SetCarSpawnLocation).
def("get_car_spawn_rotation", &TutorialWrapper::GetCarSpawnRotation).
def("set_car_spawn_rotation", &TutorialWrapper::SetCarSpawnRotation).
def("GetGameCar", &TutorialWrapper::GetGameCar).
def("IsBallMovingTowardsGoal", &TutorialWrapper::IsBallMovingTowardsGoal).
def("IsInGoal", &TutorialWrapper::IsInGoal).
def("DisableGoalReset", &TutorialWrapper::DisableGoalReset).
def("EnableGoalReset", &TutorialWrapper::EnableGoalReset).
//def("spawn_car", &TutorialWrapper::SpawnCar).
def("GenerateShot", &TutorialWrapper::GenerateShot).
def("GenerateGoalAimLocation", &TutorialWrapper::GenerateGoalAimLocation).
def("GetGoalExtent", &TutorialWrapper::GetGoalExtent).
def("GetTotalFieldExtent", &TutorialWrapper::GetTotalFieldExtent).
def("SetTotalFieldExtent", &TutorialWrapper::SetTotalFieldExtent).
def("GetTotalFieldExtent", &TutorialWrapper::GetTotalFieldExtent).
def("SetTotalFieldExtent", &TutorialWrapper::SetTotalFieldExtent).
def("GetTeamNum", &TutorialWrapper::GetTeamNum).
def("SetTeamNum", &TutorialWrapper::SetTeamNum).
def("GetBallGoalNum", &TutorialWrapper::GetBallGoalNum).
def("SetBallGoalNum", &TutorialWrapper::SetBallGoalNum).
def("GetbOnlyScoreInBallGoalNum", &TutorialWrapper::GetbOnlyScoreInBallGoalNum).
def("SetbOnlyScoreInBallGoalNum", &TutorialWrapper::SetbOnlyScoreInBallGoalNum).
def("GetbRedoRound", &TutorialWrapper::GetbRedoRound).
def("SetbRedoRound", &TutorialWrapper::SetbRedoRound).
def("GetbAllowSuperBoost", &TutorialWrapper::GetbAllowSuperBoost).
def("SetbAllowSuperBoost", &TutorialWrapper::SetbAllowSuperBoost).
def("GetbDisplayedRedoPenaltyMessage", &TutorialWrapper::GetbDisplayedRedoPenaltyMessage).
def("SetbDisplayedRedoPenaltyMessage", &TutorialWrapper::SetbDisplayedRedoPenaltyMessage).
def("GetbShowBoostMeter", &TutorialWrapper::GetbShowBoostMeter).
def("SetbShowBoostMeter", &TutorialWrapper::SetbShowBoostMeter).
def("GetDifficulty", &TutorialWrapper::GetDifficulty).
def("SetDifficulty", &TutorialWrapper::SetDifficulty).
def("GetDebugRotationType", &TutorialWrapper::GetDebugRotationType).
def("SetDebugRotationType", &TutorialWrapper::SetDebugRotationType).
def("GetGoalDepth", &TutorialWrapper::GetGoalDepth).
def("SetGoalDepth", &TutorialWrapper::SetGoalDepth).
def("GetGameEventRounds", &TutorialWrapper::GetGameEventRounds).
def("SetGameEventRounds", &TutorialWrapper::SetGameEventRounds).
def("GetEventStartTime", &TutorialWrapper::GetEventStartTime).
def("SetEventStartTime", &TutorialWrapper::SetEventStartTime).
def("GetBallInitialVelocity", &TutorialWrapper::GetBallInitialVelocity).
def("SetBallInitialVelocity", &TutorialWrapper::SetBallInitialVelocity).
def("GetSpawnIndexTypeOverride", &TutorialWrapper::GetSpawnIndexTypeOverride).
def("SetSpawnIndexTypeOverride", &TutorialWrapper::SetSpawnIndexTypeOverride).
def("GetWaveIndex", &TutorialWrapper::GetWaveIndex).
def("SetWaveIndex", &TutorialWrapper::SetWaveIndex).
def("GetWaveSpawnCount", &TutorialWrapper::GetWaveSpawnCount).
def("SetWaveSpawnCount", &TutorialWrapper::SetWaveSpawnCount).
def("GetRandomSpawnIndex", &TutorialWrapper::GetRandomSpawnIndex).
def("SetRandomSpawnIndex", &TutorialWrapper::SetRandomSpawnIndex).
def("GetStartMessageArchetype", &TutorialWrapper::GetStartMessageArchetype).
def("GetBallSpawnLocation", &TutorialWrapper::GetBallSpawnLocation).
def("SetBallSpawnLocation", &TutorialWrapper::SetBallSpawnLocation).
def("GetPointsScoredThisRound", &TutorialWrapper::GetPointsScoredThisRound).
def("SetPointsScoredThisRound", &TutorialWrapper::SetPointsScoredThisRound).
def("GetBallSpawnCount", &TutorialWrapper::GetBallSpawnCount).
def("SetBallSpawnCount", &TutorialWrapper::SetBallSpawnCount).
def("GetBallBounceScale", &TutorialWrapper::GetBallBounceScale).
def("SetBallBounceScale", &TutorialWrapper::SetBallBounceScale).
def("GetCurrentDebugStepX", &TutorialWrapper::GetCurrentDebugStepX).
def("SetCurrentDebugStepX", &TutorialWrapper::SetCurrentDebugStepX).
def("GetCurrentDebugStepY", &TutorialWrapper::GetCurrentDebugStepY).
def("SetCurrentDebugStepY", &TutorialWrapper::SetCurrentDebugStepY).
def("GetCurrentDebugStepZ", &TutorialWrapper::GetCurrentDebugStepZ).
def("SetCurrentDebugStepZ", &TutorialWrapper::SetCurrentDebugStepZ).
def("GetRedoCount", &TutorialWrapper::GetRedoCount).
def("SetRedoCount", &TutorialWrapper::SetRedoCount).
def("GetRedoTotal", &TutorialWrapper::GetRedoTotal).
def("SetRedoTotal", &TutorialWrapper::SetRedoTotal);
class_<BoostPickupWrapper, bases<VehiclePickupWrapper>>("BoostPickupWrapper", no_init).
def("GetBoostAmount", &BoostPickupWrapper::GetBoostAmount).
def("SetBoostAmount", &BoostPickupWrapper::SetBoostAmount);
class_<ReplayDirectorWrapper, bases<ActorWrapper>>("ReplayDirectorWrapper", no_init).
def("GetSlomoPreScoreTime", &ReplayDirectorWrapper::GetSlomoPreScoreTime).
def("SetSlomoPreScoreTime", &ReplayDirectorWrapper::SetSlomoPreScoreTime).
def("GetSlomoPostScoreTime", &ReplayDirectorWrapper::GetSlomoPostScoreTime).
def("SetSlomoPostScoreTime", &ReplayDirectorWrapper::SetSlomoPostScoreTime).
def("GetSlomoDefendTime", &ReplayDirectorWrapper::GetSlomoDefendTime).
def("SetSlomoDefendTime", &ReplayDirectorWrapper::SetSlomoDefendTime).
def("GetSlomoDefendDistance", &ReplayDirectorWrapper::GetSlomoDefendDistance).
def("SetSlomoDefendDistance", &ReplayDirectorWrapper::SetSlomoDefendDistance).
def("GetSlomoTimeDilation", &ReplayDirectorWrapper::GetSlomoTimeDilation).
def("SetSlomoTimeDilation", &ReplayDirectorWrapper::SetSlomoTimeDilation).
def("GetMinReplayTime", &ReplayDirectorWrapper::GetMinReplayTime).
def("SetMinReplayTime", &ReplayDirectorWrapper::SetMinReplayTime).
def("GetMaxReplayTime", &ReplayDirectorWrapper::GetMaxReplayTime).
def("SetMaxReplayTime", &ReplayDirectorWrapper::SetMaxReplayTime).
def("GetReplayPadding", &ReplayDirectorWrapper::GetReplayPadding).
def("SetReplayPadding", &ReplayDirectorWrapper::SetReplayPadding).
def("GetHighlightReplayDuration", &ReplayDirectorWrapper::GetHighlightReplayDuration).
def("SetHighlightReplayDuration", &ReplayDirectorWrapper::SetHighlightReplayDuration).
def("GetTimeBeforeHighlightReplay", &ReplayDirectorWrapper::GetTimeBeforeHighlightReplay).
def("SetTimeBeforeHighlightReplay", &ReplayDirectorWrapper::SetTimeBeforeHighlightReplay).
def("GetReplay", &ReplayDirectorWrapper::GetReplay).
def("SetReplay", &ReplayDirectorWrapper::SetReplay).
def("GetFocusCar", &ReplayDirectorWrapper::GetFocusCar).
def("SetFocusCar", &ReplayDirectorWrapper::SetFocusCar).
def("GetFocusCarChangeTime", &ReplayDirectorWrapper::GetFocusCarChangeTime).
def("SetFocusCarChangeTime", &ReplayDirectorWrapper::SetFocusCarChangeTime).
def("GetFocusBall", &ReplayDirectorWrapper::GetFocusBall).
def("SetFocusBall", &ReplayDirectorWrapper::SetFocusBall).
def("GetScoreTime", &ReplayDirectorWrapper::GetScoreTime).
def("SetScoreTime", &ReplayDirectorWrapper::SetScoreTime).
def("GetScoreHitIndex", &ReplayDirectorWrapper::GetScoreHitIndex).
def("SetScoreHitIndex", &ReplayDirectorWrapper::SetScoreHitIndex).
def("GetScoredGoal", &ReplayDirectorWrapper::GetScoredGoal).
def("SetScoredGoal", &ReplayDirectorWrapper::SetScoredGoal).
def("GetbSlomo", &ReplayDirectorWrapper::GetbSlomo).
def("SetbSlomo", &ReplayDirectorWrapper::SetbSlomo).
def("GetbSlomoForDefender", &ReplayDirectorWrapper::GetbSlomoForDefender).
def("SetbSlomoForDefender", &ReplayDirectorWrapper::SetbSlomoForDefender).
def("GetbAutoSave", &ReplayDirectorWrapper::GetbAutoSave).
def("SetbAutoSave", &ReplayDirectorWrapper::SetbAutoSave).
def("GetFocusHitIndex", &ReplayDirectorWrapper::GetFocusHitIndex).
def("SetFocusHitIndex", &ReplayDirectorWrapper::SetFocusHitIndex).
def("GetFocusCarIdx", &ReplayDirectorWrapper::GetFocusCarIdx).
def("SetFocusCarIdx", &ReplayDirectorWrapper::SetFocusCarIdx).
def("GetReplayStartGameTime", &ReplayDirectorWrapper::GetReplayStartGameTime).
def("SetReplayStartGameTime", &ReplayDirectorWrapper::SetReplayStartGameTime).
def("GetBallSpawnTime", &ReplayDirectorWrapper::GetBallSpawnTime).
def("SetBallSpawnTime", &ReplayDirectorWrapper::SetBallSpawnTime).
def("GetSoccarGame", &ReplayDirectorWrapper::GetSoccarGame).
def("SetSoccarGame", &ReplayDirectorWrapper::SetSoccarGame).
def("GetScoredOnTeam", &ReplayDirectorWrapper::GetScoredOnTeam).
def("SetScoredOnTeam", &ReplayDirectorWrapper::SetScoredOnTeam).
def("GetForceCutToFocusActors", &ReplayDirectorWrapper::GetForceCutToFocusActors).
def("SetForceCutToFocusActors", &ReplayDirectorWrapper::SetForceCutToFocusActors);
class_<CameraWrapper, bases<ActorWrapper>>("CameraWrapper", no_init).
def("GetSwivelFastSpeed", &CameraWrapper::GetSwivelFastSpeed).
def("SetSwivelFastSpeed", &CameraWrapper::SetSwivelFastSpeed).
def("GetSwivelDieRate", &CameraWrapper::GetSwivelDieRate).
def("SetSwivelDieRate", &CameraWrapper::SetSwivelDieRate).
def("GetHorizontalSplitscreenHeightOffset", &CameraWrapper::GetHorizontalSplitscreenHeightOffset).
def("SetHorizontalSplitscreenHeightOffset", &CameraWrapper::SetHorizontalSplitscreenHeightOffset).
def("GetHorizontalSplitscreenFOVOffset", &CameraWrapper::GetHorizontalSplitscreenFOVOffset).
def("SetHorizontalSplitscreenFOVOffset", &CameraWrapper::SetHorizontalSplitscreenFOVOffset).
def("GetVerticalSplitscreenFOVOffset", &CameraWrapper::GetVerticalSplitscreenFOVOffset).
def("SetVerticalSplitscreenFOVOffset", &CameraWrapper::SetVerticalSplitscreenFOVOffset).
def("GetClipRate", &CameraWrapper::GetClipRate).
def("SetClipRate", &CameraWrapper::SetClipRate).
def("GetCurrentSwivel", &CameraWrapper::GetCurrentSwivel).
def("SetCurrentSwivel", &CameraWrapper::SetCurrentSwivel).
def("GetDemolisher", &CameraWrapper::GetDemolisher).
def("SetDemolisher", &CameraWrapper::SetDemolisher).
def("GetbDemolished", &CameraWrapper::GetbDemolished).
def("SetbDemolished", &CameraWrapper::SetbDemolished);
class_<ReplaySoccarWrapper, bases<ReplayWrapper>>("ReplaySoccarWrapper", no_init).
def("GetTeamSize", &ReplaySoccarWrapper::GetTeamSize).
def("SetTeamSize", &ReplaySoccarWrapper::SetTeamSize).
def("GetbUnfairBots", &ReplaySoccarWrapper::GetbUnfairBots).
def("SetbUnfairBots", &ReplaySoccarWrapper::SetbUnfairBots).
def("GetPrimaryPlayerTeam", &ReplaySoccarWrapper::GetPrimaryPlayerTeam).
def("SetPrimaryPlayerTeam", &ReplaySoccarWrapper::SetPrimaryPlayerTeam).
def("GetTeam0Score", &ReplaySoccarWrapper::GetTeam0Score).
def("SetTeam0Score", &ReplaySoccarWrapper::SetTeam0Score).
def("GetTeam1Score", &ReplaySoccarWrapper::GetTeam1Score).
def("SetTeam1Score", &ReplaySoccarWrapper::SetTeam1Score);
class_<GameEditorWrapper, bases<ServerWrapper>>("GameEditorWrapper", no_init).
def("GetActiveRoundNumber", &GameEditorWrapper::GetActiveRoundNumber).
def("SetActiveRoundNumber", &GameEditorWrapper::SetActiveRoundNumber).
def("GetMaxRounds", &GameEditorWrapper::GetMaxRounds).
def("SetMaxRounds", &GameEditorWrapper::SetMaxRounds).
def("GetHistoryPosition", &GameEditorWrapper::GetHistoryPosition).
def("SetHistoryPosition", &GameEditorWrapper::SetHistoryPosition).
def("GetMaxUndoHistory", &GameEditorWrapper::GetMaxUndoHistory).
def("SetMaxUndoHistory", &GameEditorWrapper::SetMaxUndoHistory);
class_<TrainingEditorWrapper, bases<GameEditorWrapper>>("TrainingEditorWrapper", no_init).
def("GetMinRoundTime", &TrainingEditorWrapper::GetMinRoundTime).
def("SetMinRoundTime", &TrainingEditorWrapper::SetMinRoundTime).
def("GetMaxRoundTime", &TrainingEditorWrapper::GetMaxRoundTime).
def("SetMaxRoundTime", &TrainingEditorWrapper::SetMaxRoundTime).
def("GetbNoEditor", &TrainingEditorWrapper::GetbNoEditor).
def("SetbNoEditor", &TrainingEditorWrapper::SetbNoEditor).
def("GetbDisplayedRedoPenaltyMessage", &TrainingEditorWrapper::GetbDisplayedRedoPenaltyMessage).
def("SetbDisplayedRedoPenaltyMessage", &TrainingEditorWrapper::SetbDisplayedRedoPenaltyMessage).
def("GetbUnsavedChanges", &TrainingEditorWrapper::GetbUnsavedChanges).
def("SetbUnsavedChanges", &TrainingEditorWrapper::SetbUnsavedChanges).
def("GetPointsScoredThisRound", &TrainingEditorWrapper::GetPointsScoredThisRound).
def("SetPointsScoredThisRound", &TrainingEditorWrapper::SetPointsScoredThisRound).
def("GetShotAttempt", &TrainingEditorWrapper::GetShotAttempt).
def("SetShotAttempt", &TrainingEditorWrapper::SetShotAttempt).
def("GetGoalieScore", &TrainingEditorWrapper::GetGoalieScore).
def("SetGoalieScore", &TrainingEditorWrapper::SetGoalieScore).
def("GetPlayTestType", &TrainingEditorWrapper::GetPlayTestType).
def("SetPlayTestType", &TrainingEditorWrapper::SetPlayTestType).
def("GetGoalMeshBlockers", &TrainingEditorWrapper::GetGoalMeshBlockers).
def("GetGoalMeshBlockerArchetype", &TrainingEditorWrapper::GetGoalMeshBlockerArchetype).
def("SetGoalMeshBlockerArchetype", &TrainingEditorWrapper::SetGoalMeshBlockerArchetype).
def("GetTrainingData", &TrainingEditorWrapper::GetTrainingData).
def("SetTrainingData", &TrainingEditorWrapper::SetTrainingData).
def("GetSaveDelayTime", &TrainingEditorWrapper::GetSaveDelayTime).
def("SetSaveDelayTime", &TrainingEditorWrapper::SetSaveDelayTime).
def("GetSaveCooldown", &TrainingEditorWrapper::GetSaveCooldown).
def("SetSaveCooldown", &TrainingEditorWrapper::SetSaveCooldown).
def("GetTrainingFileName", &TrainingEditorWrapper::GetTrainingFileName);
class_<SaveDataWrapper, bases<ObjectWrapper>>("SaveDataWrapper", no_init).
def("GetDirectoryPath", &SaveDataWrapper::GetDirectoryPath).
def("GetSaveType", &SaveDataWrapper::GetSaveType).
def("GetSaveExt", &SaveDataWrapper::GetSaveExt).
def("GetbExactFileMatch", &SaveDataWrapper::GetbExactFileMatch).
def("SetbExactFileMatch", &SaveDataWrapper::SetbExactFileMatch);
class_<GameEditorSaveDataWrapper, bases<SaveDataWrapper>>("GameEditorSaveDataWrapper", no_init).
def("GetLoadedSaveName", &GameEditorSaveDataWrapper::GetLoadedSaveName).
def("GetTrainingData", &GameEditorSaveDataWrapper::GetTrainingData).
def("SetTrainingData", &GameEditorSaveDataWrapper::SetTrainingData).
def("GetPlayerTeamNumber", &GameEditorSaveDataWrapper::GetPlayerTeamNumber).
def("SetPlayerTeamNumber", &GameEditorSaveDataWrapper::SetPlayerTeamNumber).
def("GetbUnowned", &GameEditorSaveDataWrapper::GetbUnowned).
def("SetbUnowned", &GameEditorSaveDataWrapper::SetbUnowned).
def("GetShotsCompleted", &GameEditorSaveDataWrapper::GetShotsCompleted).
def("SetShotsCompleted", &GameEditorSaveDataWrapper::SetShotsCompleted).
def("GetFavoritesFolderPath", &GameEditorSaveDataWrapper::GetFavoritesFolderPath).
def("GetMyTrainingFolderPath", &GameEditorSaveDataWrapper::GetMyTrainingFolderPath).
def("GetDownloadedFolderPath", &GameEditorSaveDataWrapper::GetDownloadedFolderPath);
class_<TrainingEditorSaveDataWrapper, bases<ObjectWrapper>>("TrainingEditorSaveDataWrapper", no_init).
def("GetCode", &TrainingEditorSaveDataWrapper::GetCode).
def("GetTM_Name", &TrainingEditorSaveDataWrapper::GetTM_Name).
def("GetType", &TrainingEditorSaveDataWrapper::GetType).
def("SetType", &TrainingEditorSaveDataWrapper::SetType).
def("GetDifficulty", &TrainingEditorSaveDataWrapper::GetDifficulty).
def("SetDifficulty", &TrainingEditorSaveDataWrapper::SetDifficulty).
def("GetCreatorName", &TrainingEditorSaveDataWrapper::GetCreatorName).
def("GetDescription", &TrainingEditorSaveDataWrapper::GetDescription).
def("GetNumRounds", &TrainingEditorSaveDataWrapper::GetNumRounds).
def("SetNumRounds", &TrainingEditorSaveDataWrapper::SetNumRounds).
def("GetCreatedAt", &TrainingEditorSaveDataWrapper::GetCreatedAt).
def("SetCreatedAt", &TrainingEditorSaveDataWrapper::SetCreatedAt).
def("GetUpdatedAt", &TrainingEditorSaveDataWrapper::GetUpdatedAt).
def("SetUpdatedAt", &TrainingEditorSaveDataWrapper::SetUpdatedAt).
def("GetCreatorPlayerID", &TrainingEditorSaveDataWrapper::GetCreatorPlayerID).
def("SetCreatorPlayerID", &TrainingEditorSaveDataWrapper::SetCreatorPlayerID);
class_<AttachmentPickup, bases<RumblePickupComponentWrapper>>("AttachmentPickup", no_init);
class_<BallCarSpringPickup, bases<SpringPickup>>("BallCarSpringPickup", no_init);
class_<VelcroPickup, bases<RumblePickupComponentWrapper>>("VelcroPickup", no_init).
def("GetBallOffset", &VelcroPickup::GetBallOffset).
def("SetBallOffset", &VelcroPickup::SetBallOffset).
def("GetbUseRealOffset", &VelcroPickup::GetbUseRealOffset).
def("SetbUseRealOffset", &VelcroPickup::SetbUseRealOffset).
def("GetbHit", &VelcroPickup::GetbHit).
def("SetbHit", &VelcroPickup::SetbHit).
def("GetbBroken", &VelcroPickup::GetbBroken).
def("SetbBroken", &VelcroPickup::SetbBroken).
def("GetAfterHitDuration", &VelcroPickup::GetAfterHitDuration).
def("SetAfterHitDuration", &VelcroPickup::SetAfterHitDuration).
def("GetPostBreakDuration", &VelcroPickup::GetPostBreakDuration).
def("SetPostBreakDuration", &VelcroPickup::SetPostBreakDuration).
def("GetMinBreakForce", &VelcroPickup::GetMinBreakForce).
def("SetMinBreakForce", &VelcroPickup::SetMinBreakForce).
def("GetMinBreakTime", &VelcroPickup::GetMinBreakTime).
def("SetMinBreakTime", &VelcroPickup::SetMinBreakTime).
def("GetCheckLastTouchRate", &VelcroPickup::GetCheckLastTouchRate).
def("SetCheckLastTouchRate", &VelcroPickup::SetCheckLastTouchRate).
def("GetWeldedBall", &VelcroPickup::GetWeldedBall).
def("SetWeldedBall", &VelcroPickup::SetWeldedBall).
def("GetOldBallMass", &VelcroPickup::GetOldBallMass).
def("SetOldBallMass", &VelcroPickup::SetOldBallMass).
def("GetAttachTime", &VelcroPickup::GetAttachTime).
def("SetAttachTime", &VelcroPickup::SetAttachTime).
def("GetLastTouchCheckTime", &VelcroPickup::GetLastTouchCheckTime).
def("SetLastTouchCheckTime", &VelcroPickup::SetLastTouchCheckTime).
def("GetBreakTime", &VelcroPickup::GetBreakTime).
def("SetBreakTime", &VelcroPickup::SetBreakTime);
class_<BasketballPickup, bases<RumblePickupComponentWrapper>>("BasketballPickup", no_init).
def("GetBallOffset", &BasketballPickup::GetBallOffset).
def("SetBallOffset", &BasketballPickup::SetBallOffset).
def("GetAttachedBallMass", &BasketballPickup::GetAttachedBallMass).
def("SetAttachedBallMass", &BasketballPickup::SetAttachedBallMass).
def("GetLaunchForce", &BasketballPickup::GetLaunchForce).
def("SetLaunchForce", &BasketballPickup::SetLaunchForce).
def("GetWeldedBall", &BasketballPickup::GetWeldedBall).
def("SetWeldedBall", &BasketballPickup::SetWeldedBall).
def("GetOldBallMass", &BasketballPickup::GetOldBallMass).
def("SetOldBallMass", &BasketballPickup::SetOldBallMass);
class_<BattarangPickup, bases<BallLassoPickup>>("BattarangPickup", no_init).
def("GetSpinSpeed", &BattarangPickup::GetSpinSpeed).
def("SetSpinSpeed", &BattarangPickup::SetSpinSpeed).
def("GetCurRotation", &BattarangPickup::GetCurRotation).
def("SetCurRotation", &BattarangPickup::SetCurRotation);
class_<BoostModPickup, bases<RumblePickupComponentWrapper>>("BoostModPickup", no_init).
def("GetbUnlimitedBoost", &BoostModPickup::GetbUnlimitedBoost).
def("SetbUnlimitedBoost", &BoostModPickup::SetbUnlimitedBoost).
def("GetBoostStrength", &BoostModPickup::GetBoostStrength).
def("SetBoostStrength", &BoostModPickup::SetBoostStrength).
def("GetOldBoostStrength", &BoostModPickup::GetOldBoostStrength).
def("SetOldBoostStrength", &BoostModPickup::SetOldBoostStrength);
class_<BoostOverridePickup, bases<TargetedPickup>>("BoostOverridePickup", no_init).
def("GetOtherCar", &BoostOverridePickup::GetOtherCar).
def("SetOtherCar", &BoostOverridePickup::SetOtherCar);
class_<CarSpeedPickup, bases<RumblePickupComponentWrapper>>("CarSpeedPickup", no_init).
def("GetGravityScale", &CarSpeedPickup::GetGravityScale).
def("SetGravityScale", &CarSpeedPickup::SetGravityScale).
def("GetAddedForce", &CarSpeedPickup::GetAddedForce).
def("SetAddedForce", &CarSpeedPickup::SetAddedForce).
def("GetOrigGravityScale", &CarSpeedPickup::GetOrigGravityScale).
def("SetOrigGravityScale", &CarSpeedPickup::SetOrigGravityScale);
class_<DemolishPickup, bases<RumblePickupComponentWrapper>>("DemolishPickup", no_init).
def("GetDemolishTarget", &DemolishPickup::GetDemolishTarget).
def("SetDemolishTarget", &DemolishPickup::SetDemolishTarget).
def("GetDemolishSpeed", &DemolishPickup::GetDemolishSpeed).
def("SetDemolishSpeed", &DemolishPickup::SetDemolishSpeed).
def("GetOldTarget", &DemolishPickup::GetOldTarget).
def("SetOldTarget", &DemolishPickup::SetOldTarget).
def("GetOldSpeed", &DemolishPickup::GetOldSpeed).
def("SetOldSpeed", &DemolishPickup::SetOldSpeed);
class_<HandbrakeOverridePickup, bases<TargetedPickup>>("HandbrakeOverridePickup", no_init).
def("GetOtherCar", &HandbrakeOverridePickup::GetOtherCar).
def("SetOtherCar", &HandbrakeOverridePickup::SetOtherCar);
class_<HitForcePickup, bases<RumblePickupComponentWrapper>>("HitForcePickup", no_init).
def("GetbBallForce", &HitForcePickup::GetbBallForce).
def("SetbBallForce", &HitForcePickup::SetbBallForce).
def("GetbCarForce", &HitForcePickup::GetbCarForce).
def("SetbCarForce", &HitForcePickup::SetbCarForce).
def("GetbDemolishCars", &HitForcePickup::GetbDemolishCars).
def("SetbDemolishCars", &HitForcePickup::SetbDemolishCars).
def("GetBallHitForce", &HitForcePickup::GetBallHitForce).
def("SetBallHitForce", &HitForcePickup::SetBallHitForce).
def("GetCarHitForce", &HitForcePickup::GetCarHitForce).
def("SetCarHitForce", &HitForcePickup::SetCarHitForce).
def("GetMinFXTime", &HitForcePickup::GetMinFXTime).
def("SetMinFXTime", &HitForcePickup::SetMinFXTime).
def("GetOrigBallHitForce", &HitForcePickup::GetOrigBallHitForce).
def("SetOrigBallHitForce", &HitForcePickup::SetOrigBallHitForce).
def("GetOrigCarHitForce", &HitForcePickup::GetOrigCarHitForce).
def("SetOrigCarHitForce", &HitForcePickup::SetOrigCarHitForce).
def("GetLastFXTime", &HitForcePickup::GetLastFXTime).
def("SetLastFXTime", &HitForcePickup::SetLastFXTime);
class_<SwapperPickup, bases<TargetedPickup>>("SwapperPickup", no_init).
def("GetOtherCar", &SwapperPickup::GetOtherCar).
def("SetOtherCar", &SwapperPickup::SetOtherCar);
class_<TimeBombPickup, bases<RumblePickupComponentWrapper>>("TimeBombPickup", no_init).
def("GetRadius", &TimeBombPickup::GetRadius).
def("SetRadius", &TimeBombPickup::SetRadius).
def("GetAlmostReadyDuration", &TimeBombPickup::GetAlmostReadyDuration).
def("SetAlmostReadyDuration", &TimeBombPickup::SetAlmostReadyDuration).
def("GetStartMatSpeed", &TimeBombPickup::GetStartMatSpeed).
def("SetStartMatSpeed", &TimeBombPickup::SetStartMatSpeed).
def("GetAlmostReadyMatSpeed", &TimeBombPickup::GetAlmostReadyMatSpeed).
def("SetAlmostReadyMatSpeed", &TimeBombPickup::SetAlmostReadyMatSpeed).
def("GetImpulseForce", &TimeBombPickup::GetImpulseForce).
def("SetImpulseForce", &TimeBombPickup::SetImpulseForce).
def("GetCarVerticalForce", &TimeBombPickup::GetCarVerticalForce).
def("SetCarVerticalForce", &TimeBombPickup::SetCarVerticalForce).
def("GetCarTorque", &TimeBombPickup::GetCarTorque).
def("SetCarTorque", &TimeBombPickup::SetCarTorque).
def("GetbDemolish", &TimeBombPickup::GetbDemolish).
def("SetbDemolish", &TimeBombPickup::SetbDemolish).
def("GetbImpulse", &TimeBombPickup::GetbImpulse).
def("SetbImpulse", &TimeBombPickup::SetbImpulse);
PYTHON_ARRAY(ActorWrapper)
PYTHON_ARRAY(CarWrapper)
PYTHON_ARRAY(BallWrapper)
PYTHON_ARRAY(PriWrapper)
PYTHON_ARRAY(WheelWrapper)
PYTHON_ARRAY(RBActorWrapper)
PYTHON_ARRAY(CarComponentWrapper)
PYTHON_ARRAY(TeamWrapper)
PYTHON_ARRAY(GoalWrapper)
}
| [
"chris.m@live.nl"
] | chris.m@live.nl |
d6a8ed669d1779822a68adc77856c408118fbe99 | 106c619c72f73ad9e3bd8646611b2df76ef94240 | /solutions/PALL01.cpp | f34edd62259b1c6f5e3247d3151df27981286615 | [] | no_license | swapnanilpathak/codechef_solutions_beginner | 9ab64f3d0488dee3cb9f1fa58691737a0322c34e | 28745a8b84bbfba59f633fa8cb8190c818ab68ca | refs/heads/master | 2020-04-15T23:29:59.122205 | 2019-05-29T09:02:17 | 2019-05-29T09:02:17 | 165,107,909 | 1 | 2 | null | 2019-05-29T09:02:18 | 2019-01-10T18:07:39 | C++ | UTF-8 | C++ | false | false | 388 | cpp | #include <iostream>
using namespace std;
int reverseNum(int num){
int digit;
int rev =0;
do{
digit = num%10;
rev = (rev*10) + digit;
num = num/10;
}while(num!=0);
return rev;
}
int main(){
int T;
cin>>T;
while(T--){
int n=0;
cin>>n;
int r = reverseNum(n);
(n==r)?(cout<<"wins"<<endl):(cout<<"losses"<<endl);
}
return 0;
} | [
"42994624+swapnanilpathak@users.noreply.github.com"
] | 42994624+swapnanilpathak@users.noreply.github.com |
735d87be71964193ed7c6e3f7abe848d6bf9686f | 5ee7b59b955ebde297f0dd924382a96a79771681 | /plnrcmbd/CrdPlnrCli/PnlPlnrCliDetail_blks.cpp | f92fe41a53fb8490248487914008adde62ede868 | [] | no_license | epsitech/planar | a3b22468e6718342218143538a93e7af50debee0 | e97374190feaf229dac4ec941e19f6661150e400 | refs/heads/master | 2021-01-21T04:25:32.542626 | 2016-08-07T19:20:49 | 2016-08-07T19:20:49 | 48,572,177 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 11,010 | cpp | /**
* \file PnlPlnrCliDetail_blks.cpp
* job handler for job PnlPlnrCliDetail (implementation of blocks)
* \author Alexander Wirthmueller
* \date created: 4 Dec 2015
* \date modified: 4 Dec 2015
*/
/******************************************************************************
class PnlPlnrCliDetail::VecVDo
******************************************************************************/
uint PnlPlnrCliDetail::VecVDo::getIx(
const string& sref
) {
string s = StrMod::lc(sref);
if (s == "butsaveclick") return BUTSAVECLICK;
else if (s == "butdsnviewclick") return BUTDSNVIEWCLICK;
return(0);
};
string PnlPlnrCliDetail::VecVDo::getSref(
const uint ix
) {
if (ix == BUTSAVECLICK) return("ButSaveClick");
else if (ix == BUTDSNVIEWCLICK) return("ButDsnViewClick");
return("");
};
/******************************************************************************
class PnlPlnrCliDetail::ContIac
******************************************************************************/
PnlPlnrCliDetail::ContIac::ContIac(
const string& TxfTit
) : Block() {
this->TxfTit = TxfTit;
mask = {TXFTIT};
};
bool PnlPlnrCliDetail::ContIac::readXML(
xmlXPathContext* docctx
, string basexpath
, bool addbasetag
) {
clear();
bool basefound;
if (addbasetag)
basefound = checkUclcXPaths(docctx, basexpath, basexpath, "ContIacPlnrCliDetail");
else
basefound = checkXPath(docctx, basexpath);
string itemtag = "ContitemIacPlnrCliDetail";
if (basefound) {
if (extractStringAttrUclc(docctx, basexpath, itemtag, "Ci", "sref", "TxfTit", TxfTit)) add(TXFTIT);
};
return basefound;
};
void PnlPlnrCliDetail::ContIac::writeXML(
xmlTextWriter* wr
, string difftag
, bool shorttags
) {
if (difftag.length() == 0) difftag = "ContIacPlnrCliDetail";
string itemtag;
if (shorttags) itemtag = "Ci";
else itemtag = "ContitemIacPlnrCliDetail";
xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
writeStringAttr(wr, itemtag, "sref", "TxfTit", TxfTit);
xmlTextWriterEndElement(wr);
};
set<uint> PnlPlnrCliDetail::ContIac::comm(
const ContIac* comp
) {
set<uint> items;
if (TxfTit == comp->TxfTit) insert(items, TXFTIT);
return(items);
};
set<uint> PnlPlnrCliDetail::ContIac::diff(
const ContIac* comp
) {
set<uint> commitems;
set<uint> diffitems;
commitems = comm(comp);
diffitems = {TXFTIT};
for (auto it=commitems.begin();it!=commitems.end();it++) diffitems.erase(*it);
return(diffitems);
};
/******************************************************************************
class PnlPlnrCliDetail::ContInf
******************************************************************************/
PnlPlnrCliDetail::ContInf::ContInf(
const string& TxtCal
, const string& TxtDsn
) : Block() {
this->TxtCal = TxtCal;
this->TxtDsn = TxtDsn;
mask = {TXTCAL, TXTDSN};
};
void PnlPlnrCliDetail::ContInf::writeXML(
xmlTextWriter* wr
, string difftag
, bool shorttags
) {
if (difftag.length() == 0) difftag = "ContInfPlnrCliDetail";
string itemtag;
if (shorttags) itemtag = "Ci";
else itemtag = "ContitemInfPlnrCliDetail";
xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
writeStringAttr(wr, itemtag, "sref", "TxtCal", TxtCal);
writeStringAttr(wr, itemtag, "sref", "TxtDsn", TxtDsn);
xmlTextWriterEndElement(wr);
};
set<uint> PnlPlnrCliDetail::ContInf::comm(
const ContInf* comp
) {
set<uint> items;
if (TxtCal == comp->TxtCal) insert(items, TXTCAL);
if (TxtDsn == comp->TxtDsn) insert(items, TXTDSN);
return(items);
};
set<uint> PnlPlnrCliDetail::ContInf::diff(
const ContInf* comp
) {
set<uint> commitems;
set<uint> diffitems;
commitems = comm(comp);
diffitems = {TXTCAL, TXTDSN};
for (auto it=commitems.begin();it!=commitems.end();it++) diffitems.erase(*it);
return(diffitems);
};
/******************************************************************************
class PnlPlnrCliDetail::StatApp
******************************************************************************/
void PnlPlnrCliDetail::StatApp::writeXML(
xmlTextWriter* wr
, string difftag
, bool shorttags
, const uint ixPlnrVExpstate
) {
if (difftag.length() == 0) difftag = "StatAppPlnrCliDetail";
string itemtag;
if (shorttags) itemtag = "Si";
else itemtag = "StatitemAppPlnrCliDetail";
xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
writeStringAttr(wr, itemtag, "sref", "srefIxPlnrVExpstate", VecPlnrVExpstate::getSref(ixPlnrVExpstate));
xmlTextWriterEndElement(wr);
};
/******************************************************************************
class PnlPlnrCliDetail::StatShr
******************************************************************************/
PnlPlnrCliDetail::StatShr::StatShr(
const bool ButSaveAvail
, const bool ButSaveActive
, const bool ButDsnViewAvail
) : Block() {
this->ButSaveAvail = ButSaveAvail;
this->ButSaveActive = ButSaveActive;
this->ButDsnViewAvail = ButDsnViewAvail;
mask = {BUTSAVEAVAIL, BUTSAVEACTIVE, BUTDSNVIEWAVAIL};
};
void PnlPlnrCliDetail::StatShr::writeXML(
xmlTextWriter* wr
, string difftag
, bool shorttags
) {
if (difftag.length() == 0) difftag = "StatShrPlnrCliDetail";
string itemtag;
if (shorttags) itemtag = "Si";
else itemtag = "StatitemShrPlnrCliDetail";
xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
writeBoolAttr(wr, itemtag, "sref", "ButSaveAvail", ButSaveAvail);
writeBoolAttr(wr, itemtag, "sref", "ButSaveActive", ButSaveActive);
writeBoolAttr(wr, itemtag, "sref", "ButDsnViewAvail", ButDsnViewAvail);
xmlTextWriterEndElement(wr);
};
set<uint> PnlPlnrCliDetail::StatShr::comm(
const StatShr* comp
) {
set<uint> items;
if (ButSaveAvail == comp->ButSaveAvail) insert(items, BUTSAVEAVAIL);
if (ButSaveActive == comp->ButSaveActive) insert(items, BUTSAVEACTIVE);
if (ButDsnViewAvail == comp->ButDsnViewAvail) insert(items, BUTDSNVIEWAVAIL);
return(items);
};
set<uint> PnlPlnrCliDetail::StatShr::diff(
const StatShr* comp
) {
set<uint> commitems;
set<uint> diffitems;
commitems = comm(comp);
diffitems = {BUTSAVEAVAIL, BUTSAVEACTIVE, BUTDSNVIEWAVAIL};
for (auto it=commitems.begin();it!=commitems.end();it++) diffitems.erase(*it);
return(diffitems);
};
/******************************************************************************
class PnlPlnrCliDetail::Tag
******************************************************************************/
void PnlPlnrCliDetail::Tag::writeXML(
const uint ixPlnrVLocale
, xmlTextWriter* wr
, string difftag
, bool shorttags
) {
if (difftag.length() == 0) difftag = "TagPlnrCliDetail";
string itemtag;
if (shorttags) itemtag = "Ti";
else itemtag = "TagitemPlnrCliDetail";
xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
if (ixPlnrVLocale == VecPlnrVLocale::ENUS) {
writeStringAttr(wr, itemtag, "sref", "CptTit", "name");
writeStringAttr(wr, itemtag, "sref", "CptCal", "calculation");
writeStringAttr(wr, itemtag, "sref", "CptDsn", "design");
};
writeStringAttr(wr, itemtag, "sref", "Cpt", StrMod::cap(VecPlnrVTag::getTitle(VecPlnrVTag::DETAIL, ixPlnrVLocale)));
xmlTextWriterEndElement(wr);
};
/******************************************************************************
class PnlPlnrCliDetail::DpchAppData
******************************************************************************/
PnlPlnrCliDetail::DpchAppData::DpchAppData() : DpchAppPlnr(VecPlnrVDpch::DPCHAPPPLNRCLIDETAILDATA) {
};
void PnlPlnrCliDetail::DpchAppData::readXML(
pthread_mutex_t* mScr
, map<string,ubigint>& descr
, xmlXPathContext* docctx
, string basexpath
, bool addbasetag
) {
clear();
string scrJref;
bool basefound;
if (addbasetag)
basefound = checkUclcXPaths(docctx, basexpath, basexpath, "DpchAppPlnrCliDetailData");
else
basefound = checkXPath(docctx, basexpath);
if (basefound) {
if (extractStringUclc(docctx, basexpath, "scrJref", "", scrJref)) {
jref = Scr::descramble(mScr, descr, scrJref);
add(JREF);
};
if (contiac.readXML(docctx, basexpath, true)) add(CONTIAC);
} else {
contiac = ContIac();
};
};
/******************************************************************************
class PnlPlnrCliDetail::DpchAppDo
******************************************************************************/
PnlPlnrCliDetail::DpchAppDo::DpchAppDo() : DpchAppPlnr(VecPlnrVDpch::DPCHAPPPLNRCLIDETAILDO) {
ixVDo = 0;
};
void PnlPlnrCliDetail::DpchAppDo::readXML(
pthread_mutex_t* mScr
, map<string,ubigint>& descr
, xmlXPathContext* docctx
, string basexpath
, bool addbasetag
) {
clear();
string scrJref;
string srefIxVDo;
bool basefound;
if (addbasetag)
basefound = checkUclcXPaths(docctx, basexpath, basexpath, "DpchAppPlnrCliDetailDo");
else
basefound = checkXPath(docctx, basexpath);
if (basefound) {
if (extractStringUclc(docctx, basexpath, "scrJref", "", scrJref)) {
jref = Scr::descramble(mScr, descr, scrJref);
add(JREF);
};
if (extractStringUclc(docctx, basexpath, "srefIxVDo", "", srefIxVDo)) {
ixVDo = VecVDo::getIx(srefIxVDo);
add(IXVDO);
};
} else {
};
};
/******************************************************************************
class PnlPlnrCliDetail::DpchEngData
******************************************************************************/
PnlPlnrCliDetail::DpchEngData::DpchEngData(
const ubigint jref
, ContIac* contiac
, ContInf* continf
, StatShr* statshr
, const set<uint>& mask
) : DpchEngPlnr(VecPlnrVDpch::DPCHENGPLNRCLIDETAILDATA, jref) {
if (find(mask, ALL)) this->mask = {JREF, CONTIAC, CONTINF, STATAPP, STATSHR, TAG};
else this->mask = mask;
if (find(this->mask, CONTIAC) && contiac) this->contiac = *contiac;
if (find(this->mask, CONTINF) && continf) this->continf = *continf;
if (find(this->mask, STATSHR) && statshr) this->statshr = *statshr;
};
void PnlPlnrCliDetail::DpchEngData::merge(
DpchEngPlnr* dpcheng
) {
DpchEngData* src = (DpchEngData*) dpcheng;
if (src->has(JREF)) {jref = src->jref; add(JREF);};
if (src->has(CONTIAC)) {contiac = src->contiac; add(CONTIAC);};
if (src->has(CONTINF)) {continf = src->continf; add(CONTINF);};
if (src->has(STATAPP)) add(STATAPP);
if (src->has(STATSHR)) {statshr = src->statshr; add(STATSHR);};
if (src->has(TAG)) add(TAG);
};
void PnlPlnrCliDetail::DpchEngData::writeXML(
const uint ixPlnrVLocale
, pthread_mutex_t* mScr
, map<ubigint,string>& scr
, map<string,ubigint>& descr
, xmlTextWriter* wr
) {
xmlTextWriterStartElement(wr, BAD_CAST "DpchEngPlnrCliDetailData");
xmlTextWriterWriteAttribute(wr, BAD_CAST "xmlns", BAD_CAST "http://www.epsitechnologies.com/plnr");
if (has(JREF)) writeString(wr, "scrJref", Scr::scramble(mScr, scr, descr, jref));
if (has(CONTIAC)) contiac.writeXML(wr);
if (has(CONTINF)) continf.writeXML(wr);
if (has(STATAPP)) StatApp::writeXML(wr);
if (has(STATSHR)) statshr.writeXML(wr);
if (has(TAG)) Tag::writeXML(ixPlnrVLocale, wr);
xmlTextWriterEndElement(wr);
};
| [
"awirthm@gmail.com"
] | awirthm@gmail.com |
85c5b053da29cb831d86fc8a337c2063dcb48b31 | c0ae20429d7b187fcbede380a370c7a02a0ef11c | /src/DocImages/CImageDemoDoc.h | 2753e417736f209efc9ed66f0e580dc5e6d5c388 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | stephensmitchell-forks/Kapsul3D | 10fc01c051caa9184921fd0000c3cd2953948746 | 87d64d57590b8cf72bc36b3fca27474a33491fa1 | refs/heads/master | 2021-09-06T11:43:37.361611 | 2018-02-06T05:56:59 | 2018-02-06T05:56:59 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,859 | h | // CImageDemoDoc.h : interface of the CCImageDemoDoc class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_CIMAGEDEMODOC_H__CD874C0E_8ADC_11D2_9D51_02608C7A0EC4__INCLUDED_)
#define AFX_CIMAGEDEMODOC_H__CD874C0E_8ADC_11D2_9D51_02608C7A0EC4__INCLUDED_
//#include "..\image\Image.h" // Added by ClassView
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
class CCImageDemoDoc : public CDocument
{
protected: // create from serialization only
CCImageDemoDoc();
DECLARE_DYNCREATE(CCImageDemoDoc)
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCImageDemoDoc)
public:
virtual BOOL OnNewDocument();
virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
//}}AFX_VIRTUAL
// Implementation
public:
BOOL m_bAffTransparent;
CImage m_Image;
virtual ~CCImageDemoDoc();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CCImageDemoDoc)
afx_msg void OnEditionRotation90();
afx_msg void OnEditionRotation180();
afx_msg void OnEditionRotation270();
afx_msg void OnEditionMiroirvertical();
afx_msg void OnEditionMiroirhorizontal();
afx_msg void OnEditionNgatif();
afx_msg void OnEditCopy();
afx_msg void OnFileSave();
afx_msg void OnEditionConvertiren16couleurs();
afx_msg void OnEditionConvertiren16niveauxdegris();
afx_msg void OnEditionConvertiren24bits();
afx_msg void OnEditionConvertiren256couleurs();
afx_msg void OnEditionConvertiren256niveauxdegris();
afx_msg void OnEditionConvertirenNoiretblanc();
afx_msg void OnEditPaste();
afx_msg void OnUpdateEditPaste(CCmdUI* pCmdUI);
afx_msg void OnEditionInfos();
afx_msg void OnEditionContraste();
afx_msg void OnEditionCanalRouge();
afx_msg void OnEditionCanalVert();
afx_msg void OnEditionCanalBleu();
afx_msg void OnEditionConvertirenPhoto();
afx_msg void OnUpdateEditionConvertirenPhoto(CCmdUI* pCmdUI);
afx_msg void OnFileSaveAs();
afx_msg void OnAffichageTransparent();
afx_msg void OnUpdateAffichageTransparent(CCmdUI* pCmdUI);
afx_msg void OnEditionDumpimage();
afx_msg void OnUpdateEditionDumpimage(CCmdUI* pCmdUI);
afx_msg void OnEditionUndumpimage();
afx_msg void OnUpdateEditionUndumpimage(CCmdUI* pCmdUI);
afx_msg void OnEditionCorrectiondescouleurs();
afx_msg void OnFiltres24bitsCrationfiltre();
afx_msg void OnUpdateFiltres24bitsCrationfiltre(CCmdUI* pCmdUI);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CIMAGEDEMODOC_H__CD874C0E_8ADC_11D2_9D51_02608C7A0EC4__INCLUDED_)
| [
"cedric.guillemet@gmail.com"
] | cedric.guillemet@gmail.com |
74a07e018f5d4b5f2848224be34361965217804a | 5f5de52cc54a626ee152c884596a9dc4416abdd2 | /raytracerLinux/util.cpp | 45e3c1b36d4eb0ea2084b8e63a0d53065b68f760 | [] | no_license | dhyeysejpal/csc418 | 8edd8fc1bdf09e21b85c64f140af52a48b9949e9 | bc3310082c563f4870c39705ca6a6302f9b40b16 | refs/heads/master | 2020-03-30T14:30:43.233558 | 2015-03-28T20:12:53 | 2015-03-28T20:12:53 | 32,417,472 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,796 | cpp | /***********************************************************
Starter code for Assignment 3
This code was originally written by Jack Wang for
CSC418, SPRING 2005
implementations of util.h
***********************************************************/
#include <cmath>
#include "util.h"
Point3D::Point3D() {
m_data[0] = 0.0;
m_data[1] = 0.0;
m_data[2] = 0.0;
}
Point3D::Point3D(double x, double y, double z) {
m_data[0] = x;
m_data[1] = y;
m_data[2] = z;
}
Point3D::Point3D(const Point3D& other) {
m_data[0] = other.m_data[0];
m_data[1] = other.m_data[1];
m_data[2] = other.m_data[2];
}
Point3D& Point3D::operator =(const Point3D& other) {
m_data[0] = other.m_data[0];
m_data[1] = other.m_data[1];
m_data[2] = other.m_data[2];
return *this;
}
double& Point3D::operator[](int i) {
return m_data[i];
}
double Point3D::operator[](int i) const {
return m_data[i];
}
Vector3D::Vector3D() {
m_data[0] = 0.0;
m_data[1] = 0.0;
m_data[2] = 0.0;
}
Vector3D::Vector3D(double x, double y, double z) {
m_data[0] = x;
m_data[1] = y;
m_data[2] = z;
}
Vector3D::Vector3D(const Vector3D& other) {
m_data[0] = other.m_data[0];
m_data[1] = other.m_data[1];
m_data[2] = other.m_data[2];
}
Vector3D& Vector3D::operator =(const Vector3D& other) {
m_data[0] = other.m_data[0];
m_data[1] = other.m_data[1];
m_data[2] = other.m_data[2];
return *this;
}
double& Vector3D::operator[](int i) {
return m_data[i];
}
double Vector3D::operator[](int i) const {
return m_data[i];
}
double Vector3D::length() const
{
return sqrt(dot(*this));
}
double Vector3D::normalize() {
double denom = 1.0;
double x = (m_data[0] > 0.0) ? m_data[0] : -m_data[0];
double y = (m_data[1] > 0.0) ? m_data[1] : -m_data[1];
double z = (m_data[2] > 0.0) ? m_data[2] : -m_data[2];
if(x > y) {
if(x > z) {
if(1.0 + x > 1.0) {
y = y / x;
z = z / x;
denom = 1.0 / (x * sqrt(1.0 + y*y + z*z));
}
} else { /* z > x > y */
if(1.0 + z > 1.0) {
y = y / z;
x = x / z;
denom = 1.0 / (z * sqrt(1.0 + y*y + x*x));
}
}
} else {
if(y > z) {
if(1.0 + y > 1.0) {
z = z / y;
x = x / y;
denom = 1.0 / (y * sqrt(1.0 + z*z + x*x));
}
} else { /* x < y < z */
if(1.0 + z > 1.0) {
y = y / z;
x = x / z;
denom = 1.0 / (z * sqrt(1.0 + y*y + x*x));
}
}
}
if(1.0 + x + y + z > 1.0) {
m_data[0] *= denom;
m_data[1] *= denom;
m_data[2] *= denom;
return 1.0 / denom;
}
return 0.0;
}
double Vector3D::dot(const Vector3D& other) const
{
return m_data[0]*other.m_data[0] +
m_data[1]*other.m_data[1] +
m_data[2]*other.m_data[2];
}
Vector3D Vector3D::cross(const Vector3D& other) const
{
return Vector3D(
m_data[1]*other[2] - m_data[2]*other[1],
m_data[2]*other[0] - m_data[0]*other[2],
m_data[0]*other[1] - m_data[1]*other[0]);
}
Vector3D operator *(double s, const Vector3D& v)
{
return Vector3D(s*v[0], s*v[1], s*v[2]);
}
Vector3D operator +(const Vector3D& u, const Vector3D& v)
{
return Vector3D(u[0]+v[0], u[1]+v[1], u[2]+v[2]);
}
Point3D operator +(const Point3D& u, const Vector3D& v)
{
return Point3D(u[0]+v[0], u[1]+v[1], u[2]+v[2]);
}
Vector3D operator -(const Point3D& u, const Point3D& v)
{
return Vector3D(u[0]-v[0], u[1]-v[1], u[2]-v[2]);
}
Vector3D operator -(const Vector3D& u, const Vector3D& v)
{
return Vector3D(u[0]-v[0], u[1]-v[1], u[2]-v[2]);
}
Vector3D operator -(const Vector3D& u)
{
return Vector3D(-u[0], -u[1], -u[2]);
}
Point3D operator -(const Point3D& u, const Vector3D& v)
{
return Point3D(u[0]-v[0], u[1]-v[1], u[2]-v[2]);
}
Vector3D cross(const Vector3D& u, const Vector3D& v)
{
return u.cross(v);
}
std::ostream& operator <<(std::ostream& s, const Point3D& p)
{
return s << "p(" << p[0] << "," << p[1] << "," << p[2] << ")";
}
std::ostream& operator <<(std::ostream& s, const Vector3D& v)
{
return s << "v(" << v[0] << "," << v[1] << "," << v[2] << ")";
}
Colour::Colour() {
m_data[0] = 0.0;
m_data[1] = 0.0;
m_data[2] = 0.0;
}
Colour::Colour(double r, double g, double b) {
m_data[0] = r;
m_data[1] = g;
m_data[2] = b;
}
Colour::Colour(const Colour& other) {
m_data[0] = other.m_data[0];
m_data[1] = other.m_data[1];
m_data[2] = other.m_data[2];
}
Colour& Colour::operator =(const Colour& other) {
m_data[0] = other.m_data[0];
m_data[1] = other.m_data[1];
m_data[2] = other.m_data[2];
return *this;
}
Colour Colour::operator *(const Colour& other) {
return Colour(m_data[0]*other.m_data[0],
m_data[1]*other.m_data[1],
m_data[2]*other.m_data[2]);
}
double& Colour::operator[](int i) {
return m_data[i];
}
double Colour::operator[](int i) const {
return m_data[i];
}
void Colour::clamp() {
for (int i = 0; i < 3; i++) {
if (m_data[i] > 1.0) m_data[i] = 1.0;
if (m_data[i] < 0.0) m_data[i] = 0.0;
}
}
Colour operator *(double s, const Colour& c)
{
return Colour(s*c[0], s*c[1], s*c[2]);
}
Colour operator +(const Colour& u, const Colour& v)
{
return Colour(u[0]+v[0], u[1]+v[1], u[2]+v[2]);
}
std::ostream& operator <<(std::ostream& s, const Colour& c)
{
return s << "c(" << c[0] << "," << c[1] << "," << c[2] << ")";
}
Vector4D::Vector4D() {
m_data[0] = 0.0;
m_data[1] = 0.0;
m_data[2] = 0.0;
m_data[3] = 0.0;
}
Vector4D::Vector4D(double w, double x, double y, double z) {
m_data[0] = w;
m_data[1] = x;
m_data[2] = y;
m_data[3] = z;
}
Vector4D::Vector4D(const Vector4D& other) {
m_data[0] = other.m_data[0];
m_data[1] = other.m_data[1];
m_data[2] = other.m_data[2];
m_data[3] = other.m_data[3];
}
Vector4D& Vector4D::operator =(const Vector4D& other) {
m_data[0] = other.m_data[0];
m_data[1] = other.m_data[1];
m_data[2] = other.m_data[2];
m_data[3] = other.m_data[3];
return *this;
}
double& Vector4D::operator[](int i) {
return m_data[i];
}
double Vector4D::operator[](int i) const {
return m_data[i];
}
Matrix4x4::Matrix4x4() {
for (int i = 0; i < 16; i++)
m_data[i] = 0.0;
m_data[0] = 1.0;
m_data[5] = 1.0;
m_data[10] = 1.0;
m_data[15] = 1.0;
}
Matrix4x4::Matrix4x4(const Matrix4x4& other) {
for (int i = 0; i < 16; i++)
m_data[i] = other.m_data[i];
}
Matrix4x4& Matrix4x4::operator=(const Matrix4x4& other) {
for (int i = 0; i < 16; i++)
m_data[i] = other.m_data[i];
return *this;
}
Vector4D Matrix4x4::getRow(int row) const {
return Vector4D(m_data[4*row], m_data[4*row+1], m_data[4*row+2],
m_data[4*row+3]);
}
double* Matrix4x4::getRow(int row) {
return (double*)m_data + 4*row;
}
Vector4D Matrix4x4::getColumn(int col) const {
return Vector4D(m_data[col], m_data[4+col], m_data[8+col],
m_data[12+col]);
}
Vector4D Matrix4x4::operator[](int row) const {
return getRow(row);
}
double* Matrix4x4::operator[](int row) {
return getRow(row);
}
Matrix4x4 Matrix4x4::transpose() const {
Matrix4x4 M;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
M[i][j] = (*this)[j][i];
}
}
return M;
}
Matrix4x4 operator *(const Matrix4x4& a, const Matrix4x4& b) {
Matrix4x4 ret;
for(size_t i = 0; i < 4; ++i) {
Vector4D row = a.getRow(i);
for(size_t j = 0; j < 4; ++j) {
ret[i][j] = row[0] * b[0][j] + row[1] * b[1][j] +
row[2] * b[2][j] + row[3] * b[3][j];
}
}
return ret;
}
Vector3D operator *(const Matrix4x4& M, const Vector3D& v) {
return Vector3D(
v[0] * M[0][0] + v[1] * M[0][1] + v[2] * M[0][2],
v[0] * M[1][0] + v[1] * M[1][1] + v[2] * M[1][2],
v[0] * M[2][0] + v[1] * M[2][1] + v[2] * M[2][2]);
}
Point3D operator *(const Matrix4x4& M, const Point3D& p) {
return Point3D(
p[0] * M[0][0] + p[1] * M[0][1] + p[2] * M[0][2] + M[0][3],
p[0] * M[1][0] + p[1] * M[1][1] + p[2] * M[1][2] + M[1][3],
p[0] * M[2][0] + p[1] * M[2][1] + p[2] * M[2][2] + M[2][3]);
}
Vector3D transNorm(const Matrix4x4& M, const Vector3D& n) {
return Vector3D(
n[0] * M[0][0] + n[1] * M[1][0] + n[2] * M[2][0],
n[0] * M[0][1] + n[1] * M[1][1] + n[2] * M[2][1],
n[0] * M[0][2] + n[1] * M[1][2] + n[2] * M[2][2]);
}
std::ostream& operator <<(std::ostream& os, const Matrix4x4& M) {
return os << "[" << M[0][0] << " " << M[0][1] << " "
<< M[0][2] << " " << M[0][3] << "]" << std::endl
<< "[" << M[1][0] << " " << M[1][1] << " "
<< M[1][2] << " " << M[1][3] << "]" << std::endl
<< "[" << M[2][0] << " " << M[2][1] << " "
<< M[2][2] << " " << M[2][3] << "]" << std::endl
<< "[" << M[3][0] << " " << M[3][1] << " "
<< M[3][2] << " " << M[3][3] << "]";
}
| [
"g3dhyey@cdf.toronto.edu"
] | g3dhyey@cdf.toronto.edu |
cd11db7f620e36f34c4e8d5103fd6cb1556371b1 | 85c5b445a0d1ff5264f0b55e4fa81e87dfca4c66 | /cf/cf1288/C/C.cpp | a01f3c050a3c32ea93ef7729a47097ad5819fa9e | [] | no_license | ruanluyu/AtCoder | f3f3c8e47f97eb250cce43ace97942dc1ce0c906 | e34e644bd50fb20cad3c07aabb0478036cdcb9c2 | refs/heads/master | 2020-05-27T14:52:34.502755 | 2020-03-02T08:08:47 | 2020-03-02T08:08:47 | 188,670,048 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,502 | cpp | #include<bits/stdc++.h>
using namespace std;
#define REP(i,n) for(long long i=0;i<(n);i++)
#define REP1(i,n) for(long long i=1;i<=(n);i++)
#define REP2D(i,j,h,w) for(long long i=0;i<(h);i++) for(long long j=0;j<(w);j++)
#define REP2D1(i,j,h,w) for(long long i=1;i<=(h);i++) for(long long j=1;j<=(w);j++)
#define PER(i,n) for(long long i=((n)-1);i>=0;i--)
#define PER1(i,n) for(long long i=(n);i>0;i--)
#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define FORE(i,a,b) for(long long i=(a);i<=(b);i++)
#define ITE(arr) for(auto ite=(arr).begin();ite!=(arr).end();++ite)
#define ALL(a) ((a).begin()),((a).end())
#define RANGE(a) (a),((a)+sizeof(a))
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
#define YNPRT(b) cout<<((b)?"Yes":"No")<<endl
#define ENTER printf("\n")
#define REV(arr) reverse(ALL(arr))
#define PRT(a) cout<<(a)<<endl
#ifdef DEBUG
#define DBPRT(a) cout << "[Debug] - " << #a << " : " << (a) << endl
#define DBSTART if(1){
#define DBEND }
#define PRTLST(arr,num) REP(_i,num) cout<<_i<<" - "<<arr[_i]<<endl;
#define PRTLST2(arr2,d1,d2) REP(_i,d1) REP(_j,d2) cout<<_i<<","<<_j<<" : "<<arr2[_i][_j]<<endl;
#define PRTLST2D(arr2,d1,d2) do{cout<<"L\t";REP(_i,d2) cout<<_i<<"\t"; cout<<endl; REP(_i,d1){cout<<_i<<"\t";REP(_j,d2){cout<<arr2[_i][_j]<<"\t";}cout<<endl;}}while(0);
#else
#define DBPRT(a) if(0){}
#define DBSTART if(0){
#define DBEND }
#define PRTLST(arr,num) if(0){}
#define PRTLST2(arr2,d1,d2) if(0){}
#define PRTLST2D(arr2,d1,d2) if(0){}
#endif
#define TOSUM(arr,sum,n) {sum[0]=arr[0];REP1(i,n-1) sum[i]=sum[i-1]+arr[i];}
#define MIN(target,v1) (target)=min(target,v1)
#define MAX(target,v1) (target)=max(target,v1)
#define P1 first
#define P2 second
#define PB push_back
#define UB upper_bound
#define LB lower_bound
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const int INF_INT = 2147483647;
const ll INF_LL = 9223372036854775807LL;
const ull INF_ULL = 18446744073709551615Ull;
const ll P = 92540646808111039LL;
const int Move[4][2] = {-1,0,0,1,1,0,0,-1};
const int Move_[8][2] = {-1,0,-1,-1,0,1,1,1,1,0,1,-1,0,-1,-1,-1};
template<typename T1,typename T2>
ostream& operator<<(ostream& os,const pair<T1,T2>& p) {os<<"( "<<p.P1<<" , "<<p.P2<<" )";return os;}
template<typename T>
ostream& operator<<(ostream& os,const vector<T>& v) {ITE(v) os << (ite-v.begin()) << " : " << *ite <<endl;return os;}
template<typename T>
ostream& operator<<(ostream& os,const set<T>& v) {os<<" { ";ITE(v) {os<<*ite;if(ite!=--v.end()){os<<" , ";}} os<<" } ";return os;}
template<typename T1,typename T2>
ostream& operator<<(ostream& os,const map<T1,T2>& m) {ITE(m) {os<<ite->P1<<"\t\t|->\t\t"<<ite->P2<<endl;} return os;}
//---------------------
#define MOD 1000000007
#define MAXN 1005
#define MAXM 15
//---------------------
ll inv[MAXN];
ll fac[MAXN];
ll facinv[MAXN];
ll modpow(ll a, ll b){
if(b==-1) return inv[a];
if(b<-1) {
a=inv[a%MOD];
b*=-1;
}
if(b==0) return 1;
if(b==1) return a%MOD;
ll ret=modpow(a%MOD,b>>1)%MOD;
return (ret*ret%MOD)*((b%2)?(a%MOD):1)%MOD;
}
ll fermat(ll a){
if(a%MOD) return -1;
return modpow(a,MOD-2);
}
inline ll modmult(ll a, ll b){
return (a%MOD)*(b%MOD)%MOD;
}
inline ll modmult(ll a, ll b ,ll c){
return (a%MOD)*(b%MOD)%MOD*(c%MOD)%MOD;
}
inline ll modfact(ll n){
if(n==0 || n==1) return 1;
if(n>=MOD) return 0;
return fac[n];
}
inline ll modcomb(ll m, ll n){
if(m>=MOD || n>=MOD || n<0 || m<0) return -1;
if(n==0||n==m) return 1;
if(m<n) return 0;
return fac[m]*facinv[m-n]%MOD*facinv[n]%MOD;
}
void makelist(){
inv[0]=-1;
inv[1]=1;
for(ll i=2;i<MAXN;i++) inv[i]=(MOD-MOD/i)*inv[MOD%i]%MOD;
fac[0]=1;
REP1(i,MAXN) fac[i]=(fac[i-1]*i)%MOD;
facinv[MAXN-1] = modpow(fac[MAXN-1],MOD-2);
PER(i,MAXN-1) facinv[i]=(facinv[i+1]*(i+1))%MOD;
}
void makepowlist(ll *list,ll a,ll num){
list[0]=1;
REP1(i,num-1){
list[i] = modmult(list[i-1],a);
}
}
void makepowinvlist(ll *list, ll a,ll num){
list[0]=1;
REP1(i,num-1){
list[i] = modmult(list[i-1],inv[a]);
}
}
ll n,m;
ll dp[MAXM][MAXN];
int main(){
//makelist();
cin >> n >> m;
ZERO(dp);
REP1(i,n) dp[1][i] = 1;
REP2D1(i,j,m,n){
if(i==1) continue;
REP1(k,j){
dp[i][j] = (dp[i][j] + (dp[i-1][j-k+1])%MOD)%MOD;
}
}
ll res = 0;
//ll sumdp[MAXN];
//ZERO(sumdp);
//TOSUM(dp[m],sumdp,m+1);
//PRTLST2(dp,m+1,n+1);
FORE(i,1,n) FORE(j,1,n-i+1){
res = (res + (dp[m][i] * dp[m][j])%MOD)%MOD;
}
PRT(res);
return 0;
}
| [
"zzstarsound@gmail.com"
] | zzstarsound@gmail.com |
ec20d8b46ce46279bc50d0e1d7b3ef135e5889a7 | 6243d614e456bc84c8884e3b086a01d553d5eb81 | /Air-Engine/src/Engine/IO/Window.hpp | b00a966f35c2b37e856cf107cb895e3ee4c578b9 | [
"Apache-2.0"
] | permissive | Hyxogen/Air-Engine | c1e9e67c609c2288bff6f125509b63f62eb80742 | a33d0b5bba3b6b71e125c40212a72115c2f73958 | refs/heads/development | 2022-01-14T23:15:57.426266 | 2021-09-08T10:06:46 | 2021-09-08T10:06:46 | 342,632,071 | 0 | 0 | Apache-2.0 | 2021-09-08T09:55:04 | 2021-02-26T16:20:36 | C | UTF-8 | C++ | false | false | 597 | hpp | #pragma once
namespace engine {
namespace io {
class Window {
protected:
int32 m_Width, m_Height;
const wchar_t* m_Title;
Window(const wchar_t* title, int32 width, int32 height) : m_Title(title), m_Width(width), m_Height(height) {}
public:
virtual ~Window() {};
virtual bool Initialize() = 0;
virtual void Update() = 0;
virtual void Draw() = 0;
virtual bool ShouldClose() const = 0;
virtual void SetVisibility(int16 visibility) = 0;
inline int32 GetWidth() const { return m_Width; }
inline int32 GetHeight() const { return m_Height; }
};
}
} | [
"daansander02@outlook.com"
] | daansander02@outlook.com |
e160b0071e8574daa85c890d2e4e551ac20cffee | d02554d10f99e1751698adc7cfae09f5ebaf8047 | /evalRPN/main.cpp | edec4b807da1d59674655edf711a709c9646689e | [] | no_license | Simon-Fuhaoyuan/LeetCode-100DAY-Challenge | 44373b5e05397e5d0d9e040eba312cd1a46c733d | 860d8b801fde1caea91b6847f319c5e5eccf9b89 | refs/heads/master | 2022-07-28T03:06:36.993920 | 2022-07-22T09:16:27 | 2022-07-22T09:16:27 | 228,839,990 | 6 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,550 | cpp | #include <stack>
#include <string>
#include <vector>
#include <iostream>
using namespace std;
class Solution {
public:
int evalRPN(vector<string>& tokens) {
stack<int> buffer;
int op1, op2;
for (int i = 0; i < tokens.size(); ++i) {
if (tokens[i].length() > 1)
buffer.push(toInt(tokens[i]));
else if (tokens[i][0] >= '0' && tokens[i][0] <= '9')
buffer.push(toInt(tokens[i]));
else {
op2 = buffer.top();
buffer.pop();
op1 = buffer.top();
buffer.pop();
if (tokens[i][0] == '+')
op1 += op2;
else if (tokens[i][0] == '-')
op1 -= op2;
else if (tokens[i][0] == '*')
op1 *= op2;
else
op1 /= op2;
buffer.push(op1);
}
}
return buffer.top();
}
private:
int toInt(string num) {
int index = 0;
bool negative = false;
int ans = 0;
if (num[0] == '-') {
index = 1;
negative = true;
}
for (; index < num.size(); ++index) {
ans = ans * 10 + num[index] - '0';
}
if (negative)
ans *= -1;
return ans;
}
};
int main() {
Solution s;
vector<string> tokens = {"10", "6", "9", "3", "+", "-11", "*", "/", "*", "17", "+", "5", "+"};
cout << s.evalRPN(tokens) << endl;
return 0;
} | [
"44106243+Simon-Fuhaoyuan@users.noreply.github.com"
] | 44106243+Simon-Fuhaoyuan@users.noreply.github.com |
31b2b29b39f73315d914ac7443704841495c3c1c | f699576e623d90d2e07d6c43659a805d12b92733 | /WTLOnline-SDK/SDK/WTLOnline_UI_HUD_Inventory_Slot_classes.hpp | 16ab36ec7afe9d35d9881b609573d1b5dff0002d | [] | no_license | ue4sdk/WTLOnline-SDK | 2309620c809efeb45ba9ebd2fc528fa2461b9ca0 | ff244cd4118c54ab2048ba0632b59ced111c405c | refs/heads/master | 2022-07-12T13:02:09.999748 | 2019-04-22T08:22:35 | 2019-04-22T08:22:35 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,051 | hpp | #pragma once
// Will To Live Online (0.57) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "WTLOnline_UI_HUD_Inventory_Slot_structs.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------------------------------------------
// WidgetBlueprintGeneratedClass UI_HUD_Inventory_Slot.UI_HUD_Inventory_Slot_C
// 0x0038 (0x0768 - 0x0730)
class UUI_HUD_Inventory_Slot_C : public UWTLHUDInventorySlot
{
public:
class UImage* imgArmoredPlates; // 0x0730(0x0008) (CPF_BlueprintVisible, CPF_ExportObject, CPF_ZeroConstructor, CPF_InstancedReference, CPF_IsPlainOldData, CPF_RepSkip, CPF_RepNotify, CPF_Interp, CPF_NonTransactional, CPF_EditorOnly, CPF_NoDestructor, CPF_AutoWeak, CPF_ContainsInstancedReference, CPF_AssetRegistrySearchable, CPF_SimpleDisplay, CPF_AdvancedDisplay, CPF_Protected, CPF_BlueprintCallable, CPF_BlueprintAuthorityOnly, CPF_TextExportTransient, CPF_NonPIEDuplicateTransient, CPF_ExposeOnSpawn, CPF_PersistentInstance, CPF_UObjectWrapper, CPF_HasGetValueTypeHash, CPF_NativeAccessSpecifierPublic, CPF_NativeAccessSpecifierProtected, CPF_NativeAccessSpecifierPrivate)
class UImage* imgContainerItem; // 0x0738(0x0008) (CPF_BlueprintVisible, CPF_ExportObject, CPF_ZeroConstructor, CPF_InstancedReference, CPF_IsPlainOldData, CPF_RepSkip, CPF_RepNotify, CPF_Interp, CPF_NonTransactional, CPF_EditorOnly, CPF_NoDestructor, CPF_AutoWeak, CPF_ContainsInstancedReference, CPF_AssetRegistrySearchable, CPF_SimpleDisplay, CPF_AdvancedDisplay, CPF_Protected, CPF_BlueprintCallable, CPF_BlueprintAuthorityOnly, CPF_TextExportTransient, CPF_NonPIEDuplicateTransient, CPF_ExposeOnSpawn, CPF_PersistentInstance, CPF_UObjectWrapper, CPF_HasGetValueTypeHash, CPF_NativeAccessSpecifierPublic, CPF_NativeAccessSpecifierProtected, CPF_NativeAccessSpecifierPrivate)
class UImage* imgFlashlight; // 0x0740(0x0008) (CPF_BlueprintVisible, CPF_ExportObject, CPF_ZeroConstructor, CPF_InstancedReference, CPF_IsPlainOldData, CPF_RepSkip, CPF_RepNotify, CPF_Interp, CPF_NonTransactional, CPF_EditorOnly, CPF_NoDestructor, CPF_AutoWeak, CPF_ContainsInstancedReference, CPF_AssetRegistrySearchable, CPF_SimpleDisplay, CPF_AdvancedDisplay, CPF_Protected, CPF_BlueprintCallable, CPF_BlueprintAuthorityOnly, CPF_TextExportTransient, CPF_NonPIEDuplicateTransient, CPF_ExposeOnSpawn, CPF_PersistentInstance, CPF_UObjectWrapper, CPF_HasGetValueTypeHash, CPF_NativeAccessSpecifierPublic, CPF_NativeAccessSpecifierProtected, CPF_NativeAccessSpecifierPrivate)
class UImage* imgItemCustomized; // 0x0748(0x0008) (CPF_BlueprintVisible, CPF_ExportObject, CPF_ZeroConstructor, CPF_InstancedReference, CPF_IsPlainOldData, CPF_RepSkip, CPF_RepNotify, CPF_Interp, CPF_NonTransactional, CPF_EditorOnly, CPF_NoDestructor, CPF_AutoWeak, CPF_ContainsInstancedReference, CPF_AssetRegistrySearchable, CPF_SimpleDisplay, CPF_AdvancedDisplay, CPF_Protected, CPF_BlueprintCallable, CPF_BlueprintAuthorityOnly, CPF_TextExportTransient, CPF_NonPIEDuplicateTransient, CPF_ExposeOnSpawn, CPF_PersistentInstance, CPF_UObjectWrapper, CPF_HasGetValueTypeHash, CPF_NativeAccessSpecifierPublic, CPF_NativeAccessSpecifierProtected, CPF_NativeAccessSpecifierPrivate)
class UImage* imgMuzzle; // 0x0750(0x0008) (CPF_BlueprintVisible, CPF_ExportObject, CPF_ZeroConstructor, CPF_InstancedReference, CPF_IsPlainOldData, CPF_RepSkip, CPF_RepNotify, CPF_Interp, CPF_NonTransactional, CPF_EditorOnly, CPF_NoDestructor, CPF_AutoWeak, CPF_ContainsInstancedReference, CPF_AssetRegistrySearchable, CPF_SimpleDisplay, CPF_AdvancedDisplay, CPF_Protected, CPF_BlueprintCallable, CPF_BlueprintAuthorityOnly, CPF_TextExportTransient, CPF_NonPIEDuplicateTransient, CPF_ExposeOnSpawn, CPF_PersistentInstance, CPF_UObjectWrapper, CPF_HasGetValueTypeHash, CPF_NativeAccessSpecifierPublic, CPF_NativeAccessSpecifierProtected, CPF_NativeAccessSpecifierPrivate)
class UImage* imgScope; // 0x0758(0x0008) (CPF_BlueprintVisible, CPF_ExportObject, CPF_ZeroConstructor, CPF_InstancedReference, CPF_IsPlainOldData, CPF_RepSkip, CPF_RepNotify, CPF_Interp, CPF_NonTransactional, CPF_EditorOnly, CPF_NoDestructor, CPF_AutoWeak, CPF_ContainsInstancedReference, CPF_AssetRegistrySearchable, CPF_SimpleDisplay, CPF_AdvancedDisplay, CPF_Protected, CPF_BlueprintCallable, CPF_BlueprintAuthorityOnly, CPF_TextExportTransient, CPF_NonPIEDuplicateTransient, CPF_ExposeOnSpawn, CPF_PersistentInstance, CPF_UObjectWrapper, CPF_HasGetValueTypeHash, CPF_NativeAccessSpecifierPublic, CPF_NativeAccessSpecifierProtected, CPF_NativeAccessSpecifierPrivate)
class UProgressBar* pbEnergy; // 0x0760(0x0008) (CPF_BlueprintVisible, CPF_ExportObject, CPF_ZeroConstructor, CPF_InstancedReference, CPF_IsPlainOldData, CPF_RepSkip, CPF_RepNotify, CPF_Interp, CPF_NonTransactional, CPF_EditorOnly, CPF_NoDestructor, CPF_AutoWeak, CPF_ContainsInstancedReference, CPF_AssetRegistrySearchable, CPF_SimpleDisplay, CPF_AdvancedDisplay, CPF_Protected, CPF_BlueprintCallable, CPF_BlueprintAuthorityOnly, CPF_TextExportTransient, CPF_NonPIEDuplicateTransient, CPF_ExposeOnSpawn, CPF_PersistentInstance, CPF_UObjectWrapper, CPF_HasGetValueTypeHash, CPF_NativeAccessSpecifierPublic, CPF_NativeAccessSpecifierProtected, CPF_NativeAccessSpecifierPrivate)
static UClass* StaticClass()
{
static auto ptr = UObject::FindObject<UClass>(_xor_("WidgetBlueprintGeneratedClass UI_HUD_Inventory_Slot.UI_HUD_Inventory_Slot_C"));
return ptr;
}
};
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
| [
"igromanru@yahoo.de"
] | igromanru@yahoo.de |
f4fe48012ebc57725a709198423f6961cd0e44fd | 9cd6838e721eea1066c8bb6bc06b3982502ae33d | /c_shizzle/mpi_derived_dtypes.cpp | 4ec7d68f313629bf7ef3f5a7ead5d813e943cb02 | [] | no_license | v0dro/scratch | 8b1b5246f07b61b6f029612848cd1d828a211ed6 | bdb2e4082247862478d3f9f9fdc7110e774cee99 | refs/heads/master | 2023-04-08T18:00:14.672742 | 2023-03-18T06:58:22 | 2023-03-18T06:58:22 | 31,577,908 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,624 | cpp | #include "mpi.h"
#include <cstdlib>
#include <boost/any.hpp>
#include <vector>
#define MASTER 0
class Dense
{
public:
int dim[2];
double *data;
Dense() {};
Dense(int nrows, int ncols)
{
dim[0] = nrows;
dim[1] = ncols;
data = (double*)malloc(nrows*ncols*sizeof(double));
for (int i = 0; i < nrows; ++i) {
for (int j = 0; j < ncols; ++j) {
data[i*ncols + j] = i + j;
}
}
};
Dense(int nrows, int ncols, double * d)
{
dim[0] = nrows;
dim[1] = ncols;
data = (double*)malloc(nrows*ncols*sizeof(double));
for (int i = 0; i < nrows; ++i) {
for (int j = 0; j < ncols; ++j) {
data[i*ncols +j] = d[i*ncols + j];
}
}
};
void print(char * desc)
{
printf("matrix: %s\n.", desc);
for (int i = 0; i < dim[0]; ++i) {
for (int j = 0; j < dim[1]; ++j) {
printf(" %3.4f ", data[i*dim[1] + j]);
}
printf("\n");
}
}
};
class LR
{
public:
Dense U, S, V;
int dim[2];
int rank;
LR() {};
LR(Dense U, Dense S, Dense V, int rank, int nrows, int ncols)
{
this->U = U;
this->S = S;
this->V = V;
this->dim[0] = nrows;
this->dim[1] = ncols;
this->rank = rank;
}
};
class H {
public:
int dim[2];
std::vector<boost::any> data;
H(int nrows, int ncols) {
dim[0] = nrows;
dim[1] = ncols;
data.resize(4);
};
void set_data(Dense &d00, LR &lr01, LR &lr10, Dense &d11)
{
data[0] = d00;
data[1] = lr01;
data[2] = lr10;
data[3] = d11;
};
};
int main(int argc, char ** argv)
{
MPI_Init(&argc, &argv);
int mpi_rank, mpi_size;
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
int rank = 5;
int nrows = 10, ncols = 10, nr, nc;
int dense_tag = 0;
int row_tag = 1;
int col_tag = 2;
int sender, receiver;
Dense d00(nrows, ncols);
Dense d11(nrows, ncols);
Dense u(nrows, rank);
Dense s(rank, rank);
Dense v(rank, ncols);
LR lr01(u, s, v, rank, nrows, ncols);
LR lr10(u, s, v, rank, nrows, ncols);
H mat(nrows*2, ncols*2);
mat.set_data(d00, lr01, lr10, d11);
MPI_Request dim_reqs[4];
MPI_Status stats[4];
if (mpi_rank == 0) {
MPI_Isend(&nrows, 1, MPI_INT, 1, row_tag, MPI_COMM_WORLD, &dim_reqs[2]);
MPI_Isend(&ncols, 1, MPI_INT, 1, col_tag, MPI_COMM_WORLD, &dim_reqs[3]);
MPI_Waitall(2, &dim_reqs[2], &stats[2]);
}
if (mpi_rank == 1) {
MPI_Irecv(&nr, 1, MPI_INT, 0, row_tag, MPI_COMM_WORLD, &dim_reqs[0]);
MPI_Irecv(&nc, 1, MPI_INT, 0, col_tag, MPI_COMM_WORLD, &dim_reqs[1]);
MPI_Waitall(2, dim_reqs, stats);
}
printf("rank: %d nr: %d nc: %d nrows: %d ncols: %d\n", mpi_rank, nr, nc, nrows, ncols);
// int next , prev ,buf[2] , tag1 =1 , tag2 =2;
// tag1= tag2 = 0;
// MPI_Request reqs[ 4 ] ;
// MPI_Status stats[ 4 ] ;
// int rank, numtasks;
// int nrows, ncols;
// prev = rank -1;
// next = rank +1;
// if ( rank == 0 ) prev = numtasks - 1 ;
// if (rank == numtasks -1) next = 0;
// MPI_Irecv(&buf[0], 1, MPI_INT, prev, tag1, MPI_COMM_WORLD, &reqs[0]);
// MPI_Irecv(&buf[1], 1, MPI_INT, prev, tag2, MPI_COMM_WORLD, &reqs[1]);
// MPI_Isend(&rank, 1, MPI_INT, next, tag2, MPI_COMM_WORLD, &reqs[2]);
// MPI_Isend(&rank, 1, MPI_INT, next, tag1, MPI_COMM_WORLD, &reqs[3]);
// MPI_Waitall(4, reqs, stats);
// printf("t %d comm with tasks %d %d\n", rank, prev, next);
// MPI_Request dim_reqs[4], data_reqs[2];
// MPI_Status dim_stats[4], data_stats[2];
// printf("rank %d size: %d\n", mpi_rank, mpi_size);
// 1. send and receive dense data.
// simple example: send and received a double array with irecv and isend
//}
// if (mpi_rank == MASTER) d00.print("d00");
// int nr, nc;
// double *d;
// MPI_Isend(&nrows, 1, MPI_INT, 1, row_tag, MPI_COMM_WORLD, &dim_reqs[0]);
// MPI_Isend(&ncols, 1, MPI_INT, 1, col_tag, MPI_COMM_WORLD, &dim_reqs[1]);
// MPI_Irecv(&nr, 1, MPI_INT, 0, row_tag, MPI_COMM_WORLD, &dim_reqs[2]);
// MPI_Irecv(&nc, 1, MPI_INT, 0, col_tag, MPI_COMM_WORLD, &dim_reqs[3]);
// if (mpi_rank != MASTER) printf("nr: %d nc: %d", nr, nc);
// MPI_Waitall(4, dim_reqs, dim_stats);
// //if (mpi_rank != MASTER) {
// d = (double*)malloc(sizeof(double)*nr*nc);
// MPI_Irecv(d, nr*nc, MPI_DOUBLE, 0, dense_tag, MPI_COMM_WORLD, &data_reqs[1]);
// MPI_Isend(d00.data, nrows*ncols, MPI_DOUBLE, 1, dense_tag, MPI_COMM_WORLD, &data_reqs[0]);
// MPI_Waitall(2, data_reqs, data_stats);
// Dense copy(nr, nc, d);
// copy.print("copy");
//}
double *a;
a = (double*) malloc(..);
MPI_Finalize();
}
| [
"sameer.deshmukh93@gmail.com"
] | sameer.deshmukh93@gmail.com |
214d69434036d08d7e60c8127bdf66bcef3f40de | 4949b75d479c369b125880b9646b47e4ce9b8e7c | /big factorial.cpp | 3fac1d787f1e8d92236f5025c24a7c739956fd82 | [] | no_license | abhayrai8299/HackerRankCodechefcode | af7406419e7ad6e3fb6cad05a59ef88a0bd0a4d1 | 0405d725113316254a785e21d711d4de04a28ca9 | refs/heads/master | 2022-09-18T12:58:22.953469 | 2020-05-30T06:27:53 | 2020-05-30T06:27:53 | 268,018,399 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 92 | cpp | #include<iostream>
int main()
{
int fact (int A)
int B ;
B= A*(A-1);
return B;
return 0;
}
| [
"abhay.rai122@gmail.com"
] | abhay.rai122@gmail.com |
fa87e1c42ac78a37312236967d09c6be74a433e6 | 46f2e7a10fca9f7e7b80b342240302c311c31914 | /opposing_lid_driven_flow/cavity/0.0584/p | 83a0e3b93ca713c938ff15babd5f4d09b0d36c3a | [] | no_license | patricksinclair/openfoam_warmups | 696cb1950d40b967b8b455164134bde03e9179a1 | 03c982f7d46b4858e3b6bfdde7b8e8c3c4275df9 | refs/heads/master | 2020-12-26T12:50:00.615357 | 2020-02-04T20:22:35 | 2020-02-04T20:22:35 | 237,510,814 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 23,293 | /*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 7
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0.0584";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField nonuniform List<scalar>
2500
(
-2.18239e-05
-6.51215
-9.29757
-10.4938
-11.1596
-11.5663
-11.8303
-12.0155
-12.1536
-12.261
-12.347
-12.4174
-12.4758
-12.5248
-12.5662
-12.6014
-12.6313
-12.6568
-12.6785
-12.697
-12.7126
-12.7258
-12.737
-12.7464
-12.7544
-12.7614
-12.7675
-12.7733
-12.7789
-12.7848
-12.7914
-12.7992
-12.8085
-12.8201
-12.8346
-12.8528
-12.8758
-12.9048
-12.9415
-12.9884
-13.0488
-13.128
-13.2348
-13.3846
-13.6083
-13.9669
-14.5672
-15.6685
-18.3358
-24.7206
-4.9554
-7.67552
-9.18252
-10.1429
-10.8111
-11.2716
-11.5936
-11.8274
-12.0032
-12.1393
-12.2474
-12.335
-12.407
-12.4671
-12.5177
-12.5606
-12.5972
-12.6286
-12.6556
-12.6788
-12.6988
-12.7162
-12.7313
-12.7446
-12.7564
-12.7672
-12.7772
-12.7869
-12.7966
-12.8068
-12.8181
-12.8308
-12.8457
-12.8634
-12.8849
-12.9112
-12.9436
-12.9841
-13.0349
-13.0994
-13.1825
-13.2912
-13.4368
-13.6365
-13.9195
-14.3337
-14.944
-15.8325
-17.2527
-19.8517
-7.92461
-8.75727
-9.55852
-10.2398
-10.7804
-11.1909
-11.5009
-11.7382
-11.9227
-12.0687
-12.1863
-12.2823
-12.3619
-12.4285
-12.4848
-12.5327
-12.5739
-12.6093
-12.6399
-12.6666
-12.6898
-12.7103
-12.7283
-12.7445
-12.7591
-12.7727
-12.7856
-12.7982
-12.8109
-12.8243
-12.8389
-12.8552
-12.874
-12.8959
-12.9221
-12.9537
-12.9921
-13.0394
-13.0981
-13.1716
-13.2647
-13.3843
-13.5399
-13.745
-14.0191
-14.3884
-14.8812
-15.5094
-16.2552
-17.0185
-9.43376
-9.64744
-10.0668
-10.5121
-10.9055
-11.233
-11.5
-11.7162
-11.8916
-12.0349
-12.153
-12.2511
-12.3335
-12.4033
-12.4627
-12.5137
-12.5578
-12.596
-12.6293
-12.6584
-12.6841
-12.7069
-12.7273
-12.7457
-12.7625
-12.7783
-12.7934
-12.8083
-12.8234
-12.8392
-12.8563
-12.8752
-12.8967
-12.9217
-12.9509
-12.9858
-13.0277
-13.0785
-13.1405
-13.2169
-13.3116
-13.4298
-13.5782
-13.7651
-14.0003
-14.293
-14.6488
-15.0551
-15.4375
-15.6153
-10.3189
-10.3188
-10.5231
-10.8003
-11.0753
-11.3258
-11.5449
-11.7323
-11.891
-12.025
-12.1384
-12.2347
-12.3169
-12.3873
-12.4481
-12.5008
-12.5466
-12.5867
-12.6219
-12.6529
-12.6805
-12.7052
-12.7274
-12.7476
-12.7664
-12.784
-12.801
-12.8177
-12.8347
-12.8525
-12.8715
-12.8924
-12.916
-12.9429
-12.9742
-13.011
-13.0546
-13.1066
-13.1691
-13.2445
-13.3357
-13.4463
-13.5803
-13.7416
-13.9332
-14.1552
-14.4012
-14.6504
-14.8304
-14.812
-10.8853
-10.8115
-10.9007
-11.0686
-11.2568
-11.4436
-11.618
-11.7751
-11.9137
-12.0348
-12.1401
-12.2315
-12.311
-12.3802
-12.4406
-12.4936
-12.5401
-12.5812
-12.6176
-12.6499
-12.6788
-12.7048
-12.7285
-12.7501
-12.7703
-12.7894
-12.8078
-12.826
-12.8444
-12.8636
-12.884
-12.9063
-12.9311
-12.9592
-12.9915
-13.0289
-13.0726
-13.124
-13.1845
-13.2561
-13.3407
-13.4402
-13.5565
-13.6906
-13.8418
-14.0054
-14.1714
-14.3194
-14.3932
-14.3116
-11.2671
-11.1767
-11.2074
-11.3068
-11.4337
-11.5704
-11.7063
-11.8349
-11.953
-12.0596
-12.1549
-12.2395
-12.3145
-12.3809
-12.4396
-12.4917
-12.538
-12.5792
-12.616
-12.649
-12.6787
-12.7056
-12.7302
-12.7529
-12.774
-12.7941
-12.8136
-12.8328
-12.8522
-12.8722
-12.8935
-12.9166
-12.942
-12.9704
-13.0027
-13.0397
-13.0822
-13.1315
-13.1885
-13.2544
-13.3304
-13.4174
-13.5156
-13.6243
-13.7407
-13.8589
-13.969
-14.0543
-14.0757
-13.9833
-11.54
-11.4534
-11.4551
-11.5122
-11.5967
-11.6957
-11.8002
-11.9038
-12.0026
-12.0948
-12.1793
-12.2561
-12.3255
-12.388
-12.4441
-12.4944
-12.5396
-12.5802
-12.6168
-12.6499
-12.6798
-12.7072
-12.7322
-12.7555
-12.7773
-12.798
-12.8181
-12.8379
-12.8578
-12.8784
-12.9
-12.9233
-12.9487
-12.9768
-13.0084
-13.0441
-13.0846
-13.1307
-13.1831
-13.2425
-13.3094
-13.3838
-13.4651
-13.5517
-13.64
-13.7244
-13.7962
-13.8435
-13.8399
-13.7546
-11.7457
-11.6685
-11.656
-11.6871
-11.7427
-11.8138
-11.8935
-11.9761
-12.0579
-12.1364
-12.2103
-12.279
-12.3423
-12.4001
-12.4528
-12.5007
-12.5442
-12.5836
-12.6195
-12.6521
-12.6819
-12.7092
-12.7344
-12.7578
-12.7798
-12.8008
-12.8212
-12.8412
-12.8613
-12.882
-12.9036
-12.9266
-12.9515
-12.9788
-13.0091
-13.0429
-13.0807
-13.1231
-13.1705
-13.2232
-13.281
-13.3438
-13.4102
-13.4784
-13.5449
-13.6045
-13.6507
-13.6752
-13.6602
-13.5865
-11.9071
-11.8397
-11.8207
-11.8358
-11.8717
-11.9226
-11.983
-12.0484
-12.1154
-12.1816
-12.2456
-12.3063
-12.3631
-12.416
-12.4649
-12.5099
-12.5511
-12.5889
-12.6236
-12.6553
-12.6845
-12.7114
-12.7363
-12.7596
-12.7816
-12.8025
-12.8228
-12.8427
-12.8627
-12.8831
-12.9043
-12.9267
-12.9507
-12.9768
-13.0055
-13.037
-13.0718
-13.1103
-13.1525
-13.1986
-13.2481
-13.3005
-13.3543
-13.4077
-13.4574
-13.4993
-13.5285
-13.5393
-13.5199
-13.4573
-12.0375
-11.979
-11.9574
-11.9626
-11.9852
-12.0212
-12.0668
-12.1184
-12.1729
-12.2284
-12.2832
-12.3363
-12.3869
-12.4347
-12.4795
-12.5212
-12.5599
-12.5957
-12.6287
-12.6593
-12.6875
-12.7137
-12.738
-12.7609
-12.7824
-12.803
-12.8229
-12.8425
-12.862
-12.8819
-12.9024
-12.9239
-12.9468
-12.9714
-12.9981
-13.0272
-13.0589
-13.0934
-13.1306
-13.1706
-13.2126
-13.256
-13.2995
-13.341
-13.3781
-13.4074
-13.4253
-13.4282
-13.4077
-13.3549
-12.1454
-12.0943
-12.0722
-12.0714
-12.0849
-12.1102
-12.1444
-12.1848
-12.229
-12.2752
-12.3218
-12.3678
-12.4125
-12.4553
-12.4959
-12.5342
-12.5701
-12.6036
-12.6348
-12.6638
-12.6907
-12.7159
-12.7394
-12.7615
-12.7824
-12.8024
-12.8217
-12.8406
-12.8595
-12.8786
-12.8982
-12.9186
-12.9401
-12.9631
-12.9877
-13.0142
-13.0428
-13.0735
-13.1061
-13.1405
-13.176
-13.2119
-13.2468
-13.2791
-13.3068
-13.3271
-13.3376
-13.3359
-13.316
-13.2714
-12.2362
-12.1914
-12.1699
-12.1653
-12.1726
-12.1901
-12.2156
-12.2472
-12.2829
-12.321
-12.3604
-12.4
-12.4391
-12.4771
-12.5136
-12.5483
-12.5813
-12.6123
-12.6414
-12.6686
-12.6941
-12.718
-12.7404
-12.7615
-12.7815
-12.8007
-12.8192
-12.8373
-12.8553
-12.8734
-12.8919
-12.911
-12.9311
-12.9523
-12.9748
-12.9988
-13.0244
-13.0515
-13.0799
-13.1094
-13.1393
-13.1688
-13.1969
-13.2221
-13.2427
-13.2567
-13.2624
-13.2582
-13.2397
-13.2019
-12.3137
-12.2743
-12.2538
-12.2471
-12.2502
-12.2619
-12.2808
-12.3054
-12.334
-12.3654
-12.3985
-12.4323
-12.4662
-12.4996
-12.532
-12.5633
-12.5932
-12.6216
-12.6484
-12.6737
-12.6975
-12.7199
-12.741
-12.761
-12.7799
-12.798
-12.8156
-12.8327
-12.8497
-12.8667
-12.8839
-12.9017
-12.9202
-12.9396
-12.96
-12.9816
-13.0043
-13.0281
-13.0528
-13.078
-13.1031
-13.1274
-13.15
-13.1697
-13.1851
-13.1947
-13.1973
-13.1918
-13.1751
-13.1431
-12.3806
-12.3458
-12.3266
-12.3188
-12.319
-12.3266
-12.3404
-12.3594
-12.3822
-12.4079
-12.4354
-12.4641
-12.4933
-12.5224
-12.551
-12.5788
-12.6057
-12.6314
-12.6559
-12.6791
-12.701
-12.7218
-12.7414
-12.76
-12.7777
-12.7947
-12.8111
-12.8271
-12.8429
-12.8586
-12.8746
-12.891
-12.9078
-12.9254
-12.9438
-12.9631
-12.9831
-13.0039
-13.0252
-13.0467
-13.0678
-13.0878
-13.1061
-13.1215
-13.133
-13.1396
-13.1402
-13.1344
-13.1195
-13.0924
-12.4389
-12.4081
-12.3905
-12.3822
-12.3805
-12.385
-12.395
-12.4095
-12.4275
-12.4484
-12.4712
-12.4953
-12.5201
-12.5452
-12.5702
-12.5947
-12.6185
-12.6415
-12.6636
-12.6847
-12.7047
-12.7237
-12.7417
-12.7588
-12.7752
-12.7908
-12.8059
-12.8207
-12.8352
-12.8496
-12.8642
-12.8791
-12.8943
-12.9101
-12.9266
-12.9436
-12.9612
-12.9793
-12.9977
-13.0159
-13.0336
-13.0502
-13.0649
-13.0771
-13.0858
-13.0902
-13.0897
-13.084
-13.071
-13.0482
-12.4901
-12.4631
-12.4469
-12.4386
-12.4357
-12.438
-12.445
-12.4559
-12.4701
-12.4869
-12.5056
-12.5256
-12.5466
-12.568
-12.5895
-12.6108
-12.6317
-12.652
-12.6717
-12.6905
-12.7085
-12.7256
-12.7419
-12.7575
-12.7723
-12.7866
-12.8003
-12.8137
-12.8269
-12.8399
-12.8531
-12.8664
-12.88
-12.8941
-12.9086
-12.9236
-12.9389
-12.9546
-12.9703
-12.9858
-13.0006
-13.0143
-13.0263
-13.0359
-13.0426
-13.0456
-13.0446
-13.0392
-13.0281
-13.009
-12.5356
-12.5119
-12.4973
-12.4892
-12.4856
-12.4864
-12.4911
-12.4992
-12.5102
-12.5235
-12.5386
-12.5551
-12.5725
-12.5905
-12.6088
-12.6271
-12.6451
-12.6628
-12.68
-12.6966
-12.7125
-12.7278
-12.7423
-12.7562
-12.7694
-12.7822
-12.7945
-12.8064
-12.8181
-12.8298
-12.8414
-12.8532
-12.8652
-12.8775
-12.8902
-12.9032
-12.9165
-12.9299
-12.9433
-12.9564
-12.9688
-12.9801
-12.9899
-12.9976
-13.0028
-13.0049
-13.0036
-12.9989
-12.9896
-12.9739
-12.5763
-12.5556
-12.5426
-12.535
-12.5311
-12.5307
-12.5337
-12.5396
-12.5479
-12.5583
-12.5703
-12.5836
-12.5979
-12.6128
-12.628
-12.6434
-12.6588
-12.6739
-12.6887
-12.7031
-12.7169
-12.7302
-12.7429
-12.755
-12.7666
-12.7778
-12.7885
-12.799
-12.8092
-12.8194
-12.8295
-12.8397
-12.8501
-12.8607
-12.8716
-12.8827
-12.894
-12.9054
-12.9168
-12.9277
-12.9381
-12.9474
-12.9554
-12.9616
-12.9657
-12.9672
-12.9661
-12.9621
-12.9545
-12.9419
-12.613
-12.5952
-12.5838
-12.5768
-12.5728
-12.5717
-12.5734
-12.5774
-12.5836
-12.5915
-12.6008
-12.6113
-12.6227
-12.6348
-12.6472
-12.6599
-12.6727
-12.6854
-12.6978
-12.7099
-12.7216
-12.7329
-12.7438
-12.7541
-12.7641
-12.7736
-12.7828
-12.7917
-12.8003
-12.8089
-12.8175
-12.8261
-12.8349
-12.8438
-12.8529
-12.8623
-12.8717
-12.8813
-12.8907
-12.8998
-12.9083
-12.916
-12.9225
-12.9276
-12.9309
-12.9321
-12.9312
-12.9281
-12.9222
-12.9125
-12.6465
-12.6313
-12.6215
-12.6152
-12.6114
-12.6098
-12.6105
-12.6131
-12.6175
-12.6232
-12.6302
-12.6383
-12.6471
-12.6565
-12.6664
-12.6765
-12.6868
-12.6971
-12.7073
-12.7172
-12.7269
-12.7362
-12.7451
-12.7537
-12.7619
-12.7697
-12.7773
-12.7845
-12.7916
-12.7986
-12.8056
-12.8126
-12.8197
-12.8269
-12.8343
-12.8419
-12.8496
-12.8574
-12.865
-12.8724
-12.8794
-12.8856
-12.8909
-12.895
-12.8978
-12.8989
-12.8984
-12.8962
-12.892
-12.8849
-12.6773
-12.6647
-12.6564
-12.651
-12.6474
-12.6456
-12.6456
-12.647
-12.6498
-12.6538
-12.6587
-12.6645
-12.671
-12.6781
-12.6855
-12.6933
-12.7012
-12.7092
-12.7171
-12.725
-12.7326
-12.7399
-12.747
-12.7537
-12.7602
-12.7663
-12.7722
-12.7778
-12.7833
-12.7886
-12.7939
-12.7993
-12.8047
-12.8102
-12.8159
-12.8218
-12.8277
-12.8337
-12.8397
-12.8455
-12.851
-12.856
-12.8603
-12.8636
-12.866
-12.8671
-12.8671
-12.8659
-12.8632
-12.8587
-12.706
-12.6959
-12.6892
-12.6846
-12.6814
-12.6796
-12.6789
-12.6794
-12.6809
-12.6833
-12.6864
-12.6902
-12.6946
-12.6994
-12.7047
-12.7102
-12.7159
-12.7217
-12.7275
-12.7332
-12.7388
-12.7443
-12.7494
-12.7544
-12.759
-12.7634
-12.7676
-12.7715
-12.7753
-12.779
-12.7826
-12.7862
-12.7899
-12.7937
-12.7977
-12.8018
-12.806
-12.8104
-12.8147
-12.819
-12.8231
-12.8269
-12.8302
-12.833
-12.835
-12.8363
-12.8368
-12.8365
-12.8355
-12.8335
-12.733
-12.7254
-12.7202
-12.7166
-12.7138
-12.712
-12.711
-12.7107
-12.7111
-12.712
-12.7135
-12.7155
-12.7179
-12.7207
-12.7238
-12.7272
-12.7308
-12.7345
-12.7383
-12.742
-12.7457
-12.7492
-12.7525
-12.7557
-12.7585
-12.7612
-12.7636
-12.7658
-12.7679
-12.7698
-12.7717
-12.7736
-12.7755
-12.7775
-12.7797
-12.782
-12.7845
-12.7872
-12.7899
-12.7927
-12.7955
-12.7982
-12.8006
-12.8027
-12.8045
-12.8059
-12.807
-12.8077
-12.8083
-12.8087
-12.7589
-12.7537
-12.75
-12.7473
-12.7451
-12.7434
-12.7421
-12.7411
-12.7405
-12.7402
-12.7401
-12.7404
-12.741
-12.7419
-12.7431
-12.7445
-12.7461
-12.7478
-12.7496
-12.7514
-12.7531
-12.7548
-12.7563
-12.7576
-12.7587
-12.7596
-12.7603
-12.7607
-12.761
-12.7612
-12.7613
-12.7614
-12.7615
-12.7616
-12.762
-12.7625
-12.7632
-12.7641
-12.7652
-12.7665
-12.7679
-12.7694
-12.771
-12.7725
-12.7741
-12.7757
-12.7773
-12.779
-12.7811
-12.784
-12.784
-12.7811
-12.779
-12.7773
-12.7757
-12.7741
-12.7725
-12.771
-12.7694
-12.7679
-12.7665
-12.7652
-12.7641
-12.7632
-12.7625
-12.762
-12.7616
-12.7615
-12.7614
-12.7613
-12.7612
-12.761
-12.7607
-12.7603
-12.7596
-12.7587
-12.7576
-12.7563
-12.7548
-12.7531
-12.7514
-12.7496
-12.7478
-12.7461
-12.7445
-12.7431
-12.7419
-12.741
-12.7404
-12.7401
-12.7402
-12.7405
-12.7411
-12.7421
-12.7434
-12.7451
-12.7473
-12.75
-12.7536
-12.7589
-12.8087
-12.8083
-12.8077
-12.807
-12.8059
-12.8045
-12.8027
-12.8006
-12.7982
-12.7955
-12.7927
-12.7899
-12.7872
-12.7845
-12.782
-12.7797
-12.7775
-12.7755
-12.7736
-12.7717
-12.7698
-12.7679
-12.7658
-12.7636
-12.7612
-12.7585
-12.7557
-12.7525
-12.7492
-12.7457
-12.742
-12.7383
-12.7345
-12.7308
-12.7272
-12.7238
-12.7207
-12.7179
-12.7155
-12.7135
-12.712
-12.7111
-12.7107
-12.711
-12.712
-12.7138
-12.7166
-12.7202
-12.7254
-12.733
-12.8335
-12.8355
-12.8365
-12.8368
-12.8363
-12.835
-12.833
-12.8302
-12.8269
-12.8231
-12.819
-12.8147
-12.8104
-12.806
-12.8018
-12.7977
-12.7937
-12.7899
-12.7862
-12.7826
-12.779
-12.7753
-12.7715
-12.7676
-12.7634
-12.759
-12.7544
-12.7494
-12.7443
-12.7388
-12.7332
-12.7275
-12.7217
-12.7159
-12.7102
-12.7047
-12.6994
-12.6946
-12.6902
-12.6864
-12.6833
-12.6809
-12.6794
-12.6789
-12.6796
-12.6814
-12.6846
-12.6892
-12.6959
-12.706
-12.8587
-12.8632
-12.8659
-12.8671
-12.8671
-12.866
-12.8636
-12.8603
-12.856
-12.851
-12.8456
-12.8397
-12.8338
-12.8277
-12.8218
-12.8159
-12.8102
-12.8047
-12.7993
-12.7939
-12.7886
-12.7833
-12.7778
-12.7722
-12.7663
-12.7602
-12.7537
-12.747
-12.7399
-12.7326
-12.725
-12.7171
-12.7092
-12.7012
-12.6933
-12.6855
-12.6781
-12.671
-12.6645
-12.6587
-12.6538
-12.6498
-12.647
-12.6456
-12.6456
-12.6474
-12.651
-12.6564
-12.6647
-12.6773
-12.8849
-12.892
-12.8962
-12.8984
-12.8989
-12.8978
-12.895
-12.8909
-12.8856
-12.8794
-12.8724
-12.865
-12.8574
-12.8496
-12.8419
-12.8343
-12.8269
-12.8197
-12.8126
-12.8056
-12.7986
-12.7916
-12.7845
-12.7773
-12.7697
-12.7619
-12.7537
-12.7451
-12.7362
-12.7269
-12.7172
-12.7073
-12.6971
-12.6868
-12.6765
-12.6664
-12.6565
-12.6471
-12.6383
-12.6302
-12.6232
-12.6175
-12.6131
-12.6105
-12.6098
-12.6114
-12.6152
-12.6215
-12.6313
-12.6465
-12.9125
-12.9222
-12.9281
-12.9312
-12.9321
-12.9309
-12.9276
-12.9225
-12.916
-12.9083
-12.8998
-12.8907
-12.8813
-12.8717
-12.8623
-12.8529
-12.8438
-12.8349
-12.8261
-12.8175
-12.8089
-12.8003
-12.7917
-12.7828
-12.7736
-12.7641
-12.7541
-12.7438
-12.7329
-12.7216
-12.7099
-12.6978
-12.6854
-12.6727
-12.6599
-12.6472
-12.6348
-12.6227
-12.6113
-12.6008
-12.5915
-12.5836
-12.5774
-12.5734
-12.5717
-12.5728
-12.5767
-12.5838
-12.5952
-12.613
-12.9419
-12.9545
-12.9622
-12.9661
-12.9672
-12.9657
-12.9616
-12.9554
-12.9474
-12.9381
-12.9277
-12.9168
-12.9054
-12.894
-12.8827
-12.8716
-12.8607
-12.8501
-12.8397
-12.8295
-12.8194
-12.8092
-12.799
-12.7885
-12.7778
-12.7666
-12.755
-12.7429
-12.7302
-12.7169
-12.7031
-12.6887
-12.6739
-12.6588
-12.6434
-12.628
-12.6128
-12.5979
-12.5836
-12.5703
-12.5583
-12.5479
-12.5396
-12.5337
-12.5307
-12.5311
-12.535
-12.5426
-12.5556
-12.5763
-12.9739
-12.9896
-12.9989
-13.0036
-13.0049
-13.0028
-12.9976
-12.9899
-12.9801
-12.9688
-12.9564
-12.9433
-12.9299
-12.9165
-12.9032
-12.8902
-12.8775
-12.8652
-12.8532
-12.8414
-12.8298
-12.8181
-12.8064
-12.7945
-12.7822
-12.7694
-12.7562
-12.7423
-12.7278
-12.7125
-12.6966
-12.68
-12.6628
-12.6451
-12.6271
-12.6088
-12.5905
-12.5725
-12.5551
-12.5386
-12.5235
-12.5102
-12.4992
-12.4911
-12.4864
-12.4856
-12.4892
-12.4973
-12.5118
-12.5356
-13.009
-13.0281
-13.0392
-13.0446
-13.0456
-13.0426
-13.0359
-13.0263
-13.0143
-13.0006
-12.9858
-12.9703
-12.9546
-12.9389
-12.9236
-12.9086
-12.8941
-12.88
-12.8664
-12.8531
-12.8399
-12.8269
-12.8137
-12.8003
-12.7866
-12.7723
-12.7575
-12.7419
-12.7256
-12.7085
-12.6905
-12.6717
-12.652
-12.6317
-12.6108
-12.5895
-12.568
-12.5466
-12.5256
-12.5056
-12.4869
-12.4701
-12.4559
-12.445
-12.438
-12.4357
-12.4386
-12.4469
-12.4631
-12.4901
-13.0482
-13.071
-13.084
-13.0897
-13.0902
-13.0858
-13.0771
-13.0649
-13.0502
-13.0336
-13.0159
-12.9977
-12.9793
-12.9612
-12.9436
-12.9266
-12.9101
-12.8943
-12.8791
-12.8642
-12.8496
-12.8352
-12.8207
-12.8059
-12.7908
-12.7752
-12.7588
-12.7417
-12.7237
-12.7047
-12.6847
-12.6636
-12.6415
-12.6185
-12.5947
-12.5702
-12.5452
-12.5201
-12.4953
-12.4712
-12.4484
-12.4275
-12.4095
-12.395
-12.385
-12.3805
-12.3821
-12.3905
-12.4081
-12.4389
-13.0924
-13.1195
-13.1344
-13.1402
-13.1396
-13.133
-13.1215
-13.1061
-13.0878
-13.0678
-13.0467
-13.0252
-13.0039
-12.9831
-12.9631
-12.9438
-12.9254
-12.9078
-12.891
-12.8746
-12.8586
-12.8429
-12.8271
-12.8111
-12.7947
-12.7777
-12.76
-12.7414
-12.7218
-12.701
-12.6791
-12.6559
-12.6314
-12.6057
-12.5788
-12.551
-12.5224
-12.4933
-12.4641
-12.4354
-12.4079
-12.3822
-12.3594
-12.3404
-12.3266
-12.319
-12.3188
-12.3266
-12.3458
-12.3806
-13.1431
-13.1751
-13.1918
-13.1973
-13.1947
-13.1851
-13.1697
-13.15
-13.1274
-13.1031
-13.078
-13.0528
-13.0281
-13.0043
-12.9816
-12.96
-12.9396
-12.9202
-12.9017
-12.8839
-12.8667
-12.8497
-12.8327
-12.8156
-12.798
-12.7799
-12.761
-12.741
-12.7199
-12.6975
-12.6737
-12.6484
-12.6216
-12.5932
-12.5633
-12.532
-12.4996
-12.4662
-12.4323
-12.3984
-12.3654
-12.334
-12.3054
-12.2808
-12.2619
-12.2502
-12.2471
-12.2538
-12.2743
-12.3137
-13.2019
-13.2397
-13.2582
-13.2624
-13.2567
-13.2427
-13.2221
-13.1969
-13.1688
-13.1393
-13.1094
-13.0799
-13.0515
-13.0244
-12.9988
-12.9748
-12.9523
-12.9311
-12.9111
-12.8919
-12.8734
-12.8553
-12.8373
-12.8192
-12.8007
-12.7815
-12.7615
-12.7404
-12.718
-12.6941
-12.6686
-12.6414
-12.6123
-12.5813
-12.5483
-12.5136
-12.4771
-12.4391
-12.4
-12.3604
-12.321
-12.2829
-12.2472
-12.2156
-12.1901
-12.1726
-12.1653
-12.1699
-12.1914
-12.2362
-13.2714
-13.3161
-13.3359
-13.3376
-13.3271
-13.3068
-13.2791
-13.2468
-13.2119
-13.176
-13.1405
-13.1061
-13.0735
-13.0428
-13.0142
-12.9877
-12.9631
-12.9401
-12.9186
-12.8982
-12.8786
-12.8595
-12.8406
-12.8217
-12.8024
-12.7824
-12.7615
-12.7394
-12.7159
-12.6907
-12.6638
-12.6348
-12.6036
-12.5701
-12.5342
-12.4959
-12.4553
-12.4125
-12.3678
-12.3218
-12.2752
-12.229
-12.1848
-12.1444
-12.1101
-12.0849
-12.0714
-12.0722
-12.0943
-12.1454
-13.3549
-13.4077
-13.4282
-13.4253
-13.4074
-13.3781
-13.341
-13.2995
-13.256
-13.2126
-13.1706
-13.1307
-13.0934
-13.0589
-13.0272
-12.9981
-12.9714
-12.9468
-12.9239
-12.9024
-12.8819
-12.862
-12.8425
-12.8229
-12.803
-12.7824
-12.7609
-12.738
-12.7137
-12.6875
-12.6593
-12.6287
-12.5957
-12.5599
-12.5212
-12.4795
-12.4347
-12.3869
-12.3363
-12.2832
-12.2284
-12.1729
-12.1184
-12.0668
-12.0212
-11.9852
-11.9626
-11.9574
-11.979
-12.0375
-13.4574
-13.5199
-13.5393
-13.5285
-13.4993
-13.4574
-13.4077
-13.3543
-13.3005
-13.2481
-13.1986
-13.1525
-13.1103
-13.0718
-13.037
-13.0055
-12.9768
-12.9507
-12.9267
-12.9043
-12.8831
-12.8627
-12.8427
-12.8228
-12.8025
-12.7816
-12.7596
-12.7363
-12.7114
-12.6845
-12.6553
-12.6236
-12.5889
-12.5511
-12.5099
-12.4649
-12.416
-12.3631
-12.3063
-12.2456
-12.1816
-12.1154
-12.0484
-11.983
-11.9225
-11.8717
-11.8358
-11.8207
-11.8397
-11.9071
-13.5865
-13.6603
-13.6752
-13.6507
-13.6045
-13.5449
-13.4784
-13.4102
-13.3438
-13.281
-13.2232
-13.1705
-13.1231
-13.0807
-13.0429
-13.0091
-12.9788
-12.9515
-12.9266
-12.9036
-12.882
-12.8613
-12.8412
-12.8212
-12.8008
-12.7798
-12.7578
-12.7344
-12.7092
-12.6819
-12.6521
-12.6195
-12.5836
-12.5442
-12.5007
-12.4528
-12.4001
-12.3423
-12.279
-12.2103
-12.1364
-12.0579
-11.9761
-11.8935
-11.8138
-11.7427
-11.6871
-11.656
-11.6685
-11.7457
-13.7546
-13.8399
-13.8435
-13.7962
-13.7244
-13.64
-13.5517
-13.4651
-13.3838
-13.3094
-13.2425
-13.1831
-13.1307
-13.0846
-13.0441
-13.0084
-12.9768
-12.9487
-12.9233
-12.9
-12.8784
-12.8578
-12.8379
-12.8181
-12.798
-12.7773
-12.7555
-12.7322
-12.7072
-12.6798
-12.6499
-12.6168
-12.5802
-12.5396
-12.4944
-12.4441
-12.388
-12.3255
-12.2561
-12.1793
-12.0948
-12.0026
-11.9038
-11.8002
-11.6957
-11.5967
-11.5122
-11.4551
-11.4534
-11.54
-13.9833
-14.0757
-14.0543
-13.969
-13.8589
-13.7407
-13.6243
-13.5156
-13.4174
-13.3304
-13.2544
-13.1885
-13.1315
-13.0822
-13.0397
-13.0027
-12.9704
-12.942
-12.9166
-12.8935
-12.8722
-12.8522
-12.8328
-12.8136
-12.7941
-12.774
-12.7529
-12.7302
-12.7056
-12.6787
-12.649
-12.616
-12.5792
-12.538
-12.4917
-12.4396
-12.3809
-12.3145
-12.2395
-12.1549
-12.0596
-11.953
-11.8349
-11.7063
-11.5704
-11.4336
-11.3068
-11.2074
-11.1767
-11.2671
-14.3116
-14.3932
-14.3194
-14.1714
-14.0054
-13.8418
-13.6906
-13.5565
-13.4402
-13.3407
-13.2561
-13.1845
-13.124
-13.0726
-13.0289
-12.9915
-12.9592
-12.9311
-12.9063
-12.884
-12.8636
-12.8444
-12.826
-12.8078
-12.7894
-12.7703
-12.7501
-12.7285
-12.7048
-12.6788
-12.6499
-12.6176
-12.5812
-12.5401
-12.4936
-12.4406
-12.3802
-12.311
-12.2315
-12.1401
-12.0348
-11.9137
-11.7751
-11.618
-11.4436
-11.2568
-11.0686
-10.9007
-10.8115
-10.8853
-14.812
-14.8304
-14.6504
-14.4012
-14.1552
-13.9332
-13.7416
-13.5803
-13.4463
-13.3357
-13.2445
-13.1691
-13.1066
-13.0546
-13.011
-12.9742
-12.9429
-12.916
-12.8924
-12.8715
-12.8525
-12.8347
-12.8177
-12.801
-12.784
-12.7664
-12.7476
-12.7274
-12.7052
-12.6805
-12.6529
-12.6219
-12.5867
-12.5466
-12.5007
-12.4481
-12.3873
-12.3169
-12.2347
-12.1384
-12.025
-11.891
-11.7323
-11.5449
-11.3258
-11.0753
-10.8003
-10.5231
-10.3188
-10.3189
-15.6153
-15.4375
-15.0551
-14.6488
-14.293
-14.0003
-13.7651
-13.5782
-13.4298
-13.3116
-13.2169
-13.1405
-13.0785
-13.0277
-12.9858
-12.951
-12.9217
-12.8968
-12.8752
-12.8563
-12.8392
-12.8234
-12.8083
-12.7934
-12.7783
-12.7625
-12.7457
-12.7273
-12.7069
-12.6841
-12.6584
-12.6293
-12.596
-12.5578
-12.5137
-12.4627
-12.4033
-12.3335
-12.2511
-12.153
-12.0349
-11.8916
-11.7162
-11.5
-11.233
-10.9055
-10.5121
-10.0668
-9.64744
-9.43375
-17.0185
-16.2552
-15.5094
-14.8812
-14.3884
-14.0191
-13.745
-13.5399
-13.3843
-13.2647
-13.1716
-13.0981
-13.0394
-12.9921
-12.9537
-12.9221
-12.8959
-12.874
-12.8552
-12.8389
-12.8243
-12.8109
-12.7982
-12.7856
-12.7727
-12.7591
-12.7445
-12.7283
-12.7103
-12.6898
-12.6666
-12.6399
-12.6093
-12.5739
-12.5327
-12.4848
-12.4285
-12.3618
-12.2823
-12.1863
-12.0687
-11.9227
-11.7382
-11.5009
-11.1909
-10.7804
-10.2398
-9.55852
-8.75727
-7.9246
-19.8517
-17.2527
-15.8325
-14.944
-14.3337
-13.9195
-13.6365
-13.4368
-13.2913
-13.1825
-13.0994
-13.0349
-12.9841
-12.9437
-12.9112
-12.8849
-12.8634
-12.8457
-12.8308
-12.8181
-12.8068
-12.7966
-12.7869
-12.7772
-12.7672
-12.7564
-12.7446
-12.7313
-12.7162
-12.6988
-12.6788
-12.6556
-12.6286
-12.5972
-12.5606
-12.5177
-12.4671
-12.407
-12.3349
-12.2474
-12.1393
-12.0032
-11.8274
-11.5936
-11.2716
-10.8111
-10.1429
-9.18252
-7.67552
-4.95539
-24.7206
-18.3358
-15.6685
-14.5672
-13.9669
-13.6083
-13.3846
-13.2348
-13.1281
-13.0488
-12.9884
-12.9415
-12.9048
-12.8758
-12.8528
-12.8346
-12.8201
-12.8085
-12.7992
-12.7914
-12.7848
-12.7789
-12.7733
-12.7675
-12.7614
-12.7544
-12.7464
-12.737
-12.7258
-12.7126
-12.697
-12.6785
-12.6568
-12.6313
-12.6014
-12.5662
-12.5248
-12.4758
-12.4174
-12.347
-12.261
-12.1536
-12.0155
-11.8303
-11.5663
-11.1596
-10.4938
-9.29756
-6.51214
-2.23335e-05
)
;
boundaryField
{
movingWallTop
{
type zeroGradient;
}
movingWallBottom
{
type zeroGradient;
}
fixedWalls
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //
| [
"patricksinclair@hotmail.co.uk"
] | patricksinclair@hotmail.co.uk | |
e54550bdf80ab299b61a9b86a27e34d16c9e0bc5 | 791efd079bff8cbf6ce2e9a802ff9a89e2fe499b | /ExternalSortLargFile/ExternalSort_ASCII.cpp | 76a8428139ad1e297cb452da72ec771b48cfb6a4 | [] | no_license | TaiNN1988/Algorithm | 6063673014c914ecf760492e9656b663ba6e49c9 | a77dc8110dc3019d198b840e291f46c461978f64 | refs/heads/master | 2023-01-27T13:09:30.813729 | 2020-12-08T03:51:25 | 2020-12-08T03:51:25 | 279,824,886 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 14,441 | cpp | #include <iostream>
#include <fstream>
#include <string>
#include <algorithm>
#include <vector>
#include <random>
#include <filesystem>
#include <chrono>
#define OPTIMIZE_EXTERNAL_SORT_USING_MIN_HEAP 1
#define ONE_MB 1048576 //1024*1024
#define ONE_GB 1073741824 //1024*1024*1024
unsigned int g_OutFileCount = 0;
const char* dicTemp = "FolderTemp/";
using namespace std;
typedef struct FileInfo
{
string currentLine;
std::shared_ptr<fstream> hFile;
bool isEndFile = false;
FileInfo()
{
currentLine = "";
isEndFile = false;
}
FileInfo(string fileName)
{
hFile = shared_ptr<fstream>(new fstream(fileName, std::ios_base::in),std::default_delete<fstream>());
if(!getline(*hFile, this->currentLine, '\n'))
{
isEndFile = true;
hFile->close();
}
}
FileInfo(std::shared_ptr<fstream> &hFilevalue)
{
this->hFile = hFilevalue;
if(!getline(*hFile, this->currentLine, '\n'))
{
isEndFile = true;
hFile->close();
}
}
}FileInfo;
bool externalSortLargFile(string inFileName, string outFileName, unsigned long long numBytesLimit);
void mergeKfilesByUsingMinHeap(string outFileName, unsigned long long totallFile);
void mergeTwoSmallFile(string inFile1, string inFile2, string outFile);
void sliptAndSortFile(string inFileName, unsigned long long maxBytesOfSlipFile, unsigned int& countFile);
void mergeKfiles(string outFileName, unsigned long long leftFileIdx, unsigned long long rightFileIdx);
void directSortSmallFileOnMemory(string inFileName, string outFileName);
//Helper function
bool genFileWithNumLines(string fileName, unsigned long long totallLines, unsigned int minSizeOfLine, unsigned int maxSizeOfLine);
bool genFileWithNumBytesLimit(string fileName, unsigned long long numBytesLimit);
std::string random_string( size_t length );
void writeToFile(string fileName, vector<string> listLine);
unsigned int randomNumber(unsigned int rangeFrom, unsigned int rangeTo);
void writeToFile(string infileName, string outfileName);
bool checkExitFileAndReadable(string fileName);
bool compareGreaters(const FileInfo& fileInfo1, const FileInfo& fileInfo2)
{
return (fileInfo1.currentLine > fileInfo2.currentLine);
}
int main(int argc, char* argv[])
{
int bFunc = EXIT_SUCCESS;
string inFileName = "";
string outFilename="";
unsigned long long numBytesLimit = 0;
if(argc == 4)
{
// get paramater from command line
inFileName = argv[1];
outFilename = argv[2];
numBytesLimit = std::stoull(argv[3]);
if(inFileName == "" || outFilename == "" || numBytesLimit == 0)
{
cout<<"Error! Invalid paramater from command line.\n";
return EXIT_FAILURE;
}
}
else
{
return EXIT_FAILURE;
}
// set start time
auto start = std::chrono::high_resolution_clock::now();
bFunc = externalSortLargFile(inFileName, outFilename, numBytesLimit);
// Get execution time
auto end = std::chrono::high_resolution_clock::now();
auto duration = chrono::duration_cast<chrono::seconds>(end - start);
cout<<"Execution time on externalSortLargFile function:"<<duration.count()<<"(s)"<<endl;
return bFunc;
}
bool externalSortLargFile(string inFileName, string outFileName, unsigned long long numBytesLimit)
{
if(!checkExitFileAndReadable(inFileName))
{
cout<<"Error Open file! Please check ["<<inFileName<<"]file is exit or not."<<endl;
return EXIT_FAILURE;
}
// Create folder temp for processing data
if(!filesystem::create_directories(dicTemp))
{
cout<<"Error! Can not create folder "<<dicTemp<<endl;
return EXIT_FAILURE;
}
std::uintmax_t fileSize = std::filesystem::file_size(inFileName);
double sumGigagbyte = double(fileSize)/1000000000;
cout<<"Total size of file as bytes: "<< fileSize<<"(Byte)"<<endl;
cout<<"Total size of file as gigagbyte: "<< sumGigagbyte<<"(GB)"<<endl;
unsigned long long maxBytesOfSlipFile = 0;
//=========Caculate max size of slipt file====================//
//Default it will use numBytesLimit for each file
unsigned long long sz10MB = (unsigned long long)ONE_MB*10;
unsigned long long sz100MB = (unsigned long long)ONE_MB*100;
unsigned long long sz200MB = (unsigned long long)ONE_MB*200;
unsigned long long sz1000MB = (unsigned long long)ONE_MB*1000;
unsigned long long sz10GB = (unsigned long long)ONE_GB*10;
unsigned long long sz100GB = (unsigned long long)ONE_GB*100;
unsigned long long sz200GB = (unsigned long long)ONE_GB*200;
if(fileSize < ONE_GB && numBytesLimit > ONE_MB)
{
// Case small file
if(fileSize < ONE_MB)
{
directSortSmallFileOnMemory(inFileName, outFileName);
return EXIT_SUCCESS;
}
maxBytesOfSlipFile = ONE_MB;
}
else if(fileSize >= ONE_GB && fileSize < sz10GB && numBytesLimit > sz10MB)
{
maxBytesOfSlipFile = sz10MB;
}
else if (fileSize >= sz10GB && fileSize < sz100GB && numBytesLimit > sz100MB)
{
maxBytesOfSlipFile = sz100MB;
}
else if (fileSize >= sz100GB && fileSize < sz200GB && numBytesLimit > sz200MB)
{
maxBytesOfSlipFile = sz200MB;
}
else if (fileSize >= sz200GB && numBytesLimit > sz200MB)
{
maxBytesOfSlipFile = sz1000MB;
}
else
{
maxBytesOfSlipFile = numBytesLimit;
}
cout<<"Max size of slipt file: "<< maxBytesOfSlipFile<<"(Byte)"<<endl;
//================================================================================//
unsigned int countFile = 0;
cout<<"Part1: Processing slipt file and sort write to k files"<<endl;
sliptAndSortFile(inFileName, maxBytesOfSlipFile, countFile);
cout<<" => Number of Slipt file:"<<countFile<<endl;
cout<<"Part2: Processing merg k sored small file to final output file"<<endl;
#ifdef OPTIMIZE_EXTERNAL_SORT_USING_MIN_HEAP
mergeKfilesByUsingMinHeap(outFileName, countFile);
#else
mergeKfiles(outFileName, 1, countFile);
#endif
cout<<"Part3: Clean all temp file after sorted larg file"<<endl;
if(!filesystem::remove_all(dicTemp))
{
cout<<"Error! Can not remve all file in folder "<<dicTemp<<endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
void directSortSmallFileOnMemory(string inFileName, string outFileName)
{
vector<string> lstLines;
fstream hInfile(inFileName, std::ios_base::in);
string lineBuffer;
while (getline(hInfile, lineBuffer, '\n'))
{
lstLines.push_back(lineBuffer);
}
std::sort(lstLines.begin(), lstLines.end());
writeToFile(outFileName, lstLines);
hInfile.close();
}
void sliptAndSortFile(string inFileName, unsigned long long maxBytesOfSlipFile, unsigned int& countFile)
{
string bufferLine;
fstream hInfile(inFileName, std::ios_base::in);
unsigned int bufferNumBytes;
streampos previPos;
countFile = 0;
vector<string> lstLines;
bufferNumBytes = 0;
while(getline(hInfile, bufferLine, '\n'))
{
if(bufferNumBytes + bufferLine.length() > maxBytesOfSlipFile)
{
countFile++;
std::sort(lstLines.begin(), lstLines.end());
string fileName = std::string(dicTemp) + std::to_string(countFile);
writeToFile(fileName, lstLines);
bufferNumBytes = 0;
lstLines.clear();
}
bufferNumBytes += bufferLine.length();
lstLines.push_back(bufferLine);
}
// In case: pointe file go to end file and remain buffer. it should be check and write to file
if(!lstLines.empty())
{
countFile++;
std::sort(lstLines.begin(), lstLines.end());
string fileName = std::string(dicTemp) + std::to_string(countFile);
writeToFile(fileName, lstLines);
}
}
void mergeKfiles(string outFileName, unsigned long long leftFileIdx, unsigned long long rightFileIdx)
{
// Base case 1
if(leftFileIdx == rightFileIdx)
{
writeToFile( std::string(dicTemp) + std::to_string(leftFileIdx), outFileName);
return;
}
// Base case 2
if(rightFileIdx - leftFileIdx == 1)
{
mergeTwoSmallFile( std::string(dicTemp) + std::to_string(leftFileIdx), std::string(dicTemp) + std::to_string(rightFileIdx), outFileName);
return;
}
g_OutFileCount++;
string outFileName1 = std::string(dicTemp) + "outTem1_" + std::to_string(g_OutFileCount);
string outFileName2 = std::string(dicTemp)+ "outTem2_" + std::to_string(g_OutFileCount);
mergeKfiles(outFileName1, leftFileIdx, (leftFileIdx + rightFileIdx)/2);
mergeKfiles(outFileName2, (leftFileIdx + rightFileIdx)/2 + 1, rightFileIdx);
mergeTwoSmallFile(outFileName1, outFileName2, outFileName);
}
void mergeKfilesByUsingMinHeap(string outFileName, unsigned long long totallFile)
{
vector<FileInfo> hListInfo(totallFile);
int fileIdx = 0;
for(unsigned long long idx = 0; idx < totallFile; idx++)
{
fileIdx++;
hListInfo[idx] = FileInfo(std::string(dicTemp) + std::to_string(fileIdx));
}
ofstream hOutFile(outFileName,ios_base::out);
// Create Min Heap
std::make_heap(hListInfo.begin(), hListInfo.end(), compareGreaters);
//compareGreaters
while (!hListInfo.empty())
{
hOutFile<<hListInfo.front().currentLine<<endl;
FileInfo nextItemRoot = FileInfo(hListInfo.front().hFile);
//Remote root
pop_heap(hListInfo.begin(), hListInfo.end(), compareGreaters);
hListInfo.pop_back();
if(!nextItemRoot.isEndFile)
{
//Update next root of Min Heap
hListInfo.push_back(nextItemRoot);
std::push_heap(hListInfo.begin(), hListInfo.end(), compareGreaters);
}
}
}
void mergeTwoSmallFile(string inFile1, string inFile2, string outFile)
{
fstream hInFile1(inFile1, std::ios_base::in);
fstream hInFile2(inFile2, std::ios_base::in);
ofstream hOutFile(outFile,ios_base::out);
string outLine;
streampos previPos1, previPos2;
while(true)
{
string bufferLine1 = "", bufferLine2 = "";
getline(hInFile1, bufferLine1, '\n');
getline(hInFile2, bufferLine2, '\n');
if (bufferLine1 != "" && bufferLine2 != "")
{
outLine = bufferLine1 < bufferLine2 ? bufferLine1: bufferLine2;
if( bufferLine1 < bufferLine2)
{
// Back possition pointer file
hInFile2.seekg(previPos2);
}
else if (bufferLine1 > bufferLine2) {
// Back possition pointer file
hInFile1.seekg(previPos1);
}
}
else if (bufferLine1 != "" && bufferLine2 == "") {
outLine = bufferLine1;
}
else if (bufferLine1 == "" && bufferLine2 != "") {
outLine = bufferLine2;
}
else
{
break;
}
hOutFile<<outLine<<endl;
if(bufferLine1 == bufferLine2)
{
hOutFile<<outLine<<endl;
}
previPos1 = hInFile1.tellg();
previPos2 = hInFile2.tellg();
}
}
bool checkExitFileAndReadable(string fileName)
{
fstream hfile(fileName, std::ios_base::in);
return hfile.is_open();
}
void writeToFile(string infileName, string outfileName)
{
fstream hInFile(infileName, std::ios_base::in);
ofstream hOutFile(outfileName,ios_base::out);
string bufferLine;
while(getline(hInFile, bufferLine, '\n'))
{
hOutFile<<bufferLine<<endl;
}
hOutFile.close();
}
void writeToFile(string fileName, vector<string> listLine)
{
ofstream hFile;
hFile.open(fileName, std::ios_base::out);
for(auto strLine : listLine)
{
hFile<<strLine<<endl;
}
hFile.close();
}
unsigned int randomNumber(unsigned int rangeFrom, unsigned int rangeTo)
{
std::random_device rand_dev;
std::mt19937 generator(rand_dev());
std::uniform_int_distribution<unsigned int> distr(rangeFrom, rangeTo);
return distr(generator);
}
std::string random_string( size_t length )
{
auto randchar = []() -> char
{
const char charset[] =
"0123456789"
// "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz";
const size_t max_index = (sizeof(charset) - 1);
return charset[ rand() % max_index ];
};
std::string str(length,0);
std::generate_n( str.begin(), length, randchar );
//str[length - 1] = '\n';
return str;
}
bool genFileWithNumLines(string fileName, unsigned long long totallLines, unsigned int minSizeOfLine, unsigned int maxSizeOfLine)
{
unsigned int sizeLine;
string bufferStr;
ofstream hFile;
hFile.open(fileName, std::ios_base::out);
for(unsigned long long i = 0; i < totallLines; i++)
{
sizeLine = randomNumber(minSizeOfLine, maxSizeOfLine);
bufferStr = random_string(sizeLine);
hFile<<bufferStr<<endl;
}
hFile.close();
return true;
}
bool genFileWithNumBytesLimit(string fileName, unsigned long long numBytesLimit)
{
unsigned int sizeLine = 20;
unsigned int sizeLineRemain = 0;
unsigned long long totallLines = numBytesLimit/sizeLine;
sizeLineRemain = numBytesLimit%20;
string bufferStr;
ofstream hFile;
hFile.open(fileName, std::ios_base::out);
if(sizeLineRemain != 0)
{
bufferStr = random_string(sizeLineRemain);
hFile<<bufferStr;
}
for(unsigned long long i = 0; i < totallLines; i++)
{
bufferStr = random_string(sizeLine);
hFile<<bufferStr<<endl;
}
return true;
}
void createDataTestByGenLargFile(string inFileName)
{
//Test Case 1
// unsigned long long totallLines = 20000000;
// unsigned int minSizeOfLine = 20;
// unsigned int maxSizeOfLine = 100;
// genFileWithNumLines(std::string("InTestData/") + inFileName, totallLines, minSizeOfLine, maxSizeOfLine);
// gen in file
//int numBytesIn = 600;
unsigned long long totallLines = 70;
unsigned int minSizeOfLine = 20;
unsigned int maxSizeOfLine = 100;
genFileWithNumLines(inFileName, totallLines, minSizeOfLine, maxSizeOfLine);
}
| [
"tai.nguyen@THLSoft.com"
] | tai.nguyen@THLSoft.com |
6518f1958b6579e186316f0b1bc220c812f94ab0 | 5b79410a289927698811daebd05effc628c9830a | /src/sprite_animation_frame.cc | cff10e06faff6e3b8ddb4ab324001c61c9b684d6 | [] | no_license | Clever-Boy/MyDoom | 37f009e5b2149625a13e6dd3dd316b95fa827db9 | 3ee1dcc022bed1eb1e2df5f95d4e94fb54bf0190 | refs/heads/master | 2020-12-24T11:09:18.937687 | 2015-01-09T22:27:31 | 2015-01-09T22:27:31 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 769 | cc | #include <stdlib.h>
#include <stdio.h>
#include "sprite_animation_frame.h"
sprite_animation_frame::sprite_animation_frame()
{
num_angles = 0;
}
void sprite_animation_frame::set_num_angles(uint8_t n)
{
num_angles = n;
}
void sprite_animation_frame::set_sprite(uint8_t angle_idx, sprite const *s)
{
if(angle_idx >= MAX_NUM_SPRITE_ANGLES)
{
printf("ERROR: angle_idx >= MAX_NUM_SPRITE_ANGLES\n");
exit(0);
}
sprites[angle_idx] = s;
}
uint8_t sprite_animation_frame::get_num_angles(void) const
{
return num_angles;
}
sprite const *sprite_animation_frame::get_sprite(uint8_t angle_idx) const
{
if(angle_idx >= MAX_NUM_SPRITE_ANGLES)
{
printf("ERROR: angle_idx >= MAX_NUM_SPRITE_ANGLES\n");
exit(0);
}
return sprites[angle_idx];
}
| [
"jim.lindstrom@gmail.com"
] | jim.lindstrom@gmail.com |
49418378fe6e782708da3dcb19ec18cae1679fb0 | fccfb83170dd7d21181d57d3d284cbeaa3489ee8 | /include/axis.hh | 1fe24146646016b13e7add9f92d1abc8d3c758b7 | [] | no_license | ivankp/angles_hj | 184f083192068e0f5406b4e8b60c47fd67ff290d | 894e84a62074b4aeed1a281023458e0e4456e79e | refs/heads/master | 2021-09-12T17:24:47.438753 | 2018-04-19T04:13:14 | 2018-04-19T04:13:14 | 110,157,393 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 16,076 | hh | // Written by Ivan Pogrebnyak
#ifndef IVANP_AXIS_HH
#define IVANP_AXIS_HH
#include <algorithm>
#include <cmath>
#include <utility>
#include <vector>
#include <memory>
#include <limits>
#include "type_traits.hh"
#include "catstr.hh"
namespace ivanp {
using axis_size_type = unsigned;
template <typename T>
class edge_proxy {
public:
enum state : char { minf = -1, ok = 0, pinf = 1 };
using type = T;
private:
state s;
T x;
public:
edge_proxy(state s): s{s}, x{
s==pinf ? std::numeric_limits<T>::infinity() :
s==minf ? -std::numeric_limits<T>::infinity() : T{ }
} { }
template <typename U>
edge_proxy& operator=(U&& x) {
s = ok;
this->x = std::forward<U>(x);
return *this;
}
inline operator bool() const noexcept { return s == ok; }
template <typename U = T>
inline operator std::enable_if_t<!std::is_same<U,bool>::value,U>()
const noexcept { return x; }
inline T get() const noexcept { return x; }
friend std::ostream& operator<<(std::ostream& os, const edge_proxy& p) {
switch (p.s) {
case ok: os << p.x; break;
case pinf: os << "∞"; break;
case minf: os << "-∞"; break;
}
return os;
}
};
// INFO =============================================================
/*
* Same convention as in ROOT TH1:
* bin = 0; underflow bin
* bin = 1; first bin with low-edge xlow INCLUDED
* bin = nbins; last bin with upper-edge xup EXCLUDED
* bin = nbins+1; overflow bin
*/
// Basic Axis =======================================================
template <typename EdgeType, bool Virtual=false>
struct basic_axis {
using size_type = ivanp::axis_size_type;
using edge_type = EdgeType;
using edge_ptype = edge_proxy<edge_type>;
};
template <typename EdgeType>
struct basic_axis<EdgeType,true> {
using size_type = ivanp::axis_size_type;
using edge_type = EdgeType;
using edge_ptype = edge_proxy<edge_type>;
virtual size_type nbins () const = 0;
virtual size_type nedges() const = 0;
virtual size_type vfind_bin(edge_type x) const = 0;
inline size_type find_bin(edge_type x) const { return vfind_bin(x); }
virtual edge_type edge(size_type i) const = 0;
virtual edge_type min() const = 0;
virtual edge_type max() const = 0;
virtual edge_ptype lower(size_type i) const = 0;
virtual edge_ptype upper(size_type i) const = 0;
virtual bool is_uniform() const = 0;
};
// Container Axis ===================================================
template <typename Container, bool Virtual=false>
class container_axis final: public basic_axis<
typename std::decay_t<Container>::value_type,Virtual>
{
public:
using container_type = Container;
using edge_type = typename std::decay_t<container_type>::value_type;
using base_type = basic_axis<edge_type,Virtual>;
using edge_ptype = edge_proxy<edge_type>;
using size_type = ivanp::axis_size_type;
private:
container_type _edges;
public:
container_axis() = default;
~container_axis() = default;
container_axis(const container_type& edges): _edges(edges) { }
template <typename C=container_type,
std::enable_if_t<!std::is_reference<C>::value>* = nullptr>
container_axis(container_type&& edges): _edges(std::move(edges)) { }
container_axis(const container_axis& axis): _edges(axis._edges) { }
template <typename C=container_type,
std::enable_if_t<!std::is_reference<C>::value>* = nullptr>
container_axis(container_axis&& axis): _edges(std::move(axis._edges)) { }
template <typename C=container_type,
std::enable_if_t<!is_std_array<C>::value>* = nullptr>
container_axis(std::initializer_list<edge_type> edges): _edges(edges) { }
template <typename C=container_type,
std::enable_if_t<is_std_array<C>::value>* = nullptr>
container_axis(std::initializer_list<edge_type> edges) {
std::copy(edges.begin(),edges.end(),_edges.begin());
}
container_axis& operator=(const container_type& edges) {
_edges = edges;
return *this;
}
template <typename C=container_type,
std::enable_if_t<!std::is_reference<C>::value>* = nullptr>
container_axis& operator=(container_type&& edges) {
_edges = std::move(edges);
return *this;
}
container_axis& operator=(const container_axis& axis) {
_edges = axis._edges;
return *this;
}
template <typename C=container_type,
std::enable_if_t<!std::is_reference<C>::value>* = nullptr>
container_axis& operator=(container_axis&& axis) {
_edges = std::move(axis._edges);
return *this;
}
inline size_type nedges() const noexcept(noexcept(_edges.size()))
{ return _edges.size(); }
inline size_type nbins () const noexcept(noexcept(_edges.size()))
{ return _edges.size()-1; }
inline edge_type edge(size_type i) const noexcept { return _edges[i]; }
inline edge_type min() const noexcept(noexcept(_edges.front()))
{ return _edges.front(); }
inline edge_type max() const noexcept(noexcept(_edges.back()))
{ return _edges.back(); }
inline edge_ptype lower(size_type i) const noexcept {
edge_ptype proxy(
i==0 ? edge_ptype::minf :
i>nedges()+1 ? edge_ptype::pinf : edge_ptype::ok );
if (proxy) proxy = edge(i-1);
return proxy;
}
inline edge_ptype upper(size_type i) const noexcept {
edge_ptype proxy( i>=nedges() ? edge_ptype::pinf : edge_ptype::ok );
if (proxy) proxy = edge(i);
return proxy;
}
template <typename T>
size_type find_bin(const T& x) const noexcept {
return std::distance(
_edges.begin(), std::upper_bound(_edges.begin(), _edges.end(), x)
);
}
inline size_type vfind_bin(edge_type x) const { return find_bin(x); }
template <typename T>
inline size_type operator[](const T& x) const noexcept {
return find_bin(x);
}
inline const container_type& edges() const { return _edges; }
constexpr bool is_uniform() const noexcept { return false; }
};
// Uniform Axis =====================================================
template <typename EdgeType, bool Virtual=false>
class uniform_axis final: public basic_axis<EdgeType,Virtual> {
public:
using base_type = basic_axis<EdgeType,Virtual>;
using edge_type = EdgeType;
using edge_ptype = edge_proxy<edge_type>;
using size_type = ivanp::axis_size_type;
private:
size_type _nbins;
edge_type _min, _max;
public:
uniform_axis() = default;
~uniform_axis() = default;
uniform_axis(size_type nbins, edge_type min, edge_type max)
: _nbins(nbins), _min(std::min(min,max)), _max(std::max(min,max)) { }
uniform_axis(const std::tuple<size_type,edge_type,edge_type>& x)
: uniform_axis(std::get<0>(x),std::get<1>(x),std::get<2>(x)) { }
uniform_axis(const uniform_axis& axis)
: _nbins(axis._nbins), _min(axis._min), _max(axis._max) { }
uniform_axis& operator=(const uniform_axis& axis) {
_nbins = axis._nbins;
_min = axis._min;
_max = axis._max;
return *this;
}
inline size_type nbins () const noexcept { return _nbins; }
inline size_type nedges() const noexcept { return _nbins+1; }
inline edge_type edge(size_type i) const noexcept {
const auto width = (_max - _min)/_nbins;
return _min + i*width;
}
inline edge_type min() const noexcept { return _min; }
inline edge_type max() const noexcept { return _max; }
inline edge_ptype lower(size_type i) const noexcept {
edge_ptype proxy(
i==0 ? edge_ptype::minf :
i>nedges()+1 ? edge_ptype::pinf : edge_ptype::ok );
if (proxy) proxy = edge(i-1);
return proxy;
}
inline edge_ptype upper(size_type i) const noexcept {
edge_ptype proxy( i>=nedges() ? edge_ptype::pinf : edge_ptype::ok );
if (proxy) proxy = edge(i);
return proxy;
}
template <typename T>
size_type find_bin(const T& x) const noexcept {
if (x < _min) return 0;
if (!(x < _max)) return _nbins+1;
return _nbins*(x-_min)/(_max-_min) + 1;
}
inline size_type vfind_bin(edge_type x) const noexcept
{ return find_bin(x); }
template <typename T>
inline size_type operator[](const T& x) const noexcept
{ return find_bin(x); }
constexpr bool is_uniform() const noexcept { return true; }
};
// Index Axis =======================================================
template <typename EdgeType = ivanp::axis_size_type, bool Virtual=false>
class index_axis final: public basic_axis<EdgeType,Virtual> {
static_assert(std::is_integral<EdgeType>::value,"");
public:
using base_type = basic_axis<EdgeType,Virtual>;
using edge_type = EdgeType;
using edge_ptype = edge_proxy<edge_type>;
using size_type = ivanp::axis_size_type;
private:
edge_type _min, _max;
public:
index_axis() = default;
~index_axis() = default;
constexpr index_axis(edge_type min, edge_type max)
: _min(std::min(min,max)), _max(std::max(min,max)) { }
constexpr index_axis(const index_axis& axis)
: _min(axis._min), _max(axis._max) { }
constexpr index_axis& operator=(const index_axis& axis) {
_min = axis._min;
_max = axis._max;
return *this;
}
constexpr size_type nbins () const noexcept { return _max-_min; }
constexpr size_type nedges() const noexcept { return _max-_min+1; }
constexpr edge_type edge(size_type i) const noexcept { return _min + i; }
constexpr edge_type min() const noexcept { return _min; }
constexpr edge_type max() const noexcept { return _max; }
inline edge_ptype lower(size_type i) const noexcept {
edge_ptype proxy(
i==0 ? edge_ptype::minf :
i>nedges()+1 ? edge_ptype::pinf : edge_ptype::ok );
if (proxy) proxy = edge(i-1);
return proxy;
}
inline edge_ptype upper(size_type i) const noexcept {
edge_ptype proxy( i>=nedges() ? edge_ptype::pinf : edge_ptype::ok );
if (proxy) proxy = edge(i);
return proxy;
}
template <typename T>
constexpr size_type find_bin(const T& x) const noexcept {
if (x < _min) return 0;
if (!(x < _max)) return _max-_min+1;
return x-_min+1;
}
constexpr size_type vfind_bin(edge_type x) const noexcept
{ return find_bin(x); }
template <typename T>
constexpr size_type operator[](const T& x) const noexcept
{ return find_bin(x); }
constexpr bool is_uniform() const noexcept { return true; }
};
// Indirect Axis ====================================================
template <typename EdgeType, typename Ref = const basic_axis<EdgeType>*,
bool Virtual = false>
class ref_axis final: public basic_axis<EdgeType,Virtual> {
public:
using base_type = basic_axis<EdgeType,Virtual>;
using edge_type = EdgeType;
using edge_ptype = edge_proxy<edge_type>;
using size_type = ivanp::axis_size_type;
using axis_ref = Ref;
private:
axis_ref _ptr;
public:
ref_axis() = default;
~ref_axis() = default;
ref_axis(axis_ref ref): _ptr(ref) { }
ref_axis& operator=(axis_ref ref) {
_ptr = ref;
return *this;
}
ref_axis(const ref_axis& axis): _ptr(axis._ptr) { }
ref_axis(ref_axis&& axis): _ptr(std::move(axis._ptr)) { }
ref_axis& operator=(const ref_axis& axis) {
_ptr = axis._ptr;
return *this;
}
ref_axis& operator=(ref_axis&& axis) {
_ptr = std::move(axis._ptr);
return *this;
}
inline size_type nedges() const { return _ptr->nedges(); }
inline size_type nbins () const { return _ptr->nbins (); }
inline size_type vfind_bin (edge_type x) const { return _ptr->vfind_bin(x); }
inline size_type find_bin (edge_type x) const { return _ptr->vfind_bin(x); }
inline size_type operator[](edge_type x) const { return _ptr->vfind_bin(x); }
inline edge_type edge(size_type i) const { return _ptr->edge(i); }
inline edge_type min() const { return _ptr->min(); }
inline edge_type max() const { return _ptr->max(); }
inline edge_ptype lower(size_type i) const { return _ptr->lower(i); }
inline edge_ptype upper(size_type i) const { return _ptr->upper(i); }
inline bool is_uniform() const noexcept { return _ptr->is_uniform(); }
};
// Factory functions ================================================
template <typename A, typename B, typename EdgeType = std::common_type_t<A,B>>
inline auto make_axis(axis_size_type nbins, A min, B max)
-> uniform_axis<EdgeType> {
return { nbins,min,max };
}
template <typename T, size_t N>
inline auto make_axis(const std::array<T,N>& edges)
-> container_axis<std::array<T,N>> {
return { edges };
}
template <typename EdgeType>
inline auto make_unique_axis(const basic_axis<EdgeType>* axis)
-> ref_axis<EdgeType,std::unique_ptr<basic_axis<EdgeType>>>{
return { axis };
}
template <typename EdgeType>
inline auto make_shared_axis(const basic_axis<EdgeType>* axis)
-> ref_axis<EdgeType,std::shared_ptr<basic_axis<EdgeType>>>{
return { axis };
}
template <typename A, typename B, typename EdgeType = std::common_type_t<A,B>>
inline auto make_unique_axis(axis_size_type nbins, A min, B max)
-> ref_axis<EdgeType,std::unique_ptr<basic_axis<EdgeType>>> {
return { std::make_unique<uniform_axis<EdgeType>>(nbins,min,max) };
}
template <typename A, typename B, typename EdgeType = std::common_type_t<A,B>>
inline auto make_shared_axis(axis_size_type nbins, A min, B max)
-> ref_axis<EdgeType,std::shared_ptr<basic_axis<EdgeType>>> {
return { std::make_shared<uniform_axis<EdgeType>>(nbins,min,max) };
}
template <typename T, size_t N>
inline auto make_unique_axis(const std::array<T,N>& edges)
-> ref_axis<T,std::unique_ptr<basic_axis<T>>> {
return { std::make_unique<uniform_axis<T>>(edges) };
}
template <typename T, size_t N>
inline auto make_shared_axis(const std::array<T,N>& edges)
-> ref_axis<T,std::shared_ptr<basic_axis<T>>> {
return { std::make_shared<uniform_axis<T>>(edges) };
}
// Constexpr Axis ===================================================
template <typename EdgeType, bool Virtual=false>
class const_axis final: public basic_axis<EdgeType,Virtual> {
public:
using base_type = basic_axis<EdgeType,Virtual>;
using edge_type = EdgeType;
using edge_ptype = edge_proxy<edge_type>;
using size_type = ivanp::axis_size_type;
private:
const edge_type* _edges;
size_type _ne;
public:
template <size_type N>
constexpr const_axis(const edge_type(&a)[N]): _edges(a), _ne(N - 1) {}
constexpr size_type nedges() const noexcept { return _ne+1; }
constexpr size_type nbins () const noexcept { return _ne; }
constexpr edge_type edge(size_type i) const noexcept { return _edges[i]; }
constexpr edge_type min() const noexcept { return _edges[0]; }
constexpr edge_type max() const noexcept { return _edges[_ne]; }
inline edge_ptype lower(size_type i) const noexcept {
edge_ptype proxy(
i==0 ? edge_ptype::minf :
i>nedges()+1 ? edge_ptype::pinf : edge_ptype::ok );
if (proxy) proxy = edge(i-1);
return proxy;
}
inline edge_ptype upper(size_type i) const noexcept {
edge_ptype proxy( i>=nedges() ? edge_ptype::pinf : edge_ptype::ok );
if (proxy) proxy = edge(i);
return proxy;
}
constexpr size_type find_bin(edge_type x) const noexcept {
size_type i = 0, j = 0, count = _ne, step = 0;
if (!(x < _edges[_ne])) i = _ne + 1;
else if (!(x < _edges[0])) while (count > 0) {
step = count / 2;
j = step + i;
if (!(x < _edges[j])) {
i = j + 1;
count -= step + 1;
} else count = step;
}
return i;
}
constexpr size_type operator[](edge_type x) const noexcept
{ return find_bin(x); }
inline size_type vfind_bin(edge_type x) const noexcept
{ return find_bin(x); }
constexpr bool is_uniform() const noexcept { return false; }
};
// Non-member functions =============================================
template <typename Axis>
inline std::string bin_str(const Axis& a, axis_size_type i) {
return cat('[',a.lower(i),',',a.upper(i),')');
}
template <typename T, typename Axis>
auto vector_of_edges(const Axis& axis) {
const auto n = axis.nedges();
std::vector<T> edges;
edges.reserve(n);
for (typename Axis::size_type i=0; i<n; ++i)
edges.emplace_back(axis.edge(i));
return edges;
}
// ==================================================================
} // end namespace ivanp
#endif
| [
"ivan.pogrebnyak@gmail.com"
] | ivan.pogrebnyak@gmail.com |
69a37bc5f18f1675c85255a54a41d54e8c4a8f14 | a080ff8576ecdbe6111e386bcad9c7c0e17417d7 | /src/tests/MoveAround.cpp | 0c36f1979369e3fc4d730115b64a002576246491 | [] | no_license | ozkazanc/opengl-sandbox | 6d177215161ed4fef8c01d85dedda7abb14dd8c0 | 1489599cc15244e8d1ee517b3802defa05b0be05 | refs/heads/master | 2020-07-25T12:17:49.612797 | 2020-05-20T18:51:09 | 2020-05-20T18:51:09 | 208,286,535 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,643 | cpp | #include "MoveAround.h"
#include "Renderer.h"
#include "GL/glew.h"
#include "GLFW/glfw3.h"
#include "imgui/imgui.h"
#include "glm/gtc/type_ptr.hpp"
#include "glm/gtc/matrix_transform.hpp"
namespace test {
MoveAround::MoveAround()
:m_Proj(glm::mat4(1.0f)), m_View(glm::mat4(1.0f)), m_Model(glm::mat4(1.0f)),
m_VertexBuffer(nullptr), m_VertexLayout(nullptr),
m_IndexBuffer(nullptr), m_VertexArray(nullptr),
m_Texture(nullptr), m_Shader(nullptr),
m_Camera(nullptr)
{
float vertices[] = {
-0.5f, -0.5f, 0.5f, 0.0f, 0.0f,
0.5f, -0.5f, 0.5f, 1.0f, 0.0f,
0.5f, 0.5f, 0.5f, 1.0f, 1.0f,
-0.5f, 0.5f, 0.5f, 0.0f, 1.0f, //3
-0.5f, -0.5f, -0.5f, 0.0f, 0.0f,
0.5f, -0.5f, -0.5f, 1.0f, 0.0f,
0.5f, 0.5f, -0.5f, 1.0f, 1.0f,
-0.5f, 0.5f, -0.5f, 0.0f, 1.0f, //7
-0.5f, -0.5f, 0.5f, 1.0f, 0.0f,
0.5f, -0.5f, 0.5f, 0.0f, 0.0f,
0.5f, 0.5f, 0.5f, 0.0f, 1.0f,
-0.5f, 0.5f, 0.5f, 1.0f, 1.0f, //11
-0.5f, -0.5f, -0.5f, 1.0f, 0.0f,
0.5f, -0.5f, -0.5f, 1.0f, 0.0f,
0.5f, 0.5f, -0.5f, 1.0f, 1.0f,
-0.5f, 0.5f, -0.5f, 0.0f, 1.0f, //15
-0.5f, -0.5f, 0.5f, 0.0f, 1.0f,
0.5f, -0.5f, 0.5f, 1.0f, 1.0f,
0.5f, 0.5f, 0.5f, 1.0f, 0.0f,
-0.5f, 0.5f, 0.5f, 0.0f, 0.0f, //19
-0.5f, -0.5f, -0.5f, 0.0f, 0.0f,
0.5f, -0.5f, -0.5f, 0.0f, 0.0f,
0.5f, 0.5f, -0.5f, 0.0f, 1.0f,
-0.5f, 0.5f, -0.5f, 1.0f, 1.0f //23
};
unsigned int indices[]{
0, 1, 2, //front
2, 3, 0,
4, 8, 11, //left
11, 15, 4,
21, 12, 23, //back
23, 22, 21,
9, 13, 14, //right
14, 10, 9,
6, 7, 19, //top
19, 18, 6,
17, 16, 20, //bottom
20, 5, 17
};
m_VertexArray = std::make_unique<VertexArray>();
m_VertexBuffer = std::make_unique<VertexBuffer>(vertices, 24 * 5 * sizeof(float));
m_VertexLayout = std::make_unique<VertexBufferLayout>();
m_VertexLayout->PushAttrib<float>(3); //position attribute
m_VertexLayout->PushAttrib<float>(2); //texture coordinates
m_VertexArray->AddBufferLayout(*m_VertexBuffer, *m_VertexLayout);
m_IndexBuffer = std::make_unique<IndexBuffer>(indices, 3 * 12);
//m_Shader = std::make_unique<Shader>("res/shaders/simple.vs", "res/shaders/simple.fs");
m_Shader = std::make_unique<Shader>("res/shaders/3DTextureShader.shader");
//m_Texture = std::make_unique<Texture>("res/textures/turkey-flag-icon-256.png");
//m_Texture = std::make_unique<Texture>("res/textures/OpenGL_170px_June16.png");
m_Texture = std::make_unique<Texture>("res/textures/mario-question-block-128.png");
m_Texture->Bind();
m_Shader->Bind();
m_Shader->SetUniform1i("u_TextureSlot", 0); // the slot id should be the same as the slot we bind our texture to
m_Models = {
glm::vec3(0.0f, 0.0f, 0.0f),
glm::vec3(2.0f, 5.0f, -15.0f),
glm::vec3(-1.5f, -2.2f, -2.5f),
glm::vec3(-3.8f, -2.0f, -12.3f),
glm::vec3(2.4f, -0.4f, -3.5f),
glm::vec3(-1.7f, 3.0f, -7.5f),
glm::vec3(1.3f, -2.0f, -2.5f),
glm::vec3(1.5f, 2.0f, -2.5f),
glm::vec3(1.5f, 0.2f, -1.5f),
glm::vec3(-1.3f, 1.0f, -1.5f)
};
m_Camera = std::make_unique<Camera>();
GLCall(glEnable(GL_DEPTH_TEST));
}
MoveAround::~MoveAround() {
glfwSetInputMode(m_Window, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
GLCall(glDisable(GL_DEPTH_TEST));
}
void MoveAround::SetInputMouseInputMode() {
glfwSetInputMode(m_Window, GLFW_CURSOR, GLFW_CURSOR_DISABLED);
};
void MoveAround::OnUpdate(float deltaTime) {}
void MoveAround::OnRender() {
GLCall(glClear(GL_DEPTH_BUFFER_BIT));
m_Camera->SetDeltaTime((float)glfwGetTime());
m_Proj = glm::perspective(glm::radians(m_Camera->GetZoom()), (float)g_WindowWidth / g_WindowHeight, 0.1f, 100.0f);
Renderer renderer;
float time = (float)glfwGetTime();
for (unsigned int i = 0; i < m_Models.size(); i++) {
m_View = m_Camera->GetViewMatrix();
m_Model = glm::translate(glm::mat4(1.0f), m_Models[i])
* glm::rotate(glm::mat4(1.0f), glm::radians(20.0f * i), glm::vec3(0.5f, 1.0f, 0.0f));
glm::mat4 mvp = m_Proj * m_View * m_Model;
m_Shader->Bind();
m_Shader->SetUniformMat4f("u_MVP", mvp);
renderer.Draw(*m_VertexArray, *m_IndexBuffer, *m_Shader);
}
}
void MoveAround::OnImGuiRender() {
ImGui::Begin("Move Around!");
ImGui::SetWindowPos(ImVec2(430, 400));
ImGui::Text("Use WASD keys to move around");
ImGui::Text("Use the mouse to look around");
ImGui::Text("Use the scroll wheel to zoom");
ImGui::End();
}
void MoveAround::OnNotify(int event_) {
m_Camera->OnNotify(event_);
}
void MoveAround::OnNotify(float Xevent, float Yevent, bool scroll) {
m_Camera->OnNotify(Xevent, Yevent, scroll);
}
} | [
"doruk.ozkazanc@mail.utoronto.ca"
] | doruk.ozkazanc@mail.utoronto.ca |
5b78746b12d7be347e819bd6d179be3a65527226 | 0f21a67f298566a5950c52a858df72cc3fd7213a | /HDU/hdu 2719 字符替换 水题.cpp | bb32ecbc5467d69ee3d0ac21a9c457b68361f6c5 | [] | no_license | mzhinf/OJ-Code | 4e1e053142248a42a56b20ac62aac75086408b29 | 07a339604ee44341e06980551dcfcb51a225d387 | refs/heads/master | 2021-04-27T00:10:40.198258 | 2018-03-04T06:35:51 | 2018-03-04T06:35:51 | 123,762,360 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 622 | cpp | /*
字符替换
*注意:scanf("%[^\n]",str) 获取带空格字符串
*/
#include <cstdio>
#include <cstring>
char str[100];
int main(){
while(~scanf("%[^\n]",str)){
getchar();
if(strcmp(str,"#")==0)break;
for(int i=0;str[i]!='\0';i++){
switch(str[i]){
case ' ': printf("%s","%20");break;
case '!': printf("%s","%21");break;
case '$': printf("%s","%24");break;
case '%': printf("%s","%25");break;
case '(': printf("%s","%28");break;
case ')': printf("%s","%29");break;
case '*': printf("%s","%2a");break;
default : printf("%c",str[i]);
}
}
printf("\n");
}
return 0;
}
| [
"mazehuainf@gmail.com"
] | mazehuainf@gmail.com |
9301fea43fe0bbac223656eedbc17762381a7943 | 3716d38fc936d155b221b157fbe8fecdf4e9a915 | /src/qt/qtipcserver.cpp | a2ffd0b28ac885c6e291631ef29e084c81886881 | [
"MIT"
] | permissive | woyoeds/woyoeds | 09116322c6a6b7d8c7c3f9290e7f3a77dd659f38 | 1a08fd5eab42bdcca770e50df4e05fe58e7ac2cf | refs/heads/master | 2020-03-18T14:04:53.700537 | 2018-05-25T09:52:56 | 2018-05-25T09:52:56 | 134,828,349 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,908 | 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/version.hpp>
#if defined(WIN32) && BOOST_VERSION == 104900
#define BOOST_INTERPROCESS_HAS_WINDOWS_KERNEL_BOOTTIME
#define BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME
#endif
#include "qtipcserver.h"
#include "guiconstants.h"
#include "ui_interface.h"
#include "util.h"
#include <boost/algorithm/string/predicate.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/interprocess/ipc/message_queue.hpp>
#include <boost/version.hpp>
#if defined(WIN32) && (!defined(BOOST_INTERPROCESS_HAS_WINDOWS_KERNEL_BOOTTIME) || !defined(BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME) || BOOST_VERSION < 104900)
#warning Compiling without BOOST_INTERPROCESS_HAS_WINDOWS_KERNEL_BOOTTIME and BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME uncommented in boost/interprocess/detail/tmp_dir_helpers.hpp or using a boost version before 1.49 may have unintended results see svn.boost.org/trac/boost/ticket/5392
#endif
using namespace boost;
using namespace boost::interprocess;
using namespace boost::posix_time;
#if defined MAC_OSX || defined __FreeBSD__
// URI handling not implemented on OSX yet
void ipcScanRelay(int argc, char *argv[]) { }
void ipcInit(int argc, char *argv[]) { }
#else
static void ipcThread2(void* pArg);
static bool ipcScanCmd(int argc, char *argv[], bool fRelay)
{
// Check for URI in argv
bool fSent = false;
for (int i = 1; i < argc; i++)
{
if (boost::algorithm::istarts_with(argv[i], "eds:"))
{
const char *strURI = argv[i];
try {
boost::interprocess::message_queue mq(boost::interprocess::open_only, BITCOINURI_QUEUE_NAME);
if (mq.try_send(strURI, strlen(strURI), 0))
fSent = true;
else if (fRelay)
break;
}
catch (boost::interprocess::interprocess_exception &ex) {
// don't log the "file not found" exception, because that's normal for
// the first start of the first instance
if (ex.get_error_code() != boost::interprocess::not_found_error || !fRelay)
{
printf("main() - boost interprocess exception #%d: %s\n", ex.get_error_code(), ex.what());
break;
}
}
}
}
return fSent;
}
void ipcScanRelay(int argc, char *argv[])
{
if (ipcScanCmd(argc, argv, true))
exit(0);
}
static void ipcThread(void* pArg)
{
// Make this thread recognisable as the GUI-IPC thread
RenameThread("bitcoin-gui-ipc");
try
{
ipcThread2(pArg);
}
catch (std::exception& e) {
PrintExceptionContinue(&e, "ipcThread()");
} catch (...) {
PrintExceptionContinue(NULL, "ipcThread()");
}
printf("ipcThread exited\n");
}
static void ipcThread2(void* pArg)
{
printf("ipcThread started\n");
message_queue* mq = (message_queue*)pArg;
char buffer[MAX_URI_LENGTH + 1] = "";
size_t nSize = 0;
unsigned int nPriority = 0;
loop
{
ptime d = boost::posix_time::microsec_clock::universal_time() + millisec(100);
if (mq->timed_receive(&buffer, sizeof(buffer), nSize, nPriority, d))
{
uiInterface.ThreadSafeHandleURI(std::string(buffer, nSize));
Sleep(1000);
}
if (fShutdown)
break;
}
// Remove message queue
message_queue::remove(BITCOINURI_QUEUE_NAME);
// Cleanup allocated memory
delete mq;
}
void ipcInit(int argc, char *argv[])
{
message_queue* mq = NULL;
char buffer[MAX_URI_LENGTH + 1] = "";
size_t nSize = 0;
unsigned int nPriority = 0;
try {
mq = new message_queue(open_or_create, BITCOINURI_QUEUE_NAME, 2, MAX_URI_LENGTH);
// Make sure we don't lose any bitcoin: URIs
for (int i = 0; i < 2; i++)
{
ptime d = boost::posix_time::microsec_clock::universal_time() + millisec(1);
if (mq->timed_receive(&buffer, sizeof(buffer), nSize, nPriority, d))
{
uiInterface.ThreadSafeHandleURI(std::string(buffer, nSize));
}
else
break;
}
// Make sure only one bitcoin instance is listening
message_queue::remove(BITCOINURI_QUEUE_NAME);
delete mq;
mq = new message_queue(open_or_create, BITCOINURI_QUEUE_NAME, 2, MAX_URI_LENGTH);
}
catch (interprocess_exception &ex) {
printf("ipcInit() - boost interprocess exception #%d: %s\n", ex.get_error_code(), ex.what());
return;
}
if (!NewThread(ipcThread, mq))
{
delete mq;
return;
}
ipcScanCmd(argc, argv, false);
}
#endif
| [
"woyoeds@outlook.com"
] | woyoeds@outlook.com |
61bc3993e3301a7fd44946849c5a2bc813032ebd | a9f678119a8ed6b852f30aa4c35ee8d75ee55c10 | /mergeKSortedLists.cpp | 1a92b36f47250a5e9711c471c52a2d7d3f79a25a | [] | no_license | gaolu/Leetcode | 0ae73c04be1f1cb75b499d957ed24fde78684074 | 10d1091c20b1692d9a9fa91b41d23a1f8ba9424a | refs/heads/master | 2021-01-13T02:06:45.626985 | 2014-03-18T04:26:39 | 2014-03-18T04:26:39 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,663 | cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode *mergeKLists(vector<ListNode *> &lists) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
// complexity is nlogk, n is the # of nodes in each list, k is the # of lists
if(lists.size() <= 0) return NULL;
if(lists.size() == 1) return lists[0];
int numLists = lists.size();
while(numLists > 1){
int afterMerge = (numLists + 1) / 2;
for(int i = 0; i < afterMerge && i + afterMerge < numLists; i++){
lists[i] = mergeTwoLists(lists[i], lists[i + afterMerge]);
}
numLists = afterMerge;
}
return lists[0];
}
// merge two lists at a time
ListNode *mergeTwoLists(ListNode *list1, ListNode *list2){
ListNode *result = NULL;
ListNode **runner = &result;
while(list1 != NULL || list2 != NULL){
if(list1 != NULL){
ListNode *minNode;
if(list2 == NULL || list1->val <= list2->val){
minNode = list1;
list1 = list1->next;
}
else if(list2 != NULL){
minNode = list2;
list2 = list2->next;
}
*runner = minNode;
runner = &(minNode->next);
}
else{
*runner = list2;
break;
}
}
return result;
}
};
| [
"gaolu.adam@gmail.com"
] | gaolu.adam@gmail.com |
c26dbbbe99b909da695083a5c6aa85255bac79a6 | 95a43c10c75b16595c30bdf6db4a1c2af2e4765d | /codecrawler/_code/hdu3911/16212623.cpp | 0c1fc0dfc1d8079341a0845f0654e6cec9a2cb8e | [] | no_license | kunhuicho/crawl-tools | 945e8c40261dfa51fb13088163f0a7bece85fc9d | 8eb8c4192d39919c64b84e0a817c65da0effad2d | refs/heads/master | 2021-01-21T01:05:54.638395 | 2016-08-28T17:01:37 | 2016-08-28T17:01:37 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,141 | cpp | /*
Pro: 0
Sol:
date:
*/
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <queue>
#include <set>
#include <vector>
#define maxn 111111
#define lson l, m , rt << 1
#define rson m + 1, r,rt << 1 | 1
#define ls (rt << 1)
#define rs (rt << 1 | 1)
#define havem int m = (l + r) >> 1
using namespace std;
int n,Q,ax;
int preb[maxn << 2],sufb[maxn << 2],mxb[maxn << 2];
int prew[maxn << 2],sufw[maxn << 2],mxw[maxn << 2],col[maxn << 2];
int num[maxn];
inline int max(int a, int b) {return a > b? a: b;}
inline int min(int a, int b) {return a < b? a: b;}
void push_up(int rt,int m){
//ç»´æ¤åç¼
preb[rt] = preb[ls];//å
çäºå·¦å©åçåç¼
prew[rt] = prew[ls];
if(preb[ls] == m - (m >> 1)) preb[rt] += preb[rs];//妿左å©åçåç¼é¿åº¦çäºå·¦å©ååºé´é¿åº¦ï¼
if(prew[ls] == m - (m >> 1)) prew[rt] += prew[rs];//é£ä¹ï¼å ä¸å³å©åçåç¼
//ç»´æ¤åç¼
sufb[rt] = sufb[rs];//å
çäºå³å©åçåç¼
sufw[rt] = sufw[rs];//æå个å»ï¼å°±æ¯è¿éåæsufbäºï¼WAäºn次åããã
if(sufb[rs] == (m >> 1)) sufb[rt] += sufb[ls];//妿å³å©åçåç¼é¿åº¦çäºå³å©ååºé´é¿åº¦
if(sufw[rs] == (m >> 1)) sufw[rt] += sufw[ls];//é£ä¹ï¼å ä¸å·¦å©åçåç¼
//ç»´æ¤æ¬åºé´æé¿çé¿ä¸²
mxb[rt] = max(mxb[ls],mxb[rs]);//è¿éä¹éäºã
mxb[rt] = max(mxb[rt], sufb[ls] + preb[rs]);
mxw[rt] = max(mxw[ls],mxw[rs]);//æé¿ä¸²è¦ä¸åç¬å¨å·¦å©åï¼è¦ä¸å¨å³å©å
mxw[rt] = max(mxw[rt], sufw[ls] + prew[rs]);//è¦ä¸åæ¶åå¸å¨å·¦å©åãå³å©å
}
inline void exchange(int rt){//交æ¢
swap(preb[rt],prew[rt]);
swap(sufb[rt],sufw[rt]);
swap(mxb[rt],mxw[rt]);
}
void push_dn(int rt){
if(col[rt]){
col[ls] ^= 1, col[rs] ^= 1, col[rt] = 0;
exchange(ls); exchange(rs);//è¿ééäº
}
}
void build(int l, int r, int rt){
col[rt] = 0;
if(l == r){
scanf("%d",&ax);
if(ax == 1){//妿æ¯é»è²ç
preb[rt] = sufb[rt] = mxb[rt] = 1;
prew[rt] = sufw[rt] = mxw[rt] = 0;
}else{//妿æ¯ç½è²ç
preb[rt] = sufb[rt] = mxb[rt] = 0;
prew[rt] = sufw[rt] = mxw[rt] = 1;
}
return ;
}havem;
build(lson); build(rson);
push_up(rt,r - l + 1);
}
void update(int& L, int& R, int l, int r, int rt){//åºé´æ´æ°
if(L <= l && r <= R){
col[rt] ^= 1; exchange(rt);//æ¹åèªèº«ä¹åï¼æ¹ålazyæ å¿
return ;
}push_dn(rt);
havem;
if(L <= m) update(L,R,lson);
if(R > m) update(L,R,rson);
push_up(rt,r - l + 1);
}
int query(int& L, int& R, int l, int r, int rt){
if(L <= l && r <= R) return mxb[rt];
push_dn(rt); havem;
if(L > m) return query(L,R,rson);
if(R <= m) return query(L,R,lson);
int t1 = query(L,R,lson);
int t2 = query(L, R, rson);
int wa1 = min(m - L + 1, sufb[ls]);//è¿éåéäºä¸¤æ¬¡m - L æå¯¹ï¼æåæL - mäº
int wa2 = min(R - m, preb[rs]);//åºè¯¥åä¸ä¸ªæå°å¼æè¡ã
return max(max(t1,t2),wa1 + wa2);
}
int main(){
int op,a,b;
while(scanf("%d",&n) != EOF){
build(1,n,1);
scanf("%d",&Q);
for(int i = 1;i <= Q; i ++){
scanf("%d%d%d",&op,&a,&b);
if(op == 1){
update(a,b,1,n,1);
}else{
int ans = query(a,b,1,n,1);
printf("%d\n",ans);
}
}
}
return 0;
}
| [
"zhouhai02@meituan.com"
] | zhouhai02@meituan.com |
5751f05aba8e18335df8a2200a15cae1ada5f50e | ecb324fb1afc5aeb6af1268021d7b56c71070e51 | /ACM俱乐部/大一下学期训练/第5周作业(分治)/Tournament(题解1).cpp | 5ec3dbd10969b9d69465e76869cc6fa7b34671ac | [] | no_license | WULEI7/WULEI7 | 937d74340eae8aed4256be9c1978ead5eba718e0 | d3fd49bd0463f15bf325a13f5c80aa7ca6c89f9f | refs/heads/master | 2023-04-15T09:52:05.428521 | 2023-04-07T10:40:35 | 2023-04-07T10:40:35 | 239,913,141 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,121 | cpp | #include<bits/stdc++.h>
using namespace std;
int n,k;
int mp[1030][1030];
void t(int x)
{
if(x==2)
{
mp[1][1]=1, mp[1][2]=2;
mp[2][1]=2, mp[2][2]=1;
return;
}
t(x/2);
for(int i=1;i<=x/2;i++)
{
for(int j=1;j<=x/2;j++)
{
mp[i][j+x/2]=mp[i][j]+x/2;
mp[i+x/2][j+x/2]=mp[i][j];
mp[i+x/2][j]=mp[i][j]+x/2;
}
}
}
bool ok()
{
for(int i=2;i<=k+1;i++) {
for(int j=1;j<=n;j++) {
if(mp[i][j]>n) return 0;
}
}
return 1;
}
int main()
{
int T;
cin>>T;
while(T--)
{
scanf("%d%d",&n,&k);
if(n%2 || k>=n)
{
printf("Impossible\n");
continue;
}
int N=1024;
while((N/2)>=n) N/=2;
t(N);
if(!ok())
{
printf("Impossible\n");
continue;
}
else
{
for(int i=2;i<=k+1;i++) {
for(int j=1;j<=n;j++) {
printf("%d%c",mp[i][j],j==n?'':'\n');
}
}
}
}
}
| [
"1119346121@qq.com"
] | 1119346121@qq.com |
04c00c567515c4bd6d2bdfae31c5485ad65939c1 | 2a17ffff49218c2ea045fc4f82b4eab367e2c7c9 | /projects/jasslua/src/fogstate.cpp | a3c6d4ffac5f392c562979356fe020a7f658d79c | [
"MIT"
] | permissive | uniqss/jasslua | d4407c7874009c1759a7f38dd12fb48e98780ac9 | 5271057dcc0a48291434c49a0c1045756d210126 | refs/heads/main | 2023-06-10T18:52:13.962620 | 2021-06-21T16:44:03 | 2021-06-21T16:44:03 | 352,121,179 | 4 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 23 | cpp | #include "fogstate.h"
| [
"uniqs@163.com"
] | uniqs@163.com |
a5d85f86f96ce8d0af63de07e5bc2a9b00bc12a1 | 79c95b31a5c00296bfd272cc332fead77303aa3d | /Compiladores/LexicalAnalyzer.cpp | 64e5f94ed38799929b6e94d5bd5c60050c046bdb | [] | no_license | paivao/Compiladores | 37735bb15c865a71c064e895d12cac7362251a9d | daa234ea8c2de3dd28096bcbc7932ccac9335a54 | refs/heads/master | 2021-01-11T07:27:08.423241 | 2016-10-05T05:55:04 | 2016-10-05T05:55:04 | 69,764,337 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,569 | cpp | #include "stdafx.h"
#include "LexicalAnalyzer.h"
#include <cctype>
#include <string>
LexicalAnalyzer::LexicalAnalyzer()
{
nextChar = ' ';
currentLine = 1;
}
LexicalAnalyzer::~LexicalAnalyzer()
{
if (sourceCode.is_open())
sourceCode.close();
}
bool LexicalAnalyzer::OpenSourceFile(const std::string & filename)
{
if (sourceCode.is_open()) {
if (sourceCode.eof()) {
sourceCode.close();
}
else {
sourceCode.close();
throw std::logic_error("Source code was not completely tokenized.");
}
}
currentLine = 1;
sourceCode.open(filename);
}
Token LexicalAnalyzer::NextToken()
{
Token token;
while (std::isspace(nextChar)) {
if (nextChar == '\n')
currentLine++;
nextChar = sourceCode.get();
}
if (std::isalpha(nextChar)) {
std::string text;
text.reserve(MAX_ID_LENGHT);
do {
text += nextChar;
nextChar = sourceCode.get();
} while (std::isalnum(nextChar) || nextChar == '_');
token = DataPool::SearchKeyword(text);
if (token == Token::ID)
secondaryToken = DataPool::SearchName(std::move(text));
}
else if (std::isdigit(nextChar)) {
std::string numeral;
numeral.reserve(MAX_NUM_LENGTH);
do {
numeral += nextChar;
nextChar = sourceCode.get();
} while (std::isdigit(nextChar));
secondaryToken = DataPool::AddIntConstant(std::stoi(numeral));
token = Token::NUMERAL;
}
else if (nextChar == '"') {
std::string str;
str.reserve(MAX_STR_LENGTH);
do {
str += nextChar;
nextChar = sourceCode.get();
} while (nextChar != '"');
str += '"';
secondaryToken = DataPool::AddStringConst(std::move(str));
token = Token::STRINGVAL;
}
else {
switch (nextChar) {
case '\'':
nextChar = sourceCode.get();
secondaryToken = DataPool::AddCharConstant(nextChar);
sourceCode.get();
nextChar = sourceCode.get();
token = Token::CHARACTER;
break;
case '+':
nextChar = sourceCode.get();
if (nextChar == '+') {
nextChar = sourceCode.get();
token = Token::PLUS_PLUS;
}
else {
token = Token::PLUS;
}
break;
case '-':
nextChar = sourceCode.get();
if (nextChar == '-') {
nextChar = sourceCode.get();
token = Token::MINUS_MINUS;
}
else {
token = Token::MINUS;
}
break;
case '=':
nextChar = sourceCode.get();
if (nextChar == '=') {
nextChar = sourceCode.get();
token = Token::EQUAL_EQUAL;
}
else {
token = Token::EQUALS;
}
break;
case '!':
nextChar = sourceCode.get();
if (nextChar == '=') {
nextChar = sourceCode.get();
token = Token::NOT_EQUAL;
}
else {
token = Token::NOT;
}
break;
case '<':
nextChar = sourceCode.get();
if (nextChar == '=') {
nextChar = sourceCode.get();
token = Token::LESS_OR_EQUAL;
}
else {
token = Token::LESS_THAN;
}
break;
case '>':
nextChar = sourceCode.get();
if (nextChar == '=') {
nextChar = sourceCode.get();
token = Token::GREATER_OR_EQUAL;
}
else {
token = Token::GREATER_THAN;
}
break;
case '&':
nextChar = sourceCode.get();
if (nextChar == '&') {
nextChar = sourceCode.get();
token = Token::AND;
}
else {
token = Token::UNKNOWN;
}
break;
case '|':
nextChar = sourceCode.get();
if (nextChar == '|') {
nextChar = sourceCode.get();
token = Token::OR;
}
else {
token = Token::UNKNOWN;
}
break;
case std::char_traits<char>::eof():
token = Token::END_OF_CODE;
break;
default:
token = DataPool::GetSingleCharToken(nextChar);
nextChar = sourceCode.get();
}
}
return token;
}
| [
"08.paiva@gmail.com"
] | 08.paiva@gmail.com |
f9fffc5223104667a281eb35da5b7652a4757baa | a4cb6426f98ca939d9a88baa49a24a2643fa018c | /src/activemasternode.h | ad7f8d17822a43d0860233abe0a9d5c77d032c2b | [
"MIT"
] | permissive | DeCrypt0/figurecoin | 3208b1eae213fd7e65a49bb787bad2c44dfba78e | 5002792efe2691e55ef081ebf565fb3e2836e9bb | refs/heads/master | 2020-03-25T19:11:04.531106 | 2018-08-08T12:54:27 | 2018-08-08T12:54:27 | 144,068,931 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,018 | h | // Copyright (c) 2014-2017 The Dash Core developers
// Copyright (c) 2017-2018 The Figure Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef ACTIVEMASTERNODE_H
#define ACTIVEMASTERNODE_H
#include "net.h"
#include "key.h"
#include "wallet/wallet.h"
class CActiveMasternode;
static const int ACTIVE_MASTERNODE_INITIAL = 0; // initial state
static const int ACTIVE_MASTERNODE_SYNC_IN_PROCESS = 1;
static const int ACTIVE_MASTERNODE_INPUT_TOO_NEW = 2;
static const int ACTIVE_MASTERNODE_NOT_CAPABLE = 3;
static const int ACTIVE_MASTERNODE_STARTED = 4;
extern CActiveMasternode activeMasternode;
// Responsible for activating the Masternode and pinging the network
class CActiveMasternode
{
public:
enum masternode_type_enum_t {
MASTERNODE_UNKNOWN = 0,
MASTERNODE_REMOTE = 1,
MASTERNODE_LOCAL = 2
};
private:
// critical section to protect the inner data structures
mutable CCriticalSection cs;
masternode_type_enum_t eType;
bool fPingerEnabled;
/// Ping Masternode
bool SendMasternodePing();
public:
// Keys for the active Masternode
CPubKey pubKeyMasternode;
CKey keyMasternode;
// Initialized while registering Masternode
CTxIn vin;
CService service;
int nState; // should be one of ACTIVE_MASTERNODE_XXXX
std::string strNotCapableReason;
CActiveMasternode()
: eType(MASTERNODE_UNKNOWN),
fPingerEnabled(false),
pubKeyMasternode(),
keyMasternode(),
vin(),
service(),
nState(ACTIVE_MASTERNODE_INITIAL)
{}
/// Manage state of active Masternode
void ManageState();
std::string GetStateString() const;
std::string GetStatus() const;
std::string GetTypeString() const;
private:
void ManageStateInitial();
void ManageStateRemote();
void ManageStateLocal();
};
#endif
| [
"figurecoin@gmail.com"
] | figurecoin@gmail.com |
cb8bc0d1d2cd37e8b52c86371fbc1be4989d5d33 | 0a398c797c6258cc8b25a6a5261af2a963fce2b6 | /learningTools/learningTools.cpp | be02dc328475cf0591300c89dbe9b90b8274ca86 | [] | no_license | kazura-utb/KZRevesi_Learn | d25ddc5e163b8bdc8fa5042465b2cade7eb231d8 | 874ad4484c74c27998fe18245235e6286b2bb1b6 | refs/heads/master | 2021-01-20T18:29:11.250475 | 2020-03-05T02:39:09 | 2020-03-05T02:39:09 | 60,455,270 | 0 | 0 | null | null | null | null | SHIFT_JIS | C++ | false | false | 54,102 | cpp | // learningTools.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//
#include "stdafx.h"
#include <stdlib.h>
#include <string.h>
#include <direct.h>
#include <Windows.h>
#include <nmmintrin.h>
#include "learningTools.h"
#include "bit64.h"
#include "type.h"
#include "board.h"
#include "rev.h"
#include "move.h"
#include "eval.h"
#include "cpu.h"
#include "hash.h"
#include "mpc_learn.h"
/* 各座標 */
#define A1 0 /* A1 */
#define A2 1 /* A2 */
#define A3 2 /* A3 */
#define A4 3 /* A4 */
#define A5 4 /* A5 */
#define A6 5 /* A6 */
#define A7 6 /* A7 */
#define A8 7 /* A8 */
#define B1 8 /* B1 */
#define B2 9 /* B2 */
#define B3 10 /* B3 */
#define B4 11 /* B4 */
#define B5 12 /* B5 */
#define B6 13 /* B6 */
#define B7 14 /* B7 */
#define B8 15 /* B8 */
#define C1 16 /* C1 */
#define C2 17 /* C2 */
#define C3 18 /* C3 */
#define C4 19 /* C4 */
#define C5 20 /* C5 */
#define C6 21 /* C6 */
#define C7 22 /* C7 */
#define C8 23 /* C8 */
#define D1 24 /* D1 */
#define D2 25 /* D2 */
#define D3 26 /* D3 */
#define D4 27 /* D4 */
#define D5 28 /* D5 */
#define D6 29 /* D6 */
#define D7 30 /* D7 */
#define D8 31 /* D8 */
#define E1 32 /* E1 */
#define E2 33 /* E2 */
#define E3 34 /* E3 */
#define E4 35 /* E4 */
#define E5 36 /* E5 */
#define E6 37 /* E6 */
#define E7 38 /* E7 */
#define E8 39 /* E8 */
#define F1 40 /* F1 */
#define F2 41 /* F2 */
#define F3 42 /* F3 */
#define F4 43 /* F4 */
#define F5 44 /* F5 */
#define F6 45 /* F6 */
#define F7 46 /* F7 */
#define F8 47 /* F8 */
#define G1 48 /* G1 */
#define G2 49 /* G2 */
#define G3 50 /* G3 */
#define G4 51 /* G4 */
#define G5 52 /* G5 */
#define G6 53 /* G6 */
#define G7 54 /* G7 */
#define G8 55 /* G8 */
#define H1 56 /* H1 */
#define H2 57 /* H2 */
#define H3 58 /* H3 */
#define H4 59 /* H4 */
#define H5 60 /* H5 */
#define H6 61 /* H6 */
#define H7 62 /* H7 */
#define H8 63 /* H8 */
int hori1cnt[INDEX_NUM] = { 0 };
int hori2cnt[INDEX_NUM] = { 0 };
int hori3cnt[INDEX_NUM] = { 0 };
int diag1cnt[INDEX_NUM] = { 0 };
int diag2cnt[INDEX_NUM / 3] = { 0 };
int diag3cnt[INDEX_NUM / 9] = { 0 };
int diag4cnt[INDEX_NUM / 27] = { 0 };
int edgecnt[INDEX_NUM * 9] = { 0 };
int cor52cnt[INDEX_NUM * 9] = { 0 };
int cor33cnt[INDEX_NUM * 3] = { 0 };
int trianglecnt[INDEX_NUM * 9] = { 0 };
int mobcnt[MOBILITY_NUM] = { 0 };
int paritycnt[PARITY_NUM] = { 0 };
/* 探索ベクトル */
double hori_ver1_data_d[INDEX_NUM];
double hori_ver2_data_d[INDEX_NUM];
double hori_ver3_data_d[INDEX_NUM];
double dia_ver1_data_d[INDEX_NUM];
double dia_ver2_data_d[INDEX_NUM / 3];
double dia_ver3_data_d[INDEX_NUM / 9];
double dia_ver4_data_d[INDEX_NUM / 27];
double edge_data_d[INDEX_NUM * 9];
double corner5_2_data_d[INDEX_NUM * 9];
double corner3_3_data_d[INDEX_NUM * 3];
double triangle_data_d[INDEX_NUM * 9];
double constant_data_d;
double mobility_data_d[MOBILITY_NUM];
double parity_data_d[PARITY_NUM];
const int pow_table[10] = { 1, 3, 9, 27, 81, 243, 729, 2187, 6561, 19683 };
/* 対称変換テーブル */
const int hori_convert_table[8] = { 7, 6, 5, 4, 3, 2, 1, 0 };
const int dia2_convert_table[7] = { 6, 5, 4, 3, 2, 1, 0 };
const int dia3_convert_table[6] = { 5, 4, 3, 2, 1, 0 };
const int dia4_convert_table[5] = { 4, 3, 2, 1, 0 };
const int dia5_convert_table[4] = { 3, 2, 1, 0 };
const int edge_convert_table[10] = { 7, 6, 5, 4, 3, 2, 1, 0, 9, 8 };
//const int edge_cor_convert_table[10] = { 0, 1, 6, 7, 8, 9, 2, 3, 4, 5 };
//const int corner4_2_convert_table[10] = { 1, 0, 5, 4, 3, 2, 9, 8, 7, 6 };
const int corner3_3_convert_table[9] = { 0, 3, 6, 1, 4, 7, 2, 5, 8 };
const int triangle_convert_table[10] = { 0, 4, 7, 9, 1, 5, 8, 2, 6, 3 };
int bk_win = 0, wh_win = 0;
int game_num1, game_num2;
int rand_index_array[926590 - 839127];
int score[129] = { 0 };
int kifuNum[129] = { 0 };
extern int INF_DEPTH;
void init_index_board(int *board, UINT64 bk, UINT64 wh)
{
board[0] = (int)(bk & a1) + (int)(wh & a1) * 2;
board[1] = (int)((bk & a2) >> 1) + (int)((wh & a2));
board[2] = (int)((bk & a3) >> 2) + (int)((wh & a3) >> 1);
board[3] = (int)((bk & a4) >> 3) + (int)((wh & a4) >> 2);
board[4] = (int)((bk & a5) >> 4) + (int)((wh & a5) >> 3);
board[5] = (int)((bk & a6) >> 5) + (int)((wh & a6) >> 4);
board[6] = (int)((bk & a7) >> 6) + (int)((wh & a7) >> 5);
board[7] = (int)((bk & a8) >> 7) + (int)((wh & a8) >> 6);
board[8] = (int)((bk & b1) >> 8) + (int)((wh & b1) >> 7);
board[9] = (int)((bk & b2) >> 9) + (int)((wh & b2) >> 8);
board[10] = (int)((bk & b3) >> 10) + (int)((wh & b3) >> 9);
board[11] = (int)((bk & b4) >> 11) + (int)((wh & b4) >> 10);
board[12] = (int)((bk & b5) >> 12) + (int)((wh & b5) >> 11);
board[13] = (int)((bk & b6) >> 13) + (int)((wh & b6) >> 12);
board[14] = (int)((bk & b7) >> 14) + (int)((wh & b7) >> 13);
board[15] = (int)((bk & b8) >> 15) + (int)((wh & b8) >> 14);
board[16] = (int)((bk & c1) >> 16) + (int)((wh & c1) >> 15);
board[17] = (int)((bk & c2) >> 17) + (int)((wh & c2) >> 16);
board[18] = (int)((bk & c3) >> 18) + (int)((wh & c3) >> 17);
board[19] = (int)((bk & c4) >> 19) + (int)((wh & c4) >> 18);
board[20] = (int)((bk & c5) >> 20) + (int)((wh & c5) >> 19);
board[21] = (int)((bk & c6) >> 21) + (int)((wh & c6) >> 20);
board[22] = (int)((bk & c7) >> 22) + (int)((wh & c7) >> 21);
board[23] = (int)((bk & c8) >> 23) + (int)((wh & c8) >> 22);
board[24] = (int)((bk & d1) >> 24) + (int)((wh & d1) >> 23);
board[25] = (int)((bk & d2) >> 25) + (int)((wh & d2) >> 24);
board[26] = (int)((bk & d3) >> 26) + (int)((wh & d3) >> 25);
board[27] = (int)((bk & d4) >> 27) + (int)((wh & d4) >> 26);
board[28] = (int)((bk & d5) >> 28) + (int)((wh & d5) >> 27);
board[29] = (int)((bk & d6) >> 29) + (int)((wh & d6) >> 28);
board[30] = (int)((bk & d7) >> 30) + (int)((wh & d7) >> 29);
board[31] = (int)((bk & d8) >> 31) + (int)((wh & d8) >> 30);
board[32] = (int)((bk & e1) >> 32) + (int)((wh & e1) >> 31);
board[33] = (int)((bk & e2) >> 33) + (int)((wh & e2) >> 32);
board[34] = (int)((bk & e3) >> 34) + (int)((wh & e3) >> 33);
board[35] = (int)((bk & e4) >> 35) + (int)((wh & e4) >> 34);
board[36] = (int)((bk & e5) >> 36) + (int)((wh & e5) >> 35);
board[37] = (int)((bk & e6) >> 37) + (int)((wh & e6) >> 36);
board[38] = (int)((bk & e7) >> 38) + (int)((wh & e7) >> 37);
board[39] = (int)((bk & e8) >> 39) + (int)((wh & e8) >> 38);
board[40] = (int)((bk & f1) >> 40) + (int)((wh & f1) >> 39);
board[41] = (int)((bk & f2) >> 41) + (int)((wh & f2) >> 40);
board[42] = (int)((bk & f3) >> 42) + (int)((wh & f3) >> 41);
board[43] = (int)((bk & f4) >> 43) + (int)((wh & f4) >> 42);
board[44] = (int)((bk & f5) >> 44) + (int)((wh & f5) >> 43);
board[45] = (int)((bk & f6) >> 45) + (int)((wh & f6) >> 44);
board[46] = (int)((bk & f7) >> 46) + (int)((wh & f7) >> 45);
board[47] = (int)((bk & f8) >> 47) + (int)((wh & f8) >> 46);
board[48] = (int)((bk & g1) >> 48) + (int)((wh & g1) >> 47);
board[49] = (int)((bk & g2) >> 49) + (int)((wh & g2) >> 48);
board[50] = (int)((bk & g3) >> 50) + (int)((wh & g3) >> 49);
board[51] = (int)((bk & g4) >> 51) + (int)((wh & g4) >> 50);
board[52] = (int)((bk & g5) >> 52) + (int)((wh & g5) >> 51);
board[53] = (int)((bk & g6) >> 53) + (int)((wh & g6) >> 52);
board[54] = (int)((bk & g7) >> 54) + (int)((wh & g7) >> 53);
board[55] = (int)((bk & g8) >> 55) + (int)((wh & g8) >> 54);
board[56] = (int)((bk & h1) >> 56) + (int)((wh & h1) >> 55);
board[57] = (int)((bk & h2) >> 57) + (int)((wh & h2) >> 56);
board[58] = (int)((bk & h3) >> 58) + (int)((wh & h3) >> 57);
board[59] = (int)((bk & h4) >> 59) + (int)((wh & h4) >> 58);
board[60] = (int)((bk & h5) >> 60) + (int)((wh & h5) >> 59);
board[61] = (int)((bk & h6) >> 61) + (int)((wh & h6) >> 60);
board[62] = (int)((bk & h7) >> 62) + (int)((wh & h7) >> 61);
board[63] = (int)((bk & h8) >> 63) + (int)((wh & h8) >> 62);
}
void init_substitution_table_exact(HashTable *hash)
{
int i;
for (i = 0; i < g_casheSize; i++)
{
hash->entry[i].deepest.lower = -INF_SCORE;
hash->entry[i].deepest.upper = INF_SCORE;
hash->entry[i].newest.lower = -INF_SCORE;
hash->entry[i].newest.upper = INF_SCORE;
}
}
void init_substitution_table_winloss(HashTable *hash)
{
int i;
for (i = 0; i < g_casheSize; i++)
{
hash->entry[i].deepest.lower = -2;
hash->entry[i].deepest.upper = 2;
hash->entry[i].newest.lower = -2;
hash->entry[i].newest.upper = 2;
}
}
void initCountTable()
{
memset(hori1cnt, 0, sizeof(hori1cnt)); // 4
memset(hori2cnt, 0, sizeof(hori2cnt)); // 4
memset(hori3cnt, 0, sizeof(hori3cnt)); // 4
memset(diag1cnt, 0, sizeof(diag1cnt)); // 2
memset(diag2cnt, 0, sizeof(diag2cnt)); // 4
memset(diag3cnt, 0, sizeof(diag3cnt)); // 4
memset(diag4cnt, 0, sizeof(diag4cnt)); // 4
memset(edgecnt, 0, sizeof(edgecnt)); // 4
memset(cor52cnt, 0, sizeof(cor52cnt)); // 8
memset(cor33cnt, 0, sizeof(cor33cnt)); // 4
memset(trianglecnt, 0, sizeof(trianglecnt)); // 4
memset(mobcnt, 0, sizeof(mobcnt));
//memset(paritycnt, 0, sizeof(paritycnt)); // 1
}
/* 線対称 */
int convert_index_sym(int index_num, const int *num_table)
{
int i;
int s_index_num = 0;
for (i = 0; index_num != 0; i++)
{
s_index_num += (index_num % 3) * pow_table[num_table[i]];
index_num /= 3;
}
return s_index_num;
}
void write_h_ver1(USHORT *keyIndex, int *board)
{
int key;
int sym_key; //対称形を正規化する
/* a2 b2 c2 d2 e2 f2 g2 h2 */
/* a7 b7 c7 d7 e7 f7 g7 h7 */
/* b1 b2 b3 b4 b5 b6 b7 b8 */
/* g1 g2 g3 g4 g5 g6 g7 g8 */
key = board[A2];
key += 3 * board[B2];
key += 9 * board[C2];
key += 27 * board[D2];
key += 81 * board[E2];
key += 243 * board[F2];
key += 729 * board[G2];
key += 2187 * board[H2];
/* 対称形が存在するため、小さいインデックス番号に正規化(パターンの出現頻度を多くする) */
sym_key = convert_index_sym(key, hori_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[0] = key;
hori1cnt[key]++;
key = board[H7];
key += 3 * board[G7];
key += 9 * board[F7];
key += 27 * board[E7];
key += 81 * board[D7];
key += 243 * board[C7];
key += 729 * board[B7];
key += 2187 * board[A7];
sym_key = convert_index_sym(key, hori_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[1] = key;
hori1cnt[key]++;
key = board[B8];
key += 3 * board[B7];
key += 9 * board[B6];
key += 27 * board[B5];
key += 81 * board[B4];
key += 243 * board[B3];
key += 729 * board[B2];
key += 2187 * board[B1];
sym_key = convert_index_sym(key, hori_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[2] = key;
hori1cnt[key]++;
key = board[G1];
key += 3 * board[G2];
key += 9 * board[G3];
key += 27 * board[G4];
key += 81 * board[G5];
key += 243 * board[G6];
key += 729 * board[G7];
key += 2187 * board[G8];
sym_key = convert_index_sym(key, hori_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[3] = key;
hori1cnt[key]++;
}
void write_h_ver2(USHORT *keyIndex, int *board)
{
int key;
int sym_key;
/* a3 b3 c3 d3 e3 f3 g3 h3 */
/* a6 b6 c6 d6 e6 f6 g6 h6 */
/* c1 c2 c3 c4 c5 c6 c7 c8 */
/* f1 f2 f3 f4 f5 f6 f7 f8 */
key = board[A3];
key += 3 * board[B3];
key += 9 * board[C3];
key += 27 * board[D3];
key += 81 * board[E3];
key += 243 * board[F3];
key += 729 * board[G3];
key += 2187 * board[H3];
sym_key = convert_index_sym(key, hori_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[0] = key;
hori2cnt[key]++;
key = board[H6];
key += 3 * board[G6];
key += 9 * board[F6];
key += 27 * board[E6];
key += 81 * board[D6];
key += 243 * board[C6];
key += 729 * board[B6];
key += 2187 * board[A6];
sym_key = convert_index_sym(key, hori_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[1] = key;
hori2cnt[key]++;
key = board[C8];
key += 3 * board[C7];
key += 9 * board[C6];
key += 27 * board[C5];
key += 81 * board[C4];
key += 243 * board[C3];
key += 729 * board[C2];
key += 2187 * board[C1];
sym_key = convert_index_sym(key, hori_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[2] = key;
hori2cnt[key]++;
key = board[F1];
key += 3 * board[F2];
key += 9 * board[F3];
key += 27 * board[F4];
key += 81 * board[F5];
key += 243 * board[F6];
key += 729 * board[F7];
key += 2187 * board[F8];
sym_key = convert_index_sym(key, hori_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[3] = key;
hori2cnt[key]++;
}
void write_h_ver3(USHORT *keyIndex, int *board)
{
int key;
int sym_key;
/* a4 b4 c4 d4 e4 f4 g4 h4 */
/* a5 b5 c5 d5 e5 f5 g5 h5 */
/* d1 d2 d3 d4 d5 d6 d7 d8 */
/* e1 e2 e3 e4 e5 e6 e7 e8 */
key = board[A4];
key += 3 * board[B4];
key += 9 * board[C4];
key += 27 * board[D4];
key += 81 * board[E4];
key += 243 * board[F4];
key += 729 * board[G4];
key += 2187 * board[H4];
sym_key = convert_index_sym(key, hori_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[0] = key;
hori3cnt[key]++;
key = board[H5];
key += 3 * board[G5];
key += 9 * board[F5];
key += 27 * board[E5];
key += 81 * board[D5];
key += 243 * board[C5];
key += 729 * board[B5];
key += 2187 * board[A5];
sym_key = convert_index_sym(key, hori_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[1] = key;
hori3cnt[key]++;
key = board[D8];
key += 3 * board[D7];
key += 9 * board[D6];
key += 27 * board[D5];
key += 81 * board[D4];
key += 243 * board[D3];
key += 729 * board[D2];
key += 2187 * board[D1];
sym_key = convert_index_sym(key, hori_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[2] = key;
hori3cnt[key]++;
key = board[E1];
key += 3 * board[E2];
key += 9 * board[E3];
key += 27 * board[E4];
key += 81 * board[E5];
key += 243 * board[E6];
key += 729 * board[E7];
key += 2187 * board[E8];
sym_key = convert_index_sym(key, hori_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[3] = key;
hori3cnt[key]++;
}
void write_dia_ver1(USHORT *keyIndex, int *board)
{
int key;
int sym_key;
/* a1 b2 c3 d4 e5 f6 g7 h8 */
/* h1 g2 f3 e4 d5 c6 b7 a8 */
key = board[A1];
key += 3 * board[B2];
key += 9 * board[C3];
key += 27 * board[D4];
key += 81 * board[E5];
key += 243 * board[F6];
key += 729 * board[G7];
key += 2187 * board[H8];
sym_key = convert_index_sym(key, hori_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[0] = key;
diag1cnt[key]++;
key = board[H1];
key += 3 * board[G2];
key += 9 * board[F3];
key += 27 * board[E4];
key += 81 * board[D5];
key += 243 * board[C6];
key += 729 * board[B7];
key += 2187 * board[A8];
sym_key = convert_index_sym(key, hori_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[1] = key;
diag1cnt[key]++;
}
void write_dia_ver2(USHORT *keyIndex, int *board)
{
int key;
int sym_key;
/* a2 b3 c4 d5 e6 f7 g8 */
/* b1 c2 d3 e4 f5 g6 h7 */
/* h2 g3 f4 e5 d6 c7 b8 */
/* g1 f2 e3 d4 c5 b6 a7 */
key = board[A2];
key += 3 * board[B3];
key += 9 * board[C4];
key += 27 * board[D5];
key += 81 * board[E6];
key += 243 * board[F7];
key += 729 * board[G8];
sym_key = convert_index_sym(key, dia2_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[0] = key;
diag2cnt[key]++;
key = board[H7];
key += 3 * board[G6];
key += 9 * board[F5];
key += 27 * board[E4];
key += 81 * board[D3];
key += 243 * board[C2];
key += 729 * board[B1];
sym_key = convert_index_sym(key, dia2_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[1] = key;
diag2cnt[key]++;
key = board[B8];
key += 3 * board[C7];
key += 9 * board[D6];
key += 27 * board[E5];
key += 81 * board[F4];
key += 243 * board[G3];
key += 729 * board[H2];
sym_key = convert_index_sym(key, dia2_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[2] = key;
diag2cnt[key]++;
key = board[G1];
key += 3 * board[F2];
key += 9 * board[E3];
key += 27 * board[D4];
key += 81 * board[C5];
key += 243 * board[B6];
key += 729 * board[A7];
sym_key = convert_index_sym(key, dia2_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[3] = key;
diag2cnt[key]++;
}
void write_dia_ver3(USHORT *keyIndex, int *board)
{
int key;
int sym_key;
key = board[A3];
key += 3 * board[B4];
key += 9 * board[C5];
key += 27 * board[D6];
key += 81 * board[E7];
key += 243 * board[F8];
sym_key = convert_index_sym(key, dia3_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[0] = key;
diag3cnt[key]++;
key = board[H6];
key += 3 * board[G5];
key += 9 * board[F4];
key += 27 * board[E3];
key += 81 * board[D2];
key += 243 * board[C1];
sym_key = convert_index_sym(key, dia3_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[1] = key;
diag3cnt[key]++;
key = board[C8];
key += 3 * board[D7];
key += 9 * board[E6];
key += 27 * board[F5];
key += 81 * board[G4];
key += 243 * board[H3];
sym_key = convert_index_sym(key, dia3_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[2] = key;
diag3cnt[key]++;
key = board[F1];
key += 3 * board[E2];
key += 9 * board[D3];
key += 27 * board[C4];
key += 81 * board[B5];
key += 243 * board[A6];
sym_key = convert_index_sym(key, dia3_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[3] = key;
diag3cnt[key]++;
}
void write_dia_ver4(USHORT *keyIndex, int *board)
{
int key;
int sym_key;
key = board[A4];
key += 3 * board[B5];
key += 9 * board[C6];
key += 27 * board[D7];
key += 81 * board[E8];
sym_key = convert_index_sym(key, dia4_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[0] = key;
diag4cnt[key]++;
key = board[H5];
key += 3 * board[G4];
key += 9 * board[F3];
key += 27 * board[E2];
key += 81 * board[D1];
sym_key = convert_index_sym(key, dia4_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[1] = key;
diag4cnt[key]++;
key = board[D8];
key += 3 * board[E7];
key += 9 * board[F6];
key += 27 * board[G5];
key += 81 * board[H4];
sym_key = convert_index_sym(key, dia4_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[2] = key;
diag4cnt[key]++;
key = board[E1];
key += 3 * board[D2];
key += 9 * board[C3];
key += 27 * board[B4];
key += 81 * board[A5];
sym_key = convert_index_sym(key, dia4_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[3] = key;
diag4cnt[key]++;
}
/*
void write_dia_ver5(USHORT *keyIndex, int *board)
{
int key;
int sym_key;
key = board[D1];
key += 3 * board[C2];
key += 9 * board[B3];
key += 27 * board[A4];
sym_key = convert_index_sym(key, dia5_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[0] = key;
diag5cnt[key]++;
key = board[D8];
key += 3 * board[C7];
key += 9 * board[B6];
key += 27 * board[A5];
sym_key = convert_index_sym(key, dia5_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[1] = key;
diag5cnt[key]++;
key = board[E1];
key += 3 * board[F2];
key += 9 * board[G3];
key += 27 * board[H4];
sym_key = convert_index_sym(key, dia5_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[2] = key;
diag5cnt[key]++;
key = board[E8];
key += 3 * board[F7];
key += 9 * board[G6];
key += 27 * board[H5];
sym_key = convert_index_sym(key, dia5_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[3] = key;
diag5cnt[key]++;
}
*/
void write_edge(USHORT *keyIndex, int *board)
{
int key;
int sym_key;
key = board[A1];
key += 3 * board[A2];
key += 9 * board[A3];
key += 27 * board[A4];
key += 81 * board[A5];
key += 243 * board[A6];
key += 729 * board[A7];
key += 2187 * board[A8];
key += 6561 * board[B2];
key += 19683 * board[B7];
sym_key = convert_index_sym(key, edge_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[0] = key;
edgecnt[key]++;
key = board[H8];
key += 3 * board[H7];
key += 9 * board[H6];
key += 27 * board[H5];
key += 81 * board[H4];
key += 243 * board[H3];
key += 729 * board[H2];
key += 2187 * board[H1];
key += 6561 * board[G7];
key += 19683 * board[G2];
sym_key = convert_index_sym(key, edge_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[1] = key;
edgecnt[key]++;
key = board[H1];
key += 3 * board[G1];
key += 9 * board[F1];
key += 27 * board[E1];
key += 81 * board[D1];
key += 243 * board[C1];
key += 729 * board[B1];
key += 2187 * board[A1];
key += 6561 * board[G2];
key += 19683 * board[B2];
sym_key = convert_index_sym(key, edge_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[2] = key;
edgecnt[key]++;
key = board[A8];
key += 3 * board[B8];
key += 9 * board[C8];
key += 27 * board[D8];
key += 81 * board[E8];
key += 243 * board[F8];
key += 729 * board[G8];
key += 2187 * board[H8];
key += 6561 * board[B7];
key += 19683 * board[G7];
sym_key = convert_index_sym(key, edge_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[3] = key;
edgecnt[key]++;
}
/*
void write_edge_cor(USHORT *keyIndex, int *board)
{
int key;
int sym_key;
key = board[B2];
key += 3 * board[A1];
key += 9 * board[A2];
key += 27 * board[A3];
key += 81 * board[A4];
key += 243 * board[A5];
key += 729 * board[B1];
key += 2187 * board[C1];
key += 6561 * board[D1];
key += 19683 * board[E1];
sym_key = convert_index_sym(key, edge_cor_convert_table);
if(key > sym_key)
{
key = sym_key;
}
keyIndex[0] = key;
edgecorcnt[key]++;
key = board[G2];
key += 3 * board[H1];
key += 9 * board[G1];
key += 27 * board[F1];
key += 81 * board[E1];
key += 243 * board[D1];
key += 729 * board[H2];
key += 2187 * board[H3];
key += 6561 * board[H4];
key += 19683 * board[H5];
sym_key = convert_index_sym(key, edge_cor_convert_table);
if(key > sym_key)
{
key = sym_key;
}
keyIndex[1] = key;
edgecorcnt[key]++;
key = board[G7];
key += 3 * board[H8];
key += 9 * board[H7];
key += 27 * board[H6];
key += 81 * board[H5];
key += 243 * board[H4];
key += 729 * board[G8];
key += 2187 * board[F8];
key += 6561 * board[E8];
key += 19683 * board[D8];
sym_key = convert_index_sym(key, edge_cor_convert_table);
if(key > sym_key)
{
key = sym_key;
}
keyIndex[2] = key;
edgecorcnt[key]++;
key = board[B7];
key += 3 * board[A8];
key += 9 * board[B8];
key += 27 * board[C8];
key += 81 * board[D8];
key += 243 * board[E8];
key += 729 * board[A7];
key += 2187 * board[A6];
key += 6561 * board[A5];
key += 19683 * board[A4];
sym_key = convert_index_sym(key, edge_cor_convert_table);
if(key > sym_key)
{
key = sym_key;
}
keyIndex[3] = key;
edgecorcnt[key]++;
}
void write_corner4_2(USHORT *keyIndex, int *board)
{
int key;
int sym_key;
key = board[A1];
key += 3 * board[A8];
key += 9 * board[A3];
key += 27 * board[A4];
key += 81 * board[A5];
key += 243 * board[A6];
key += 729 * board[B3];
key += 2187 * board[B4];
key += 6561 * board[B5];
key += 19683 * board[B6];
sym_key = convert_index_sym(key, corner4_2_convert_table);
if(key > sym_key)
{
key = sym_key;
}
keyIndex[0] = key;
cor42cnt[key]++;
key = board[H1];
key += 3 * board[A1];
key += 9 * board[F1];
key += 27 * board[E1];
key += 81 * board[D1];
key += 243 * board[C1];
key += 729 * board[F2];
key += 2187 * board[E2];
key += 6561 * board[D2];
key += 19683 * board[C2];
sym_key = convert_index_sym(key, corner4_2_convert_table);
if(key > sym_key)
{
key = sym_key;
}
keyIndex[1] = key;
cor42cnt[key]++;
key = board[H1];
key += 3 * board[H8];
key += 9 * board[H3];
key += 27 * board[H4];
key += 81 * board[H5];
key += 243 * board[H6];
key += 729 * board[G3];
key += 2187 * board[G4];
key += 6561 * board[G5];
key += 19683 * board[G6];
sym_key = convert_index_sym(key, corner4_2_convert_table);
if(key > sym_key)
{
key = sym_key;
}
keyIndex[2] = key;
cor42cnt[key]++;
key = board[A8];
key += 3 * board[H8];
key += 9 * board[C8];
key += 27 * board[D8];
key += 81 * board[E8];
key += 243 * board[F8];
key += 729 * board[C7];
key += 2187 * board[D7];
key += 6561 * board[E7];
key += 19683 * board[F7];
sym_key = convert_index_sym(key, corner4_2_convert_table);
if(key > sym_key)
{
key = sym_key;
}
keyIndex[3] = key;
cor42cnt[key]++;
}
*/
void write_corner3_3(USHORT *keyIndex, int *board)
{
int key;
int sym_key;
key = board[A1];
key += 3 * board[A2];
key += 9 * board[A3];
key += 27 * board[B1];
key += 81 * board[B2];
key += 243 * board[B3];
key += 729 * board[C1];
key += 2187 * board[C2];
key += 6561 * board[C3];
sym_key = convert_index_sym(key, corner3_3_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[0] = key;
cor33cnt[key]++;
key = board[H1];
key += 3 * board[G1];
key += 9 * board[F1];
key += 27 * board[H2];
key += 81 * board[G2];
key += 243 * board[F2];
key += 729 * board[H3];
key += 2187 * board[G3];
key += 6561 * board[F3];
sym_key = convert_index_sym(key, corner3_3_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[1] = key;
cor33cnt[key]++;
key = board[A8];
key += 3 * board[B8];
key += 9 * board[C8];
key += 27 * board[A7];
key += 81 * board[B7];
key += 243 * board[C7];
key += 729 * board[A6];
key += 2187 * board[B6];
key += 6561 * board[C6];
sym_key = convert_index_sym(key, corner3_3_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[2] = key;
cor33cnt[key]++;
key = board[H8];
key += 3 * board[H7];
key += 9 * board[H6];
key += 27 * board[G8];
key += 81 * board[G7];
key += 243 * board[G6];
key += 729 * board[F8];
key += 2187 * board[F7];
key += 6561 * board[F6];
sym_key = convert_index_sym(key, corner3_3_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[3] = key;
cor33cnt[key]++;
}
void write_corner5_2(USHORT *keyIndex, int *board)
{
int key;
key = board[A1];
key += 3 * board[B1];
key += 9 * board[C1];
key += 27 * board[D1];
key += 81 * board[E1];
key += 243 * board[A2];
key += 729 * board[B2];
key += 2187 * board[C2];
key += 6561 * board[D2];
key += 19683 * board[E2];
keyIndex[0] = key;
cor52cnt[key]++;
key = board[A8];
key += 3 * board[B8];
key += 9 * board[C8];
key += 27 * board[D8];
key += 81 * board[E8];
key += 243 * board[A7];
key += 729 * board[B7];
key += 2187 * board[C7];
key += 6561 * board[D7];
key += 19683 * board[E7];
keyIndex[1] = key;
cor52cnt[key]++;
key = board[H1];
key += 3 * board[G1];
key += 9 * board[F1];
key += 27 * board[E1];
key += 81 * board[D1];
key += 243 * board[H2];
key += 729 * board[G2];
key += 2187 * board[F2];
key += 6561 * board[E2];
key += 19683 * board[D2];
keyIndex[2] = key;
cor52cnt[key]++;
key = board[H8];
key += 3 * board[G8];
key += 9 * board[F8];
key += 27 * board[E8];
key += 81 * board[D8];
key += 243 * board[H7];
key += 729 * board[G7];
key += 2187 * board[F7];
key += 6561 * board[E7];
key += 19683 * board[D7];
keyIndex[3] = key;
cor52cnt[key]++;
key = board[A1];
key += 3 * board[A2];
key += 9 * board[A3];
key += 27 * board[A4];
key += 81 * board[A5];
key += 243 * board[B1];
key += 729 * board[B2];
key += 2187 * board[B3];
key += 6561 * board[B4];
key += 19683 * board[B5];
keyIndex[4] = key;
cor52cnt[key]++;
key = board[H1];
key += 3 * board[H2];
key += 9 * board[H3];
key += 27 * board[H4];
key += 81 * board[H5];
key += 243 * board[G1];
key += 729 * board[G2];
key += 2187 * board[G3];
key += 6561 * board[G4];
key += 19683 * board[G5];
keyIndex[5] = key;
cor52cnt[key]++;
key = board[A8];
key += 3 * board[A7];
key += 9 * board[A6];
key += 27 * board[A5];
key += 81 * board[A4];
key += 243 * board[B8];
key += 729 * board[B7];
key += 2187 * board[B6];
key += 6561 * board[B5];
key += 19683 * board[B4];
keyIndex[6] = key;
cor52cnt[key]++;
key = board[H8];
key += 3 * board[H7];
key += 9 * board[H6];
key += 27 * board[H5];
key += 81 * board[H4];
key += 243 * board[G8];
key += 729 * board[G7];
key += 2187 * board[G6];
key += 6561 * board[G5];
key += 19683 * board[G4];
keyIndex[7] = key;
cor52cnt[key]++;
}
void write_triangle(USHORT *keyIndex, int *board)
{
int key;
int sym_key;
key = board[A1];
key += 3 * board[A2];
key += 9 * board[A3];
key += 27 * board[A4];
key += 81 * board[B1];
key += 243 * board[B2];
key += 729 * board[B3];
key += 2187 * board[C1];
key += 6561 * board[C2];
key += 19683 * board[D1];
sym_key = convert_index_sym(key, triangle_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[0] = key;
trianglecnt[key]++;
key = board[H1];
key += 3 * board[G1];
key += 9 * board[F1];
key += 27 * board[E1];
key += 81 * board[H2];
key += 243 * board[G2];
key += 729 * board[F2];
key += 2187 * board[H3];
key += 6561 * board[G3];
key += 19683 * board[H4];
sym_key = convert_index_sym(key, triangle_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[1] = key;
trianglecnt[key]++;
key = board[A8];
key += 3 * board[B8];
key += 9 * board[C8];
key += 27 * board[D8];
key += 81 * board[A7];
key += 243 * board[B7];
key += 729 * board[C7];
key += 2187 * board[A6];
key += 6561 * board[B6];
key += 19683 * board[A5];
sym_key = convert_index_sym(key, triangle_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[2] = key;
trianglecnt[key]++;
key = board[H8];
key += 3 * board[H7];
key += 9 * board[H6];
key += 27 * board[H5];
key += 81 * board[G8];
key += 243 * board[G7];
key += 729 * board[G6];
key += 2187 * board[F8];
key += 6561 * board[F7];
key += 19683 * board[E8];
sym_key = convert_index_sym(key, triangle_convert_table);
if (key > sym_key)
{
key = sym_key;
}
keyIndex[3] = key;
trianglecnt[key]++;
}
int convert_index_parity_sym(int key)
{
switch (key)
{
case 2:
case 4:
case 8:
key = 1;
break;
case 5:
case 6:
case 9:
case 10:
case 12:
key = 3;
break;
case 11:
case 13:
case 14:
key = 7;
break;
}
return key;
}
void write_parity(USHORT *keyIndex, UINT64 blank)
{
int key;
int sym_key;
key = CountBit(blank & 0x0f0f0f0f) % 2;
key |= (CountBit(blank & 0xf0f0f0f0) % 2) << 1;
key |= (CountBit(blank & 0x0f0f0f0f00000000) % 2) << 2;
key |= (CountBit(blank & 0xf0f0f0f000000000) % 2) << 3;
#if 1
sym_key = convert_index_parity_sym(key);
if (key > sym_key)
{
key = sym_key;
}
#endif
keyIndex[0] = key;
paritycnt[key]++;
}
int ConvertWhorMoveToNum(char whorData)
{
if (whorData == 0x00)
{
return -1;
}
return (((whorData % 10) - 1) * 8) + ((whorData / 10) - 1);
}
INT32 checkMove(UINT64 *bk, UINT64 *wh, int color, INT32 move)
{
INT32 ret;
UINT64 rev, l_bk, l_wh;
l_bk = *bk;
l_wh = *wh;
ret = 0;
if (color == WHITE) swap(&l_bk, &l_wh);
rev = GetRev[move](l_bk, l_wh);
/* 黒パス? */
if (rev == 0)
{
ret = -1;
}
else
{
l_bk ^= ((1ULL << move) | rev);
l_wh ^= rev;
}
if (ret == 0)
{
if (color == BLACK)
{
*bk = l_bk;
*wh = l_wh;
}
else
{
*bk = l_wh;
*wh = l_bk;
}
}
return ret;
}
int getFeatureIndex(USHORT* keyIndex, char* whorData, int stage, char *t)
{
int color = BLACK;
int move;
int offset = 0;
UINT64 bk = FIRST_BK, wh = FIRST_WH;
UINT32 bk_mob;
// ゲームヘッダから石差を取得
t[0] = whorData[7] - 32; // 黒石の最善値個数(Thorフォーマット:ここだと得点なので-32する)
whorData = &whorData[8];
int i;
for (i = 0; i <= stage; i++)
{
move = ConvertWhorMoveToNum(whorData[i]);
if (move == -1)
{
continue;
}
if (i == stage)
{
// 石差
int board[64];
init_index_board(board, bk, wh);
write_h_ver1(&keyIndex[offset + 0], board);
write_h_ver2(&keyIndex[offset + 4], board);
write_h_ver3(&keyIndex[offset + 8], board);
write_dia_ver1(&keyIndex[offset + 12], board);
write_dia_ver2(&keyIndex[offset + 14], board);
write_dia_ver3(&keyIndex[offset + 18], board);
write_dia_ver4(&keyIndex[offset + 22], board);
write_edge(&keyIndex[offset + 26], board);
write_corner5_2(&keyIndex[offset + 30], board);
write_corner3_3(&keyIndex[offset + 38], board);
write_triangle(&keyIndex[offset + 42], board);
CreateMoves(bk, wh, &bk_mob);
//CreateMoves(wh, bk, &wh_mob);
//bk_mob = bk_mob - wh_mob + (MOBILITY_NUM / 2);
keyIndex[offset + 46] = bk_mob;
mobcnt[0]++;
//write_parity(&keyIndex[offset + 47], ~(bk | wh));
offset += PATTERN_NUM;
}
if (checkMove(&bk, &wh, color, move) == -1)
{
color ^= 1;
if (checkMove(&bk, &wh, color, move) == -1)
{
offset = -1;
break;
}
}
color ^= 1;
}
if (i < stage){
return -1;
}
return offset;
}
int getFeatureIndex2(char* t, USHORT* keyIndex, char* kifuData, int stage)
{
int color = BLACK;
int move;
int byteCounter = 0;
UINT64 bk = FIRST_BK, wh = FIRST_WH;
UINT32 bk_mob;
bool badFlag = false;
int turn = 0;
int offset = 0;
char *endPtr;
char *line = strtok_s(kifuData, " ", &endPtr);
char *score = strtok_s(NULL, " ", &endPtr);
char *random = strtok_s(NULL, " ", &endPtr);
// 無効なステージかチェック
if (strtol(random, NULL, 10) > 10 && stage < turn) return -1; // 序盤ランダム10手は考慮しない
while (1)
{
while (kifuData[byteCounter] == ' '){
byteCounter++;
}
/* 英字を読み込む */
if (!isalpha(kifuData[byteCounter]))
{
break;
}
/* 数字を読み込む */
if (!isdigit(kifuData[byteCounter + 1]))
{
badFlag = true;
break;
}
move = ((kifuData[byteCounter] - 'A') * 8) + (kifuData[byteCounter + 1] - '1');
#if 1
/* a9 とか明らかに間違った手を含んでいる棋譜がある */
if (move < 0 || move >= 64)
{
badFlag = true;
break;
}
/* なぜかすでに置いたマスに置いている棋譜がある */
if (bk & (1ULL << move) || wh & (1ULL << move))
{
badFlag = true;
break;
}
#endif
/* 対局データ生成 */
if (turn == stage)
{
int board[64];
init_index_board(board, bk, wh);
write_h_ver1(&keyIndex[offset + 0], board);
write_h_ver2(&keyIndex[offset + 4], board);
write_h_ver3(&keyIndex[offset + 8], board);
write_dia_ver1(&keyIndex[offset + 12], board);
write_dia_ver2(&keyIndex[offset + 14], board);
write_dia_ver3(&keyIndex[offset + 18], board);
write_dia_ver4(&keyIndex[offset + 22], board);
write_edge(&keyIndex[offset + 26], board);
write_corner5_2(&keyIndex[offset + 30], board);
write_corner3_3(&keyIndex[offset + 38], board);
write_triangle(&keyIndex[offset + 42], board);
#if 1
CreateMoves(bk, wh, &bk_mob);
//CreateMoves(wh, bk, &wh_mob);
//bk_mob = bk_mob - wh_mob + (MOBILITY_NUM / 2);
keyIndex[offset + 46] = bk_mob;
mobcnt[bk_mob]++;
//write_parity(&keyIndex[offset + 47], ~(bk | wh));
#endif
offset = PATTERN_NUM;
}
if (checkMove(&bk, &wh, color, move) == -1)
{
color ^= 1;
if (checkMove(&bk, &wh, color, move) == -1)
{
badFlag = true;
offset = 0;
break;
}
}
color ^= 1;
byteCounter += 2;
turn++;
}
/* 対局データ生成 */
if (turn == 60)
{
int board[64];
init_index_board(board, bk, wh);
write_h_ver1(&keyIndex[offset + 0], board);
write_h_ver2(&keyIndex[offset + 4], board);
write_h_ver3(&keyIndex[offset + 8], board);
write_dia_ver1(&keyIndex[offset + 12], board);
write_dia_ver2(&keyIndex[offset + 14], board);
write_dia_ver3(&keyIndex[offset + 18], board);
write_dia_ver4(&keyIndex[offset + 22], board);
write_edge(&keyIndex[offset + 26], board);
write_corner5_2(&keyIndex[offset + 30], board);
write_corner3_3(&keyIndex[offset + 38], board);
write_triangle(&keyIndex[offset + 42], board);
#if 1
CreateMoves(bk, wh, &bk_mob);
//CreateMoves(wh, bk, &wh_mob);
//bk_mob = bk_mob - wh_mob + (MOBILITY_NUM / 2);
keyIndex[offset + 46] = bk_mob;
mobcnt[bk_mob]++;
//write_parity(&keyIndex[offset + 47], ~(bk | wh));
#endif
offset = PATTERN_NUM;
}
if ((turn != 60 && turn <= stage) || badFlag == true)
{
return -1;
}
else
{
t[0] = CountBit(bk) - CountBit(wh);
if (t[0] != strtol(score, NULL, 10))
{
printf("score error!!!\n");
}
//t[0] = strtol(&kifuData[strlen(kifuData) - 6], NULL, 10);
}
return offset;
}
int convertWtbToAscii(char* t, USHORT* keyIndex, int stage)
{
char buf[6800], file_name[64];
FILE *rfp;
UINT64 read_len;
int error, count = 0;
int ret;
//for (int i = 1976;; i++){
sprintf_s(file_name, "kifu\\edax-pvbook_2009.wtb");
if ((error = fopen_s(&rfp, file_name, "rb")) != 0){
return count;
}
fread(buf, sizeof(char), 16, rfp); //ヘッダ読み捨て
while ((read_len = fread(buf, sizeof(char), 6800, rfp)) != 0)
{
for (int i = 0; i < read_len / 68; i++)
{
// ステージごとのパターンを抽出
ret = getFeatureIndex(&keyIndex[count * PATTERN_NUM], &buf[i * 68], stage, &t[count]);
if (ret != -1)
{
count++;
}
}
}
fclose(rfp);
//}
return count;
}
int convertKifuToAscii(char* t, USHORT* keyIndex, int stage)
{
char buf[512];
//char name[32];
FILE *rfp;
int error, count = 0;
int ret;
if ((error = fopen_s(&rfp, "kifu\\all.kif", "r")) != 0){
return -1;
}
// example
// F5D6C3D3C4F4C5B3C2B4 E3E6C6F6〜(略)〜H5H8H7 0
while (fgets(buf, 512, rfp) != NULL)
{
ret = getFeatureIndex2(&t[count], &keyIndex[count * PATTERN_NUM], buf, stage);
// 石差を取得
if (t[count] < -64 || t[count] > 64){
printf("assert!!! st1ULL diff over at %d\n", count);
exit(1);
}
if (ret != -1)
{
count++;
}
}
fclose(rfp);
#if 0
for (int i = 0; i < 74; i++)
{
sprintf_s(name, "kifu\\%02dE4.gam.%d.new", i / 2 + 1, (i % 2) + 1);
if ((error = fopen_s(&rfp, name, "r")) != 0) {
return -1;
}
// example
// F5D6C3D3C4F4C5B3C2B4 E3E6C6F6〜(略)〜H5H8H7 0
while (fgets(buf, 512, rfp) != NULL)
{
ret = getFeatureIndex2(&t[count], &keyIndex[count * PATTERN_NUM], buf, stage);
// 石差を取得
if (t[count] < -64 || t[count] > 64) {
printf("assert!!! st1ULL diff over at %d\n", count);
exit(1);
}
if (ret != -1)
{
count++;
index_count++;
}
}
//printf("count = %d\n", count);
fclose(rfp);
}
return count;
for (int i = 1;; i++){
sprintf_s(file_name, "kifu\\%02dE4.gam.%d.new", (i + 1) / 2, ((i - 1) % 2) + 1);
if ((error = fopen_s(&rfp, file_name, "rb")) != 0){
break;
}
// example
// F5D6C3D3C4F4C5B3C2B4 E3E6C6F6〜(略)〜H5H8H7 0
while (fgets(buf, 512, rfp) != NULL)
{
ret = getFeatureIndex2(&t[count], &keyIndex[count * PATTERN_NUM], buf, stage);
// 石差を取得
if (t[count] < -64 || t[count] > 64){
printf("assert!!! st1ULL diff over at %d\n", count);
exit(1);
}
if (ret != -1)
{
count++;
index_count++;
}
}
fclose(rfp);
}
#endif
return count;
}
void writeTable(char *file_name, int stage)
{
int error;
FILE *fp;
if ((error = fopen_s(&fp, file_name, "w")) != 0){
return;
}
int i;
for (i = 0; i < 6561; i++)
{
fprintf(fp, "%d\n", (INT32)(hori_ver1_data[stage][i] * 10000));
}
for (i = 0; i < 6561; i++)
{
fprintf(fp, "%d\n", (INT32)(hori_ver2_data[stage][i] * 10000));
}
for (i = 0; i < 6561; i++)
{
fprintf(fp, "%d\n", (INT32)(hori_ver3_data[stage][i] * 10000));
}
for (i = 0; i < 6561; i++)
{
fprintf(fp, "%d\n", (INT32)(dia_ver1_data[stage][i] * 10000));
}
for (i = 0; i < 2187; i++)
{
fprintf(fp, "%d\n", (INT32)(dia_ver2_data[stage][i] * 10000));
}
for (i = 0; i < 729; i++)
{
fprintf(fp, "%d\n", (INT32)(dia_ver3_data[stage][i] * 10000));
}
for (i = 0; i < 243; i++)
{
fprintf(fp, "%d\n", (INT32)(dia_ver4_data[stage][i] * 10000));
}
for (i = 0; i < 59049; i++)
{
fprintf(fp, "%d\n", (INT32)(edge_data[stage][i] * 10000));
}
for (i = 0; i < 59049; i++)
{
fprintf(fp, "%d\n", (INT32)(corner5_2_data[stage][i] * 10000));
}
for (i = 0; i < 19683; i++)
{
fprintf(fp, "%d\n", (INT32)(corner3_3_data[stage][i] * 10000));
}
for (i = 0; i < 59049; i++)
{
fprintf(fp, "%d\n", (INT32)(triangle_data[stage][i] * 10000));
}
fprintf(fp, "%d\n", (INT32)(constant_data[stage] * 10000));
#if 0
for (i = 0; i < MOBILITY_NUM; i++)
{
fprintf(fp, "%.4lf\n", mobility_data[stage][i]);
}
for (i = 0; i < PARITY_NUM; i++)
{
fprintf(fp, "%lf\n", parity_data[stage][i]);
}
#endif
fclose(fp);
}
double normalize(double a, UINT64 fcnt, double d){
if (fcnt == 0){
return 0;
}
return a * min((double)0.01, 1 / (double)fcnt) * d;
}
double culcrk(float ** f, USHORT* index)
{
int i;
double et = 0.0;
for (i = 0; i < PATTERN_NUM; i++){
et += f[i][index[i]];
}
et += f[i][0] * (short)index[i];
return et;
}
int table_addr[] = {
0, 4, 8, 12, 14, 18, 22, 26, 30, 34, 38, 42
};
int table_num[] = {
INDEX_NUM, INDEX_NUM, INDEX_NUM, INDEX_NUM,
INDEX_NUM / 3, INDEX_NUM / 9, INDEX_NUM / 27, INDEX_NUM / 81,
INDEX_NUM * 9, INDEX_NUM * 9, INDEX_NUM * 9, INDEX_NUM * 3
};
double culcSum(USHORT* keyIndex, int stage)
{
double eval = 0;
int counter = 0;
eval += hori_ver1_data[stage][keyIndex[counter++]];
eval += hori_ver1_data[stage][keyIndex[counter++]];
eval += hori_ver1_data[stage][keyIndex[counter++]];
eval += hori_ver1_data[stage][keyIndex[counter++]];
eval += hori_ver2_data[stage][keyIndex[counter++]];
eval += hori_ver2_data[stage][keyIndex[counter++]];
eval += hori_ver2_data[stage][keyIndex[counter++]];
eval += hori_ver2_data[stage][keyIndex[counter++]];
eval += hori_ver3_data[stage][keyIndex[counter++]];
eval += hori_ver3_data[stage][keyIndex[counter++]];
eval += hori_ver3_data[stage][keyIndex[counter++]];
eval += hori_ver3_data[stage][keyIndex[counter++]];
eval += dia_ver1_data[stage][keyIndex[counter++]];
eval += dia_ver1_data[stage][keyIndex[counter++]];
eval += dia_ver2_data[stage][keyIndex[counter++]];
eval += dia_ver2_data[stage][keyIndex[counter++]];
eval += dia_ver2_data[stage][keyIndex[counter++]];
eval += dia_ver2_data[stage][keyIndex[counter++]];
eval += dia_ver3_data[stage][keyIndex[counter++]];
eval += dia_ver3_data[stage][keyIndex[counter++]];
eval += dia_ver3_data[stage][keyIndex[counter++]];
eval += dia_ver3_data[stage][keyIndex[counter++]];
eval += dia_ver4_data[stage][keyIndex[counter++]];
eval += dia_ver4_data[stage][keyIndex[counter++]];
eval += dia_ver4_data[stage][keyIndex[counter++]];
eval += dia_ver4_data[stage][keyIndex[counter++]];
eval += edge_data[stage][keyIndex[counter++]];
eval += edge_data[stage][keyIndex[counter++]];
eval += edge_data[stage][keyIndex[counter++]];
eval += edge_data[stage][keyIndex[counter++]];
eval += corner5_2_data[stage][keyIndex[counter++]];
eval += corner5_2_data[stage][keyIndex[counter++]];
eval += corner5_2_data[stage][keyIndex[counter++]];
eval += corner5_2_data[stage][keyIndex[counter++]];
eval += corner5_2_data[stage][keyIndex[counter++]];
eval += corner5_2_data[stage][keyIndex[counter++]];
eval += corner5_2_data[stage][keyIndex[counter++]];
eval += corner5_2_data[stage][keyIndex[counter++]];
eval += corner3_3_data[stage][keyIndex[counter++]];
eval += corner3_3_data[stage][keyIndex[counter++]];
eval += corner3_3_data[stage][keyIndex[counter++]];
eval += corner3_3_data[stage][keyIndex[counter++]];
eval += triangle_data[stage][keyIndex[counter++]];
eval += triangle_data[stage][keyIndex[counter++]];
eval += triangle_data[stage][keyIndex[counter++]];
eval += triangle_data[stage][keyIndex[counter++]];
eval += constant_data[stage];
//eval += mobility_data[stage][keyIndex[counter]];
//eval += parity_data[stage][keyIndex[counter]];
return eval;
}
void culc_d_data(USHORT* keyIndex, double error, double b_error)
{
double eval = 0;
int counter = 0;
hori_ver1_data_d[keyIndex[counter++]] += error + b_error;
hori_ver1_data_d[keyIndex[counter++]] += error + b_error;
hori_ver1_data_d[keyIndex[counter++]] += error + b_error;
hori_ver1_data_d[keyIndex[counter++]] += error + b_error;
hori_ver2_data_d[keyIndex[counter++]] += error + b_error;
hori_ver2_data_d[keyIndex[counter++]] += error + b_error;
hori_ver2_data_d[keyIndex[counter++]] += error + b_error;
hori_ver2_data_d[keyIndex[counter++]] += error + b_error;
hori_ver3_data_d[keyIndex[counter++]] += error + b_error;
hori_ver3_data_d[keyIndex[counter++]] += error + b_error;
hori_ver3_data_d[keyIndex[counter++]] += error + b_error;
hori_ver3_data_d[keyIndex[counter++]] += error + b_error;
dia_ver1_data_d[keyIndex[counter++]] += error + b_error;
dia_ver1_data_d[keyIndex[counter++]] += error + b_error;
dia_ver2_data_d[keyIndex[counter++]] += error + b_error;
dia_ver2_data_d[keyIndex[counter++]] += error + b_error;
dia_ver2_data_d[keyIndex[counter++]] += error + b_error;
dia_ver2_data_d[keyIndex[counter++]] += error + b_error;
dia_ver3_data_d[keyIndex[counter++]] += error + b_error;
dia_ver3_data_d[keyIndex[counter++]] += error + b_error;
dia_ver3_data_d[keyIndex[counter++]] += error + b_error;
dia_ver3_data_d[keyIndex[counter++]] += error + b_error;
dia_ver4_data_d[keyIndex[counter++]] += error + b_error;
dia_ver4_data_d[keyIndex[counter++]] += error + b_error;
dia_ver4_data_d[keyIndex[counter++]] += error + b_error;
dia_ver4_data_d[keyIndex[counter++]] += error + b_error;
edge_data_d[keyIndex[counter++]] += error + b_error;
edge_data_d[keyIndex[counter++]] += error + b_error;
edge_data_d[keyIndex[counter++]] += error + b_error;
edge_data_d[keyIndex[counter++]] += error + b_error;
corner5_2_data_d[keyIndex[counter++]] += error + b_error;
corner5_2_data_d[keyIndex[counter++]] += error + b_error;
corner5_2_data_d[keyIndex[counter++]] += error + b_error;
corner5_2_data_d[keyIndex[counter++]] += error + b_error;
corner5_2_data_d[keyIndex[counter++]] += error + b_error;
corner5_2_data_d[keyIndex[counter++]] += error + b_error;
corner5_2_data_d[keyIndex[counter++]] += error + b_error;
corner5_2_data_d[keyIndex[counter++]] += error + b_error;
corner3_3_data_d[keyIndex[counter++]] += error + b_error;
corner3_3_data_d[keyIndex[counter++]] += error + b_error;
corner3_3_data_d[keyIndex[counter++]] += error + b_error;
corner3_3_data_d[keyIndex[counter++]] += error + b_error;
triangle_data_d[keyIndex[counter++]] += error + b_error;
triangle_data_d[keyIndex[counter++]] += error + b_error;
triangle_data_d[keyIndex[counter++]] += error + b_error;
triangle_data_d[keyIndex[counter++]] += error + b_error;
constant_data_d += error + b_error;
//mobility_data_d[keyIndex[counter]] += (error + b_error);
//parity_data_d[keyIndex[counter]] += error + b_error;
}
void culc_weight(double scale, int stage, int n_sample)
{
int i;
for (i = 0; i < INDEX_NUM; i++)
{
hori_ver1_data[stage][i] += normalize(scale, hori1cnt[i], hori_ver1_data_d[i]) / n_sample;
}
for (i = 0; i < INDEX_NUM; i++)
{
hori_ver2_data[stage][i] += normalize(scale, hori2cnt[i], hori_ver2_data_d[i]) / n_sample;
}
for (i = 0; i < INDEX_NUM; i++)
{
hori_ver3_data[stage][i] += normalize(scale, hori3cnt[i], hori_ver3_data_d[i]) / n_sample;
}
for (i = 0; i < INDEX_NUM; i++)
{
dia_ver1_data[stage][i] += normalize(scale, diag1cnt[i], dia_ver1_data_d[i]) / n_sample;
}
for (i = 0; i < INDEX_NUM / 3; i++)
{
dia_ver2_data[stage][i] += normalize(scale, diag2cnt[i], dia_ver2_data_d[i]) / n_sample;
}
for (i = 0; i < INDEX_NUM / 9; i++)
{
dia_ver3_data[stage][i] += normalize(scale, diag3cnt[i], dia_ver3_data_d[i]) / n_sample;
}
for (i = 0; i < INDEX_NUM / 27; i++)
{
dia_ver4_data[stage][i] += normalize(scale, diag4cnt[i], dia_ver4_data_d[i]) / n_sample;
}
for (i = 0; i < INDEX_NUM * 9; i++)
{
edge_data[stage][i] += normalize(scale, edgecnt[i], edge_data_d[i]) / n_sample;
}
for (i = 0; i < INDEX_NUM * 9; i++)
{
corner5_2_data[stage][i] += normalize(scale, cor52cnt[i], corner5_2_data_d[i]) / n_sample;
}
for (i = 0; i < INDEX_NUM * 3; i++)
{
corner3_3_data[stage][i] += normalize(scale, cor33cnt[i], corner3_3_data_d[i]) / n_sample;
}
for (i = 0; i < INDEX_NUM * 9; i++)
{
triangle_data[stage][i] += normalize(scale, trianglecnt[i], triangle_data_d[i]) / n_sample;
}
constant_data[stage] += normalize(scale, n_sample, constant_data_d) / n_sample;
#if 0
for (i = 0; i < MOBILITY_NUM; i++)
{
mobility_data[stage][i] += normalize(scale, mobcnt[i], mobility_data_d[i]) / n_sample;
}
for (i = 0; i < PARITY_NUM; i++)
{
parity_data[stage][i] += normalize(scale, paritycnt[i], parity_data_d[i]) / n_sample;
}
#endif
}
void Learning(char* t, USHORT* keyIndex, int sample_num, int stage)
{
int k, l, maxloop = 1000;
double ave_error[2] = { 1000, 65536 };
double scalealpha;
double error;
double *b_error;
double errorsum;
char table_file_name[64];
sprintf_s(table_file_name, "table\\%d.dat", stage);
b_error = (double *)malloc(sizeof(double) * sample_num);
memset(b_error, 0x00, sizeof(double) * sample_num);
//printf("scale = %f\n", scalealpha);
/* 最急降下法 */
for (k = 0; (k < maxloop && ave_error[1] - ave_error[0] >(ave_error[1] / (double)1000)); k++){
// ベクトル初期化
memset(hori_ver1_data_d, 0, sizeof(hori_ver1_data_d));
memset(hori_ver2_data_d, 0, sizeof(hori_ver2_data_d));
memset(hori_ver3_data_d, 0, sizeof(hori_ver3_data_d));
memset(dia_ver1_data_d, 0, sizeof(dia_ver1_data_d));
memset(dia_ver2_data_d, 0, sizeof(dia_ver2_data_d));
memset(dia_ver3_data_d, 0, sizeof(dia_ver3_data_d));
memset(dia_ver4_data_d, 0, sizeof(dia_ver4_data_d));
memset(edge_data_d, 0, sizeof(edge_data_d));
memset(corner5_2_data_d, 0, sizeof(corner5_2_data_d));
memset(corner3_3_data_d, 0, sizeof(corner3_3_data_d));
memset(triangle_data_d, 0, sizeof(triangle_data_d));
memset(mobility_data_d, 0, sizeof(mobility_data_d));
//memset(parity_data_d, 0, sizeof(parity_data_d));
errorsum = 0;
/* 局面ごとに誤差を計算 */
for (l = 0; l < sample_num; l++)
{
error = t[l] - culcSum(&keyIndex[l * PATTERN_NUM], stage);
culc_d_data(&keyIndex[l * PATTERN_NUM], error, b_error[l]);
b_error[l] = error * 0.9;
errorsum += (error * error);
}
// 傾きベクトルからそれぞれの特徴の係数を計算
if(stage < 36) scalealpha = 30 * (stage + 1);
else scalealpha = 1000 - ((stage - 36) * 30);
culc_weight(scalealpha, stage, sample_num);
/* 平均誤差の出力 */
if (k % 10 == 0)
{
ave_error[1] = ave_error[0];
ave_error[0] = errorsum / (double)(sample_num);
printf("averrage error = %f\n", ave_error[0]);
if (ave_error[0] >= ave_error[1]) goto END_LEARN;
writeTable(table_file_name, stage);
}
}
free(b_error);
return;
END_LEARN:
free(b_error);
g_AbortFlag = TRUE;
return;
}
int culcEval()
{
/* 教師信号(石差) */
char *t = (char *)malloc(MAX * sizeof(char));
if (t == NULL){
printf("tの領域を確保できませんでした\n");
return 0;
}
/* 1局面ごとの特徴の番号 */
USHORT *keyIndex = (USHORT *)malloc(sizeof(USHORT) * MAX * PATTERN_NUM);
if (keyIndex == NULL){
printf("keyIndexの領域を確保できませんでした\n");
return 0;
}
int stage = 0;
int sum_score = 0;
int rand_flag = FALSE;
g_AbortFlag = FALSE;
game_num1 = 0;
while (stage < 61){
printf("starting %d stage learning...\n", stage);
// 評価パターンテーブル初期化
memset(keyIndex, 0, sizeof(USHORT) * MAX * PATTERN_NUM);
// 評価パターンカウントテーブル初期化
initCountTable();
// 棋譜数初期化
memset(kifuNum, 0, sizeof(kifuNum));
// wtbファイルの読み込みとAsciiへの変換
//game_num1 = convertWtbToAscii(t, keyIndex, stage);
game_num1 = 0;
game_num2 = convertKifuToAscii(&t[game_num1], &keyIndex[game_num1 * PATTERN_NUM], stage);
printf("game:%d\n", game_num1 + game_num2);
// 評価テーブルの作成
Learning(t, keyIndex, game_num1 + game_num2, stage);
if (g_AbortFlag)
{
printf("学習が正常に終了していないステージを検知しました。\n");
break;
}
stage++;
sum_score = 0;
}
free(t);
free(keyIndex);
return 0;
}
int getKifuLine2(char buf[][512])
{
char whorData[6800 * 5], file_name[64];
FILE *rfp;
UINT64 read_len;
int error, count = 0;
sprintf_s(file_name, "kifu\\WTH_%d.wtb", 1976);
if ((error = fopen_s(&rfp, file_name, "rb")) != 0){
return count;
}
fread(whorData, sizeof(char), 16, rfp); //ヘッダ読み捨て
while (count < 500){
read_len = fread(whorData, sizeof(char), 6800 * 5, rfp);
for (int i = 0; i < read_len / 68; i++)
{
if (rand() % 256 == 0){
// ステージごとのパターンを抽出
memcpy_s(&buf[count], 512, &whorData[i * 68 + 7], 68);
count++;
}
}
}
fclose(rfp);
return count;
}
#if 0
void culcExp(int* scoreList, int* resultList)
{
double ave_error[2] = { 65535, 65534 };
int k;
double errorsum, deltafunc, error, et;
double d[500];
double w[2];
/* 最急降下法 */
for (k = 0; k < 5000 && ave_error[1] - ave_error[0] >(ave_error[1] / (double)500); k++){
memset(d, 0, sizeof(float) * 500);
errorsum = 0;
deltafunc = 0;
error = 0;
/* 局面ごとに誤差を計算 */
for (int l = 0; l < 500; l++){
et = 0;
/* 線形誤差を算出 error = Σ(e - e'(w)) */
et = culcFunc(w, scoreList);
error = (resultList[l] - exp(-et)); // t[l] は l番目の教師信号(石差)
errorsum += error * error;
/* 勾配ベクトルの更新 */
for (int i = 0; i < 2; i++){
d[l * 2 + i] += error;
}
}
/* 各得点を更新 */
for (int l = 0; l < 500; l++){
for (int i = 0; i < 2; i++) {
/* 勾配ベクトルの微分係数 */
/* パラメータ更新 */
w[i] += normalize(0.05, d[l * PATTERN_NUM + i]);
}
//feature[i][0] += scalealpha * 1 / (float)featureCount[i][0] * d[l * PATTERN_NUM + i];
}
/* 平均誤差の出力 */
if (k % 10 == 0)
{
//printf("%d/%d\n", k, maxloop);
//fopen_s(&fp, trace_file_name, "a+");
ave_error[1] = ave_error[0];
ave_error[0] = errorsum / (double)(sample_num);
//fprintf_s(fp, "平均2乗誤差= %f\n", ave_error[0]);
printf("averrage error = %f\n", ave_error[0]);
//fclose(fp);
writeTable(table_file_name, feature);
}
}
free(d);
}
#endif
void GenerateKifu()
{
}
int _tmain(int argc, _TCHAR* argv[])
{
BOOL result;
result = AlocMobilityFunc();
culcEval();
//CulclationMpcValue();
//CulclationMpcValue_End();
//GenerateKifu( );
return 0;
}
| [
"kazura2008@gmail.com"
] | kazura2008@gmail.com |
6e781191086b59ecf575c542f00e27bcd6b800b5 | c2e97b1aacb1e9a7a925b60129d7171a17d4d4d8 | /libs/tbb44_20150728oss/include/tbb/scalable_allocator.h | 42472cee1965c631f3b2307bce922270bcc420a1 | [
"Zlib",
"mif-exception",
"GPL-1.0-or-later",
"GPL-2.0-only"
] | permissive | Ushio/ofxExtremeGpuVideo | 1500ba6fd57e9bca3400ebfc005e1338138345a0 | 0842679c0cba590cc13f4a401887e8e3a3a3311c | refs/heads/master | 2022-05-04T17:36:10.936866 | 2022-04-22T05:50:17 | 2022-04-22T05:50:17 | 55,229,467 | 63 | 7 | Zlib | 2022-04-22T05:50:17 | 2016-04-01T12:06:13 | C++ | UTF-8 | C++ | false | false | 12,129 | h | /*
Copyright 2005-2015 Intel Corporation. All Rights Reserved.
This file is part of Threading Building Blocks. Threading Building Blocks is free software;
you can redistribute it and/or modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation. Threading Building Blocks 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 Threading Building Blocks; if not, write to the
Free Software Foundation, Inc., 51 Franklin St, 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.
*/
#ifndef __TBB_scalable_allocator_H
#define __TBB_scalable_allocator_H
/** @file */
#include <stddef.h> /* Need ptrdiff_t and size_t from here. */
#if !_MSC_VER
#include <stdint.h> /* Need intptr_t from here. */
#endif
#if !defined(__cplusplus) && __ICC==1100
#pragma warning (push)
#pragma warning (disable: 991)
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#if _MSC_VER >= 1400
#define __TBB_EXPORTED_FUNC __cdecl
#else
#define __TBB_EXPORTED_FUNC
#endif
/** The "malloc" analogue to allocate block of memory of size bytes.
* @ingroup memory_allocation */
void * __TBB_EXPORTED_FUNC scalable_malloc (size_t size);
/** The "free" analogue to discard a previously allocated piece of memory.
@ingroup memory_allocation */
void __TBB_EXPORTED_FUNC scalable_free (void* ptr);
/** The "realloc" analogue complementing scalable_malloc.
@ingroup memory_allocation */
void * __TBB_EXPORTED_FUNC scalable_realloc (void* ptr, size_t size);
/** The "calloc" analogue complementing scalable_malloc.
@ingroup memory_allocation */
void * __TBB_EXPORTED_FUNC scalable_calloc (size_t nobj, size_t size);
/** The "posix_memalign" analogue.
@ingroup memory_allocation */
int __TBB_EXPORTED_FUNC scalable_posix_memalign (void** memptr, size_t alignment, size_t size);
/** The "_aligned_malloc" analogue.
@ingroup memory_allocation */
void * __TBB_EXPORTED_FUNC scalable_aligned_malloc (size_t size, size_t alignment);
/** The "_aligned_realloc" analogue.
@ingroup memory_allocation */
void * __TBB_EXPORTED_FUNC scalable_aligned_realloc (void* ptr, size_t size, size_t alignment);
/** The "_aligned_free" analogue.
@ingroup memory_allocation */
void __TBB_EXPORTED_FUNC scalable_aligned_free (void* ptr);
/** The analogue of _msize/malloc_size/malloc_usable_size.
Returns the usable size of a memory block previously allocated by scalable_*,
or 0 (zero) if ptr does not point to such a block.
@ingroup memory_allocation */
size_t __TBB_EXPORTED_FUNC scalable_msize (void* ptr);
/* Results for scalable_allocation_* functions */
typedef enum {
TBBMALLOC_OK,
TBBMALLOC_INVALID_PARAM,
TBBMALLOC_UNSUPPORTED,
TBBMALLOC_NO_MEMORY,
TBBMALLOC_NO_EFFECT
} ScalableAllocationResult;
/* Setting TBB_MALLOC_USE_HUGE_PAGES environment variable to 1 enables huge pages.
scalable_allocation_mode call has priority over environment variable. */
typedef enum {
TBBMALLOC_USE_HUGE_PAGES, /* value turns using huge pages on and off */
/* deprecated, kept for backward compatibility only */
USE_HUGE_PAGES = TBBMALLOC_USE_HUGE_PAGES,
/* try to limit memory consumption value Bytes, clean internal buffers
if limit is exceeded, but not prevents from requesting memory from OS */
TBBMALLOC_SET_SOFT_HEAP_LIMIT
} AllocationModeParam;
/** Set TBB allocator-specific allocation modes.
@ingroup memory_allocation */
int __TBB_EXPORTED_FUNC scalable_allocation_mode(int param, intptr_t value);
typedef enum {
/* Clean internal allocator buffers for all threads.
Returns TBBMALLOC_NO_EFFECT if no buffers cleaned,
TBBMALLOC_OK if some memory released from buffers. */
TBBMALLOC_CLEAN_ALL_BUFFERS,
/* Clean internal allocator buffer for current thread only.
Return values same as for TBBMALLOC_CLEAN_ALL_BUFFERS. */
TBBMALLOC_CLEAN_THREAD_BUFFERS
} ScalableAllocationCmd;
/** Call TBB allocator-specific commands.
@ingroup memory_allocation */
int __TBB_EXPORTED_FUNC scalable_allocation_command(int cmd, void *param);
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
#ifdef __cplusplus
//! The namespace rml contains components of low-level memory pool interface.
namespace rml {
class MemoryPool;
typedef void *(*rawAllocType)(intptr_t pool_id, size_t &bytes);
// returns non-zero in case of error
typedef int (*rawFreeType)(intptr_t pool_id, void* raw_ptr, size_t raw_bytes);
/*
MemPoolPolicy extension must be compatible with such structure fields layout
struct MemPoolPolicy {
rawAllocType pAlloc;
rawFreeType pFree;
size_t granularity; // granularity of pAlloc allocations
};
*/
struct MemPoolPolicy {
enum {
TBBMALLOC_POOL_VERSION = 1
};
rawAllocType pAlloc;
rawFreeType pFree;
// granularity of pAlloc allocations. 0 means default used.
size_t granularity;
int version;
// all memory consumed at 1st pAlloc call and never returned,
// no more pAlloc calls after 1st
unsigned fixedPool : 1,
// memory consumed but returned only at pool termination
keepAllMemory : 1,
reserved : 30;
MemPoolPolicy(rawAllocType pAlloc_, rawFreeType pFree_,
size_t granularity_ = 0, bool fixedPool_ = false,
bool keepAllMemory_ = false) :
pAlloc(pAlloc_), pFree(pFree_), granularity(granularity_), version(TBBMALLOC_POOL_VERSION),
fixedPool(fixedPool_), keepAllMemory(keepAllMemory_),
reserved(0) {}
};
// enums have same values as appropriate enums from ScalableAllocationResult
// TODO: use ScalableAllocationResult in pool_create directly
enum MemPoolError {
// pool created successfully
POOL_OK = TBBMALLOC_OK,
// invalid policy parameters found
INVALID_POLICY = TBBMALLOC_INVALID_PARAM,
// requested pool policy is not supported by allocator library
UNSUPPORTED_POLICY = TBBMALLOC_UNSUPPORTED,
// lack of memory during pool creation
NO_MEMORY = TBBMALLOC_NO_MEMORY,
// action takes no effect
NO_EFFECT = TBBMALLOC_NO_EFFECT
};
MemPoolError pool_create_v1(intptr_t pool_id, const MemPoolPolicy *policy,
rml::MemoryPool **pool);
bool pool_destroy(MemoryPool* memPool);
void *pool_malloc(MemoryPool* memPool, size_t size);
void *pool_realloc(MemoryPool* memPool, void *object, size_t size);
void *pool_aligned_malloc(MemoryPool* mPool, size_t size, size_t alignment);
void *pool_aligned_realloc(MemoryPool* mPool, void *ptr, size_t size, size_t alignment);
bool pool_reset(MemoryPool* memPool);
bool pool_free(MemoryPool *memPool, void *object);
MemoryPool *pool_identify(void *object);
}
#include <new> /* To use new with the placement argument */
/* Ensure that including this header does not cause implicit linkage with TBB */
#ifndef __TBB_NO_IMPLICIT_LINKAGE
#define __TBB_NO_IMPLICIT_LINKAGE 1
#include "tbb_stddef.h"
#undef __TBB_NO_IMPLICIT_LINKAGE
#else
#include "tbb_stddef.h"
#endif
#if __TBB_ALLOCATOR_CONSTRUCT_VARIADIC
#include <utility> // std::forward
#endif
namespace tbb {
#if _MSC_VER && !defined(__INTEL_COMPILER)
// Workaround for erroneous "unreferenced parameter" warning in method destroy.
#pragma warning (push)
#pragma warning (disable: 4100)
#endif
//! @cond INTERNAL
namespace internal {
#if TBB_USE_EXCEPTIONS
// forward declaration is for inlining prevention
template<typename E> __TBB_NOINLINE( void throw_exception(const E &e) );
#endif
// keep throw in a separate function to prevent code bloat
template<typename E>
void throw_exception(const E &e) {
__TBB_THROW(e);
}
} // namespace internal
//! @endcond
//! Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5
/** The members are ordered the same way they are in section 20.4.1
of the ISO C++ standard.
@ingroup memory_allocation */
template<typename T>
class scalable_allocator {
public:
typedef typename internal::allocator_type<T>::value_type value_type;
typedef value_type* pointer;
typedef const value_type* const_pointer;
typedef value_type& reference;
typedef const value_type& const_reference;
typedef size_t size_type;
typedef ptrdiff_t difference_type;
template<class U> struct rebind {
typedef scalable_allocator<U> other;
};
scalable_allocator() throw() {}
scalable_allocator( const scalable_allocator& ) throw() {}
template<typename U> scalable_allocator(const scalable_allocator<U>&) throw() {}
pointer address(reference x) const {return &x;}
const_pointer address(const_reference x) const {return &x;}
//! Allocate space for n objects.
pointer allocate( size_type n, const void* /*hint*/ =0 ) {
pointer p = static_cast<pointer>( scalable_malloc( n * sizeof(value_type) ) );
if (!p)
internal::throw_exception(std::bad_alloc());
return p;
}
//! Free previously allocated block of memory
void deallocate( pointer p, size_type ) {
scalable_free( p );
}
//! Largest value for which method allocate might succeed.
size_type max_size() const throw() {
size_type absolutemax = static_cast<size_type>(-1) / sizeof (value_type);
return (absolutemax > 0 ? absolutemax : 1);
}
#if __TBB_ALLOCATOR_CONSTRUCT_VARIADIC
template<typename U, typename... Args>
void construct(U *p, Args&&... args)
{ ::new((void *)p) U(std::forward<Args>(args)...); }
#else // __TBB_ALLOCATOR_CONSTRUCT_VARIADIC
#if __TBB_CPP11_RVALUE_REF_PRESENT
void construct( pointer p, value_type&& value ) { ::new((void*)(p)) value_type( std::move( value ) ); }
#endif
void construct( pointer p, const value_type& value ) {::new((void*)(p)) value_type(value);}
#endif // __TBB_ALLOCATOR_CONSTRUCT_VARIADIC
void destroy( pointer p ) {p->~value_type();}
};
#if _MSC_VER && !defined(__INTEL_COMPILER)
#pragma warning (pop)
#endif // warning 4100 is back
//! Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1
/** @ingroup memory_allocation */
template<>
class scalable_allocator<void> {
public:
typedef void* pointer;
typedef const void* const_pointer;
typedef void value_type;
template<class U> struct rebind {
typedef scalable_allocator<U> other;
};
};
template<typename T, typename U>
inline bool operator==( const scalable_allocator<T>&, const scalable_allocator<U>& ) {return true;}
template<typename T, typename U>
inline bool operator!=( const scalable_allocator<T>&, const scalable_allocator<U>& ) {return false;}
} // namespace tbb
#if _MSC_VER
#if (__TBB_BUILD || __TBBMALLOC_BUILD) && !defined(__TBBMALLOC_NO_IMPLICIT_LINKAGE)
#define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1
#endif
#if !__TBBMALLOC_NO_IMPLICIT_LINKAGE
#ifdef _DEBUG
#pragma comment(lib, "tbbmalloc_debug.lib")
#else
#pragma comment(lib, "tbbmalloc.lib")
#endif
#endif
#endif
#endif /* __cplusplus */
#if !defined(__cplusplus) && __ICC==1100
#pragma warning (pop)
#endif // ICC 11.0 warning 991 is back
#endif /* __TBB_scalable_allocator_H */
| [
"ushiostarfish@gmail.com"
] | ushiostarfish@gmail.com |
4a75ba896830a837a64812b4300ed543f937fe79 | 6f15cc1c4bdd38b5fdc8f54f61a58aee014cb57b | /Source/InteractableObjects/IO_PickupObject.h | 76bf8fcf3bb5f25bd8a642bd52fc9126135f5cbb | [] | no_license | Solicio/HomeInvasion | 1ae86f592ad6a817cabe7b4d1a79da500463400d | 23d8af81f20b40810978ec72e46bc1e849c8dd13 | refs/heads/master | 2021-01-21T10:22:33.000274 | 2017-02-28T10:30:35 | 2017-02-28T10:30:35 | 83,419,680 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,050 | h | // Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "Perception/AISense_Hearing.h"
#include "Perception/AIPerceptionStimuliSourceComponent.h"
#include "InteractableObject.h"
#include "IO_PickupObject.generated.h"
/** Struct of the GUID and location of saved/loaded pickup object */
USTRUCT(BlueprintType)
struct FPickupObjectSaveSlot
{
GENERATED_BODY()
// The GUID of the object
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Struct")
FGuid GUID;
// The objects transform
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Struct")
FTransform Transform;
};
/**
*
*/
UCLASS()
class HOMEINVASION_API AIO_PickupObject : public AInteractableObject
{
GENERATED_BODY()
public:
/** Sets default values for this actor's properties */
AIO_PickupObject(const FObjectInitializer& ObjectInitializer);
// Used to register for senses and to report noise events.
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "General")
UAIPerceptionStimuliSourceComponent* StimuliSourceComp;
/** Interact with the object, when the player is looking at the object (Default LMB) */
UFUNCTION(BlueprintCallable, Category = "Object Functions")
virtual void Interact(AActor* InteractingActor) override;
// If the player is currently holding the object
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pickup Variables")
bool PlayerHeld;
// If the object has entered a stationary state, not simulating physics.
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pickup Variables")
bool Stationary;
// If the object has been thrown by the player, turned to false when colliding
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pickup Variables")
bool Thrown;
// If the objects has move from the spawn location
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pickup Variables")
bool HasBeenMoved;
// The current speed the object is moving at
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pickup Variables")
float ObjectSpeed;
// This value will lower the object relative to the players camera, the taller the object is, the higher this value should be.
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pickup Variables")
float PlayerCameraDownZ;
//---- Noise and Sound ----//
// Time needed to pass betweem playing sound effect
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pickup Variables")
float SoundCooldown;
// Time needed to pass betweem playing AI Noise
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pickup Variables")
float NoiseCooldown;
// Value used when counting down the noise cooldown
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pickup Variables")
float NoiseCDCountdown;
// The strength of the noise made when colliding after being thrown
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pickup Variables")
float ThrownNoiseStrength;
// The strength of the noise made when colliding normally
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pickup Variables")
float CollisionNoiseStrength;
/** Used to activate the currently selected element on the phone */
UFUNCTION(BlueprintCallable, Category = "Noise")
void CreateNoise(FVector Location, float Loudness);
/** Called when the object collides with something */
UFUNCTION(BlueprintImplementableEvent, Category = "Object Functions")
void Collision(bool WasThrown, float Speed, bool HitEnemy);
/** Called when the object should play an audio clip */
UFUNCTION(BlueprintImplementableEvent, Category = "Object Functions")
void PlaySound(float Speed);
protected:
float SoundCDCountdown;
float DurationNotMoving;
/** Called when the game starts or when spawned */
virtual void BeginPlay() override;
/** Called every frame */
virtual void Tick(float DeltaSeconds) override;
UFUNCTION()
void HitOtherActor(AActor* SelfActor, AActor* OtherActor, FVector NormalImpulse, const FHitResult& Hit);
};
| [
"JoarHedvall@gmail.com"
] | JoarHedvall@gmail.com |
4b91ccf088947dd3fdcd8c478db97faf78f10c05 | 02be3e052d5ff61b84aea724c2fbbef5ee90c0c9 | /images_change/images_change.cpp | 3f23f5914360eca972688ebae935b684d038f2e2 | [] | no_license | DongZhouGu/qt-vision | 0b1ab74ceae0287741e16f3a1c458adea25fa857 | 08d739e57a6896e88560f880854378797b5220c8 | refs/heads/master | 2023-01-03T16:56:44.870737 | 2020-11-01T15:24:45 | 2020-11-01T15:24:45 | 309,117,447 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 216 | cpp | #include "images_change.h"
/*构造函数*/
Images_Change::Images_Change()
{
}
/*报警灯切换图片的方法*/
char* Images_Change::lightChange(int index){
return(lights[index]); //返回图片的路径
}
| [
"gdz678@163.com"
] | gdz678@163.com |
83a9411e42cb432a5e2334d091b50f46158ee8f0 | 30bdd8ab897e056f0fb2f9937dcf2f608c1fd06a | /CodesNew/769.cpp | 7eec8cdb3a38b36fc996c8c7e683e13de18d81b9 | [] | 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 | 593 | cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define MAXN 1010
const int mod = 1e9 + 7;
const ll INF = 1e18;
string a[MAXN], b[MAXN];
set<string> s1, s2;
int main()
{
//freopen("in.txt", "r", stdin);
//freopen("out.txt", "w", stdout);
int n, m;
cin >> n >> m;
for (int i = 1; i <= n; ++i)
cin >> a[i], s1.insert(a[i]);
for (int i = 1; i <= m; ++i)
cin >> b[i], s2.insert(b[i]);
int k = 0;
for (int i = 1; i <= n; ++i)
if (s2.count(a[i])) ++k;
n -= k, m -= k;
if (k & 1) puts(n >= m? "YES":"NO");
else puts(n > m? "YES":"NO");
return 0;
} | [
"harshitagar1907@gmail.com"
] | harshitagar1907@gmail.com |
e291bc019cdaabe2441deca88d7bb4a583e518e3 | ca84490c8fe9c5ee77f3abf5ffad9379b95a0abb | /2019.1/2019.01.24/source/wuyongtong/c/c.cpp | 88a1f1194f28ae96f2ea3a5f04338d13222fe600 | [
"ICU",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | LoganJoe/training-data | 1df9dc6ef730f6c6a0130f50caed19556f5e1f87 | b77b8e7271dcb73ce96c5236c433ce557e0e16f0 | refs/heads/master | 2021-10-26T03:17:44.883996 | 2019-04-10T06:39:01 | 2019-04-10T06:39:01 | 178,348,836 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 659 | cpp | #include <cstdio>
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
const int N = 1e5 + 10;
int c[N][2],v[N],n,T;
int main() {
// freopen("c.in","r",stdin);
for (cin>>T;T;T--) {
memset(c,0,sizeof c);
memset(v,0,sizeof v);
cin>>n;
for (int i = 1; i <= n; i++) {
scanf("%d",&v[i]);
if (v[i] == -1) {
scanf("%d %d",&c[i][0],&c[i][1]);
}
}
int od=0;
for (int i = n-3; i; i-=2) {
if (!od) v[i] = max(v[c[i][0]],v[c[i][1]]);
else v[i] = min(v[c[i][0]],v[c[i][1]]);
od=1-od;
}
if (!od) v[1] = max(v[c[1][0]],v[c[1][1]]);
else v[1] = min(v[c[1][0]],v[c[1][1]]);
printf("%d\n",v[1]);
}
}
| [
"1292382664@qq.com"
] | 1292382664@qq.com |
c3c35773b3991213cd5b8d8948afe54fa75a44ff | 726cc73c0eefda58ab7db380c7fea3f436ddb862 | /BattleTank/Source/BattleTank/Public/TankTurret.h | 3c642da93395f3be8a484775e252307c102cd6fd | [] | no_license | Sooreal/04_BattleTank | 48ae2d4137c1267c9b1501205d3cc7e38022de8d | b9ea9904081c11bd4fa3b27a36f514583f0fa5ed | refs/heads/master | 2021-01-22T18:28:43.802594 | 2017-04-21T10:53:02 | 2017-04-21T10:53:02 | 85,085,020 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 578 | h | // Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "Components/StaticMeshComponent.h"
#include "TankTurret.generated.h"
/**
*
*/
UCLASS(meta = (BlueprintSpawnableComponent)/*, hidecategories = ("Collision")*/)
class BATTLETANK_API UTankTurret : public UStaticMeshComponent
{
GENERATED_BODY()
public:
//-1 is max speed in one direction and +1 is max in other direction
void Rotate(float RelativeSpeed);
private:
UPROPERTY(EditAnywhere, Category = "Setup")
float MaxDegreesPerSecond = 20; //Sensible default
};
| [
"milosdimcic@yahoo.com"
] | milosdimcic@yahoo.com |
12996a05dcf1f7d9d3b6e105fa4297a589d31c12 | 66f5e37f75db29a6e5b9151d164c87cf32457d10 | /CodeJam2012/Qualification Round/DancingWithTheGooglers/DancingWithTheGooglers/main.cpp | 6a674c2652b3700fdc00f1e9defe5044eef81e62 | [] | no_license | Jakub-Kuczkowiak/Contests | 965aa1a943c1a73d376124804b73c02d7a7f5356 | 14805753ef68c21ff05fdc95f635a6fd6fbd7531 | refs/heads/master | 2020-03-26T20:57:23.509244 | 2018-10-01T23:13:27 | 2018-10-01T23:13:27 | 145,357,201 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 877 | cpp | #include <iostream>
using namespace std;
int main() {
int T;
cin >> T;
for (int t = 1; t <= T; t++) {
int N;
cin >> N;
int S;
cin >> S;
int p;
cin >> p;
int sums[101] = {};
for (int i = 0; i < N; i++) {
cin >> sums[i];
}
int answer = 0;
// we go through each triplet
for (int i = 0; i < N; i++) {
if (sums[i] % 3 == 0) {
int max = sums[i] / 3;
if (max >= p) {
answer++;
}
else if (S > 0 && max + 1 >= p && sums[i] > 1) {
answer++;
S--;
}
}
else if (sums[i] % 3 == 1) {
int max = (sums[i] / 3) + 1;
if (max >= p) {
answer++;
}
}
else {
int max = (sums[i] / 3) + 1;
if (max >= p) {
answer++;
}
else if (S > 0 && max + 1 >= p && sums[i] > 1) {
answer++;
S--;
}
}
}
cout << "Case #" << t << ": " << answer << endl;
}
return 0;
} | [
"jakubkuczkowiak@gmail.com"
] | jakubkuczkowiak@gmail.com |
a8d43d8e19d32239cedbc4667375bbfa69c07f5c | 80581441fe63a047e3d9961ea706b0b4f2199daa | /10.11/3.h | 8d4cff320c18fa2098c865832e3cfc5acd55fa2e | [] | no_license | weijunzhou/c_and_pointer | dfbe69f9156f365a389fc9b3ebdad9be33c16b1c | 09efaf74414196ef4c3e7fdae76ddcfd7e46444f | refs/heads/master | 2020-12-20T14:57:33.520590 | 2016-08-08T15:42:34 | 2016-08-08T15:42:34 | 51,679,615 | 0 | 0 | null | 2016-02-14T04:51:11 | 2016-02-14T04:29:29 | null | UTF-8 | C++ | false | false | 981 | h | /*************************************************************************
> File Name: 3.h
> Author: weijun
> Mail: 20044439@163.com
> Created Time: 2016年08月 2日 11:02:48
************************************************************************/
#include<iostream>
using namespace std;
struct MISC{
unsigned short opcode;
};
struct REG_SRC{
unsigned short opcode:7;
unsigned short src_reg:3;
unsigned short dst_mode:3;
unsigned short dst_reg:3;
};
struct BRANCH{
unsigned char opcode;
unsigned char offset;
};
struct SGL_OP{
unsigned short opcode:10;
unsigned short dst_mode:3;
unsigned short dst_reg:3;
};
struct DBL_OP{
unsigned short opcode:4;
unsigned short src_mode:3;
unsigned short src_reg:3;
unsigned short dst_mode:3;
unsigned short dst_reg:3;
};
typedef struct{
unsigned short addr;
unsigned short type;
union{
struct MISC misc;
struct REG_SEC reg_src;
struct BRANCH branch;
struct DBL_OP dbl_op;
struct SGL_OP sgl_op;
}cmd;
};
| [
"周卫军"
] | 周卫军 |
1b5d5571ef8d0978bae06160ef2c8ff9cb8c188c | 4e7264b1149f6edf73d0cf2e36115d0ebe6b0c41 | /图书管理系统2/_interface.h | 94e417365ae497ad3d733384f4b57ccc347688ce | [
"MIT"
] | permissive | LHTcode/LibrarySyestem | e6825fcce9df36efea8a42ec473c584c7de78f64 | cc810a962c5a6f78dc83e4e2f6eafa288910d1ba | refs/heads/main | 2023-08-25T03:32:53.105547 | 2021-10-07T03:41:44 | 2021-10-07T03:41:44 | 328,723,181 | 2 | 0 | null | null | null | null | GB18030 | C++ | false | false | 721 | h | #pragma once
class _interface
{
public:
std::string& FirstChoose();
void Reader_Sign_Interface();
void Administrator_Sign_Interface();
/*读者用户界面*/
void ReaderInterface();
/*管理员用户界面*/
void AdministratorInterface();
/*登陆后的用户选择*/
void ReaderChoose();
/*登陆后的用户选择*/
void AdministratorChoose();
/*返回上一级目录函数*/
/*****我希望能够实现不分大小写的功能,寒假想想办法*****/
static void Exit(short, std::string str); //用于读者管理员界面选择退出
static void Exit(short, short, std::string str);//用于用户登录界面退出
static void autoExit(short,short); //返回到用户选择界面
}; | [
"LHT13535837097@163.com"
] | LHT13535837097@163.com |
4affa9194c4fcfaa1a02ee4fccba89d0ab9ae77e | 34b54622f906738e97bd8861cdb152f30e6e961d | /Memory/mem-instance_returner.h | 082b41bfd66c6b917faed6cc9cd9f8d178ce0cf2 | [] | no_license | hsb0818/game_engine | 67fa504427b07cf175fbd91a45eb4e49b6b5b446 | 551c0a2391829df92217b5d00ee236273994cae8 | refs/heads/master | 2020-03-09T04:46:21.783330 | 2018-04-08T04:02:10 | 2018-04-08T04:02:10 | 128,595,248 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 926 | h | #ifndef _MEM_INSTANCE_RETURNER_
#define _MEM_INSTANCE_RETURNER_
using namespace SOC_Memory;
static MemoryPool<MIN_EXP, MAX_EXP, BUFFER_SIZE>& R_MEMORYPOOL()
{
return MemoryPool<MIN_EXP, MAX_EXP, BUFFER_SIZE>::GetInstance();
}
namespace SOC_Memory {
class BaseMP
{
public:
BaseMP() {}
virtual ~BaseMP() {}
public:
void* operator new(size_t size)
{
if (size == 0)
return nullptr;
printf("%d - allocated\n", size);
return R_MEMORYPOOL().Alloc(size);
}
void* operator new[](size_t size)
{
if (size == 0)
return nullptr;
printf("%d - allocated\n", size);
return R_MEMORYPOOL().Alloc(size);
}
void operator delete(void* p)
{
if (p == nullptr)
return;
printf("%p - delete\n", p);
R_MEMORYPOOL().Free(p);
}
void operator delete[](void* p)
{
if (p == nullptr)
return;
printf("%p - delete\n", p);
R_MEMORYPOOL().Free(p);
}
};
}
#endif | [
"hsb0818@gmail.com"
] | hsb0818@gmail.com |
691895ac4cc61bdfcadcb73501a8f87f8c5f9eb9 | 002fd16f468b5185348d33432e943ad308b64534 | /Bluetooth Low Energy (LE) Generic Attribute (GATT) Profile Drivers/Solution/helpers.h | d8ed95b2f1599b923e5a70d76033bc1b080c9240 | [] | no_license | lisq789/wdk80 | 62d2e134f13236fe1766e4664ee67664626aadcb | 67e3dc8fada017ff2f49fefb9ac670a955a27e36 | refs/heads/master | 2023-03-18T18:35:56.813973 | 2013-09-21T15:44:56 | 2013-09-21T15:44:56 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 14,334 | h | /*++
Copyright (c) Microsoft Corporation. All rights reserved.
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.
Module Name:
Helpers.h
Abstract:
--*/
#pragma once
#ifndef SAFE_RELEASE
#define SAFE_RELEASE(p) if( NULL != p ) { ( p )->Release(); p = NULL; }
#endif
// {CDD18979-A7B0-4D5E-9EB2-0A826805CBBD}
DEFINE_PROPERTYKEY(PRIVATE_SAMPLE_DRIVER_WUDF_DEVICE_OBJECT, 0xCDD18979, 0xA7B0, 0x4D5E, 0x9E, 0xB2, 0x0A, 0x82, 0x68, 0x05, 0xCB, 0xBD, 2);
// {9BD949E5-59CF-41AE-90A9-BE1D044F578F}
DEFINE_PROPERTYKEY(PRIVATE_SAMPLE_DRIVER_WPD_SERIALIZER_OBJECT, 0x9BD949E5, 0x59CF, 0x41AE, 0x90, 0xA9, 0xBE, 0x1D, 0x04, 0x4F, 0x57, 0x8F, 2);
// {4DF6C8C7-2CE5-457C-9F53-EFCECAA95C04}
DEFINE_PROPERTYKEY(PRIVATE_SAMPLE_DRIVER_CLIENT_CONTEXT_MAP, 0x4DF6C8C7, 0x2CE5, 0x457C, 0x9F, 0x53, 0xEF, 0xCE, 0xCA, 0xA9, 0x5C, 0x04, 2);
// {67BA8D9E-1DC4-431C-B89C-9D03F7D8C223}
DEFINE_PROPERTYKEY(PRIVATE_SAMPLE_DRIVER_REQUEST_FILENAME, 0x67BA8D9E, 0x1DC4, 0x431C, 0xB8, 0x9C, 0x9D, 0x03, 0xF7, 0xD8, 0xC2, 0x23, 2);
// Access Scope is a bit mask, where each bit enables access to a particular scope
// for example, Bluetooth GATT Service is bit 1.
// The next scope, if any, will be in bit 2
// Full device access is a combination of all, requires all bits to be set
typedef enum tagACCESS_SCOPE
{
BLUETOOTH_GATT_SERVICE_ACCESS = 1,
FULL_DEVICE_ACCESS = 0xFFFFFFFF
}ACCESS_SCOPE;
typedef enum tagDevicePropertyAttributesType
{
UnspecifiedForm_CanRead_CanWrite_CannotDelete_Fast,
UnspecifiedForm_CanRead_CannotWrite_CannotDelete_Fast,
} DevicePropertyAttributesType;
typedef struct tagPropertyAttributeInfo
{
const PROPERTYKEY* pKey;
VARTYPE Vartype;
DevicePropertyAttributesType AttributesType;
PCWSTR wszName;
} PropertyAttributeInfo;
typedef struct tagMethodtAttributeInfo
{
const GUID* pMethodGuid;
PCWSTR wszName;
ULONG ulMethodAttributeAccess;
} MethodAttributeInfo;
typedef struct tagMethodParameterAttributeInfo
{
const GUID* pMethodGuid;
const PROPERTYKEY* pParameter;
VARTYPE Vartype;
WPD_PARAMETER_USAGE_TYPES UsageType;
WpdParameterAttributeForm Form;
DWORD Order;
PCWSTR wszName;
} MethodParameterAttributeInfo;
typedef struct tagEventAttributeInfo
{
const GUID* pEventGuid;
PCWSTR wszName;
} EventAttributeInfo;
typedef struct tagEventParameterAttributeInfo
{
const GUID* pEventGuid;
const PROPERTYKEY* pParameter;
VARTYPE Vartype;
} EventParameterAttributeInfo;
typedef struct tagFormatAttributeInfo
{
const GUID* pFormatGuid;
PCWSTR wszName;
} FormatAttributeInfo;
FORCEINLINE
VOID
InitializeListHead(
_Out_ PLIST_ENTRY ListHead
)
{
ListHead->Flink = ListHead->Blink = ListHead;
}
FORCEINLINE
BOOLEAN
RemoveEntryList(
_In_ PLIST_ENTRY Entry
)
{
PLIST_ENTRY Blink;
PLIST_ENTRY Flink;
Flink = Entry->Flink;
Blink = Entry->Blink;
Blink->Flink = Flink;
Flink->Blink = Blink;
return (BOOLEAN)(Flink == Blink);
}
FORCEINLINE
PLIST_ENTRY
RemoveHeadList(
_Inout_ PLIST_ENTRY ListHead
)
{
PLIST_ENTRY Flink;
PLIST_ENTRY Entry;
Entry = ListHead->Flink;
Flink = Entry->Flink;
ListHead->Flink = Flink;
Flink->Blink = ListHead;
return Entry;
}
FORCEINLINE
VOID
InsertTailList(
_Inout_ PLIST_ENTRY ListHead,
_Inout_ __drv_aliasesMem PLIST_ENTRY Entry
)
{
PLIST_ENTRY Blink;
Blink = ListHead->Blink;
Entry->Flink = ListHead;
Entry->Blink = Blink;
Blink->Flink = Entry;
ListHead->Blink = Entry;
}
FORCEINLINE
VOID
InsertHeadList(
_Inout_ PLIST_ENTRY ListHead,
_Inout_ __drv_aliasesMem PLIST_ENTRY Entry
)
{
PLIST_ENTRY Flink;
Flink = ListHead->Flink;
Entry->Flink = Flink;
Entry->Blink = ListHead;
Flink->Blink = Entry;
ListHead->Flink = Entry;
}
BOOLEAN
FORCEINLINE
IsListEmpty(
_In_ const LIST_ENTRY * ListHead
)
{
return (BOOLEAN)(ListHead->Flink == ListHead);
}
HRESULT
GetDeviceAddressFromDevice(
_In_ IWDFDevice * Device,
_Out_ PBTH_ADDR pBthAddr
);
class ContextMap : public IUnknown
{
public:
ContextMap(WpdBaseDriver * pWpdBaseDriver);
~ContextMap();
public: // IUnknown
ULONG __stdcall AddRef()
{
InterlockedIncrement((long*) &m_cRef);
return m_cRef;
}
_At_(this, __drv_freesMem(Mem))
ULONG __stdcall Release()
{
ULONG ulRefCount = m_cRef - 1;
if (InterlockedDecrement((long*) &m_cRef) == 0)
{
delete this;
return 0;
}
return ulRefCount;
}
HRESULT __stdcall QueryInterface(
REFIID riid,
void** ppv)
{
HRESULT hr = S_OK;
if(riid == IID_IUnknown)
{
*ppv = static_cast<IUnknown*>(this);
AddRef();
}
else
{
*ppv = NULL;
hr = E_NOINTERFACE;
}
return hr;
}
public: // Context accessor methods
// If successful, this method AddRef's the context and returns
// a context key
HRESULT Add(
_In_ IUnknown* pContext,
_Inout_ CAtlStringW& key)
{
CComCritSecLock<CComAutoCriticalSection> Lock(m_CriticalSection);
HRESULT hr = S_OK;
GUID guidContext = GUID_NULL;
CComBSTR bstrContext;
// Create a unique context key
hr = CoCreateGuid(&guidContext);
if (hr == S_OK)
{
bstrContext = guidContext;
if(bstrContext.Length() > 0)
{
key = bstrContext;
}
else
{
hr = E_OUTOFMEMORY;
}
}
if (hr == S_OK)
{
// Insert this into the map
POSITION elementPosition = m_Map.SetAt(key, pContext);
if(elementPosition != NULL)
{
// AddRef since we are holding onto it
pContext->AddRef();
}
else
{
hr = E_OUTOFMEMORY;
}
}
return hr;
}
void Remove(
const CAtlStringW& key)
{
CComCritSecLock<CComAutoCriticalSection> Lock(m_CriticalSection);
// Get the element
IUnknown* pContext = NULL;
if (m_Map.Lookup(key, pContext) == true)
{
// Remove the entry for it
m_Map.RemoveKey(key);
// Release it
pContext->Release();
}
}
// Returns the context pointer. If not found, return value is NULL.
// If non-NULL, caller is responsible for Releasing when it is done,
// since this method will AddRef the context.
IUnknown* GetContext(
const CAtlStringW& key)
{
CComCritSecLock<CComAutoCriticalSection> Lock(m_CriticalSection);
// Get the element
IUnknown* pContext = NULL;
if (m_Map.Lookup(key, pContext) == true)
{
// AddRef
pContext->AddRef();
}
return pContext;
}
private:
CComAutoCriticalSection m_CriticalSection;
CAtlMap<CAtlStringW, IUnknown*> m_Map;
DWORD m_cRef;
CComPtr<WpdBaseDriver> m_WpdBaseDriver;
};
// This class is used to store the connected client information.
class ClientContext : public IUnknown
{
public:
ClientContext() :
MajorVersion(0),
MinorVersion(0),
Revision(0),
m_cRef(1)
{
}
~ClientContext()
{
}
public: // IUnknown
ULONG __stdcall AddRef()
{
InterlockedIncrement((long*) &m_cRef);
return m_cRef;
}
_At_(this, __drv_freesMem(Mem))
ULONG __stdcall Release()
{
ULONG ulRefCount = m_cRef - 1;
if (InterlockedDecrement((long*) &m_cRef) == 0)
{
delete this;
return 0;
}
return ulRefCount;
}
HRESULT __stdcall QueryInterface(
REFIID riid,
void** ppv)
{
HRESULT hr = S_OK;
if(riid == IID_IUnknown)
{
*ppv = static_cast<IUnknown*>(this);
AddRef();
}
else
{
*ppv = NULL;
hr = E_NOINTERFACE;
}
return hr;
}
private:
DWORD m_cRef;
public:
CAtlStringW ClientName;
CAtlStringW EventCookie;
DWORD MajorVersion;
DWORD MinorVersion;
DWORD Revision;
};
class PropVariantWrapper : public tagPROPVARIANT
{
public:
PropVariantWrapper()
{
PropVariantInit(this);
}
PropVariantWrapper(LPCWSTR pszSrc)
{
PropVariantInit(this);
*this = pszSrc;
}
virtual ~PropVariantWrapper()
{
Clear();
}
void Clear()
{
PropVariantClear(this);
}
PropVariantWrapper& operator= (const ULONG ulValue)
{
Clear();
vt = VT_UI4;
ulVal = ulValue;
return *this;
}
PropVariantWrapper& operator= (_In_ LPCWSTR pszSrc)
{
Clear();
pwszVal = AtlAllocTaskWideString(pszSrc);
if(pwszVal != NULL)
{
vt = VT_LPWSTR;
}
return *this;
}
PropVariantWrapper& operator= (_In_ IUnknown* punkSrc)
{
Clear();
// Need to AddRef as PropVariantClear will Release
if (punkSrc != NULL)
{
vt = VT_UNKNOWN;
punkVal = punkSrc;
punkVal->AddRef();
}
return *this;
}
void SetErrorValue(const HRESULT hr)
{
Clear();
vt = VT_ERROR;
scode = hr;
}
void SetBoolValue(const bool bValue)
{
Clear();
vt = VT_BOOL;
if(bValue)
{
boolVal = VARIANT_TRUE;
}
else
{
boolVal = VARIANT_FALSE;
}
}
};
HRESULT UpdateDeviceFriendlyName(
_In_ IPortableDeviceClassExtension* pPortableDeviceClassExtension,
_In_ LPCWSTR wszDeviceFriendlyName);
HRESULT RegisterServices(
_In_ IPortableDeviceClassExtension* pPortableDeviceClassExtension,
const bool bUnregister);
HRESULT CheckRequestFilename(
_In_ LPCWSTR pszRequestFilename);
HRESULT AddStringValueToPropVariantCollection(
_Out_ IPortableDevicePropVariantCollection* pCollection,
_In_ LPCWSTR wszValue);
HRESULT PostWpdEvent(
_In_ IPortableDeviceValues* pCommandParams,
_In_ IPortableDeviceValues* pEventParams);
HRESULT GetClientContextMap(
_In_ IPortableDeviceValues* pParams,
_Outptr_ ContextMap** ppContextMap);
_Success_(return == S_OK)
HRESULT GetClientContext(
_In_ IPortableDeviceValues* pParams,
_In_ LPCWSTR pszContextKey,
_Outptr_ IUnknown** ppContext);
HRESULT GetClientEventCookie(
_In_ IPortableDeviceValues* pParams,
_Outptr_result_maybenull_ LPWSTR* ppszEventCookie);
HRESULT AddPropertyAttributesByType(
_In_ const DevicePropertyAttributesType type,
_Inout_ IPortableDeviceValues* pAttributes);
HRESULT SetPropertyAttributes(
REFPROPERTYKEY Key,
_In_reads_(cAttributeInfo) const PropertyAttributeInfo* AttributeInfo,
_In_ DWORD cAttributeInfo,
_Inout_ IPortableDeviceValues* pAttributes);
HRESULT SetMethodParameters(
REFGUID Method,
_In_reads_(cAttributeInfo) const MethodParameterAttributeInfo* AttributeInfo,
_In_ DWORD cAttributeInfo,
_Inout_ IPortableDeviceKeyCollection* pParameters);
HRESULT SetMethodParameterAttributes(
REFPROPERTYKEY Parameter,
_In_reads_(cAttributeInfo) const MethodParameterAttributeInfo* AttributeInfo,
_In_ DWORD cAttributeInfo,
_Inout_ IPortableDeviceValues* pAttributes);
HRESULT SetEventParameterAttributes(
REFPROPERTYKEY Parameter,
_In_reads_(cAttributeInfo) const EventParameterAttributeInfo* AttributeInfo,
_In_ DWORD cAttributeInfo,
_Inout_ IPortableDeviceValues* pAttributes);
HRESULT SetEventParameters(
REFGUID Event,
_In_reads_(cAttributeInfo) const EventParameterAttributeInfo* AttributeInfo,
_In_ DWORD cAttributeInfo,
_Inout_ IPortableDeviceKeyCollection* pParameters);
VOID ConvertFileTimeToUlonglong(
_In_ FILETIME * fTime,
_Out_ ULONGLONG * pResult);
| [
"u@london.org.il"
] | u@london.org.il |
ca7bceb0fa85b921cfb63d7f6df183820a0b9009 | 8567438779e6af0754620a25d379c348e4cd5a5d | /ash/wm/window_mirror_view.cc | 7b67803f202b5e83c7ba79bf850f06e1814977ab | [
"BSD-3-Clause"
] | permissive | thngkaiyuan/chromium | c389ac4b50ccba28ee077cbf6115c41b547955ae | dab56a4a71f87f64ecc0044e97b4a8f247787a68 | refs/heads/master | 2022-11-10T02:50:29.326119 | 2017-04-08T12:28:57 | 2017-04-08T12:28:57 | 84,073,924 | 0 | 1 | BSD-3-Clause | 2022-10-25T19:47:15 | 2017-03-06T13:04:15 | null | UTF-8 | C++ | false | false | 3,650 | cc | // 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.
#include "ash/wm/window_mirror_view.h"
#include "ash/common/wm/window_state.h"
#include "ash/common/wm_window.h"
#include "ash/common/wm_window_property.h"
#include "ash/wm/window_state_aura.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/window.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_tree_owner.h"
#include "ui/views/widget/widget.h"
#include "ui/wm/core/window_util.h"
namespace ash {
namespace wm {
namespace {
void EnsureAllChildrenAreVisible(ui::Layer* layer) {
std::list<ui::Layer*> layers;
layers.push_back(layer);
while (!layers.empty()) {
for (auto* child : layers.front()->children())
layers.push_back(child);
layers.front()->SetVisible(true);
layers.pop_front();
}
}
} // namespace
WindowMirrorView::WindowMirrorView(WmWindow* window) : target_(window) {
DCHECK(window);
}
WindowMirrorView::~WindowMirrorView() {
// Make sure |target_| has outlived |this|. See crbug.com/681207
DCHECK(target_->aura_window()->layer());
if (layer_owner_)
target_->aura_window()->ClearProperty(aura::client::kMirroringEnabledKey);
}
gfx::Size WindowMirrorView::GetPreferredSize() const {
return GetClientAreaBounds().size();
}
void WindowMirrorView::Layout() {
// If |layer_owner_| hasn't been initialized (|this| isn't on screen), no-op.
if (!layer_owner_)
return;
// Position at 0, 0.
GetMirrorLayer()->SetBounds(gfx::Rect(GetMirrorLayer()->bounds().size()));
gfx::Transform transform;
gfx::Rect client_area_bounds = GetClientAreaBounds();
// Scale down if necessary.
if (size() != target_->GetBounds().size()) {
const float scale =
width() / static_cast<float>(client_area_bounds.width());
transform.Scale(scale, scale);
}
// Reposition such that the client area is the only part visible.
transform.Translate(-client_area_bounds.x(), -client_area_bounds.y());
GetMirrorLayer()->SetTransform(transform);
}
bool WindowMirrorView::GetNeedsNotificationWhenVisibleBoundsChange() const {
return true;
}
void WindowMirrorView::OnVisibleBoundsChanged() {
if (!layer_owner_ && !GetVisibleBounds().IsEmpty())
InitLayerOwner();
}
void WindowMirrorView::InitLayerOwner() {
if (!layer_owner_) {
target_->aura_window()->SetProperty(aura::client::kMirroringEnabledKey,
true);
}
layer_owner_ =
::wm::MirrorLayers(target_->aura_window(), false /* sync_bounds */);
SetPaintToLayer();
layer()->Add(GetMirrorLayer());
// This causes us to clip the non-client areas of the window.
layer()->SetMasksToBounds(true);
// Some extra work is needed when the target window is minimized.
if (target_->GetWindowState()->IsMinimized()) {
GetMirrorLayer()->SetOpacity(1);
EnsureAllChildrenAreVisible(GetMirrorLayer());
}
Layout();
}
ui::Layer* WindowMirrorView::GetMirrorLayer() {
return layer_owner_->root();
}
gfx::Rect WindowMirrorView::GetClientAreaBounds() const {
int insets = target_->GetIntProperty(WmWindowProperty::TOP_VIEW_INSET);
if (insets > 0) {
gfx::Rect bounds(target_->GetBounds().size());
bounds.Inset(0, insets, 0, 0);
return bounds;
}
// The target window may not have a widget in unit tests.
if (!target_->GetInternalWidget())
return gfx::Rect();
views::View* client_view = target_->GetInternalWidget()->client_view();
return client_view->ConvertRectToWidget(client_view->GetLocalBounds());
}
} // namespace wm
} // namespace ash
| [
"hedonist.ky@gmail.com"
] | hedonist.ky@gmail.com |
250b60aa9c9599f8e161d8af01ba82c277b02dfa | cf380d154cc66afd87c87ccf572f3900c60fc644 | /Docs/Tools/protocol/include/protoFiles/Fish.txt.pb.h | 7b1922a4b464feef3457155824c94244c9714c43 | [] | no_license | mengtest/Cards-Framework | 43f2f57e8d1b2d2e2f95a583473bde5b29ada9bd | 634e45fec5fc91b0d6193545f3b956d807aa8fd0 | refs/heads/master | 2020-12-03T02:26:25.102587 | 2017-06-16T14:16:01 | 2017-06-16T14:16:01 | 95,938,748 | 1 | 0 | null | 2017-07-01T03:07:39 | 2017-07-01T03:07:39 | null | UTF-8 | C++ | false | true | 146,921 | h | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: Fish.txt
#ifndef PROTOBUF_Fish_2etxt__INCLUDED
#define PROTOBUF_Fish_2etxt__INCLUDED
#ifdef _MSC_VER
# pragma warning(push)
# pragma warning(disable: 4127 4244 4267 4996)
#endif
#include <string>
#include <google/protobuf/stubs/common.h>
#if GOOGLE_PROTOBUF_VERSION < 2005000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/unknown_field_set.h>
// @@protoc_insertion_point(includes)
// Internal implementation detail -- do not call these.
void protobuf_AddDesc_Fish_2etxt();
void protobuf_AssignDesc_Fish_2etxt();
void protobuf_ShutdownFile_Fish_2etxt();
class GM_CREATEROOM_Return;
class GM_CREATEROOM_Request;
class GM_LOGINROOM_Return;
class GM_LOGINROOM_Request;
class GM_LOGINCOPY_Request;
class GM_LOGINCOPY_Return;
class GM_FishData;
class GM_RoomData;
class GM_AreaAllinfoReturn;
class GM_AreaAllinfoRequest;
class GM_Fish_All_request;
class GM_IsKilled_info;
class GM_Killer_info;
class GM_Kill_Return;
class GM_leaveRequest;
class GM_leaveReturn;
class GM_Fish_RoleAttack;
class GM_Fish_Gun_request;
class GM_Fish_Gun_return;
class SM_Fish_Object;
class GM_FishMoney_return;
class GM_FishGun_Request;
class GM_Fish_Gun;
class GM_FishGun_Return;
class GM_Fish_attack;
class GM_Fish_RoleAttack_request;
class GM_Fish_Kill_Return;
class GM_Fish_power_set_request;
class GM_Fish_power_set_rturn;
// ===================================================================
class GM_CREATEROOM_Return : public ::google::protobuf::Message {
public:
GM_CREATEROOM_Return();
virtual ~GM_CREATEROOM_Return();
GM_CREATEROOM_Return(const GM_CREATEROOM_Return& from);
inline GM_CREATEROOM_Return& operator=(const GM_CREATEROOM_Return& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_CREATEROOM_Return& default_instance();
void Swap(GM_CREATEROOM_Return* other);
// implements Message ----------------------------------------------
GM_CREATEROOM_Return* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_CREATEROOM_Return& from);
void MergeFrom(const GM_CREATEROOM_Return& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 result = 1;
inline bool has_result() const;
inline void clear_result();
static const int kResultFieldNumber = 1;
inline ::google::protobuf::int32 result() const;
inline void set_result(::google::protobuf::int32 value);
// required int32 ID = 2;
inline bool has_id() const;
inline void clear_id();
static const int kIDFieldNumber = 2;
inline ::google::protobuf::int32 id() const;
inline void set_id(::google::protobuf::int32 value);
// required int32 areaid = 3;
inline bool has_areaid() const;
inline void clear_areaid();
static const int kAreaidFieldNumber = 3;
inline ::google::protobuf::int32 areaid() const;
inline void set_areaid(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:GM_CREATEROOM_Return)
private:
inline void set_has_result();
inline void clear_has_result();
inline void set_has_id();
inline void clear_has_id();
inline void set_has_areaid();
inline void clear_has_areaid();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 result_;
::google::protobuf::int32 id_;
::google::protobuf::int32 areaid_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_CREATEROOM_Return* default_instance_;
};
// -------------------------------------------------------------------
class GM_CREATEROOM_Request : public ::google::protobuf::Message {
public:
GM_CREATEROOM_Request();
virtual ~GM_CREATEROOM_Request();
GM_CREATEROOM_Request(const GM_CREATEROOM_Request& from);
inline GM_CREATEROOM_Request& operator=(const GM_CREATEROOM_Request& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_CREATEROOM_Request& default_instance();
void Swap(GM_CREATEROOM_Request* other);
// implements Message ----------------------------------------------
GM_CREATEROOM_Request* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_CREATEROOM_Request& from);
void MergeFrom(const GM_CREATEROOM_Request& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 areaid = 1;
inline bool has_areaid() const;
inline void clear_areaid();
static const int kAreaidFieldNumber = 1;
inline ::google::protobuf::int32 areaid() const;
inline void set_areaid(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:GM_CREATEROOM_Request)
private:
inline void set_has_areaid();
inline void clear_has_areaid();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 areaid_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_CREATEROOM_Request* default_instance_;
};
// -------------------------------------------------------------------
class GM_LOGINROOM_Return : public ::google::protobuf::Message {
public:
GM_LOGINROOM_Return();
virtual ~GM_LOGINROOM_Return();
GM_LOGINROOM_Return(const GM_LOGINROOM_Return& from);
inline GM_LOGINROOM_Return& operator=(const GM_LOGINROOM_Return& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_LOGINROOM_Return& default_instance();
void Swap(GM_LOGINROOM_Return* other);
// implements Message ----------------------------------------------
GM_LOGINROOM_Return* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_LOGINROOM_Return& from);
void MergeFrom(const GM_LOGINROOM_Return& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 m_result = 1;
inline bool has_m_result() const;
inline void clear_m_result();
static const int kMResultFieldNumber = 1;
inline ::google::protobuf::int32 m_result() const;
inline void set_m_result(::google::protobuf::int32 value);
// required int32 ID = 2;
inline bool has_id() const;
inline void clear_id();
static const int kIDFieldNumber = 2;
inline ::google::protobuf::int32 id() const;
inline void set_id(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:GM_LOGINROOM_Return)
private:
inline void set_has_m_result();
inline void clear_has_m_result();
inline void set_has_id();
inline void clear_has_id();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 m_result_;
::google::protobuf::int32 id_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_LOGINROOM_Return* default_instance_;
};
// -------------------------------------------------------------------
class GM_LOGINROOM_Request : public ::google::protobuf::Message {
public:
GM_LOGINROOM_Request();
virtual ~GM_LOGINROOM_Request();
GM_LOGINROOM_Request(const GM_LOGINROOM_Request& from);
inline GM_LOGINROOM_Request& operator=(const GM_LOGINROOM_Request& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_LOGINROOM_Request& default_instance();
void Swap(GM_LOGINROOM_Request* other);
// implements Message ----------------------------------------------
GM_LOGINROOM_Request* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_LOGINROOM_Request& from);
void MergeFrom(const GM_LOGINROOM_Request& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 ID = 1;
inline bool has_id() const;
inline void clear_id();
static const int kIDFieldNumber = 1;
inline ::google::protobuf::int32 id() const;
inline void set_id(::google::protobuf::int32 value);
// required int32 areaid = 2;
inline bool has_areaid() const;
inline void clear_areaid();
static const int kAreaidFieldNumber = 2;
inline ::google::protobuf::int32 areaid() const;
inline void set_areaid(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:GM_LOGINROOM_Request)
private:
inline void set_has_id();
inline void clear_has_id();
inline void set_has_areaid();
inline void clear_has_areaid();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 id_;
::google::protobuf::int32 areaid_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_LOGINROOM_Request* default_instance_;
};
// -------------------------------------------------------------------
class GM_LOGINCOPY_Request : public ::google::protobuf::Message {
public:
GM_LOGINCOPY_Request();
virtual ~GM_LOGINCOPY_Request();
GM_LOGINCOPY_Request(const GM_LOGINCOPY_Request& from);
inline GM_LOGINCOPY_Request& operator=(const GM_LOGINCOPY_Request& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_LOGINCOPY_Request& default_instance();
void Swap(GM_LOGINCOPY_Request* other);
// implements Message ----------------------------------------------
GM_LOGINCOPY_Request* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_LOGINCOPY_Request& from);
void MergeFrom(const GM_LOGINCOPY_Request& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 ID = 1;
inline bool has_id() const;
inline void clear_id();
static const int kIDFieldNumber = 1;
inline ::google::protobuf::int32 id() const;
inline void set_id(::google::protobuf::int32 value);
// required int32 areaid = 2;
inline bool has_areaid() const;
inline void clear_areaid();
static const int kAreaidFieldNumber = 2;
inline ::google::protobuf::int32 areaid() const;
inline void set_areaid(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:GM_LOGINCOPY_Request)
private:
inline void set_has_id();
inline void clear_has_id();
inline void set_has_areaid();
inline void clear_has_areaid();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 id_;
::google::protobuf::int32 areaid_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_LOGINCOPY_Request* default_instance_;
};
// -------------------------------------------------------------------
class GM_LOGINCOPY_Return : public ::google::protobuf::Message {
public:
GM_LOGINCOPY_Return();
virtual ~GM_LOGINCOPY_Return();
GM_LOGINCOPY_Return(const GM_LOGINCOPY_Return& from);
inline GM_LOGINCOPY_Return& operator=(const GM_LOGINCOPY_Return& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_LOGINCOPY_Return& default_instance();
void Swap(GM_LOGINCOPY_Return* other);
// implements Message ----------------------------------------------
GM_LOGINCOPY_Return* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_LOGINCOPY_Return& from);
void MergeFrom(const GM_LOGINCOPY_Return& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 result = 1;
inline bool has_result() const;
inline void clear_result();
static const int kResultFieldNumber = 1;
inline ::google::protobuf::int32 result() const;
inline void set_result(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:GM_LOGINCOPY_Return)
private:
inline void set_has_result();
inline void clear_has_result();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 result_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_LOGINCOPY_Return* default_instance_;
};
// -------------------------------------------------------------------
class GM_FishData : public ::google::protobuf::Message {
public:
GM_FishData();
virtual ~GM_FishData();
GM_FishData(const GM_FishData& from);
inline GM_FishData& operator=(const GM_FishData& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_FishData& default_instance();
void Swap(GM_FishData* other);
// implements Message ----------------------------------------------
GM_FishData* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_FishData& from);
void MergeFrom(const GM_FishData& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 playerid = 1;
inline bool has_playerid() const;
inline void clear_playerid();
static const int kPlayeridFieldNumber = 1;
inline ::google::protobuf::int32 playerid() const;
inline void set_playerid(::google::protobuf::int32 value);
// optional string name = 2;
inline bool has_name() const;
inline void clear_name();
static const int kNameFieldNumber = 2;
inline const ::std::string& name() const;
inline void set_name(const ::std::string& value);
inline void set_name(const char* value);
inline void set_name(const char* value, size_t size);
inline ::std::string* mutable_name();
inline ::std::string* release_name();
inline void set_allocated_name(::std::string* name);
// optional int32 place = 3;
inline bool has_place() const;
inline void clear_place();
static const int kPlaceFieldNumber = 3;
inline ::google::protobuf::int32 place() const;
inline void set_place(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:GM_FishData)
private:
inline void set_has_playerid();
inline void clear_has_playerid();
inline void set_has_name();
inline void clear_has_name();
inline void set_has_place();
inline void clear_has_place();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::std::string* name_;
::google::protobuf::int32 playerid_;
::google::protobuf::int32 place_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_FishData* default_instance_;
};
// -------------------------------------------------------------------
class GM_RoomData : public ::google::protobuf::Message {
public:
GM_RoomData();
virtual ~GM_RoomData();
GM_RoomData(const GM_RoomData& from);
inline GM_RoomData& operator=(const GM_RoomData& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_RoomData& default_instance();
void Swap(GM_RoomData* other);
// implements Message ----------------------------------------------
GM_RoomData* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_RoomData& from);
void MergeFrom(const GM_RoomData& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 ID = 1;
inline bool has_id() const;
inline void clear_id();
static const int kIDFieldNumber = 1;
inline ::google::protobuf::int32 id() const;
inline void set_id(::google::protobuf::int32 value);
// optional int32 ownid = 2;
inline bool has_ownid() const;
inline void clear_ownid();
static const int kOwnidFieldNumber = 2;
inline ::google::protobuf::int32 ownid() const;
inline void set_ownid(::google::protobuf::int32 value);
// optional int32 place = 3;
inline bool has_place() const;
inline void clear_place();
static const int kPlaceFieldNumber = 3;
inline ::google::protobuf::int32 place() const;
inline void set_place(::google::protobuf::int32 value);
// repeated .GM_FishData m_fishman = 4;
inline int m_fishman_size() const;
inline void clear_m_fishman();
static const int kMFishmanFieldNumber = 4;
inline const ::GM_FishData& m_fishman(int index) const;
inline ::GM_FishData* mutable_m_fishman(int index);
inline ::GM_FishData* add_m_fishman();
inline const ::google::protobuf::RepeatedPtrField< ::GM_FishData >&
m_fishman() const;
inline ::google::protobuf::RepeatedPtrField< ::GM_FishData >*
mutable_m_fishman();
// @@protoc_insertion_point(class_scope:GM_RoomData)
private:
inline void set_has_id();
inline void clear_has_id();
inline void set_has_ownid();
inline void clear_has_ownid();
inline void set_has_place();
inline void clear_has_place();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 id_;
::google::protobuf::int32 ownid_;
::google::protobuf::RepeatedPtrField< ::GM_FishData > m_fishman_;
::google::protobuf::int32 place_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(4 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_RoomData* default_instance_;
};
// -------------------------------------------------------------------
class GM_AreaAllinfoReturn : public ::google::protobuf::Message {
public:
GM_AreaAllinfoReturn();
virtual ~GM_AreaAllinfoReturn();
GM_AreaAllinfoReturn(const GM_AreaAllinfoReturn& from);
inline GM_AreaAllinfoReturn& operator=(const GM_AreaAllinfoReturn& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_AreaAllinfoReturn& default_instance();
void Swap(GM_AreaAllinfoReturn* other);
// implements Message ----------------------------------------------
GM_AreaAllinfoReturn* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_AreaAllinfoReturn& from);
void MergeFrom(const GM_AreaAllinfoReturn& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 areaid = 1;
inline bool has_areaid() const;
inline void clear_areaid();
static const int kAreaidFieldNumber = 1;
inline ::google::protobuf::int32 areaid() const;
inline void set_areaid(::google::protobuf::int32 value);
// repeated .GM_RoomData m_data = 2;
inline int m_data_size() const;
inline void clear_m_data();
static const int kMDataFieldNumber = 2;
inline const ::GM_RoomData& m_data(int index) const;
inline ::GM_RoomData* mutable_m_data(int index);
inline ::GM_RoomData* add_m_data();
inline const ::google::protobuf::RepeatedPtrField< ::GM_RoomData >&
m_data() const;
inline ::google::protobuf::RepeatedPtrField< ::GM_RoomData >*
mutable_m_data();
// @@protoc_insertion_point(class_scope:GM_AreaAllinfoReturn)
private:
inline void set_has_areaid();
inline void clear_has_areaid();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::RepeatedPtrField< ::GM_RoomData > m_data_;
::google::protobuf::int32 areaid_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_AreaAllinfoReturn* default_instance_;
};
// -------------------------------------------------------------------
class GM_AreaAllinfoRequest : public ::google::protobuf::Message {
public:
GM_AreaAllinfoRequest();
virtual ~GM_AreaAllinfoRequest();
GM_AreaAllinfoRequest(const GM_AreaAllinfoRequest& from);
inline GM_AreaAllinfoRequest& operator=(const GM_AreaAllinfoRequest& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_AreaAllinfoRequest& default_instance();
void Swap(GM_AreaAllinfoRequest* other);
// implements Message ----------------------------------------------
GM_AreaAllinfoRequest* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_AreaAllinfoRequest& from);
void MergeFrom(const GM_AreaAllinfoRequest& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 areaid = 1;
inline bool has_areaid() const;
inline void clear_areaid();
static const int kAreaidFieldNumber = 1;
inline ::google::protobuf::int32 areaid() const;
inline void set_areaid(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:GM_AreaAllinfoRequest)
private:
inline void set_has_areaid();
inline void clear_has_areaid();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 areaid_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_AreaAllinfoRequest* default_instance_;
};
// -------------------------------------------------------------------
class GM_Fish_All_request : public ::google::protobuf::Message {
public:
GM_Fish_All_request();
virtual ~GM_Fish_All_request();
GM_Fish_All_request(const GM_Fish_All_request& from);
inline GM_Fish_All_request& operator=(const GM_Fish_All_request& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_Fish_All_request& default_instance();
void Swap(GM_Fish_All_request* other);
// implements Message ----------------------------------------------
GM_Fish_All_request* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_Fish_All_request& from);
void MergeFrom(const GM_Fish_All_request& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 areaid = 1;
inline bool has_areaid() const;
inline void clear_areaid();
static const int kAreaidFieldNumber = 1;
inline ::google::protobuf::int32 areaid() const;
inline void set_areaid(::google::protobuf::int32 value);
// optional int32 id = 2;
inline bool has_id() const;
inline void clear_id();
static const int kIdFieldNumber = 2;
inline ::google::protobuf::int32 id() const;
inline void set_id(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:GM_Fish_All_request)
private:
inline void set_has_areaid();
inline void clear_has_areaid();
inline void set_has_id();
inline void clear_has_id();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 areaid_;
::google::protobuf::int32 id_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_Fish_All_request* default_instance_;
};
// -------------------------------------------------------------------
class GM_IsKilled_info : public ::google::protobuf::Message {
public:
GM_IsKilled_info();
virtual ~GM_IsKilled_info();
GM_IsKilled_info(const GM_IsKilled_info& from);
inline GM_IsKilled_info& operator=(const GM_IsKilled_info& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_IsKilled_info& default_instance();
void Swap(GM_IsKilled_info* other);
// implements Message ----------------------------------------------
GM_IsKilled_info* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_IsKilled_info& from);
void MergeFrom(const GM_IsKilled_info& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 roleid = 1;
inline bool has_roleid() const;
inline void clear_roleid();
static const int kRoleidFieldNumber = 1;
inline ::google::protobuf::int32 roleid() const;
inline void set_roleid(::google::protobuf::int32 value);
// optional int32 monsterid = 2;
inline bool has_monsterid() const;
inline void clear_monsterid();
static const int kMonsteridFieldNumber = 2;
inline ::google::protobuf::int32 monsterid() const;
inline void set_monsterid(::google::protobuf::int32 value);
// optional int32 monclassification = 3;
inline bool has_monclassification() const;
inline void clear_monclassification();
static const int kMonclassificationFieldNumber = 3;
inline ::google::protobuf::int32 monclassification() const;
inline void set_monclassification(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:GM_IsKilled_info)
private:
inline void set_has_roleid();
inline void clear_has_roleid();
inline void set_has_monsterid();
inline void clear_has_monsterid();
inline void set_has_monclassification();
inline void clear_has_monclassification();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 roleid_;
::google::protobuf::int32 monsterid_;
::google::protobuf::int32 monclassification_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_IsKilled_info* default_instance_;
};
// -------------------------------------------------------------------
class GM_Killer_info : public ::google::protobuf::Message {
public:
GM_Killer_info();
virtual ~GM_Killer_info();
GM_Killer_info(const GM_Killer_info& from);
inline GM_Killer_info& operator=(const GM_Killer_info& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_Killer_info& default_instance();
void Swap(GM_Killer_info* other);
// implements Message ----------------------------------------------
GM_Killer_info* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_Killer_info& from);
void MergeFrom(const GM_Killer_info& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 roleid = 1;
inline bool has_roleid() const;
inline void clear_roleid();
static const int kRoleidFieldNumber = 1;
inline ::google::protobuf::int32 roleid() const;
inline void set_roleid(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:GM_Killer_info)
private:
inline void set_has_roleid();
inline void clear_has_roleid();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 roleid_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_Killer_info* default_instance_;
};
// -------------------------------------------------------------------
class GM_Kill_Return : public ::google::protobuf::Message {
public:
GM_Kill_Return();
virtual ~GM_Kill_Return();
GM_Kill_Return(const GM_Kill_Return& from);
inline GM_Kill_Return& operator=(const GM_Kill_Return& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_Kill_Return& default_instance();
void Swap(GM_Kill_Return* other);
// implements Message ----------------------------------------------
GM_Kill_Return* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_Kill_Return& from);
void MergeFrom(const GM_Kill_Return& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 m_iskiller = 1;
inline bool has_m_iskiller() const;
inline void clear_m_iskiller();
static const int kMIskillerFieldNumber = 1;
inline ::google::protobuf::int32 m_iskiller() const;
inline void set_m_iskiller(::google::protobuf::int32 value);
// required int32 m_killer = 2;
inline bool has_m_killer() const;
inline void clear_m_killer();
static const int kMKillerFieldNumber = 2;
inline ::google::protobuf::int32 m_killer() const;
inline void set_m_killer(::google::protobuf::int32 value);
// required int32 m_is = 3;
inline bool has_m_is() const;
inline void clear_m_is();
static const int kMIsFieldNumber = 3;
inline ::google::protobuf::int32 m_is() const;
inline void set_m_is(::google::protobuf::int32 value);
// optional int32 m_state = 4;
inline bool has_m_state() const;
inline void clear_m_state();
static const int kMStateFieldNumber = 4;
inline ::google::protobuf::int32 m_state() const;
inline void set_m_state(::google::protobuf::int32 value);
// repeated .SM_Fish_Object data = 5;
inline int data_size() const;
inline void clear_data();
static const int kDataFieldNumber = 5;
inline const ::SM_Fish_Object& data(int index) const;
inline ::SM_Fish_Object* mutable_data(int index);
inline ::SM_Fish_Object* add_data();
inline const ::google::protobuf::RepeatedPtrField< ::SM_Fish_Object >&
data() const;
inline ::google::protobuf::RepeatedPtrField< ::SM_Fish_Object >*
mutable_data();
// @@protoc_insertion_point(class_scope:GM_Kill_Return)
private:
inline void set_has_m_iskiller();
inline void clear_has_m_iskiller();
inline void set_has_m_killer();
inline void clear_has_m_killer();
inline void set_has_m_is();
inline void clear_has_m_is();
inline void set_has_m_state();
inline void clear_has_m_state();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 m_iskiller_;
::google::protobuf::int32 m_killer_;
::google::protobuf::int32 m_is_;
::google::protobuf::int32 m_state_;
::google::protobuf::RepeatedPtrField< ::SM_Fish_Object > data_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_Kill_Return* default_instance_;
};
// -------------------------------------------------------------------
class GM_leaveRequest : public ::google::protobuf::Message {
public:
GM_leaveRequest();
virtual ~GM_leaveRequest();
GM_leaveRequest(const GM_leaveRequest& from);
inline GM_leaveRequest& operator=(const GM_leaveRequest& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_leaveRequest& default_instance();
void Swap(GM_leaveRequest* other);
// implements Message ----------------------------------------------
GM_leaveRequest* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_leaveRequest& from);
void MergeFrom(const GM_leaveRequest& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 areaid = 1;
inline bool has_areaid() const;
inline void clear_areaid();
static const int kAreaidFieldNumber = 1;
inline ::google::protobuf::int32 areaid() const;
inline void set_areaid(::google::protobuf::int32 value);
// required int32 roomid = 2;
inline bool has_roomid() const;
inline void clear_roomid();
static const int kRoomidFieldNumber = 2;
inline ::google::protobuf::int32 roomid() const;
inline void set_roomid(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:GM_leaveRequest)
private:
inline void set_has_areaid();
inline void clear_has_areaid();
inline void set_has_roomid();
inline void clear_has_roomid();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 areaid_;
::google::protobuf::int32 roomid_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_leaveRequest* default_instance_;
};
// -------------------------------------------------------------------
class GM_leaveReturn : public ::google::protobuf::Message {
public:
GM_leaveReturn();
virtual ~GM_leaveReturn();
GM_leaveReturn(const GM_leaveReturn& from);
inline GM_leaveReturn& operator=(const GM_leaveReturn& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_leaveReturn& default_instance();
void Swap(GM_leaveReturn* other);
// implements Message ----------------------------------------------
GM_leaveReturn* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_leaveReturn& from);
void MergeFrom(const GM_leaveReturn& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 errorid = 1;
inline bool has_errorid() const;
inline void clear_errorid();
static const int kErroridFieldNumber = 1;
inline ::google::protobuf::int32 errorid() const;
inline void set_errorid(::google::protobuf::int32 value);
// optional int32 roleid = 2;
inline bool has_roleid() const;
inline void clear_roleid();
static const int kRoleidFieldNumber = 2;
inline ::google::protobuf::int32 roleid() const;
inline void set_roleid(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:GM_leaveReturn)
private:
inline void set_has_errorid();
inline void clear_has_errorid();
inline void set_has_roleid();
inline void clear_has_roleid();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 errorid_;
::google::protobuf::int32 roleid_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_leaveReturn* default_instance_;
};
// -------------------------------------------------------------------
class GM_Fish_RoleAttack : public ::google::protobuf::Message {
public:
GM_Fish_RoleAttack();
virtual ~GM_Fish_RoleAttack();
GM_Fish_RoleAttack(const GM_Fish_RoleAttack& from);
inline GM_Fish_RoleAttack& operator=(const GM_Fish_RoleAttack& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_Fish_RoleAttack& default_instance();
void Swap(GM_Fish_RoleAttack* other);
// implements Message ----------------------------------------------
GM_Fish_RoleAttack* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_Fish_RoleAttack& from);
void MergeFrom(const GM_Fish_RoleAttack& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 roleid = 1;
inline bool has_roleid() const;
inline void clear_roleid();
static const int kRoleidFieldNumber = 1;
inline ::google::protobuf::int32 roleid() const;
inline void set_roleid(::google::protobuf::int32 value);
// optional float posX = 2;
inline bool has_posx() const;
inline void clear_posx();
static const int kPosXFieldNumber = 2;
inline float posx() const;
inline void set_posx(float value);
// optional float posZ = 3;
inline bool has_posz() const;
inline void clear_posz();
static const int kPosZFieldNumber = 3;
inline float posz() const;
inline void set_posz(float value);
// optional int32 time = 4;
inline bool has_time() const;
inline void clear_time();
static const int kTimeFieldNumber = 4;
inline ::google::protobuf::int32 time() const;
inline void set_time(::google::protobuf::int32 value);
// optional int32 guntype = 5;
inline bool has_guntype() const;
inline void clear_guntype();
static const int kGuntypeFieldNumber = 5;
inline ::google::protobuf::int32 guntype() const;
inline void set_guntype(::google::protobuf::int32 value);
// optional int32 gunid = 6;
inline bool has_gunid() const;
inline void clear_gunid();
static const int kGunidFieldNumber = 6;
inline ::google::protobuf::int32 gunid() const;
inline void set_gunid(::google::protobuf::int32 value);
// optional int32 iscan = 7;
inline bool has_iscan() const;
inline void clear_iscan();
static const int kIscanFieldNumber = 7;
inline ::google::protobuf::int32 iscan() const;
inline void set_iscan(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:GM_Fish_RoleAttack)
private:
inline void set_has_roleid();
inline void clear_has_roleid();
inline void set_has_posx();
inline void clear_has_posx();
inline void set_has_posz();
inline void clear_has_posz();
inline void set_has_time();
inline void clear_has_time();
inline void set_has_guntype();
inline void clear_has_guntype();
inline void set_has_gunid();
inline void clear_has_gunid();
inline void set_has_iscan();
inline void clear_has_iscan();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 roleid_;
float posx_;
float posz_;
::google::protobuf::int32 time_;
::google::protobuf::int32 guntype_;
::google::protobuf::int32 gunid_;
::google::protobuf::int32 iscan_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(7 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_Fish_RoleAttack* default_instance_;
};
// -------------------------------------------------------------------
class GM_Fish_Gun_request : public ::google::protobuf::Message {
public:
GM_Fish_Gun_request();
virtual ~GM_Fish_Gun_request();
GM_Fish_Gun_request(const GM_Fish_Gun_request& from);
inline GM_Fish_Gun_request& operator=(const GM_Fish_Gun_request& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_Fish_Gun_request& default_instance();
void Swap(GM_Fish_Gun_request* other);
// implements Message ----------------------------------------------
GM_Fish_Gun_request* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_Fish_Gun_request& from);
void MergeFrom(const GM_Fish_Gun_request& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 gunid = 1;
inline bool has_gunid() const;
inline void clear_gunid();
static const int kGunidFieldNumber = 1;
inline ::google::protobuf::int32 gunid() const;
inline void set_gunid(::google::protobuf::int32 value);
// optional int32 gunrate = 2;
inline bool has_gunrate() const;
inline void clear_gunrate();
static const int kGunrateFieldNumber = 2;
inline ::google::protobuf::int32 gunrate() const;
inline void set_gunrate(::google::protobuf::int32 value);
// optional int32 buy = 3;
inline bool has_buy() const;
inline void clear_buy();
static const int kBuyFieldNumber = 3;
inline ::google::protobuf::int32 buy() const;
inline void set_buy(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:GM_Fish_Gun_request)
private:
inline void set_has_gunid();
inline void clear_has_gunid();
inline void set_has_gunrate();
inline void clear_has_gunrate();
inline void set_has_buy();
inline void clear_has_buy();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 gunid_;
::google::protobuf::int32 gunrate_;
::google::protobuf::int32 buy_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_Fish_Gun_request* default_instance_;
};
// -------------------------------------------------------------------
class GM_Fish_Gun_return : public ::google::protobuf::Message {
public:
GM_Fish_Gun_return();
virtual ~GM_Fish_Gun_return();
GM_Fish_Gun_return(const GM_Fish_Gun_return& from);
inline GM_Fish_Gun_return& operator=(const GM_Fish_Gun_return& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_Fish_Gun_return& default_instance();
void Swap(GM_Fish_Gun_return* other);
// implements Message ----------------------------------------------
GM_Fish_Gun_return* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_Fish_Gun_return& from);
void MergeFrom(const GM_Fish_Gun_return& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 errorid = 1;
inline bool has_errorid() const;
inline void clear_errorid();
static const int kErroridFieldNumber = 1;
inline ::google::protobuf::int32 errorid() const;
inline void set_errorid(::google::protobuf::int32 value);
// optional int32 gunid = 2;
inline bool has_gunid() const;
inline void clear_gunid();
static const int kGunidFieldNumber = 2;
inline ::google::protobuf::int32 gunid() const;
inline void set_gunid(::google::protobuf::int32 value);
// optional int32 gunrate = 3;
inline bool has_gunrate() const;
inline void clear_gunrate();
static const int kGunrateFieldNumber = 3;
inline ::google::protobuf::int32 gunrate() const;
inline void set_gunrate(::google::protobuf::int32 value);
// optional int32 roleid = 4;
inline bool has_roleid() const;
inline void clear_roleid();
static const int kRoleidFieldNumber = 4;
inline ::google::protobuf::int32 roleid() const;
inline void set_roleid(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:GM_Fish_Gun_return)
private:
inline void set_has_errorid();
inline void clear_has_errorid();
inline void set_has_gunid();
inline void clear_has_gunid();
inline void set_has_gunrate();
inline void clear_has_gunrate();
inline void set_has_roleid();
inline void clear_has_roleid();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 errorid_;
::google::protobuf::int32 gunid_;
::google::protobuf::int32 gunrate_;
::google::protobuf::int32 roleid_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(4 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_Fish_Gun_return* default_instance_;
};
// -------------------------------------------------------------------
class SM_Fish_Object : public ::google::protobuf::Message {
public:
SM_Fish_Object();
virtual ~SM_Fish_Object();
SM_Fish_Object(const SM_Fish_Object& from);
inline SM_Fish_Object& operator=(const SM_Fish_Object& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const SM_Fish_Object& default_instance();
void Swap(SM_Fish_Object* other);
// implements Message ----------------------------------------------
SM_Fish_Object* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const SM_Fish_Object& from);
void MergeFrom(const SM_Fish_Object& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 objectid = 1;
inline bool has_objectid() const;
inline void clear_objectid();
static const int kObjectidFieldNumber = 1;
inline ::google::protobuf::int32 objectid() const;
inline void set_objectid(::google::protobuf::int32 value);
// optional int32 num = 2;
inline bool has_num() const;
inline void clear_num();
static const int kNumFieldNumber = 2;
inline ::google::protobuf::int32 num() const;
inline void set_num(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:SM_Fish_Object)
private:
inline void set_has_objectid();
inline void clear_has_objectid();
inline void set_has_num();
inline void clear_has_num();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 objectid_;
::google::protobuf::int32 num_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static SM_Fish_Object* default_instance_;
};
// -------------------------------------------------------------------
class GM_FishMoney_return : public ::google::protobuf::Message {
public:
GM_FishMoney_return();
virtual ~GM_FishMoney_return();
GM_FishMoney_return(const GM_FishMoney_return& from);
inline GM_FishMoney_return& operator=(const GM_FishMoney_return& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_FishMoney_return& default_instance();
void Swap(GM_FishMoney_return* other);
// implements Message ----------------------------------------------
GM_FishMoney_return* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_FishMoney_return& from);
void MergeFrom(const GM_FishMoney_return& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 roleid = 1;
inline bool has_roleid() const;
inline void clear_roleid();
static const int kRoleidFieldNumber = 1;
inline ::google::protobuf::int32 roleid() const;
inline void set_roleid(::google::protobuf::int32 value);
// optional int32 money = 2;
inline bool has_money() const;
inline void clear_money();
static const int kMoneyFieldNumber = 2;
inline ::google::protobuf::int32 money() const;
inline void set_money(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:GM_FishMoney_return)
private:
inline void set_has_roleid();
inline void clear_has_roleid();
inline void set_has_money();
inline void clear_has_money();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 roleid_;
::google::protobuf::int32 money_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_FishMoney_return* default_instance_;
};
// -------------------------------------------------------------------
class GM_FishGun_Request : public ::google::protobuf::Message {
public:
GM_FishGun_Request();
virtual ~GM_FishGun_Request();
GM_FishGun_Request(const GM_FishGun_Request& from);
inline GM_FishGun_Request& operator=(const GM_FishGun_Request& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_FishGun_Request& default_instance();
void Swap(GM_FishGun_Request* other);
// implements Message ----------------------------------------------
GM_FishGun_Request* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_FishGun_Request& from);
void MergeFrom(const GM_FishGun_Request& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 roleid = 1;
inline bool has_roleid() const;
inline void clear_roleid();
static const int kRoleidFieldNumber = 1;
inline ::google::protobuf::int32 roleid() const;
inline void set_roleid(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:GM_FishGun_Request)
private:
inline void set_has_roleid();
inline void clear_has_roleid();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 roleid_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_FishGun_Request* default_instance_;
};
// -------------------------------------------------------------------
class GM_Fish_Gun : public ::google::protobuf::Message {
public:
GM_Fish_Gun();
virtual ~GM_Fish_Gun();
GM_Fish_Gun(const GM_Fish_Gun& from);
inline GM_Fish_Gun& operator=(const GM_Fish_Gun& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_Fish_Gun& default_instance();
void Swap(GM_Fish_Gun* other);
// implements Message ----------------------------------------------
GM_Fish_Gun* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_Fish_Gun& from);
void MergeFrom(const GM_Fish_Gun& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 gunid = 1;
inline bool has_gunid() const;
inline void clear_gunid();
static const int kGunidFieldNumber = 1;
inline ::google::protobuf::int32 gunid() const;
inline void set_gunid(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:GM_Fish_Gun)
private:
inline void set_has_gunid();
inline void clear_has_gunid();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 gunid_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_Fish_Gun* default_instance_;
};
// -------------------------------------------------------------------
class GM_FishGun_Return : public ::google::protobuf::Message {
public:
GM_FishGun_Return();
virtual ~GM_FishGun_Return();
GM_FishGun_Return(const GM_FishGun_Return& from);
inline GM_FishGun_Return& operator=(const GM_FishGun_Return& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_FishGun_Return& default_instance();
void Swap(GM_FishGun_Return* other);
// implements Message ----------------------------------------------
GM_FishGun_Return* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_FishGun_Return& from);
void MergeFrom(const GM_FishGun_Return& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 selfgunid = 1;
inline bool has_selfgunid() const;
inline void clear_selfgunid();
static const int kSelfgunidFieldNumber = 1;
inline ::google::protobuf::int32 selfgunid() const;
inline void set_selfgunid(::google::protobuf::int32 value);
// optional int32 selfgunrate = 2;
inline bool has_selfgunrate() const;
inline void clear_selfgunrate();
static const int kSelfgunrateFieldNumber = 2;
inline ::google::protobuf::int32 selfgunrate() const;
inline void set_selfgunrate(::google::protobuf::int32 value);
// optional int32 guntate = 3;
inline bool has_guntate() const;
inline void clear_guntate();
static const int kGuntateFieldNumber = 3;
inline ::google::protobuf::int32 guntate() const;
inline void set_guntate(::google::protobuf::int32 value);
// optional int32 roleid = 4;
inline bool has_roleid() const;
inline void clear_roleid();
static const int kRoleidFieldNumber = 4;
inline ::google::protobuf::int32 roleid() const;
inline void set_roleid(::google::protobuf::int32 value);
// optional int32 power = 5;
inline bool has_power() const;
inline void clear_power();
static const int kPowerFieldNumber = 5;
inline ::google::protobuf::int32 power() const;
inline void set_power(::google::protobuf::int32 value);
// repeated .GM_Fish_Gun data = 6;
inline int data_size() const;
inline void clear_data();
static const int kDataFieldNumber = 6;
inline const ::GM_Fish_Gun& data(int index) const;
inline ::GM_Fish_Gun* mutable_data(int index);
inline ::GM_Fish_Gun* add_data();
inline const ::google::protobuf::RepeatedPtrField< ::GM_Fish_Gun >&
data() const;
inline ::google::protobuf::RepeatedPtrField< ::GM_Fish_Gun >*
mutable_data();
// @@protoc_insertion_point(class_scope:GM_FishGun_Return)
private:
inline void set_has_selfgunid();
inline void clear_has_selfgunid();
inline void set_has_selfgunrate();
inline void clear_has_selfgunrate();
inline void set_has_guntate();
inline void clear_has_guntate();
inline void set_has_roleid();
inline void clear_has_roleid();
inline void set_has_power();
inline void clear_has_power();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 selfgunid_;
::google::protobuf::int32 selfgunrate_;
::google::protobuf::int32 guntate_;
::google::protobuf::int32 roleid_;
::google::protobuf::RepeatedPtrField< ::GM_Fish_Gun > data_;
::google::protobuf::int32 power_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(6 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_FishGun_Return* default_instance_;
};
// -------------------------------------------------------------------
class GM_Fish_attack : public ::google::protobuf::Message {
public:
GM_Fish_attack();
virtual ~GM_Fish_attack();
GM_Fish_attack(const GM_Fish_attack& from);
inline GM_Fish_attack& operator=(const GM_Fish_attack& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_Fish_attack& default_instance();
void Swap(GM_Fish_attack* other);
// implements Message ----------------------------------------------
GM_Fish_attack* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_Fish_attack& from);
void MergeFrom(const GM_Fish_attack& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 roleid = 1;
inline bool has_roleid() const;
inline void clear_roleid();
static const int kRoleidFieldNumber = 1;
inline ::google::protobuf::int32 roleid() const;
inline void set_roleid(::google::protobuf::int32 value);
// repeated int32 fishid = 2;
inline int fishid_size() const;
inline void clear_fishid();
static const int kFishidFieldNumber = 2;
inline ::google::protobuf::int32 fishid(int index) const;
inline void set_fishid(int index, ::google::protobuf::int32 value);
inline void add_fishid(::google::protobuf::int32 value);
inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
fishid() const;
inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
mutable_fishid();
// @@protoc_insertion_point(class_scope:GM_Fish_attack)
private:
inline void set_has_roleid();
inline void clear_has_roleid();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::RepeatedField< ::google::protobuf::int32 > fishid_;
::google::protobuf::int32 roleid_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_Fish_attack* default_instance_;
};
// -------------------------------------------------------------------
class GM_Fish_RoleAttack_request : public ::google::protobuf::Message {
public:
GM_Fish_RoleAttack_request();
virtual ~GM_Fish_RoleAttack_request();
GM_Fish_RoleAttack_request(const GM_Fish_RoleAttack_request& from);
inline GM_Fish_RoleAttack_request& operator=(const GM_Fish_RoleAttack_request& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_Fish_RoleAttack_request& default_instance();
void Swap(GM_Fish_RoleAttack_request* other);
// implements Message ----------------------------------------------
GM_Fish_RoleAttack_request* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_Fish_RoleAttack_request& from);
void MergeFrom(const GM_Fish_RoleAttack_request& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 roleid = 1;
inline bool has_roleid() const;
inline void clear_roleid();
static const int kRoleidFieldNumber = 1;
inline ::google::protobuf::int32 roleid() const;
inline void set_roleid(::google::protobuf::int32 value);
// optional int32 time = 2;
inline bool has_time() const;
inline void clear_time();
static const int kTimeFieldNumber = 2;
inline ::google::protobuf::int32 time() const;
inline void set_time(::google::protobuf::int32 value);
// optional int32 guntype = 3;
inline bool has_guntype() const;
inline void clear_guntype();
static const int kGuntypeFieldNumber = 3;
inline ::google::protobuf::int32 guntype() const;
inline void set_guntype(::google::protobuf::int32 value);
// optional int32 iscan = 4;
inline bool has_iscan() const;
inline void clear_iscan();
static const int kIscanFieldNumber = 4;
inline ::google::protobuf::int32 iscan() const;
inline void set_iscan(::google::protobuf::int32 value);
// optional int32 firetime = 5;
inline bool has_firetime() const;
inline void clear_firetime();
static const int kFiretimeFieldNumber = 5;
inline ::google::protobuf::int32 firetime() const;
inline void set_firetime(::google::protobuf::int32 value);
// optional int32 firelast = 6;
inline bool has_firelast() const;
inline void clear_firelast();
static const int kFirelastFieldNumber = 6;
inline ::google::protobuf::int32 firelast() const;
inline void set_firelast(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:GM_Fish_RoleAttack_request)
private:
inline void set_has_roleid();
inline void clear_has_roleid();
inline void set_has_time();
inline void clear_has_time();
inline void set_has_guntype();
inline void clear_has_guntype();
inline void set_has_iscan();
inline void clear_has_iscan();
inline void set_has_firetime();
inline void clear_has_firetime();
inline void set_has_firelast();
inline void clear_has_firelast();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 roleid_;
::google::protobuf::int32 time_;
::google::protobuf::int32 guntype_;
::google::protobuf::int32 iscan_;
::google::protobuf::int32 firetime_;
::google::protobuf::int32 firelast_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(6 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_Fish_RoleAttack_request* default_instance_;
};
// -------------------------------------------------------------------
class GM_Fish_Kill_Return : public ::google::protobuf::Message {
public:
GM_Fish_Kill_Return();
virtual ~GM_Fish_Kill_Return();
GM_Fish_Kill_Return(const GM_Fish_Kill_Return& from);
inline GM_Fish_Kill_Return& operator=(const GM_Fish_Kill_Return& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_Fish_Kill_Return& default_instance();
void Swap(GM_Fish_Kill_Return* other);
// implements Message ----------------------------------------------
GM_Fish_Kill_Return* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_Fish_Kill_Return& from);
void MergeFrom(const GM_Fish_Kill_Return& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 m_killer = 1;
inline bool has_m_killer() const;
inline void clear_m_killer();
static const int kMKillerFieldNumber = 1;
inline ::google::protobuf::int32 m_killer() const;
inline void set_m_killer(::google::protobuf::int32 value);
// repeated int32 m_deadid = 2;
inline int m_deadid_size() const;
inline void clear_m_deadid();
static const int kMDeadidFieldNumber = 2;
inline ::google::protobuf::int32 m_deadid(int index) const;
inline void set_m_deadid(int index, ::google::protobuf::int32 value);
inline void add_m_deadid(::google::protobuf::int32 value);
inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
m_deadid() const;
inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
mutable_m_deadid();
// optional int32 errorid = 3;
inline bool has_errorid() const;
inline void clear_errorid();
static const int kErroridFieldNumber = 3;
inline ::google::protobuf::int32 errorid() const;
inline void set_errorid(::google::protobuf::int32 value);
// optional int32 m_state = 4;
inline bool has_m_state() const;
inline void clear_m_state();
static const int kMStateFieldNumber = 4;
inline ::google::protobuf::int32 m_state() const;
inline void set_m_state(::google::protobuf::int32 value);
// repeated .SM_Fish_Object data = 5;
inline int data_size() const;
inline void clear_data();
static const int kDataFieldNumber = 5;
inline const ::SM_Fish_Object& data(int index) const;
inline ::SM_Fish_Object* mutable_data(int index);
inline ::SM_Fish_Object* add_data();
inline const ::google::protobuf::RepeatedPtrField< ::SM_Fish_Object >&
data() const;
inline ::google::protobuf::RepeatedPtrField< ::SM_Fish_Object >*
mutable_data();
// @@protoc_insertion_point(class_scope:GM_Fish_Kill_Return)
private:
inline void set_has_m_killer();
inline void clear_has_m_killer();
inline void set_has_errorid();
inline void clear_has_errorid();
inline void set_has_m_state();
inline void clear_has_m_state();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::RepeatedField< ::google::protobuf::int32 > m_deadid_;
::google::protobuf::int32 m_killer_;
::google::protobuf::int32 errorid_;
::google::protobuf::RepeatedPtrField< ::SM_Fish_Object > data_;
::google::protobuf::int32 m_state_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_Fish_Kill_Return* default_instance_;
};
// -------------------------------------------------------------------
class GM_Fish_power_set_request : public ::google::protobuf::Message {
public:
GM_Fish_power_set_request();
virtual ~GM_Fish_power_set_request();
GM_Fish_power_set_request(const GM_Fish_power_set_request& from);
inline GM_Fish_power_set_request& operator=(const GM_Fish_power_set_request& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_Fish_power_set_request& default_instance();
void Swap(GM_Fish_power_set_request* other);
// implements Message ----------------------------------------------
GM_Fish_power_set_request* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_Fish_power_set_request& from);
void MergeFrom(const GM_Fish_power_set_request& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 power = 1;
inline bool has_power() const;
inline void clear_power();
static const int kPowerFieldNumber = 1;
inline ::google::protobuf::int32 power() const;
inline void set_power(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:GM_Fish_power_set_request)
private:
inline void set_has_power();
inline void clear_has_power();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 power_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_Fish_power_set_request* default_instance_;
};
// -------------------------------------------------------------------
class GM_Fish_power_set_rturn : public ::google::protobuf::Message {
public:
GM_Fish_power_set_rturn();
virtual ~GM_Fish_power_set_rturn();
GM_Fish_power_set_rturn(const GM_Fish_power_set_rturn& from);
inline GM_Fish_power_set_rturn& operator=(const GM_Fish_power_set_rturn& from) {
CopyFrom(from);
return *this;
}
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ::google::protobuf::Descriptor* descriptor();
static const GM_Fish_power_set_rturn& default_instance();
void Swap(GM_Fish_power_set_rturn* other);
// implements Message ----------------------------------------------
GM_Fish_power_set_rturn* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GM_Fish_power_set_rturn& from);
void MergeFrom(const GM_Fish_power_set_rturn& from);
void Clear();
bool IsInitialized() const;
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// required int32 errorid = 1;
inline bool has_errorid() const;
inline void clear_errorid();
static const int kErroridFieldNumber = 1;
inline ::google::protobuf::int32 errorid() const;
inline void set_errorid(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:GM_Fish_power_set_rturn)
private:
inline void set_has_errorid();
inline void clear_has_errorid();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::int32 errorid_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
friend void protobuf_AddDesc_Fish_2etxt();
friend void protobuf_AssignDesc_Fish_2etxt();
friend void protobuf_ShutdownFile_Fish_2etxt();
void InitAsDefaultInstance();
static GM_Fish_power_set_rturn* default_instance_;
};
// ===================================================================
// ===================================================================
// GM_CREATEROOM_Return
// required int32 result = 1;
inline bool GM_CREATEROOM_Return::has_result() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_CREATEROOM_Return::set_has_result() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_CREATEROOM_Return::clear_has_result() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_CREATEROOM_Return::clear_result() {
result_ = 0;
clear_has_result();
}
inline ::google::protobuf::int32 GM_CREATEROOM_Return::result() const {
return result_;
}
inline void GM_CREATEROOM_Return::set_result(::google::protobuf::int32 value) {
set_has_result();
result_ = value;
}
// required int32 ID = 2;
inline bool GM_CREATEROOM_Return::has_id() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void GM_CREATEROOM_Return::set_has_id() {
_has_bits_[0] |= 0x00000002u;
}
inline void GM_CREATEROOM_Return::clear_has_id() {
_has_bits_[0] &= ~0x00000002u;
}
inline void GM_CREATEROOM_Return::clear_id() {
id_ = 0;
clear_has_id();
}
inline ::google::protobuf::int32 GM_CREATEROOM_Return::id() const {
return id_;
}
inline void GM_CREATEROOM_Return::set_id(::google::protobuf::int32 value) {
set_has_id();
id_ = value;
}
// required int32 areaid = 3;
inline bool GM_CREATEROOM_Return::has_areaid() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
inline void GM_CREATEROOM_Return::set_has_areaid() {
_has_bits_[0] |= 0x00000004u;
}
inline void GM_CREATEROOM_Return::clear_has_areaid() {
_has_bits_[0] &= ~0x00000004u;
}
inline void GM_CREATEROOM_Return::clear_areaid() {
areaid_ = 0;
clear_has_areaid();
}
inline ::google::protobuf::int32 GM_CREATEROOM_Return::areaid() const {
return areaid_;
}
inline void GM_CREATEROOM_Return::set_areaid(::google::protobuf::int32 value) {
set_has_areaid();
areaid_ = value;
}
// -------------------------------------------------------------------
// GM_CREATEROOM_Request
// required int32 areaid = 1;
inline bool GM_CREATEROOM_Request::has_areaid() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_CREATEROOM_Request::set_has_areaid() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_CREATEROOM_Request::clear_has_areaid() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_CREATEROOM_Request::clear_areaid() {
areaid_ = 0;
clear_has_areaid();
}
inline ::google::protobuf::int32 GM_CREATEROOM_Request::areaid() const {
return areaid_;
}
inline void GM_CREATEROOM_Request::set_areaid(::google::protobuf::int32 value) {
set_has_areaid();
areaid_ = value;
}
// -------------------------------------------------------------------
// GM_LOGINROOM_Return
// required int32 m_result = 1;
inline bool GM_LOGINROOM_Return::has_m_result() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_LOGINROOM_Return::set_has_m_result() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_LOGINROOM_Return::clear_has_m_result() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_LOGINROOM_Return::clear_m_result() {
m_result_ = 0;
clear_has_m_result();
}
inline ::google::protobuf::int32 GM_LOGINROOM_Return::m_result() const {
return m_result_;
}
inline void GM_LOGINROOM_Return::set_m_result(::google::protobuf::int32 value) {
set_has_m_result();
m_result_ = value;
}
// required int32 ID = 2;
inline bool GM_LOGINROOM_Return::has_id() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void GM_LOGINROOM_Return::set_has_id() {
_has_bits_[0] |= 0x00000002u;
}
inline void GM_LOGINROOM_Return::clear_has_id() {
_has_bits_[0] &= ~0x00000002u;
}
inline void GM_LOGINROOM_Return::clear_id() {
id_ = 0;
clear_has_id();
}
inline ::google::protobuf::int32 GM_LOGINROOM_Return::id() const {
return id_;
}
inline void GM_LOGINROOM_Return::set_id(::google::protobuf::int32 value) {
set_has_id();
id_ = value;
}
// -------------------------------------------------------------------
// GM_LOGINROOM_Request
// required int32 ID = 1;
inline bool GM_LOGINROOM_Request::has_id() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_LOGINROOM_Request::set_has_id() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_LOGINROOM_Request::clear_has_id() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_LOGINROOM_Request::clear_id() {
id_ = 0;
clear_has_id();
}
inline ::google::protobuf::int32 GM_LOGINROOM_Request::id() const {
return id_;
}
inline void GM_LOGINROOM_Request::set_id(::google::protobuf::int32 value) {
set_has_id();
id_ = value;
}
// required int32 areaid = 2;
inline bool GM_LOGINROOM_Request::has_areaid() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void GM_LOGINROOM_Request::set_has_areaid() {
_has_bits_[0] |= 0x00000002u;
}
inline void GM_LOGINROOM_Request::clear_has_areaid() {
_has_bits_[0] &= ~0x00000002u;
}
inline void GM_LOGINROOM_Request::clear_areaid() {
areaid_ = 0;
clear_has_areaid();
}
inline ::google::protobuf::int32 GM_LOGINROOM_Request::areaid() const {
return areaid_;
}
inline void GM_LOGINROOM_Request::set_areaid(::google::protobuf::int32 value) {
set_has_areaid();
areaid_ = value;
}
// -------------------------------------------------------------------
// GM_LOGINCOPY_Request
// required int32 ID = 1;
inline bool GM_LOGINCOPY_Request::has_id() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_LOGINCOPY_Request::set_has_id() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_LOGINCOPY_Request::clear_has_id() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_LOGINCOPY_Request::clear_id() {
id_ = 0;
clear_has_id();
}
inline ::google::protobuf::int32 GM_LOGINCOPY_Request::id() const {
return id_;
}
inline void GM_LOGINCOPY_Request::set_id(::google::protobuf::int32 value) {
set_has_id();
id_ = value;
}
// required int32 areaid = 2;
inline bool GM_LOGINCOPY_Request::has_areaid() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void GM_LOGINCOPY_Request::set_has_areaid() {
_has_bits_[0] |= 0x00000002u;
}
inline void GM_LOGINCOPY_Request::clear_has_areaid() {
_has_bits_[0] &= ~0x00000002u;
}
inline void GM_LOGINCOPY_Request::clear_areaid() {
areaid_ = 0;
clear_has_areaid();
}
inline ::google::protobuf::int32 GM_LOGINCOPY_Request::areaid() const {
return areaid_;
}
inline void GM_LOGINCOPY_Request::set_areaid(::google::protobuf::int32 value) {
set_has_areaid();
areaid_ = value;
}
// -------------------------------------------------------------------
// GM_LOGINCOPY_Return
// required int32 result = 1;
inline bool GM_LOGINCOPY_Return::has_result() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_LOGINCOPY_Return::set_has_result() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_LOGINCOPY_Return::clear_has_result() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_LOGINCOPY_Return::clear_result() {
result_ = 0;
clear_has_result();
}
inline ::google::protobuf::int32 GM_LOGINCOPY_Return::result() const {
return result_;
}
inline void GM_LOGINCOPY_Return::set_result(::google::protobuf::int32 value) {
set_has_result();
result_ = value;
}
// -------------------------------------------------------------------
// GM_FishData
// required int32 playerid = 1;
inline bool GM_FishData::has_playerid() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_FishData::set_has_playerid() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_FishData::clear_has_playerid() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_FishData::clear_playerid() {
playerid_ = 0;
clear_has_playerid();
}
inline ::google::protobuf::int32 GM_FishData::playerid() const {
return playerid_;
}
inline void GM_FishData::set_playerid(::google::protobuf::int32 value) {
set_has_playerid();
playerid_ = value;
}
// optional string name = 2;
inline bool GM_FishData::has_name() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void GM_FishData::set_has_name() {
_has_bits_[0] |= 0x00000002u;
}
inline void GM_FishData::clear_has_name() {
_has_bits_[0] &= ~0x00000002u;
}
inline void GM_FishData::clear_name() {
if (name_ != &::google::protobuf::internal::kEmptyString) {
name_->clear();
}
clear_has_name();
}
inline const ::std::string& GM_FishData::name() const {
return *name_;
}
inline void GM_FishData::set_name(const ::std::string& value) {
set_has_name();
if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(value);
}
inline void GM_FishData::set_name(const char* value) {
set_has_name();
if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(value);
}
inline void GM_FishData::set_name(const char* value, size_t size) {
set_has_name();
if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
name_->assign(reinterpret_cast<const char*>(value), size);
}
inline ::std::string* GM_FishData::mutable_name() {
set_has_name();
if (name_ == &::google::protobuf::internal::kEmptyString) {
name_ = new ::std::string;
}
return name_;
}
inline ::std::string* GM_FishData::release_name() {
clear_has_name();
if (name_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = name_;
name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void GM_FishData::set_allocated_name(::std::string* name) {
if (name_ != &::google::protobuf::internal::kEmptyString) {
delete name_;
}
if (name) {
set_has_name();
name_ = name;
} else {
clear_has_name();
name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
}
// optional int32 place = 3;
inline bool GM_FishData::has_place() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
inline void GM_FishData::set_has_place() {
_has_bits_[0] |= 0x00000004u;
}
inline void GM_FishData::clear_has_place() {
_has_bits_[0] &= ~0x00000004u;
}
inline void GM_FishData::clear_place() {
place_ = 0;
clear_has_place();
}
inline ::google::protobuf::int32 GM_FishData::place() const {
return place_;
}
inline void GM_FishData::set_place(::google::protobuf::int32 value) {
set_has_place();
place_ = value;
}
// -------------------------------------------------------------------
// GM_RoomData
// required int32 ID = 1;
inline bool GM_RoomData::has_id() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_RoomData::set_has_id() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_RoomData::clear_has_id() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_RoomData::clear_id() {
id_ = 0;
clear_has_id();
}
inline ::google::protobuf::int32 GM_RoomData::id() const {
return id_;
}
inline void GM_RoomData::set_id(::google::protobuf::int32 value) {
set_has_id();
id_ = value;
}
// optional int32 ownid = 2;
inline bool GM_RoomData::has_ownid() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void GM_RoomData::set_has_ownid() {
_has_bits_[0] |= 0x00000002u;
}
inline void GM_RoomData::clear_has_ownid() {
_has_bits_[0] &= ~0x00000002u;
}
inline void GM_RoomData::clear_ownid() {
ownid_ = 0;
clear_has_ownid();
}
inline ::google::protobuf::int32 GM_RoomData::ownid() const {
return ownid_;
}
inline void GM_RoomData::set_ownid(::google::protobuf::int32 value) {
set_has_ownid();
ownid_ = value;
}
// optional int32 place = 3;
inline bool GM_RoomData::has_place() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
inline void GM_RoomData::set_has_place() {
_has_bits_[0] |= 0x00000004u;
}
inline void GM_RoomData::clear_has_place() {
_has_bits_[0] &= ~0x00000004u;
}
inline void GM_RoomData::clear_place() {
place_ = 0;
clear_has_place();
}
inline ::google::protobuf::int32 GM_RoomData::place() const {
return place_;
}
inline void GM_RoomData::set_place(::google::protobuf::int32 value) {
set_has_place();
place_ = value;
}
// repeated .GM_FishData m_fishman = 4;
inline int GM_RoomData::m_fishman_size() const {
return m_fishman_.size();
}
inline void GM_RoomData::clear_m_fishman() {
m_fishman_.Clear();
}
inline const ::GM_FishData& GM_RoomData::m_fishman(int index) const {
return m_fishman_.Get(index);
}
inline ::GM_FishData* GM_RoomData::mutable_m_fishman(int index) {
return m_fishman_.Mutable(index);
}
inline ::GM_FishData* GM_RoomData::add_m_fishman() {
return m_fishman_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::GM_FishData >&
GM_RoomData::m_fishman() const {
return m_fishman_;
}
inline ::google::protobuf::RepeatedPtrField< ::GM_FishData >*
GM_RoomData::mutable_m_fishman() {
return &m_fishman_;
}
// -------------------------------------------------------------------
// GM_AreaAllinfoReturn
// required int32 areaid = 1;
inline bool GM_AreaAllinfoReturn::has_areaid() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_AreaAllinfoReturn::set_has_areaid() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_AreaAllinfoReturn::clear_has_areaid() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_AreaAllinfoReturn::clear_areaid() {
areaid_ = 0;
clear_has_areaid();
}
inline ::google::protobuf::int32 GM_AreaAllinfoReturn::areaid() const {
return areaid_;
}
inline void GM_AreaAllinfoReturn::set_areaid(::google::protobuf::int32 value) {
set_has_areaid();
areaid_ = value;
}
// repeated .GM_RoomData m_data = 2;
inline int GM_AreaAllinfoReturn::m_data_size() const {
return m_data_.size();
}
inline void GM_AreaAllinfoReturn::clear_m_data() {
m_data_.Clear();
}
inline const ::GM_RoomData& GM_AreaAllinfoReturn::m_data(int index) const {
return m_data_.Get(index);
}
inline ::GM_RoomData* GM_AreaAllinfoReturn::mutable_m_data(int index) {
return m_data_.Mutable(index);
}
inline ::GM_RoomData* GM_AreaAllinfoReturn::add_m_data() {
return m_data_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::GM_RoomData >&
GM_AreaAllinfoReturn::m_data() const {
return m_data_;
}
inline ::google::protobuf::RepeatedPtrField< ::GM_RoomData >*
GM_AreaAllinfoReturn::mutable_m_data() {
return &m_data_;
}
// -------------------------------------------------------------------
// GM_AreaAllinfoRequest
// required int32 areaid = 1;
inline bool GM_AreaAllinfoRequest::has_areaid() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_AreaAllinfoRequest::set_has_areaid() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_AreaAllinfoRequest::clear_has_areaid() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_AreaAllinfoRequest::clear_areaid() {
areaid_ = 0;
clear_has_areaid();
}
inline ::google::protobuf::int32 GM_AreaAllinfoRequest::areaid() const {
return areaid_;
}
inline void GM_AreaAllinfoRequest::set_areaid(::google::protobuf::int32 value) {
set_has_areaid();
areaid_ = value;
}
// -------------------------------------------------------------------
// GM_Fish_All_request
// required int32 areaid = 1;
inline bool GM_Fish_All_request::has_areaid() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_Fish_All_request::set_has_areaid() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_Fish_All_request::clear_has_areaid() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_Fish_All_request::clear_areaid() {
areaid_ = 0;
clear_has_areaid();
}
inline ::google::protobuf::int32 GM_Fish_All_request::areaid() const {
return areaid_;
}
inline void GM_Fish_All_request::set_areaid(::google::protobuf::int32 value) {
set_has_areaid();
areaid_ = value;
}
// optional int32 id = 2;
inline bool GM_Fish_All_request::has_id() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void GM_Fish_All_request::set_has_id() {
_has_bits_[0] |= 0x00000002u;
}
inline void GM_Fish_All_request::clear_has_id() {
_has_bits_[0] &= ~0x00000002u;
}
inline void GM_Fish_All_request::clear_id() {
id_ = 0;
clear_has_id();
}
inline ::google::protobuf::int32 GM_Fish_All_request::id() const {
return id_;
}
inline void GM_Fish_All_request::set_id(::google::protobuf::int32 value) {
set_has_id();
id_ = value;
}
// -------------------------------------------------------------------
// GM_IsKilled_info
// required int32 roleid = 1;
inline bool GM_IsKilled_info::has_roleid() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_IsKilled_info::set_has_roleid() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_IsKilled_info::clear_has_roleid() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_IsKilled_info::clear_roleid() {
roleid_ = 0;
clear_has_roleid();
}
inline ::google::protobuf::int32 GM_IsKilled_info::roleid() const {
return roleid_;
}
inline void GM_IsKilled_info::set_roleid(::google::protobuf::int32 value) {
set_has_roleid();
roleid_ = value;
}
// optional int32 monsterid = 2;
inline bool GM_IsKilled_info::has_monsterid() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void GM_IsKilled_info::set_has_monsterid() {
_has_bits_[0] |= 0x00000002u;
}
inline void GM_IsKilled_info::clear_has_monsterid() {
_has_bits_[0] &= ~0x00000002u;
}
inline void GM_IsKilled_info::clear_monsterid() {
monsterid_ = 0;
clear_has_monsterid();
}
inline ::google::protobuf::int32 GM_IsKilled_info::monsterid() const {
return monsterid_;
}
inline void GM_IsKilled_info::set_monsterid(::google::protobuf::int32 value) {
set_has_monsterid();
monsterid_ = value;
}
// optional int32 monclassification = 3;
inline bool GM_IsKilled_info::has_monclassification() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
inline void GM_IsKilled_info::set_has_monclassification() {
_has_bits_[0] |= 0x00000004u;
}
inline void GM_IsKilled_info::clear_has_monclassification() {
_has_bits_[0] &= ~0x00000004u;
}
inline void GM_IsKilled_info::clear_monclassification() {
monclassification_ = 0;
clear_has_monclassification();
}
inline ::google::protobuf::int32 GM_IsKilled_info::monclassification() const {
return monclassification_;
}
inline void GM_IsKilled_info::set_monclassification(::google::protobuf::int32 value) {
set_has_monclassification();
monclassification_ = value;
}
// -------------------------------------------------------------------
// GM_Killer_info
// required int32 roleid = 1;
inline bool GM_Killer_info::has_roleid() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_Killer_info::set_has_roleid() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_Killer_info::clear_has_roleid() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_Killer_info::clear_roleid() {
roleid_ = 0;
clear_has_roleid();
}
inline ::google::protobuf::int32 GM_Killer_info::roleid() const {
return roleid_;
}
inline void GM_Killer_info::set_roleid(::google::protobuf::int32 value) {
set_has_roleid();
roleid_ = value;
}
// -------------------------------------------------------------------
// GM_Kill_Return
// required int32 m_iskiller = 1;
inline bool GM_Kill_Return::has_m_iskiller() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_Kill_Return::set_has_m_iskiller() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_Kill_Return::clear_has_m_iskiller() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_Kill_Return::clear_m_iskiller() {
m_iskiller_ = 0;
clear_has_m_iskiller();
}
inline ::google::protobuf::int32 GM_Kill_Return::m_iskiller() const {
return m_iskiller_;
}
inline void GM_Kill_Return::set_m_iskiller(::google::protobuf::int32 value) {
set_has_m_iskiller();
m_iskiller_ = value;
}
// required int32 m_killer = 2;
inline bool GM_Kill_Return::has_m_killer() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void GM_Kill_Return::set_has_m_killer() {
_has_bits_[0] |= 0x00000002u;
}
inline void GM_Kill_Return::clear_has_m_killer() {
_has_bits_[0] &= ~0x00000002u;
}
inline void GM_Kill_Return::clear_m_killer() {
m_killer_ = 0;
clear_has_m_killer();
}
inline ::google::protobuf::int32 GM_Kill_Return::m_killer() const {
return m_killer_;
}
inline void GM_Kill_Return::set_m_killer(::google::protobuf::int32 value) {
set_has_m_killer();
m_killer_ = value;
}
// required int32 m_is = 3;
inline bool GM_Kill_Return::has_m_is() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
inline void GM_Kill_Return::set_has_m_is() {
_has_bits_[0] |= 0x00000004u;
}
inline void GM_Kill_Return::clear_has_m_is() {
_has_bits_[0] &= ~0x00000004u;
}
inline void GM_Kill_Return::clear_m_is() {
m_is_ = 0;
clear_has_m_is();
}
inline ::google::protobuf::int32 GM_Kill_Return::m_is() const {
return m_is_;
}
inline void GM_Kill_Return::set_m_is(::google::protobuf::int32 value) {
set_has_m_is();
m_is_ = value;
}
// optional int32 m_state = 4;
inline bool GM_Kill_Return::has_m_state() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
inline void GM_Kill_Return::set_has_m_state() {
_has_bits_[0] |= 0x00000008u;
}
inline void GM_Kill_Return::clear_has_m_state() {
_has_bits_[0] &= ~0x00000008u;
}
inline void GM_Kill_Return::clear_m_state() {
m_state_ = 0;
clear_has_m_state();
}
inline ::google::protobuf::int32 GM_Kill_Return::m_state() const {
return m_state_;
}
inline void GM_Kill_Return::set_m_state(::google::protobuf::int32 value) {
set_has_m_state();
m_state_ = value;
}
// repeated .SM_Fish_Object data = 5;
inline int GM_Kill_Return::data_size() const {
return data_.size();
}
inline void GM_Kill_Return::clear_data() {
data_.Clear();
}
inline const ::SM_Fish_Object& GM_Kill_Return::data(int index) const {
return data_.Get(index);
}
inline ::SM_Fish_Object* GM_Kill_Return::mutable_data(int index) {
return data_.Mutable(index);
}
inline ::SM_Fish_Object* GM_Kill_Return::add_data() {
return data_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::SM_Fish_Object >&
GM_Kill_Return::data() const {
return data_;
}
inline ::google::protobuf::RepeatedPtrField< ::SM_Fish_Object >*
GM_Kill_Return::mutable_data() {
return &data_;
}
// -------------------------------------------------------------------
// GM_leaveRequest
// required int32 areaid = 1;
inline bool GM_leaveRequest::has_areaid() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_leaveRequest::set_has_areaid() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_leaveRequest::clear_has_areaid() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_leaveRequest::clear_areaid() {
areaid_ = 0;
clear_has_areaid();
}
inline ::google::protobuf::int32 GM_leaveRequest::areaid() const {
return areaid_;
}
inline void GM_leaveRequest::set_areaid(::google::protobuf::int32 value) {
set_has_areaid();
areaid_ = value;
}
// required int32 roomid = 2;
inline bool GM_leaveRequest::has_roomid() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void GM_leaveRequest::set_has_roomid() {
_has_bits_[0] |= 0x00000002u;
}
inline void GM_leaveRequest::clear_has_roomid() {
_has_bits_[0] &= ~0x00000002u;
}
inline void GM_leaveRequest::clear_roomid() {
roomid_ = 0;
clear_has_roomid();
}
inline ::google::protobuf::int32 GM_leaveRequest::roomid() const {
return roomid_;
}
inline void GM_leaveRequest::set_roomid(::google::protobuf::int32 value) {
set_has_roomid();
roomid_ = value;
}
// -------------------------------------------------------------------
// GM_leaveReturn
// required int32 errorid = 1;
inline bool GM_leaveReturn::has_errorid() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_leaveReturn::set_has_errorid() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_leaveReturn::clear_has_errorid() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_leaveReturn::clear_errorid() {
errorid_ = 0;
clear_has_errorid();
}
inline ::google::protobuf::int32 GM_leaveReturn::errorid() const {
return errorid_;
}
inline void GM_leaveReturn::set_errorid(::google::protobuf::int32 value) {
set_has_errorid();
errorid_ = value;
}
// optional int32 roleid = 2;
inline bool GM_leaveReturn::has_roleid() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void GM_leaveReturn::set_has_roleid() {
_has_bits_[0] |= 0x00000002u;
}
inline void GM_leaveReturn::clear_has_roleid() {
_has_bits_[0] &= ~0x00000002u;
}
inline void GM_leaveReturn::clear_roleid() {
roleid_ = 0;
clear_has_roleid();
}
inline ::google::protobuf::int32 GM_leaveReturn::roleid() const {
return roleid_;
}
inline void GM_leaveReturn::set_roleid(::google::protobuf::int32 value) {
set_has_roleid();
roleid_ = value;
}
// -------------------------------------------------------------------
// GM_Fish_RoleAttack
// required int32 roleid = 1;
inline bool GM_Fish_RoleAttack::has_roleid() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_Fish_RoleAttack::set_has_roleid() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_Fish_RoleAttack::clear_has_roleid() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_Fish_RoleAttack::clear_roleid() {
roleid_ = 0;
clear_has_roleid();
}
inline ::google::protobuf::int32 GM_Fish_RoleAttack::roleid() const {
return roleid_;
}
inline void GM_Fish_RoleAttack::set_roleid(::google::protobuf::int32 value) {
set_has_roleid();
roleid_ = value;
}
// optional float posX = 2;
inline bool GM_Fish_RoleAttack::has_posx() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void GM_Fish_RoleAttack::set_has_posx() {
_has_bits_[0] |= 0x00000002u;
}
inline void GM_Fish_RoleAttack::clear_has_posx() {
_has_bits_[0] &= ~0x00000002u;
}
inline void GM_Fish_RoleAttack::clear_posx() {
posx_ = 0;
clear_has_posx();
}
inline float GM_Fish_RoleAttack::posx() const {
return posx_;
}
inline void GM_Fish_RoleAttack::set_posx(float value) {
set_has_posx();
posx_ = value;
}
// optional float posZ = 3;
inline bool GM_Fish_RoleAttack::has_posz() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
inline void GM_Fish_RoleAttack::set_has_posz() {
_has_bits_[0] |= 0x00000004u;
}
inline void GM_Fish_RoleAttack::clear_has_posz() {
_has_bits_[0] &= ~0x00000004u;
}
inline void GM_Fish_RoleAttack::clear_posz() {
posz_ = 0;
clear_has_posz();
}
inline float GM_Fish_RoleAttack::posz() const {
return posz_;
}
inline void GM_Fish_RoleAttack::set_posz(float value) {
set_has_posz();
posz_ = value;
}
// optional int32 time = 4;
inline bool GM_Fish_RoleAttack::has_time() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
inline void GM_Fish_RoleAttack::set_has_time() {
_has_bits_[0] |= 0x00000008u;
}
inline void GM_Fish_RoleAttack::clear_has_time() {
_has_bits_[0] &= ~0x00000008u;
}
inline void GM_Fish_RoleAttack::clear_time() {
time_ = 0;
clear_has_time();
}
inline ::google::protobuf::int32 GM_Fish_RoleAttack::time() const {
return time_;
}
inline void GM_Fish_RoleAttack::set_time(::google::protobuf::int32 value) {
set_has_time();
time_ = value;
}
// optional int32 guntype = 5;
inline bool GM_Fish_RoleAttack::has_guntype() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
inline void GM_Fish_RoleAttack::set_has_guntype() {
_has_bits_[0] |= 0x00000010u;
}
inline void GM_Fish_RoleAttack::clear_has_guntype() {
_has_bits_[0] &= ~0x00000010u;
}
inline void GM_Fish_RoleAttack::clear_guntype() {
guntype_ = 0;
clear_has_guntype();
}
inline ::google::protobuf::int32 GM_Fish_RoleAttack::guntype() const {
return guntype_;
}
inline void GM_Fish_RoleAttack::set_guntype(::google::protobuf::int32 value) {
set_has_guntype();
guntype_ = value;
}
// optional int32 gunid = 6;
inline bool GM_Fish_RoleAttack::has_gunid() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
inline void GM_Fish_RoleAttack::set_has_gunid() {
_has_bits_[0] |= 0x00000020u;
}
inline void GM_Fish_RoleAttack::clear_has_gunid() {
_has_bits_[0] &= ~0x00000020u;
}
inline void GM_Fish_RoleAttack::clear_gunid() {
gunid_ = 0;
clear_has_gunid();
}
inline ::google::protobuf::int32 GM_Fish_RoleAttack::gunid() const {
return gunid_;
}
inline void GM_Fish_RoleAttack::set_gunid(::google::protobuf::int32 value) {
set_has_gunid();
gunid_ = value;
}
// optional int32 iscan = 7;
inline bool GM_Fish_RoleAttack::has_iscan() const {
return (_has_bits_[0] & 0x00000040u) != 0;
}
inline void GM_Fish_RoleAttack::set_has_iscan() {
_has_bits_[0] |= 0x00000040u;
}
inline void GM_Fish_RoleAttack::clear_has_iscan() {
_has_bits_[0] &= ~0x00000040u;
}
inline void GM_Fish_RoleAttack::clear_iscan() {
iscan_ = 0;
clear_has_iscan();
}
inline ::google::protobuf::int32 GM_Fish_RoleAttack::iscan() const {
return iscan_;
}
inline void GM_Fish_RoleAttack::set_iscan(::google::protobuf::int32 value) {
set_has_iscan();
iscan_ = value;
}
// -------------------------------------------------------------------
// GM_Fish_Gun_request
// required int32 gunid = 1;
inline bool GM_Fish_Gun_request::has_gunid() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_Fish_Gun_request::set_has_gunid() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_Fish_Gun_request::clear_has_gunid() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_Fish_Gun_request::clear_gunid() {
gunid_ = 0;
clear_has_gunid();
}
inline ::google::protobuf::int32 GM_Fish_Gun_request::gunid() const {
return gunid_;
}
inline void GM_Fish_Gun_request::set_gunid(::google::protobuf::int32 value) {
set_has_gunid();
gunid_ = value;
}
// optional int32 gunrate = 2;
inline bool GM_Fish_Gun_request::has_gunrate() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void GM_Fish_Gun_request::set_has_gunrate() {
_has_bits_[0] |= 0x00000002u;
}
inline void GM_Fish_Gun_request::clear_has_gunrate() {
_has_bits_[0] &= ~0x00000002u;
}
inline void GM_Fish_Gun_request::clear_gunrate() {
gunrate_ = 0;
clear_has_gunrate();
}
inline ::google::protobuf::int32 GM_Fish_Gun_request::gunrate() const {
return gunrate_;
}
inline void GM_Fish_Gun_request::set_gunrate(::google::protobuf::int32 value) {
set_has_gunrate();
gunrate_ = value;
}
// optional int32 buy = 3;
inline bool GM_Fish_Gun_request::has_buy() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
inline void GM_Fish_Gun_request::set_has_buy() {
_has_bits_[0] |= 0x00000004u;
}
inline void GM_Fish_Gun_request::clear_has_buy() {
_has_bits_[0] &= ~0x00000004u;
}
inline void GM_Fish_Gun_request::clear_buy() {
buy_ = 0;
clear_has_buy();
}
inline ::google::protobuf::int32 GM_Fish_Gun_request::buy() const {
return buy_;
}
inline void GM_Fish_Gun_request::set_buy(::google::protobuf::int32 value) {
set_has_buy();
buy_ = value;
}
// -------------------------------------------------------------------
// GM_Fish_Gun_return
// required int32 errorid = 1;
inline bool GM_Fish_Gun_return::has_errorid() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_Fish_Gun_return::set_has_errorid() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_Fish_Gun_return::clear_has_errorid() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_Fish_Gun_return::clear_errorid() {
errorid_ = 0;
clear_has_errorid();
}
inline ::google::protobuf::int32 GM_Fish_Gun_return::errorid() const {
return errorid_;
}
inline void GM_Fish_Gun_return::set_errorid(::google::protobuf::int32 value) {
set_has_errorid();
errorid_ = value;
}
// optional int32 gunid = 2;
inline bool GM_Fish_Gun_return::has_gunid() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void GM_Fish_Gun_return::set_has_gunid() {
_has_bits_[0] |= 0x00000002u;
}
inline void GM_Fish_Gun_return::clear_has_gunid() {
_has_bits_[0] &= ~0x00000002u;
}
inline void GM_Fish_Gun_return::clear_gunid() {
gunid_ = 0;
clear_has_gunid();
}
inline ::google::protobuf::int32 GM_Fish_Gun_return::gunid() const {
return gunid_;
}
inline void GM_Fish_Gun_return::set_gunid(::google::protobuf::int32 value) {
set_has_gunid();
gunid_ = value;
}
// optional int32 gunrate = 3;
inline bool GM_Fish_Gun_return::has_gunrate() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
inline void GM_Fish_Gun_return::set_has_gunrate() {
_has_bits_[0] |= 0x00000004u;
}
inline void GM_Fish_Gun_return::clear_has_gunrate() {
_has_bits_[0] &= ~0x00000004u;
}
inline void GM_Fish_Gun_return::clear_gunrate() {
gunrate_ = 0;
clear_has_gunrate();
}
inline ::google::protobuf::int32 GM_Fish_Gun_return::gunrate() const {
return gunrate_;
}
inline void GM_Fish_Gun_return::set_gunrate(::google::protobuf::int32 value) {
set_has_gunrate();
gunrate_ = value;
}
// optional int32 roleid = 4;
inline bool GM_Fish_Gun_return::has_roleid() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
inline void GM_Fish_Gun_return::set_has_roleid() {
_has_bits_[0] |= 0x00000008u;
}
inline void GM_Fish_Gun_return::clear_has_roleid() {
_has_bits_[0] &= ~0x00000008u;
}
inline void GM_Fish_Gun_return::clear_roleid() {
roleid_ = 0;
clear_has_roleid();
}
inline ::google::protobuf::int32 GM_Fish_Gun_return::roleid() const {
return roleid_;
}
inline void GM_Fish_Gun_return::set_roleid(::google::protobuf::int32 value) {
set_has_roleid();
roleid_ = value;
}
// -------------------------------------------------------------------
// SM_Fish_Object
// required int32 objectid = 1;
inline bool SM_Fish_Object::has_objectid() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void SM_Fish_Object::set_has_objectid() {
_has_bits_[0] |= 0x00000001u;
}
inline void SM_Fish_Object::clear_has_objectid() {
_has_bits_[0] &= ~0x00000001u;
}
inline void SM_Fish_Object::clear_objectid() {
objectid_ = 0;
clear_has_objectid();
}
inline ::google::protobuf::int32 SM_Fish_Object::objectid() const {
return objectid_;
}
inline void SM_Fish_Object::set_objectid(::google::protobuf::int32 value) {
set_has_objectid();
objectid_ = value;
}
// optional int32 num = 2;
inline bool SM_Fish_Object::has_num() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void SM_Fish_Object::set_has_num() {
_has_bits_[0] |= 0x00000002u;
}
inline void SM_Fish_Object::clear_has_num() {
_has_bits_[0] &= ~0x00000002u;
}
inline void SM_Fish_Object::clear_num() {
num_ = 0;
clear_has_num();
}
inline ::google::protobuf::int32 SM_Fish_Object::num() const {
return num_;
}
inline void SM_Fish_Object::set_num(::google::protobuf::int32 value) {
set_has_num();
num_ = value;
}
// -------------------------------------------------------------------
// GM_FishMoney_return
// required int32 roleid = 1;
inline bool GM_FishMoney_return::has_roleid() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_FishMoney_return::set_has_roleid() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_FishMoney_return::clear_has_roleid() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_FishMoney_return::clear_roleid() {
roleid_ = 0;
clear_has_roleid();
}
inline ::google::protobuf::int32 GM_FishMoney_return::roleid() const {
return roleid_;
}
inline void GM_FishMoney_return::set_roleid(::google::protobuf::int32 value) {
set_has_roleid();
roleid_ = value;
}
// optional int32 money = 2;
inline bool GM_FishMoney_return::has_money() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void GM_FishMoney_return::set_has_money() {
_has_bits_[0] |= 0x00000002u;
}
inline void GM_FishMoney_return::clear_has_money() {
_has_bits_[0] &= ~0x00000002u;
}
inline void GM_FishMoney_return::clear_money() {
money_ = 0;
clear_has_money();
}
inline ::google::protobuf::int32 GM_FishMoney_return::money() const {
return money_;
}
inline void GM_FishMoney_return::set_money(::google::protobuf::int32 value) {
set_has_money();
money_ = value;
}
// -------------------------------------------------------------------
// GM_FishGun_Request
// required int32 roleid = 1;
inline bool GM_FishGun_Request::has_roleid() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_FishGun_Request::set_has_roleid() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_FishGun_Request::clear_has_roleid() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_FishGun_Request::clear_roleid() {
roleid_ = 0;
clear_has_roleid();
}
inline ::google::protobuf::int32 GM_FishGun_Request::roleid() const {
return roleid_;
}
inline void GM_FishGun_Request::set_roleid(::google::protobuf::int32 value) {
set_has_roleid();
roleid_ = value;
}
// -------------------------------------------------------------------
// GM_Fish_Gun
// required int32 gunid = 1;
inline bool GM_Fish_Gun::has_gunid() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_Fish_Gun::set_has_gunid() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_Fish_Gun::clear_has_gunid() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_Fish_Gun::clear_gunid() {
gunid_ = 0;
clear_has_gunid();
}
inline ::google::protobuf::int32 GM_Fish_Gun::gunid() const {
return gunid_;
}
inline void GM_Fish_Gun::set_gunid(::google::protobuf::int32 value) {
set_has_gunid();
gunid_ = value;
}
// -------------------------------------------------------------------
// GM_FishGun_Return
// required int32 selfgunid = 1;
inline bool GM_FishGun_Return::has_selfgunid() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_FishGun_Return::set_has_selfgunid() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_FishGun_Return::clear_has_selfgunid() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_FishGun_Return::clear_selfgunid() {
selfgunid_ = 0;
clear_has_selfgunid();
}
inline ::google::protobuf::int32 GM_FishGun_Return::selfgunid() const {
return selfgunid_;
}
inline void GM_FishGun_Return::set_selfgunid(::google::protobuf::int32 value) {
set_has_selfgunid();
selfgunid_ = value;
}
// optional int32 selfgunrate = 2;
inline bool GM_FishGun_Return::has_selfgunrate() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void GM_FishGun_Return::set_has_selfgunrate() {
_has_bits_[0] |= 0x00000002u;
}
inline void GM_FishGun_Return::clear_has_selfgunrate() {
_has_bits_[0] &= ~0x00000002u;
}
inline void GM_FishGun_Return::clear_selfgunrate() {
selfgunrate_ = 0;
clear_has_selfgunrate();
}
inline ::google::protobuf::int32 GM_FishGun_Return::selfgunrate() const {
return selfgunrate_;
}
inline void GM_FishGun_Return::set_selfgunrate(::google::protobuf::int32 value) {
set_has_selfgunrate();
selfgunrate_ = value;
}
// optional int32 guntate = 3;
inline bool GM_FishGun_Return::has_guntate() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
inline void GM_FishGun_Return::set_has_guntate() {
_has_bits_[0] |= 0x00000004u;
}
inline void GM_FishGun_Return::clear_has_guntate() {
_has_bits_[0] &= ~0x00000004u;
}
inline void GM_FishGun_Return::clear_guntate() {
guntate_ = 0;
clear_has_guntate();
}
inline ::google::protobuf::int32 GM_FishGun_Return::guntate() const {
return guntate_;
}
inline void GM_FishGun_Return::set_guntate(::google::protobuf::int32 value) {
set_has_guntate();
guntate_ = value;
}
// optional int32 roleid = 4;
inline bool GM_FishGun_Return::has_roleid() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
inline void GM_FishGun_Return::set_has_roleid() {
_has_bits_[0] |= 0x00000008u;
}
inline void GM_FishGun_Return::clear_has_roleid() {
_has_bits_[0] &= ~0x00000008u;
}
inline void GM_FishGun_Return::clear_roleid() {
roleid_ = 0;
clear_has_roleid();
}
inline ::google::protobuf::int32 GM_FishGun_Return::roleid() const {
return roleid_;
}
inline void GM_FishGun_Return::set_roleid(::google::protobuf::int32 value) {
set_has_roleid();
roleid_ = value;
}
// optional int32 power = 5;
inline bool GM_FishGun_Return::has_power() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
inline void GM_FishGun_Return::set_has_power() {
_has_bits_[0] |= 0x00000010u;
}
inline void GM_FishGun_Return::clear_has_power() {
_has_bits_[0] &= ~0x00000010u;
}
inline void GM_FishGun_Return::clear_power() {
power_ = 0;
clear_has_power();
}
inline ::google::protobuf::int32 GM_FishGun_Return::power() const {
return power_;
}
inline void GM_FishGun_Return::set_power(::google::protobuf::int32 value) {
set_has_power();
power_ = value;
}
// repeated .GM_Fish_Gun data = 6;
inline int GM_FishGun_Return::data_size() const {
return data_.size();
}
inline void GM_FishGun_Return::clear_data() {
data_.Clear();
}
inline const ::GM_Fish_Gun& GM_FishGun_Return::data(int index) const {
return data_.Get(index);
}
inline ::GM_Fish_Gun* GM_FishGun_Return::mutable_data(int index) {
return data_.Mutable(index);
}
inline ::GM_Fish_Gun* GM_FishGun_Return::add_data() {
return data_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::GM_Fish_Gun >&
GM_FishGun_Return::data() const {
return data_;
}
inline ::google::protobuf::RepeatedPtrField< ::GM_Fish_Gun >*
GM_FishGun_Return::mutable_data() {
return &data_;
}
// -------------------------------------------------------------------
// GM_Fish_attack
// required int32 roleid = 1;
inline bool GM_Fish_attack::has_roleid() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_Fish_attack::set_has_roleid() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_Fish_attack::clear_has_roleid() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_Fish_attack::clear_roleid() {
roleid_ = 0;
clear_has_roleid();
}
inline ::google::protobuf::int32 GM_Fish_attack::roleid() const {
return roleid_;
}
inline void GM_Fish_attack::set_roleid(::google::protobuf::int32 value) {
set_has_roleid();
roleid_ = value;
}
// repeated int32 fishid = 2;
inline int GM_Fish_attack::fishid_size() const {
return fishid_.size();
}
inline void GM_Fish_attack::clear_fishid() {
fishid_.Clear();
}
inline ::google::protobuf::int32 GM_Fish_attack::fishid(int index) const {
return fishid_.Get(index);
}
inline void GM_Fish_attack::set_fishid(int index, ::google::protobuf::int32 value) {
fishid_.Set(index, value);
}
inline void GM_Fish_attack::add_fishid(::google::protobuf::int32 value) {
fishid_.Add(value);
}
inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
GM_Fish_attack::fishid() const {
return fishid_;
}
inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
GM_Fish_attack::mutable_fishid() {
return &fishid_;
}
// -------------------------------------------------------------------
// GM_Fish_RoleAttack_request
// required int32 roleid = 1;
inline bool GM_Fish_RoleAttack_request::has_roleid() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_Fish_RoleAttack_request::set_has_roleid() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_Fish_RoleAttack_request::clear_has_roleid() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_Fish_RoleAttack_request::clear_roleid() {
roleid_ = 0;
clear_has_roleid();
}
inline ::google::protobuf::int32 GM_Fish_RoleAttack_request::roleid() const {
return roleid_;
}
inline void GM_Fish_RoleAttack_request::set_roleid(::google::protobuf::int32 value) {
set_has_roleid();
roleid_ = value;
}
// optional int32 time = 2;
inline bool GM_Fish_RoleAttack_request::has_time() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void GM_Fish_RoleAttack_request::set_has_time() {
_has_bits_[0] |= 0x00000002u;
}
inline void GM_Fish_RoleAttack_request::clear_has_time() {
_has_bits_[0] &= ~0x00000002u;
}
inline void GM_Fish_RoleAttack_request::clear_time() {
time_ = 0;
clear_has_time();
}
inline ::google::protobuf::int32 GM_Fish_RoleAttack_request::time() const {
return time_;
}
inline void GM_Fish_RoleAttack_request::set_time(::google::protobuf::int32 value) {
set_has_time();
time_ = value;
}
// optional int32 guntype = 3;
inline bool GM_Fish_RoleAttack_request::has_guntype() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
inline void GM_Fish_RoleAttack_request::set_has_guntype() {
_has_bits_[0] |= 0x00000004u;
}
inline void GM_Fish_RoleAttack_request::clear_has_guntype() {
_has_bits_[0] &= ~0x00000004u;
}
inline void GM_Fish_RoleAttack_request::clear_guntype() {
guntype_ = 0;
clear_has_guntype();
}
inline ::google::protobuf::int32 GM_Fish_RoleAttack_request::guntype() const {
return guntype_;
}
inline void GM_Fish_RoleAttack_request::set_guntype(::google::protobuf::int32 value) {
set_has_guntype();
guntype_ = value;
}
// optional int32 iscan = 4;
inline bool GM_Fish_RoleAttack_request::has_iscan() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
inline void GM_Fish_RoleAttack_request::set_has_iscan() {
_has_bits_[0] |= 0x00000008u;
}
inline void GM_Fish_RoleAttack_request::clear_has_iscan() {
_has_bits_[0] &= ~0x00000008u;
}
inline void GM_Fish_RoleAttack_request::clear_iscan() {
iscan_ = 0;
clear_has_iscan();
}
inline ::google::protobuf::int32 GM_Fish_RoleAttack_request::iscan() const {
return iscan_;
}
inline void GM_Fish_RoleAttack_request::set_iscan(::google::protobuf::int32 value) {
set_has_iscan();
iscan_ = value;
}
// optional int32 firetime = 5;
inline bool GM_Fish_RoleAttack_request::has_firetime() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
inline void GM_Fish_RoleAttack_request::set_has_firetime() {
_has_bits_[0] |= 0x00000010u;
}
inline void GM_Fish_RoleAttack_request::clear_has_firetime() {
_has_bits_[0] &= ~0x00000010u;
}
inline void GM_Fish_RoleAttack_request::clear_firetime() {
firetime_ = 0;
clear_has_firetime();
}
inline ::google::protobuf::int32 GM_Fish_RoleAttack_request::firetime() const {
return firetime_;
}
inline void GM_Fish_RoleAttack_request::set_firetime(::google::protobuf::int32 value) {
set_has_firetime();
firetime_ = value;
}
// optional int32 firelast = 6;
inline bool GM_Fish_RoleAttack_request::has_firelast() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
inline void GM_Fish_RoleAttack_request::set_has_firelast() {
_has_bits_[0] |= 0x00000020u;
}
inline void GM_Fish_RoleAttack_request::clear_has_firelast() {
_has_bits_[0] &= ~0x00000020u;
}
inline void GM_Fish_RoleAttack_request::clear_firelast() {
firelast_ = 0;
clear_has_firelast();
}
inline ::google::protobuf::int32 GM_Fish_RoleAttack_request::firelast() const {
return firelast_;
}
inline void GM_Fish_RoleAttack_request::set_firelast(::google::protobuf::int32 value) {
set_has_firelast();
firelast_ = value;
}
// -------------------------------------------------------------------
// GM_Fish_Kill_Return
// required int32 m_killer = 1;
inline bool GM_Fish_Kill_Return::has_m_killer() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_Fish_Kill_Return::set_has_m_killer() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_Fish_Kill_Return::clear_has_m_killer() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_Fish_Kill_Return::clear_m_killer() {
m_killer_ = 0;
clear_has_m_killer();
}
inline ::google::protobuf::int32 GM_Fish_Kill_Return::m_killer() const {
return m_killer_;
}
inline void GM_Fish_Kill_Return::set_m_killer(::google::protobuf::int32 value) {
set_has_m_killer();
m_killer_ = value;
}
// repeated int32 m_deadid = 2;
inline int GM_Fish_Kill_Return::m_deadid_size() const {
return m_deadid_.size();
}
inline void GM_Fish_Kill_Return::clear_m_deadid() {
m_deadid_.Clear();
}
inline ::google::protobuf::int32 GM_Fish_Kill_Return::m_deadid(int index) const {
return m_deadid_.Get(index);
}
inline void GM_Fish_Kill_Return::set_m_deadid(int index, ::google::protobuf::int32 value) {
m_deadid_.Set(index, value);
}
inline void GM_Fish_Kill_Return::add_m_deadid(::google::protobuf::int32 value) {
m_deadid_.Add(value);
}
inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
GM_Fish_Kill_Return::m_deadid() const {
return m_deadid_;
}
inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
GM_Fish_Kill_Return::mutable_m_deadid() {
return &m_deadid_;
}
// optional int32 errorid = 3;
inline bool GM_Fish_Kill_Return::has_errorid() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
inline void GM_Fish_Kill_Return::set_has_errorid() {
_has_bits_[0] |= 0x00000004u;
}
inline void GM_Fish_Kill_Return::clear_has_errorid() {
_has_bits_[0] &= ~0x00000004u;
}
inline void GM_Fish_Kill_Return::clear_errorid() {
errorid_ = 0;
clear_has_errorid();
}
inline ::google::protobuf::int32 GM_Fish_Kill_Return::errorid() const {
return errorid_;
}
inline void GM_Fish_Kill_Return::set_errorid(::google::protobuf::int32 value) {
set_has_errorid();
errorid_ = value;
}
// optional int32 m_state = 4;
inline bool GM_Fish_Kill_Return::has_m_state() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
inline void GM_Fish_Kill_Return::set_has_m_state() {
_has_bits_[0] |= 0x00000008u;
}
inline void GM_Fish_Kill_Return::clear_has_m_state() {
_has_bits_[0] &= ~0x00000008u;
}
inline void GM_Fish_Kill_Return::clear_m_state() {
m_state_ = 0;
clear_has_m_state();
}
inline ::google::protobuf::int32 GM_Fish_Kill_Return::m_state() const {
return m_state_;
}
inline void GM_Fish_Kill_Return::set_m_state(::google::protobuf::int32 value) {
set_has_m_state();
m_state_ = value;
}
// repeated .SM_Fish_Object data = 5;
inline int GM_Fish_Kill_Return::data_size() const {
return data_.size();
}
inline void GM_Fish_Kill_Return::clear_data() {
data_.Clear();
}
inline const ::SM_Fish_Object& GM_Fish_Kill_Return::data(int index) const {
return data_.Get(index);
}
inline ::SM_Fish_Object* GM_Fish_Kill_Return::mutable_data(int index) {
return data_.Mutable(index);
}
inline ::SM_Fish_Object* GM_Fish_Kill_Return::add_data() {
return data_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::SM_Fish_Object >&
GM_Fish_Kill_Return::data() const {
return data_;
}
inline ::google::protobuf::RepeatedPtrField< ::SM_Fish_Object >*
GM_Fish_Kill_Return::mutable_data() {
return &data_;
}
// -------------------------------------------------------------------
// GM_Fish_power_set_request
// required int32 power = 1;
inline bool GM_Fish_power_set_request::has_power() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_Fish_power_set_request::set_has_power() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_Fish_power_set_request::clear_has_power() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_Fish_power_set_request::clear_power() {
power_ = 0;
clear_has_power();
}
inline ::google::protobuf::int32 GM_Fish_power_set_request::power() const {
return power_;
}
inline void GM_Fish_power_set_request::set_power(::google::protobuf::int32 value) {
set_has_power();
power_ = value;
}
// -------------------------------------------------------------------
// GM_Fish_power_set_rturn
// required int32 errorid = 1;
inline bool GM_Fish_power_set_rturn::has_errorid() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void GM_Fish_power_set_rturn::set_has_errorid() {
_has_bits_[0] |= 0x00000001u;
}
inline void GM_Fish_power_set_rturn::clear_has_errorid() {
_has_bits_[0] &= ~0x00000001u;
}
inline void GM_Fish_power_set_rturn::clear_errorid() {
errorid_ = 0;
clear_has_errorid();
}
inline ::google::protobuf::int32 GM_Fish_power_set_rturn::errorid() const {
return errorid_;
}
inline void GM_Fish_power_set_rturn::set_errorid(::google::protobuf::int32 value) {
set_has_errorid();
errorid_ = value;
}
// @@protoc_insertion_point(namespace_scope)
#ifndef SWIG
namespace google {
namespace protobuf {
} // namespace google
} // namespace protobuf
#endif // SWIG
// @@protoc_insertion_point(global_scope)
#ifdef _MSC_VER
# pragma warning(pop)
#endif
#endif // PROTOBUF_Fish_2etxt__INCLUDED
| [
"wellshsu1004@gmail.com"
] | wellshsu1004@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.