blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
2
247
content_id
stringlengths
40
40
detected_licenses
listlengths
0
57
license_type
stringclasses
2 values
repo_name
stringlengths
4
111
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
58
visit_date
timestamp[ns]date
2015-07-25 18:16:41
2023-09-06 10:45:08
revision_date
timestamp[ns]date
1970-01-14 14:03:36
2023-09-06 06:22:19
committer_date
timestamp[ns]date
1970-01-14 14:03:36
2023-09-06 06:22:19
github_id
int64
3.89k
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
25 values
gha_event_created_at
timestamp[ns]date
2012-06-07 00:51:45
2023-09-14 21:58:52
gha_created_at
timestamp[ns]date
2008-03-27 23:40:48
2023-08-24 19:49:39
gha_language
stringclasses
159 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
7
10.5M
extension
stringclasses
111 values
filename
stringlengths
1
195
text
stringlengths
7
10.5M
8892a72ba1bebf520391455aeb2d7570886b8af4
a21d7710b1d193ae7ee12205c2af2c47db09905e
/LeetCode/Problems/Algorithms/#1526_MinimumNumberOfIncrementsOnSubarraysToFormATargetArray_sol3_divide_and_conquer_O(N^2)_time_O(N)_extra_space_TLE.cpp
50b79031aa1596a2532a628564ad968dfab31277
[ "MIT" ]
permissive
Tudor67/Competitive-Programming
0db89e0f8376cac7c058185b84fdf11dcb99dae8
827cabc45951ac33f63d1d6e69e57897207ea666
refs/heads/master
2023-08-19T05:22:10.451067
2023-08-14T21:21:51
2023-08-14T21:21:51
243,604,510
5
0
null
null
null
null
UTF-8
C++
false
false
543
cpp
#1526_MinimumNumberOfIncrementsOnSubarraysToFormATargetArray_sol3_divide_and_conquer_O(N^2)_time_O(N)_extra_space_TLE.cpp
class Solution { private: int solve(vector<int>& a, const int& L, const int& R, int prevOperations){ if(L > R){ return 0; } int minIdx = min_element(a.begin() + L, a.begin() + R + 1) - a.begin(); int operations = a[minIdx] - prevOperations; return operations + solve(a, L, minIdx - 1, a[minIdx]) + solve(a, minIdx + 1, R, a[minIdx]); } public: int minNumberOperations(vector<int>& target) { return solve(target, 0, (int)target.size() - 1, 0); } };
c47afdcf6246b3f85451e015185d7bc527636c2c
97e0a4bba7bea5689a20d019f5523d5407bc606a
/CompCoding/HackerRank/implementation/queen'sAttackII.cpp
ea0c1d21f81376a899e4f703cf35565affbfc2a3
[]
no_license
rathore-rahul/Coding-Practice
a5fef06edaf500f337073b930b973c03ca5b5228
168320bb089304fb377e94053214b1aeaa80cef9
refs/heads/master
2020-11-24T19:00:40.241253
2019-12-16T04:20:09
2019-12-16T04:20:09
null
0
0
null
null
null
null
UTF-8
C++
false
false
711
cpp
queen'sAttackII.cpp
#include <bits/stdc++.h> using namespace std; set<pair<int,int> > obstacles; int n,k; int moveX[] = {1,1,1,-1,-1,-1,0,0}; int moveY[] = {1,-1,0,1,-1,0,1,-1}; bool isvalid(int x, int y){ auto it = obstacles.find({x,y}); return (x <= n && x >= 1 && y <= n && y >= 1 && it == obstacles.end()); } int main() { cin>>n>>k; int rq, cq, ro, co; cin>>rq>>cq; for(int i =0; i < k ;i++){ cin>>ro>>co; obstacles.insert({ro,co}); } int ans = 0; int x,y; for(int i =0; i < 8 ;i++){ x = rq, y = cq; while(isvalid(x+moveX[i],y+moveY[i])){ ans++; x += moveX[i]; y += moveY[i]; } } cout<<ans<<endl; }
c3eaac48e74fe2ed2277e48e25f7b808b26b562a
e71c33eb06a2df7a9107da3dfadb14287ee654f0
/Лабы/LR5/dop1/CreateArray.cpp
3865bd73b0a429966aa979f28935e9dc0a155a98
[]
no_license
OMWi/oaip-1sem
31f5b6174e9d610598929974535279957e83ae9b
b26b6c89cf8ad5074177eabc5e42c06282b9626a
refs/heads/master
2023-04-03T00:49:13.830469
2021-04-10T11:04:54
2021-04-10T11:04:54
356,553,021
0
0
null
null
null
null
UTF-8
C++
false
false
146
cpp
CreateArray.cpp
int **CreateArr(int line, int col) { int **arr = new int *[line]; for (int i = 0; i < line; i++) { arr[i] = new int [col]; } return arr; }
231ac2c8c93f7aaaf7d3b00e68e4e2e6c7849eb1
c8bb4cd63e577fadd1dc0ac820be166810d1a148
/Game/Game/Games/CampaignHelper.cpp
a001c3181727d459a3463fe038d9cf9a7c44403c
[]
no_license
rodrigobmg/Cloudberry-Kingdom-Port
c2a0aac9c7cb387775f6f00b3b12aae109a7ea39
74cd72e29ff5dfd8757d93abc92ed7e48a945fc8
refs/heads/master
2021-06-01T06:19:25.283550
2016-08-10T01:35:16
2016-08-10T01:35:16
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,149
cpp
CampaignHelper.cpp
#include <small_header.h> #include "Game/Games/CampaignHelper.h" #include "Game/Localization.h" #include "Core/Text/EzText.h" #include <Hacks/List.h> #include <Hacks/String.h> namespace CloudberryKingdom { void CampaignHelper::InitializeStatics() { Color tempVector[] = { bColor( 44, 44, 44 ), bColor( 144, 200, 225 ), bColor( 44, 203, 48 ), bColor( 248, 136, 8 ), bColor( 90, 90, 90 ), bColor( 0, 255, 255 ) }; CampaignHelper::DifficultyColor = VecFromArray( tempVector ); Localization::Words tempVector2[] = { Localization::Words_Custom, Localization::Words_Training, Localization::Words_Unpleasant, Localization::Words_Abusive, Localization::Words_Hardcore, Localization::Words_Masochistic }; CampaignHelper::DifficultyNames = VecFromArray( tempVector2 ); } // Statics std::vector<Color> CampaignHelper::DifficultyColor; std::vector<Localization::Words> CampaignHelper::DifficultyNames; std::wstring CampaignHelper::GetName( int difficulty ) { return EzText::ColorToMarkup( DifficultyColor[ difficulty ] ) + ToLower(Localization::WordString( DifficultyNames[ difficulty ] )) + EzText::ColorToMarkup(Color::White); } }
624dccffe533297989a9b80e369f1b54a00dd80a
bd51b9367b3071c835d351791037266814252f44
/Gestione_pulsanti/_100_loopback.ino
bd78e3a0332b8daa7c1654b89dee7ee3ec7225fb
[]
no_license
hardwareliberopinerolo/Analog_Buttons
489076e2fa8d615afc4bb422f7bda87234edb3eb
435ab7a200ccdf051fc732193bdaa3fb66bad815
refs/heads/master
2022-04-16T13:23:53.737715
2020-04-12T06:39:22
2020-04-12T06:39:22
254,894,578
0
0
null
null
null
null
UTF-8
C++
false
false
1,883
ino
_100_loopback.ino
void Set_click(){ Serial.println(F("Set Click")); } //------------------------------------------------------------------------------------------ void Set_hold(){ Serial.println(F("Set Hold")); } //------------------------------------------------------------------------------------------ void Left_click(){ Serial.println(F("Left Click")); } //------------------------------------------------------------------------------------------ void Left_hold(){ Serial.println(F("Left Hold")); } //------------------------------------------------------------------------------------------ void Right_click(){ Serial.println(F("Right Click")); } //------------------------------------------------------------------------------------------ void Right_hold(){ Serial.println(F("Right Hold")); } //------------------------------------------------------------------------------------------ void Up_click(){ Serial.println(F("Up Click")); } //------------------------------------------------------------------------------------------ void Up_hold(){ Serial.println(F("Up Hold")); } //------------------------------------------------------------------------------------------ void Down_click(){ Serial.println(F("Down Click")); } //------------------------------------------------------------------------------------------ void Down_hold(){ Serial.println(F("Down Hold")); } //------------------------------------------------------------------------------------------ void Nulla(){} //------------------------------------------------------------------------------------------ typedef void (*GeneralFunction) (); // From https://www.gammon.com.au/callbacks GeneralFunction doActionsArray [] = { // array of function pointers Nulla, Right_click, Right_hold, Up_click, Up_hold, Down_click, Down_hold, Left_click, Left_hold, Set_click, Set_hold, };
6de99f8166c820bff4003305b5e19e3b1a179210
b91a11fc769520d2658dd279a2aa45844671f471
/Game.h
fdae7bddfc14abc9063656ed78c036ff578b7bff
[]
no_license
ToshihitroNoda/Re-steroid-A
09674b08b97ce84715581a8e86dd8a24e041174d
da5c07b7c54768c3ce39447aafeac275ae941ad6
refs/heads/main
2023-04-12T13:32:51.695761
2021-05-13T01:38:15
2021-05-13T01:38:15
366,894,811
0
0
null
null
null
null
SHIFT_JIS
C++
false
false
1,745
h
Game.h
#ifndef GAME_H_ #define GAME_H_ #include <vector> // C#におけるListの機能 #include <memory> // メモリを扱う【ポインタに必要】 #include "GameManager.h" #include "DxLib.h" #include "Input.h" #include "MyMath.h" #include "Image.h" #include "Music.h" #include "Screen.h" #include "Map.h" #include "Rule.h" #include "Player.h" #include "Enemy.h" #include "Item.h" #include "PlayerBullet.h" #include "EnemyBullet.h" #include "Explosion.h" class Game { public: enum class State { Title, Massege, Play, GameOver, GameClear }; Game() {}; // コンストラクタ ~Game() {}; // デストラクタ void Init(); void Reset(); void Update(); void Draw(); static void GameOverChange(); int x = 0; int vx = 0; float scrollSpeed = 1.5f; // 背景のスクロール速度 int backx = 0; // スクロール用1枚目の背景画像のx座標 int backx_2 = Screen::Width; // スクロール用2枚目の背景画像のx座標 bool cutinFlg = false; // カットインのフラグ static bool abilityFlg; // 必殺技のフラグ int cutinCoolTime = 0; // カットイン表示時間// カットインのx座標の初期化 int cutinx = -480; // カットインのx座標 int cutinSpeed = 16; // カットインスピード static int score; // スコア static State state; GameManager& gm = GameManager::GetInstance(); // 唯一のゲームマネージャーへの参照 // 2)【shared_ptr】とは // 「兄弟で週刊少年ジャンプを【回し読みする】が // おかんに【全員読み終わるまでは捨てられないように】するため // 【読むつもりの人カウンタ】がゼロになると【おかんに捨てられる】」 }; #endif // !GAME_H_
08781e8213efc528f30cc7a2be7ea1922d4aa0fd
4352b5c9e6719d762e6a80e7a7799630d819bca3
/tutorials/eulerVortex.twitch.test-test-test/eulerVortex.cyclic.twitch/1.68/rho
262f626ce02195e5e75eb5910242f197182a8dbe
[]
no_license
dashqua/epicProject
d6214b57c545110d08ad053e68bc095f1d4dc725
54afca50a61c20c541ef43e3d96408ef72f0bcbc
refs/heads/master
2022-02-28T17:20:20.291864
2019-10-28T13:33:16
2019-10-28T13:33:16
184,294,390
1
0
null
null
null
null
UTF-8
C++
false
false
74,907
rho
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 6 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "1.68"; object rho; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -3 0 0 0 0 0]; internalField nonuniform List<scalar> 10000 ( 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.39999 1.39999 1.39999 1.39999 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40002 1.40002 1.40002 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.39999 1.39999 1.39999 1.39999 1.39999 1.39999 1.39999 1.4 1.4 1.40001 1.40001 1.40002 1.40002 1.40002 1.40002 1.40002 1.40002 1.40002 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.39999 1.39999 1.39999 1.39998 1.39998 1.39998 1.39998 1.39998 1.39998 1.39999 1.4 1.40001 1.40002 1.40002 1.40003 1.40003 1.40003 1.40003 1.40003 1.40003 1.40002 1.40002 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.39999 1.39999 1.39998 1.39997 1.39997 1.39996 1.39996 1.39996 1.39996 1.39997 1.39998 1.4 1.40001 1.40002 1.40004 1.40004 1.40005 1.40005 1.40005 1.40005 1.40004 1.40003 1.40003 1.40002 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.39999 1.39999 1.39998 1.39997 1.39996 1.39995 1.39994 1.39994 1.39994 1.39994 1.39996 1.39997 1.39999 1.40001 1.40003 1.40005 1.40007 1.40007 1.40008 1.40007 1.40007 1.40006 1.40005 1.40004 1.40003 1.40002 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.39999 1.39999 1.39998 1.39997 1.39995 1.39994 1.39992 1.39991 1.39991 1.39991 1.39992 1.39993 1.39996 1.39999 1.40002 1.40005 1.40008 1.4001 1.40011 1.40011 1.40011 1.4001 1.40009 1.40007 1.40006 1.40004 1.40003 1.40002 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.39999 1.39998 1.39997 1.39995 1.39993 1.39991 1.39989 1.39987 1.39987 1.39987 1.39988 1.39991 1.39995 1.39999 1.40004 1.40008 1.40012 1.40014 1.40016 1.40016 1.40016 1.40014 1.40012 1.4001 1.40008 1.40006 1.40004 1.40003 1.40002 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.39999 1.39997 1.39995 1.39993 1.3999 1.39987 1.39984 1.39982 1.39981 1.39982 1.39984 1.39988 1.39994 1.4 1.40007 1.40013 1.40018 1.40022 1.40024 1.40024 1.40023 1.4002 1.40018 1.40014 1.40011 1.40008 1.40006 1.40004 1.40003 1.40002 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.39999 1.39998 1.39996 1.39993 1.3999 1.39986 1.39982 1.39979 1.39976 1.39976 1.39977 1.39981 1.39987 1.39995 1.40004 1.40013 1.40021 1.40028 1.40032 1.40035 1.40035 1.40033 1.40029 1.40025 1.4002 1.40015 1.40011 1.40008 1.40005 1.40003 1.40002 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.39999 1.39998 1.39995 1.39991 1.39987 1.39982 1.39977 1.39973 1.3997 1.3997 1.39973 1.39979 1.39988 1.39999 1.40012 1.40024 1.40035 1.40043 1.40049 1.40051 1.4005 1.40047 1.40041 1.40035 1.40028 1.40021 1.40015 1.4001 1.40007 1.40004 1.40002 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.39999 1.39997 1.39994 1.39989 1.39983 1.39977 1.39971 1.39967 1.39965 1.39967 1.39972 1.39982 1.39996 1.40012 1.40029 1.40045 1.40059 1.40069 1.40075 1.40076 1.40073 1.40067 1.40058 1.40048 1.40038 1.40028 1.4002 1.40013 1.40008 1.40005 1.40002 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40002 1.40002 1.40002 1.40001 1.4 1.39997 1.39993 1.39987 1.3998 1.39973 1.39967 1.39964 1.39964 1.39969 1.3998 1.39996 1.40016 1.40039 1.40062 1.40083 1.401 1.40112 1.40116 1.40115 1.40108 1.40096 1.40082 1.40066 1.40052 1.40038 1.40026 1.40017 1.4001 1.40005 1.40002 1.40001 1.4 1.39999 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40002 1.40003 1.40003 1.40003 1.40003 1.40001 1.39998 1.39993 1.39986 1.39979 1.39972 1.39966 1.39966 1.39971 1.39983 1.40002 1.40028 1.40059 1.40092 1.40123 1.4015 1.4017 1.40181 1.40182 1.40174 1.40159 1.40139 1.40116 1.40093 1.4007 1.40051 1.40035 1.40022 1.40012 1.40006 1.40002 1.4 1.39999 1.39999 1.39999 1.39999 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40002 1.40003 1.40004 1.40005 1.40005 1.40005 1.40003 1.39999 1.39994 1.39987 1.3998 1.39974 1.39973 1.39978 1.39993 1.40017 1.40051 1.40093 1.40139 1.40186 1.40229 1.40263 1.40285 1.40293 1.40286 1.40267 1.40239 1.40204 1.40167 1.4013 1.40097 1.40069 1.40045 1.40028 1.40015 1.40006 1.40001 1.39999 1.39997 1.39997 1.39998 1.39998 1.39999 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40002 1.40003 1.40004 1.40006 1.40007 1.40008 1.40008 1.40006 1.40003 1.39997 1.39991 1.39986 1.39986 1.39992 1.4001 1.40041 1.40086 1.40143 1.40209 1.40279 1.40345 1.40403 1.40445 1.40468 1.40469 1.40449 1.40411 1.4036 1.40302 1.40242 1.40185 1.40135 1.40094 1.4006 1.40036 1.40018 1.40007 1.4 1.39997 1.39995 1.39995 1.39996 1.39997 1.39998 1.39999 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40003 1.40004 1.40006 1.40008 1.4001 1.40012 1.40012 1.40012 1.40009 1.40005 1.40002 1.40002 1.40011 1.40033 1.40072 1.40131 1.40209 1.40301 1.40403 1.40505 1.40599 1.40676 1.40727 1.40749 1.40738 1.40696 1.40628 1.40543 1.40448 1.40354 1.40267 1.40191 1.4013 1.40082 1.40047 1.40022 1.40007 1.39998 1.39994 1.39993 1.39993 1.39994 1.39996 1.39997 1.39998 1.39999 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40002 1.40003 1.40004 1.40006 1.40008 1.40011 1.40014 1.40017 1.40019 1.4002 1.40019 1.40018 1.40021 1.40033 1.40059 1.40107 1.40182 1.40283 1.4041 1.40553 1.40705 1.40851 1.40981 1.41082 1.41145 1.41164 1.41135 1.41061 1.4095 1.40813 1.40665 1.4052 1.40388 1.40274 1.40183 1.40113 1.40063 1.40029 1.40008 1.39996 1.3999 1.39989 1.3999 1.39991 1.39994 1.39996 1.39997 1.39998 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40003 1.40005 1.40008 1.40011 1.40015 1.4002 1.40024 1.40028 1.40031 1.40034 1.4004 1.40055 1.40086 1.40142 1.40231 1.40358 1.40523 1.40718 1.40931 1.41147 1.41349 1.41523 1.41654 1.41731 1.41746 1.41694 1.41578 1.41409 1.41202 1.4098 1.40762 1.40564 1.40396 1.40261 1.4016 1.40088 1.4004 1.4001 1.39994 1.39986 1.39984 1.39985 1.39988 1.39991 1.39994 1.39996 1.39997 1.39999 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40002 1.40003 1.40004 1.40007 1.4001 1.40015 1.4002 1.40027 1.40034 1.4004 1.40047 1.40057 1.40075 1.40109 1.4017 1.40272 1.40422 1.40626 1.40877 1.41163 1.41463 1.41756 1.42022 1.42244 1.42408 1.425 1.42512 1.42436 1.42273 1.42034 1.4174 1.4142 1.41104 1.40816 1.40572 1.40376 1.4023 1.40126 1.40057 1.40015 1.39992 1.39982 1.39979 1.3998 1.39984 1.39988 1.39991 1.39994 1.39996 1.39998 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40003 1.40005 1.40009 1.40013 1.40019 1.40027 1.40036 1.40045 1.40056 1.4007 1.4009 1.40126 1.4019 1.40299 1.40466 1.40704 1.41011 1.41373 1.41767 1.42164 1.42536 1.42863 1.43129 1.4332 1.43428 1.43441 1.43349 1.43146 1.42837 1.42446 1.4201 1.41572 1.41166 1.40819 1.40541 1.40331 1.40184 1.40086 1.40026 1.39992 1.39977 1.39973 1.39975 1.39979 1.39984 1.39988 1.39992 1.39995 1.39997 1.39998 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40003 1.40004 1.40007 1.40011 1.40017 1.40025 1.40034 1.40046 1.4006 1.40077 1.401 1.40137 1.402 1.40309 1.40484 1.40744 1.41097 1.41533 1.42025 1.42534 1.4302 1.43453 1.43814 1.44097 1.44298 1.44415 1.44441 1.44356 1.44142 1.43789 1.43313 1.42759 1.4218 1.41633 1.41156 1.40769 1.40476 1.40268 1.40129 1.40044 1.39997 1.39974 1.39967 1.39968 1.39973 1.39979 1.39985 1.3999 1.39994 1.39996 1.39998 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40003 1.40005 1.40009 1.40013 1.40021 1.40031 1.40043 1.40058 1.40078 1.40103 1.4014 1.402 1.40303 1.40474 1.40741 1.41122 1.41618 1.42203 1.42827 1.43431 1.43965 1.444 1.44733 1.44974 1.45143 1.45255 1.4531 1.4528 1.45121 1.44791 1.44285 1.4364 1.42927 1.42225 1.41594 1.41073 1.40673 1.40386 1.40194 1.40074 1.40007 1.39974 1.39962 1.39962 1.39967 1.39975 1.39982 1.39988 1.39992 1.39995 1.39997 1.39999 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40004 1.40006 1.4001 1.40016 1.40025 1.40037 1.40053 1.40073 1.40099 1.40135 1.40191 1.40284 1.40442 1.40697 1.41081 1.41612 1.42272 1.43008 1.43736 1.44372 1.4486 1.45184 1.4537 1.45466 1.4553 1.45608 1.45717 1.45819 1.4583 1.45652 1.45229 1.44578 1.43776 1.4293 1.42138 1.41463 1.40933 1.40547 1.40285 1.4012 1.40025 1.39977 1.39958 1.39956 1.39961 1.3997 1.39978 1.39985 1.3999 1.39994 1.39997 1.39998 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40002 1.40004 1.40007 1.40012 1.4002 1.4003 1.40045 1.40064 1.40089 1.40123 1.40174 1.40256 1.40393 1.40622 1.40984 1.41513 1.42215 1.43044 1.439 1.44656 1.452 1.45479 1.45509 1.45365 1.4516 1.45011 1.45013 1.45208 1.4555 1.459 1.46075 1.45931 1.4543 1.44644 1.4371 1.42771 1.41935 1.41258 1.40755 1.40407 1.40185 1.40055 1.39987 1.39958 1.39951 1.39956 1.39965 1.39974 1.39982 1.39988 1.39993 1.39996 1.39998 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40003 1.40005 1.40008 1.40014 1.40023 1.40035 1.40052 1.40075 1.40107 1.40152 1.40221 1.40336 1.4053 1.40848 1.4134 1.42036 1.42919 1.43892 1.44792 1.45436 1.4569 1.4552 1.44998 1.44282 1.43575 1.43081 1.42955 1.43275 1.43987 1.44891 1.45686 1.46098 1.4599 1.45399 1.44487 1.43456 1.42475 1.41647 1.41012 1.40564 1.40273 1.40098 1.40004 1.39962 1.39949 1.39951 1.3996 1.3997 1.39979 1.39986 1.39991 1.39995 1.39997 1.39999 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40003 1.40006 1.40009 1.40016 1.40026 1.4004 1.4006 1.40087 1.40126 1.40184 1.40277 1.40433 1.40696 1.41122 1.41763 1.42638 1.43687 1.44741 1.45553 1.45877 1.45571 1.44643 1.43256 1.41688 1.40265 1.39287 1.3898 1.39462 1.40684 1.42378 1.44104 1.45412 1.46013 1.45871 1.45156 1.44133 1.43052 1.42085 1.41315 1.40756 1.40385 1.40157 1.40031 1.39971 1.3995 1.39949 1.39956 1.39967 1.39976 1.39984 1.3999 1.39994 1.39997 1.39998 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40004 1.40006 1.40011 1.40018 1.40029 1.40044 1.40067 1.40099 1.40146 1.40219 1.4034 1.40546 1.40891 1.4144 1.42244 1.43293 1.44463 1.45491 1.46026 1.45766 1.44576 1.42544 1.39966 1.37278 1.34945 1.33364 1.32828 1.33502 1.35355 1.38062 1.41032 1.43599 1.4527 1.45884 1.45593 1.44725 1.43624 1.42551 1.41652 1.4098 1.4052 1.40232 1.40069 1.39987 1.39954 1.39948 1.39954 1.39964 1.39974 1.39983 1.39989 1.39994 1.39996 1.39998 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40004 1.40007 1.40011 1.40019 1.40031 1.40048 1.40073 1.4011 1.40166 1.40257 1.4041 1.40674 1.41112 1.41796 1.42763 1.4396 1.45176 1.46029 1.46062 1.44922 1.42512 1.39044 1.34994 1.30981 1.27604 1.25339 1.24531 1.25405 1.27968 1.31861 1.36344 1.40507 1.43604 1.45299 1.45691 1.45155 1.4414 1.43015 1.4201 1.41227 1.40676 1.40323 1.40117 1.4001 1.39963 1.3995 1.39953 1.39963 1.39973 1.39982 1.39988 1.39993 1.39996 1.39998 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40004 1.40007 1.40012 1.4002 1.40032 1.40051 1.40078 1.40119 1.40185 1.40296 1.40486 1.40813 1.41352 1.42174 1.43292 1.4459 1.45749 1.46259 1.45555 1.43253 1.39328 1.34165 1.28461 1.23021 1.18547 1.15559 1.14443 1.15492 1.18784 1.23956 1.30132 1.3615 1.40977 1.44052 1.4538 1.45364 1.44557 1.43448 1.4237 1.41488 1.40848 1.40427 1.40175 1.4004 1.39977 1.39956 1.39955 1.39963 1.39972 1.39981 1.39988 1.39993 1.39996 1.39998 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40004 1.40007 1.40012 1.4002 1.40033 1.40052 1.40082 1.40127 1.40203 1.40335 1.40565 1.40959 1.41601 1.42558 1.43802 1.45134 1.46122 1.46126 1.44483 1.40795 1.3515 1.28154 1.20744 1.13887 1.08347 1.04648 1.03198 1.04374 1.08349 1.14789 1.22713 1.30724 1.37486 1.42173 1.4465 1.45325 1.44844 1.43826 1.42714 1.41752 1.41029 1.40541 1.40242 1.40077 1.39996 1.39965 1.39959 1.39964 1.39973 1.39981 1.39988 1.39993 1.39996 1.39998 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.4 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40004 1.40007 1.40012 1.4002 1.40033 1.40052 1.40083 1.40133 1.40219 1.40372 1.40644 1.41105 1.41848 1.42928 1.44261 1.45555 1.46265 1.45636 1.42919 1.3772 1.30277 1.21446 1.12404 1.04247 0.977505 0.934087 0.916374 0.928898 0.974465 1.05027 1.14599 1.24581 1.33346 1.39776 1.43552 1.45048 1.44995 1.44134 1.43028 1.42007 1.41211 1.40661 1.40315 1.40119 1.4002 1.39978 1.39966 1.39968 1.39975 1.39982 1.39988 1.39993 1.39996 1.39998 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40004 1.40007 1.40011 1.40019 1.40031 1.4005 1.40082 1.40135 1.4023 1.40405 1.40717 1.41245 1.4208 1.43263 1.44647 1.45836 1.46187 1.44857 1.41022 1.34308 1.2512 1.1458 1.04088 0.948253 0.875483 0.826999 0.806808 0.819816 0.869692 0.954541 1.06424 1.18185 1.28865 1.37045 1.42183 1.4458 1.45021 1.44369 1.43303 1.42245 1.41389 1.40781 1.40392 1.40165 1.40047 1.39993 1.39974 1.39973 1.39977 1.39984 1.39989 1.39993 1.39996 1.39998 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40002 1.40003 1.40006 1.4001 1.40017 1.40029 1.40047 1.40078 1.40134 1.40238 1.40432 1.40782 1.4137 1.42285 1.4355 1.44948 1.45983 1.45933 1.43899 1.39003 1.3089 1.20133 1.08111 0.964164 0.86287 0.784452 0.732822 0.711411 0.72476 0.777113 0.867935 0.988095 1.1203 1.24395 1.34206 1.40674 1.43986 1.44952 1.44538 1.43537 1.4246 1.41555 1.40897 1.40468 1.40214 1.40077 1.40011 1.39985 1.39979 1.39981 1.39986 1.39991 1.39994 1.39997 1.39998 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40003 1.40005 1.40009 1.40015 1.40025 1.40042 1.40072 1.4013 1.4024 1.4045 1.40834 1.41474 1.42453 1.43777 1.45165 1.46021 1.4557 1.4289 1.37077 1.27789 1.15739 1.02528 0.899051 0.791453 0.709505 0.656664 0.635268 0.648757 0.701712 0.79541 0.922354 1.06547 1.2028 1.315 1.39173 1.43346 1.44825 1.44654 1.4373 1.42646 1.41704 1.41005 1.40542 1.40262 1.40108 1.40031 1.39998 1.39987 1.39987 1.39989 1.39993 1.39995 1.39997 1.39999 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40004 1.40007 1.40012 1.4002 1.40035 1.40063 1.40121 1.40236 1.40458 1.40869 1.41552 1.42578 1.43938 1.45306 1.45991 1.4517 1.4195 1.35431 1.25274 1.12279 0.982071 0.84922 0.737319 0.653436 0.600691 0.580025 0.593319 0.645326 0.739356 0.869919 1.02047 1.16808 1.29149 1.37826 1.42744 1.44678 1.44731 1.43885 1.42802 1.41832 1.411 1.40609 1.40308 1.40139 1.40052 1.40012 1.39997 1.39992 1.39993 1.39995 1.39997 1.39998 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40003 1.40005 1.40008 1.40014 1.40026 1.40052 1.40108 1.40225 1.40454 1.40883 1.41599 1.42656 1.44034 1.45383 1.45932 1.44809 1.41176 1.34195 1.23524 1.0998 0.953922 0.81694 0.702288 0.617371 0.565191 0.545385 0.558173 0.608244 0.700817 0.832485 0.987406 1.14196 1.2734 1.36765 1.42257 1.44552 1.44786 1.44003 1.42924 1.41934 1.41179 1.40667 1.4035 1.40169 1.40073 1.40027 1.40007 1.39999 1.39997 1.39997 1.39998 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40004 1.40008 1.40017 1.40039 1.40092 1.40208 1.4044 1.40876 1.41611 1.42688 1.44068 1.45405 1.45877 1.44549 1.40643 1.33439 1.22614 1.08934 0.941918 0.803264 0.687165 0.60164 0.549979 0.530934 0.543188 0.590975 0.680912 0.811547 0.967927 1.12604 1.26212 1.36096 1.4195 1.44478 1.44828 1.44087 1.4301 1.42009 1.41239 1.40713 1.40385 1.40195 1.40093 1.40041 1.40017 1.40006 1.40002 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40007 1.40025 1.40073 1.40184 1.40414 1.40848 1.41587 1.42672 1.44046 1.4538 1.45844 1.44438 1.4041 1.33191 1.2253 1.09104 0.945725 0.808027 0.691871 0.606107 0.554867 0.536641 0.548758 0.594511 0.68109 0.808667 0.963465 1.12156 1.25865 1.35887 1.41867 1.44476 1.44867 1.44136 1.43058 1.42052 1.41276 1.40746 1.40413 1.40218 1.40111 1.40055 1.40026 1.40013 1.40006 1.40003 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.4 1.4 1.39999 1.39998 1.39997 1.39995 1.39994 1.39997 1.4001 1.40052 1.40156 1.40377 1.408 1.41527 1.42608 1.43974 1.45312 1.45836 1.44493 1.40515 1.33463 1.23209 1.10356 0.96371 0.829743 0.715251 0.629953 0.579365 0.5623 0.574957 0.619305 0.702204 0.824849 0.974899 1.12917 1.26343 1.3617 1.42021 1.44553 1.449 1.44149 1.43065 1.4206 1.4129 1.40763 1.40431 1.40236 1.40126 1.40067 1.40035 1.40019 1.40011 1.40006 1.40004 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.4 1.40001 1.4 1.4 1.4 1.4 1.39999 1.39997 1.39995 1.39992 1.39988 1.39987 1.39996 1.4003 1.40124 1.40331 1.40735 1.41436 1.42495 1.43851 1.45207 1.45839 1.44699 1.40963 1.34261 1.2459 1.12527 0.993515 0.865897 0.755128 0.671615 0.622493 0.607163 0.620959 0.664468 0.743577 0.859753 1.00205 1.14869 1.27627 1.36924 1.424 1.44697 1.4492 1.44119 1.43028 1.42034 1.41278 1.40764 1.4044 1.40247 1.40138 1.40077 1.40043 1.40025 1.40015 1.40009 1.40005 1.40003 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.4 1.39999 1.39998 1.39996 1.39993 1.39988 1.39983 1.39978 1.39982 1.40008 1.4009 1.40278 1.40654 1.41317 1.42338 1.43675 1.4506 1.45839 1.45009 1.41709 1.35559 1.26633 1.15504 1.03311 0.913928 0.809014 0.72921 0.682941 0.670023 0.685181 0.727927 0.802978 0.911416 1.04337 1.1789 1.29622 1.38082 1.42956 1.44881 1.44913 1.44041 1.42944 1.41971 1.41242 1.40748 1.40438 1.40253 1.40146 1.40085 1.4005 1.4003 1.40018 1.40011 1.40007 1.40004 1.40002 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.4 1.4 1.4 1.39999 1.39998 1.39995 1.39991 1.39985 1.39978 1.39971 1.3997 1.39988 1.40056 1.40222 1.40563 1.41177 1.42141 1.43442 1.44859 1.45811 1.45368 1.42659 1.37271 1.29273 1.19214 1.08131 0.97214 0.875057 0.801137 0.759268 0.749161 0.765341 0.806776 0.877064 0.97654 1.09602 1.21757 1.32161 1.39525 1.43616 1.45063 1.44859 1.43907 1.42812 1.41874 1.41182 1.40718 1.40427 1.40252 1.40149 1.4009 1.40054 1.40033 1.40021 1.40013 1.40008 1.40005 1.40003 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.39999 1.39997 1.39995 1.3999 1.39983 1.39974 1.39964 1.39959 1.3997 1.40024 1.40165 1.40464 1.41019 1.41914 1.43157 1.44589 1.45721 1.45709 1.43697 1.39244 1.32368 1.23542 1.13712 1.03942 0.952049 0.885998 0.84956 0.841994 0.858232 0.897271 0.961695 1.05091 1.1562 1.26162 1.35016 1.41101 1.44287 1.45196 1.44738 1.43712 1.42635 1.41744 1.411 1.40674 1.40406 1.40245 1.40149 1.40092 1.40057 1.40036 1.40022 1.40014 1.40008 1.40005 1.40003 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.4 1.4 1.4 1.4 1.39999 1.39997 1.39994 1.39989 1.39982 1.39972 1.3996 1.39952 1.39956 1.39996 1.40112 1.40366 1.40852 1.41662 1.42828 1.44243 1.4553 1.45953 1.44696 1.4129 1.35685 1.28263 1.1985 1.11391 1.03806 0.98124 0.950354 0.944395 0.959387 0.994719 1.05202 1.12973 1.21955 1.30749 1.37925 1.42636 1.44867 1.45229 1.44532 1.43455 1.42415 1.41588 1.41002 1.40618 1.40379 1.40233 1.40145 1.40092 1.40058 1.40037 1.40023 1.40014 1.40009 1.40005 1.40003 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.39999 1.39999 1.39997 1.39994 1.39989 1.39981 1.39971 1.39958 1.39946 1.39944 1.39972 1.40063 1.40273 1.40686 1.41397 1.42462 1.43827 1.45215 1.46026 1.4552 1.43202 1.38945 1.33041 1.26185 1.19189 1.12887 1.08171 1.05578 1.05041 1.06308 1.09358 1.14266 1.20795 1.28158 1.35151 1.4062 1.43959 1.45266 1.45124 1.44232 1.4314 1.4216 1.41411 1.40891 1.40555 1.40345 1.40217 1.40138 1.40089 1.40058 1.40037 1.40024 1.40015 1.40009 1.40005 1.40003 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.39999 1.39997 1.39994 1.39989 1.39982 1.39971 1.39957 1.39943 1.39937 1.39953 1.40022 1.4019 1.4053 1.41133 1.42073 1.43349 1.44772 1.45881 1.46049 1.44771 1.41849 1.37486 1.32241 1.26773 1.21784 1.17991 1.15829 1.15302 1.16292 1.18798 1.22819 1.28063 1.33804 1.39031 1.42866 1.44929 1.45415 1.4486 1.43841 1.42777 1.41883 1.41222 1.40774 1.40487 1.40308 1.40198 1.40129 1.40085 1.40055 1.40036 1.40023 1.40014 1.40009 1.40005 1.40003 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.4 1.4 1.4 1.39999 1.39997 1.39994 1.3999 1.39982 1.39972 1.39958 1.39944 1.39934 1.3994 1.39989 1.40119 1.4039 1.40885 1.41684 1.42828 1.44214 1.45507 1.4621 1.4584 1.44142 1.41234 1.3753 1.33523 1.29762 1.26823 1.2507 1.24572 1.25294 1.27244 1.30366 1.34347 1.38535 1.42121 1.44485 1.45453 1.45281 1.4444 1.43375 1.42383 1.41595 1.41031 1.40656 1.40418 1.40269 1.40176 1.40117 1.40078 1.40052 1.40034 1.40022 1.40014 1.40008 1.40005 1.40003 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.4 1.4 1.39999 1.39997 1.39995 1.3999 1.39984 1.39973 1.3996 1.39946 1.39933 1.39934 1.39966 1.40061 1.40271 1.40665 1.41319 1.42297 1.4357 1.44926 1.45988 1.46329 1.45666 1.44027 1.41673 1.38951 1.36286 1.34134 1.32796 1.32364 1.32853 1.3427 1.36533 1.39328 1.42102 1.44251 1.45393 1.4551 1.44883 1.43893 1.42862 1.4198 1.41311 1.40847 1.40543 1.40351 1.4023 1.40154 1.40104 1.40071 1.40047 1.40031 1.4002 1.40013 1.40008 1.40005 1.40003 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.4 1.39999 1.39998 1.39995 1.39991 1.39985 1.39976 1.39964 1.39949 1.39936 1.39931 1.3995 1.40018 1.40175 1.40479 1.40995 1.41796 1.42896 1.44191 1.45426 1.46248 1.46374 1.45746 1.44494 1.42848 1.41128 1.3968 1.38734 1.38387 1.38678 1.39612 1.41093 1.42834 1.44401 1.45389 1.45612 1.45155 1.44279 1.43269 1.42338 1.41589 1.41045 1.40676 1.40438 1.40288 1.40193 1.40132 1.40091 1.40062 1.40042 1.40028 1.40018 1.40011 1.40007 1.40004 1.40003 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.40001 1.4 1.40001 1.4 1.4 1.4 1.4 1.4 1.39999 1.39998 1.39996 1.39992 1.39987 1.39979 1.39968 1.39954 1.3994 1.39933 1.39943 1.39988 1.40102 1.40329 1.40724 1.41352 1.42253 1.43393 1.44627 1.45692 1.46334 1.46435 1.46023 1.45233 1.44283 1.43418 1.42809 1.42545 1.42669 1.43185 1.43998 1.44869 1.45493 1.45641 1.45268 1.44502 1.43556 1.42626 1.41835 1.41232 1.40806 1.40524 1.40344 1.40231 1.40159 1.40111 1.40078 1.40054 1.40037 1.40025 1.40016 1.4001 1.40006 1.40004 1.40002 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.40001 1.4 1.4 1.4 1.4 1.39999 1.39999 1.39997 1.39994 1.39989 1.39982 1.39972 1.3996 1.39947 1.39938 1.39941 1.39971 1.4005 1.40215 1.40509 1.40984 1.41687 1.42624 1.43726 1.44825 1.4572 1.46273 1.46437 1.46263 1.45888 1.4547 1.45128 1.44931 1.44923 1.45106 1.45396 1.4562 1.45596 1.45228 1.4455 1.43692 1.42807 1.42017 1.41384 1.4092 1.40602 1.40395 1.40264 1.40182 1.40128 1.40091 1.40065 1.40046 1.40031 1.40021 1.40014 1.40009 1.40005 1.40003 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.39999 1.39997 1.39995 1.39991 1.39985 1.39976 1.39966 1.39954 1.39945 1.39944 1.39962 1.40016 1.40133 1.40344 1.40694 1.4122 1.41948 1.42853 1.4384 1.44774 1.45526 1.4601 1.46223 1.46231 1.46123 1.4597 1.45823 1.45723 1.4567 1.45604 1.45418 1.45027 1.44419 1.4366 1.42855 1.42106 1.41479 1.41 1.40661 1.40434 1.40289 1.40198 1.4014 1.40101 1.40074 1.40053 1.40038 1.40026 1.40018 1.40012 1.40007 1.40005 1.40003 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.39999 1.39998 1.39996 1.39993 1.39987 1.39981 1.39972 1.39962 1.39953 1.3995 1.3996 1.39996 1.40076 1.40226 1.40476 1.40858 1.41397 1.42092 1.42899 1.43732 1.44489 1.45085 1.45486 1.45706 1.45779 1.45742 1.45633 1.45485 1.45297 1.45033 1.44644 1.4411 1.43461 1.42761 1.42088 1.41502 1.41035 1.40691 1.40455 1.40301 1.40205 1.40144 1.40105 1.40078 1.40058 1.40043 1.40031 1.40021 1.40014 1.4001 1.40006 1.40004 1.40002 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.4 1.4 1.39999 1.39999 1.39997 1.39994 1.3999 1.39984 1.39977 1.39969 1.39961 1.39958 1.39963 1.39987 1.40041 1.40145 1.40319 1.40588 1.40974 1.41483 1.42096 1.42764 1.43418 1.43987 1.44427 1.44721 1.44871 1.44894 1.44817 1.44657 1.44416 1.44079 1.4364 1.43112 1.42534 1.41962 1.41444 1.41015 1.40688 1.40454 1.40299 1.40201 1.4014 1.40102 1.40077 1.40059 1.40045 1.40033 1.40024 1.40017 1.40012 1.40008 1.40005 1.40003 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.39999 1.39998 1.39996 1.39992 1.39988 1.39982 1.39976 1.3997 1.39965 1.39969 1.39984 1.4002 1.40091 1.40211 1.40398 1.40666 1.41024 1.41465 1.41963 1.42472 1.42942 1.43332 1.43613 1.43775 1.43821 1.43764 1.43614 1.43375 1.4305 1.4265 1.42202 1.41743 1.41313 1.40942 1.40647 1.4043 1.40281 1.40185 1.40127 1.40092 1.4007 1.40055 1.40044 1.40034 1.40026 1.40019 1.40013 1.40009 1.40006 1.40004 1.40003 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.4 1.4 1.39999 1.39998 1.39997 1.39994 1.39991 1.39987 1.39982 1.39976 1.39973 1.39975 1.39985 1.4001 1.40059 1.4014 1.40267 1.40449 1.40694 1.40999 1.4135 1.41719 1.42072 1.42375 1.42603 1.4274 1.42784 1.42739 1.42609 1.42401 1.42127 1.41805 1.41461 1.41125 1.40824 1.40574 1.40383 1.40248 1.4016 1.40106 1.40075 1.40057 1.40046 1.40038 1.40031 1.40025 1.40019 1.40014 1.4001 1.40007 1.40005 1.40003 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.4 1.4 1.4 1.4 1.4 1.39999 1.39998 1.39996 1.39994 1.3999 1.39986 1.39983 1.3998 1.39981 1.39988 1.40005 1.40039 1.40095 1.4018 1.40303 1.40467 1.40671 1.40908 1.41162 1.41407 1.41622 1.41787 1.41888 1.41918 1.41877 1.4177 1.41604 1.41392 1.41153 1.40907 1.40677 1.40478 1.4032 1.40204 1.40127 1.40079 1.40053 1.4004 1.40033 1.40029 1.40026 1.40022 1.40018 1.40014 1.40011 1.40008 1.40005 1.40004 1.40002 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.39999 1.39998 1.39997 1.39995 1.39993 1.3999 1.39987 1.39986 1.39986 1.39992 1.40004 1.40028 1.40066 1.40124 1.40206 1.40314 1.40449 1.40604 1.4077 1.40931 1.41074 1.41182 1.41245 1.41258 1.41221 1.41135 1.41009 1.40855 1.40688 1.40522 1.40372 1.40248 1.40154 1.4009 1.4005 1.40029 1.4002 1.40018 1.40017 1.40017 1.40017 1.40015 1.40013 1.4001 1.40008 1.40006 1.40004 1.40003 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.39999 1.39998 1.39997 1.39995 1.39993 1.39991 1.39991 1.39991 1.39995 1.40004 1.40021 1.40048 1.40088 1.40143 1.40213 1.40301 1.404 1.40505 1.40606 1.40694 1.40759 1.40792 1.40792 1.40757 1.4069 1.40598 1.4049 1.40377 1.4027 1.40178 1.40105 1.40054 1.40022 1.40006 1.4 1.40001 1.40004 1.40007 1.40009 1.4001 1.4001 1.40009 1.40007 1.40005 1.40004 1.40003 1.40002 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.39999 1.39999 1.39998 1.39997 1.39995 1.39994 1.39994 1.39995 1.39998 1.40005 1.40017 1.40036 1.40064 1.40101 1.40148 1.40204 1.40266 1.40331 1.40392 1.40442 1.40477 1.4049 1.40481 1.40449 1.40397 1.40331 1.40257 1.40184 1.40117 1.40063 1.40023 1.39998 1.39986 1.39983 1.39985 1.39991 1.39996 1.40001 1.40004 1.40006 1.40006 1.40006 1.40005 1.40004 1.40003 1.40002 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.39999 1.39999 1.39998 1.39997 1.39996 1.39996 1.39997 1.4 1.40005 1.40014 1.40028 1.40048 1.40073 1.40104 1.40141 1.4018 1.40218 1.40254 1.4028 1.40296 1.40297 1.40283 1.40255 1.40215 1.40168 1.40118 1.40071 1.40031 1.40001 1.39981 1.39971 1.3997 1.39973 1.39979 1.39986 1.39993 1.39998 1.40001 1.40003 1.40004 1.40004 1.40003 1.40003 1.40002 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.39999 1.39999 1.39998 1.39998 1.39998 1.39999 1.40001 1.40005 1.40012 1.40022 1.40036 1.40054 1.40075 1.40099 1.40123 1.40146 1.40166 1.40178 1.40183 1.40178 1.40162 1.40138 1.40108 1.40075 1.40042 1.40012 1.39988 1.39972 1.39964 1.39962 1.39965 1.39971 1.39979 1.39986 1.39992 1.39996 1.4 1.40001 1.40002 1.40002 1.40002 1.40002 1.40002 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.39999 1.39999 1.39999 1.4 1.40002 1.40005 1.4001 1.40018 1.40028 1.4004 1.40055 1.4007 1.40086 1.40099 1.4011 1.40115 1.40114 1.40106 1.40091 1.40072 1.40049 1.40025 1.40003 1.39985 1.39971 1.39963 1.3996 1.39962 1.39967 1.39974 1.39981 1.39987 1.39992 1.39996 1.39999 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40002 1.40004 1.40008 1.40014 1.40021 1.4003 1.4004 1.4005 1.4006 1.40068 1.40074 1.40075 1.40071 1.40063 1.40051 1.40036 1.40019 1.40002 1.39987 1.39975 1.39967 1.39964 1.39964 1.39967 1.39972 1.39978 1.39984 1.39989 1.39993 1.39996 1.39999 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40002 1.40004 1.40006 1.40011 1.40016 1.40022 1.40029 1.40036 1.40042 1.40047 1.4005 1.4005 1.40046 1.40039 1.40029 1.40017 1.40004 1.39993 1.39983 1.39975 1.39971 1.39969 1.3997 1.39973 1.39978 1.39983 1.39987 1.39991 1.39995 1.39997 1.39999 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40002 1.40003 1.40005 1.40008 1.40012 1.40016 1.40021 1.40026 1.4003 1.40033 1.40034 1.40033 1.4003 1.40024 1.40017 1.40008 1.39999 1.39991 1.39983 1.39979 1.39976 1.39976 1.39977 1.3998 1.39983 1.39987 1.3999 1.39993 1.39996 1.39998 1.39999 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.4 1.40001 1.40001 1.4 1.4 1.4 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40002 1.40002 1.40004 1.40006 1.40008 1.40012 1.40015 1.40018 1.40021 1.40023 1.40023 1.40022 1.4002 1.40015 1.4001 1.40003 1.39997 1.39991 1.39987 1.39984 1.39982 1.39982 1.39983 1.39985 1.39988 1.39991 1.39993 1.39995 1.39997 1.39998 1.39999 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.40001 1.4 1.4 1.40001 1.4 1.4 1.40001 1.4 1.40001 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40002 1.40003 1.40004 1.40006 1.40008 1.4001 1.40013 1.40014 1.40016 1.40016 1.40015 1.40013 1.4001 1.40006 1.40002 1.39997 1.39993 1.3999 1.39988 1.39987 1.39987 1.39988 1.3999 1.39992 1.39993 1.39995 1.39997 1.39998 1.39999 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40003 1.40004 1.40006 1.40007 1.40009 1.4001 1.40011 1.40011 1.4001 1.40009 1.40007 1.40004 1.40001 1.39998 1.39995 1.39993 1.39992 1.39991 1.39991 1.39992 1.39993 1.39994 1.39996 1.39997 1.39998 1.39999 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.40001 1.4 1.4 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40002 1.40002 1.40003 1.40004 1.40005 1.40006 1.40007 1.40007 1.40007 1.40007 1.40006 1.40004 1.40002 1.40001 1.39999 1.39997 1.39995 1.39995 1.39994 1.39994 1.39995 1.39996 1.39996 1.39997 1.39998 1.39999 1.39999 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40002 1.40003 1.40003 1.40004 1.40004 1.40005 1.40005 1.40005 1.40004 1.40003 1.40002 1.4 1.39999 1.39998 1.39997 1.39997 1.39997 1.39997 1.39997 1.39997 1.39998 1.39998 1.39999 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40002 1.40002 1.40003 1.40003 1.40003 1.40003 1.40003 1.40003 1.40002 1.40001 1.4 1.4 1.39999 1.39998 1.39998 1.39998 1.39998 1.39998 1.39998 1.39999 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40002 1.40002 1.40002 1.40002 1.40002 1.40002 1.40001 1.40001 1.4 1.4 1.4 1.39999 1.39999 1.39999 1.39999 1.39999 1.39999 1.39999 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40002 1.40002 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.4 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.4 1.40001 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.4 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.40001 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.40001 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.4 1.4 1.4 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.40001 1.4 1.4 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.4 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.40001 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.4 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.40001 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 1.40001 ) ; boundaryField { emptyPatches_empt { type empty; } top_cyc { type cyclic; } bottom_cyc { type cyclic; } inlet_cyc { type cyclic; } outlet_cyc { type cyclic; } } // ************************************************************************* //
19451e7a21363bcd0f3b28d8db343f8af5d25671
c32ee8ade268240a8064e9b8efdbebfbaa46ddfa
/Libraries/m2sdk/Kaim/CMetaClass_TPL_D92ECD4E.h
bc6140c3c92dcb42ef1f3e1b336030b6073aaa94
[]
no_license
hopk1nz/maf2mp
6f65bd4f8114fdeb42f9407a4d158ad97f8d1789
814cab57dc713d9ff791dfb2a2abeb6af0e2f5a8
refs/heads/master
2021-03-12T23:56:24.336057
2015-08-22T13:53:10
2015-08-22T13:53:10
41,209,355
19
21
null
2015-08-31T05:28:13
2015-08-22T13:56:04
C++
UTF-8
C++
false
false
329
h
CMetaClass_TPL_D92ECD4E.h
// auto-generated file (rttidump-exporter by h0pk1nz) #pragma once namespace Kaim { /** Kaim::CMetaClass<Kaim::CAiMeshAccessor,Kaim::CAiMeshAccessor* (*)(void)> (VTable=0x01E9FB68) */ class CMetaClass_TPL_D92ECD4E { public: virtual void vfn_0001_3E3304D6() = 0; virtual void vfn_0002_3E3304D6() = 0; }; } // namespace Kaim
027ac29817a41d61da7b3be5c4f265ce37944573
24b1af231c4dc2343fd230773ce0b5e9435c57a2
/ofdEditor/ofd/DataTypes/page/CT_PageBlock.cpp
95b30cd2a0fbe5b38a5dcdea525c83e7e3d8d5b6
[ "MIT" ]
permissive
fucora/ofdEditor
d291b74c39c306da62eb7f557d7c9286698996cf
6218093d231199e796074e733697c727cbf4b8e5
refs/heads/master
2022-02-20T23:08:09.440940
2017-06-27T13:16:18
2017-06-27T13:16:18
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,598
cpp
CT_PageBlock.cpp
#include "./CT_PageBlock.h" #include "DataTypes/text/CT_Text.h" #include "../image/CT_Image.h" #include "../image/CT_Path.h" CT_PageBlock::CT_PageBlock() { text_object = new QVector<CT_Text *>(); path_object = new QVector<CT_Path *>(); image_object = new QVector<CT_Image *>(); pageblock = new QVector<CT_PageBlock *>(); } QVector<CT_Text *> *CT_PageBlock::getTextObject() { return text_object; } void CT_PageBlock::setTextObject(QVector<CT_Text *> *_text_object) { if (_text_object) { for (int i = 0; i < text_object->size(); i++) delete text_object->at(i); delete text_object; text_object = _text_object; } else throw InvalidValueException("Invalid value in TextObject in CT_PageBlock: null pointer"); } QVector<CT_Path *> *CT_PageBlock::getPathObject() { return path_object; } void CT_PageBlock::setPathObject(QVector<CT_Path *> *_path_object) { if (_path_object) { for (int i = 0; i < path_object->size(); i++) delete path_object->at(i); delete path_object; path_object = _path_object; } else throw InvalidValueException("Invalid value in PathObject in CT_PageBlock: null pointer"); } QVector<CT_Image *> *CT_PageBlock::getImageObject() { return image_object; } void CT_PageBlock::setImageObject(QVector<CT_Image *> *_image_object) { if (_image_object) { for (int i = 0; i < image_object->size(); i++) delete image_object->at(i); delete image_object; image_object = _image_object; } else throw InvalidValueException("Invalid value in ImageObject in CT_PageBlock: null pointer"); } QVector<CT_PageBlock *> *CT_PageBlock::getPageBlock() { return pageblock; } void CT_PageBlock::setPageBlock(QVector<CT_PageBlock *> *_pageblock) { if (_pageblock) { for (int i = 0; i < _pageblock->size(); i++) delete _pageblock->at(i); delete _pageblock; pageblock = _pageblock; } else throw InvalidValueException("Invalid value in PageBlock in CT_PageBlock: null pointer"); } CT_PageBlock::~CT_PageBlock() { for (int i = 0; i < text_object->size(); i++) delete text_object->at(i); for (int i = 0; i < path_object->size(); i++) delete path_object->at(i); for (int i = 0; i < image_object->size(); i++) delete image_object->at(i); for (int i = 0; i < pageblock->size(); i++) delete pageblock->at(i); delete text_object; delete path_object; delete image_object; delete pageblock; }
4f00e7cfe990e30720b9b4f25906a27aa1c5c2d8
2fa31ae8d02cd92bf24bd8cf0f2a611a02a28519
/before2018/baekjoon/2589.cpp
5c2b141832c8de7379591c428dd2232f254a2e89
[]
no_license
dlftls38/algorithms
3619186d8d832cda695dfbf985e5d86ef6f2f06e
18ab96bbb3c8512a2da180477e4cc36a25edd30d
refs/heads/master
2021-07-10T06:09:53.211350
2020-10-17T00:04:43
2020-10-17T00:04:43
206,953,967
0
0
null
null
null
null
UTF-8
C++
false
false
1,098
cpp
2589.cpp
#include <stdio.h> char a[60][60]; int max; int q[6000]; int q2[6000]; int q3[6000]; int top; int head; void gogo(int x,int y,int count,int check[60][60]){ if(count>max){ max=count; } if(a[x][y+1]=='L' && check[x][y+1]==0){ check[x][y+1]=1; q[top]=x; q3[top]=q3[head]+1; q2[top++]=y+1; } if(a[x][y-1]=='L' && check[x][y-1]==0){ check[x][y-1]=1; q[top]=x; q3[top]=q3[head]+1; q2[top++]=y-1; } if(a[x+1][y]=='L' && check[x+1][y]==0){ check[x+1][y]=1; q[top]=x+1; q3[top]=q3[head]+1; q2[top++]=y; } if(a[x-1][y]=='L' && check[x-1][y]==0){ check[x-1][y]=1; q[top]=x-1; q3[top]=q3[head]+1; q2[top++]=y; } head++; if(top!=head){ gogo(q[head],q2[head],q3[head],check); } } int main(){ int n,m; scanf("%d%d",&n,&m); int i,j,k,l; for(i=1;i<n+1;i++){ scanf("%s",a[i]); } for(i=1;i<n+1;i++){ for(j=m;j>-1;j--){ a[i][j]=a[i][j-1]; } a[i][0]=0; } for(i=1;i<n+1;i++){ for(j=1;j<m+1;j++){ if(a[i][j]=='L'){ top=0; head=0; int some[60][60]={0}; some[i][j]=1; top++; gogo(i,j,0,some); } } } printf("%d",max); }
19b01749f4d22dd34d608945bd768e70f0786878
bda7efb664f43334d04c386f9a3b692ebf25ec73
/h5xx/hdf5_compat.hpp
a2f71c6b15fadf2df6ff62bff05b0a811383df40
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
fhoefling/h5xx
7d1e83eb36399fbe9435271167799160902ca426
459f07af1e8d95543c2aead557a5b599e7fd7821
refs/heads/master
2023-04-21T18:32:41.908909
2023-04-10T18:53:20
2023-04-10T18:53:20
6,043,158
17
3
NOASSERTION
2019-05-02T12:01:31
2012-10-02T10:17:54
C++
UTF-8
C++
false
false
1,911
hpp
hdf5_compat.hpp
/* * Copyright © 2010 Peter Colberg * All rights reserved. * * This file is part of h5xx — a C++ wrapper for the HDF5 library. * * This software may be modified and distributed under the terms of the * 3-clause BSD license. See accompanying file LICENSE for details. */ #ifndef H5XX_COMPAT_HPP #define H5XX_COMPAT_HPP // HDF5 ≥ 1.8.15 does not compile properly with GCC ≥ 4.8 in C++11 mode due to // issues with SSE3 optimisation. For example, it emits: // // /usr/lib64/gcc/x86_64-unknown-linux-gnu/4.8.2/include/mmintrin.h:61:54: error: can’t convert between vector values of different size // return (__m64) __builtin_ia32_vec_init_v2si (__i, 0); // // A related issue is described in http://stackoverflow.com/questions/19043109 // // The following include serves as a work around, it must precede any HDF5 // headers. Thus, we can not even check for the HDF5 version used. #if __cplusplus >= 201103L # include <random> #endif // // h5xx wrapper supports the following HDF5 library versions: // // - HDF5 1.8.x compiled using --disable-deprecate-symbols // - HDF5 1.8.x compiled using --with-default-api-version=v18 // - HDF5 1.8.x compiled using --with-default-api-version=v16 // // In this compatibility header file, we define a common HDF5 C API // for all of the above versions, with the intent to minimize use // of versioned #ifdefs in h5xx wrapper functions. // // // Note for developers: If you make a change to h5xx wrapper, compile // and run the test suite for *all* supported HDF5 library versions. // /** * if using HDF5 1.8.x, force HDF 1.8 API as needed */ #define H5Dcreate_vers 2 #define H5Dopen_vers 2 #define H5E_auto_t_vers 2 #define H5Eget_auto_vers 2 #define H5Eprint_vers 2 #define H5Eset_auto_vers 2 #define H5Ewalk_vers 2 #define H5Gcreate_vers 2 #define H5Gopen_vers 2 #include <hdf5.h> #endif /* ! H5XX_COMPAT_HPP */
09fe08694ed8c4e5439c4889461edcd0b0c09d47
ac8f8db1d628aab4fc1dbcf99a843da30e799cbe
/SortAlgorithms/BucketSort.cpp
91eba3a45ec6a9861d654f48b3802c9d9574f3b3
[]
no_license
duckybsd/DataStructe-Algorithms_Study
da90c3de499679a035d249494e2811966f8fe319
1bc9cd5ad22b500902d183e6b971cbe06939dd24
refs/heads/master
2021-01-19T11:10:16.088835
2017-02-14T14:11:50
2017-02-14T14:11:50
null
0
0
null
null
null
null
GB18030
C++
false
false
1,743
cpp
BucketSort.cpp
#include<iostream> #include<vector> using std::vector; using std::cout; using std::endl; using std::cin; /*桶排序 */ //获得未排序数组中最大的一个元素值 int GetMaxVal(int* arr, int len) { int maxVal = arr[0]; //假设最大为arr[0] for (int i = 1; i < len; i++) //遍历比较,找到大的就赋值给maxVal { if (arr[i] > maxVal) maxVal = arr[i]; } return maxVal; //返回最大值 } void BucketSort(int *numbers, int length){ if (numbers == NULL || length <= 0){ cout << "wrong input!"; return; } int size = GetMaxVal(numbers,length) + 1; vector<int> bucket(size); for (int i = 0; i < length + 1; i++){ bucket[i] = 0; } // 计算数组中每个元素出现的次数 for (int i = 0; i < length; i++){ int j = numbers[i]; bucket[j] += 1; } // 排序 int count = 0; for (int i = 0; i < size; i++){ if (bucket[i] > 0){ for (int j = 0; j < bucket[i]; j++){ numbers[count] = i; count++; } } } } void Test(int *numbers, int length){ if (numbers == NULL) cout << "Test for NULL:"; else{ cout << "Test for array:{"; for (int i = 0; i < length; i++){ cout << numbers[i]; if (i == length - 1) cout << "}\n"; else cout << ", "; } } BucketSort(numbers, length); if (numbers != NULL){ cout << "after using BucketSort: "; for (int i = 0; i < length; i++){ cout << numbers[i]; if (i == length - 1) cout << "\n"; else cout << ", "; } } } // 测试 int main(void){ int t1[] = { 1, 3, 5, 2, 4, 8, 10, 9 }; int t2[] = { 1, 1, 3, 2, 2, 5, 6, 2, 10, 12, 8, 3 }; Test(t1, 8); Test(t2, 12); Test(NULL, 2); system("pause"); return 0; }
3742c5faf5758a2661d2ba65f54db6e035247e54
5f0ce4af2e66fce28a6a64dfc65822a505c16957
/Pacman4Two/sharedEnumerations.h
6540f1d56fd51cecd1ffe8d3099cac33ea579f95
[]
no_license
mszadko/SFML_Pacman4Two
b9bb33f219bd5f44f430c616c436b8ced27ba4ee
22ed79463a67ee7cf3ab5277fa72ca70ccf518e6
refs/heads/master
2021-07-13T21:40:04.990879
2020-08-27T08:50:47
2020-08-27T08:50:47
201,523,387
0
0
null
null
null
null
UTF-8
C++
false
false
1,159
h
sharedEnumerations.h
#pragma once #include <SFML/Graphics.hpp> #include <cmath> #include <string> enum PacketTag { Empty, ToServerClientPressedButton, ToClientPlayerNewWalkInfo, ToClientPositionCorrection }; enum Direction { UP, DOWN, LEFT, RIGHT, IDLE }; enum FoodType { EMPTY = 0, POWERUP = 2, REGULAR = 3 }; enum GameState { STOPPED, RUNNING }; enum ConnectionType { NONE, CLIENTONE, CLIENTTWO, SERVER }; enum PlayerNumer { FIRST = 0, SECOND = 1 }; enum WalkableID { GHOSTONE, GHOSTTWO, GHOSTTHREE, GHOSTFOUR, PLAYERONE, PLAYERTWO }; enum GhostType { RED, PINK, BLUE, ORANGE }; enum GhostFrightenedState { NOTFRIGHTENED, FRIGHTENED, FRIGHTENEDENDING }; static const int mapWidth = 28; static const int mapHeight = 31; static const int tileSize = 16; static const float ftileSize = 16.0f; const unsigned short serverPort = 54000; const unsigned short clientOnePort = 54001; const unsigned short clientTwoPort = 54002; template<typename T> T VectorDifferenceMagnitue(sf::Vector2<T> from, sf::Vector2<T> to) { sf::Vector2<T> diff = to - from; T distance = T(std::sqrt(std::pow(diff.x, 2) + std::pow(diff.y, 2))); return distance; }
12557ba94fc490985b329c3b2be1bc5c9a3b7635
c60377c51b1b332485fbd129d252732292b45121
/src/FrenetOptimalTrajectory/FrenetOptimalTrajectory.cpp
1981b35589a7ab342055b23bfb63ceec15646d37
[ "Apache-2.0" ]
permissive
kk2491/frenet_optimal_trajectory_planner
88c2ba78a16ebef1963219fb5238454d89aa9833
fb074f7cacbb7f1fcabf9cf498de3ded6dfcdc2c
refs/heads/master
2022-11-05T11:02:12.473643
2020-06-27T01:50:41
2020-06-27T01:50:41
276,134,849
1
0
Apache-2.0
2020-06-30T15:14:08
2020-06-30T15:14:08
null
UTF-8
C++
false
false
8,335
cpp
FrenetOptimalTrajectory.cpp
#include <iostream> #include <chrono> #include "FrenetOptimalTrajectory.h" #include "QuarticPolynomial.h" #include "QuinticPolynomial.h" #include "utils.h" using namespace std; // Compute the frenet optimal trajectory FrenetOptimalTrajectory::FrenetOptimalTrajectory( FrenetInitialConditions *fot_ic_, FrenetHyperparameters *fot_hp_) { auto start = chrono::high_resolution_clock::now(); // parse the waypoints and obstacles fot_ic = fot_ic_; fot_hp = fot_hp_; x.assign(fot_ic->wx, fot_ic->wx + fot_ic->nw); y.assign(fot_ic->wy, fot_ic->wy + fot_ic->nw); setObstacles(); // make sure best_frenet_path is initialized best_frenet_path = nullptr; // exit if not enough waypoints if (x.size() < 2) { return; } // construct spline path csp = new CubicSpline2D(x, y); // calculate the trajectories calc_frenet_paths(); // select the best path double mincost = INFINITY; for (FrenetPath* fp : frenet_paths) { if (fp->cf <= mincost) { mincost = fp->cf; best_frenet_path = fp; } } auto end = chrono::high_resolution_clock::now(); double run_time = chrono::duration_cast<chrono::nanoseconds>(end - start).count(); run_time *= 1e-6; //cout << "Planning runtime " << run_time << "\n"; } FrenetOptimalTrajectory::~FrenetOptimalTrajectory() { delete csp; for (FrenetPath* fp : frenet_paths) { delete fp; } for (Obstacle* ob : obstacles) { delete ob; } } // Return the best path FrenetPath* FrenetOptimalTrajectory::getBestPath() { return best_frenet_path; } // Calculate frenet paths void FrenetOptimalTrajectory::calc_frenet_paths() { double t, ti, tv; double lateral_deviation, lateral_velocity, lateral_acceleration, lateral_jerk; double longitudinal_acceleration, longitudinal_jerk; FrenetPath* fp, *tfp; int num_paths = 0; int num_viable_paths = 0; double valid_path_time = 0; double di = -fot_hp->max_road_width_l; // generate path to each offset goal while (di <= fot_hp->max_road_width_r) { ti = fot_hp->mint; // lateral motion planning while (ti <= fot_hp->maxt) { lateral_deviation = 0; lateral_velocity = 0; lateral_acceleration = 0; lateral_jerk = 0; fp = new FrenetPath(fot_hp); QuinticPolynomial lat_qp = QuinticPolynomial( fot_ic->c_d, fot_ic->c_d_d, fot_ic->c_d_dd, di, 0.0, 0.0, ti ); // construct frenet path t = 0; while (t <= ti) { fp->t.push_back(t); fp->d.push_back(lat_qp.calc_point(t)); fp->d_d.push_back(lat_qp.calc_first_derivative(t)); fp->d_dd.push_back(lat_qp.calc_second_derivative(t)); fp->d_ddd.push_back(lat_qp.calc_third_derivative(t)); lateral_deviation += abs(lat_qp.calc_point(t)); lateral_velocity += abs(lat_qp.calc_first_derivative(t)); lateral_acceleration += abs(lat_qp.calc_second_derivative(t)); lateral_jerk += abs(lat_qp.calc_third_derivative(t)); t += fot_hp->dt; } // velocity keeping tv = fot_ic->target_speed - fot_hp->d_t_s * fot_hp->n_s_sample; while (tv <= fot_ic->target_speed + fot_hp->d_t_s * fot_hp->n_s_sample) { longitudinal_acceleration = 0; longitudinal_jerk = 0; // copy frenet path tfp = new FrenetPath(fot_hp); tfp->t.assign(fp->t.begin(), fp->t.end()); tfp->d.assign(fp->d.begin(), fp->d.end()); tfp->d_d.assign(fp->d_d.begin(), fp->d_d.end()); tfp->d_dd.assign(fp->d_dd.begin(), fp->d_dd.end()); tfp->d_ddd.assign(fp->d_ddd.begin(), fp->d_ddd.end()); QuarticPolynomial lon_qp = QuarticPolynomial( fot_ic->s0, fot_ic->c_speed, 0.0, tv, 0.0, ti ); // longitudinal motion for (double tp : tfp->t) { tfp->s.push_back(lon_qp.calc_point(tp)); tfp->s_d.push_back(lon_qp.calc_first_derivative(tp)); tfp->s_dd.push_back(lon_qp.calc_second_derivative(tp)); tfp->s_ddd.push_back(lon_qp.calc_third_derivative(tp)); longitudinal_acceleration += abs(lon_qp.calc_second_derivative(tp)); longitudinal_jerk += abs(lon_qp.calc_third_derivative(tp)); } num_paths++; // delete if failure or invalid path bool success = tfp->to_global_path(csp); num_viable_paths++; if (!success) { // deallocate memory and continue delete tfp; tv += fot_hp->d_t_s; continue; } //auto start = chrono::high_resolution_clock::now(); bool valid_path = tfp->is_valid_path(obstacles); //auto end = chrono::high_resolution_clock::now(); //valid_path_time += chrono::duration_cast<chrono::nanoseconds>(end - start).count(); if (!valid_path) { // deallocate memory and continue delete tfp; tv += fot_hp->d_t_s; continue; } // lateral costs tfp->c_lateral_deviation = lateral_deviation; tfp->c_lateral_velocity = lateral_velocity; tfp->c_lateral_acceleration = lateral_acceleration; tfp->c_lateral_jerk = lateral_jerk; tfp->c_lateral = fot_hp->kd * tfp->c_lateral_deviation + fot_hp->kv * tfp->c_lateral_velocity + fot_hp->ka * tfp->c_lateral_acceleration + fot_hp->kj * tfp->c_lateral_jerk; // longitudinal costs tfp->c_longitudinal_acceleration = longitudinal_acceleration; tfp->c_longitudinal_jerk = longitudinal_jerk; tfp->c_end_speed_deviation = abs(fot_ic->target_speed - tfp->s_d.back()); tfp->c_time_taken = ti; tfp->c_longitudinal = fot_hp->ka * tfp->c_longitudinal_acceleration + fot_hp->kj * tfp->c_longitudinal_jerk + fot_hp->kt * tfp->c_time_taken + fot_hp->kd * tfp->c_end_speed_deviation; // obstacle costs tfp->c_inv_dist_to_obstacles = tfp->inverse_distance_to_obstacles(obstacles); // final cost tfp->cf = fot_hp->klat * tfp->c_lateral + fot_hp->klon * tfp->c_longitudinal + fot_hp->ko * tfp->c_inv_dist_to_obstacles; frenet_paths.push_back(tfp); tv += fot_hp->d_t_s; } ti += fot_hp->dt; // make sure to deallocate delete fp; } di += fot_hp->d_road_w; } valid_path_time *= 1e-6; //cout << "Found " << frenet_paths.size() << " valid paths out of " << num_paths << " paths; Valid path time " << valid_path_time << "\n"; } void FrenetOptimalTrajectory::setObstacles() { // Construct obstacles vector<double> llx(fot_ic->o_llx, fot_ic->o_llx + fot_ic->no); vector<double> lly(fot_ic->o_lly, fot_ic->o_lly + fot_ic->no); vector<double> urx(fot_ic->o_urx, fot_ic->o_urx + fot_ic->no); vector<double> ury(fot_ic->o_ury, fot_ic->o_ury + fot_ic->no); for (int i = 0; i < fot_ic->no; i++) { addObstacle( Vector2f(llx[i], lly[i]), Vector2f(urx[i], ury[i]) ); } } void FrenetOptimalTrajectory::addObstacle(Vector2f first_point, Vector2f second_point) { obstacles.push_back(new Obstacle(std::move(first_point), std::move(second_point), fot_hp->obstacle_clearance)); }
8c9f13b130349089833fcf877fc8d6124d2835f2
6d088ec295b33db11e378212d42d40d5a190c54c
/contrib/brl/bseg/baml/Templates/baml_birchfield_tomasi+uint_16-.cxx
a067617e49b3674c4b6ed00b1d7e6638dfaf9594
[]
no_license
vxl/vxl
29dffd5011f21a67e14c1bcbd5388fdbbc101b29
594ebed3d5fb6d0930d5758630113e044fee00bc
refs/heads/master
2023-08-31T03:56:24.286486
2023-08-29T17:53:12
2023-08-29T17:53:12
9,819,799
224
126
null
2023-09-14T15:52:32
2013-05-02T18:32:27
C++
UTF-8
C++
false
false
281
cxx
baml_birchfield_tomasi+uint_16-.cxx
#include "baml_birchfield_tomasi.hxx" #include <vil/algo/vil_greyscale_erode.hxx> #include <vil/algo/vil_greyscale_dilate.hxx> VIL_GREYSCALE_ERODE_INSTANTIATE( vxl_uint_16 ); VIL_GREYSCALE_DILATE_INSTANTIATE( vxl_uint_16 ); BAML_COMPUTE_BIRCHFIELD_TOMASI_INSTANTIATE(vxl_uint_16);
a6139802e46e376124cd744cbd2669b658931490
662be80003318435779cd32a9e5f229441141a94
/Client/FrameWork/FrameWork/MyDefine.h
167ce91f74f060c04d22e3cdbd349cb577d7f94f
[]
no_license
LeeWooSang/NGP_TeamProject
09a904c8779b9c5831e3f04275018a05d081c577
bfc47c131a897bdf1b801a0ae698d91500d54e7b
refs/heads/master
2021-10-08T10:06:19.228650
2018-12-10T19:44:46
2018-12-10T19:44:46
150,691,598
0
0
null
null
null
null
UTF-8
C++
false
false
176
h
MyDefine.h
#pragma once #include "MyInclude.h" #define SAFE_DELETE(p) {if(p){ delete(p); (p) = NULL;}} #define SAFE_DELETE_ARRAY(p) {if(p){ delete[](p); (p) = NULL;}} using std::cout;
d9ac9e6051dd5baf34eaccddbe93a23ae8873d3e
edbe6966098d925e831b4e3054c76e4ae1c1891a
/leetcode_archived/LeetCode_763.cpp
278a35b952cd0f871c52b133c6cc92ddeab56a8b
[ "BSD-3-Clause" ]
permissive
Sean10/Algorithm_code
242fcb21de97186ed1caea30ab967c3f4b4e9351
8ba923150102e16a9072b8f32ced45d15b18223b
refs/heads/master
2023-06-22T17:47:07.241192
2023-06-19T15:22:23
2023-06-19T15:22:23
107,443,471
0
0
BSD-3-Clause
2021-06-08T20:35:47
2017-10-18T17:51:56
C++
UTF-8
C++
false
false
570
cpp
LeetCode_763.cpp
class Solution { public: vector<int> partitionLabels(string S) { unordered_map<char, int> flag; for(int i = 0;i < S.size();i++) { flag[S[i]] = i; } vector<int> ans; int start = 0, partition = 0, k = 0; while(k < S.size()) { partition = flag[S[k]]; while(k < partition) { partition = max(flag[S[k++]], partition); } ans.push_back(partition-start+1); start = ++k; } return ans; } };
3dbfbc7028e5d3c13a9b85aa576b5dd7317d76a6
3d974f8d4d8ae15a1b77e2e344891a2d39506451
/include/server/http/https_server.h
c6f3315f58b2a3dca814fdd1aa0b8b6ec0cac114
[ "MIT" ]
permissive
CrackerCat/CppServer
6a0449936dfde3a05c7a47a3f49245b8f43af429
8d12515d49372fe77607d1abd58c8f3d1779277e
refs/heads/master
2020-05-19T06:32:32.251980
2019-05-03T14:51:53
2019-05-03T14:51:53
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,208
h
https_server.h
/*! \file https_server.h \brief HTTPS server definition \author Ivan Shynkarenka \date 30.04.2019 \copyright MIT License */ #ifndef CPPSERVER_HTTP_HTTPS_SERVER_H #define CPPSERVER_HTTP_HTTPS_SERVER_H #include "https_session.h" #include "server/asio/ssl_server.h" namespace CppServer { namespace HTTP { //! HTTPS server /*! HTTPS server is used to create secured HTTPS Web server and communicate with clients using secure HTTPS protocol. It allows to receive GET, POST, PUT, DELETE requests and send HTTP responses. Thread-safe. */ class HTTPSServer : public Asio::SSLServer { public: using SSLServer::SSLServer; HTTPSServer(const HTTPSServer&) = delete; HTTPSServer(HTTPSServer&&) = delete; virtual ~HTTPSServer() = default; HTTPSServer& operator=(const HTTPSServer&) = delete; HTTPSServer& operator=(HTTPSServer&&) = delete; protected: std::shared_ptr<Asio::SSLSession> CreateSession(std::shared_ptr<Asio::SSLServer> server) override { return std::make_shared<HTTPSSession>(server); } }; /*! \example https_server.cpp HTTPS server example */ } // namespace HTTP } // namespace CppServer #endif // CPPSERVER_HTTP_HTTPS_SERVER_H
b5c242bbbfea823efc68c3ece92117a2b035d1fc
8f749fff19256d414bfada5acf78b2ad32d9220b
/quantumvk/extern_build/vma_include.hpp
a5e29f92d91044a29f67648fa4b4e47290912997
[ "MIT" ]
permissive
quantumgfx/QuantumVkPrototype
615ccbc8474e665c98e73db8d637d3249b2b3d39
1d6dcfd8a12336763ec815b19b6514db8b2ea9e8
refs/heads/master
2023-02-14T22:40:57.007254
2020-11-21T19:14:35
2020-11-21T19:14:35
null
0
0
null
null
null
null
UTF-8
C++
false
false
115
hpp
vma_include.hpp
#pragma once #include "quantumvk/vulkan/vulkan_headers.hpp" #include <extern/VulkanMemoryAllocator/vk_mem_alloc.h>
6f3703fd1ce9e3bd0012be951780a64735682e08
7029a18f2e72cac9e8c0af3f43a0f37dcbd429f8
/gunir/compiler/aggregate_test_helper.cc
0a5a0c24e5489847ad24384784b44176d17214e6
[]
no_license
GregHWayne/gunir
f542975e1eaf9a6a72ea533d03a6ea488d7979ac
66a57a961cc9169dbf1d0a8cc0e0d6e99e106a01
refs/heads/master
2021-01-17T21:52:05.581720
2015-07-29T03:51:25
2015-07-29T03:51:25
39,935,844
1
0
null
2015-07-30T06:53:44
2015-07-30T06:53:44
null
UTF-8
C++
false
false
5,912
cc
aggregate_test_helper.cc
// Copyright (C) 2015. The Gunir Authors. All rights reserved. // Author: An Qin (anqin.qin@gmail.com) // // Description: #include <algorithm> #include "gunir/compiler/compiler_test_helper.h" #include "gunir/compiler/compiler_test_helper.pb.h" DECLARE_int32(record_number); namespace gunir { namespace compiler { /* * Department generate result for the following query * SELECT * department_id, institute_id, * cnt_student, sum_id, avg_id, sum_age, avg_age, max_age, min_age, * COUNT(student_id) AS CNT_STUDENT, * SUM(student_id) AS SUM_ID, * AVG(student_id) AS AVG_ID, * SUM(student_id) + 2 * AVG(student_id) AS ALL_ID, * SUM(student_age) AS SUM_AGE, * AVG(student_age) AS AVG_AGE, * MAX(student_age) AS MAX_AGE, * MIN(student_age) AS MIN_AGE, * AVG(student_age) + MAX(student_age) * MIN(student_age) - SUM(student_age) AS * ALL_AGE * FROM Department * GROUPBY department_id, institute_id, * cnt_student, sum_id, avg_id, sum_age, avg_age, max_age, min_age; */ struct CppDepartment { int64_t department_id; int64_t institute_id; std::vector<int64_t> student_id; std::vector<int32_t> student_age; bool operator<(const CppDepartment& that) const { if (this->department_id != that.department_id) { return this->department_id < that.department_id; } return (this->institute_id < that.institute_id); } bool operator==(const CppDepartment& that) const { return (this->department_id == that.department_id && this->institute_id == that.institute_id); } }; struct AggregateResult { int64_t cnt_student; int64_t sum_id; int64_t avg_id; int64_t avg_age; int64_t sum_age; int64_t max_age; int64_t min_age; AggregateResult() { cnt_student = 0; sum_id = 0; avg_id = 0; avg_age = 0; sum_age = 0; max_age = -1; min_age = INT32_MAX; } }; AggregateResult g_aggregate_result[100][100]; int64_t LocalRandNumber() { return rand() % 100000; // NOLINT } void AddToAggregate(const CppDepartment& cpp_department, AggregateResult* agg_result) { for (size_t i = 0; i < cpp_department.student_id.size(); ++i) { agg_result->cnt_student += 1; agg_result->sum_id += cpp_department.student_id[i]; agg_result->sum_age += cpp_department.student_age[i]; if (agg_result->max_age < cpp_department.student_age[i]) { agg_result->max_age = cpp_department.student_age[i]; } if (agg_result->min_age > cpp_department.student_age[i]) { agg_result->min_age = cpp_department.student_age[i]; } } } CppDepartment* g_cpp_department = NULL; void InitDepartment() { static const int kRecordNumber = FLAGS_record_number; CppDepartment* cpp_department = new CppDepartment[FLAGS_record_number]; g_cpp_department = new CppDepartment[FLAGS_record_number]; for (int i = 0; i < kRecordNumber; ++i) { cpp_department[i].department_id = LocalRandNumber() % 20; cpp_department[i].institute_id = LocalRandNumber() % 10; int student_number = LocalRandNumber() % 50 + 1; for (int j = 0; j < student_number; ++j) { cpp_department[i].student_id.push_back(LocalRandNumber()); cpp_department[i].student_age.push_back(LocalRandNumber()); } } for (int i = 0; i < kRecordNumber; ++i) { g_cpp_department[i] = cpp_department[i]; } std::sort(cpp_department, cpp_department + FLAGS_record_number); int count = 0; do { int64_t department_id = cpp_department[count].department_id; int64_t institute_id = cpp_department[count].institute_id; AggregateResult agg_result; do { AddToAggregate(cpp_department[count], &agg_result); count++; } while (count < kRecordNumber && cpp_department[count - 1] == cpp_department[count]); agg_result.avg_id = agg_result.sum_id / agg_result.cnt_student; agg_result.avg_age = agg_result.sum_age / agg_result.cnt_student; g_aggregate_result[department_id][institute_id] = agg_result; } while (count < kRecordNumber); delete[] cpp_department; } PBMessage* RandDepartment() { if (g_cpp_department == NULL) { InitDepartment(); } static int count = 0; const CppDepartment& cpp_dpmt = g_cpp_department[count]; Department dpmt; AggregateResult agg_result = g_aggregate_result[cpp_dpmt.department_id][cpp_dpmt.institute_id]; dpmt.set_department_id(cpp_dpmt.department_id); dpmt.set_institute_id(cpp_dpmt.institute_id); dpmt.set_cnt_student(agg_result.cnt_student); dpmt.set_avg_id(agg_result.avg_id); dpmt.set_sum_id(agg_result.sum_id); dpmt.set_avg_age(agg_result.avg_age); dpmt.set_max_age(agg_result.max_age); dpmt.set_min_age(agg_result.min_age); dpmt.set_sum_age(agg_result.sum_age); for (size_t i = 0; i < cpp_dpmt.student_id.size(); ++i) { dpmt.add_student_id(cpp_dpmt.student_id[i]); dpmt.add_student_age(cpp_dpmt.student_age[i]); } count++; if (count == FLAGS_record_number) { delete[] g_cpp_department; } return new Department(dpmt); } PBMessage* AggregateDepartment(const PBMessage* input) { return NULL; } void CreateAggregateTestData() { CreateTestData("aggregate_test", "./testdata/aggregate_test/Department.proto", "Department", "./testdata/aggregate_test/Department.proto", "Department", RandDepartment, AggregateDepartment); } } // namespace compiler } // namespace gunir int main(int argc, char** argv) { google::ParseCommandLineFlags(&argc, &argv, false); ::gunir::compiler::CreateAggregateTestData(); return 0; }
98edb4b7ee5d92aae49691a580c159edb42cba84
f3b525bd8d9fd98f9aa974c967203d5af4c552bb
/src/DividerEngine.cpp
18213db64723d0c3a866a28d33d720ffc0a47275
[]
no_license
Nomad83/calculationengine
8d859db854e6f31e5a913d4e1b985196434caeb1
73e0f377fef5fcc462049c4ae9133a41ff104094
refs/heads/master
2020-12-30T13:45:58.565621
2017-05-14T20:56:55
2017-05-14T20:56:55
91,247,553
0
0
null
null
null
null
UTF-8
C++
false
false
482
cpp
DividerEngine.cpp
#include "DividerEngine.h" DividerEngine::DividerEngine() { m_enCalcType = divider; } DividerEngine::~DividerEngine() { //dtor } int DividerEngine::calculate() { list<int> *pList = getListIntegers(); if (pList->empty()) return 0; int result = pList->front(); list<int>::iterator iter = pList->begin(); ++iter; while (iter!=pList->end()) { int val = *iter; result /= val; ++iter; } return result; }
35d85ce69768111a2c8f659917d7fc6a8e1790a8
c36e4f8d7ffc781b34b4413e5abb1e9a94cb90fe
/C_Study/AL Project/AL_13W_HW.cpp
b402b25cd95aee91dde0604dd3b012ee5dbab4f8
[ "MIT" ]
permissive
AnJinHyeok/C_Study
bbd9f29cec5e207165643db5702fe6fd0ac659e9
e5ad0543e7cdc2d25c8a5717fd9578d33cbca509
refs/heads/main
2023-06-05T15:11:52.922695
2021-06-30T16:36:43
2021-06-30T16:36:43
347,581,398
0
0
null
null
null
null
UTF-8
C++
false
false
3,130
cpp
AL_13W_HW.cpp
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX_NODE 100 #define SOURCE 'S' #define SINK 'T' int Capacity[MAX_NODE][MAX_NODE]; int Flow[MAX_NODE][MAX_NODE]; int Residual[MAX_NODE][MAX_NODE]; int check[MAX_NODE]; int parent[MAX_NODE]; int path[MAX_NODE]; FILE* fp; int name2int(char c) { if (c == SOURCE) return 0; if (c == SINK) return 1; return c - 'A' + 2; } int int2name(int i) { if (i == 0) return SOURCE; if (i == 1) return SINK; return i + 'A' + 2; } int queue[MAX_NODE]; int front, rear; void init_queue() { front = rear = 0; } int queue_empty() { if (front == rear) return 1; else return 0; } void put(int k) { queue[rear] = k; rear = ++rear % MAX_NODE; } int get() { int i; i = queue[front]; front = ++front % MAX_NODE; return i; } void clear_matrix(int mat[][MAX_NODE], int V) { for (int i = 0; i < MAX_NODE; i++) for (int j = 0; j < MAX_NODE; j++) mat[i][j] = 0; } void input_Capacity(int a[][MAX_NODE], int* V, int* E) { char vertex[3]; int w; fscanf(fp, "%d %d", V, E); clear_matrix(a, *V); for (int i = 0; i < *E; i++) { fscanf(fp, "%s %d", vertex, &w); a[name2int(vertex[0])][name2int(vertex[1])] = w; } } void set_path() { int* temp; int i, count = 0; temp = (int*)calloc(MAX_NODE, sizeof(int)); i = name2int(SINK); while (i >= 0) { temp[count] = i; i = parent[i]; count++; } for (i = 0; i < count; i++) path[i] = temp[count - i - 1]; path[i] = -1; free(temp); } void construct(int c[][MAX_NODE], int f[][MAX_NODE], int r[][MAX_NODE], int V) { int i, j; for (i = 0; i < V; i++) for (j = 0; j < V; j++) r[i][j] = c[i][j] - f[i][j]; } int get_augument_path(int a[][MAX_NODE], int V, char S, char T) { int i, j; init_queue(); for (i = 0; i < V; i++) { check[i] = 0; parent[i] = -1; } i = name2int(S); if (check[i] == 0) { put(i); check[i] = 1; while (!queue_empty()) { i = get(); if (i == name2int(T)) break; for (j = 0; j < V; j++) { if (a[i][j] != 0) { if (check[j] == 0) { put(j); check[j] = 1; parent[j] = i; } } } } } set_path(); if (i == name2int(T)) return 1; else return 0; } void network_flow(int c[][MAX_NODE], int f[][MAX_NODE], int r[][MAX_NODE], int V, char S, char T) { int i, min; clear_matrix(f, V); clear_matrix(r, V); construct(c, f, r, V); while (get_augument_path(r, V, S, T)) { min = INT_MAX; for (i = 1; path[i] >= 0; i++) if (min > r[path[i - 1]][path[i]]) min = r[path[i - 1]][path[i]]; for (i = 1; path[i] >= 0; i++) { f[path[i - 1]][path[i]] = f[path[i - 1]][path[i]] + min; f[path[i]][path[i - 1]] = -f[path[i - 1]][path[i]]; } construct(c, f, r, V); } } int main() { int V, E; fp = fopen("graph.txt", "r"); input_Capacity(Capacity, &V, &E); network_flow(Capacity, Flow, Residual, V, 'S', 'T'); for (int i = 0; i < V; i++) { for (int j = 0; j < V; j++) printf("%d\t", Flow[i][j]); printf("\n"); } }
d93ae3ea838806895efd807b948c80e8507cd215
0be3d1d908a2824688c4658a774ecb7dea8fea57
/MathLibrary/affine2d.hpp
022749287b31446fa6f42aa0ebe89137d8bd67be
[]
no_license
jjj404001/CS230_Final
c4ceaa956ad87f581142705ce64528414d00a058
80c513101ddca141d800ee263a41112d70ec9d41
refs/heads/master
2020-03-19T06:51:26.449818
2018-06-19T06:21:35
2018-06-19T06:21:35
136,060,783
0
0
null
null
null
null
UTF-8
C++
false
false
3,913
hpp
affine2d.hpp
/******************************************************************************/ /*! file name : affine2d.hpp author : Jaejun Jang email : jjj404001@gmail.com DigiPen login : jaejun.jang Course name : CS230 Assignment number :#1 term :Spring 2018 brief : This file contains the function prototypes and affine2d struct using for calculating with affine matrix. Functions include: in affine2d struct : + float& operator()(int column,int row); //()operator overloading for accessing 2*2 matrix. + float operator()(int column,int row) const; //same with above but using const parameter. + affine2d operator*(affine2d InputAffine) const;// *operator overloading for multiplying affine matrix with affine matrix. + affine2d& operator*=(affine2d InputAffine); // *= operator overloading for multyplying affine matrix with affine matrix. + affine2d& transpose(void); // transpose given affine matrix. non-member normal function : + affine2d build_affine_rotation(float degree); // build rotation affine matrix with given degree. + affine2d build_affine_identity(void); // build identity matrix. + affine2d build_affine_scale(float scaleFactor); // build uniform affine sacle matrix. + affine2d build_affine_scale(float scaleFactor1, float scaleFactor2);// build non uniform affine sacle matrix. + affine2d build_affine_translation(float Xposition, float Yposition);// build translation affine matrix with given number. */ /******************************************************************************/ #pragma once #include "vector3.hpp" // vector3 struct. struct affine2d { //3*3 matrix consist of 3 vectors. float affine_map[3][3] = {0,}; affine2d() = default; //default constructor. filled with 0. affine2d(const vector3 column0, const vector3 column1, const vector3 column2) : affine_map{column0.x, column0.y, column0.z, column1.x, column1.y, column1.z, column2.x, column2.y, column2.z}{} //constructor for 3 vector3. affine2d(const float column0_row0, const float column0_row1, const float column0_row2, const float column1_row0, const float column1_row1, const float column1_row2, const float column2_row0, const float column2_row1, const float column2_row2) : affine_map{column0_row0, column0_row1, column0_row2, column1_row0, column1_row1, column1_row2, column2_row0, column2_row1, column2_row2}{}//explicit constructor using 9 floats. float& operator()(const int column, const int row); //()operator overloading for accessing 2*2 matrix. float operator()(const int column, const int row) const; //same with above but using const parameter. affine2d operator*(affine2d input_affine) const;//*operator overloading for multiplying affine matrix with affine matrix. affine2d& operator*=(affine2d input_affine); //*= operator overloading for multyplying affine matrix with affine matrix. affine2d& transpose(void); // transpose given affine matrix. }; //////////////////////////////////////////////////// ////////////////non-member function///////////////// //////////////////////////////////////////////////// affine2d build_affine_rotation(float degree); // build rotation affine matrix with given degree. affine2d build_affine_identity(void); // build identity matrix. affine2d build_affine_scale(float scale_factor); // build uniform affine sacle matrix. affine2d build_affine_scale(float scale_factor1, float scale_factor2);// build non uniform affine sacle matrix. affine2d build_affine_translation(float xposition, float yposition);// build translation affine matrix with given number.
4eb1d9db7dce5ff2c7531bfaab78638d5b340c26
e375d6bda4c66be5500d5463b305545a1ad8af4f
/cppProjetc/chapter15Inheritance/BasicShape.h
016d7b797887ba92f3d5cea8db6b4f3beaef19ff
[]
no_license
miafohta/test
e8741ab326b0a49f30ffa88767dbd26c50d1e449
7d96ebc51adae02230203f174fb05b479d690eae
refs/heads/master
2021-08-31T14:36:10.886669
2017-12-21T18:01:23
2017-12-21T18:01:23
113,345,719
0
0
null
null
null
null
WINDOWS-1250
C++
false
false
516
h
BasicShape.h
#ifndef BASICSHAPE_H #define BASICSHAPE_H #include <iostream> #include <string> using namespace std; class BasicShape { public: //default constructor BasicShape(); double getArea() const; //This function should return the value in the member variable area virtual void calcArea() = 0; // Pure virtual function void setArea(double); //This function should return the value in the member variable area private: //area, a double used to hold the shape’s area. double area; }; #endif
65986f7e8466e4e8c50a5412ab45d4eba16b93e7
dd06241cc857c9601a121041d52313fea8267c72
/cpp/wektor.cpp
b0f85394b1e22a87a58e5818a0ddf237b988510c
[]
no_license
michi201/gitrepo
0f8136e480449ac81f09c76469dc5d7d15e5235a
0536031f26de05eb58bba06323f1443108b73bb3
refs/heads/master
2021-05-15T00:03:15.498184
2020-04-28T20:01:21
2020-04-28T20:01:21
103,923,102
0
1
null
null
null
null
UTF-8
C++
false
false
881
cpp
wektor.cpp
/* * wektor.cpp */ #include <iostream> #include <iomanip> #include <fstream> using namespace std; struct punkt { int x; int y; }; struct wektor { punkt pp; punkt pk; }; void pobieranie(wektor) { wektor w; cout << "Podaj współrzędną x punktu początkowego: " << endl; cin >> w.pp.x; cout << "Podj współrzędną y punktu początkowego: " << endl; cin >> w.pp.y; cout << "Podaj współrzędną x punktu koncowego: " << endl; cin >> w.pk.x; cout << "Podj współrzędną y punktu końcowego: " << endl; cin >> w.pk.y; }; void obliczanie(wektor w) { punkt ps; ps.x = float((w.pk.x - w.pp.x) / 2); ps.y = float((w.pk.y - w.pp.y) / 2); cout << "Współrzędne środka: " << ps.x << "," << ps.y << endl; }; int main(int argc, char **argv) { wektor w; pobieranie(w); obliczanie(w); return 0; }
00bcd2e96503c9a5f1c62f9beedcf6e9578170c5
c1afc06178ede464f6367b544ad8f436a57d9554
/Framework/Common/include/CommonFunction.h
5ae39b533174c026a4559d28e77196b58bb8f4c5
[]
no_license
morabbit/CTV-master
fe45303d26fd516556ae8701ae96e283d189f5b5
de09176e9d4c1acf8afabac8f13b5ab4c80a7a7f
refs/heads/master
2020-04-23T06:20:50.844846
2019-02-16T07:16:37
2019-02-16T07:16:37
170,970,212
1
0
null
null
null
null
UTF-8
C++
false
false
727
h
CommonFunction.h
#pragma once #ifndef __COMMONFUNCTION_H #define __COMMONFUNCTION_H #include "FrameworkType.h" enum StripType { BOTHSTRIP, LEFTSTRIP, RIGHTSTRIP }; class DOC { public: DOC(); ~DOC(); static _String do_strip( const _String &str, const _String&chars, INT striptype ); static void deleteAllMark( _String &src, const _String &mark ); private: }; _String replace(_String& str, const _String& src_str, const _String& tar_str,UINT cout=0); _String strip(_String& src, const _String& chars=" "); _String lrstrip(_String& src, const _String& chars=" "); _String lstrip(_String& src, const _String& chars=" "); _String rstrip(_String& src, const _String& chars=" "); #endif // !__COMMONFUNCTION_H
e0e4bcfcab270d9074163422bc0b3c893c969001
4a730fb24e4e711e3e512c20df0be3e8aee5a43f
/BPlusTree.h
bcc9aedb9963ceee2b37c2f73a4d2eedd0bd8b6c
[]
no_license
srzhu97/miniSql
787c9b668ac80137ebe6ce5fed432b1f9eb58d00
d82e56ad9ce3925c942535722223ddcd4596cfcf
refs/heads/master
2020-04-07T04:39:19.400218
2018-11-18T09:12:40
2018-11-18T09:12:40
158,065,964
1
0
null
null
null
null
UTF-8
C++
false
false
27,114
h
BPlusTree.h
#ifndef BPLUSTREE_H #define BPLUSTREE_H #include <cstdlib> #include <vector> #include "bm.h" #include <list> #include <sstream> #include <string> #define keytype int #define CannotFindKey 1006 using namespace std; template <class T> class TreeNode { public: int TreeNodeNumber; string Indexname; bool isLeaf; int father; int degree; int count; int isChange; int NextNode; vector<int> son; vector<T> KeyValue; TreeNode(string name, int NodeNumber, int NodeDegree, bool leaf); TreeNode(string name, int NodeNumber, int NodeDegree); ~TreeNode() {}; int GetNodeNumber() { return TreeNodeNumber; } int FindKeyInNode(const T Key); // Search key in the node int Getdegree() { return degree; }; int Getcount() { return count; }; int GetIsLeaf() { return isLeaf; } void SetIsLeaf(int status) { isLeaf = status; } int GetFatherPointer() { return father; } int SetFatherPointer(int FatherNode) { father = FatherNode; } void SetNextNode(int pointer) { NextNode = pointer; } int GetNextNode() { return NextNode; } bool isfull() { if (isLeaf) return count == degree; else return (count - 1) == degree; } bool InsertKeyInLeaf(T Key, int offsetNumber); int InsertInternalNode(T Key, int offsetNumber); bool DeleteKeyInInternal(int position, int &rem); bool DeleteKeyInLeaf(int position); void DeleteKeyInLeafByKey(const T oldkey); bool WriteBackToDisk(int length, BufMan* IndexBm, int type); bool ReadFromDisk(int length, int type, BufMan* IndexBm); void ConvertToKey(T &key, int &pointer, const char* origin, int length, int type); int FindKeyPos(const T Key); string GetNodeFullName(); void DeleteNode(BufMan* IndexBm); }; template <class T> class BPlusTree { private: int minnumber; BufMan IndexBm; int degree; // Degree of node int firstLeafNumber; // Head of leaf nodes int length; int AttributeType; public: BPlusTree(string Indexname, keytype type, BufMan &bm); BPlusTree(string Indexname, keytype type, BufMan &bm, int root, int total); BPlusTree() :indexName(""), rootNumber(-1), firstLeafNumber(-1), AttributeType(0) {}; ~BPlusTree() {}; /* Inline function */ inline int getDegree() { return degree; } inline int getRoot() { return rootNumber; } inline int getFirstLeaf() { return firstLeafNumber; } bool insertKey(T newkey, int offsetNumber); // Insert an index record bool deleteKey(T oldkey); // Delete an index record void dropTree(); // Delete the whole tree void ClearTree(); bool storeTree(); bool printleaf(); int FindKey(T Key); int FindNodePosition(T newkey); void FindResult(T Key, int ConditionType, vector<int> &OffsetResult); int rootNumber; string indexName; int count; private: TreeNode<T> CreateNewTreeNode(int NodeID, int IsLeaf); bool split(TreeNode<T> FirstNode, T newkey, int offsetNumber); void InsertInFather(int FirstSonID, int MyID, T NewValue, int pointer); int splitInternalNode(TreeNode<T> FirstNode, T newkey, int offsetNumber); bool ChangeKeyInInternal(int ParentNumber, T KeyChangeInParent, int SonOff); bool DeleteInInternal(int ParentNumber, int SonOff); }; template <class T> TreeNode<T>::TreeNode(string name, int NodeNumber, int NodeDegree) { Indexname = name; TreeNodeNumber = NodeNumber; isLeaf = -1; father = -1; degree = NodeDegree; count = 0; isChange = 0; KeyValue.resize(NodeDegree + 1, T()); son.resize(NodeDegree + 1, int()); NextNode = -1; } template <class T> TreeNode<T>::TreeNode(string name, int NodeNumber, int NodeDegree, bool leaf) { Indexname = name; TreeNodeNumber = NodeNumber; isLeaf = leaf; father = -1; degree = NodeDegree; count = 0; isChange = 0; KeyValue.resize(NodeDegree + 1, T()); son.resize(NodeDegree + 1, int()); NextNode = -1; } template <class T> bool TreeNode<T>::InsertKeyInLeaf(T Key, int offsetNumber) { if (count == 0) { KeyValue[0] = Key; son[0] = offsetNumber; count++; return 0; } int pos = FindKeyInNode(Key); for (int i = count; i>pos; i--) { son[i] = son[i - 1]; KeyValue[i] = KeyValue[i - 1]; } KeyValue[pos] = Key; son[pos] = offsetNumber; count++; return 0; } template <class T> int TreeNode<T>::FindKeyInNode(const T Key) { int left = 0, right = count; if (Key < KeyValue[0]) return 0; while (right - left != 1) { int middle = (left + right) / 2; if (KeyValue[middle] < Key) left = middle; if (KeyValue[middle] > Key) right = middle; } return right; } template <class T> int TreeNode<T>::FindKeyPos(const T Key) { int left = 0, right = count; while (right != left) { int middle = (left + right) / 2; if (KeyValue[middle] == Key) return son[middle]; if (KeyValue[middle] < Key) left = middle; if (KeyValue[middle] > Key) right = middle; } return CannotFindKey; } template <class T> int TreeNode<T>::InsertInternalNode(T Key, int offsetNumber) { if (count == 1) { KeyValue[0] = Key; son[1] = offsetNumber; count++; return 0; } count--; int remain = -1; if (count == degree) { remain = son[degree]; } int pos = FindKeyInNode(Key); for (int i = count - 1; i >= pos; i--) { KeyValue[i + 1] = KeyValue[i]; son[i + 2] = son[i + 1]; } KeyValue[pos] = Key; if (pos != degree) son[pos + 1] = offsetNumber; count += 2; return remain; } template <class T> bool TreeNode<T>::DeleteKeyInLeaf(int position) { for (int i = position; i<count - 1; i++) { KeyValue[i] = KeyValue[i + 1]; son[i] = son[i + 1]; } KeyValue[count - 1] = -1; son[count - 1] = -1; count--; return 0; } template <class T> bool TreeNode<T>::DeleteKeyInInternal(int position, int &rem) { for (int i = position; i<count - 2; i++) { KeyValue[i] = KeyValue[i + 1]; if (i == degree - 1) { son[i + 1] = rem; rem = -1; break; } else son[i + 1] = son[i + 2]; } count--; return 0; } template <class T> bool TreeNode<T>::WriteBackToDisk(int length, BufMan* IndexBm, int type) { stringstream sstream; string output, name; sstream.clear(); sstream << TreeNodeNumber; sstream >> output; name = Indexname + output; char* temp = new char[length]; for (int i = 0; i<length; i++) temp[i] = '\0'; IndexBm->CleanBuffer(name); memcpy(temp, &isLeaf, length); IndexBm->AddRecord(name, temp, length); memcpy(temp, &father, length); IndexBm->AddRecord(name, temp, length); memcpy(temp, &NextNode, length); IndexBm->AddRecord(name, temp, length); //if (!isLeaf) count--; for (int i = 0; i<count; i++) { //memset(temp, length, 0); if (type>0) { stringstream ss; ss.clear(); ss << KeyValue[i]; ss >> temp; } else { memcpy(temp, &KeyValue[i], (length - 4)); } int offset = length - 4; memcpy(temp + offset, &son[i], sizeof(int)); IndexBm->AddRecord(name, temp, length); } //if (!isLeaf) count++; delete[] temp; return 0; } template <class T> bool TreeNode<T>::ReadFromDisk(int length, int type, BufMan *IndexBm) { stringstream sstream; string output, name; sstream.clear(); sstream << TreeNodeNumber; sstream >> output; name = Indexname + output; vector<string> result = IndexBm->GetTableRecord(name, length); vector<const char*> ConvertResult; for (int i = 0; i<result.size(); i++) { ConvertResult.push_back(result[i].c_str()); } memcpy(&isLeaf, ConvertResult[0], sizeof(int)); memcpy(&father, ConvertResult[1], sizeof(int)); memcpy(&NextNode, ConvertResult[2], sizeof(int)); int i; for (i = 3; i<result.size(); i++) ConvertToKey(KeyValue[i - 3], son[i - 3], ConvertResult[i], length, type); count = i - 3; // vector<T>().swap(result); return 0; } template <class T> void TreeNode<T>::ConvertToKey(T &key, int &pointer, const char* origin, int length, int type) { if (type > 0) { stringstream ss; ss.clear(); ss << origin; ss >> key; memcpy(&pointer, origin + length - 4, sizeof(int)); return; } int offset; if (type < 0) offset = 4; else offset = type; memcpy(&key, origin, offset); memcpy(&pointer, origin + offset, sizeof(int)); } template <class T> string TreeNode<T>::GetNodeFullName() { stringstream sstream; string output, name; sstream.clear(); sstream << TreeNodeNumber; sstream >> output; name = Indexname + output; return name; } template <class T> BPlusTree<T>::BPlusTree(string Indexname, keytype type, BufMan &bm) :indexName(Indexname), AttributeType(type) { rootNumber = -1; firstLeafNumber = -1; count = 0; if (type <0) length = 4; else length = type + 1; length += 4; degree = (Blocksize - 8 - 3 * length) / length - 1; minnumber = (degree - 1) / 2; IndexBm = bm; } template <class T> BPlusTree<T>::BPlusTree(string Indexname, keytype type, BufMan &bm, int root, int total) { indexName = Indexname; AttributeType = type; rootNumber = root; firstLeafNumber = 0; count = total; if (type <0) length = 4; else length = type + 1; length += 4; degree = (Blocksize - 8 - 3 * length) / length - 1; minnumber = (degree - 1) / 2; IndexBm = bm; } template <class T> bool BPlusTree<T>::insertKey(T newkey, int offsetNumber) { if (rootNumber == -1) { TreeNode<T> node = CreateNewTreeNode(0, 1); rootNumber = 0; count++; firstLeafNumber = 0; string name = node.GetNodeFullName(); IndexBm.CreateTable(name, length, 0); node.InsertKeyInLeaf(newkey, offsetNumber); node.WriteBackToDisk(length, &IndexBm, AttributeType); firstLeafNumber = 0; node.SetNextNode(-1); return 0; } else { int NodeNumber = FindNodePosition(newkey); TreeNode<T> temp(indexName, NodeNumber, degree); temp.ReadFromDisk(length, AttributeType, &IndexBm); if (!temp.isfull()) { temp.InsertKeyInLeaf(newkey, offsetNumber); temp.WriteBackToDisk(length, &IndexBm, AttributeType); } else { split(temp, newkey, offsetNumber); } } return 0; } template <class T> TreeNode<T> BPlusTree<T>::CreateNewTreeNode(int NodeID, int IsLeaf) { TreeNode<T> node(indexName, NodeID, degree); node.SetIsLeaf(IsLeaf); return node; } template <class T> int BPlusTree<T>::FindNodePosition(T newkey) { int head = rootNumber; if (head == 0) return 0; while (1) { TreeNode<T> parent(indexName, head, degree); parent.ReadFromDisk(length, AttributeType, &IndexBm); if (parent.GetIsLeaf())break; int i; for (i = 0; i<parent.count - 1; i++) { if (newkey < parent.KeyValue[i]) break; } head = parent.son[i]; } return head; } template <class T> bool BPlusTree<T>::split(TreeNode<T> FirstNode, T newkey, int offsetNumber) { TreeNode<T> SecondNode = CreateNewTreeNode(count, 1); count++; SecondNode.SetIsLeaf(1); string name = SecondNode.GetNodeFullName(); IndexBm.CreateTable(name, length, 0); FirstNode.InsertKeyInLeaf(newkey, offsetNumber); int i = (degree + 3) / 2; for (; i <= degree; i++) SecondNode.InsertKeyInLeaf(FirstNode.KeyValue[i], FirstNode.son[i]); int cal = (degree + 3) / 2; for (i = degree; i >= cal; i--) FirstNode.DeleteKeyInLeaf(i); SecondNode.SetNextNode(FirstNode.NextNode); FirstNode.SetNextNode(count - 1); if (FirstNode.father == -1) SecondNode.father = FirstNode.father = count; else SecondNode.father = FirstNode.father; FirstNode.WriteBackToDisk(length, &IndexBm, AttributeType); SecondNode.WriteBackToDisk(length, &IndexBm, AttributeType); if (FirstNode.father == count) InsertInFather(FirstNode.TreeNodeNumber, -1, SecondNode.KeyValue[0], count - 1); else InsertInFather(FirstNode.TreeNodeNumber, FirstNode.father, SecondNode.KeyValue[0], count - 1); return 1; } template <class T> void BPlusTree<T>::InsertInFather(int FirstSonID, int MyID, T NewValue, int pointer) { if (MyID == -1) { TreeNode<T> Root = CreateNewTreeNode(count, 0); rootNumber = count; count++; // cout << count; string name = Root.GetNodeFullName(); IndexBm.CreateTable(name, length, 0); Root.son[0] = FirstSonID; Root.count++; Root.InsertInternalNode(NewValue, pointer); Root.WriteBackToDisk(length, &IndexBm, AttributeType); return; } TreeNode<T> node(indexName, MyID, degree); node.ReadFromDisk(length, AttributeType, &IndexBm); if (node.isfull() == 0) { node.InsertInternalNode(NewValue, pointer); node.WriteBackToDisk(length, &IndexBm, AttributeType); } else { if (node.GetFatherPointer() == -1) { TreeNode<T> RootNode = CreateNewTreeNode(count, 0); rootNumber = count; node.father = count; count++; // cout << count; string name = RootNode.GetNodeFullName(); IndexBm.CreateTable(name, length, 0); RootNode.son[0] = MyID; RootNode.count++; RootNode.WriteBackToDisk(length, &IndexBm, AttributeType); splitInternalNode(node, NewValue, pointer); } else splitInternalNode(node, NewValue, pointer); } } template <class T> int BPlusTree<T>::splitInternalNode(TreeNode<T> FirstNode, T newkey, int offsetNumber) { TreeNode<T> SecondNode = CreateNewTreeNode(count, 1); SecondNode.SetIsLeaf(0); count++; SecondNode.father = FirstNode.father; string name = SecondNode.GetNodeFullName(); IndexBm.CreateTable(name, length, 0); int rem = FirstNode.InsertInternalNode(newkey, offsetNumber); if (newkey == FirstNode.KeyValue[degree]) rem = offsetNumber; int i = (degree + 2) / 2; T temp = FirstNode.KeyValue[i]; SecondNode.son[0] = FirstNode.son[i + 1]; SecondNode.count++; FirstNode.DeleteKeyInInternal(i, rem); int sig = i; for (; i < degree; i++) { SecondNode.InsertInternalNode(FirstNode.KeyValue[sig], FirstNode.son[sig + 1]); FirstNode.DeleteKeyInInternal(sig, rem); } for (i = 0; i<SecondNode.count; i++) { TreeNode<T> SonNode(indexName, SecondNode.son[i], degree); SonNode.ReadFromDisk(length, AttributeType, &IndexBm); SonNode.father = SecondNode.TreeNodeNumber; SonNode.WriteBackToDisk(length, &IndexBm, AttributeType); } FirstNode.WriteBackToDisk(length, &IndexBm, AttributeType); SecondNode.WriteBackToDisk(length, &IndexBm, AttributeType); InsertInFather(FirstNode.TreeNodeNumber, SecondNode.father, temp, count - 1); ////// return count - 1; } template <class T> bool BPlusTree<T>::storeTree() { TreeNode<T> Son(indexName, 0, degree); Son.ReadFromDisk(length, AttributeType, &IndexBm); IndexBm.StoreBuffer(); return 0; } template <class T> void BPlusTree<T>::dropTree() { stringstream ss; for (int i = 0; i<count; i++) { string temp; ss.clear(); ss << i; ss >> temp; string name = indexName + temp; IndexBm.DropTable(name); } } template <class T> void BPlusTree<T>::ClearTree() { stringstream ss; for (int i = 0; i<count; i++) { string temp; ss.clear(); ss << i; ss >> temp; string name = indexName + temp; IndexBm.DropTable(name); } firstLeafNumber = -1; rootNumber = -1; count = 0; } template <class T> bool BPlusTree<T>::printleaf() { /*int first = firstLeafNumber; while (first != -1) { TreeNode<T> parent(indexName, first, degree); parent.ReadFromDisk(length, AttributeType, &IndexBm); for (int i = 0; i<parent.count; i++) cout << parent.KeyValue[i] << endl; cout << "This Node:" << parent.TreeNodeNumber << endl; cout << "Next Node:" << parent.NextNode << endl; cout << "Father Node:" << parent.father << endl; cout << endl; first = parent.NextNode; } return 0;*/ } template <class T> int BPlusTree<T>::FindKey(T Key) { int pos = FindNodePosition(Key); TreeNode<T> node(indexName, pos, degree); node.ReadFromDisk(length, AttributeType, &IndexBm); return node.FindKeyPos(Key); } template <class T> bool BPlusTree<T>::deleteKey(T oldkey) // Delete an index record { int pos = rootNumber; if (pos == 0) { TreeNode<T> leaf(indexName, 0, degree); leaf.ReadFromDisk(length, AttributeType, &IndexBm); leaf.DeleteKeyInLeafByKey(oldkey); if (leaf.count == 0) { rootNumber = -1; firstLeafNumber = -1; leaf.DeleteNode(&IndexBm); return 0; } leaf.WriteBackToDisk(length, &IndexBm, AttributeType); return 0; } /*---------- find key in leaf ----------*/ int ParentNumber = rootNumber, SiblingNumber = 0; while (1) { TreeNode<T> parent(indexName, pos, degree); parent.ReadFromDisk(length, AttributeType, &IndexBm); if (parent.GetIsLeaf())break; int i; for (i = 0; i<parent.count - 1; i++) { if (oldkey < parent.KeyValue[i]) { if (i != 0) SiblingNumber = parent.son[i - 1]; else SiblingNumber = parent.son[1]; break; } } ParentNumber = pos; pos = parent.son[i]; if (i == parent.count - 1) SiblingNumber = parent.son[i - 1]; } TreeNode<T> node(indexName, pos, degree); node.ReadFromDisk(length, AttributeType, &IndexBm); node.DeleteKeyInLeafByKey(oldkey); if (node.count < (degree + 1) / 2) { TreeNode<T> sibling(indexName, SiblingNumber, degree); sibling.ReadFromDisk(length, AttributeType, &IndexBm); T KeyChangeInParent; int SonOff; if (node.count + sibling.count <= degree) { if (node.KeyValue[0] < sibling.KeyValue[0]) { int OriginNumber = node.count; for (int i = 0; i<sibling.count; i++) { node.KeyValue[OriginNumber + i] = sibling.KeyValue[i]; node.son[OriginNumber + i] = sibling.son[i]; } SonOff = sibling.TreeNodeNumber; node.NextNode = sibling.NextNode; node.count += sibling.count; sibling.DeleteNode(&IndexBm); node.WriteBackToDisk(length, &IndexBm, AttributeType); } else { int OriginNumber = sibling.count; for (int i = 0; i<node.count; i++) { sibling.KeyValue[OriginNumber + i] = node.KeyValue[i]; sibling.son[OriginNumber + i] = node.son[i]; } SonOff = node.TreeNodeNumber; sibling.NextNode = node.NextNode; sibling.count += node.count; node.DeleteNode(&IndexBm); sibling.WriteBackToDisk(length, &IndexBm, AttributeType); } DeleteInInternal(ParentNumber, SonOff); return 0; } else { if (node.KeyValue[0] < sibling.KeyValue[0]) { SonOff = node.TreeNodeNumber; node.KeyValue[node.count] = sibling.KeyValue[0]; node.son[node.count] = sibling.son[0]; node.count++; sibling.DeleteKeyInLeaf(0); KeyChangeInParent = sibling.KeyValue[0]; sibling.WriteBackToDisk(length, &IndexBm, AttributeType); node.WriteBackToDisk(length, &IndexBm, AttributeType); } else { int FinalPos = sibling.count - 1; SonOff = sibling.TreeNodeNumber; for (int i = node.count; i>0; i--) { node.KeyValue[i] = node.KeyValue[i - 1]; node.son[i] = node.son[i - 1]; } node.KeyValue[0] = sibling.KeyValue[FinalPos]; node.son[0] = sibling.son[FinalPos]; sibling.count--; node.count++; KeyChangeInParent = node.KeyValue[0]; sibling.WriteBackToDisk(length, &IndexBm, AttributeType); node.WriteBackToDisk(length, &IndexBm, AttributeType); } ChangeKeyInInternal(ParentNumber, KeyChangeInParent, SonOff); return 0; } } node.WriteBackToDisk(length, &IndexBm, AttributeType); return 0; } template <class T> bool BPlusTree<T>::DeleteInInternal(int ParentNumber, int SonOff) { TreeNode<T> node(indexName, ParentNumber, degree); node.ReadFromDisk(length, AttributeType, &IndexBm); for (int i = 1; i<node.count; i++) { if (SonOff == node.son[i]) { int rm = -1; node.DeleteKeyInInternal(i - 1, rm); break; } } if (node.count == 1 && node.TreeNodeNumber == rootNumber) { rootNumber = node.son[0]; node.DeleteNode(&IndexBm); return 0; } if (node.count < (degree + 1) / 2 && node.TreeNodeNumber != rootNumber) { int SiblingNumber; TreeNode<T> parent(indexName, node.father, degree); parent.ReadFromDisk(length, AttributeType, &IndexBm); T MiddleKeyValue; if (parent.son[0] == ParentNumber) { SiblingNumber = parent.son[1]; MiddleKeyValue = parent.KeyValue[0]; } else { for (int i = 1; i<count; i++) if (parent.son[i] == ParentNumber) { MiddleKeyValue = parent.KeyValue[i - 1]; SiblingNumber = parent.son[i - 1]; break; } } TreeNode<T> sibling(indexName, SiblingNumber, degree); sibling.ReadFromDisk(length, AttributeType, &IndexBm); if (node.count + sibling.count <= degree + 1) { int SonOff; if (node.KeyValue[0] < sibling.KeyValue[0]) { int OriginNumber = node.count, i; for (i = 0; i<sibling.count - 1; i++) { node.KeyValue[OriginNumber + i] = sibling.KeyValue[i]; node.son[OriginNumber + i] = sibling.son[i]; } node.son[OriginNumber + i] = sibling.son[i]; node.KeyValue[OriginNumber - 1] = MiddleKeyValue; SonOff = sibling.TreeNodeNumber; node.NextNode = sibling.NextNode; node.count += sibling.count; for (int i = 0; i<sibling.count; i++) { TreeNode<T> ChangeSon(indexName, sibling.son[i], degree); ChangeSon.ReadFromDisk(length, AttributeType, &IndexBm); ChangeSon.father = node.TreeNodeNumber; ChangeSon.WriteBackToDisk(length, &IndexBm, AttributeType); } sibling.DeleteNode(&IndexBm); node.WriteBackToDisk(length, &IndexBm, AttributeType); } else { int OriginNumber = sibling.count, i; for (i = 0; i<node.count - 1; i++) { sibling.KeyValue[OriginNumber + i] = node.KeyValue[i]; sibling.son[OriginNumber + i] = node.son[i]; } sibling.KeyValue[OriginNumber - 1] = MiddleKeyValue; sibling.son[OriginNumber + i] = node.son[i]; SonOff = node.TreeNodeNumber; sibling.NextNode = node.NextNode; sibling.count += node.count; for (int i = 0; i<node.count; i++) { TreeNode<T> ChangeSon(indexName, node.son[i], degree); ChangeSon.ReadFromDisk(length, AttributeType, &IndexBm); ChangeSon.father = sibling.TreeNodeNumber; ChangeSon.WriteBackToDisk(length, &IndexBm, AttributeType); } node.DeleteNode(&IndexBm); sibling.WriteBackToDisk(length, &IndexBm, AttributeType); } DeleteInInternal(node.father, SonOff); return 0; } else { T KeyChangeInParent; if (node.KeyValue[0] < sibling.KeyValue[0]) { SonOff = node.TreeNodeNumber; node.KeyValue[node.count - 1] = MiddleKeyValue; node.son[node.count] = sibling.son[0]; node.count++; KeyChangeInParent = sibling.KeyValue[0]; TreeNode<T> ChangeSon(indexName, sibling.son[0], degree); ChangeSon.ReadFromDisk(length, AttributeType, &IndexBm); ChangeSon.father = node.TreeNodeNumber; ChangeSon.WriteBackToDisk(length, &IndexBm, AttributeType); sibling.son[0] = sibling.son[1]; int rm = -1; sibling.DeleteKeyInInternal(0, rm); sibling.WriteBackToDisk(length, &IndexBm, AttributeType); node.WriteBackToDisk(length, &IndexBm, AttributeType); } else { SonOff = sibling.TreeNodeNumber; for (int i = node.count - 1; i>1; i--) { node.son[i] = node.son[i - 1]; node.KeyValue[i - 1] = node.KeyValue[i - 2]; } node.son[1] = node.son[0]; node.KeyValue[0] = MiddleKeyValue; int FinalPos = sibling.count - 1; node.son[0] = sibling.son[FinalPos]; node.count++; TreeNode<T> ChangeSon(indexName, node.son[0], degree); ChangeSon.ReadFromDisk(length, AttributeType, &IndexBm); ChangeSon.father = node.TreeNodeNumber; ChangeSon.WriteBackToDisk(length, &IndexBm, AttributeType); sibling.count--; KeyChangeInParent = sibling.KeyValue[FinalPos - 1]; sibling.WriteBackToDisk(length, &IndexBm, AttributeType); node.WriteBackToDisk(length, &IndexBm, AttributeType); } ChangeKeyInInternal(node.father, KeyChangeInParent, SonOff); return 0; } } node.WriteBackToDisk(length, &IndexBm, AttributeType); return 0; } template <class T> bool BPlusTree<T>::ChangeKeyInInternal(int ParentNumber, T KeyChangeInParent, int SonOff) { TreeNode<T> node(indexName, ParentNumber, degree); node.ReadFromDisk(length, AttributeType, &IndexBm); for (int i = 0; i<node.count - 1; i++) if (SonOff == node.son[i]) { node.KeyValue[i] = KeyChangeInParent; break; } node.WriteBackToDisk(length, &IndexBm, AttributeType); return 0; } template <class T> void TreeNode<T>::DeleteKeyInLeafByKey(const T oldkey) { int i; for (i = 0; i<count; i++) { if (KeyValue[i] == oldkey) break; } count--; for (; i<count; i++) { KeyValue[i] = KeyValue[i + 1]; son[i] = son[i + 1]; } } template <class T> void TreeNode<T>::DeleteNode(BufMan* IndexBm) { string ID; stringstream ss; ss << TreeNodeNumber; ss >> ID; string name = Indexname + ID; IndexBm->DropTable(name); } template <class T> void BPlusTree<T>::FindResult(T Key, int ConditionType, vector<int> &OffsetResult) { if (ConditionType == 0) { /*---------- < ----------*/ int first = firstLeafNumber; while (first != -1) { TreeNode<T> parent(indexName, first, degree); parent.ReadFromDisk(length, AttributeType, &IndexBm); for (int i = 0; i<parent.count; i++) { if (parent.KeyValue[i] < Key) OffsetResult.push_back(parent.son[i]); if (parent.KeyValue[i] >= Key) return; } first = parent.NextNode; } } else if (ConditionType == 1) { /*---------- <= ----------*/ int first = firstLeafNumber; while (first != -1) { TreeNode<T> parent(indexName, first, degree); parent.ReadFromDisk(length, AttributeType, &IndexBm); for (int i = 0; i<parent.count; i++) { if (parent.KeyValue[i] <= Key) OffsetResult.push_back(parent.son[i]); if (parent.KeyValue[i] > Key) return; } first = parent.NextNode; } } else if (ConditionType == 2) { /*---------- > ----------*/ int block = FindNodePosition(Key), i; TreeNode<T> parent(indexName, block, degree); parent.ReadFromDisk(length, AttributeType, &IndexBm); for (i = 0; i<parent.count; i++) { if (parent.KeyValue[i] == Key) break; if (parent.KeyValue[i] > Key) { i--; break; } } i = i + 1; for (; i<parent.count; i++) OffsetResult.push_back(parent.son[i]); block = parent.NextNode; while (block != -1) { TreeNode<T> parent(indexName, block, degree); parent.ReadFromDisk(length, AttributeType, &IndexBm); for (int i = 0; i<parent.count; i++) OffsetResult.push_back(parent.son[i]); block = parent.NextNode; } } else if (ConditionType == 3) { /*---------- >= ----------*/ int block = FindNodePosition(Key), i; TreeNode<T> parent(indexName, block, degree); parent.ReadFromDisk(length, AttributeType, &IndexBm); for (i = 0; i<parent.count; i++) { if (parent.KeyValue[i] >= Key) break; } for (; i<parent.count; i++) OffsetResult.push_back(parent.son[i]); block = parent.NextNode; while (block != -1) { TreeNode<T> parent(indexName, block, degree); parent.ReadFromDisk(length, AttributeType, &IndexBm); for (int i = 0; i<parent.count; i++) OffsetResult.push_back(parent.son[i]); block = parent.NextNode; } } else if (ConditionType == 4) { /*---------- == ----------*/ int offset = FindKey(Key); OffsetResult.push_back(offset); } else if (ConditionType == 5) { /*---------- <> ----------*/ int first = firstLeafNumber; while (first != -1) { TreeNode<T> parent(indexName, first, degree); parent.ReadFromDisk(length, AttributeType, &IndexBm); for (int i = 0; i<parent.count; i++) if (parent.KeyValue[i] != Key) OffsetResult.push_back(parent.son[i]); first = parent.NextNode; } } return; } #endif // !BPLUSTREE_H
28d832f8f1689aaaa412740ceafe6f3672ba50e5
7de854b1a7e5fb9302fc07904f0d83858f8f3fd7
/TestChess/BattelGround.h
ce476cf33cd8742d78714377c8a82b28ab561269
[]
no_license
sqqwer/TestChess
890f82d2f4d282023ab3bc96fbc53ac268dda5b7
fbdef252263308bb9742dc1e8303493d20f21bee
refs/heads/master
2023-06-24T09:43:31.820362
2021-07-26T20:08:56
2021-07-26T20:08:56
388,090,130
0
0
null
null
null
null
UTF-8
C++
false
false
336
h
BattelGround.h
#ifndef BattelGroundMap #define BattelGroundMap #include "Object.h" #include "General.h" #include "Struc.h" class BattelGround : public Object { public: bool InitBattelGround( const My_Str Name, const SDL_PixelFormat* Fmt, SDL_Renderer* Renderer, int x, int y ); DoublePair MapSection[8][8]; }; #endif // !BattelGroundMap
dbb6742dbbc7960b673cef1aa9888c0944a9a26c
eb74f7f9d0c98d9f66a6f4a004b82426e4ebfbc7
/CPUPathTracer/vec3.h
abc8ca59cdea4c793b22f5c2ddb0827ba46bf80e
[]
no_license
CulDeVu/CPUPathTracer
3ba00728ba3445df56ab7340c7464542fcda5f5e
b378781d86dc12296e88bbefe229752913b1de13
refs/heads/master
2021-01-17T06:14:22.038631
2017-05-14T18:35:05
2017-05-14T18:35:05
51,213,383
1
0
null
null
null
null
UTF-8
C++
false
false
1,122
h
vec3.h
#pragma once #include <math.h> using namespace std; /* struct vec3 { vec3() : vec3(0, 0, 0) {} vec3(float a, float b, float c) : x(a), y(b), z(c) {} float x, y, z; float length() { return sqrt(x*x + y*y + z*z); } float lengthsqr() { return x*x + y*y + z*z; } vec3 normalized() { float len = length(); vec3 me = vec3(x / len, y / len, z / len); return me; } vec3 operator+(vec3 other) const { vec3 t = vec3(other.x + x, other.y + y, other.z + z); return t; } vec3 operator-(vec3 other) const { vec3 t = vec3(x - other.x, y - other.y, z - other.z); return t; } vec3 operator*(float f) const { vec3 t = vec3(x * f, y * f, z * f); return t; } vec3 operator/(float f) const { vec3 t = vec3(x / f, y / f, z / f); return t; } bool operator==(const vec3& rhs) { return (x == rhs.x) && (y == rhs.y) && (z == rhs.z); } bool operator!=(const vec3& rhs) { return !(*this == rhs); } }; float dot(vec3 v1, vec3 v2) { return v1.x*v2.x + v1.y*v2.y + v1.z*v2.z; } vec3 cross(vec3 v1, vec3 v2) { return vec3(v1.y*v2.z - v1.z*v2.y, v1.z*v2.x - v1.x*v2.z, v1.x*v2.y - v1.y*v2.x); } */
9283e95c1eddbba3042ba3a51546cdaade478466
cfeac52f970e8901871bd02d9acb7de66b9fb6b4
/generated/src/aws-cpp-sdk-rekognition/include/aws/rekognition/model/PutProjectPolicyResult.h
a5d0131ae788513bf9783fcfe21cfba4621ef528
[ "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,849
h
PutProjectPolicyResult.h
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/rekognition/Rekognition_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <utility> namespace Aws { template<typename RESULT_TYPE> class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace Rekognition { namespace Model { class PutProjectPolicyResult { public: AWS_REKOGNITION_API PutProjectPolicyResult(); AWS_REKOGNITION_API PutProjectPolicyResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); AWS_REKOGNITION_API PutProjectPolicyResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); /** * <p>The ID of the project policy.</p> */ inline const Aws::String& GetPolicyRevisionId() const{ return m_policyRevisionId; } /** * <p>The ID of the project policy.</p> */ inline void SetPolicyRevisionId(const Aws::String& value) { m_policyRevisionId = value; } /** * <p>The ID of the project policy.</p> */ inline void SetPolicyRevisionId(Aws::String&& value) { m_policyRevisionId = std::move(value); } /** * <p>The ID of the project policy.</p> */ inline void SetPolicyRevisionId(const char* value) { m_policyRevisionId.assign(value); } /** * <p>The ID of the project policy.</p> */ inline PutProjectPolicyResult& WithPolicyRevisionId(const Aws::String& value) { SetPolicyRevisionId(value); return *this;} /** * <p>The ID of the project policy.</p> */ inline PutProjectPolicyResult& WithPolicyRevisionId(Aws::String&& value) { SetPolicyRevisionId(std::move(value)); return *this;} /** * <p>The ID of the project policy.</p> */ inline PutProjectPolicyResult& WithPolicyRevisionId(const char* value) { SetPolicyRevisionId(value); return *this;} inline const Aws::String& GetRequestId() const{ return m_requestId; } inline void SetRequestId(const Aws::String& value) { m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestId.assign(value); } inline PutProjectPolicyResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline PutProjectPolicyResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline PutProjectPolicyResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::String m_policyRevisionId; Aws::String m_requestId; }; } // namespace Model } // namespace Rekognition } // namespace Aws
f82bd5000766852a13a81369d6c2affc7395187a
b052937681803bd58d410d6e84abfabf9c6c598e
/sw_x/gvm_core/vplex/proto/vplex_ias_service_types.pb.h
e7d7ea6d0ae923119d3e3459bbf5d8e2cc941de6
[]
no_license
muyl1/acer_cloud_wifi_copy
a8eff32e7dc02769bd2302914a7d5bd984227365
f7459f5d28056fa3884720cbd891d77e0b00698b
refs/heads/master
2021-05-27T08:52:21.443483
2014-06-17T09:17:17
2014-06-17T09:17:17
null
0
0
null
null
null
null
UTF-8
C++
false
true
272,009
h
vplex_ias_service_types.pb.h
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: vplex_ias_service_types.proto #ifndef PROTOBUF_vplex_5fias_5fservice_5ftypes_2eproto__INCLUDED #define PROTOBUF_vplex_5fias_5fservice_5ftypes_2eproto__INCLUDED #include <string> #include <google/protobuf/stubs/common.h> #if GOOGLE_PROTOBUF_VERSION < 2004000 #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 2004000 < 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/repeated_field.h> #include <google/protobuf/extension_set.h> #include <google/protobuf/generated_message_reflection.h> // @@protoc_insertion_point(includes) namespace vplex { namespace ias { // Internal implementation detail -- do not call these. void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); class AbstractRequestType; class AbstractResponseType; class CheckVirtualDeviceCredentialsRenewalRequestType; class CheckVirtualDeviceCredentialsRenewalResponseType; class StrAttributeType; class GetSessionKeyRequestType; class GetSessionKeyResponseType; class LoginRequestType; class LoginResponseType; class LogoutRequestType; class LogoutResponseType; class RegisterVirtualDeviceRequestType; class RegisterVirtualDeviceResponseType; class RenewVirtualDeviceCredentialsRequestType; class RenewVirtualDeviceCredentialsResponseType; class GetServerKeyRequestType; class GetServerKeyResponseType; class RequestPairingRequestType; class RequestPairingResponseType; class RespondToPairingRequestRequestType; class RespondToPairingRequestResponseType; class RequestPairingPinRequestType; class RequestPairingPinResponseType; class GetPairingStatusRequestType; class GetPairingStatusResponseType; // =================================================================== class AbstractRequestType : public ::google::protobuf::Message { public: AbstractRequestType(); virtual ~AbstractRequestType(); AbstractRequestType(const AbstractRequestType& from); inline AbstractRequestType& operator=(const AbstractRequestType& 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 AbstractRequestType& default_instance(); void Swap(AbstractRequestType* other); // implements Message ---------------------------------------------- AbstractRequestType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const AbstractRequestType& from); void MergeFrom(const AbstractRequestType& 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 string Version = 1; inline bool has_version() const; inline void clear_version(); static const int kVersionFieldNumber = 1; inline const ::std::string& version() const; inline void set_version(const ::std::string& value); inline void set_version(const char* value); inline void set_version(const char* value, size_t size); inline ::std::string* mutable_version(); inline ::std::string* release_version(); // required string MessageId = 2; inline bool has_messageid() const; inline void clear_messageid(); static const int kMessageIdFieldNumber = 2; inline const ::std::string& messageid() const; inline void set_messageid(const ::std::string& value); inline void set_messageid(const char* value); inline void set_messageid(const char* value, size_t size); inline ::std::string* mutable_messageid(); inline ::std::string* release_messageid(); // optional fixed64 DeviceId = 3; inline bool has_deviceid() const; inline void clear_deviceid(); static const int kDeviceIdFieldNumber = 3; inline ::google::protobuf::uint64 deviceid() const; inline void set_deviceid(::google::protobuf::uint64 value); // optional string Region = 7; inline bool has_region() const; inline void clear_region(); static const int kRegionFieldNumber = 7; inline const ::std::string& region() const; inline void set_region(const ::std::string& value); inline void set_region(const char* value); inline void set_region(const char* value, size_t size); inline ::std::string* mutable_region(); inline ::std::string* release_region(); // optional string Country = 8; inline bool has_country() const; inline void clear_country(); static const int kCountryFieldNumber = 8; inline const ::std::string& country() const; inline void set_country(const ::std::string& value); inline void set_country(const char* value); inline void set_country(const char* value, size_t size); inline ::std::string* mutable_country(); inline ::std::string* release_country(); // optional string Language = 9; inline bool has_language() const; inline void clear_language(); static const int kLanguageFieldNumber = 9; inline const ::std::string& language() const; inline void set_language(const ::std::string& value); inline void set_language(const char* value); inline void set_language(const char* value, size_t size); inline ::std::string* mutable_language(); inline ::std::string* release_language(); // optional fixed64 SessionHandle = 10; inline bool has_sessionhandle() const; inline void clear_sessionhandle(); static const int kSessionHandleFieldNumber = 10; inline ::google::protobuf::uint64 sessionhandle() const; inline void set_sessionhandle(::google::protobuf::uint64 value); // optional bytes ServiceTicket = 11; inline bool has_serviceticket() const; inline void clear_serviceticket(); static const int kServiceTicketFieldNumber = 11; inline const ::std::string& serviceticket() const; inline void set_serviceticket(const ::std::string& value); inline void set_serviceticket(const char* value); inline void set_serviceticket(const void* value, size_t size); inline ::std::string* mutable_serviceticket(); inline ::std::string* release_serviceticket(); // optional string ServiceId = 12; inline bool has_serviceid() const; inline void clear_serviceid(); static const int kServiceIdFieldNumber = 12; inline const ::std::string& serviceid() const; inline void set_serviceid(const ::std::string& value); inline void set_serviceid(const char* value); inline void set_serviceid(const char* value, size_t size); inline ::std::string* mutable_serviceid(); inline ::std::string* release_serviceid(); // @@protoc_insertion_point(class_scope:vplex.ias.AbstractRequestType) private: inline void set_has_version(); inline void clear_has_version(); inline void set_has_messageid(); inline void clear_has_messageid(); inline void set_has_deviceid(); inline void clear_has_deviceid(); inline void set_has_region(); inline void clear_has_region(); inline void set_has_country(); inline void clear_has_country(); inline void set_has_language(); inline void clear_has_language(); inline void set_has_sessionhandle(); inline void clear_has_sessionhandle(); inline void set_has_serviceticket(); inline void clear_has_serviceticket(); inline void set_has_serviceid(); inline void clear_has_serviceid(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::std::string* version_; ::std::string* messageid_; ::google::protobuf::uint64 deviceid_; ::std::string* region_; ::std::string* country_; ::std::string* language_; ::google::protobuf::uint64 sessionhandle_; ::std::string* serviceticket_; ::std::string* serviceid_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(9 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static AbstractRequestType* default_instance_; }; // ------------------------------------------------------------------- class AbstractResponseType : public ::google::protobuf::Message { public: AbstractResponseType(); virtual ~AbstractResponseType(); AbstractResponseType(const AbstractResponseType& from); inline AbstractResponseType& operator=(const AbstractResponseType& 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 AbstractResponseType& default_instance(); void Swap(AbstractResponseType* other); // implements Message ---------------------------------------------- AbstractResponseType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const AbstractResponseType& from); void MergeFrom(const AbstractResponseType& 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 string Version = 1; inline bool has_version() const; inline void clear_version(); static const int kVersionFieldNumber = 1; inline const ::std::string& version() const; inline void set_version(const ::std::string& value); inline void set_version(const char* value); inline void set_version(const char* value, size_t size); inline ::std::string* mutable_version(); inline ::std::string* release_version(); // optional fixed64 DeviceId = 2; inline bool has_deviceid() const; inline void clear_deviceid(); static const int kDeviceIdFieldNumber = 2; inline ::google::protobuf::uint64 deviceid() const; inline void set_deviceid(::google::protobuf::uint64 value); // required string MessageId = 3; inline bool has_messageid() const; inline void clear_messageid(); static const int kMessageIdFieldNumber = 3; inline const ::std::string& messageid() const; inline void set_messageid(const ::std::string& value); inline void set_messageid(const char* value); inline void set_messageid(const char* value, size_t size); inline ::std::string* mutable_messageid(); inline ::std::string* release_messageid(); // required fixed64 TimeStamp = 4; inline bool has_timestamp() const; inline void clear_timestamp(); static const int kTimeStampFieldNumber = 4; inline ::google::protobuf::uint64 timestamp() const; inline void set_timestamp(::google::protobuf::uint64 value); // required sint32 ErrorCode = 5; inline bool has_errorcode() const; inline void clear_errorcode(); static const int kErrorCodeFieldNumber = 5; inline ::google::protobuf::int32 errorcode() const; inline void set_errorcode(::google::protobuf::int32 value); // optional string ErrorMessage = 6; inline bool has_errormessage() const; inline void clear_errormessage(); static const int kErrorMessageFieldNumber = 6; inline const ::std::string& errormessage() const; inline void set_errormessage(const ::std::string& value); inline void set_errormessage(const char* value); inline void set_errormessage(const char* value, size_t size); inline ::std::string* mutable_errormessage(); inline ::std::string* release_errormessage(); // optional bool ServiceStandbyMode = 7; inline bool has_servicestandbymode() const; inline void clear_servicestandbymode(); static const int kServiceStandbyModeFieldNumber = 7; inline bool servicestandbymode() const; inline void set_servicestandbymode(bool value); // @@protoc_insertion_point(class_scope:vplex.ias.AbstractResponseType) private: inline void set_has_version(); inline void clear_has_version(); inline void set_has_deviceid(); inline void clear_has_deviceid(); inline void set_has_messageid(); inline void clear_has_messageid(); inline void set_has_timestamp(); inline void clear_has_timestamp(); inline void set_has_errorcode(); inline void clear_has_errorcode(); inline void set_has_errormessage(); inline void clear_has_errormessage(); inline void set_has_servicestandbymode(); inline void clear_has_servicestandbymode(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::std::string* version_; ::google::protobuf::uint64 deviceid_; ::std::string* messageid_; ::google::protobuf::uint64 timestamp_; ::std::string* errormessage_; ::google::protobuf::int32 errorcode_; bool servicestandbymode_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(7 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static AbstractResponseType* default_instance_; }; // ------------------------------------------------------------------- class CheckVirtualDeviceCredentialsRenewalRequestType : public ::google::protobuf::Message { public: CheckVirtualDeviceCredentialsRenewalRequestType(); virtual ~CheckVirtualDeviceCredentialsRenewalRequestType(); CheckVirtualDeviceCredentialsRenewalRequestType(const CheckVirtualDeviceCredentialsRenewalRequestType& from); inline CheckVirtualDeviceCredentialsRenewalRequestType& operator=(const CheckVirtualDeviceCredentialsRenewalRequestType& 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 CheckVirtualDeviceCredentialsRenewalRequestType& default_instance(); void Swap(CheckVirtualDeviceCredentialsRenewalRequestType* other); // implements Message ---------------------------------------------- CheckVirtualDeviceCredentialsRenewalRequestType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const CheckVirtualDeviceCredentialsRenewalRequestType& from); void MergeFrom(const CheckVirtualDeviceCredentialsRenewalRequestType& 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 .vplex.ias.AbstractRequestType _inherited = 1; inline bool has__inherited() const; inline void clear__inherited(); static const int kInheritedFieldNumber = 1; inline const ::vplex::ias::AbstractRequestType& _inherited() const; inline ::vplex::ias::AbstractRequestType* mutable__inherited(); inline ::vplex::ias::AbstractRequestType* release__inherited(); // required fixed64 IssueDate = 2; inline bool has_issuedate() const; inline void clear_issuedate(); static const int kIssueDateFieldNumber = 2; inline ::google::protobuf::uint64 issuedate() const; inline void set_issuedate(::google::protobuf::uint64 value); // required fixed64 SerialNumber = 3; inline bool has_serialnumber() const; inline void clear_serialnumber(); static const int kSerialNumberFieldNumber = 3; inline ::google::protobuf::uint64 serialnumber() const; inline void set_serialnumber(::google::protobuf::uint64 value); // @@protoc_insertion_point(class_scope:vplex.ias.CheckVirtualDeviceCredentialsRenewalRequestType) private: inline void set_has__inherited(); inline void clear_has__inherited(); inline void set_has_issuedate(); inline void clear_has_issuedate(); inline void set_has_serialnumber(); inline void clear_has_serialnumber(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::vplex::ias::AbstractRequestType* _inherited_; ::google::protobuf::uint64 issuedate_; ::google::protobuf::uint64 serialnumber_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static CheckVirtualDeviceCredentialsRenewalRequestType* default_instance_; }; // ------------------------------------------------------------------- class CheckVirtualDeviceCredentialsRenewalResponseType : public ::google::protobuf::Message { public: CheckVirtualDeviceCredentialsRenewalResponseType(); virtual ~CheckVirtualDeviceCredentialsRenewalResponseType(); CheckVirtualDeviceCredentialsRenewalResponseType(const CheckVirtualDeviceCredentialsRenewalResponseType& from); inline CheckVirtualDeviceCredentialsRenewalResponseType& operator=(const CheckVirtualDeviceCredentialsRenewalResponseType& 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 CheckVirtualDeviceCredentialsRenewalResponseType& default_instance(); void Swap(CheckVirtualDeviceCredentialsRenewalResponseType* other); // implements Message ---------------------------------------------- CheckVirtualDeviceCredentialsRenewalResponseType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const CheckVirtualDeviceCredentialsRenewalResponseType& from); void MergeFrom(const CheckVirtualDeviceCredentialsRenewalResponseType& 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 .vplex.ias.AbstractResponseType _inherited = 1; inline bool has__inherited() const; inline void clear__inherited(); static const int kInheritedFieldNumber = 1; inline const ::vplex::ias::AbstractResponseType& _inherited() const; inline ::vplex::ias::AbstractResponseType* mutable__inherited(); inline ::vplex::ias::AbstractResponseType* release__inherited(); // required fixed64 ExpectedSerialNumber = 2; inline bool has_expectedserialnumber() const; inline void clear_expectedserialnumber(); static const int kExpectedSerialNumberFieldNumber = 2; inline ::google::protobuf::uint64 expectedserialnumber() const; inline void set_expectedserialnumber(::google::protobuf::uint64 value); // @@protoc_insertion_point(class_scope:vplex.ias.CheckVirtualDeviceCredentialsRenewalResponseType) private: inline void set_has__inherited(); inline void clear_has__inherited(); inline void set_has_expectedserialnumber(); inline void clear_has_expectedserialnumber(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::vplex::ias::AbstractResponseType* _inherited_; ::google::protobuf::uint64 expectedserialnumber_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static CheckVirtualDeviceCredentialsRenewalResponseType* default_instance_; }; // ------------------------------------------------------------------- class StrAttributeType : public ::google::protobuf::Message { public: StrAttributeType(); virtual ~StrAttributeType(); StrAttributeType(const StrAttributeType& from); inline StrAttributeType& operator=(const StrAttributeType& 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 StrAttributeType& default_instance(); void Swap(StrAttributeType* other); // implements Message ---------------------------------------------- StrAttributeType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const StrAttributeType& from); void MergeFrom(const StrAttributeType& 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 string AttributeName = 1; inline bool has_attributename() const; inline void clear_attributename(); static const int kAttributeNameFieldNumber = 1; inline const ::std::string& attributename() const; inline void set_attributename(const ::std::string& value); inline void set_attributename(const char* value); inline void set_attributename(const char* value, size_t size); inline ::std::string* mutable_attributename(); inline ::std::string* release_attributename(); // required string AttributeValue = 2; inline bool has_attributevalue() const; inline void clear_attributevalue(); static const int kAttributeValueFieldNumber = 2; inline const ::std::string& attributevalue() const; inline void set_attributevalue(const ::std::string& value); inline void set_attributevalue(const char* value); inline void set_attributevalue(const char* value, size_t size); inline ::std::string* mutable_attributevalue(); inline ::std::string* release_attributevalue(); // @@protoc_insertion_point(class_scope:vplex.ias.StrAttributeType) private: inline void set_has_attributename(); inline void clear_has_attributename(); inline void set_has_attributevalue(); inline void clear_has_attributevalue(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::std::string* attributename_; ::std::string* attributevalue_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static StrAttributeType* default_instance_; }; // ------------------------------------------------------------------- class GetSessionKeyRequestType : public ::google::protobuf::Message { public: GetSessionKeyRequestType(); virtual ~GetSessionKeyRequestType(); GetSessionKeyRequestType(const GetSessionKeyRequestType& from); inline GetSessionKeyRequestType& operator=(const GetSessionKeyRequestType& 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 GetSessionKeyRequestType& default_instance(); void Swap(GetSessionKeyRequestType* other); // implements Message ---------------------------------------------- GetSessionKeyRequestType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const GetSessionKeyRequestType& from); void MergeFrom(const GetSessionKeyRequestType& 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 .vplex.ias.AbstractRequestType _inherited = 1; inline bool has__inherited() const; inline void clear__inherited(); static const int kInheritedFieldNumber = 1; inline const ::vplex::ias::AbstractRequestType& _inherited() const; inline ::vplex::ias::AbstractRequestType* mutable__inherited(); inline ::vplex::ias::AbstractRequestType* release__inherited(); // required string Type = 2; inline bool has_type() const; inline void clear_type(); static const int kTypeFieldNumber = 2; inline const ::std::string& type() const; inline void set_type(const ::std::string& value); inline void set_type(const char* value); inline void set_type(const char* value, size_t size); inline ::std::string* mutable_type(); inline ::std::string* release_type(); // repeated .vplex.ias.StrAttributeType KeyAttributes = 3; inline int keyattributes_size() const; inline void clear_keyattributes(); static const int kKeyAttributesFieldNumber = 3; inline const ::vplex::ias::StrAttributeType& keyattributes(int index) const; inline ::vplex::ias::StrAttributeType* mutable_keyattributes(int index); inline ::vplex::ias::StrAttributeType* add_keyattributes(); inline const ::google::protobuf::RepeatedPtrField< ::vplex::ias::StrAttributeType >& keyattributes() const; inline ::google::protobuf::RepeatedPtrField< ::vplex::ias::StrAttributeType >* mutable_keyattributes(); // optional bytes EncryptedSessionKey = 4; inline bool has_encryptedsessionkey() const; inline void clear_encryptedsessionkey(); static const int kEncryptedSessionKeyFieldNumber = 4; inline const ::std::string& encryptedsessionkey() const; inline void set_encryptedsessionkey(const ::std::string& value); inline void set_encryptedsessionkey(const char* value); inline void set_encryptedsessionkey(const void* value, size_t size); inline ::std::string* mutable_encryptedsessionkey(); inline ::std::string* release_encryptedsessionkey(); // @@protoc_insertion_point(class_scope:vplex.ias.GetSessionKeyRequestType) private: inline void set_has__inherited(); inline void clear_has__inherited(); inline void set_has_type(); inline void clear_has_type(); inline void set_has_encryptedsessionkey(); inline void clear_has_encryptedsessionkey(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::vplex::ias::AbstractRequestType* _inherited_; ::std::string* type_; ::google::protobuf::RepeatedPtrField< ::vplex::ias::StrAttributeType > keyattributes_; ::std::string* encryptedsessionkey_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static GetSessionKeyRequestType* default_instance_; }; // ------------------------------------------------------------------- class GetSessionKeyResponseType : public ::google::protobuf::Message { public: GetSessionKeyResponseType(); virtual ~GetSessionKeyResponseType(); GetSessionKeyResponseType(const GetSessionKeyResponseType& from); inline GetSessionKeyResponseType& operator=(const GetSessionKeyResponseType& 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 GetSessionKeyResponseType& default_instance(); void Swap(GetSessionKeyResponseType* other); // implements Message ---------------------------------------------- GetSessionKeyResponseType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const GetSessionKeyResponseType& from); void MergeFrom(const GetSessionKeyResponseType& 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 .vplex.ias.AbstractResponseType _inherited = 1; inline bool has__inherited() const; inline void clear__inherited(); static const int kInheritedFieldNumber = 1; inline const ::vplex::ias::AbstractResponseType& _inherited() const; inline ::vplex::ias::AbstractResponseType* mutable__inherited(); inline ::vplex::ias::AbstractResponseType* release__inherited(); // optional bytes SessionKey = 2; inline bool has_sessionkey() const; inline void clear_sessionkey(); static const int kSessionKeyFieldNumber = 2; inline const ::std::string& sessionkey() const; inline void set_sessionkey(const ::std::string& value); inline void set_sessionkey(const char* value); inline void set_sessionkey(const void* value, size_t size); inline ::std::string* mutable_sessionkey(); inline ::std::string* release_sessionkey(); // optional bytes EncryptedSessionKey = 3; inline bool has_encryptedsessionkey() const; inline void clear_encryptedsessionkey(); static const int kEncryptedSessionKeyFieldNumber = 3; inline const ::std::string& encryptedsessionkey() const; inline void set_encryptedsessionkey(const ::std::string& value); inline void set_encryptedsessionkey(const char* value); inline void set_encryptedsessionkey(const void* value, size_t size); inline ::std::string* mutable_encryptedsessionkey(); inline ::std::string* release_encryptedsessionkey(); // optional uint32 InstanceId = 4; inline bool has_instanceid() const; inline void clear_instanceid(); static const int kInstanceIdFieldNumber = 4; inline ::google::protobuf::uint32 instanceid() const; inline void set_instanceid(::google::protobuf::uint32 value); // @@protoc_insertion_point(class_scope:vplex.ias.GetSessionKeyResponseType) private: inline void set_has__inherited(); inline void clear_has__inherited(); inline void set_has_sessionkey(); inline void clear_has_sessionkey(); inline void set_has_encryptedsessionkey(); inline void clear_has_encryptedsessionkey(); inline void set_has_instanceid(); inline void clear_has_instanceid(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::vplex::ias::AbstractResponseType* _inherited_; ::std::string* sessionkey_; ::std::string* encryptedsessionkey_; ::google::protobuf::uint32 instanceid_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static GetSessionKeyResponseType* default_instance_; }; // ------------------------------------------------------------------- class LoginRequestType : public ::google::protobuf::Message { public: LoginRequestType(); virtual ~LoginRequestType(); LoginRequestType(const LoginRequestType& from); inline LoginRequestType& operator=(const LoginRequestType& 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 LoginRequestType& default_instance(); void Swap(LoginRequestType* other); // implements Message ---------------------------------------------- LoginRequestType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const LoginRequestType& from); void MergeFrom(const LoginRequestType& 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 .vplex.ias.AbstractRequestType _inherited = 1; inline bool has__inherited() const; inline void clear__inherited(); static const int kInheritedFieldNumber = 1; inline const ::vplex::ias::AbstractRequestType& _inherited() const; inline ::vplex::ias::AbstractRequestType* mutable__inherited(); inline ::vplex::ias::AbstractRequestType* release__inherited(); // optional string Username = 2; inline bool has_username() const; inline void clear_username(); static const int kUsernameFieldNumber = 2; inline const ::std::string& username() const; inline void set_username(const ::std::string& value); inline void set_username(const char* value); inline void set_username(const char* value, size_t size); inline ::std::string* mutable_username(); inline ::std::string* release_username(); // required string Namespace = 3; inline bool has_namespace_() const; inline void clear_namespace_(); static const int kNamespaceFieldNumber = 3; inline const ::std::string& namespace_() const; inline void set_namespace_(const ::std::string& value); inline void set_namespace_(const char* value); inline void set_namespace_(const char* value, size_t size); inline ::std::string* mutable_namespace_(); inline ::std::string* release_namespace_(); // optional string Password = 4; inline bool has_password() const; inline void clear_password(); static const int kPasswordFieldNumber = 4; inline const ::std::string& password() const; inline void set_password(const ::std::string& value); inline void set_password(const char* value); inline void set_password(const char* value, size_t size); inline ::std::string* mutable_password(); inline ::std::string* release_password(); // optional string WeakToken = 5; inline bool has_weaktoken() const; inline void clear_weaktoken(); static const int kWeakTokenFieldNumber = 5; inline const ::std::string& weaktoken() const; inline void set_weaktoken(const ::std::string& value); inline void set_weaktoken(const char* value); inline void set_weaktoken(const char* value, size_t size); inline ::std::string* mutable_weaktoken(); inline ::std::string* release_weaktoken(); // optional string PairingToken = 11; inline bool has_pairingtoken() const; inline void clear_pairingtoken(); static const int kPairingTokenFieldNumber = 11; inline const ::std::string& pairingtoken() const; inline void set_pairingtoken(const ::std::string& value); inline void set_pairingtoken(const char* value); inline void set_pairingtoken(const char* value, size_t size); inline ::std::string* mutable_pairingtoken(); inline ::std::string* release_pairingtoken(); // optional bool ACEulaAgreed = 10; inline bool has_aceulaagreed() const; inline void clear_aceulaagreed(); static const int kACEulaAgreedFieldNumber = 10; inline bool aceulaagreed() const; inline void set_aceulaagreed(bool value); // @@protoc_insertion_point(class_scope:vplex.ias.LoginRequestType) private: inline void set_has__inherited(); inline void clear_has__inherited(); inline void set_has_username(); inline void clear_has_username(); inline void set_has_namespace_(); inline void clear_has_namespace_(); inline void set_has_password(); inline void clear_has_password(); inline void set_has_weaktoken(); inline void clear_has_weaktoken(); inline void set_has_pairingtoken(); inline void clear_has_pairingtoken(); inline void set_has_aceulaagreed(); inline void clear_has_aceulaagreed(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::vplex::ias::AbstractRequestType* _inherited_; ::std::string* username_; ::std::string* namespace__; ::std::string* password_; ::std::string* weaktoken_; ::std::string* pairingtoken_; bool aceulaagreed_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(7 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static LoginRequestType* default_instance_; }; // ------------------------------------------------------------------- class LoginResponseType : public ::google::protobuf::Message { public: LoginResponseType(); virtual ~LoginResponseType(); LoginResponseType(const LoginResponseType& from); inline LoginResponseType& operator=(const LoginResponseType& 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 LoginResponseType& default_instance(); void Swap(LoginResponseType* other); // implements Message ---------------------------------------------- LoginResponseType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const LoginResponseType& from); void MergeFrom(const LoginResponseType& 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 .vplex.ias.AbstractResponseType _inherited = 1; inline bool has__inherited() const; inline void clear__inherited(); static const int kInheritedFieldNumber = 1; inline const ::vplex::ias::AbstractResponseType& _inherited() const; inline ::vplex::ias::AbstractResponseType* mutable__inherited(); inline ::vplex::ias::AbstractResponseType* release__inherited(); // required fixed64 SessionHandle = 2; inline bool has_sessionhandle() const; inline void clear_sessionhandle(); static const int kSessionHandleFieldNumber = 2; inline ::google::protobuf::uint64 sessionhandle() const; inline void set_sessionhandle(::google::protobuf::uint64 value); // required bytes SessionSecret = 3; inline bool has_sessionsecret() const; inline void clear_sessionsecret(); static const int kSessionSecretFieldNumber = 3; inline const ::std::string& sessionsecret() const; inline void set_sessionsecret(const ::std::string& value); inline void set_sessionsecret(const char* value); inline void set_sessionsecret(const void* value, size_t size); inline ::std::string* mutable_sessionsecret(); inline ::std::string* release_sessionsecret(); // optional string AccountId = 4; inline bool has_accountid() const; inline void clear_accountid(); static const int kAccountIdFieldNumber = 4; inline const ::std::string& accountid() const; inline void set_accountid(const ::std::string& value); inline void set_accountid(const char* value); inline void set_accountid(const char* value, size_t size); inline ::std::string* mutable_accountid(); inline ::std::string* release_accountid(); // required fixed64 UserId = 5; inline bool has_userid() const; inline void clear_userid(); static const int kUserIdFieldNumber = 5; inline ::google::protobuf::uint64 userid() const; inline void set_userid(::google::protobuf::uint64 value); // optional string DisplayName = 6; inline bool has_displayname() const; inline void clear_displayname(); static const int kDisplayNameFieldNumber = 6; inline const ::std::string& displayname() const; inline void set_displayname(const ::std::string& value); inline void set_displayname(const char* value); inline void set_displayname(const char* value, size_t size); inline ::std::string* mutable_displayname(); inline ::std::string* release_displayname(); // optional string WeakToken = 7; inline bool has_weaktoken() const; inline void clear_weaktoken(); static const int kWeakTokenFieldNumber = 7; inline const ::std::string& weaktoken() const; inline void set_weaktoken(const ::std::string& value); inline void set_weaktoken(const char* value); inline void set_weaktoken(const char* value, size_t size); inline ::std::string* mutable_weaktoken(); inline ::std::string* release_weaktoken(); // optional fixed64 OldFgSessionHandle = 8; inline bool has_oldfgsessionhandle() const; inline void clear_oldfgsessionhandle(); static const int kOldFgSessionHandleFieldNumber = 8; inline ::google::protobuf::uint64 oldfgsessionhandle() const; inline void set_oldfgsessionhandle(::google::protobuf::uint64 value); // optional string StorageRegion = 9; inline bool has_storageregion() const; inline void clear_storageregion(); static const int kStorageRegionFieldNumber = 9; inline const ::std::string& storageregion() const; inline void set_storageregion(const ::std::string& value); inline void set_storageregion(const char* value); inline void set_storageregion(const char* value, size_t size); inline ::std::string* mutable_storageregion(); inline ::std::string* release_storageregion(); // optional int64 StorageClusterId = 10; inline bool has_storageclusterid() const; inline void clear_storageclusterid(); static const int kStorageClusterIdFieldNumber = 10; inline ::google::protobuf::int64 storageclusterid() const; inline void set_storageclusterid(::google::protobuf::int64 value); // optional string persistentCredentials = 11; inline bool has_persistentcredentials() const; inline void clear_persistentcredentials(); static const int kPersistentCredentialsFieldNumber = 11; inline const ::std::string& persistentcredentials() const; inline void set_persistentcredentials(const ::std::string& value); inline void set_persistentcredentials(const char* value); inline void set_persistentcredentials(const char* value, size_t size); inline ::std::string* mutable_persistentcredentials(); inline ::std::string* release_persistentcredentials(); // @@protoc_insertion_point(class_scope:vplex.ias.LoginResponseType) private: inline void set_has__inherited(); inline void clear_has__inherited(); inline void set_has_sessionhandle(); inline void clear_has_sessionhandle(); inline void set_has_sessionsecret(); inline void clear_has_sessionsecret(); inline void set_has_accountid(); inline void clear_has_accountid(); inline void set_has_userid(); inline void clear_has_userid(); inline void set_has_displayname(); inline void clear_has_displayname(); inline void set_has_weaktoken(); inline void clear_has_weaktoken(); inline void set_has_oldfgsessionhandle(); inline void clear_has_oldfgsessionhandle(); inline void set_has_storageregion(); inline void clear_has_storageregion(); inline void set_has_storageclusterid(); inline void clear_has_storageclusterid(); inline void set_has_persistentcredentials(); inline void clear_has_persistentcredentials(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::vplex::ias::AbstractResponseType* _inherited_; ::google::protobuf::uint64 sessionhandle_; ::std::string* sessionsecret_; ::std::string* accountid_; ::google::protobuf::uint64 userid_; ::std::string* displayname_; ::std::string* weaktoken_; ::google::protobuf::uint64 oldfgsessionhandle_; ::std::string* storageregion_; ::google::protobuf::int64 storageclusterid_; ::std::string* persistentcredentials_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(11 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static LoginResponseType* default_instance_; }; // ------------------------------------------------------------------- class LogoutRequestType : public ::google::protobuf::Message { public: LogoutRequestType(); virtual ~LogoutRequestType(); LogoutRequestType(const LogoutRequestType& from); inline LogoutRequestType& operator=(const LogoutRequestType& 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 LogoutRequestType& default_instance(); void Swap(LogoutRequestType* other); // implements Message ---------------------------------------------- LogoutRequestType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const LogoutRequestType& from); void MergeFrom(const LogoutRequestType& 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 .vplex.ias.AbstractRequestType _inherited = 1; inline bool has__inherited() const; inline void clear__inherited(); static const int kInheritedFieldNumber = 1; inline const ::vplex::ias::AbstractRequestType& _inherited() const; inline ::vplex::ias::AbstractRequestType* mutable__inherited(); inline ::vplex::ias::AbstractRequestType* release__inherited(); // @@protoc_insertion_point(class_scope:vplex.ias.LogoutRequestType) private: inline void set_has__inherited(); inline void clear_has__inherited(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::vplex::ias::AbstractRequestType* _inherited_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static LogoutRequestType* default_instance_; }; // ------------------------------------------------------------------- class LogoutResponseType : public ::google::protobuf::Message { public: LogoutResponseType(); virtual ~LogoutResponseType(); LogoutResponseType(const LogoutResponseType& from); inline LogoutResponseType& operator=(const LogoutResponseType& 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 LogoutResponseType& default_instance(); void Swap(LogoutResponseType* other); // implements Message ---------------------------------------------- LogoutResponseType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const LogoutResponseType& from); void MergeFrom(const LogoutResponseType& 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 .vplex.ias.AbstractResponseType _inherited = 1; inline bool has__inherited() const; inline void clear__inherited(); static const int kInheritedFieldNumber = 1; inline const ::vplex::ias::AbstractResponseType& _inherited() const; inline ::vplex::ias::AbstractResponseType* mutable__inherited(); inline ::vplex::ias::AbstractResponseType* release__inherited(); // @@protoc_insertion_point(class_scope:vplex.ias.LogoutResponseType) private: inline void set_has__inherited(); inline void clear_has__inherited(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::vplex::ias::AbstractResponseType* _inherited_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static LogoutResponseType* default_instance_; }; // ------------------------------------------------------------------- class RegisterVirtualDeviceRequestType : public ::google::protobuf::Message { public: RegisterVirtualDeviceRequestType(); virtual ~RegisterVirtualDeviceRequestType(); RegisterVirtualDeviceRequestType(const RegisterVirtualDeviceRequestType& from); inline RegisterVirtualDeviceRequestType& operator=(const RegisterVirtualDeviceRequestType& 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 RegisterVirtualDeviceRequestType& default_instance(); void Swap(RegisterVirtualDeviceRequestType* other); // implements Message ---------------------------------------------- RegisterVirtualDeviceRequestType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const RegisterVirtualDeviceRequestType& from); void MergeFrom(const RegisterVirtualDeviceRequestType& 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 .vplex.ias.AbstractRequestType _inherited = 1; inline bool has__inherited() const; inline void clear__inherited(); static const int kInheritedFieldNumber = 1; inline const ::vplex::ias::AbstractRequestType& _inherited() const; inline ::vplex::ias::AbstractRequestType* mutable__inherited(); inline ::vplex::ias::AbstractRequestType* release__inherited(); // required string Username = 2; inline bool has_username() const; inline void clear_username(); static const int kUsernameFieldNumber = 2; inline const ::std::string& username() const; inline void set_username(const ::std::string& value); inline void set_username(const char* value); inline void set_username(const char* value, size_t size); inline ::std::string* mutable_username(); inline ::std::string* release_username(); // optional string Password = 3; inline bool has_password() const; inline void clear_password(); static const int kPasswordFieldNumber = 3; inline const ::std::string& password() const; inline void set_password(const ::std::string& value); inline void set_password(const char* value); inline void set_password(const char* value, size_t size); inline ::std::string* mutable_password(); inline ::std::string* release_password(); // required bytes HardwareInfo = 4; inline bool has_hardwareinfo() const; inline void clear_hardwareinfo(); static const int kHardwareInfoFieldNumber = 4; inline const ::std::string& hardwareinfo() const; inline void set_hardwareinfo(const ::std::string& value); inline void set_hardwareinfo(const char* value); inline void set_hardwareinfo(const void* value, size_t size); inline ::std::string* mutable_hardwareinfo(); inline ::std::string* release_hardwareinfo(); // required string DeviceName = 5; inline bool has_devicename() const; inline void clear_devicename(); static const int kDeviceNameFieldNumber = 5; inline const ::std::string& devicename() const; inline void set_devicename(const ::std::string& value); inline void set_devicename(const char* value); inline void set_devicename(const char* value, size_t size); inline ::std::string* mutable_devicename(); inline ::std::string* release_devicename(); // optional string Namespace = 6; inline bool has_namespace_() const; inline void clear_namespace_(); static const int kNamespaceFieldNumber = 6; inline const ::std::string& namespace_() const; inline void set_namespace_(const ::std::string& value); inline void set_namespace_(const char* value); inline void set_namespace_(const char* value, size_t size); inline ::std::string* mutable_namespace_(); inline ::std::string* release_namespace_(); // optional string WeakToken = 7; inline bool has_weaktoken() const; inline void clear_weaktoken(); static const int kWeakTokenFieldNumber = 7; inline const ::std::string& weaktoken() const; inline void set_weaktoken(const ::std::string& value); inline void set_weaktoken(const char* value); inline void set_weaktoken(const char* value, size_t size); inline ::std::string* mutable_weaktoken(); inline ::std::string* release_weaktoken(); // optional string PairingToken = 8; inline bool has_pairingtoken() const; inline void clear_pairingtoken(); static const int kPairingTokenFieldNumber = 8; inline const ::std::string& pairingtoken() const; inline void set_pairingtoken(const ::std::string& value); inline void set_pairingtoken(const char* value); inline void set_pairingtoken(const char* value, size_t size); inline ::std::string* mutable_pairingtoken(); inline ::std::string* release_pairingtoken(); // @@protoc_insertion_point(class_scope:vplex.ias.RegisterVirtualDeviceRequestType) private: inline void set_has__inherited(); inline void clear_has__inherited(); inline void set_has_username(); inline void clear_has_username(); inline void set_has_password(); inline void clear_has_password(); inline void set_has_hardwareinfo(); inline void clear_has_hardwareinfo(); inline void set_has_devicename(); inline void clear_has_devicename(); inline void set_has_namespace_(); inline void clear_has_namespace_(); inline void set_has_weaktoken(); inline void clear_has_weaktoken(); inline void set_has_pairingtoken(); inline void clear_has_pairingtoken(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::vplex::ias::AbstractRequestType* _inherited_; ::std::string* username_; ::std::string* password_; ::std::string* hardwareinfo_; ::std::string* devicename_; ::std::string* namespace__; ::std::string* weaktoken_; ::std::string* pairingtoken_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(8 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static RegisterVirtualDeviceRequestType* default_instance_; }; // ------------------------------------------------------------------- class RegisterVirtualDeviceResponseType : public ::google::protobuf::Message { public: RegisterVirtualDeviceResponseType(); virtual ~RegisterVirtualDeviceResponseType(); RegisterVirtualDeviceResponseType(const RegisterVirtualDeviceResponseType& from); inline RegisterVirtualDeviceResponseType& operator=(const RegisterVirtualDeviceResponseType& 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 RegisterVirtualDeviceResponseType& default_instance(); void Swap(RegisterVirtualDeviceResponseType* other); // implements Message ---------------------------------------------- RegisterVirtualDeviceResponseType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const RegisterVirtualDeviceResponseType& from); void MergeFrom(const RegisterVirtualDeviceResponseType& 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 .vplex.ias.AbstractResponseType _inherited = 1; inline bool has__inherited() const; inline void clear__inherited(); static const int kInheritedFieldNumber = 1; inline const ::vplex::ias::AbstractResponseType& _inherited() const; inline ::vplex::ias::AbstractResponseType* mutable__inherited(); inline ::vplex::ias::AbstractResponseType* release__inherited(); // optional bytes RenewalToken = 2; inline bool has_renewaltoken() const; inline void clear_renewaltoken(); static const int kRenewalTokenFieldNumber = 2; inline const ::std::string& renewaltoken() const; inline void set_renewaltoken(const ::std::string& value); inline void set_renewaltoken(const char* value); inline void set_renewaltoken(const void* value, size_t size); inline ::std::string* mutable_renewaltoken(); inline ::std::string* release_renewaltoken(); // @@protoc_insertion_point(class_scope:vplex.ias.RegisterVirtualDeviceResponseType) private: inline void set_has__inherited(); inline void clear_has__inherited(); inline void set_has_renewaltoken(); inline void clear_has_renewaltoken(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::vplex::ias::AbstractResponseType* _inherited_; ::std::string* renewaltoken_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static RegisterVirtualDeviceResponseType* default_instance_; }; // ------------------------------------------------------------------- class RenewVirtualDeviceCredentialsRequestType : public ::google::protobuf::Message { public: RenewVirtualDeviceCredentialsRequestType(); virtual ~RenewVirtualDeviceCredentialsRequestType(); RenewVirtualDeviceCredentialsRequestType(const RenewVirtualDeviceCredentialsRequestType& from); inline RenewVirtualDeviceCredentialsRequestType& operator=(const RenewVirtualDeviceCredentialsRequestType& 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 RenewVirtualDeviceCredentialsRequestType& default_instance(); void Swap(RenewVirtualDeviceCredentialsRequestType* other); // implements Message ---------------------------------------------- RenewVirtualDeviceCredentialsRequestType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const RenewVirtualDeviceCredentialsRequestType& from); void MergeFrom(const RenewVirtualDeviceCredentialsRequestType& 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 .vplex.ias.AbstractRequestType _inherited = 1; inline bool has__inherited() const; inline void clear__inherited(); static const int kInheritedFieldNumber = 1; inline const ::vplex::ias::AbstractRequestType& _inherited() const; inline ::vplex::ias::AbstractRequestType* mutable__inherited(); inline ::vplex::ias::AbstractRequestType* release__inherited(); // required fixed64 SerialNumber = 2; inline bool has_serialnumber() const; inline void clear_serialnumber(); static const int kSerialNumberFieldNumber = 2; inline ::google::protobuf::uint64 serialnumber() const; inline void set_serialnumber(::google::protobuf::uint64 value); // required fixed64 IssueDate = 3; inline bool has_issuedate() const; inline void clear_issuedate(); static const int kIssueDateFieldNumber = 3; inline ::google::protobuf::uint64 issuedate() const; inline void set_issuedate(::google::protobuf::uint64 value); // required bytes RenewalToken = 4; inline bool has_renewaltoken() const; inline void clear_renewaltoken(); static const int kRenewalTokenFieldNumber = 4; inline const ::std::string& renewaltoken() const; inline void set_renewaltoken(const ::std::string& value); inline void set_renewaltoken(const char* value); inline void set_renewaltoken(const void* value, size_t size); inline ::std::string* mutable_renewaltoken(); inline ::std::string* release_renewaltoken(); // @@protoc_insertion_point(class_scope:vplex.ias.RenewVirtualDeviceCredentialsRequestType) private: inline void set_has__inherited(); inline void clear_has__inherited(); inline void set_has_serialnumber(); inline void clear_has_serialnumber(); inline void set_has_issuedate(); inline void clear_has_issuedate(); inline void set_has_renewaltoken(); inline void clear_has_renewaltoken(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::vplex::ias::AbstractRequestType* _inherited_; ::google::protobuf::uint64 serialnumber_; ::google::protobuf::uint64 issuedate_; ::std::string* renewaltoken_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static RenewVirtualDeviceCredentialsRequestType* default_instance_; }; // ------------------------------------------------------------------- class RenewVirtualDeviceCredentialsResponseType : public ::google::protobuf::Message { public: RenewVirtualDeviceCredentialsResponseType(); virtual ~RenewVirtualDeviceCredentialsResponseType(); RenewVirtualDeviceCredentialsResponseType(const RenewVirtualDeviceCredentialsResponseType& from); inline RenewVirtualDeviceCredentialsResponseType& operator=(const RenewVirtualDeviceCredentialsResponseType& 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 RenewVirtualDeviceCredentialsResponseType& default_instance(); void Swap(RenewVirtualDeviceCredentialsResponseType* other); // implements Message ---------------------------------------------- RenewVirtualDeviceCredentialsResponseType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const RenewVirtualDeviceCredentialsResponseType& from); void MergeFrom(const RenewVirtualDeviceCredentialsResponseType& 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 .vplex.ias.AbstractResponseType _inherited = 1; inline bool has__inherited() const; inline void clear__inherited(); static const int kInheritedFieldNumber = 1; inline const ::vplex::ias::AbstractResponseType& _inherited() const; inline ::vplex::ias::AbstractResponseType* mutable__inherited(); inline ::vplex::ias::AbstractResponseType* release__inherited(); // optional bytes SecretDeviceCredentials = 2; inline bool has_secretdevicecredentials() const; inline void clear_secretdevicecredentials(); static const int kSecretDeviceCredentialsFieldNumber = 2; inline const ::std::string& secretdevicecredentials() const; inline void set_secretdevicecredentials(const ::std::string& value); inline void set_secretdevicecredentials(const char* value); inline void set_secretdevicecredentials(const void* value, size_t size); inline ::std::string* mutable_secretdevicecredentials(); inline ::std::string* release_secretdevicecredentials(); // optional bytes ClearDeviceCredentials = 3; inline bool has_cleardevicecredentials() const; inline void clear_cleardevicecredentials(); static const int kClearDeviceCredentialsFieldNumber = 3; inline const ::std::string& cleardevicecredentials() const; inline void set_cleardevicecredentials(const ::std::string& value); inline void set_cleardevicecredentials(const char* value); inline void set_cleardevicecredentials(const void* value, size_t size); inline ::std::string* mutable_cleardevicecredentials(); inline ::std::string* release_cleardevicecredentials(); // optional bytes RenewalToken = 4; inline bool has_renewaltoken() const; inline void clear_renewaltoken(); static const int kRenewalTokenFieldNumber = 4; inline const ::std::string& renewaltoken() const; inline void set_renewaltoken(const ::std::string& value); inline void set_renewaltoken(const char* value); inline void set_renewaltoken(const void* value, size_t size); inline ::std::string* mutable_renewaltoken(); inline ::std::string* release_renewaltoken(); // optional bytes AttestProgram = 5; inline bool has_attestprogram() const; inline void clear_attestprogram(); static const int kAttestProgramFieldNumber = 5; inline const ::std::string& attestprogram() const; inline void set_attestprogram(const ::std::string& value); inline void set_attestprogram(const char* value); inline void set_attestprogram(const void* value, size_t size); inline ::std::string* mutable_attestprogram(); inline ::std::string* release_attestprogram(); // required fixed64 IssueDate = 6; inline bool has_issuedate() const; inline void clear_issuedate(); static const int kIssueDateFieldNumber = 6; inline ::google::protobuf::uint64 issuedate() const; inline void set_issuedate(::google::protobuf::uint64 value); // required fixed64 SerialNumber = 7; inline bool has_serialnumber() const; inline void clear_serialnumber(); static const int kSerialNumberFieldNumber = 7; inline ::google::protobuf::uint64 serialnumber() const; inline void set_serialnumber(::google::protobuf::uint64 value); // optional bytes AttestTMD = 8; inline bool has_attesttmd() const; inline void clear_attesttmd(); static const int kAttestTMDFieldNumber = 8; inline const ::std::string& attesttmd() const; inline void set_attesttmd(const ::std::string& value); inline void set_attesttmd(const char* value); inline void set_attesttmd(const void* value, size_t size); inline ::std::string* mutable_attesttmd(); inline ::std::string* release_attesttmd(); // optional bytes DeviceCert = 9; inline bool has_devicecert() const; inline void clear_devicecert(); static const int kDeviceCertFieldNumber = 9; inline const ::std::string& devicecert() const; inline void set_devicecert(const ::std::string& value); inline void set_devicecert(const char* value); inline void set_devicecert(const void* value, size_t size); inline ::std::string* mutable_devicecert(); inline ::std::string* release_devicecert(); // optional bytes PlatformKey = 10; inline bool has_platformkey() const; inline void clear_platformkey(); static const int kPlatformKeyFieldNumber = 10; inline const ::std::string& platformkey() const; inline void set_platformkey(const ::std::string& value); inline void set_platformkey(const char* value); inline void set_platformkey(const void* value, size_t size); inline ::std::string* mutable_platformkey(); inline ::std::string* release_platformkey(); // @@protoc_insertion_point(class_scope:vplex.ias.RenewVirtualDeviceCredentialsResponseType) private: inline void set_has__inherited(); inline void clear_has__inherited(); inline void set_has_secretdevicecredentials(); inline void clear_has_secretdevicecredentials(); inline void set_has_cleardevicecredentials(); inline void clear_has_cleardevicecredentials(); inline void set_has_renewaltoken(); inline void clear_has_renewaltoken(); inline void set_has_attestprogram(); inline void clear_has_attestprogram(); inline void set_has_issuedate(); inline void clear_has_issuedate(); inline void set_has_serialnumber(); inline void clear_has_serialnumber(); inline void set_has_attesttmd(); inline void clear_has_attesttmd(); inline void set_has_devicecert(); inline void clear_has_devicecert(); inline void set_has_platformkey(); inline void clear_has_platformkey(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::vplex::ias::AbstractResponseType* _inherited_; ::std::string* secretdevicecredentials_; ::std::string* cleardevicecredentials_; ::std::string* renewaltoken_; ::std::string* attestprogram_; ::google::protobuf::uint64 issuedate_; ::google::protobuf::uint64 serialnumber_; ::std::string* attesttmd_; ::std::string* devicecert_; ::std::string* platformkey_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(10 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static RenewVirtualDeviceCredentialsResponseType* default_instance_; }; // ------------------------------------------------------------------- class GetServerKeyRequestType : public ::google::protobuf::Message { public: GetServerKeyRequestType(); virtual ~GetServerKeyRequestType(); GetServerKeyRequestType(const GetServerKeyRequestType& from); inline GetServerKeyRequestType& operator=(const GetServerKeyRequestType& 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 GetServerKeyRequestType& default_instance(); void Swap(GetServerKeyRequestType* other); // implements Message ---------------------------------------------- GetServerKeyRequestType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const GetServerKeyRequestType& from); void MergeFrom(const GetServerKeyRequestType& 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 .vplex.ias.AbstractRequestType _inherited = 1; inline bool has__inherited() const; inline void clear__inherited(); static const int kInheritedFieldNumber = 1; inline const ::vplex::ias::AbstractRequestType& _inherited() const; inline ::vplex::ias::AbstractRequestType* mutable__inherited(); inline ::vplex::ias::AbstractRequestType* release__inherited(); // required fixed64 UserId = 2; inline bool has_userid() const; inline void clear_userid(); static const int kUserIdFieldNumber = 2; inline ::google::protobuf::uint64 userid() const; inline void set_userid(::google::protobuf::uint64 value); // @@protoc_insertion_point(class_scope:vplex.ias.GetServerKeyRequestType) private: inline void set_has__inherited(); inline void clear_has__inherited(); inline void set_has_userid(); inline void clear_has_userid(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::vplex::ias::AbstractRequestType* _inherited_; ::google::protobuf::uint64 userid_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static GetServerKeyRequestType* default_instance_; }; // ------------------------------------------------------------------- class GetServerKeyResponseType : public ::google::protobuf::Message { public: GetServerKeyResponseType(); virtual ~GetServerKeyResponseType(); GetServerKeyResponseType(const GetServerKeyResponseType& from); inline GetServerKeyResponseType& operator=(const GetServerKeyResponseType& 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 GetServerKeyResponseType& default_instance(); void Swap(GetServerKeyResponseType* other); // implements Message ---------------------------------------------- GetServerKeyResponseType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const GetServerKeyResponseType& from); void MergeFrom(const GetServerKeyResponseType& 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 .vplex.ias.AbstractResponseType _inherited = 1; inline bool has__inherited() const; inline void clear__inherited(); static const int kInheritedFieldNumber = 1; inline const ::vplex::ias::AbstractResponseType& _inherited() const; inline ::vplex::ias::AbstractResponseType* mutable__inherited(); inline ::vplex::ias::AbstractResponseType* release__inherited(); // optional bytes ServerKey = 2; inline bool has_serverkey() const; inline void clear_serverkey(); static const int kServerKeyFieldNumber = 2; inline const ::std::string& serverkey() const; inline void set_serverkey(const ::std::string& value); inline void set_serverkey(const char* value); inline void set_serverkey(const void* value, size_t size); inline ::std::string* mutable_serverkey(); inline ::std::string* release_serverkey(); // @@protoc_insertion_point(class_scope:vplex.ias.GetServerKeyResponseType) private: inline void set_has__inherited(); inline void clear_has__inherited(); inline void set_has_serverkey(); inline void clear_has_serverkey(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::vplex::ias::AbstractResponseType* _inherited_; ::std::string* serverkey_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static GetServerKeyResponseType* default_instance_; }; // ------------------------------------------------------------------- class RequestPairingRequestType : public ::google::protobuf::Message { public: RequestPairingRequestType(); virtual ~RequestPairingRequestType(); RequestPairingRequestType(const RequestPairingRequestType& from); inline RequestPairingRequestType& operator=(const RequestPairingRequestType& 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 RequestPairingRequestType& default_instance(); void Swap(RequestPairingRequestType* other); // implements Message ---------------------------------------------- RequestPairingRequestType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const RequestPairingRequestType& from); void MergeFrom(const RequestPairingRequestType& 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 .vplex.ias.AbstractRequestType _inherited = 1; inline bool has__inherited() const; inline void clear__inherited(); static const int kInheritedFieldNumber = 1; inline const ::vplex::ias::AbstractRequestType& _inherited() const; inline ::vplex::ias::AbstractRequestType* mutable__inherited(); inline ::vplex::ias::AbstractRequestType* release__inherited(); // optional bytes HostHardwareId = 2; inline bool has_hosthardwareid() const; inline void clear_hosthardwareid(); static const int kHostHardwareIdFieldNumber = 2; inline const ::std::string& hosthardwareid() const; inline void set_hosthardwareid(const ::std::string& value); inline void set_hosthardwareid(const char* value); inline void set_hosthardwareid(const void* value, size_t size); inline ::std::string* mutable_hosthardwareid(); inline ::std::string* release_hosthardwareid(); // optional fixed64 HostDeviceId = 3; inline bool has_hostdeviceid() const; inline void clear_hostdeviceid(); static const int kHostDeviceIdFieldNumber = 3; inline ::google::protobuf::uint64 hostdeviceid() const; inline void set_hostdeviceid(::google::protobuf::uint64 value); // required bytes DeviceHardwareId = 4; inline bool has_devicehardwareid() const; inline void clear_devicehardwareid(); static const int kDeviceHardwareIdFieldNumber = 4; inline const ::std::string& devicehardwareid() const; inline void set_devicehardwareid(const ::std::string& value); inline void set_devicehardwareid(const char* value); inline void set_devicehardwareid(const void* value, size_t size); inline ::std::string* mutable_devicehardwareid(); inline ::std::string* release_devicehardwareid(); // optional string PIN = 5; inline bool has_pin() const; inline void clear_pin(); static const int kPINFieldNumber = 5; inline const ::std::string& pin() const; inline void set_pin(const ::std::string& value); inline void set_pin(const char* value); inline void set_pin(const char* value, size_t size); inline ::std::string* mutable_pin(); inline ::std::string* release_pin(); // repeated .vplex.ias.StrAttributeType PairingAttributes = 6; inline int pairingattributes_size() const; inline void clear_pairingattributes(); static const int kPairingAttributesFieldNumber = 6; inline const ::vplex::ias::StrAttributeType& pairingattributes(int index) const; inline ::vplex::ias::StrAttributeType* mutable_pairingattributes(int index); inline ::vplex::ias::StrAttributeType* add_pairingattributes(); inline const ::google::protobuf::RepeatedPtrField< ::vplex::ias::StrAttributeType >& pairingattributes() const; inline ::google::protobuf::RepeatedPtrField< ::vplex::ias::StrAttributeType >* mutable_pairingattributes(); // @@protoc_insertion_point(class_scope:vplex.ias.RequestPairingRequestType) private: inline void set_has__inherited(); inline void clear_has__inherited(); inline void set_has_hosthardwareid(); inline void clear_has_hosthardwareid(); inline void set_has_hostdeviceid(); inline void clear_has_hostdeviceid(); inline void set_has_devicehardwareid(); inline void clear_has_devicehardwareid(); inline void set_has_pin(); inline void clear_has_pin(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::vplex::ias::AbstractRequestType* _inherited_; ::std::string* hosthardwareid_; ::google::protobuf::uint64 hostdeviceid_; ::std::string* devicehardwareid_; ::std::string* pin_; ::google::protobuf::RepeatedPtrField< ::vplex::ias::StrAttributeType > pairingattributes_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(6 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static RequestPairingRequestType* default_instance_; }; // ------------------------------------------------------------------- class RequestPairingResponseType : public ::google::protobuf::Message { public: RequestPairingResponseType(); virtual ~RequestPairingResponseType(); RequestPairingResponseType(const RequestPairingResponseType& from); inline RequestPairingResponseType& operator=(const RequestPairingResponseType& 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 RequestPairingResponseType& default_instance(); void Swap(RequestPairingResponseType* other); // implements Message ---------------------------------------------- RequestPairingResponseType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const RequestPairingResponseType& from); void MergeFrom(const RequestPairingResponseType& 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 .vplex.ias.AbstractResponseType _inherited = 1; inline bool has__inherited() const; inline void clear__inherited(); static const int kInheritedFieldNumber = 1; inline const ::vplex::ias::AbstractResponseType& _inherited() const; inline ::vplex::ias::AbstractResponseType* mutable__inherited(); inline ::vplex::ias::AbstractResponseType* release__inherited(); // required string PairingToken = 2; inline bool has_pairingtoken() const; inline void clear_pairingtoken(); static const int kPairingTokenFieldNumber = 2; inline const ::std::string& pairingtoken() const; inline void set_pairingtoken(const ::std::string& value); inline void set_pairingtoken(const char* value); inline void set_pairingtoken(const char* value, size_t size); inline ::std::string* mutable_pairingtoken(); inline ::std::string* release_pairingtoken(); // @@protoc_insertion_point(class_scope:vplex.ias.RequestPairingResponseType) private: inline void set_has__inherited(); inline void clear_has__inherited(); inline void set_has_pairingtoken(); inline void clear_has_pairingtoken(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::vplex::ias::AbstractResponseType* _inherited_; ::std::string* pairingtoken_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static RequestPairingResponseType* default_instance_; }; // ------------------------------------------------------------------- class RespondToPairingRequestRequestType : public ::google::protobuf::Message { public: RespondToPairingRequestRequestType(); virtual ~RespondToPairingRequestRequestType(); RespondToPairingRequestRequestType(const RespondToPairingRequestRequestType& from); inline RespondToPairingRequestRequestType& operator=(const RespondToPairingRequestRequestType& 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 RespondToPairingRequestRequestType& default_instance(); void Swap(RespondToPairingRequestRequestType* other); // implements Message ---------------------------------------------- RespondToPairingRequestRequestType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const RespondToPairingRequestRequestType& from); void MergeFrom(const RespondToPairingRequestRequestType& 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 .vplex.ias.AbstractRequestType _inherited = 1; inline bool has__inherited() const; inline void clear__inherited(); static const int kInheritedFieldNumber = 1; inline const ::vplex::ias::AbstractRequestType& _inherited() const; inline ::vplex::ias::AbstractRequestType* mutable__inherited(); inline ::vplex::ias::AbstractRequestType* release__inherited(); // required string TransactionId = 2; inline bool has_transactionid() const; inline void clear_transactionid(); static const int kTransactionIdFieldNumber = 2; inline const ::std::string& transactionid() const; inline void set_transactionid(const ::std::string& value); inline void set_transactionid(const char* value); inline void set_transactionid(const char* value, size_t size); inline ::std::string* mutable_transactionid(); inline ::std::string* release_transactionid(); // required bool AcceptedPairing = 3; inline bool has_acceptedpairing() const; inline void clear_acceptedpairing(); static const int kAcceptedPairingFieldNumber = 3; inline bool acceptedpairing() const; inline void set_acceptedpairing(bool value); // @@protoc_insertion_point(class_scope:vplex.ias.RespondToPairingRequestRequestType) private: inline void set_has__inherited(); inline void clear_has__inherited(); inline void set_has_transactionid(); inline void clear_has_transactionid(); inline void set_has_acceptedpairing(); inline void clear_has_acceptedpairing(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::vplex::ias::AbstractRequestType* _inherited_; ::std::string* transactionid_; bool acceptedpairing_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static RespondToPairingRequestRequestType* default_instance_; }; // ------------------------------------------------------------------- class RespondToPairingRequestResponseType : public ::google::protobuf::Message { public: RespondToPairingRequestResponseType(); virtual ~RespondToPairingRequestResponseType(); RespondToPairingRequestResponseType(const RespondToPairingRequestResponseType& from); inline RespondToPairingRequestResponseType& operator=(const RespondToPairingRequestResponseType& 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 RespondToPairingRequestResponseType& default_instance(); void Swap(RespondToPairingRequestResponseType* other); // implements Message ---------------------------------------------- RespondToPairingRequestResponseType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const RespondToPairingRequestResponseType& from); void MergeFrom(const RespondToPairingRequestResponseType& 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 .vplex.ias.AbstractResponseType _inherited = 1; inline bool has__inherited() const; inline void clear__inherited(); static const int kInheritedFieldNumber = 1; inline const ::vplex::ias::AbstractResponseType& _inherited() const; inline ::vplex::ias::AbstractResponseType* mutable__inherited(); inline ::vplex::ias::AbstractResponseType* release__inherited(); // @@protoc_insertion_point(class_scope:vplex.ias.RespondToPairingRequestResponseType) private: inline void set_has__inherited(); inline void clear_has__inherited(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::vplex::ias::AbstractResponseType* _inherited_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static RespondToPairingRequestResponseType* default_instance_; }; // ------------------------------------------------------------------- class RequestPairingPinRequestType : public ::google::protobuf::Message { public: RequestPairingPinRequestType(); virtual ~RequestPairingPinRequestType(); RequestPairingPinRequestType(const RequestPairingPinRequestType& from); inline RequestPairingPinRequestType& operator=(const RequestPairingPinRequestType& 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 RequestPairingPinRequestType& default_instance(); void Swap(RequestPairingPinRequestType* other); // implements Message ---------------------------------------------- RequestPairingPinRequestType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const RequestPairingPinRequestType& from); void MergeFrom(const RequestPairingPinRequestType& 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 .vplex.ias.AbstractRequestType _inherited = 1; inline bool has__inherited() const; inline void clear__inherited(); static const int kInheritedFieldNumber = 1; inline const ::vplex::ias::AbstractRequestType& _inherited() const; inline ::vplex::ias::AbstractRequestType* mutable__inherited(); inline ::vplex::ias::AbstractRequestType* release__inherited(); // @@protoc_insertion_point(class_scope:vplex.ias.RequestPairingPinRequestType) private: inline void set_has__inherited(); inline void clear_has__inherited(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::vplex::ias::AbstractRequestType* _inherited_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static RequestPairingPinRequestType* default_instance_; }; // ------------------------------------------------------------------- class RequestPairingPinResponseType : public ::google::protobuf::Message { public: RequestPairingPinResponseType(); virtual ~RequestPairingPinResponseType(); RequestPairingPinResponseType(const RequestPairingPinResponseType& from); inline RequestPairingPinResponseType& operator=(const RequestPairingPinResponseType& 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 RequestPairingPinResponseType& default_instance(); void Swap(RequestPairingPinResponseType* other); // implements Message ---------------------------------------------- RequestPairingPinResponseType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const RequestPairingPinResponseType& from); void MergeFrom(const RequestPairingPinResponseType& 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 .vplex.ias.AbstractResponseType _inherited = 1; inline bool has__inherited() const; inline void clear__inherited(); static const int kInheritedFieldNumber = 1; inline const ::vplex::ias::AbstractResponseType& _inherited() const; inline ::vplex::ias::AbstractResponseType* mutable__inherited(); inline ::vplex::ias::AbstractResponseType* release__inherited(); // required string PairingPin = 2; inline bool has_pairingpin() const; inline void clear_pairingpin(); static const int kPairingPinFieldNumber = 2; inline const ::std::string& pairingpin() const; inline void set_pairingpin(const ::std::string& value); inline void set_pairingpin(const char* value); inline void set_pairingpin(const char* value, size_t size); inline ::std::string* mutable_pairingpin(); inline ::std::string* release_pairingpin(); // @@protoc_insertion_point(class_scope:vplex.ias.RequestPairingPinResponseType) private: inline void set_has__inherited(); inline void clear_has__inherited(); inline void set_has_pairingpin(); inline void clear_has_pairingpin(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::vplex::ias::AbstractResponseType* _inherited_; ::std::string* pairingpin_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static RequestPairingPinResponseType* default_instance_; }; // ------------------------------------------------------------------- class GetPairingStatusRequestType : public ::google::protobuf::Message { public: GetPairingStatusRequestType(); virtual ~GetPairingStatusRequestType(); GetPairingStatusRequestType(const GetPairingStatusRequestType& from); inline GetPairingStatusRequestType& operator=(const GetPairingStatusRequestType& 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 GetPairingStatusRequestType& default_instance(); void Swap(GetPairingStatusRequestType* other); // implements Message ---------------------------------------------- GetPairingStatusRequestType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const GetPairingStatusRequestType& from); void MergeFrom(const GetPairingStatusRequestType& 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 .vplex.ias.AbstractRequestType _inherited = 1; inline bool has__inherited() const; inline void clear__inherited(); static const int kInheritedFieldNumber = 1; inline const ::vplex::ias::AbstractRequestType& _inherited() const; inline ::vplex::ias::AbstractRequestType* mutable__inherited(); inline ::vplex::ias::AbstractRequestType* release__inherited(); // required string PairingToken = 2; inline bool has_pairingtoken() const; inline void clear_pairingtoken(); static const int kPairingTokenFieldNumber = 2; inline const ::std::string& pairingtoken() const; inline void set_pairingtoken(const ::std::string& value); inline void set_pairingtoken(const char* value); inline void set_pairingtoken(const char* value, size_t size); inline ::std::string* mutable_pairingtoken(); inline ::std::string* release_pairingtoken(); // @@protoc_insertion_point(class_scope:vplex.ias.GetPairingStatusRequestType) private: inline void set_has__inherited(); inline void clear_has__inherited(); inline void set_has_pairingtoken(); inline void clear_has_pairingtoken(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::vplex::ias::AbstractRequestType* _inherited_; ::std::string* pairingtoken_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static GetPairingStatusRequestType* default_instance_; }; // ------------------------------------------------------------------- class GetPairingStatusResponseType : public ::google::protobuf::Message { public: GetPairingStatusResponseType(); virtual ~GetPairingStatusResponseType(); GetPairingStatusResponseType(const GetPairingStatusResponseType& from); inline GetPairingStatusResponseType& operator=(const GetPairingStatusResponseType& 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 GetPairingStatusResponseType& default_instance(); void Swap(GetPairingStatusResponseType* other); // implements Message ---------------------------------------------- GetPairingStatusResponseType* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const GetPairingStatusResponseType& from); void MergeFrom(const GetPairingStatusResponseType& 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 .vplex.ias.AbstractResponseType _inherited = 1; inline bool has__inherited() const; inline void clear__inherited(); static const int kInheritedFieldNumber = 1; inline const ::vplex::ias::AbstractResponseType& _inherited() const; inline ::vplex::ias::AbstractResponseType* mutable__inherited(); inline ::vplex::ias::AbstractResponseType* release__inherited(); // required string Status = 2; inline bool has_status() const; inline void clear_status(); static const int kStatusFieldNumber = 2; inline const ::std::string& status() const; inline void set_status(const ::std::string& value); inline void set_status(const char* value); inline void set_status(const char* value, size_t size); inline ::std::string* mutable_status(); inline ::std::string* release_status(); // optional string Username = 3; inline bool has_username() const; inline void clear_username(); static const int kUsernameFieldNumber = 3; inline const ::std::string& username() const; inline void set_username(const ::std::string& value); inline void set_username(const char* value); inline void set_username(const char* value, size_t size); inline ::std::string* mutable_username(); inline ::std::string* release_username(); // @@protoc_insertion_point(class_scope:vplex.ias.GetPairingStatusResponseType) private: inline void set_has__inherited(); inline void clear_has__inherited(); inline void set_has_status(); inline void clear_has_status(); inline void set_has_username(); inline void clear_has_username(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::vplex::ias::AbstractResponseType* _inherited_; ::std::string* status_; ::std::string* username_; mutable int _cached_size_; ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; friend void protobuf_AddDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_AssignDesc_vplex_5fias_5fservice_5ftypes_2eproto(); friend void protobuf_ShutdownFile_vplex_5fias_5fservice_5ftypes_2eproto(); void InitAsDefaultInstance(); static GetPairingStatusResponseType* default_instance_; }; // =================================================================== // =================================================================== // AbstractRequestType // required string Version = 1; inline bool AbstractRequestType::has_version() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void AbstractRequestType::set_has_version() { _has_bits_[0] |= 0x00000001u; } inline void AbstractRequestType::clear_has_version() { _has_bits_[0] &= ~0x00000001u; } inline void AbstractRequestType::clear_version() { if (version_ != &::google::protobuf::internal::kEmptyString) { version_->clear(); } clear_has_version(); } inline const ::std::string& AbstractRequestType::version() const { return *version_; } inline void AbstractRequestType::set_version(const ::std::string& value) { set_has_version(); if (version_ == &::google::protobuf::internal::kEmptyString) { version_ = new ::std::string; } version_->assign(value); } inline void AbstractRequestType::set_version(const char* value) { set_has_version(); if (version_ == &::google::protobuf::internal::kEmptyString) { version_ = new ::std::string; } version_->assign(value); } inline void AbstractRequestType::set_version(const char* value, size_t size) { set_has_version(); if (version_ == &::google::protobuf::internal::kEmptyString) { version_ = new ::std::string; } version_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* AbstractRequestType::mutable_version() { set_has_version(); if (version_ == &::google::protobuf::internal::kEmptyString) { version_ = new ::std::string; } return version_; } inline ::std::string* AbstractRequestType::release_version() { clear_has_version(); if (version_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = version_; version_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // required string MessageId = 2; inline bool AbstractRequestType::has_messageid() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void AbstractRequestType::set_has_messageid() { _has_bits_[0] |= 0x00000002u; } inline void AbstractRequestType::clear_has_messageid() { _has_bits_[0] &= ~0x00000002u; } inline void AbstractRequestType::clear_messageid() { if (messageid_ != &::google::protobuf::internal::kEmptyString) { messageid_->clear(); } clear_has_messageid(); } inline const ::std::string& AbstractRequestType::messageid() const { return *messageid_; } inline void AbstractRequestType::set_messageid(const ::std::string& value) { set_has_messageid(); if (messageid_ == &::google::protobuf::internal::kEmptyString) { messageid_ = new ::std::string; } messageid_->assign(value); } inline void AbstractRequestType::set_messageid(const char* value) { set_has_messageid(); if (messageid_ == &::google::protobuf::internal::kEmptyString) { messageid_ = new ::std::string; } messageid_->assign(value); } inline void AbstractRequestType::set_messageid(const char* value, size_t size) { set_has_messageid(); if (messageid_ == &::google::protobuf::internal::kEmptyString) { messageid_ = new ::std::string; } messageid_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* AbstractRequestType::mutable_messageid() { set_has_messageid(); if (messageid_ == &::google::protobuf::internal::kEmptyString) { messageid_ = new ::std::string; } return messageid_; } inline ::std::string* AbstractRequestType::release_messageid() { clear_has_messageid(); if (messageid_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = messageid_; messageid_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional fixed64 DeviceId = 3; inline bool AbstractRequestType::has_deviceid() const { return (_has_bits_[0] & 0x00000004u) != 0; } inline void AbstractRequestType::set_has_deviceid() { _has_bits_[0] |= 0x00000004u; } inline void AbstractRequestType::clear_has_deviceid() { _has_bits_[0] &= ~0x00000004u; } inline void AbstractRequestType::clear_deviceid() { deviceid_ = GOOGLE_ULONGLONG(0); clear_has_deviceid(); } inline ::google::protobuf::uint64 AbstractRequestType::deviceid() const { return deviceid_; } inline void AbstractRequestType::set_deviceid(::google::protobuf::uint64 value) { set_has_deviceid(); deviceid_ = value; } // optional string Region = 7; inline bool AbstractRequestType::has_region() const { return (_has_bits_[0] & 0x00000008u) != 0; } inline void AbstractRequestType::set_has_region() { _has_bits_[0] |= 0x00000008u; } inline void AbstractRequestType::clear_has_region() { _has_bits_[0] &= ~0x00000008u; } inline void AbstractRequestType::clear_region() { if (region_ != &::google::protobuf::internal::kEmptyString) { region_->clear(); } clear_has_region(); } inline const ::std::string& AbstractRequestType::region() const { return *region_; } inline void AbstractRequestType::set_region(const ::std::string& value) { set_has_region(); if (region_ == &::google::protobuf::internal::kEmptyString) { region_ = new ::std::string; } region_->assign(value); } inline void AbstractRequestType::set_region(const char* value) { set_has_region(); if (region_ == &::google::protobuf::internal::kEmptyString) { region_ = new ::std::string; } region_->assign(value); } inline void AbstractRequestType::set_region(const char* value, size_t size) { set_has_region(); if (region_ == &::google::protobuf::internal::kEmptyString) { region_ = new ::std::string; } region_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* AbstractRequestType::mutable_region() { set_has_region(); if (region_ == &::google::protobuf::internal::kEmptyString) { region_ = new ::std::string; } return region_; } inline ::std::string* AbstractRequestType::release_region() { clear_has_region(); if (region_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = region_; region_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional string Country = 8; inline bool AbstractRequestType::has_country() const { return (_has_bits_[0] & 0x00000010u) != 0; } inline void AbstractRequestType::set_has_country() { _has_bits_[0] |= 0x00000010u; } inline void AbstractRequestType::clear_has_country() { _has_bits_[0] &= ~0x00000010u; } inline void AbstractRequestType::clear_country() { if (country_ != &::google::protobuf::internal::kEmptyString) { country_->clear(); } clear_has_country(); } inline const ::std::string& AbstractRequestType::country() const { return *country_; } inline void AbstractRequestType::set_country(const ::std::string& value) { set_has_country(); if (country_ == &::google::protobuf::internal::kEmptyString) { country_ = new ::std::string; } country_->assign(value); } inline void AbstractRequestType::set_country(const char* value) { set_has_country(); if (country_ == &::google::protobuf::internal::kEmptyString) { country_ = new ::std::string; } country_->assign(value); } inline void AbstractRequestType::set_country(const char* value, size_t size) { set_has_country(); if (country_ == &::google::protobuf::internal::kEmptyString) { country_ = new ::std::string; } country_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* AbstractRequestType::mutable_country() { set_has_country(); if (country_ == &::google::protobuf::internal::kEmptyString) { country_ = new ::std::string; } return country_; } inline ::std::string* AbstractRequestType::release_country() { clear_has_country(); if (country_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = country_; country_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional string Language = 9; inline bool AbstractRequestType::has_language() const { return (_has_bits_[0] & 0x00000020u) != 0; } inline void AbstractRequestType::set_has_language() { _has_bits_[0] |= 0x00000020u; } inline void AbstractRequestType::clear_has_language() { _has_bits_[0] &= ~0x00000020u; } inline void AbstractRequestType::clear_language() { if (language_ != &::google::protobuf::internal::kEmptyString) { language_->clear(); } clear_has_language(); } inline const ::std::string& AbstractRequestType::language() const { return *language_; } inline void AbstractRequestType::set_language(const ::std::string& value) { set_has_language(); if (language_ == &::google::protobuf::internal::kEmptyString) { language_ = new ::std::string; } language_->assign(value); } inline void AbstractRequestType::set_language(const char* value) { set_has_language(); if (language_ == &::google::protobuf::internal::kEmptyString) { language_ = new ::std::string; } language_->assign(value); } inline void AbstractRequestType::set_language(const char* value, size_t size) { set_has_language(); if (language_ == &::google::protobuf::internal::kEmptyString) { language_ = new ::std::string; } language_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* AbstractRequestType::mutable_language() { set_has_language(); if (language_ == &::google::protobuf::internal::kEmptyString) { language_ = new ::std::string; } return language_; } inline ::std::string* AbstractRequestType::release_language() { clear_has_language(); if (language_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = language_; language_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional fixed64 SessionHandle = 10; inline bool AbstractRequestType::has_sessionhandle() const { return (_has_bits_[0] & 0x00000040u) != 0; } inline void AbstractRequestType::set_has_sessionhandle() { _has_bits_[0] |= 0x00000040u; } inline void AbstractRequestType::clear_has_sessionhandle() { _has_bits_[0] &= ~0x00000040u; } inline void AbstractRequestType::clear_sessionhandle() { sessionhandle_ = GOOGLE_ULONGLONG(0); clear_has_sessionhandle(); } inline ::google::protobuf::uint64 AbstractRequestType::sessionhandle() const { return sessionhandle_; } inline void AbstractRequestType::set_sessionhandle(::google::protobuf::uint64 value) { set_has_sessionhandle(); sessionhandle_ = value; } // optional bytes ServiceTicket = 11; inline bool AbstractRequestType::has_serviceticket() const { return (_has_bits_[0] & 0x00000080u) != 0; } inline void AbstractRequestType::set_has_serviceticket() { _has_bits_[0] |= 0x00000080u; } inline void AbstractRequestType::clear_has_serviceticket() { _has_bits_[0] &= ~0x00000080u; } inline void AbstractRequestType::clear_serviceticket() { if (serviceticket_ != &::google::protobuf::internal::kEmptyString) { serviceticket_->clear(); } clear_has_serviceticket(); } inline const ::std::string& AbstractRequestType::serviceticket() const { return *serviceticket_; } inline void AbstractRequestType::set_serviceticket(const ::std::string& value) { set_has_serviceticket(); if (serviceticket_ == &::google::protobuf::internal::kEmptyString) { serviceticket_ = new ::std::string; } serviceticket_->assign(value); } inline void AbstractRequestType::set_serviceticket(const char* value) { set_has_serviceticket(); if (serviceticket_ == &::google::protobuf::internal::kEmptyString) { serviceticket_ = new ::std::string; } serviceticket_->assign(value); } inline void AbstractRequestType::set_serviceticket(const void* value, size_t size) { set_has_serviceticket(); if (serviceticket_ == &::google::protobuf::internal::kEmptyString) { serviceticket_ = new ::std::string; } serviceticket_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* AbstractRequestType::mutable_serviceticket() { set_has_serviceticket(); if (serviceticket_ == &::google::protobuf::internal::kEmptyString) { serviceticket_ = new ::std::string; } return serviceticket_; } inline ::std::string* AbstractRequestType::release_serviceticket() { clear_has_serviceticket(); if (serviceticket_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = serviceticket_; serviceticket_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional string ServiceId = 12; inline bool AbstractRequestType::has_serviceid() const { return (_has_bits_[0] & 0x00000100u) != 0; } inline void AbstractRequestType::set_has_serviceid() { _has_bits_[0] |= 0x00000100u; } inline void AbstractRequestType::clear_has_serviceid() { _has_bits_[0] &= ~0x00000100u; } inline void AbstractRequestType::clear_serviceid() { if (serviceid_ != &::google::protobuf::internal::kEmptyString) { serviceid_->clear(); } clear_has_serviceid(); } inline const ::std::string& AbstractRequestType::serviceid() const { return *serviceid_; } inline void AbstractRequestType::set_serviceid(const ::std::string& value) { set_has_serviceid(); if (serviceid_ == &::google::protobuf::internal::kEmptyString) { serviceid_ = new ::std::string; } serviceid_->assign(value); } inline void AbstractRequestType::set_serviceid(const char* value) { set_has_serviceid(); if (serviceid_ == &::google::protobuf::internal::kEmptyString) { serviceid_ = new ::std::string; } serviceid_->assign(value); } inline void AbstractRequestType::set_serviceid(const char* value, size_t size) { set_has_serviceid(); if (serviceid_ == &::google::protobuf::internal::kEmptyString) { serviceid_ = new ::std::string; } serviceid_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* AbstractRequestType::mutable_serviceid() { set_has_serviceid(); if (serviceid_ == &::google::protobuf::internal::kEmptyString) { serviceid_ = new ::std::string; } return serviceid_; } inline ::std::string* AbstractRequestType::release_serviceid() { clear_has_serviceid(); if (serviceid_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = serviceid_; serviceid_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // ------------------------------------------------------------------- // AbstractResponseType // required string Version = 1; inline bool AbstractResponseType::has_version() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void AbstractResponseType::set_has_version() { _has_bits_[0] |= 0x00000001u; } inline void AbstractResponseType::clear_has_version() { _has_bits_[0] &= ~0x00000001u; } inline void AbstractResponseType::clear_version() { if (version_ != &::google::protobuf::internal::kEmptyString) { version_->clear(); } clear_has_version(); } inline const ::std::string& AbstractResponseType::version() const { return *version_; } inline void AbstractResponseType::set_version(const ::std::string& value) { set_has_version(); if (version_ == &::google::protobuf::internal::kEmptyString) { version_ = new ::std::string; } version_->assign(value); } inline void AbstractResponseType::set_version(const char* value) { set_has_version(); if (version_ == &::google::protobuf::internal::kEmptyString) { version_ = new ::std::string; } version_->assign(value); } inline void AbstractResponseType::set_version(const char* value, size_t size) { set_has_version(); if (version_ == &::google::protobuf::internal::kEmptyString) { version_ = new ::std::string; } version_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* AbstractResponseType::mutable_version() { set_has_version(); if (version_ == &::google::protobuf::internal::kEmptyString) { version_ = new ::std::string; } return version_; } inline ::std::string* AbstractResponseType::release_version() { clear_has_version(); if (version_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = version_; version_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional fixed64 DeviceId = 2; inline bool AbstractResponseType::has_deviceid() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void AbstractResponseType::set_has_deviceid() { _has_bits_[0] |= 0x00000002u; } inline void AbstractResponseType::clear_has_deviceid() { _has_bits_[0] &= ~0x00000002u; } inline void AbstractResponseType::clear_deviceid() { deviceid_ = GOOGLE_ULONGLONG(0); clear_has_deviceid(); } inline ::google::protobuf::uint64 AbstractResponseType::deviceid() const { return deviceid_; } inline void AbstractResponseType::set_deviceid(::google::protobuf::uint64 value) { set_has_deviceid(); deviceid_ = value; } // required string MessageId = 3; inline bool AbstractResponseType::has_messageid() const { return (_has_bits_[0] & 0x00000004u) != 0; } inline void AbstractResponseType::set_has_messageid() { _has_bits_[0] |= 0x00000004u; } inline void AbstractResponseType::clear_has_messageid() { _has_bits_[0] &= ~0x00000004u; } inline void AbstractResponseType::clear_messageid() { if (messageid_ != &::google::protobuf::internal::kEmptyString) { messageid_->clear(); } clear_has_messageid(); } inline const ::std::string& AbstractResponseType::messageid() const { return *messageid_; } inline void AbstractResponseType::set_messageid(const ::std::string& value) { set_has_messageid(); if (messageid_ == &::google::protobuf::internal::kEmptyString) { messageid_ = new ::std::string; } messageid_->assign(value); } inline void AbstractResponseType::set_messageid(const char* value) { set_has_messageid(); if (messageid_ == &::google::protobuf::internal::kEmptyString) { messageid_ = new ::std::string; } messageid_->assign(value); } inline void AbstractResponseType::set_messageid(const char* value, size_t size) { set_has_messageid(); if (messageid_ == &::google::protobuf::internal::kEmptyString) { messageid_ = new ::std::string; } messageid_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* AbstractResponseType::mutable_messageid() { set_has_messageid(); if (messageid_ == &::google::protobuf::internal::kEmptyString) { messageid_ = new ::std::string; } return messageid_; } inline ::std::string* AbstractResponseType::release_messageid() { clear_has_messageid(); if (messageid_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = messageid_; messageid_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // required fixed64 TimeStamp = 4; inline bool AbstractResponseType::has_timestamp() const { return (_has_bits_[0] & 0x00000008u) != 0; } inline void AbstractResponseType::set_has_timestamp() { _has_bits_[0] |= 0x00000008u; } inline void AbstractResponseType::clear_has_timestamp() { _has_bits_[0] &= ~0x00000008u; } inline void AbstractResponseType::clear_timestamp() { timestamp_ = GOOGLE_ULONGLONG(0); clear_has_timestamp(); } inline ::google::protobuf::uint64 AbstractResponseType::timestamp() const { return timestamp_; } inline void AbstractResponseType::set_timestamp(::google::protobuf::uint64 value) { set_has_timestamp(); timestamp_ = value; } // required sint32 ErrorCode = 5; inline bool AbstractResponseType::has_errorcode() const { return (_has_bits_[0] & 0x00000010u) != 0; } inline void AbstractResponseType::set_has_errorcode() { _has_bits_[0] |= 0x00000010u; } inline void AbstractResponseType::clear_has_errorcode() { _has_bits_[0] &= ~0x00000010u; } inline void AbstractResponseType::clear_errorcode() { errorcode_ = 0; clear_has_errorcode(); } inline ::google::protobuf::int32 AbstractResponseType::errorcode() const { return errorcode_; } inline void AbstractResponseType::set_errorcode(::google::protobuf::int32 value) { set_has_errorcode(); errorcode_ = value; } // optional string ErrorMessage = 6; inline bool AbstractResponseType::has_errormessage() const { return (_has_bits_[0] & 0x00000020u) != 0; } inline void AbstractResponseType::set_has_errormessage() { _has_bits_[0] |= 0x00000020u; } inline void AbstractResponseType::clear_has_errormessage() { _has_bits_[0] &= ~0x00000020u; } inline void AbstractResponseType::clear_errormessage() { if (errormessage_ != &::google::protobuf::internal::kEmptyString) { errormessage_->clear(); } clear_has_errormessage(); } inline const ::std::string& AbstractResponseType::errormessage() const { return *errormessage_; } inline void AbstractResponseType::set_errormessage(const ::std::string& value) { set_has_errormessage(); if (errormessage_ == &::google::protobuf::internal::kEmptyString) { errormessage_ = new ::std::string; } errormessage_->assign(value); } inline void AbstractResponseType::set_errormessage(const char* value) { set_has_errormessage(); if (errormessage_ == &::google::protobuf::internal::kEmptyString) { errormessage_ = new ::std::string; } errormessage_->assign(value); } inline void AbstractResponseType::set_errormessage(const char* value, size_t size) { set_has_errormessage(); if (errormessage_ == &::google::protobuf::internal::kEmptyString) { errormessage_ = new ::std::string; } errormessage_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* AbstractResponseType::mutable_errormessage() { set_has_errormessage(); if (errormessage_ == &::google::protobuf::internal::kEmptyString) { errormessage_ = new ::std::string; } return errormessage_; } inline ::std::string* AbstractResponseType::release_errormessage() { clear_has_errormessage(); if (errormessage_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = errormessage_; errormessage_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional bool ServiceStandbyMode = 7; inline bool AbstractResponseType::has_servicestandbymode() const { return (_has_bits_[0] & 0x00000040u) != 0; } inline void AbstractResponseType::set_has_servicestandbymode() { _has_bits_[0] |= 0x00000040u; } inline void AbstractResponseType::clear_has_servicestandbymode() { _has_bits_[0] &= ~0x00000040u; } inline void AbstractResponseType::clear_servicestandbymode() { servicestandbymode_ = false; clear_has_servicestandbymode(); } inline bool AbstractResponseType::servicestandbymode() const { return servicestandbymode_; } inline void AbstractResponseType::set_servicestandbymode(bool value) { set_has_servicestandbymode(); servicestandbymode_ = value; } // ------------------------------------------------------------------- // CheckVirtualDeviceCredentialsRenewalRequestType // required .vplex.ias.AbstractRequestType _inherited = 1; inline bool CheckVirtualDeviceCredentialsRenewalRequestType::has__inherited() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void CheckVirtualDeviceCredentialsRenewalRequestType::set_has__inherited() { _has_bits_[0] |= 0x00000001u; } inline void CheckVirtualDeviceCredentialsRenewalRequestType::clear_has__inherited() { _has_bits_[0] &= ~0x00000001u; } inline void CheckVirtualDeviceCredentialsRenewalRequestType::clear__inherited() { if (_inherited_ != NULL) _inherited_->::vplex::ias::AbstractRequestType::Clear(); clear_has__inherited(); } inline const ::vplex::ias::AbstractRequestType& CheckVirtualDeviceCredentialsRenewalRequestType::_inherited() const { return _inherited_ != NULL ? *_inherited_ : *default_instance_->_inherited_; } inline ::vplex::ias::AbstractRequestType* CheckVirtualDeviceCredentialsRenewalRequestType::mutable__inherited() { set_has__inherited(); if (_inherited_ == NULL) _inherited_ = new ::vplex::ias::AbstractRequestType; return _inherited_; } inline ::vplex::ias::AbstractRequestType* CheckVirtualDeviceCredentialsRenewalRequestType::release__inherited() { clear_has__inherited(); ::vplex::ias::AbstractRequestType* temp = _inherited_; _inherited_ = NULL; return temp; } // required fixed64 IssueDate = 2; inline bool CheckVirtualDeviceCredentialsRenewalRequestType::has_issuedate() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void CheckVirtualDeviceCredentialsRenewalRequestType::set_has_issuedate() { _has_bits_[0] |= 0x00000002u; } inline void CheckVirtualDeviceCredentialsRenewalRequestType::clear_has_issuedate() { _has_bits_[0] &= ~0x00000002u; } inline void CheckVirtualDeviceCredentialsRenewalRequestType::clear_issuedate() { issuedate_ = GOOGLE_ULONGLONG(0); clear_has_issuedate(); } inline ::google::protobuf::uint64 CheckVirtualDeviceCredentialsRenewalRequestType::issuedate() const { return issuedate_; } inline void CheckVirtualDeviceCredentialsRenewalRequestType::set_issuedate(::google::protobuf::uint64 value) { set_has_issuedate(); issuedate_ = value; } // required fixed64 SerialNumber = 3; inline bool CheckVirtualDeviceCredentialsRenewalRequestType::has_serialnumber() const { return (_has_bits_[0] & 0x00000004u) != 0; } inline void CheckVirtualDeviceCredentialsRenewalRequestType::set_has_serialnumber() { _has_bits_[0] |= 0x00000004u; } inline void CheckVirtualDeviceCredentialsRenewalRequestType::clear_has_serialnumber() { _has_bits_[0] &= ~0x00000004u; } inline void CheckVirtualDeviceCredentialsRenewalRequestType::clear_serialnumber() { serialnumber_ = GOOGLE_ULONGLONG(0); clear_has_serialnumber(); } inline ::google::protobuf::uint64 CheckVirtualDeviceCredentialsRenewalRequestType::serialnumber() const { return serialnumber_; } inline void CheckVirtualDeviceCredentialsRenewalRequestType::set_serialnumber(::google::protobuf::uint64 value) { set_has_serialnumber(); serialnumber_ = value; } // ------------------------------------------------------------------- // CheckVirtualDeviceCredentialsRenewalResponseType // required .vplex.ias.AbstractResponseType _inherited = 1; inline bool CheckVirtualDeviceCredentialsRenewalResponseType::has__inherited() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void CheckVirtualDeviceCredentialsRenewalResponseType::set_has__inherited() { _has_bits_[0] |= 0x00000001u; } inline void CheckVirtualDeviceCredentialsRenewalResponseType::clear_has__inherited() { _has_bits_[0] &= ~0x00000001u; } inline void CheckVirtualDeviceCredentialsRenewalResponseType::clear__inherited() { if (_inherited_ != NULL) _inherited_->::vplex::ias::AbstractResponseType::Clear(); clear_has__inherited(); } inline const ::vplex::ias::AbstractResponseType& CheckVirtualDeviceCredentialsRenewalResponseType::_inherited() const { return _inherited_ != NULL ? *_inherited_ : *default_instance_->_inherited_; } inline ::vplex::ias::AbstractResponseType* CheckVirtualDeviceCredentialsRenewalResponseType::mutable__inherited() { set_has__inherited(); if (_inherited_ == NULL) _inherited_ = new ::vplex::ias::AbstractResponseType; return _inherited_; } inline ::vplex::ias::AbstractResponseType* CheckVirtualDeviceCredentialsRenewalResponseType::release__inherited() { clear_has__inherited(); ::vplex::ias::AbstractResponseType* temp = _inherited_; _inherited_ = NULL; return temp; } // required fixed64 ExpectedSerialNumber = 2; inline bool CheckVirtualDeviceCredentialsRenewalResponseType::has_expectedserialnumber() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void CheckVirtualDeviceCredentialsRenewalResponseType::set_has_expectedserialnumber() { _has_bits_[0] |= 0x00000002u; } inline void CheckVirtualDeviceCredentialsRenewalResponseType::clear_has_expectedserialnumber() { _has_bits_[0] &= ~0x00000002u; } inline void CheckVirtualDeviceCredentialsRenewalResponseType::clear_expectedserialnumber() { expectedserialnumber_ = GOOGLE_ULONGLONG(0); clear_has_expectedserialnumber(); } inline ::google::protobuf::uint64 CheckVirtualDeviceCredentialsRenewalResponseType::expectedserialnumber() const { return expectedserialnumber_; } inline void CheckVirtualDeviceCredentialsRenewalResponseType::set_expectedserialnumber(::google::protobuf::uint64 value) { set_has_expectedserialnumber(); expectedserialnumber_ = value; } // ------------------------------------------------------------------- // StrAttributeType // required string AttributeName = 1; inline bool StrAttributeType::has_attributename() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void StrAttributeType::set_has_attributename() { _has_bits_[0] |= 0x00000001u; } inline void StrAttributeType::clear_has_attributename() { _has_bits_[0] &= ~0x00000001u; } inline void StrAttributeType::clear_attributename() { if (attributename_ != &::google::protobuf::internal::kEmptyString) { attributename_->clear(); } clear_has_attributename(); } inline const ::std::string& StrAttributeType::attributename() const { return *attributename_; } inline void StrAttributeType::set_attributename(const ::std::string& value) { set_has_attributename(); if (attributename_ == &::google::protobuf::internal::kEmptyString) { attributename_ = new ::std::string; } attributename_->assign(value); } inline void StrAttributeType::set_attributename(const char* value) { set_has_attributename(); if (attributename_ == &::google::protobuf::internal::kEmptyString) { attributename_ = new ::std::string; } attributename_->assign(value); } inline void StrAttributeType::set_attributename(const char* value, size_t size) { set_has_attributename(); if (attributename_ == &::google::protobuf::internal::kEmptyString) { attributename_ = new ::std::string; } attributename_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* StrAttributeType::mutable_attributename() { set_has_attributename(); if (attributename_ == &::google::protobuf::internal::kEmptyString) { attributename_ = new ::std::string; } return attributename_; } inline ::std::string* StrAttributeType::release_attributename() { clear_has_attributename(); if (attributename_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = attributename_; attributename_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // required string AttributeValue = 2; inline bool StrAttributeType::has_attributevalue() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void StrAttributeType::set_has_attributevalue() { _has_bits_[0] |= 0x00000002u; } inline void StrAttributeType::clear_has_attributevalue() { _has_bits_[0] &= ~0x00000002u; } inline void StrAttributeType::clear_attributevalue() { if (attributevalue_ != &::google::protobuf::internal::kEmptyString) { attributevalue_->clear(); } clear_has_attributevalue(); } inline const ::std::string& StrAttributeType::attributevalue() const { return *attributevalue_; } inline void StrAttributeType::set_attributevalue(const ::std::string& value) { set_has_attributevalue(); if (attributevalue_ == &::google::protobuf::internal::kEmptyString) { attributevalue_ = new ::std::string; } attributevalue_->assign(value); } inline void StrAttributeType::set_attributevalue(const char* value) { set_has_attributevalue(); if (attributevalue_ == &::google::protobuf::internal::kEmptyString) { attributevalue_ = new ::std::string; } attributevalue_->assign(value); } inline void StrAttributeType::set_attributevalue(const char* value, size_t size) { set_has_attributevalue(); if (attributevalue_ == &::google::protobuf::internal::kEmptyString) { attributevalue_ = new ::std::string; } attributevalue_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* StrAttributeType::mutable_attributevalue() { set_has_attributevalue(); if (attributevalue_ == &::google::protobuf::internal::kEmptyString) { attributevalue_ = new ::std::string; } return attributevalue_; } inline ::std::string* StrAttributeType::release_attributevalue() { clear_has_attributevalue(); if (attributevalue_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = attributevalue_; attributevalue_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // ------------------------------------------------------------------- // GetSessionKeyRequestType // required .vplex.ias.AbstractRequestType _inherited = 1; inline bool GetSessionKeyRequestType::has__inherited() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void GetSessionKeyRequestType::set_has__inherited() { _has_bits_[0] |= 0x00000001u; } inline void GetSessionKeyRequestType::clear_has__inherited() { _has_bits_[0] &= ~0x00000001u; } inline void GetSessionKeyRequestType::clear__inherited() { if (_inherited_ != NULL) _inherited_->::vplex::ias::AbstractRequestType::Clear(); clear_has__inherited(); } inline const ::vplex::ias::AbstractRequestType& GetSessionKeyRequestType::_inherited() const { return _inherited_ != NULL ? *_inherited_ : *default_instance_->_inherited_; } inline ::vplex::ias::AbstractRequestType* GetSessionKeyRequestType::mutable__inherited() { set_has__inherited(); if (_inherited_ == NULL) _inherited_ = new ::vplex::ias::AbstractRequestType; return _inherited_; } inline ::vplex::ias::AbstractRequestType* GetSessionKeyRequestType::release__inherited() { clear_has__inherited(); ::vplex::ias::AbstractRequestType* temp = _inherited_; _inherited_ = NULL; return temp; } // required string Type = 2; inline bool GetSessionKeyRequestType::has_type() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void GetSessionKeyRequestType::set_has_type() { _has_bits_[0] |= 0x00000002u; } inline void GetSessionKeyRequestType::clear_has_type() { _has_bits_[0] &= ~0x00000002u; } inline void GetSessionKeyRequestType::clear_type() { if (type_ != &::google::protobuf::internal::kEmptyString) { type_->clear(); } clear_has_type(); } inline const ::std::string& GetSessionKeyRequestType::type() const { return *type_; } inline void GetSessionKeyRequestType::set_type(const ::std::string& value) { set_has_type(); if (type_ == &::google::protobuf::internal::kEmptyString) { type_ = new ::std::string; } type_->assign(value); } inline void GetSessionKeyRequestType::set_type(const char* value) { set_has_type(); if (type_ == &::google::protobuf::internal::kEmptyString) { type_ = new ::std::string; } type_->assign(value); } inline void GetSessionKeyRequestType::set_type(const char* value, size_t size) { set_has_type(); if (type_ == &::google::protobuf::internal::kEmptyString) { type_ = new ::std::string; } type_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* GetSessionKeyRequestType::mutable_type() { set_has_type(); if (type_ == &::google::protobuf::internal::kEmptyString) { type_ = new ::std::string; } return type_; } inline ::std::string* GetSessionKeyRequestType::release_type() { clear_has_type(); if (type_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = type_; type_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // repeated .vplex.ias.StrAttributeType KeyAttributes = 3; inline int GetSessionKeyRequestType::keyattributes_size() const { return keyattributes_.size(); } inline void GetSessionKeyRequestType::clear_keyattributes() { keyattributes_.Clear(); } inline const ::vplex::ias::StrAttributeType& GetSessionKeyRequestType::keyattributes(int index) const { return keyattributes_.Get(index); } inline ::vplex::ias::StrAttributeType* GetSessionKeyRequestType::mutable_keyattributes(int index) { return keyattributes_.Mutable(index); } inline ::vplex::ias::StrAttributeType* GetSessionKeyRequestType::add_keyattributes() { return keyattributes_.Add(); } inline const ::google::protobuf::RepeatedPtrField< ::vplex::ias::StrAttributeType >& GetSessionKeyRequestType::keyattributes() const { return keyattributes_; } inline ::google::protobuf::RepeatedPtrField< ::vplex::ias::StrAttributeType >* GetSessionKeyRequestType::mutable_keyattributes() { return &keyattributes_; } // optional bytes EncryptedSessionKey = 4; inline bool GetSessionKeyRequestType::has_encryptedsessionkey() const { return (_has_bits_[0] & 0x00000008u) != 0; } inline void GetSessionKeyRequestType::set_has_encryptedsessionkey() { _has_bits_[0] |= 0x00000008u; } inline void GetSessionKeyRequestType::clear_has_encryptedsessionkey() { _has_bits_[0] &= ~0x00000008u; } inline void GetSessionKeyRequestType::clear_encryptedsessionkey() { if (encryptedsessionkey_ != &::google::protobuf::internal::kEmptyString) { encryptedsessionkey_->clear(); } clear_has_encryptedsessionkey(); } inline const ::std::string& GetSessionKeyRequestType::encryptedsessionkey() const { return *encryptedsessionkey_; } inline void GetSessionKeyRequestType::set_encryptedsessionkey(const ::std::string& value) { set_has_encryptedsessionkey(); if (encryptedsessionkey_ == &::google::protobuf::internal::kEmptyString) { encryptedsessionkey_ = new ::std::string; } encryptedsessionkey_->assign(value); } inline void GetSessionKeyRequestType::set_encryptedsessionkey(const char* value) { set_has_encryptedsessionkey(); if (encryptedsessionkey_ == &::google::protobuf::internal::kEmptyString) { encryptedsessionkey_ = new ::std::string; } encryptedsessionkey_->assign(value); } inline void GetSessionKeyRequestType::set_encryptedsessionkey(const void* value, size_t size) { set_has_encryptedsessionkey(); if (encryptedsessionkey_ == &::google::protobuf::internal::kEmptyString) { encryptedsessionkey_ = new ::std::string; } encryptedsessionkey_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* GetSessionKeyRequestType::mutable_encryptedsessionkey() { set_has_encryptedsessionkey(); if (encryptedsessionkey_ == &::google::protobuf::internal::kEmptyString) { encryptedsessionkey_ = new ::std::string; } return encryptedsessionkey_; } inline ::std::string* GetSessionKeyRequestType::release_encryptedsessionkey() { clear_has_encryptedsessionkey(); if (encryptedsessionkey_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = encryptedsessionkey_; encryptedsessionkey_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // ------------------------------------------------------------------- // GetSessionKeyResponseType // required .vplex.ias.AbstractResponseType _inherited = 1; inline bool GetSessionKeyResponseType::has__inherited() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void GetSessionKeyResponseType::set_has__inherited() { _has_bits_[0] |= 0x00000001u; } inline void GetSessionKeyResponseType::clear_has__inherited() { _has_bits_[0] &= ~0x00000001u; } inline void GetSessionKeyResponseType::clear__inherited() { if (_inherited_ != NULL) _inherited_->::vplex::ias::AbstractResponseType::Clear(); clear_has__inherited(); } inline const ::vplex::ias::AbstractResponseType& GetSessionKeyResponseType::_inherited() const { return _inherited_ != NULL ? *_inherited_ : *default_instance_->_inherited_; } inline ::vplex::ias::AbstractResponseType* GetSessionKeyResponseType::mutable__inherited() { set_has__inherited(); if (_inherited_ == NULL) _inherited_ = new ::vplex::ias::AbstractResponseType; return _inherited_; } inline ::vplex::ias::AbstractResponseType* GetSessionKeyResponseType::release__inherited() { clear_has__inherited(); ::vplex::ias::AbstractResponseType* temp = _inherited_; _inherited_ = NULL; return temp; } // optional bytes SessionKey = 2; inline bool GetSessionKeyResponseType::has_sessionkey() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void GetSessionKeyResponseType::set_has_sessionkey() { _has_bits_[0] |= 0x00000002u; } inline void GetSessionKeyResponseType::clear_has_sessionkey() { _has_bits_[0] &= ~0x00000002u; } inline void GetSessionKeyResponseType::clear_sessionkey() { if (sessionkey_ != &::google::protobuf::internal::kEmptyString) { sessionkey_->clear(); } clear_has_sessionkey(); } inline const ::std::string& GetSessionKeyResponseType::sessionkey() const { return *sessionkey_; } inline void GetSessionKeyResponseType::set_sessionkey(const ::std::string& value) { set_has_sessionkey(); if (sessionkey_ == &::google::protobuf::internal::kEmptyString) { sessionkey_ = new ::std::string; } sessionkey_->assign(value); } inline void GetSessionKeyResponseType::set_sessionkey(const char* value) { set_has_sessionkey(); if (sessionkey_ == &::google::protobuf::internal::kEmptyString) { sessionkey_ = new ::std::string; } sessionkey_->assign(value); } inline void GetSessionKeyResponseType::set_sessionkey(const void* value, size_t size) { set_has_sessionkey(); if (sessionkey_ == &::google::protobuf::internal::kEmptyString) { sessionkey_ = new ::std::string; } sessionkey_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* GetSessionKeyResponseType::mutable_sessionkey() { set_has_sessionkey(); if (sessionkey_ == &::google::protobuf::internal::kEmptyString) { sessionkey_ = new ::std::string; } return sessionkey_; } inline ::std::string* GetSessionKeyResponseType::release_sessionkey() { clear_has_sessionkey(); if (sessionkey_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = sessionkey_; sessionkey_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional bytes EncryptedSessionKey = 3; inline bool GetSessionKeyResponseType::has_encryptedsessionkey() const { return (_has_bits_[0] & 0x00000004u) != 0; } inline void GetSessionKeyResponseType::set_has_encryptedsessionkey() { _has_bits_[0] |= 0x00000004u; } inline void GetSessionKeyResponseType::clear_has_encryptedsessionkey() { _has_bits_[0] &= ~0x00000004u; } inline void GetSessionKeyResponseType::clear_encryptedsessionkey() { if (encryptedsessionkey_ != &::google::protobuf::internal::kEmptyString) { encryptedsessionkey_->clear(); } clear_has_encryptedsessionkey(); } inline const ::std::string& GetSessionKeyResponseType::encryptedsessionkey() const { return *encryptedsessionkey_; } inline void GetSessionKeyResponseType::set_encryptedsessionkey(const ::std::string& value) { set_has_encryptedsessionkey(); if (encryptedsessionkey_ == &::google::protobuf::internal::kEmptyString) { encryptedsessionkey_ = new ::std::string; } encryptedsessionkey_->assign(value); } inline void GetSessionKeyResponseType::set_encryptedsessionkey(const char* value) { set_has_encryptedsessionkey(); if (encryptedsessionkey_ == &::google::protobuf::internal::kEmptyString) { encryptedsessionkey_ = new ::std::string; } encryptedsessionkey_->assign(value); } inline void GetSessionKeyResponseType::set_encryptedsessionkey(const void* value, size_t size) { set_has_encryptedsessionkey(); if (encryptedsessionkey_ == &::google::protobuf::internal::kEmptyString) { encryptedsessionkey_ = new ::std::string; } encryptedsessionkey_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* GetSessionKeyResponseType::mutable_encryptedsessionkey() { set_has_encryptedsessionkey(); if (encryptedsessionkey_ == &::google::protobuf::internal::kEmptyString) { encryptedsessionkey_ = new ::std::string; } return encryptedsessionkey_; } inline ::std::string* GetSessionKeyResponseType::release_encryptedsessionkey() { clear_has_encryptedsessionkey(); if (encryptedsessionkey_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = encryptedsessionkey_; encryptedsessionkey_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional uint32 InstanceId = 4; inline bool GetSessionKeyResponseType::has_instanceid() const { return (_has_bits_[0] & 0x00000008u) != 0; } inline void GetSessionKeyResponseType::set_has_instanceid() { _has_bits_[0] |= 0x00000008u; } inline void GetSessionKeyResponseType::clear_has_instanceid() { _has_bits_[0] &= ~0x00000008u; } inline void GetSessionKeyResponseType::clear_instanceid() { instanceid_ = 0u; clear_has_instanceid(); } inline ::google::protobuf::uint32 GetSessionKeyResponseType::instanceid() const { return instanceid_; } inline void GetSessionKeyResponseType::set_instanceid(::google::protobuf::uint32 value) { set_has_instanceid(); instanceid_ = value; } // ------------------------------------------------------------------- // LoginRequestType // required .vplex.ias.AbstractRequestType _inherited = 1; inline bool LoginRequestType::has__inherited() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void LoginRequestType::set_has__inherited() { _has_bits_[0] |= 0x00000001u; } inline void LoginRequestType::clear_has__inherited() { _has_bits_[0] &= ~0x00000001u; } inline void LoginRequestType::clear__inherited() { if (_inherited_ != NULL) _inherited_->::vplex::ias::AbstractRequestType::Clear(); clear_has__inherited(); } inline const ::vplex::ias::AbstractRequestType& LoginRequestType::_inherited() const { return _inherited_ != NULL ? *_inherited_ : *default_instance_->_inherited_; } inline ::vplex::ias::AbstractRequestType* LoginRequestType::mutable__inherited() { set_has__inherited(); if (_inherited_ == NULL) _inherited_ = new ::vplex::ias::AbstractRequestType; return _inherited_; } inline ::vplex::ias::AbstractRequestType* LoginRequestType::release__inherited() { clear_has__inherited(); ::vplex::ias::AbstractRequestType* temp = _inherited_; _inherited_ = NULL; return temp; } // optional string Username = 2; inline bool LoginRequestType::has_username() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void LoginRequestType::set_has_username() { _has_bits_[0] |= 0x00000002u; } inline void LoginRequestType::clear_has_username() { _has_bits_[0] &= ~0x00000002u; } inline void LoginRequestType::clear_username() { if (username_ != &::google::protobuf::internal::kEmptyString) { username_->clear(); } clear_has_username(); } inline const ::std::string& LoginRequestType::username() const { return *username_; } inline void LoginRequestType::set_username(const ::std::string& value) { set_has_username(); if (username_ == &::google::protobuf::internal::kEmptyString) { username_ = new ::std::string; } username_->assign(value); } inline void LoginRequestType::set_username(const char* value) { set_has_username(); if (username_ == &::google::protobuf::internal::kEmptyString) { username_ = new ::std::string; } username_->assign(value); } inline void LoginRequestType::set_username(const char* value, size_t size) { set_has_username(); if (username_ == &::google::protobuf::internal::kEmptyString) { username_ = new ::std::string; } username_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* LoginRequestType::mutable_username() { set_has_username(); if (username_ == &::google::protobuf::internal::kEmptyString) { username_ = new ::std::string; } return username_; } inline ::std::string* LoginRequestType::release_username() { clear_has_username(); if (username_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = username_; username_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // required string Namespace = 3; inline bool LoginRequestType::has_namespace_() const { return (_has_bits_[0] & 0x00000004u) != 0; } inline void LoginRequestType::set_has_namespace_() { _has_bits_[0] |= 0x00000004u; } inline void LoginRequestType::clear_has_namespace_() { _has_bits_[0] &= ~0x00000004u; } inline void LoginRequestType::clear_namespace_() { if (namespace__ != &::google::protobuf::internal::kEmptyString) { namespace__->clear(); } clear_has_namespace_(); } inline const ::std::string& LoginRequestType::namespace_() const { return *namespace__; } inline void LoginRequestType::set_namespace_(const ::std::string& value) { set_has_namespace_(); if (namespace__ == &::google::protobuf::internal::kEmptyString) { namespace__ = new ::std::string; } namespace__->assign(value); } inline void LoginRequestType::set_namespace_(const char* value) { set_has_namespace_(); if (namespace__ == &::google::protobuf::internal::kEmptyString) { namespace__ = new ::std::string; } namespace__->assign(value); } inline void LoginRequestType::set_namespace_(const char* value, size_t size) { set_has_namespace_(); if (namespace__ == &::google::protobuf::internal::kEmptyString) { namespace__ = new ::std::string; } namespace__->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* LoginRequestType::mutable_namespace_() { set_has_namespace_(); if (namespace__ == &::google::protobuf::internal::kEmptyString) { namespace__ = new ::std::string; } return namespace__; } inline ::std::string* LoginRequestType::release_namespace_() { clear_has_namespace_(); if (namespace__ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = namespace__; namespace__ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional string Password = 4; inline bool LoginRequestType::has_password() const { return (_has_bits_[0] & 0x00000008u) != 0; } inline void LoginRequestType::set_has_password() { _has_bits_[0] |= 0x00000008u; } inline void LoginRequestType::clear_has_password() { _has_bits_[0] &= ~0x00000008u; } inline void LoginRequestType::clear_password() { if (password_ != &::google::protobuf::internal::kEmptyString) { password_->clear(); } clear_has_password(); } inline const ::std::string& LoginRequestType::password() const { return *password_; } inline void LoginRequestType::set_password(const ::std::string& value) { set_has_password(); if (password_ == &::google::protobuf::internal::kEmptyString) { password_ = new ::std::string; } password_->assign(value); } inline void LoginRequestType::set_password(const char* value) { set_has_password(); if (password_ == &::google::protobuf::internal::kEmptyString) { password_ = new ::std::string; } password_->assign(value); } inline void LoginRequestType::set_password(const char* value, size_t size) { set_has_password(); if (password_ == &::google::protobuf::internal::kEmptyString) { password_ = new ::std::string; } password_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* LoginRequestType::mutable_password() { set_has_password(); if (password_ == &::google::protobuf::internal::kEmptyString) { password_ = new ::std::string; } return password_; } inline ::std::string* LoginRequestType::release_password() { clear_has_password(); if (password_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = password_; password_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional string WeakToken = 5; inline bool LoginRequestType::has_weaktoken() const { return (_has_bits_[0] & 0x00000010u) != 0; } inline void LoginRequestType::set_has_weaktoken() { _has_bits_[0] |= 0x00000010u; } inline void LoginRequestType::clear_has_weaktoken() { _has_bits_[0] &= ~0x00000010u; } inline void LoginRequestType::clear_weaktoken() { if (weaktoken_ != &::google::protobuf::internal::kEmptyString) { weaktoken_->clear(); } clear_has_weaktoken(); } inline const ::std::string& LoginRequestType::weaktoken() const { return *weaktoken_; } inline void LoginRequestType::set_weaktoken(const ::std::string& value) { set_has_weaktoken(); if (weaktoken_ == &::google::protobuf::internal::kEmptyString) { weaktoken_ = new ::std::string; } weaktoken_->assign(value); } inline void LoginRequestType::set_weaktoken(const char* value) { set_has_weaktoken(); if (weaktoken_ == &::google::protobuf::internal::kEmptyString) { weaktoken_ = new ::std::string; } weaktoken_->assign(value); } inline void LoginRequestType::set_weaktoken(const char* value, size_t size) { set_has_weaktoken(); if (weaktoken_ == &::google::protobuf::internal::kEmptyString) { weaktoken_ = new ::std::string; } weaktoken_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* LoginRequestType::mutable_weaktoken() { set_has_weaktoken(); if (weaktoken_ == &::google::protobuf::internal::kEmptyString) { weaktoken_ = new ::std::string; } return weaktoken_; } inline ::std::string* LoginRequestType::release_weaktoken() { clear_has_weaktoken(); if (weaktoken_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = weaktoken_; weaktoken_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional string PairingToken = 11; inline bool LoginRequestType::has_pairingtoken() const { return (_has_bits_[0] & 0x00000020u) != 0; } inline void LoginRequestType::set_has_pairingtoken() { _has_bits_[0] |= 0x00000020u; } inline void LoginRequestType::clear_has_pairingtoken() { _has_bits_[0] &= ~0x00000020u; } inline void LoginRequestType::clear_pairingtoken() { if (pairingtoken_ != &::google::protobuf::internal::kEmptyString) { pairingtoken_->clear(); } clear_has_pairingtoken(); } inline const ::std::string& LoginRequestType::pairingtoken() const { return *pairingtoken_; } inline void LoginRequestType::set_pairingtoken(const ::std::string& value) { set_has_pairingtoken(); if (pairingtoken_ == &::google::protobuf::internal::kEmptyString) { pairingtoken_ = new ::std::string; } pairingtoken_->assign(value); } inline void LoginRequestType::set_pairingtoken(const char* value) { set_has_pairingtoken(); if (pairingtoken_ == &::google::protobuf::internal::kEmptyString) { pairingtoken_ = new ::std::string; } pairingtoken_->assign(value); } inline void LoginRequestType::set_pairingtoken(const char* value, size_t size) { set_has_pairingtoken(); if (pairingtoken_ == &::google::protobuf::internal::kEmptyString) { pairingtoken_ = new ::std::string; } pairingtoken_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* LoginRequestType::mutable_pairingtoken() { set_has_pairingtoken(); if (pairingtoken_ == &::google::protobuf::internal::kEmptyString) { pairingtoken_ = new ::std::string; } return pairingtoken_; } inline ::std::string* LoginRequestType::release_pairingtoken() { clear_has_pairingtoken(); if (pairingtoken_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = pairingtoken_; pairingtoken_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional bool ACEulaAgreed = 10; inline bool LoginRequestType::has_aceulaagreed() const { return (_has_bits_[0] & 0x00000040u) != 0; } inline void LoginRequestType::set_has_aceulaagreed() { _has_bits_[0] |= 0x00000040u; } inline void LoginRequestType::clear_has_aceulaagreed() { _has_bits_[0] &= ~0x00000040u; } inline void LoginRequestType::clear_aceulaagreed() { aceulaagreed_ = false; clear_has_aceulaagreed(); } inline bool LoginRequestType::aceulaagreed() const { return aceulaagreed_; } inline void LoginRequestType::set_aceulaagreed(bool value) { set_has_aceulaagreed(); aceulaagreed_ = value; } // ------------------------------------------------------------------- // LoginResponseType // required .vplex.ias.AbstractResponseType _inherited = 1; inline bool LoginResponseType::has__inherited() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void LoginResponseType::set_has__inherited() { _has_bits_[0] |= 0x00000001u; } inline void LoginResponseType::clear_has__inherited() { _has_bits_[0] &= ~0x00000001u; } inline void LoginResponseType::clear__inherited() { if (_inherited_ != NULL) _inherited_->::vplex::ias::AbstractResponseType::Clear(); clear_has__inherited(); } inline const ::vplex::ias::AbstractResponseType& LoginResponseType::_inherited() const { return _inherited_ != NULL ? *_inherited_ : *default_instance_->_inherited_; } inline ::vplex::ias::AbstractResponseType* LoginResponseType::mutable__inherited() { set_has__inherited(); if (_inherited_ == NULL) _inherited_ = new ::vplex::ias::AbstractResponseType; return _inherited_; } inline ::vplex::ias::AbstractResponseType* LoginResponseType::release__inherited() { clear_has__inherited(); ::vplex::ias::AbstractResponseType* temp = _inherited_; _inherited_ = NULL; return temp; } // required fixed64 SessionHandle = 2; inline bool LoginResponseType::has_sessionhandle() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void LoginResponseType::set_has_sessionhandle() { _has_bits_[0] |= 0x00000002u; } inline void LoginResponseType::clear_has_sessionhandle() { _has_bits_[0] &= ~0x00000002u; } inline void LoginResponseType::clear_sessionhandle() { sessionhandle_ = GOOGLE_ULONGLONG(0); clear_has_sessionhandle(); } inline ::google::protobuf::uint64 LoginResponseType::sessionhandle() const { return sessionhandle_; } inline void LoginResponseType::set_sessionhandle(::google::protobuf::uint64 value) { set_has_sessionhandle(); sessionhandle_ = value; } // required bytes SessionSecret = 3; inline bool LoginResponseType::has_sessionsecret() const { return (_has_bits_[0] & 0x00000004u) != 0; } inline void LoginResponseType::set_has_sessionsecret() { _has_bits_[0] |= 0x00000004u; } inline void LoginResponseType::clear_has_sessionsecret() { _has_bits_[0] &= ~0x00000004u; } inline void LoginResponseType::clear_sessionsecret() { if (sessionsecret_ != &::google::protobuf::internal::kEmptyString) { sessionsecret_->clear(); } clear_has_sessionsecret(); } inline const ::std::string& LoginResponseType::sessionsecret() const { return *sessionsecret_; } inline void LoginResponseType::set_sessionsecret(const ::std::string& value) { set_has_sessionsecret(); if (sessionsecret_ == &::google::protobuf::internal::kEmptyString) { sessionsecret_ = new ::std::string; } sessionsecret_->assign(value); } inline void LoginResponseType::set_sessionsecret(const char* value) { set_has_sessionsecret(); if (sessionsecret_ == &::google::protobuf::internal::kEmptyString) { sessionsecret_ = new ::std::string; } sessionsecret_->assign(value); } inline void LoginResponseType::set_sessionsecret(const void* value, size_t size) { set_has_sessionsecret(); if (sessionsecret_ == &::google::protobuf::internal::kEmptyString) { sessionsecret_ = new ::std::string; } sessionsecret_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* LoginResponseType::mutable_sessionsecret() { set_has_sessionsecret(); if (sessionsecret_ == &::google::protobuf::internal::kEmptyString) { sessionsecret_ = new ::std::string; } return sessionsecret_; } inline ::std::string* LoginResponseType::release_sessionsecret() { clear_has_sessionsecret(); if (sessionsecret_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = sessionsecret_; sessionsecret_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional string AccountId = 4; inline bool LoginResponseType::has_accountid() const { return (_has_bits_[0] & 0x00000008u) != 0; } inline void LoginResponseType::set_has_accountid() { _has_bits_[0] |= 0x00000008u; } inline void LoginResponseType::clear_has_accountid() { _has_bits_[0] &= ~0x00000008u; } inline void LoginResponseType::clear_accountid() { if (accountid_ != &::google::protobuf::internal::kEmptyString) { accountid_->clear(); } clear_has_accountid(); } inline const ::std::string& LoginResponseType::accountid() const { return *accountid_; } inline void LoginResponseType::set_accountid(const ::std::string& value) { set_has_accountid(); if (accountid_ == &::google::protobuf::internal::kEmptyString) { accountid_ = new ::std::string; } accountid_->assign(value); } inline void LoginResponseType::set_accountid(const char* value) { set_has_accountid(); if (accountid_ == &::google::protobuf::internal::kEmptyString) { accountid_ = new ::std::string; } accountid_->assign(value); } inline void LoginResponseType::set_accountid(const char* value, size_t size) { set_has_accountid(); if (accountid_ == &::google::protobuf::internal::kEmptyString) { accountid_ = new ::std::string; } accountid_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* LoginResponseType::mutable_accountid() { set_has_accountid(); if (accountid_ == &::google::protobuf::internal::kEmptyString) { accountid_ = new ::std::string; } return accountid_; } inline ::std::string* LoginResponseType::release_accountid() { clear_has_accountid(); if (accountid_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = accountid_; accountid_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // required fixed64 UserId = 5; inline bool LoginResponseType::has_userid() const { return (_has_bits_[0] & 0x00000010u) != 0; } inline void LoginResponseType::set_has_userid() { _has_bits_[0] |= 0x00000010u; } inline void LoginResponseType::clear_has_userid() { _has_bits_[0] &= ~0x00000010u; } inline void LoginResponseType::clear_userid() { userid_ = GOOGLE_ULONGLONG(0); clear_has_userid(); } inline ::google::protobuf::uint64 LoginResponseType::userid() const { return userid_; } inline void LoginResponseType::set_userid(::google::protobuf::uint64 value) { set_has_userid(); userid_ = value; } // optional string DisplayName = 6; inline bool LoginResponseType::has_displayname() const { return (_has_bits_[0] & 0x00000020u) != 0; } inline void LoginResponseType::set_has_displayname() { _has_bits_[0] |= 0x00000020u; } inline void LoginResponseType::clear_has_displayname() { _has_bits_[0] &= ~0x00000020u; } inline void LoginResponseType::clear_displayname() { if (displayname_ != &::google::protobuf::internal::kEmptyString) { displayname_->clear(); } clear_has_displayname(); } inline const ::std::string& LoginResponseType::displayname() const { return *displayname_; } inline void LoginResponseType::set_displayname(const ::std::string& value) { set_has_displayname(); if (displayname_ == &::google::protobuf::internal::kEmptyString) { displayname_ = new ::std::string; } displayname_->assign(value); } inline void LoginResponseType::set_displayname(const char* value) { set_has_displayname(); if (displayname_ == &::google::protobuf::internal::kEmptyString) { displayname_ = new ::std::string; } displayname_->assign(value); } inline void LoginResponseType::set_displayname(const char* value, size_t size) { set_has_displayname(); if (displayname_ == &::google::protobuf::internal::kEmptyString) { displayname_ = new ::std::string; } displayname_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* LoginResponseType::mutable_displayname() { set_has_displayname(); if (displayname_ == &::google::protobuf::internal::kEmptyString) { displayname_ = new ::std::string; } return displayname_; } inline ::std::string* LoginResponseType::release_displayname() { clear_has_displayname(); if (displayname_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = displayname_; displayname_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional string WeakToken = 7; inline bool LoginResponseType::has_weaktoken() const { return (_has_bits_[0] & 0x00000040u) != 0; } inline void LoginResponseType::set_has_weaktoken() { _has_bits_[0] |= 0x00000040u; } inline void LoginResponseType::clear_has_weaktoken() { _has_bits_[0] &= ~0x00000040u; } inline void LoginResponseType::clear_weaktoken() { if (weaktoken_ != &::google::protobuf::internal::kEmptyString) { weaktoken_->clear(); } clear_has_weaktoken(); } inline const ::std::string& LoginResponseType::weaktoken() const { return *weaktoken_; } inline void LoginResponseType::set_weaktoken(const ::std::string& value) { set_has_weaktoken(); if (weaktoken_ == &::google::protobuf::internal::kEmptyString) { weaktoken_ = new ::std::string; } weaktoken_->assign(value); } inline void LoginResponseType::set_weaktoken(const char* value) { set_has_weaktoken(); if (weaktoken_ == &::google::protobuf::internal::kEmptyString) { weaktoken_ = new ::std::string; } weaktoken_->assign(value); } inline void LoginResponseType::set_weaktoken(const char* value, size_t size) { set_has_weaktoken(); if (weaktoken_ == &::google::protobuf::internal::kEmptyString) { weaktoken_ = new ::std::string; } weaktoken_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* LoginResponseType::mutable_weaktoken() { set_has_weaktoken(); if (weaktoken_ == &::google::protobuf::internal::kEmptyString) { weaktoken_ = new ::std::string; } return weaktoken_; } inline ::std::string* LoginResponseType::release_weaktoken() { clear_has_weaktoken(); if (weaktoken_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = weaktoken_; weaktoken_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional fixed64 OldFgSessionHandle = 8; inline bool LoginResponseType::has_oldfgsessionhandle() const { return (_has_bits_[0] & 0x00000080u) != 0; } inline void LoginResponseType::set_has_oldfgsessionhandle() { _has_bits_[0] |= 0x00000080u; } inline void LoginResponseType::clear_has_oldfgsessionhandle() { _has_bits_[0] &= ~0x00000080u; } inline void LoginResponseType::clear_oldfgsessionhandle() { oldfgsessionhandle_ = GOOGLE_ULONGLONG(0); clear_has_oldfgsessionhandle(); } inline ::google::protobuf::uint64 LoginResponseType::oldfgsessionhandle() const { return oldfgsessionhandle_; } inline void LoginResponseType::set_oldfgsessionhandle(::google::protobuf::uint64 value) { set_has_oldfgsessionhandle(); oldfgsessionhandle_ = value; } // optional string StorageRegion = 9; inline bool LoginResponseType::has_storageregion() const { return (_has_bits_[0] & 0x00000100u) != 0; } inline void LoginResponseType::set_has_storageregion() { _has_bits_[0] |= 0x00000100u; } inline void LoginResponseType::clear_has_storageregion() { _has_bits_[0] &= ~0x00000100u; } inline void LoginResponseType::clear_storageregion() { if (storageregion_ != &::google::protobuf::internal::kEmptyString) { storageregion_->clear(); } clear_has_storageregion(); } inline const ::std::string& LoginResponseType::storageregion() const { return *storageregion_; } inline void LoginResponseType::set_storageregion(const ::std::string& value) { set_has_storageregion(); if (storageregion_ == &::google::protobuf::internal::kEmptyString) { storageregion_ = new ::std::string; } storageregion_->assign(value); } inline void LoginResponseType::set_storageregion(const char* value) { set_has_storageregion(); if (storageregion_ == &::google::protobuf::internal::kEmptyString) { storageregion_ = new ::std::string; } storageregion_->assign(value); } inline void LoginResponseType::set_storageregion(const char* value, size_t size) { set_has_storageregion(); if (storageregion_ == &::google::protobuf::internal::kEmptyString) { storageregion_ = new ::std::string; } storageregion_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* LoginResponseType::mutable_storageregion() { set_has_storageregion(); if (storageregion_ == &::google::protobuf::internal::kEmptyString) { storageregion_ = new ::std::string; } return storageregion_; } inline ::std::string* LoginResponseType::release_storageregion() { clear_has_storageregion(); if (storageregion_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = storageregion_; storageregion_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional int64 StorageClusterId = 10; inline bool LoginResponseType::has_storageclusterid() const { return (_has_bits_[0] & 0x00000200u) != 0; } inline void LoginResponseType::set_has_storageclusterid() { _has_bits_[0] |= 0x00000200u; } inline void LoginResponseType::clear_has_storageclusterid() { _has_bits_[0] &= ~0x00000200u; } inline void LoginResponseType::clear_storageclusterid() { storageclusterid_ = GOOGLE_LONGLONG(0); clear_has_storageclusterid(); } inline ::google::protobuf::int64 LoginResponseType::storageclusterid() const { return storageclusterid_; } inline void LoginResponseType::set_storageclusterid(::google::protobuf::int64 value) { set_has_storageclusterid(); storageclusterid_ = value; } // optional string persistentCredentials = 11; inline bool LoginResponseType::has_persistentcredentials() const { return (_has_bits_[0] & 0x00000400u) != 0; } inline void LoginResponseType::set_has_persistentcredentials() { _has_bits_[0] |= 0x00000400u; } inline void LoginResponseType::clear_has_persistentcredentials() { _has_bits_[0] &= ~0x00000400u; } inline void LoginResponseType::clear_persistentcredentials() { if (persistentcredentials_ != &::google::protobuf::internal::kEmptyString) { persistentcredentials_->clear(); } clear_has_persistentcredentials(); } inline const ::std::string& LoginResponseType::persistentcredentials() const { return *persistentcredentials_; } inline void LoginResponseType::set_persistentcredentials(const ::std::string& value) { set_has_persistentcredentials(); if (persistentcredentials_ == &::google::protobuf::internal::kEmptyString) { persistentcredentials_ = new ::std::string; } persistentcredentials_->assign(value); } inline void LoginResponseType::set_persistentcredentials(const char* value) { set_has_persistentcredentials(); if (persistentcredentials_ == &::google::protobuf::internal::kEmptyString) { persistentcredentials_ = new ::std::string; } persistentcredentials_->assign(value); } inline void LoginResponseType::set_persistentcredentials(const char* value, size_t size) { set_has_persistentcredentials(); if (persistentcredentials_ == &::google::protobuf::internal::kEmptyString) { persistentcredentials_ = new ::std::string; } persistentcredentials_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* LoginResponseType::mutable_persistentcredentials() { set_has_persistentcredentials(); if (persistentcredentials_ == &::google::protobuf::internal::kEmptyString) { persistentcredentials_ = new ::std::string; } return persistentcredentials_; } inline ::std::string* LoginResponseType::release_persistentcredentials() { clear_has_persistentcredentials(); if (persistentcredentials_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = persistentcredentials_; persistentcredentials_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // ------------------------------------------------------------------- // LogoutRequestType // required .vplex.ias.AbstractRequestType _inherited = 1; inline bool LogoutRequestType::has__inherited() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void LogoutRequestType::set_has__inherited() { _has_bits_[0] |= 0x00000001u; } inline void LogoutRequestType::clear_has__inherited() { _has_bits_[0] &= ~0x00000001u; } inline void LogoutRequestType::clear__inherited() { if (_inherited_ != NULL) _inherited_->::vplex::ias::AbstractRequestType::Clear(); clear_has__inherited(); } inline const ::vplex::ias::AbstractRequestType& LogoutRequestType::_inherited() const { return _inherited_ != NULL ? *_inherited_ : *default_instance_->_inherited_; } inline ::vplex::ias::AbstractRequestType* LogoutRequestType::mutable__inherited() { set_has__inherited(); if (_inherited_ == NULL) _inherited_ = new ::vplex::ias::AbstractRequestType; return _inherited_; } inline ::vplex::ias::AbstractRequestType* LogoutRequestType::release__inherited() { clear_has__inherited(); ::vplex::ias::AbstractRequestType* temp = _inherited_; _inherited_ = NULL; return temp; } // ------------------------------------------------------------------- // LogoutResponseType // required .vplex.ias.AbstractResponseType _inherited = 1; inline bool LogoutResponseType::has__inherited() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void LogoutResponseType::set_has__inherited() { _has_bits_[0] |= 0x00000001u; } inline void LogoutResponseType::clear_has__inherited() { _has_bits_[0] &= ~0x00000001u; } inline void LogoutResponseType::clear__inherited() { if (_inherited_ != NULL) _inherited_->::vplex::ias::AbstractResponseType::Clear(); clear_has__inherited(); } inline const ::vplex::ias::AbstractResponseType& LogoutResponseType::_inherited() const { return _inherited_ != NULL ? *_inherited_ : *default_instance_->_inherited_; } inline ::vplex::ias::AbstractResponseType* LogoutResponseType::mutable__inherited() { set_has__inherited(); if (_inherited_ == NULL) _inherited_ = new ::vplex::ias::AbstractResponseType; return _inherited_; } inline ::vplex::ias::AbstractResponseType* LogoutResponseType::release__inherited() { clear_has__inherited(); ::vplex::ias::AbstractResponseType* temp = _inherited_; _inherited_ = NULL; return temp; } // ------------------------------------------------------------------- // RegisterVirtualDeviceRequestType // required .vplex.ias.AbstractRequestType _inherited = 1; inline bool RegisterVirtualDeviceRequestType::has__inherited() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void RegisterVirtualDeviceRequestType::set_has__inherited() { _has_bits_[0] |= 0x00000001u; } inline void RegisterVirtualDeviceRequestType::clear_has__inherited() { _has_bits_[0] &= ~0x00000001u; } inline void RegisterVirtualDeviceRequestType::clear__inherited() { if (_inherited_ != NULL) _inherited_->::vplex::ias::AbstractRequestType::Clear(); clear_has__inherited(); } inline const ::vplex::ias::AbstractRequestType& RegisterVirtualDeviceRequestType::_inherited() const { return _inherited_ != NULL ? *_inherited_ : *default_instance_->_inherited_; } inline ::vplex::ias::AbstractRequestType* RegisterVirtualDeviceRequestType::mutable__inherited() { set_has__inherited(); if (_inherited_ == NULL) _inherited_ = new ::vplex::ias::AbstractRequestType; return _inherited_; } inline ::vplex::ias::AbstractRequestType* RegisterVirtualDeviceRequestType::release__inherited() { clear_has__inherited(); ::vplex::ias::AbstractRequestType* temp = _inherited_; _inherited_ = NULL; return temp; } // required string Username = 2; inline bool RegisterVirtualDeviceRequestType::has_username() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void RegisterVirtualDeviceRequestType::set_has_username() { _has_bits_[0] |= 0x00000002u; } inline void RegisterVirtualDeviceRequestType::clear_has_username() { _has_bits_[0] &= ~0x00000002u; } inline void RegisterVirtualDeviceRequestType::clear_username() { if (username_ != &::google::protobuf::internal::kEmptyString) { username_->clear(); } clear_has_username(); } inline const ::std::string& RegisterVirtualDeviceRequestType::username() const { return *username_; } inline void RegisterVirtualDeviceRequestType::set_username(const ::std::string& value) { set_has_username(); if (username_ == &::google::protobuf::internal::kEmptyString) { username_ = new ::std::string; } username_->assign(value); } inline void RegisterVirtualDeviceRequestType::set_username(const char* value) { set_has_username(); if (username_ == &::google::protobuf::internal::kEmptyString) { username_ = new ::std::string; } username_->assign(value); } inline void RegisterVirtualDeviceRequestType::set_username(const char* value, size_t size) { set_has_username(); if (username_ == &::google::protobuf::internal::kEmptyString) { username_ = new ::std::string; } username_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* RegisterVirtualDeviceRequestType::mutable_username() { set_has_username(); if (username_ == &::google::protobuf::internal::kEmptyString) { username_ = new ::std::string; } return username_; } inline ::std::string* RegisterVirtualDeviceRequestType::release_username() { clear_has_username(); if (username_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = username_; username_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional string Password = 3; inline bool RegisterVirtualDeviceRequestType::has_password() const { return (_has_bits_[0] & 0x00000004u) != 0; } inline void RegisterVirtualDeviceRequestType::set_has_password() { _has_bits_[0] |= 0x00000004u; } inline void RegisterVirtualDeviceRequestType::clear_has_password() { _has_bits_[0] &= ~0x00000004u; } inline void RegisterVirtualDeviceRequestType::clear_password() { if (password_ != &::google::protobuf::internal::kEmptyString) { password_->clear(); } clear_has_password(); } inline const ::std::string& RegisterVirtualDeviceRequestType::password() const { return *password_; } inline void RegisterVirtualDeviceRequestType::set_password(const ::std::string& value) { set_has_password(); if (password_ == &::google::protobuf::internal::kEmptyString) { password_ = new ::std::string; } password_->assign(value); } inline void RegisterVirtualDeviceRequestType::set_password(const char* value) { set_has_password(); if (password_ == &::google::protobuf::internal::kEmptyString) { password_ = new ::std::string; } password_->assign(value); } inline void RegisterVirtualDeviceRequestType::set_password(const char* value, size_t size) { set_has_password(); if (password_ == &::google::protobuf::internal::kEmptyString) { password_ = new ::std::string; } password_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* RegisterVirtualDeviceRequestType::mutable_password() { set_has_password(); if (password_ == &::google::protobuf::internal::kEmptyString) { password_ = new ::std::string; } return password_; } inline ::std::string* RegisterVirtualDeviceRequestType::release_password() { clear_has_password(); if (password_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = password_; password_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // required bytes HardwareInfo = 4; inline bool RegisterVirtualDeviceRequestType::has_hardwareinfo() const { return (_has_bits_[0] & 0x00000008u) != 0; } inline void RegisterVirtualDeviceRequestType::set_has_hardwareinfo() { _has_bits_[0] |= 0x00000008u; } inline void RegisterVirtualDeviceRequestType::clear_has_hardwareinfo() { _has_bits_[0] &= ~0x00000008u; } inline void RegisterVirtualDeviceRequestType::clear_hardwareinfo() { if (hardwareinfo_ != &::google::protobuf::internal::kEmptyString) { hardwareinfo_->clear(); } clear_has_hardwareinfo(); } inline const ::std::string& RegisterVirtualDeviceRequestType::hardwareinfo() const { return *hardwareinfo_; } inline void RegisterVirtualDeviceRequestType::set_hardwareinfo(const ::std::string& value) { set_has_hardwareinfo(); if (hardwareinfo_ == &::google::protobuf::internal::kEmptyString) { hardwareinfo_ = new ::std::string; } hardwareinfo_->assign(value); } inline void RegisterVirtualDeviceRequestType::set_hardwareinfo(const char* value) { set_has_hardwareinfo(); if (hardwareinfo_ == &::google::protobuf::internal::kEmptyString) { hardwareinfo_ = new ::std::string; } hardwareinfo_->assign(value); } inline void RegisterVirtualDeviceRequestType::set_hardwareinfo(const void* value, size_t size) { set_has_hardwareinfo(); if (hardwareinfo_ == &::google::protobuf::internal::kEmptyString) { hardwareinfo_ = new ::std::string; } hardwareinfo_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* RegisterVirtualDeviceRequestType::mutable_hardwareinfo() { set_has_hardwareinfo(); if (hardwareinfo_ == &::google::protobuf::internal::kEmptyString) { hardwareinfo_ = new ::std::string; } return hardwareinfo_; } inline ::std::string* RegisterVirtualDeviceRequestType::release_hardwareinfo() { clear_has_hardwareinfo(); if (hardwareinfo_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = hardwareinfo_; hardwareinfo_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // required string DeviceName = 5; inline bool RegisterVirtualDeviceRequestType::has_devicename() const { return (_has_bits_[0] & 0x00000010u) != 0; } inline void RegisterVirtualDeviceRequestType::set_has_devicename() { _has_bits_[0] |= 0x00000010u; } inline void RegisterVirtualDeviceRequestType::clear_has_devicename() { _has_bits_[0] &= ~0x00000010u; } inline void RegisterVirtualDeviceRequestType::clear_devicename() { if (devicename_ != &::google::protobuf::internal::kEmptyString) { devicename_->clear(); } clear_has_devicename(); } inline const ::std::string& RegisterVirtualDeviceRequestType::devicename() const { return *devicename_; } inline void RegisterVirtualDeviceRequestType::set_devicename(const ::std::string& value) { set_has_devicename(); if (devicename_ == &::google::protobuf::internal::kEmptyString) { devicename_ = new ::std::string; } devicename_->assign(value); } inline void RegisterVirtualDeviceRequestType::set_devicename(const char* value) { set_has_devicename(); if (devicename_ == &::google::protobuf::internal::kEmptyString) { devicename_ = new ::std::string; } devicename_->assign(value); } inline void RegisterVirtualDeviceRequestType::set_devicename(const char* value, size_t size) { set_has_devicename(); if (devicename_ == &::google::protobuf::internal::kEmptyString) { devicename_ = new ::std::string; } devicename_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* RegisterVirtualDeviceRequestType::mutable_devicename() { set_has_devicename(); if (devicename_ == &::google::protobuf::internal::kEmptyString) { devicename_ = new ::std::string; } return devicename_; } inline ::std::string* RegisterVirtualDeviceRequestType::release_devicename() { clear_has_devicename(); if (devicename_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = devicename_; devicename_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional string Namespace = 6; inline bool RegisterVirtualDeviceRequestType::has_namespace_() const { return (_has_bits_[0] & 0x00000020u) != 0; } inline void RegisterVirtualDeviceRequestType::set_has_namespace_() { _has_bits_[0] |= 0x00000020u; } inline void RegisterVirtualDeviceRequestType::clear_has_namespace_() { _has_bits_[0] &= ~0x00000020u; } inline void RegisterVirtualDeviceRequestType::clear_namespace_() { if (namespace__ != &::google::protobuf::internal::kEmptyString) { namespace__->clear(); } clear_has_namespace_(); } inline const ::std::string& RegisterVirtualDeviceRequestType::namespace_() const { return *namespace__; } inline void RegisterVirtualDeviceRequestType::set_namespace_(const ::std::string& value) { set_has_namespace_(); if (namespace__ == &::google::protobuf::internal::kEmptyString) { namespace__ = new ::std::string; } namespace__->assign(value); } inline void RegisterVirtualDeviceRequestType::set_namespace_(const char* value) { set_has_namespace_(); if (namespace__ == &::google::protobuf::internal::kEmptyString) { namespace__ = new ::std::string; } namespace__->assign(value); } inline void RegisterVirtualDeviceRequestType::set_namespace_(const char* value, size_t size) { set_has_namespace_(); if (namespace__ == &::google::protobuf::internal::kEmptyString) { namespace__ = new ::std::string; } namespace__->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* RegisterVirtualDeviceRequestType::mutable_namespace_() { set_has_namespace_(); if (namespace__ == &::google::protobuf::internal::kEmptyString) { namespace__ = new ::std::string; } return namespace__; } inline ::std::string* RegisterVirtualDeviceRequestType::release_namespace_() { clear_has_namespace_(); if (namespace__ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = namespace__; namespace__ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional string WeakToken = 7; inline bool RegisterVirtualDeviceRequestType::has_weaktoken() const { return (_has_bits_[0] & 0x00000040u) != 0; } inline void RegisterVirtualDeviceRequestType::set_has_weaktoken() { _has_bits_[0] |= 0x00000040u; } inline void RegisterVirtualDeviceRequestType::clear_has_weaktoken() { _has_bits_[0] &= ~0x00000040u; } inline void RegisterVirtualDeviceRequestType::clear_weaktoken() { if (weaktoken_ != &::google::protobuf::internal::kEmptyString) { weaktoken_->clear(); } clear_has_weaktoken(); } inline const ::std::string& RegisterVirtualDeviceRequestType::weaktoken() const { return *weaktoken_; } inline void RegisterVirtualDeviceRequestType::set_weaktoken(const ::std::string& value) { set_has_weaktoken(); if (weaktoken_ == &::google::protobuf::internal::kEmptyString) { weaktoken_ = new ::std::string; } weaktoken_->assign(value); } inline void RegisterVirtualDeviceRequestType::set_weaktoken(const char* value) { set_has_weaktoken(); if (weaktoken_ == &::google::protobuf::internal::kEmptyString) { weaktoken_ = new ::std::string; } weaktoken_->assign(value); } inline void RegisterVirtualDeviceRequestType::set_weaktoken(const char* value, size_t size) { set_has_weaktoken(); if (weaktoken_ == &::google::protobuf::internal::kEmptyString) { weaktoken_ = new ::std::string; } weaktoken_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* RegisterVirtualDeviceRequestType::mutable_weaktoken() { set_has_weaktoken(); if (weaktoken_ == &::google::protobuf::internal::kEmptyString) { weaktoken_ = new ::std::string; } return weaktoken_; } inline ::std::string* RegisterVirtualDeviceRequestType::release_weaktoken() { clear_has_weaktoken(); if (weaktoken_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = weaktoken_; weaktoken_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional string PairingToken = 8; inline bool RegisterVirtualDeviceRequestType::has_pairingtoken() const { return (_has_bits_[0] & 0x00000080u) != 0; } inline void RegisterVirtualDeviceRequestType::set_has_pairingtoken() { _has_bits_[0] |= 0x00000080u; } inline void RegisterVirtualDeviceRequestType::clear_has_pairingtoken() { _has_bits_[0] &= ~0x00000080u; } inline void RegisterVirtualDeviceRequestType::clear_pairingtoken() { if (pairingtoken_ != &::google::protobuf::internal::kEmptyString) { pairingtoken_->clear(); } clear_has_pairingtoken(); } inline const ::std::string& RegisterVirtualDeviceRequestType::pairingtoken() const { return *pairingtoken_; } inline void RegisterVirtualDeviceRequestType::set_pairingtoken(const ::std::string& value) { set_has_pairingtoken(); if (pairingtoken_ == &::google::protobuf::internal::kEmptyString) { pairingtoken_ = new ::std::string; } pairingtoken_->assign(value); } inline void RegisterVirtualDeviceRequestType::set_pairingtoken(const char* value) { set_has_pairingtoken(); if (pairingtoken_ == &::google::protobuf::internal::kEmptyString) { pairingtoken_ = new ::std::string; } pairingtoken_->assign(value); } inline void RegisterVirtualDeviceRequestType::set_pairingtoken(const char* value, size_t size) { set_has_pairingtoken(); if (pairingtoken_ == &::google::protobuf::internal::kEmptyString) { pairingtoken_ = new ::std::string; } pairingtoken_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* RegisterVirtualDeviceRequestType::mutable_pairingtoken() { set_has_pairingtoken(); if (pairingtoken_ == &::google::protobuf::internal::kEmptyString) { pairingtoken_ = new ::std::string; } return pairingtoken_; } inline ::std::string* RegisterVirtualDeviceRequestType::release_pairingtoken() { clear_has_pairingtoken(); if (pairingtoken_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = pairingtoken_; pairingtoken_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // ------------------------------------------------------------------- // RegisterVirtualDeviceResponseType // required .vplex.ias.AbstractResponseType _inherited = 1; inline bool RegisterVirtualDeviceResponseType::has__inherited() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void RegisterVirtualDeviceResponseType::set_has__inherited() { _has_bits_[0] |= 0x00000001u; } inline void RegisterVirtualDeviceResponseType::clear_has__inherited() { _has_bits_[0] &= ~0x00000001u; } inline void RegisterVirtualDeviceResponseType::clear__inherited() { if (_inherited_ != NULL) _inherited_->::vplex::ias::AbstractResponseType::Clear(); clear_has__inherited(); } inline const ::vplex::ias::AbstractResponseType& RegisterVirtualDeviceResponseType::_inherited() const { return _inherited_ != NULL ? *_inherited_ : *default_instance_->_inherited_; } inline ::vplex::ias::AbstractResponseType* RegisterVirtualDeviceResponseType::mutable__inherited() { set_has__inherited(); if (_inherited_ == NULL) _inherited_ = new ::vplex::ias::AbstractResponseType; return _inherited_; } inline ::vplex::ias::AbstractResponseType* RegisterVirtualDeviceResponseType::release__inherited() { clear_has__inherited(); ::vplex::ias::AbstractResponseType* temp = _inherited_; _inherited_ = NULL; return temp; } // optional bytes RenewalToken = 2; inline bool RegisterVirtualDeviceResponseType::has_renewaltoken() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void RegisterVirtualDeviceResponseType::set_has_renewaltoken() { _has_bits_[0] |= 0x00000002u; } inline void RegisterVirtualDeviceResponseType::clear_has_renewaltoken() { _has_bits_[0] &= ~0x00000002u; } inline void RegisterVirtualDeviceResponseType::clear_renewaltoken() { if (renewaltoken_ != &::google::protobuf::internal::kEmptyString) { renewaltoken_->clear(); } clear_has_renewaltoken(); } inline const ::std::string& RegisterVirtualDeviceResponseType::renewaltoken() const { return *renewaltoken_; } inline void RegisterVirtualDeviceResponseType::set_renewaltoken(const ::std::string& value) { set_has_renewaltoken(); if (renewaltoken_ == &::google::protobuf::internal::kEmptyString) { renewaltoken_ = new ::std::string; } renewaltoken_->assign(value); } inline void RegisterVirtualDeviceResponseType::set_renewaltoken(const char* value) { set_has_renewaltoken(); if (renewaltoken_ == &::google::protobuf::internal::kEmptyString) { renewaltoken_ = new ::std::string; } renewaltoken_->assign(value); } inline void RegisterVirtualDeviceResponseType::set_renewaltoken(const void* value, size_t size) { set_has_renewaltoken(); if (renewaltoken_ == &::google::protobuf::internal::kEmptyString) { renewaltoken_ = new ::std::string; } renewaltoken_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* RegisterVirtualDeviceResponseType::mutable_renewaltoken() { set_has_renewaltoken(); if (renewaltoken_ == &::google::protobuf::internal::kEmptyString) { renewaltoken_ = new ::std::string; } return renewaltoken_; } inline ::std::string* RegisterVirtualDeviceResponseType::release_renewaltoken() { clear_has_renewaltoken(); if (renewaltoken_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = renewaltoken_; renewaltoken_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // ------------------------------------------------------------------- // RenewVirtualDeviceCredentialsRequestType // required .vplex.ias.AbstractRequestType _inherited = 1; inline bool RenewVirtualDeviceCredentialsRequestType::has__inherited() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void RenewVirtualDeviceCredentialsRequestType::set_has__inherited() { _has_bits_[0] |= 0x00000001u; } inline void RenewVirtualDeviceCredentialsRequestType::clear_has__inherited() { _has_bits_[0] &= ~0x00000001u; } inline void RenewVirtualDeviceCredentialsRequestType::clear__inherited() { if (_inherited_ != NULL) _inherited_->::vplex::ias::AbstractRequestType::Clear(); clear_has__inherited(); } inline const ::vplex::ias::AbstractRequestType& RenewVirtualDeviceCredentialsRequestType::_inherited() const { return _inherited_ != NULL ? *_inherited_ : *default_instance_->_inherited_; } inline ::vplex::ias::AbstractRequestType* RenewVirtualDeviceCredentialsRequestType::mutable__inherited() { set_has__inherited(); if (_inherited_ == NULL) _inherited_ = new ::vplex::ias::AbstractRequestType; return _inherited_; } inline ::vplex::ias::AbstractRequestType* RenewVirtualDeviceCredentialsRequestType::release__inherited() { clear_has__inherited(); ::vplex::ias::AbstractRequestType* temp = _inherited_; _inherited_ = NULL; return temp; } // required fixed64 SerialNumber = 2; inline bool RenewVirtualDeviceCredentialsRequestType::has_serialnumber() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void RenewVirtualDeviceCredentialsRequestType::set_has_serialnumber() { _has_bits_[0] |= 0x00000002u; } inline void RenewVirtualDeviceCredentialsRequestType::clear_has_serialnumber() { _has_bits_[0] &= ~0x00000002u; } inline void RenewVirtualDeviceCredentialsRequestType::clear_serialnumber() { serialnumber_ = GOOGLE_ULONGLONG(0); clear_has_serialnumber(); } inline ::google::protobuf::uint64 RenewVirtualDeviceCredentialsRequestType::serialnumber() const { return serialnumber_; } inline void RenewVirtualDeviceCredentialsRequestType::set_serialnumber(::google::protobuf::uint64 value) { set_has_serialnumber(); serialnumber_ = value; } // required fixed64 IssueDate = 3; inline bool RenewVirtualDeviceCredentialsRequestType::has_issuedate() const { return (_has_bits_[0] & 0x00000004u) != 0; } inline void RenewVirtualDeviceCredentialsRequestType::set_has_issuedate() { _has_bits_[0] |= 0x00000004u; } inline void RenewVirtualDeviceCredentialsRequestType::clear_has_issuedate() { _has_bits_[0] &= ~0x00000004u; } inline void RenewVirtualDeviceCredentialsRequestType::clear_issuedate() { issuedate_ = GOOGLE_ULONGLONG(0); clear_has_issuedate(); } inline ::google::protobuf::uint64 RenewVirtualDeviceCredentialsRequestType::issuedate() const { return issuedate_; } inline void RenewVirtualDeviceCredentialsRequestType::set_issuedate(::google::protobuf::uint64 value) { set_has_issuedate(); issuedate_ = value; } // required bytes RenewalToken = 4; inline bool RenewVirtualDeviceCredentialsRequestType::has_renewaltoken() const { return (_has_bits_[0] & 0x00000008u) != 0; } inline void RenewVirtualDeviceCredentialsRequestType::set_has_renewaltoken() { _has_bits_[0] |= 0x00000008u; } inline void RenewVirtualDeviceCredentialsRequestType::clear_has_renewaltoken() { _has_bits_[0] &= ~0x00000008u; } inline void RenewVirtualDeviceCredentialsRequestType::clear_renewaltoken() { if (renewaltoken_ != &::google::protobuf::internal::kEmptyString) { renewaltoken_->clear(); } clear_has_renewaltoken(); } inline const ::std::string& RenewVirtualDeviceCredentialsRequestType::renewaltoken() const { return *renewaltoken_; } inline void RenewVirtualDeviceCredentialsRequestType::set_renewaltoken(const ::std::string& value) { set_has_renewaltoken(); if (renewaltoken_ == &::google::protobuf::internal::kEmptyString) { renewaltoken_ = new ::std::string; } renewaltoken_->assign(value); } inline void RenewVirtualDeviceCredentialsRequestType::set_renewaltoken(const char* value) { set_has_renewaltoken(); if (renewaltoken_ == &::google::protobuf::internal::kEmptyString) { renewaltoken_ = new ::std::string; } renewaltoken_->assign(value); } inline void RenewVirtualDeviceCredentialsRequestType::set_renewaltoken(const void* value, size_t size) { set_has_renewaltoken(); if (renewaltoken_ == &::google::protobuf::internal::kEmptyString) { renewaltoken_ = new ::std::string; } renewaltoken_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* RenewVirtualDeviceCredentialsRequestType::mutable_renewaltoken() { set_has_renewaltoken(); if (renewaltoken_ == &::google::protobuf::internal::kEmptyString) { renewaltoken_ = new ::std::string; } return renewaltoken_; } inline ::std::string* RenewVirtualDeviceCredentialsRequestType::release_renewaltoken() { clear_has_renewaltoken(); if (renewaltoken_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = renewaltoken_; renewaltoken_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // ------------------------------------------------------------------- // RenewVirtualDeviceCredentialsResponseType // required .vplex.ias.AbstractResponseType _inherited = 1; inline bool RenewVirtualDeviceCredentialsResponseType::has__inherited() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void RenewVirtualDeviceCredentialsResponseType::set_has__inherited() { _has_bits_[0] |= 0x00000001u; } inline void RenewVirtualDeviceCredentialsResponseType::clear_has__inherited() { _has_bits_[0] &= ~0x00000001u; } inline void RenewVirtualDeviceCredentialsResponseType::clear__inherited() { if (_inherited_ != NULL) _inherited_->::vplex::ias::AbstractResponseType::Clear(); clear_has__inherited(); } inline const ::vplex::ias::AbstractResponseType& RenewVirtualDeviceCredentialsResponseType::_inherited() const { return _inherited_ != NULL ? *_inherited_ : *default_instance_->_inherited_; } inline ::vplex::ias::AbstractResponseType* RenewVirtualDeviceCredentialsResponseType::mutable__inherited() { set_has__inherited(); if (_inherited_ == NULL) _inherited_ = new ::vplex::ias::AbstractResponseType; return _inherited_; } inline ::vplex::ias::AbstractResponseType* RenewVirtualDeviceCredentialsResponseType::release__inherited() { clear_has__inherited(); ::vplex::ias::AbstractResponseType* temp = _inherited_; _inherited_ = NULL; return temp; } // optional bytes SecretDeviceCredentials = 2; inline bool RenewVirtualDeviceCredentialsResponseType::has_secretdevicecredentials() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void RenewVirtualDeviceCredentialsResponseType::set_has_secretdevicecredentials() { _has_bits_[0] |= 0x00000002u; } inline void RenewVirtualDeviceCredentialsResponseType::clear_has_secretdevicecredentials() { _has_bits_[0] &= ~0x00000002u; } inline void RenewVirtualDeviceCredentialsResponseType::clear_secretdevicecredentials() { if (secretdevicecredentials_ != &::google::protobuf::internal::kEmptyString) { secretdevicecredentials_->clear(); } clear_has_secretdevicecredentials(); } inline const ::std::string& RenewVirtualDeviceCredentialsResponseType::secretdevicecredentials() const { return *secretdevicecredentials_; } inline void RenewVirtualDeviceCredentialsResponseType::set_secretdevicecredentials(const ::std::string& value) { set_has_secretdevicecredentials(); if (secretdevicecredentials_ == &::google::protobuf::internal::kEmptyString) { secretdevicecredentials_ = new ::std::string; } secretdevicecredentials_->assign(value); } inline void RenewVirtualDeviceCredentialsResponseType::set_secretdevicecredentials(const char* value) { set_has_secretdevicecredentials(); if (secretdevicecredentials_ == &::google::protobuf::internal::kEmptyString) { secretdevicecredentials_ = new ::std::string; } secretdevicecredentials_->assign(value); } inline void RenewVirtualDeviceCredentialsResponseType::set_secretdevicecredentials(const void* value, size_t size) { set_has_secretdevicecredentials(); if (secretdevicecredentials_ == &::google::protobuf::internal::kEmptyString) { secretdevicecredentials_ = new ::std::string; } secretdevicecredentials_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* RenewVirtualDeviceCredentialsResponseType::mutable_secretdevicecredentials() { set_has_secretdevicecredentials(); if (secretdevicecredentials_ == &::google::protobuf::internal::kEmptyString) { secretdevicecredentials_ = new ::std::string; } return secretdevicecredentials_; } inline ::std::string* RenewVirtualDeviceCredentialsResponseType::release_secretdevicecredentials() { clear_has_secretdevicecredentials(); if (secretdevicecredentials_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = secretdevicecredentials_; secretdevicecredentials_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional bytes ClearDeviceCredentials = 3; inline bool RenewVirtualDeviceCredentialsResponseType::has_cleardevicecredentials() const { return (_has_bits_[0] & 0x00000004u) != 0; } inline void RenewVirtualDeviceCredentialsResponseType::set_has_cleardevicecredentials() { _has_bits_[0] |= 0x00000004u; } inline void RenewVirtualDeviceCredentialsResponseType::clear_has_cleardevicecredentials() { _has_bits_[0] &= ~0x00000004u; } inline void RenewVirtualDeviceCredentialsResponseType::clear_cleardevicecredentials() { if (cleardevicecredentials_ != &::google::protobuf::internal::kEmptyString) { cleardevicecredentials_->clear(); } clear_has_cleardevicecredentials(); } inline const ::std::string& RenewVirtualDeviceCredentialsResponseType::cleardevicecredentials() const { return *cleardevicecredentials_; } inline void RenewVirtualDeviceCredentialsResponseType::set_cleardevicecredentials(const ::std::string& value) { set_has_cleardevicecredentials(); if (cleardevicecredentials_ == &::google::protobuf::internal::kEmptyString) { cleardevicecredentials_ = new ::std::string; } cleardevicecredentials_->assign(value); } inline void RenewVirtualDeviceCredentialsResponseType::set_cleardevicecredentials(const char* value) { set_has_cleardevicecredentials(); if (cleardevicecredentials_ == &::google::protobuf::internal::kEmptyString) { cleardevicecredentials_ = new ::std::string; } cleardevicecredentials_->assign(value); } inline void RenewVirtualDeviceCredentialsResponseType::set_cleardevicecredentials(const void* value, size_t size) { set_has_cleardevicecredentials(); if (cleardevicecredentials_ == &::google::protobuf::internal::kEmptyString) { cleardevicecredentials_ = new ::std::string; } cleardevicecredentials_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* RenewVirtualDeviceCredentialsResponseType::mutable_cleardevicecredentials() { set_has_cleardevicecredentials(); if (cleardevicecredentials_ == &::google::protobuf::internal::kEmptyString) { cleardevicecredentials_ = new ::std::string; } return cleardevicecredentials_; } inline ::std::string* RenewVirtualDeviceCredentialsResponseType::release_cleardevicecredentials() { clear_has_cleardevicecredentials(); if (cleardevicecredentials_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = cleardevicecredentials_; cleardevicecredentials_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional bytes RenewalToken = 4; inline bool RenewVirtualDeviceCredentialsResponseType::has_renewaltoken() const { return (_has_bits_[0] & 0x00000008u) != 0; } inline void RenewVirtualDeviceCredentialsResponseType::set_has_renewaltoken() { _has_bits_[0] |= 0x00000008u; } inline void RenewVirtualDeviceCredentialsResponseType::clear_has_renewaltoken() { _has_bits_[0] &= ~0x00000008u; } inline void RenewVirtualDeviceCredentialsResponseType::clear_renewaltoken() { if (renewaltoken_ != &::google::protobuf::internal::kEmptyString) { renewaltoken_->clear(); } clear_has_renewaltoken(); } inline const ::std::string& RenewVirtualDeviceCredentialsResponseType::renewaltoken() const { return *renewaltoken_; } inline void RenewVirtualDeviceCredentialsResponseType::set_renewaltoken(const ::std::string& value) { set_has_renewaltoken(); if (renewaltoken_ == &::google::protobuf::internal::kEmptyString) { renewaltoken_ = new ::std::string; } renewaltoken_->assign(value); } inline void RenewVirtualDeviceCredentialsResponseType::set_renewaltoken(const char* value) { set_has_renewaltoken(); if (renewaltoken_ == &::google::protobuf::internal::kEmptyString) { renewaltoken_ = new ::std::string; } renewaltoken_->assign(value); } inline void RenewVirtualDeviceCredentialsResponseType::set_renewaltoken(const void* value, size_t size) { set_has_renewaltoken(); if (renewaltoken_ == &::google::protobuf::internal::kEmptyString) { renewaltoken_ = new ::std::string; } renewaltoken_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* RenewVirtualDeviceCredentialsResponseType::mutable_renewaltoken() { set_has_renewaltoken(); if (renewaltoken_ == &::google::protobuf::internal::kEmptyString) { renewaltoken_ = new ::std::string; } return renewaltoken_; } inline ::std::string* RenewVirtualDeviceCredentialsResponseType::release_renewaltoken() { clear_has_renewaltoken(); if (renewaltoken_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = renewaltoken_; renewaltoken_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional bytes AttestProgram = 5; inline bool RenewVirtualDeviceCredentialsResponseType::has_attestprogram() const { return (_has_bits_[0] & 0x00000010u) != 0; } inline void RenewVirtualDeviceCredentialsResponseType::set_has_attestprogram() { _has_bits_[0] |= 0x00000010u; } inline void RenewVirtualDeviceCredentialsResponseType::clear_has_attestprogram() { _has_bits_[0] &= ~0x00000010u; } inline void RenewVirtualDeviceCredentialsResponseType::clear_attestprogram() { if (attestprogram_ != &::google::protobuf::internal::kEmptyString) { attestprogram_->clear(); } clear_has_attestprogram(); } inline const ::std::string& RenewVirtualDeviceCredentialsResponseType::attestprogram() const { return *attestprogram_; } inline void RenewVirtualDeviceCredentialsResponseType::set_attestprogram(const ::std::string& value) { set_has_attestprogram(); if (attestprogram_ == &::google::protobuf::internal::kEmptyString) { attestprogram_ = new ::std::string; } attestprogram_->assign(value); } inline void RenewVirtualDeviceCredentialsResponseType::set_attestprogram(const char* value) { set_has_attestprogram(); if (attestprogram_ == &::google::protobuf::internal::kEmptyString) { attestprogram_ = new ::std::string; } attestprogram_->assign(value); } inline void RenewVirtualDeviceCredentialsResponseType::set_attestprogram(const void* value, size_t size) { set_has_attestprogram(); if (attestprogram_ == &::google::protobuf::internal::kEmptyString) { attestprogram_ = new ::std::string; } attestprogram_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* RenewVirtualDeviceCredentialsResponseType::mutable_attestprogram() { set_has_attestprogram(); if (attestprogram_ == &::google::protobuf::internal::kEmptyString) { attestprogram_ = new ::std::string; } return attestprogram_; } inline ::std::string* RenewVirtualDeviceCredentialsResponseType::release_attestprogram() { clear_has_attestprogram(); if (attestprogram_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = attestprogram_; attestprogram_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // required fixed64 IssueDate = 6; inline bool RenewVirtualDeviceCredentialsResponseType::has_issuedate() const { return (_has_bits_[0] & 0x00000020u) != 0; } inline void RenewVirtualDeviceCredentialsResponseType::set_has_issuedate() { _has_bits_[0] |= 0x00000020u; } inline void RenewVirtualDeviceCredentialsResponseType::clear_has_issuedate() { _has_bits_[0] &= ~0x00000020u; } inline void RenewVirtualDeviceCredentialsResponseType::clear_issuedate() { issuedate_ = GOOGLE_ULONGLONG(0); clear_has_issuedate(); } inline ::google::protobuf::uint64 RenewVirtualDeviceCredentialsResponseType::issuedate() const { return issuedate_; } inline void RenewVirtualDeviceCredentialsResponseType::set_issuedate(::google::protobuf::uint64 value) { set_has_issuedate(); issuedate_ = value; } // required fixed64 SerialNumber = 7; inline bool RenewVirtualDeviceCredentialsResponseType::has_serialnumber() const { return (_has_bits_[0] & 0x00000040u) != 0; } inline void RenewVirtualDeviceCredentialsResponseType::set_has_serialnumber() { _has_bits_[0] |= 0x00000040u; } inline void RenewVirtualDeviceCredentialsResponseType::clear_has_serialnumber() { _has_bits_[0] &= ~0x00000040u; } inline void RenewVirtualDeviceCredentialsResponseType::clear_serialnumber() { serialnumber_ = GOOGLE_ULONGLONG(0); clear_has_serialnumber(); } inline ::google::protobuf::uint64 RenewVirtualDeviceCredentialsResponseType::serialnumber() const { return serialnumber_; } inline void RenewVirtualDeviceCredentialsResponseType::set_serialnumber(::google::protobuf::uint64 value) { set_has_serialnumber(); serialnumber_ = value; } // optional bytes AttestTMD = 8; inline bool RenewVirtualDeviceCredentialsResponseType::has_attesttmd() const { return (_has_bits_[0] & 0x00000080u) != 0; } inline void RenewVirtualDeviceCredentialsResponseType::set_has_attesttmd() { _has_bits_[0] |= 0x00000080u; } inline void RenewVirtualDeviceCredentialsResponseType::clear_has_attesttmd() { _has_bits_[0] &= ~0x00000080u; } inline void RenewVirtualDeviceCredentialsResponseType::clear_attesttmd() { if (attesttmd_ != &::google::protobuf::internal::kEmptyString) { attesttmd_->clear(); } clear_has_attesttmd(); } inline const ::std::string& RenewVirtualDeviceCredentialsResponseType::attesttmd() const { return *attesttmd_; } inline void RenewVirtualDeviceCredentialsResponseType::set_attesttmd(const ::std::string& value) { set_has_attesttmd(); if (attesttmd_ == &::google::protobuf::internal::kEmptyString) { attesttmd_ = new ::std::string; } attesttmd_->assign(value); } inline void RenewVirtualDeviceCredentialsResponseType::set_attesttmd(const char* value) { set_has_attesttmd(); if (attesttmd_ == &::google::protobuf::internal::kEmptyString) { attesttmd_ = new ::std::string; } attesttmd_->assign(value); } inline void RenewVirtualDeviceCredentialsResponseType::set_attesttmd(const void* value, size_t size) { set_has_attesttmd(); if (attesttmd_ == &::google::protobuf::internal::kEmptyString) { attesttmd_ = new ::std::string; } attesttmd_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* RenewVirtualDeviceCredentialsResponseType::mutable_attesttmd() { set_has_attesttmd(); if (attesttmd_ == &::google::protobuf::internal::kEmptyString) { attesttmd_ = new ::std::string; } return attesttmd_; } inline ::std::string* RenewVirtualDeviceCredentialsResponseType::release_attesttmd() { clear_has_attesttmd(); if (attesttmd_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = attesttmd_; attesttmd_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional bytes DeviceCert = 9; inline bool RenewVirtualDeviceCredentialsResponseType::has_devicecert() const { return (_has_bits_[0] & 0x00000100u) != 0; } inline void RenewVirtualDeviceCredentialsResponseType::set_has_devicecert() { _has_bits_[0] |= 0x00000100u; } inline void RenewVirtualDeviceCredentialsResponseType::clear_has_devicecert() { _has_bits_[0] &= ~0x00000100u; } inline void RenewVirtualDeviceCredentialsResponseType::clear_devicecert() { if (devicecert_ != &::google::protobuf::internal::kEmptyString) { devicecert_->clear(); } clear_has_devicecert(); } inline const ::std::string& RenewVirtualDeviceCredentialsResponseType::devicecert() const { return *devicecert_; } inline void RenewVirtualDeviceCredentialsResponseType::set_devicecert(const ::std::string& value) { set_has_devicecert(); if (devicecert_ == &::google::protobuf::internal::kEmptyString) { devicecert_ = new ::std::string; } devicecert_->assign(value); } inline void RenewVirtualDeviceCredentialsResponseType::set_devicecert(const char* value) { set_has_devicecert(); if (devicecert_ == &::google::protobuf::internal::kEmptyString) { devicecert_ = new ::std::string; } devicecert_->assign(value); } inline void RenewVirtualDeviceCredentialsResponseType::set_devicecert(const void* value, size_t size) { set_has_devicecert(); if (devicecert_ == &::google::protobuf::internal::kEmptyString) { devicecert_ = new ::std::string; } devicecert_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* RenewVirtualDeviceCredentialsResponseType::mutable_devicecert() { set_has_devicecert(); if (devicecert_ == &::google::protobuf::internal::kEmptyString) { devicecert_ = new ::std::string; } return devicecert_; } inline ::std::string* RenewVirtualDeviceCredentialsResponseType::release_devicecert() { clear_has_devicecert(); if (devicecert_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = devicecert_; devicecert_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional bytes PlatformKey = 10; inline bool RenewVirtualDeviceCredentialsResponseType::has_platformkey() const { return (_has_bits_[0] & 0x00000200u) != 0; } inline void RenewVirtualDeviceCredentialsResponseType::set_has_platformkey() { _has_bits_[0] |= 0x00000200u; } inline void RenewVirtualDeviceCredentialsResponseType::clear_has_platformkey() { _has_bits_[0] &= ~0x00000200u; } inline void RenewVirtualDeviceCredentialsResponseType::clear_platformkey() { if (platformkey_ != &::google::protobuf::internal::kEmptyString) { platformkey_->clear(); } clear_has_platformkey(); } inline const ::std::string& RenewVirtualDeviceCredentialsResponseType::platformkey() const { return *platformkey_; } inline void RenewVirtualDeviceCredentialsResponseType::set_platformkey(const ::std::string& value) { set_has_platformkey(); if (platformkey_ == &::google::protobuf::internal::kEmptyString) { platformkey_ = new ::std::string; } platformkey_->assign(value); } inline void RenewVirtualDeviceCredentialsResponseType::set_platformkey(const char* value) { set_has_platformkey(); if (platformkey_ == &::google::protobuf::internal::kEmptyString) { platformkey_ = new ::std::string; } platformkey_->assign(value); } inline void RenewVirtualDeviceCredentialsResponseType::set_platformkey(const void* value, size_t size) { set_has_platformkey(); if (platformkey_ == &::google::protobuf::internal::kEmptyString) { platformkey_ = new ::std::string; } platformkey_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* RenewVirtualDeviceCredentialsResponseType::mutable_platformkey() { set_has_platformkey(); if (platformkey_ == &::google::protobuf::internal::kEmptyString) { platformkey_ = new ::std::string; } return platformkey_; } inline ::std::string* RenewVirtualDeviceCredentialsResponseType::release_platformkey() { clear_has_platformkey(); if (platformkey_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = platformkey_; platformkey_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // ------------------------------------------------------------------- // GetServerKeyRequestType // required .vplex.ias.AbstractRequestType _inherited = 1; inline bool GetServerKeyRequestType::has__inherited() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void GetServerKeyRequestType::set_has__inherited() { _has_bits_[0] |= 0x00000001u; } inline void GetServerKeyRequestType::clear_has__inherited() { _has_bits_[0] &= ~0x00000001u; } inline void GetServerKeyRequestType::clear__inherited() { if (_inherited_ != NULL) _inherited_->::vplex::ias::AbstractRequestType::Clear(); clear_has__inherited(); } inline const ::vplex::ias::AbstractRequestType& GetServerKeyRequestType::_inherited() const { return _inherited_ != NULL ? *_inherited_ : *default_instance_->_inherited_; } inline ::vplex::ias::AbstractRequestType* GetServerKeyRequestType::mutable__inherited() { set_has__inherited(); if (_inherited_ == NULL) _inherited_ = new ::vplex::ias::AbstractRequestType; return _inherited_; } inline ::vplex::ias::AbstractRequestType* GetServerKeyRequestType::release__inherited() { clear_has__inherited(); ::vplex::ias::AbstractRequestType* temp = _inherited_; _inherited_ = NULL; return temp; } // required fixed64 UserId = 2; inline bool GetServerKeyRequestType::has_userid() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void GetServerKeyRequestType::set_has_userid() { _has_bits_[0] |= 0x00000002u; } inline void GetServerKeyRequestType::clear_has_userid() { _has_bits_[0] &= ~0x00000002u; } inline void GetServerKeyRequestType::clear_userid() { userid_ = GOOGLE_ULONGLONG(0); clear_has_userid(); } inline ::google::protobuf::uint64 GetServerKeyRequestType::userid() const { return userid_; } inline void GetServerKeyRequestType::set_userid(::google::protobuf::uint64 value) { set_has_userid(); userid_ = value; } // ------------------------------------------------------------------- // GetServerKeyResponseType // required .vplex.ias.AbstractResponseType _inherited = 1; inline bool GetServerKeyResponseType::has__inherited() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void GetServerKeyResponseType::set_has__inherited() { _has_bits_[0] |= 0x00000001u; } inline void GetServerKeyResponseType::clear_has__inherited() { _has_bits_[0] &= ~0x00000001u; } inline void GetServerKeyResponseType::clear__inherited() { if (_inherited_ != NULL) _inherited_->::vplex::ias::AbstractResponseType::Clear(); clear_has__inherited(); } inline const ::vplex::ias::AbstractResponseType& GetServerKeyResponseType::_inherited() const { return _inherited_ != NULL ? *_inherited_ : *default_instance_->_inherited_; } inline ::vplex::ias::AbstractResponseType* GetServerKeyResponseType::mutable__inherited() { set_has__inherited(); if (_inherited_ == NULL) _inherited_ = new ::vplex::ias::AbstractResponseType; return _inherited_; } inline ::vplex::ias::AbstractResponseType* GetServerKeyResponseType::release__inherited() { clear_has__inherited(); ::vplex::ias::AbstractResponseType* temp = _inherited_; _inherited_ = NULL; return temp; } // optional bytes ServerKey = 2; inline bool GetServerKeyResponseType::has_serverkey() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void GetServerKeyResponseType::set_has_serverkey() { _has_bits_[0] |= 0x00000002u; } inline void GetServerKeyResponseType::clear_has_serverkey() { _has_bits_[0] &= ~0x00000002u; } inline void GetServerKeyResponseType::clear_serverkey() { if (serverkey_ != &::google::protobuf::internal::kEmptyString) { serverkey_->clear(); } clear_has_serverkey(); } inline const ::std::string& GetServerKeyResponseType::serverkey() const { return *serverkey_; } inline void GetServerKeyResponseType::set_serverkey(const ::std::string& value) { set_has_serverkey(); if (serverkey_ == &::google::protobuf::internal::kEmptyString) { serverkey_ = new ::std::string; } serverkey_->assign(value); } inline void GetServerKeyResponseType::set_serverkey(const char* value) { set_has_serverkey(); if (serverkey_ == &::google::protobuf::internal::kEmptyString) { serverkey_ = new ::std::string; } serverkey_->assign(value); } inline void GetServerKeyResponseType::set_serverkey(const void* value, size_t size) { set_has_serverkey(); if (serverkey_ == &::google::protobuf::internal::kEmptyString) { serverkey_ = new ::std::string; } serverkey_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* GetServerKeyResponseType::mutable_serverkey() { set_has_serverkey(); if (serverkey_ == &::google::protobuf::internal::kEmptyString) { serverkey_ = new ::std::string; } return serverkey_; } inline ::std::string* GetServerKeyResponseType::release_serverkey() { clear_has_serverkey(); if (serverkey_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = serverkey_; serverkey_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // ------------------------------------------------------------------- // RequestPairingRequestType // required .vplex.ias.AbstractRequestType _inherited = 1; inline bool RequestPairingRequestType::has__inherited() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void RequestPairingRequestType::set_has__inherited() { _has_bits_[0] |= 0x00000001u; } inline void RequestPairingRequestType::clear_has__inherited() { _has_bits_[0] &= ~0x00000001u; } inline void RequestPairingRequestType::clear__inherited() { if (_inherited_ != NULL) _inherited_->::vplex::ias::AbstractRequestType::Clear(); clear_has__inherited(); } inline const ::vplex::ias::AbstractRequestType& RequestPairingRequestType::_inherited() const { return _inherited_ != NULL ? *_inherited_ : *default_instance_->_inherited_; } inline ::vplex::ias::AbstractRequestType* RequestPairingRequestType::mutable__inherited() { set_has__inherited(); if (_inherited_ == NULL) _inherited_ = new ::vplex::ias::AbstractRequestType; return _inherited_; } inline ::vplex::ias::AbstractRequestType* RequestPairingRequestType::release__inherited() { clear_has__inherited(); ::vplex::ias::AbstractRequestType* temp = _inherited_; _inherited_ = NULL; return temp; } // optional bytes HostHardwareId = 2; inline bool RequestPairingRequestType::has_hosthardwareid() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void RequestPairingRequestType::set_has_hosthardwareid() { _has_bits_[0] |= 0x00000002u; } inline void RequestPairingRequestType::clear_has_hosthardwareid() { _has_bits_[0] &= ~0x00000002u; } inline void RequestPairingRequestType::clear_hosthardwareid() { if (hosthardwareid_ != &::google::protobuf::internal::kEmptyString) { hosthardwareid_->clear(); } clear_has_hosthardwareid(); } inline const ::std::string& RequestPairingRequestType::hosthardwareid() const { return *hosthardwareid_; } inline void RequestPairingRequestType::set_hosthardwareid(const ::std::string& value) { set_has_hosthardwareid(); if (hosthardwareid_ == &::google::protobuf::internal::kEmptyString) { hosthardwareid_ = new ::std::string; } hosthardwareid_->assign(value); } inline void RequestPairingRequestType::set_hosthardwareid(const char* value) { set_has_hosthardwareid(); if (hosthardwareid_ == &::google::protobuf::internal::kEmptyString) { hosthardwareid_ = new ::std::string; } hosthardwareid_->assign(value); } inline void RequestPairingRequestType::set_hosthardwareid(const void* value, size_t size) { set_has_hosthardwareid(); if (hosthardwareid_ == &::google::protobuf::internal::kEmptyString) { hosthardwareid_ = new ::std::string; } hosthardwareid_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* RequestPairingRequestType::mutable_hosthardwareid() { set_has_hosthardwareid(); if (hosthardwareid_ == &::google::protobuf::internal::kEmptyString) { hosthardwareid_ = new ::std::string; } return hosthardwareid_; } inline ::std::string* RequestPairingRequestType::release_hosthardwareid() { clear_has_hosthardwareid(); if (hosthardwareid_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = hosthardwareid_; hosthardwareid_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional fixed64 HostDeviceId = 3; inline bool RequestPairingRequestType::has_hostdeviceid() const { return (_has_bits_[0] & 0x00000004u) != 0; } inline void RequestPairingRequestType::set_has_hostdeviceid() { _has_bits_[0] |= 0x00000004u; } inline void RequestPairingRequestType::clear_has_hostdeviceid() { _has_bits_[0] &= ~0x00000004u; } inline void RequestPairingRequestType::clear_hostdeviceid() { hostdeviceid_ = GOOGLE_ULONGLONG(0); clear_has_hostdeviceid(); } inline ::google::protobuf::uint64 RequestPairingRequestType::hostdeviceid() const { return hostdeviceid_; } inline void RequestPairingRequestType::set_hostdeviceid(::google::protobuf::uint64 value) { set_has_hostdeviceid(); hostdeviceid_ = value; } // required bytes DeviceHardwareId = 4; inline bool RequestPairingRequestType::has_devicehardwareid() const { return (_has_bits_[0] & 0x00000008u) != 0; } inline void RequestPairingRequestType::set_has_devicehardwareid() { _has_bits_[0] |= 0x00000008u; } inline void RequestPairingRequestType::clear_has_devicehardwareid() { _has_bits_[0] &= ~0x00000008u; } inline void RequestPairingRequestType::clear_devicehardwareid() { if (devicehardwareid_ != &::google::protobuf::internal::kEmptyString) { devicehardwareid_->clear(); } clear_has_devicehardwareid(); } inline const ::std::string& RequestPairingRequestType::devicehardwareid() const { return *devicehardwareid_; } inline void RequestPairingRequestType::set_devicehardwareid(const ::std::string& value) { set_has_devicehardwareid(); if (devicehardwareid_ == &::google::protobuf::internal::kEmptyString) { devicehardwareid_ = new ::std::string; } devicehardwareid_->assign(value); } inline void RequestPairingRequestType::set_devicehardwareid(const char* value) { set_has_devicehardwareid(); if (devicehardwareid_ == &::google::protobuf::internal::kEmptyString) { devicehardwareid_ = new ::std::string; } devicehardwareid_->assign(value); } inline void RequestPairingRequestType::set_devicehardwareid(const void* value, size_t size) { set_has_devicehardwareid(); if (devicehardwareid_ == &::google::protobuf::internal::kEmptyString) { devicehardwareid_ = new ::std::string; } devicehardwareid_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* RequestPairingRequestType::mutable_devicehardwareid() { set_has_devicehardwareid(); if (devicehardwareid_ == &::google::protobuf::internal::kEmptyString) { devicehardwareid_ = new ::std::string; } return devicehardwareid_; } inline ::std::string* RequestPairingRequestType::release_devicehardwareid() { clear_has_devicehardwareid(); if (devicehardwareid_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = devicehardwareid_; devicehardwareid_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional string PIN = 5; inline bool RequestPairingRequestType::has_pin() const { return (_has_bits_[0] & 0x00000010u) != 0; } inline void RequestPairingRequestType::set_has_pin() { _has_bits_[0] |= 0x00000010u; } inline void RequestPairingRequestType::clear_has_pin() { _has_bits_[0] &= ~0x00000010u; } inline void RequestPairingRequestType::clear_pin() { if (pin_ != &::google::protobuf::internal::kEmptyString) { pin_->clear(); } clear_has_pin(); } inline const ::std::string& RequestPairingRequestType::pin() const { return *pin_; } inline void RequestPairingRequestType::set_pin(const ::std::string& value) { set_has_pin(); if (pin_ == &::google::protobuf::internal::kEmptyString) { pin_ = new ::std::string; } pin_->assign(value); } inline void RequestPairingRequestType::set_pin(const char* value) { set_has_pin(); if (pin_ == &::google::protobuf::internal::kEmptyString) { pin_ = new ::std::string; } pin_->assign(value); } inline void RequestPairingRequestType::set_pin(const char* value, size_t size) { set_has_pin(); if (pin_ == &::google::protobuf::internal::kEmptyString) { pin_ = new ::std::string; } pin_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* RequestPairingRequestType::mutable_pin() { set_has_pin(); if (pin_ == &::google::protobuf::internal::kEmptyString) { pin_ = new ::std::string; } return pin_; } inline ::std::string* RequestPairingRequestType::release_pin() { clear_has_pin(); if (pin_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = pin_; pin_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // repeated .vplex.ias.StrAttributeType PairingAttributes = 6; inline int RequestPairingRequestType::pairingattributes_size() const { return pairingattributes_.size(); } inline void RequestPairingRequestType::clear_pairingattributes() { pairingattributes_.Clear(); } inline const ::vplex::ias::StrAttributeType& RequestPairingRequestType::pairingattributes(int index) const { return pairingattributes_.Get(index); } inline ::vplex::ias::StrAttributeType* RequestPairingRequestType::mutable_pairingattributes(int index) { return pairingattributes_.Mutable(index); } inline ::vplex::ias::StrAttributeType* RequestPairingRequestType::add_pairingattributes() { return pairingattributes_.Add(); } inline const ::google::protobuf::RepeatedPtrField< ::vplex::ias::StrAttributeType >& RequestPairingRequestType::pairingattributes() const { return pairingattributes_; } inline ::google::protobuf::RepeatedPtrField< ::vplex::ias::StrAttributeType >* RequestPairingRequestType::mutable_pairingattributes() { return &pairingattributes_; } // ------------------------------------------------------------------- // RequestPairingResponseType // required .vplex.ias.AbstractResponseType _inherited = 1; inline bool RequestPairingResponseType::has__inherited() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void RequestPairingResponseType::set_has__inherited() { _has_bits_[0] |= 0x00000001u; } inline void RequestPairingResponseType::clear_has__inherited() { _has_bits_[0] &= ~0x00000001u; } inline void RequestPairingResponseType::clear__inherited() { if (_inherited_ != NULL) _inherited_->::vplex::ias::AbstractResponseType::Clear(); clear_has__inherited(); } inline const ::vplex::ias::AbstractResponseType& RequestPairingResponseType::_inherited() const { return _inherited_ != NULL ? *_inherited_ : *default_instance_->_inherited_; } inline ::vplex::ias::AbstractResponseType* RequestPairingResponseType::mutable__inherited() { set_has__inherited(); if (_inherited_ == NULL) _inherited_ = new ::vplex::ias::AbstractResponseType; return _inherited_; } inline ::vplex::ias::AbstractResponseType* RequestPairingResponseType::release__inherited() { clear_has__inherited(); ::vplex::ias::AbstractResponseType* temp = _inherited_; _inherited_ = NULL; return temp; } // required string PairingToken = 2; inline bool RequestPairingResponseType::has_pairingtoken() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void RequestPairingResponseType::set_has_pairingtoken() { _has_bits_[0] |= 0x00000002u; } inline void RequestPairingResponseType::clear_has_pairingtoken() { _has_bits_[0] &= ~0x00000002u; } inline void RequestPairingResponseType::clear_pairingtoken() { if (pairingtoken_ != &::google::protobuf::internal::kEmptyString) { pairingtoken_->clear(); } clear_has_pairingtoken(); } inline const ::std::string& RequestPairingResponseType::pairingtoken() const { return *pairingtoken_; } inline void RequestPairingResponseType::set_pairingtoken(const ::std::string& value) { set_has_pairingtoken(); if (pairingtoken_ == &::google::protobuf::internal::kEmptyString) { pairingtoken_ = new ::std::string; } pairingtoken_->assign(value); } inline void RequestPairingResponseType::set_pairingtoken(const char* value) { set_has_pairingtoken(); if (pairingtoken_ == &::google::protobuf::internal::kEmptyString) { pairingtoken_ = new ::std::string; } pairingtoken_->assign(value); } inline void RequestPairingResponseType::set_pairingtoken(const char* value, size_t size) { set_has_pairingtoken(); if (pairingtoken_ == &::google::protobuf::internal::kEmptyString) { pairingtoken_ = new ::std::string; } pairingtoken_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* RequestPairingResponseType::mutable_pairingtoken() { set_has_pairingtoken(); if (pairingtoken_ == &::google::protobuf::internal::kEmptyString) { pairingtoken_ = new ::std::string; } return pairingtoken_; } inline ::std::string* RequestPairingResponseType::release_pairingtoken() { clear_has_pairingtoken(); if (pairingtoken_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = pairingtoken_; pairingtoken_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // ------------------------------------------------------------------- // RespondToPairingRequestRequestType // required .vplex.ias.AbstractRequestType _inherited = 1; inline bool RespondToPairingRequestRequestType::has__inherited() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void RespondToPairingRequestRequestType::set_has__inherited() { _has_bits_[0] |= 0x00000001u; } inline void RespondToPairingRequestRequestType::clear_has__inherited() { _has_bits_[0] &= ~0x00000001u; } inline void RespondToPairingRequestRequestType::clear__inherited() { if (_inherited_ != NULL) _inherited_->::vplex::ias::AbstractRequestType::Clear(); clear_has__inherited(); } inline const ::vplex::ias::AbstractRequestType& RespondToPairingRequestRequestType::_inherited() const { return _inherited_ != NULL ? *_inherited_ : *default_instance_->_inherited_; } inline ::vplex::ias::AbstractRequestType* RespondToPairingRequestRequestType::mutable__inherited() { set_has__inherited(); if (_inherited_ == NULL) _inherited_ = new ::vplex::ias::AbstractRequestType; return _inherited_; } inline ::vplex::ias::AbstractRequestType* RespondToPairingRequestRequestType::release__inherited() { clear_has__inherited(); ::vplex::ias::AbstractRequestType* temp = _inherited_; _inherited_ = NULL; return temp; } // required string TransactionId = 2; inline bool RespondToPairingRequestRequestType::has_transactionid() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void RespondToPairingRequestRequestType::set_has_transactionid() { _has_bits_[0] |= 0x00000002u; } inline void RespondToPairingRequestRequestType::clear_has_transactionid() { _has_bits_[0] &= ~0x00000002u; } inline void RespondToPairingRequestRequestType::clear_transactionid() { if (transactionid_ != &::google::protobuf::internal::kEmptyString) { transactionid_->clear(); } clear_has_transactionid(); } inline const ::std::string& RespondToPairingRequestRequestType::transactionid() const { return *transactionid_; } inline void RespondToPairingRequestRequestType::set_transactionid(const ::std::string& value) { set_has_transactionid(); if (transactionid_ == &::google::protobuf::internal::kEmptyString) { transactionid_ = new ::std::string; } transactionid_->assign(value); } inline void RespondToPairingRequestRequestType::set_transactionid(const char* value) { set_has_transactionid(); if (transactionid_ == &::google::protobuf::internal::kEmptyString) { transactionid_ = new ::std::string; } transactionid_->assign(value); } inline void RespondToPairingRequestRequestType::set_transactionid(const char* value, size_t size) { set_has_transactionid(); if (transactionid_ == &::google::protobuf::internal::kEmptyString) { transactionid_ = new ::std::string; } transactionid_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* RespondToPairingRequestRequestType::mutable_transactionid() { set_has_transactionid(); if (transactionid_ == &::google::protobuf::internal::kEmptyString) { transactionid_ = new ::std::string; } return transactionid_; } inline ::std::string* RespondToPairingRequestRequestType::release_transactionid() { clear_has_transactionid(); if (transactionid_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = transactionid_; transactionid_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // required bool AcceptedPairing = 3; inline bool RespondToPairingRequestRequestType::has_acceptedpairing() const { return (_has_bits_[0] & 0x00000004u) != 0; } inline void RespondToPairingRequestRequestType::set_has_acceptedpairing() { _has_bits_[0] |= 0x00000004u; } inline void RespondToPairingRequestRequestType::clear_has_acceptedpairing() { _has_bits_[0] &= ~0x00000004u; } inline void RespondToPairingRequestRequestType::clear_acceptedpairing() { acceptedpairing_ = false; clear_has_acceptedpairing(); } inline bool RespondToPairingRequestRequestType::acceptedpairing() const { return acceptedpairing_; } inline void RespondToPairingRequestRequestType::set_acceptedpairing(bool value) { set_has_acceptedpairing(); acceptedpairing_ = value; } // ------------------------------------------------------------------- // RespondToPairingRequestResponseType // required .vplex.ias.AbstractResponseType _inherited = 1; inline bool RespondToPairingRequestResponseType::has__inherited() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void RespondToPairingRequestResponseType::set_has__inherited() { _has_bits_[0] |= 0x00000001u; } inline void RespondToPairingRequestResponseType::clear_has__inherited() { _has_bits_[0] &= ~0x00000001u; } inline void RespondToPairingRequestResponseType::clear__inherited() { if (_inherited_ != NULL) _inherited_->::vplex::ias::AbstractResponseType::Clear(); clear_has__inherited(); } inline const ::vplex::ias::AbstractResponseType& RespondToPairingRequestResponseType::_inherited() const { return _inherited_ != NULL ? *_inherited_ : *default_instance_->_inherited_; } inline ::vplex::ias::AbstractResponseType* RespondToPairingRequestResponseType::mutable__inherited() { set_has__inherited(); if (_inherited_ == NULL) _inherited_ = new ::vplex::ias::AbstractResponseType; return _inherited_; } inline ::vplex::ias::AbstractResponseType* RespondToPairingRequestResponseType::release__inherited() { clear_has__inherited(); ::vplex::ias::AbstractResponseType* temp = _inherited_; _inherited_ = NULL; return temp; } // ------------------------------------------------------------------- // RequestPairingPinRequestType // required .vplex.ias.AbstractRequestType _inherited = 1; inline bool RequestPairingPinRequestType::has__inherited() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void RequestPairingPinRequestType::set_has__inherited() { _has_bits_[0] |= 0x00000001u; } inline void RequestPairingPinRequestType::clear_has__inherited() { _has_bits_[0] &= ~0x00000001u; } inline void RequestPairingPinRequestType::clear__inherited() { if (_inherited_ != NULL) _inherited_->::vplex::ias::AbstractRequestType::Clear(); clear_has__inherited(); } inline const ::vplex::ias::AbstractRequestType& RequestPairingPinRequestType::_inherited() const { return _inherited_ != NULL ? *_inherited_ : *default_instance_->_inherited_; } inline ::vplex::ias::AbstractRequestType* RequestPairingPinRequestType::mutable__inherited() { set_has__inherited(); if (_inherited_ == NULL) _inherited_ = new ::vplex::ias::AbstractRequestType; return _inherited_; } inline ::vplex::ias::AbstractRequestType* RequestPairingPinRequestType::release__inherited() { clear_has__inherited(); ::vplex::ias::AbstractRequestType* temp = _inherited_; _inherited_ = NULL; return temp; } // ------------------------------------------------------------------- // RequestPairingPinResponseType // required .vplex.ias.AbstractResponseType _inherited = 1; inline bool RequestPairingPinResponseType::has__inherited() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void RequestPairingPinResponseType::set_has__inherited() { _has_bits_[0] |= 0x00000001u; } inline void RequestPairingPinResponseType::clear_has__inherited() { _has_bits_[0] &= ~0x00000001u; } inline void RequestPairingPinResponseType::clear__inherited() { if (_inherited_ != NULL) _inherited_->::vplex::ias::AbstractResponseType::Clear(); clear_has__inherited(); } inline const ::vplex::ias::AbstractResponseType& RequestPairingPinResponseType::_inherited() const { return _inherited_ != NULL ? *_inherited_ : *default_instance_->_inherited_; } inline ::vplex::ias::AbstractResponseType* RequestPairingPinResponseType::mutable__inherited() { set_has__inherited(); if (_inherited_ == NULL) _inherited_ = new ::vplex::ias::AbstractResponseType; return _inherited_; } inline ::vplex::ias::AbstractResponseType* RequestPairingPinResponseType::release__inherited() { clear_has__inherited(); ::vplex::ias::AbstractResponseType* temp = _inherited_; _inherited_ = NULL; return temp; } // required string PairingPin = 2; inline bool RequestPairingPinResponseType::has_pairingpin() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void RequestPairingPinResponseType::set_has_pairingpin() { _has_bits_[0] |= 0x00000002u; } inline void RequestPairingPinResponseType::clear_has_pairingpin() { _has_bits_[0] &= ~0x00000002u; } inline void RequestPairingPinResponseType::clear_pairingpin() { if (pairingpin_ != &::google::protobuf::internal::kEmptyString) { pairingpin_->clear(); } clear_has_pairingpin(); } inline const ::std::string& RequestPairingPinResponseType::pairingpin() const { return *pairingpin_; } inline void RequestPairingPinResponseType::set_pairingpin(const ::std::string& value) { set_has_pairingpin(); if (pairingpin_ == &::google::protobuf::internal::kEmptyString) { pairingpin_ = new ::std::string; } pairingpin_->assign(value); } inline void RequestPairingPinResponseType::set_pairingpin(const char* value) { set_has_pairingpin(); if (pairingpin_ == &::google::protobuf::internal::kEmptyString) { pairingpin_ = new ::std::string; } pairingpin_->assign(value); } inline void RequestPairingPinResponseType::set_pairingpin(const char* value, size_t size) { set_has_pairingpin(); if (pairingpin_ == &::google::protobuf::internal::kEmptyString) { pairingpin_ = new ::std::string; } pairingpin_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* RequestPairingPinResponseType::mutable_pairingpin() { set_has_pairingpin(); if (pairingpin_ == &::google::protobuf::internal::kEmptyString) { pairingpin_ = new ::std::string; } return pairingpin_; } inline ::std::string* RequestPairingPinResponseType::release_pairingpin() { clear_has_pairingpin(); if (pairingpin_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = pairingpin_; pairingpin_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // ------------------------------------------------------------------- // GetPairingStatusRequestType // required .vplex.ias.AbstractRequestType _inherited = 1; inline bool GetPairingStatusRequestType::has__inherited() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void GetPairingStatusRequestType::set_has__inherited() { _has_bits_[0] |= 0x00000001u; } inline void GetPairingStatusRequestType::clear_has__inherited() { _has_bits_[0] &= ~0x00000001u; } inline void GetPairingStatusRequestType::clear__inherited() { if (_inherited_ != NULL) _inherited_->::vplex::ias::AbstractRequestType::Clear(); clear_has__inherited(); } inline const ::vplex::ias::AbstractRequestType& GetPairingStatusRequestType::_inherited() const { return _inherited_ != NULL ? *_inherited_ : *default_instance_->_inherited_; } inline ::vplex::ias::AbstractRequestType* GetPairingStatusRequestType::mutable__inherited() { set_has__inherited(); if (_inherited_ == NULL) _inherited_ = new ::vplex::ias::AbstractRequestType; return _inherited_; } inline ::vplex::ias::AbstractRequestType* GetPairingStatusRequestType::release__inherited() { clear_has__inherited(); ::vplex::ias::AbstractRequestType* temp = _inherited_; _inherited_ = NULL; return temp; } // required string PairingToken = 2; inline bool GetPairingStatusRequestType::has_pairingtoken() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void GetPairingStatusRequestType::set_has_pairingtoken() { _has_bits_[0] |= 0x00000002u; } inline void GetPairingStatusRequestType::clear_has_pairingtoken() { _has_bits_[0] &= ~0x00000002u; } inline void GetPairingStatusRequestType::clear_pairingtoken() { if (pairingtoken_ != &::google::protobuf::internal::kEmptyString) { pairingtoken_->clear(); } clear_has_pairingtoken(); } inline const ::std::string& GetPairingStatusRequestType::pairingtoken() const { return *pairingtoken_; } inline void GetPairingStatusRequestType::set_pairingtoken(const ::std::string& value) { set_has_pairingtoken(); if (pairingtoken_ == &::google::protobuf::internal::kEmptyString) { pairingtoken_ = new ::std::string; } pairingtoken_->assign(value); } inline void GetPairingStatusRequestType::set_pairingtoken(const char* value) { set_has_pairingtoken(); if (pairingtoken_ == &::google::protobuf::internal::kEmptyString) { pairingtoken_ = new ::std::string; } pairingtoken_->assign(value); } inline void GetPairingStatusRequestType::set_pairingtoken(const char* value, size_t size) { set_has_pairingtoken(); if (pairingtoken_ == &::google::protobuf::internal::kEmptyString) { pairingtoken_ = new ::std::string; } pairingtoken_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* GetPairingStatusRequestType::mutable_pairingtoken() { set_has_pairingtoken(); if (pairingtoken_ == &::google::protobuf::internal::kEmptyString) { pairingtoken_ = new ::std::string; } return pairingtoken_; } inline ::std::string* GetPairingStatusRequestType::release_pairingtoken() { clear_has_pairingtoken(); if (pairingtoken_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = pairingtoken_; pairingtoken_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // ------------------------------------------------------------------- // GetPairingStatusResponseType // required .vplex.ias.AbstractResponseType _inherited = 1; inline bool GetPairingStatusResponseType::has__inherited() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void GetPairingStatusResponseType::set_has__inherited() { _has_bits_[0] |= 0x00000001u; } inline void GetPairingStatusResponseType::clear_has__inherited() { _has_bits_[0] &= ~0x00000001u; } inline void GetPairingStatusResponseType::clear__inherited() { if (_inherited_ != NULL) _inherited_->::vplex::ias::AbstractResponseType::Clear(); clear_has__inherited(); } inline const ::vplex::ias::AbstractResponseType& GetPairingStatusResponseType::_inherited() const { return _inherited_ != NULL ? *_inherited_ : *default_instance_->_inherited_; } inline ::vplex::ias::AbstractResponseType* GetPairingStatusResponseType::mutable__inherited() { set_has__inherited(); if (_inherited_ == NULL) _inherited_ = new ::vplex::ias::AbstractResponseType; return _inherited_; } inline ::vplex::ias::AbstractResponseType* GetPairingStatusResponseType::release__inherited() { clear_has__inherited(); ::vplex::ias::AbstractResponseType* temp = _inherited_; _inherited_ = NULL; return temp; } // required string Status = 2; inline bool GetPairingStatusResponseType::has_status() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void GetPairingStatusResponseType::set_has_status() { _has_bits_[0] |= 0x00000002u; } inline void GetPairingStatusResponseType::clear_has_status() { _has_bits_[0] &= ~0x00000002u; } inline void GetPairingStatusResponseType::clear_status() { if (status_ != &::google::protobuf::internal::kEmptyString) { status_->clear(); } clear_has_status(); } inline const ::std::string& GetPairingStatusResponseType::status() const { return *status_; } inline void GetPairingStatusResponseType::set_status(const ::std::string& value) { set_has_status(); if (status_ == &::google::protobuf::internal::kEmptyString) { status_ = new ::std::string; } status_->assign(value); } inline void GetPairingStatusResponseType::set_status(const char* value) { set_has_status(); if (status_ == &::google::protobuf::internal::kEmptyString) { status_ = new ::std::string; } status_->assign(value); } inline void GetPairingStatusResponseType::set_status(const char* value, size_t size) { set_has_status(); if (status_ == &::google::protobuf::internal::kEmptyString) { status_ = new ::std::string; } status_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* GetPairingStatusResponseType::mutable_status() { set_has_status(); if (status_ == &::google::protobuf::internal::kEmptyString) { status_ = new ::std::string; } return status_; } inline ::std::string* GetPairingStatusResponseType::release_status() { clear_has_status(); if (status_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = status_; status_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // optional string Username = 3; inline bool GetPairingStatusResponseType::has_username() const { return (_has_bits_[0] & 0x00000004u) != 0; } inline void GetPairingStatusResponseType::set_has_username() { _has_bits_[0] |= 0x00000004u; } inline void GetPairingStatusResponseType::clear_has_username() { _has_bits_[0] &= ~0x00000004u; } inline void GetPairingStatusResponseType::clear_username() { if (username_ != &::google::protobuf::internal::kEmptyString) { username_->clear(); } clear_has_username(); } inline const ::std::string& GetPairingStatusResponseType::username() const { return *username_; } inline void GetPairingStatusResponseType::set_username(const ::std::string& value) { set_has_username(); if (username_ == &::google::protobuf::internal::kEmptyString) { username_ = new ::std::string; } username_->assign(value); } inline void GetPairingStatusResponseType::set_username(const char* value) { set_has_username(); if (username_ == &::google::protobuf::internal::kEmptyString) { username_ = new ::std::string; } username_->assign(value); } inline void GetPairingStatusResponseType::set_username(const char* value, size_t size) { set_has_username(); if (username_ == &::google::protobuf::internal::kEmptyString) { username_ = new ::std::string; } username_->assign(reinterpret_cast<const char*>(value), size); } inline ::std::string* GetPairingStatusResponseType::mutable_username() { set_has_username(); if (username_ == &::google::protobuf::internal::kEmptyString) { username_ = new ::std::string; } return username_; } inline ::std::string* GetPairingStatusResponseType::release_username() { clear_has_username(); if (username_ == &::google::protobuf::internal::kEmptyString) { return NULL; } else { ::std::string* temp = username_; username_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); return temp; } } // @@protoc_insertion_point(namespace_scope) } // namespace ias } // namespace vplex #ifndef SWIG namespace google { namespace protobuf { } // namespace google } // namespace protobuf #endif // SWIG // @@protoc_insertion_point(global_scope) #endif // PROTOBUF_vplex_5fias_5fservice_5ftypes_2eproto__INCLUDED
b16caed1c6267646e788383afe671d6deba89a4e
97787f3b17c1880146fa66e64ae8eef071a8a4cb
/Source/Game/Camera/PostProcessManager/PostProcessManager.h
4b8c0ea6cde2db9439799592ccde8a449fbfab65
[]
no_license
boris47/Freelance_LE
76af34f3b38fb419be5bc37e2e932269634cecc9
a5382773e62ca5e46fd24e291585e566ee6adb3c
refs/heads/master
2020-06-25T08:35:31.461184
2017-07-12T05:43:58
2017-07-12T05:43:58
96,853,907
0
0
null
null
null
null
UTF-8
C++
false
false
1,193
h
PostProcessManager.h
#pragma once #include <Engine.h> #include "PostProcess.h" class cPostProcessManager { private: // Is the camera pointer Leadwerks::Camera *pCamera = NULL; bool bIsOK = false; // store loaded shaders std::map < std::string, cPostProcess *> mLoaded; public: // Construct PostProcess Manager cPostProcessManager( Leadwerks::Camera *Camera ); ~cPostProcessManager(); inline bool IsOK() { return bIsOK; } cPostProcess *IsLoaded( std::string Name ); cPostProcess *LoadLua ( std::string FilePath, std::string Name ); // Load and strore Shader loaded cPostProcess *Load( std::string FilePath, std::string Name, float StartFadeEffect = 0.0 ); // Returns if specific PP is actually active bool IsActive( std::string Name ); // Apply fading IN the shader bool FadeIn( std::string Name, unsigned int Time = 1 ); // Apply fading OUT the shader bool FadeOut( std::string Name, unsigned int Time = 1 ); // Directly apply shader bool Apply( std::string Name ); // Directly Remove shader bool Remove( std::string Name ); // Clear every post effect void Clear( void ); // Update all times and shaders void Update( void ); };
cfe02f0324c56c73c546ad5e5f90af35531ead95
47982addbb478e480fcc0d89e6a7bc6c9571f628
/lab1/main.cpp
4a34211e99eb9e88a06c794def24c981af1d932c
[]
no_license
atemmel/programming-methodology
e2d798b0fa83d48150ec1f0a8ce44486fa630a4c
d31d10f8e2a8924a1d6c102c6664fc90cfc70767
refs/heads/master
2020-04-06T18:43:39.058576
2018-12-14T10:40:06
2018-12-14T10:40:06
157,710,308
3
0
null
null
null
null
UTF-8
C++
false
false
3,029
cpp
main.cpp
#include "int_sorted.h" #include <iostream> #include <random> #include <chrono> void f(int_buffer buf) { int val = 1; for(int* i = buf.begin(); i != buf.end(); i++) { *i = val++; } for(const int* i = buf.begin(); i != buf.end(); i++) { std::cout << *i << '\n'; } } int_sorted sort(const int* begin, const int* end) { if(begin == end) return int_sorted(nullptr, 0); if(begin == end - 1) return int_sorted(begin, 1); ptrdiff_t half = (end - begin) / 2; const int* mid = begin + half; return sort(begin, mid).merge(sort(mid, end)); } void selectionSort(int* begin, int* end) { for(int* it = begin; it != end - 1; it++) { int* lowest = it; for(int* jt = it + 1; jt != end; jt++) { if(*jt < *lowest) lowest = jt; } std::swap(*it, *lowest); } } void compareSorts() { int_buffer bigBuffer(400000); for(int* it = bigBuffer.begin(); it != bigBuffer.end(); it++) { *it = rand(); } auto stdBuffer = bigBuffer; auto beginMerge = std::chrono::high_resolution_clock::now(); int_sorted merge = sort(bigBuffer.begin(), bigBuffer.end()); auto endMerge = std::chrono::high_resolution_clock::now(); std::chrono::duration<double> diffMerge = endMerge - beginMerge; std::cout << "Merge took: " << diffMerge.count() << " s\n"; auto beginStd = std::chrono::high_resolution_clock::now(); std::sort(stdBuffer.begin(), stdBuffer.end()); auto endStd = std::chrono::high_resolution_clock::now(); std::chrono::duration<double> diffStd = endStd - beginStd; std::cout << "Standard took: " << diffStd.count() << " s\n"; auto beginSelect = std::chrono::high_resolution_clock::now(); selectionSort(bigBuffer.begin(), bigBuffer.end()); auto endSelect = std::chrono::high_resolution_clock::now(); std::chrono::duration<double> diffSelect = endSelect - beginSelect; std::cout << "Selection took: " << diffSelect.count() << " s\n"; } void printSorted(const int_sorted & srt) { for(const int* it = srt.begin(); it != srt.end(); it++) { std::cout << *it << ", "; } std::cout << '\n'; } void printBuff(const int_buffer & buff) { for(const int* it = buff.begin(); it != buff.end(); it++) { std::cout << *it << ", "; } std::cout << '\n'; } int main() { //f(int_buffer(10)); int_buffer buff(10); std::mt19937 mt((std::random_device()())); std::uniform_int_distribution<int> dist(1, 100); /* for(int* it = buff.begin(); it != buff.end(); it++) { *it = dist(mt); } //int_sorted puts("int_sorted:" ); int_sorted sorted(buff.begin(), buff.size()); int_sorted secondSorted = sorted; printSorted(sorted); for(int i = 0; i < 10; i++) { sorted.insert(dist(mt)); } printSorted(sorted); printSorted(sorted.merge(secondSorted)); //merge puts("Merge sorted:"); auto mergeSortedBuff = sort(buff.begin(), buff.begin()); mergeSortedBuff.insert(5); printSorted(mergeSortedBuff); //selection puts("Selection sort:"); printBuff(buff); selectionSort(buff.begin(), buff.end()); printBuff(buff);*/ //chrono test srand(time(0)); compareSorts(); }
de347efbdc59e9df152cd117730f3416bc5fdfe0
ee16f2ee14125883a65bf5f8fa91831fea33d31b
/common/PluginManager.cpp
88bab92ce4c8a9ea95451f41fe9d5623193f210f
[]
no_license
Mononofu/sepm-temp
00d70f355a171abe28506dcb34673ad59eb28d59
bf9575c8e75b358d9d1d54a2b0c69e48d3be4196
refs/heads/master
2021-01-13T02:07:03.656466
2013-05-13T12:33:01
2013-05-13T12:33:01
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,030
cpp
PluginManager.cpp
#include "PluginManager.h" #include <boost/bind.hpp> #include <boost/filesystem.hpp> #include <dlfcn.h> namespace fs = boost::filesystem; PluginManager::PluginManager(string plugin_dir) { fs::path pluginDir(plugin_dir); if (!fs::exists(pluginDir) || !fs::is_directory(pluginDir)) throw PluginException(plugin_dir + " is not a directory"); fs::directory_iterator end_iter; for(fs::directory_iterator dir_iter(pluginDir); dir_iter != end_iter; ++dir_iter) { if(fs::is_regular_file(dir_iter->status()) ) { string filename = (*dir_iter).path().filename().string(); loadPlugin(filename); } } watcher = new FileWatcher(plugin_dir, boost::bind(&PluginManager::fileChanged, this, _1, _2, _3)); } void PluginManager::fileChanged(string name, bool isDir, FileWatcher::FileEvent e) { if(!isDir) { if(e == FileWatcher::CREATE || e == FileWatcher::MODIFY) loadPlugin(name); } } PluginManager::~PluginManager() { delete watcher; for(auto plugin : plugins.values()) { plugin->destroy(); } for(auto handle : handles.values()) { dlclose(handle); } } void PluginManager::loadPlugin(string plugin_name) { removePlugin(plugin_name); string path = "./plugins/" + plugin_name; void* handle = dlopen(path.c_str(), RTLD_LAZY); if(!handle) throw PluginException("failed to load plugin from " + path + ": " + dlerror()); Plugin* (*make_plugin)(); *(void **) (&make_plugin) = dlsym(handle, "make_plugin"); plugins[plugin_name] = make_plugin(); handles[plugin_name] = handle; } void PluginManager::removePlugin(string plugin_name) { if(plugins.contains(plugin_name)) { plugins[plugin_name]->destroy(); plugins.remove(plugin_name); dlclose(handles[plugin_name]); handles.remove(plugin_name); } } void PluginManager::listPlugins() { cout << "=== currently loaded plugins" << endl; for(auto plugin : plugins.values()) { cout << plugin->name() << endl; } }
6f55af1b306bd3548f3bcf00f1c780a91bd2db3b
f8738a35eab55ebd3633330222f301bf3159dcbe
/Codes/GameServer/WorldServer/WorldServer.cpp
c3104dbe6b75d056bc1e11dfee0415b822d9ecc8
[]
no_license
kasumielf/CURSUS2
e2f9c6fd2feecf75128a0df402e4dd0bc9ca55e7
be55b441a36fd9fa4865911cb170bb0eb0d07301
refs/heads/master
2021-06-20T19:32:49.519661
2020-12-18T06:06:50
2020-12-18T06:06:50
78,094,418
0
0
null
null
null
null
UTF-8
C++
false
false
24,466
cpp
WorldServer.cpp
#include "WorldServer.h" #include <curl/curl.h> #include <iostream> #include "json/json.h" size_t write_html(void *ptr, size_t size, size_t count, void *stream) { ((string*)stream)->append((char*)ptr, 0, size*count); return size*count; } WorldServer::WorldServer(const int port, const int maxCount, boost::asio::io_service &io_service) : BaseServer(port, maxCount, io_service) { gameWorld = new GameWorld(); gameWorld->Init(); forecast_refresh = true; current_forecast = Forecast::Sunny; for (int i = 100; i < MAX_GAMEROOM_SIZE; ++i) { gameroom_ids.push_back(i); } channel_info_packet.Init(); } WorldServer::~WorldServer() { delete gameWorld; } void WorldServer::ProcessPacket(const int sessionId, char* data) { PACKET_HEADER* pheader = (PACKET_HEADER*)data; switch (pheader->Id) { case REQ_CHANNEL_INFO_S2S: { CommonPacket::PACEKT_REQ_CHANNEL_INFO_S2S *pPacket = reinterpret_cast<CommonPacket::PACEKT_REQ_CHANNEL_INFO_S2S*>(data); channel_info_packet.capacity = gameWorld->GetCurrentPlayerCount(); channel_info_packet.status = 1; SendData(sessionId, channel_info_packet.Size, (char*)&channel_info_packet); break; } case REQ_PLAYER_ENTER: { CommonPacket::PACKET_REQ_PLAYER_WORLD_ENTER *pPacket = reinterpret_cast<CommonPacket::PACKET_REQ_PLAYER_WORLD_ENTER*>(data); CommonPacket::PACKET_REQ_USER_INFO sendPacket; sendPacket.Init(); sendPacket.session_id = sessionId; memcpy(sendPacket.login_id, pPacket->login_id, strlen(pPacket->login_id)+1); memcpy(sendPacket.password, pPacket->password, strlen(pPacket->password)+1); SendDataToInternalServer("DB", sendPacket.Size, (char*)&sendPacket); break; } case RES_USER_INFO: { CommonPacket::PACKET_RES_USER_INFO *pPacket = reinterpret_cast<CommonPacket::PACKET_RES_USER_INFO*>(data); CommonPacket::PACKET_RES_PLAYER_ENTER sendPacket; //if (gameWorld->isExistUser(pPacket->user_uid)) //{ // sendPacket.userUid = -1; //} //else { User *user = new User(); user->setUserUid(pPacket->user_uid); user->setId(pPacket->id); user->setUsername(pPacket->username); user->setWeight(pPacket->weight); user->setPosition(pPacket->x, pPacket->y, 0.0f); user->setCurrentMap(pPacket->current_map); user->setSessionId(pPacket->session_id); sendPacket.Init(); sendPacket.userUid = user->getUserUid(); strcpy_s(sendPacket.id, user->getId()); strcpy_s(sendPacket.username, user->getUsername()); sendPacket.weight = user->getWeight(); sendPacket.gender = user->getGender(); sendPacket.current_map = user->getCurrentMap(); gameWorld->AddUser(pPacket->session_id, user); session_ids[user->getUserUid()] = pPacket->session_id; CommonPacket::PACKET_NTF_PLAYER_ENTER ntf; ntf.Init(); ntf.user_id = user->getUserUid(); strcpy_s(ntf.username, user->getUsername()); ntf.x = user->getX(); ntf.y = user->getY(); ntf.z = user->getZ(); auto iter_b = gameWorld->GetCurrentMap()->GetUsersIterator_Begin(user->getCurrentMap()); auto iter_e = gameWorld->GetCurrentMap()->GetUsersIterator_End(user->getCurrentMap()); for (; iter_b != iter_e; ++iter_b) { if ((*iter_b)->getUserUid() != user->getUserUid()) { CommonPacket::PACKET_NTF_PLAYER_ENTER ntf_to_me; ntf_to_me.Init(); ntf_to_me.user_id = (*iter_b)->getUserUid(); strcpy_s(ntf_to_me.username, (*iter_b)->getUsername()); ntf_to_me.x = (*iter_b)->getX(); ntf_to_me.y = (*iter_b)->getY(); ntf_to_me.z = (*iter_b)->getZ(); SendData(pPacket->session_id, ntf_to_me.Size, reinterpret_cast<char*>(&ntf_to_me)); SendData(session_ids[(*iter_b)->getUserUid()], ntf.Size, reinterpret_cast<char*>(&ntf)); } } SendData(pPacket->session_id, sendPacket.Size, reinterpret_cast<char*>(&sendPacket)); SendData(pPacket->session_id, forecast_packet.Size, reinterpret_cast<char*>(&forecast_packet)); } break; } case REQ_PLAYER_MOVE: { CommonPacket::PACKET_REQ_PLAYER_MOVE *pPacket = (CommonPacket::PACKET_REQ_PLAYER_MOVE*)data; User* user = gameWorld->GetUserInfo(sessionId); if (user != nullptr) { gameWorld->SetPosition(sessionId, pPacket->x, pPacket->y, pPacket->z, pPacket->v, pPacket->r); CommonPacket::PACKET_NTF_PLAYER_MOVE ntf; ntf.Init(); ntf.user_id = user->getUserUid(); ntf.x = user->getX(); ntf.y = user->getY(); ntf.z = user->getZ(); ntf.v = user->getSpeed(); auto iter_b = gameWorld->GetCurrentMap()->GetUsersIterator_Begin(user->getCurrentMap()); auto iter_e = gameWorld->GetCurrentMap()->GetUsersIterator_End(user->getCurrentMap()); for (; iter_b != iter_e; ++iter_b) { if ((*iter_b)->getUserUid() != user->getUserUid() && (*iter_b)->isDuringOnGame() == false) { if(m_sessionList[session_ids[(*iter_b)->getUserUid()]] != nullptr && m_sessionList[session_ids[(*iter_b)->getUserUid()]]->isConnected()) SendData(session_ids[(*iter_b)->getUserUid()], ntf.Size, (char*)(&ntf)); } } } break; } case REQ_PLAYER_EXIT: { User* user = gameWorld->GetUserInfo(sessionId); if (user != nullptr) { CommonPacket::PACKET_NTF_PLAYER_EXIT ntf; ntf.Init(); ntf.user_id = user->getUserUid(); // 월드에서 부터 제거 auto iter_b = gameWorld->GetCurrentMap()->GetUsersIterator_Begin(user->getCurrentMap()); auto iter_e = gameWorld->GetCurrentMap()->GetUsersIterator_End(user->getCurrentMap()); for (; iter_b != iter_e; ++iter_b) { if ((*iter_b)->getUserUid() != user->getUserUid()) { SendData(session_ids[(*iter_b)->getUserUid()], ntf.Size, (char*)(&ntf)); } } // 게임 룸으로 부터 제거 for each(std::pair<int, GameRoom*> room in gamerooms) { room.second->PlayerExit(user); } this->RemoveSession(sessionId); gameWorld->RemoveUser(sessionId); delete user; Logging("Player %d is quit from world.", sessionId); } break; } case REQ_CREATE_ROOM_INFO: { GameRoomPacket::PACKET_REQ_CREATE_ROOM_INFO *req = (GameRoomPacket::PACKET_REQ_CREATE_ROOM_INFO*)data; GameRoomPacket::PACKET_RES_CREATE_ROOM_INFO res; res.Init(); int room_id = gameroom_ids.front(); gameroom_ids.pop_front(); User* user = gameWorld->GetUserInfo(sessionId); GameRoom* new_room = new GameRoom(this, gameWorld->GetUserInfo(sessionId), req->map_id, room_id); new_room->AddUser(sessionId, user); gamerooms[room_id] = new_room; res.room_id = room_id; res.map_id = req->map_id; res.result = 1; SendData(sessionId, res.Size, reinterpret_cast<char*>(&res)); break; } case REQ_ROOM_INFO: { for each(std::pair<short , GameRoom*> room in gamerooms) { if (room.second != nullptr && room.second->IsGameEnd() == false) { GameRoomPacket::PACKET_RES_ROOM_INFO res; res.Init(); res.room_id = room.first; res.map_id = room.second->GetMapId(); res.user_count = room.second->GetPlayerCount(); SendData(sessionId, res.Size, (char*)(&res)); } } break; } case REQ_ROOM_PLAYER_READY: { GameRoomPacket::PACKET_REQ_ROOM_PLAYER_READY *req = (GameRoomPacket::PACKET_REQ_ROOM_PLAYER_READY*)data; if (gamerooms[req->room_id] != nullptr) { User* user = gameWorld->GetUserInfo(sessionId); if (user != nullptr) gamerooms[req->room_id]->SetReady(user); } break; } case REQ_ROOM_PLAYER_EXIT: { GameRoomPacket::PACKET_REQ_ROOM_PLAYER_EXIT *req = (GameRoomPacket::PACKET_REQ_ROOM_PLAYER_EXIT*)data; if (gamerooms[req->room_id] != nullptr) { User* user = gameWorld->GetUserInfo(sessionId); if (user != nullptr) { gamerooms[req->room_id]->PlayerExit(user); if (gamerooms[req->room_id]->GetPlayerCount() <= 0) { delete gamerooms[req->room_id]; gamerooms.erase(req->room_id); AddGameRoomNumberId(req->room_id); } } } break; } case REQ_ROOM_SET_TYPE: { GameRoomPacket::PACKET_REQ_ROOM_SET_TYPE *req = (GameRoomPacket::PACKET_REQ_ROOM_SET_TYPE*)data; if (gamerooms[req->room_id] != nullptr) { gamerooms[req->room_id]->SetType(req->player_index, req->type); } break; } case REQ_ROOM_PLAYER_ENTER: { GameRoomPacket::PACKET_REQ_ROOM_PLAYER_ENTER *req = (GameRoomPacket::PACKET_REQ_ROOM_PLAYER_ENTER*)data; if (gamerooms[req->room_id] != nullptr) { User* user = gameWorld->GetUserInfo(sessionId); if (user != nullptr) gamerooms[req->room_id]->PlayerEnter(sessionId, user); } break; } case REQ_GAME_START: { GameRoomPacket::PACKET_REQ_ROOM_GAME_START *req = (GameRoomPacket::PACKET_REQ_ROOM_GAME_START*)data; if (gamerooms[req->room_id] != nullptr) { gamerooms[req->room_id]->GameStart(); } break; } case REQ_INGAME_PLAYER_LIST: { TrackScenePacket::PACKET_REQ_INGAME_PLAYER_LIST *req = (TrackScenePacket::PACKET_REQ_INGAME_PLAYER_LIST*)data; if (gamerooms[req->room_id] != nullptr) { gamerooms[req->room_id]->SendIngameObjects(req->player_index, sessionId); } break; } case REQ_INGAME_READY: { TrackScenePacket::PACKET_REQ_INGAME_READY *req = (TrackScenePacket::PACKET_REQ_INGAME_READY*)data; if (gamerooms[req->room_id] != nullptr) { gamerooms[req->room_id]->SetIngameReady(req->player_index); } break; } case REQ_ROOM_UPDATE_PLAYER_POSITION: { TrackScenePacket::PACKET_REQ_ROOM_UPDATE_PLAYER_POSITION *req = (TrackScenePacket::PACKET_REQ_ROOM_UPDATE_PLAYER_POSITION*)data; if (gamerooms[req->room_id] != nullptr) { gamerooms[req->room_id]->SetPosition(req->player_index, req->x, req->y, req->z, req->v, req->r); } break; } case REQ_UPDATE_TRACK_COUNT: { TrackScenePacket::PACKET_REQ_UPDATE_TRACK_COUNT *req = (TrackScenePacket::PACKET_REQ_UPDATE_TRACK_COUNT*)data; if (gamerooms[req->room_id] != nullptr) { gamerooms[req->room_id]->UpdateTrackCount(req->player_index); } break; } case REQ_GET_RECORD_DATA: { if (GetWorldPtr()->GetUserInfo(sessionId) != nullptr) { CommonPacket::PACKET_REQ_GET_RECORD_DATA *req = reinterpret_cast<CommonPacket::PACKET_REQ_GET_RECORD_DATA*>(data); CommonPacket::PACKET_REQ_GET_RECORD_DATA_S2S req_to_db; req_to_db.Init(); req_to_db.session_id = sessionId; req_to_db.user_uid = GetWorldPtr()->GetUserInfo(sessionId)->getUserUid(); SendDataToInternalServer("DB", req_to_db.Size, (char*)&req_to_db); } break; } case RES_GET_RECORD_DATA_S2S: { CommonPacket::PACKET_RES_GET_RECORD_DATA_S2S *req = reinterpret_cast<CommonPacket::PACKET_RES_GET_RECORD_DATA_S2S*>(data); CommonPacket::PACKET_RES_GET_RECORD_DATA res; res.Init(); res.record_time = req->record_time; res.checked_time = req->checked_time; SendData(req->session_id, res.Size, reinterpret_cast<char*>(&res)); break; } case REQ_UPDATE_RECORD_DATA: { if (GetWorldPtr()->GetUserInfo(sessionId) != nullptr) { CommonPacket::PACKET_REQ_UPDATE_RECORD_DATA *req = reinterpret_cast<CommonPacket::PACKET_REQ_UPDATE_RECORD_DATA*>(data); CommonPacket::PACKET_REQ_UPDATE_RECORD_DATA_S2S req_to_db; req_to_db.Init(); req_to_db.session_id = sessionId; req_to_db.user_uid = GetWorldPtr()->GetUserInfo(sessionId)->getUserUid(); req_to_db.record_time = req->record_time; req_to_db.checked_time = req->checked_time; SendDataToInternalServer("DB", req_to_db.Size, reinterpret_cast<char*>(&req_to_db)); } break; } case RES_UPDATE_RECORD_DATA_S2S: { CommonPacket::PACKET_RES_UPDATE_RECORD_DATA_S2S *req = reinterpret_cast<CommonPacket::PACKET_RES_UPDATE_RECORD_DATA_S2S*>(data); CommonPacket::PACKET_RES_UPDATE_RECORD_DATA res; res.Init(); res.result = req->result; SendData(req->session_id, res.Size, reinterpret_cast<char*>(&res)); break; } case REQ_RANKUSER_RECORD_DATA: { CommonPacket::PACKET_REQ_RANKUSER_RECORD_DATA_S2S req_to_db; req_to_db.Init(); req_to_db.session_id = sessionId; SendDataToInternalServer("DB", req_to_db.Size, reinterpret_cast<char*>(&req_to_db)); break; } case RES_RANKUSER_RECORD_DATA_S2S: { CommonPacket::PACKET_RES_RANKUSER_RECORD_DATA_S2S *res = reinterpret_cast<CommonPacket::PACKET_RES_RANKUSER_RECORD_DATA_S2S*>(data); CommonPacket::PACKET_RES_RANKUSER_RECORD_DATA res_to_client; res_to_client.Init(); res_to_client.item_count = res->item_count; for (int i = 0; i < res->item_count; ++i) { res_to_client.record_time[i] = res->record_time[i]; res_to_client.checked_time[i] = res->checked_time[i]; strcpy_s(res_to_client.username[i], res->username[i]); } SendData(res->session_id, res_to_client.Size, reinterpret_cast<char*>(&res_to_client)); break; } case REQ_GET_REPLAY_RECORD_DATA: { CommonPacket::PACKET_REQ_GET_REPLAY_RECORD_DATA *req = reinterpret_cast<CommonPacket::PACKET_REQ_GET_REPLAY_RECORD_DATA*>(data); CommonPacket::PACKET_REQ_GET_REPLAY_RECORD_DATA_S2S req_to_db; req_to_db.Init(); req_to_db.session_id = sessionId; req_to_db.user_uid = GetWorldPtr()->GetUserInfo(sessionId)->getUserUid(); SendDataToInternalServer("DB", req_to_db.Size, reinterpret_cast<char*>(&req_to_db)); break; } case REQ_UPDATE_REPLAY_RECORD_DATA: { CommonPacket::PACKET_REQ_UPDATE_REPLAY_RECORD_DATA *req = reinterpret_cast<CommonPacket::PACKET_REQ_UPDATE_REPLAY_RECORD_DATA*>(data); CommonPacket::PACKET_REQ_UPDATE_REPLAY_RECORD_DATA_S2S req_to_db; req_to_db.Init(); req_to_db.session_id = sessionId; req_to_db.user_uid = req->user_uid; for (int i = 0; i < 120; i++) { req_to_db.records[i] = req->records[i]; } SendDataToInternalServer("DB", req_to_db.Size, reinterpret_cast<char*>(&req_to_db)); break; } case RES_GET_REPLAY_RECORD_DATA_S2S: { CommonPacket::PACKET_RES_GET_REPLAY_RECORD_DATA_S2S *res = reinterpret_cast<CommonPacket::PACKET_RES_GET_REPLAY_RECORD_DATA_S2S*>(data); CommonPacket::PACKET_RES_GET_REPLAY_RECORD_DATA res_to_client; res_to_client.Init(); res_to_client.index = res->index; for (int i = 0; i < 120; i++) { res_to_client.records[i] = res->records[i]; } res_to_client.record_time = res->record_time; std::cout << "GET REPLAY FROM DB! " << res->index << std::endl; char* data = reinterpret_cast<char*>(&res_to_client); PACKET_DUMMY dummy; dummy.Init(); std::cout << "size : " << res_to_client.Size << std::endl; SendData(res->session_id, res_to_client.Size, data); SendData(res->session_id, dummy.Size, reinterpret_cast<char*>(&dummy)); break; } case RES_UPDATE_REPLAY_RECORD_DATA_S2S: { CommonPacket::PACKET_RES_UPDATE_REPLAY_RECORD_DATA_S2S *res = reinterpret_cast<CommonPacket::PACKET_RES_UPDATE_REPLAY_RECORD_DATA_S2S*>(data); CommonPacket::PACKET_RES_UPDATE_REPLAY_RECORD_DATA res_to_client; res_to_client.Init(); res_to_client.result = res->result; SendData(res->session_id, res_to_client.Size, reinterpret_cast<char*>(&res_to_client)); break; } default: { Logging("Invalid WorldServer Request! %d", pheader->Id); this->CloseSession(sessionId); gameWorld->RemoveUser(sessionId); break; } } } void WorldServer::UpdatePlayDataThread() { while (true) { auto iter_b = gameWorld->getPlayersBegin(); auto iter_e = gameWorld->getPlayersEnd(); CommonPacket::PACKET_REQ_PLAYER_DATA_UPDATE_S2S packet; packet.Init(); // 접속 해제된 유저 처리 안되어있음. for (; iter_b != iter_e; ++iter_b) { if ((*iter_b).second != nullptr) { if ((*iter_b).second->isDuringOnGame() == false) { packet.userUid = (*iter_b).second->getUserUid(); packet.x = (*iter_b).second->getX(); packet.y = (*iter_b).second->getY(); packet.map_id = (*iter_b).second->getCurrentMap(); SendDataToInternalServer("DB", packet.Size, (char*)&packet); } } } boost::this_thread::sleep(boost::posix_time::milliseconds(60000)); } } void WorldServer::NotifyToMySector(User * user, PACKET_HEADER packet) { } void WorldServer::NotifyForecastInfo() { forecast_packet.forecast = (char)current_forecast; SendBoradCast(reinterpret_cast<char*>(&forecast_packet), forecast_packet.Size); } void WorldServer::UpdateForecastInfoThread() { // 타이머 스레드를 돌려서 1분에 1번 씩 접속한 클라이언트 전원에게 // node에서 받아온 기상 정보를 전송한다. // 공유 메모리에 접근한다. // 스레드 관리 주의해야함. // 주의해야 할 점 : 스레드 내에서 각각의 클라에다가 정보를 던지는데 다른 스레드에서 해당 클라이언트를 erase 할 수 있다. // erase 된 객체에 이쪽 스레드에서 send 를 날리면 안됨. // 이걸로 락 걸기는 좀 그렇다. 근데 임의 객체에 기상 정보를 날린다고 해도 어짜피 변조 의미가 없는 정보니 상관 없을수도 있음. // 아무튼 주의해야함. forecast_packet.Init(); CURL *curl; CURLcode res; curl = curl_easy_init(); std::string data; Json::Reader reader; Json::Value json_value; while (true) { if (curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://127.0.0.1:1337/forecast"); res = curl_easy_perform(curl); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_html); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &data); reader.parse(data, json_value); } int len = json_value.size(); for (int i=0;i<10;++i) { if (i >= len) { forecast_packet.value[i] = 0; } else { forecast_packet.value[i] = json_value[i]["value"].asFloat(); } } int forecast_val = json_value[1]["value"].asInt(); if (forecast_refresh) { switch(forecast_val) { case 1: current_forecast = Forecast::Rain; break; case 2: current_forecast = Forecast::Snow; break; default: current_forecast = Forecast::Sunny; break; } } NotifyForecastInfo(); boost::this_thread::sleep(boost::posix_time::milliseconds(30000)); } curl_easy_cleanup(curl); } void WorldServer::Start() { BaseServer::Start(); forecastThread = boost::thread(boost::bind(&WorldServer::UpdateForecastInfoThread, this)); playdataUpdateThread = boost::thread(boost::bind(&WorldServer::UpdatePlayDataThread, this)); } void WorldServer::SetForecastToSnow() { current_forecast = Forecast::Snow; forecast_refresh = false; NotifyForecastInfo(); } void WorldServer::SetForecastToRain() { current_forecast = Forecast::Rain; forecast_refresh = false; NotifyForecastInfo(); } void WorldServer::SetForecastToSunny() { current_forecast = Forecast::Sunny; forecast_refresh = false; NotifyForecastInfo(); } void WorldServer::SetForecastToUpdating() { forecast_refresh = true; } void WorldServer::InitMapData() { float track_start_point[8][4] = { { 95.0f, -10.0f, 58.32f, 180.0f }, { 90.0f, -5.0f, 57.65f, 180.0f }, { 85.0f, 0.0f, 57.34f, 180.0f }, { 80.0f, 5.0f, 57.17f, 180.0f }, { 75.0f, 10.0f, 57.17f, 180.0f }, { 70.0f, 15.0f, 57.29f, 180.0f }, { 65.0f, 20.0f, 57.91f, 180.0f }, { 60.0f, 25.0f, 58.18f, 180.0f }, }; float hangang_start_point[8][4] = { { 0.4f, 16.05f, 10.12f, -8.72f}, { -1.31f, 15.78f, 10.12f, -8.72f }, { -3.21f, 15.48f, 10.12f, -8.72f }, { -5.28f, 15.17f, 10.12f, -8.72f }, { 0.87f, 13.53f, 10.12f, -8.72f }, { -0.92f, 13.26f, 10.12f, -8.72f }, { -2.82f, 12.96f, 10.12f, -8.72f }, { -4.89f, 12.65f, 10.12f, -8.72f }, }; TrackMapData* hangang = new TrackMapData(100, 1, hangang_start_point); TrackMapData* track = new TrackMapData(101, 2, track_start_point); track_datas[100] = hangang; track_datas[101] = track; }
543e124d0557ccb438581580821dbb6bf1c84d4c
c08690a2b71e16a37cc96c0b694b5d3ea3b27c97
/android/app/src/main/cpp/native-lib.cpp
0012cdce80a8bc846684b07f104410d77962b58e
[]
no_license
sweetdream779/tensorflow_lite
f18aadbc7ca2565296e7a6bdbeb1ccb7cb56c43a
31bd1e39e3152e6035468faf9bef066519f7c058
refs/heads/master
2020-03-25T14:49:27.747364
2018-11-01T08:59:53
2018-11-01T08:59:53
143,866,030
0
0
null
null
null
null
UTF-8
C++
false
false
11,185
cpp
native-lib.cpp
#include <jni.h> #include <string> #include <dirent.h> #include <unordered_map> #include <android/log.h> #include <android/bitmap.h> #include <dlib/image_io.h> #include <dlib/dnn.h> #include <dlib/image_processing/frontal_face_detector.h> #include <dlib/image_processing.h> #include <dlib/svm/svm_multiclass_linear_trainer.h> using namespace std; using namespace dlib; #define LOG_TAG "Native" #define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__) #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__) template <template <int,template<typename>class,int,typename> class block, int N, template<typename>class BN, typename SUBNET> using residual = dlib::add_prev1<block<N,BN,1,dlib::tag1<SUBNET>>>; template <template <int,template<typename>class,int,typename> class block, int N, template<typename>class BN, typename SUBNET> using residual_down = dlib::add_prev2<dlib::avg_pool<2,2,2,2,dlib::skip1<dlib::tag2<block<N,BN,2,dlib::tag1<SUBNET>>>>>>; template <int N, template <typename> class BN, int stride, typename SUBNET> using block = BN<dlib::con<N,3,3,1,1,dlib::relu<BN<dlib::con<N,3,3,stride,stride,SUBNET>>>>>; template <int N, typename SUBNET> using ares = dlib::relu<residual<block,N,dlib::affine,SUBNET>>; template <int N, typename SUBNET> using ares_down = dlib::relu<residual_down<block,N,dlib::affine,SUBNET>>; template <typename SUBNET> using alevel0 = ares_down<256,SUBNET>; template <typename SUBNET> using alevel1 = ares<256,ares<256,ares_down<256,SUBNET>>>; template <typename SUBNET> using alevel2 = ares<128,ares<128,ares_down<128,SUBNET>>>; template <typename SUBNET> using alevel3 = ares<64,ares<64,ares<64,ares_down<64,SUBNET>>>>; template <typename SUBNET> using alevel4 = ares<32,ares<32,ares<32,SUBNET>>>; using anet_type = dlib::loss_metric<dlib::fc_no_bias<128, dlib::avg_pool_everything< alevel0< alevel1< alevel2< alevel3< alevel4< dlib::max_pool<3,3,2,2,dlib::relu<dlib::affine<dlib::con<32,7,7,2,2, dlib::input_rgb_image_sized<150> >>>>>>>>>>>>; dlib::frontal_face_detector detector = dlib::get_frontal_face_detector(); dlib::frontal_face_detector detector1 = dlib::get_frontal_face_detector(); dlib::shape_predictor sp, sp1; anet_type net, net1; //std::vector<matrix<float, 0, 1>> known_faces; std::unordered_map<std::string, matrix<float, 0, 1>> known_faces; typedef matrix<float, 0, 1> sample_type; typedef linear_kernel<sample_type> lin_kernel; multiclass_linear_decision_function<lin_kernel, string> df; typedef struct { uint8_t alpha;//r uint8_t red;//g uint8_t green;//b uint8_t blue;//a see rgb_pixel assignment } argb; float FACE_RECOGNIZE_THRESH = 0.55; extern "C" JNIEXPORT jint JNICALL Java_dlib_android_FaceRecognizer_loadResourcesPart1(JNIEnv *env, jobject instance) { LOGI("load resource part1"); FILE *file1 = fopen("/sdcard/Download/shape_predictor_5_face_landmarks.dat", "r+"); FILE *file2 = fopen("/sdcard/Download/dlib_face_recognition_resnet_model_v1.dat", "r+"); if (file1 != NULL && file2 != NULL ) { fclose(file1); fclose(file2); dlib::deserialize("/sdcard/Download/shape_predictor_5_face_landmarks.dat") >> sp; dlib::deserialize("/sdcard/Download/dlib_face_recognition_resnet_model_v1.dat") >> net; DIR *d; char *p1,*p2; int ret; struct dirent *dir; d = opendir("/sdcard/Download"); if (d) { LOGI("Loading feature vectors using *.vec", p1); while ((dir = readdir(d)) != NULL) { p1=strtok(dir->d_name,"."); p2=strtok(NULL,"."); if(p2!=NULL) { ret=strcmp(p2,"vec"); if(ret==0) { std::string name = std::string(p1); std::string file = name + ".vec"; matrix<float, 0, 1> face_vector; dlib::deserialize("/sdcard/Download/" + file) >> face_vector; known_faces.insert({name, face_vector}); } } } closedir(d); } } else { LOGI("Failed to load resources part1"); return -1; //failed } return 0; }extern "C" JNIEXPORT jint JNICALL Java_dlib_android_FaceRecognizer_loadResourcesPart2(JNIEnv *env, jobject instance) { LOGI("load resource part2"); FILE *file1 = fopen("/sdcard/Download/shape_predictor_5_face_landmarks.dat", "r+"); FILE *file2 = fopen("/sdcard/Download/dlib_face_recognition_resnet_model_v1.dat", "r+"); if (file1 != NULL && file2 != NULL ) { fclose(file1); fclose(file2); dlib::deserialize("/sdcard/Download/shape_predictor_5_face_landmarks.dat") >> sp1; dlib::deserialize("/sdcard/Download/dlib_face_recognition_resnet_model_v1.dat") >> net1; } else{ LOGI("Failed to load resources part2"); return -1; } return 0; }extern "C" JNIEXPORT jobjectArray JNICALL Java_dlib_android_FaceRecognizer_recognizeFaces(JNIEnv *env, jobject instance, jobject bmp) { jobjectArray strarr; std::vector<string> names; AndroidBitmapInfo infocolor; void *pixelscolor; int y; int x; int ret; array2d<rgb_pixel> img; if ((ret = AndroidBitmap_getInfo(env, bmp, &infocolor)) < 0) { LOGE("AndroidBitmap_getInfo() failed ! error=%d", ret); //return env->NewStringUTF("Image broken"); return strarr; } LOGI("color image :: width is %d; height is %d; stride is %d; format is %d;flags is %d", infocolor.width, infocolor.height, infocolor.stride, infocolor.format, infocolor.flags); if (infocolor.format != ANDROID_BITMAP_FORMAT_RGBA_8888) { LOGE("Bitmap format is not RGBA_8888 !"); //return env->NewStringUTF("Image broken 2"); return strarr; } if ((ret = AndroidBitmap_lockPixels(env, bmp, &pixelscolor)) < 0) { LOGE("AndroidBitmap_lockPixels() failed ! error=%d", ret); } img.set_size(infocolor.height, infocolor.width); // LOGI("size w=%d h=%d", infocolor.width, infocolor.height); for (y = 0; y < infocolor.height; y++) { //todo: performance argb *line = (argb *) pixelscolor; for (x = 0; x < infocolor.width; ++x) { rgb_pixel p(line[x].alpha, line[x].red, line[x].green); img[y][x] = p; } pixelscolor = (char *) pixelscolor + infocolor.stride; } //dlib::save_bmp(img, "/sdcard/Download/res1.bmp"); std::vector<dlib::rectangle> dets = detector1(img); if (dets.size() == 0){ return strarr; } std::vector<matrix<rgb_pixel>> faces; for (auto face : dets) { auto shape = sp1(img, face); matrix<rgb_pixel> face_chip; extract_image_chip(img, get_face_chip_details(shape, 150, 0.25), face_chip); faces.push_back(move(face_chip)); } std::vector<matrix<float, 0, 1>> face_descriptors = net1(faces); for (size_t i = 0; i < face_descriptors.size(); ++i) { std::string name = "Unknown"; for (auto j : known_faces) { float dist = length(face_descriptors[i] - j.second); if (dist < FACE_RECOGNIZE_THRESH) { name = j.first; break; } } names.push_back(name); } AndroidBitmap_unlockPixels(env, bmp); if(names.size() > 0) { strarr = env->NewObjectArray(names.size(), env->FindClass("java/lang/String"), nullptr); for (int i = 0; i < names.size(); ++i) { env->SetObjectArrayElement(strarr, i, env->NewStringUTF(names[i].c_str())); } } return strarr; }extern "C" JNIEXPORT jstring JNICALL Java_dlib_android_FaceRecognizer_recognizeFace(JNIEnv *env, jobject instance, jobject bmp) { AndroidBitmapInfo infocolor; void *pixelscolor; int y; int x; int ret; array2d<rgb_pixel> img; if ((ret = AndroidBitmap_getInfo(env, bmp, &infocolor)) < 0) { LOGE("AndroidBitmap_getInfo() failed ! error=%d", ret); return env->NewStringUTF("Image broken"); } LOGI("color image :: width is %d; height is %d; stride is %d; format is %d;flags is %d", infocolor.width, infocolor.height, infocolor.stride, infocolor.format, infocolor.flags); LOGI("known_faces size %d", known_faces.size()); if (infocolor.format != ANDROID_BITMAP_FORMAT_RGBA_8888) { LOGE("Bitmap format is not RGBA_8888 !"); return env->NewStringUTF("Image broken 2"); } if ((ret = AndroidBitmap_lockPixels(env, bmp, &pixelscolor)) < 0) { LOGE("AndroidBitmap_lockPixels() failed ! error=%d", ret); } img.set_size(infocolor.height, infocolor.width); for (y = 0; y < infocolor.height; y++) { //todo: performance argb *line = (argb *) pixelscolor; for (x = 0; x < infocolor.width; ++x) { rgb_pixel p(line[x].alpha, line[x].red, line[x].green); img[y][x] = p; } pixelscolor = (char *) pixelscolor + infocolor.stride; } //todo: smth wrong with colors //dlib::save_bmp(img, "/sdcard/Download/res.bmp"); std::vector<dlib::rectangle> dets = detector(img); LOGI("detected size %d", dets.size()); float min_dist = 0.0; if(dets.size() > 0 ){ auto face = dets.front(); std::vector<matrix<rgb_pixel>> faces; int x = face.left(); int y = face.top(); int width = face.width(); int height = face.height(); auto shape = sp(img, face); // LOGI("shape predictor"); matrix<rgb_pixel> face_chip; extract_image_chip(img, get_face_chip_details(shape, 150, 0.25), face_chip); faces.push_back(move(face_chip)); // LOGI("before recognized size %d", -1); std::vector<matrix<float, 0, 1>> face_descriptors = net(faces); // LOGI("after recognized size %d", face_descriptors.size()); if (face_descriptors.size() > 0) { matrix<float, 0, 1> face_desc = face_descriptors[0]; for (auto i : known_faces) { float dist = length(face_desc - i.second ); if (dist < min_dist){ min_dist = dist; } if( dist < FACE_RECOGNIZE_THRESH) { //LOGI("recognized"); return env->NewStringUTF(i.first.c_str()); } } } LOGI("not recognized, max dist %0.2f", min_dist); } LOGI("unlocking pixels"); AndroidBitmap_unlockPixels(env, bmp); std::string returnValue = "Unknown"; return env->NewStringUTF(returnValue.c_str()); }
52cbf12fbddf15505bcb7886b9c5d5fd3915e651
662202032d528387d3ccc3b3992db00a7ff7aeeb
/PTA/basicti/#1027.cpp
fdcccef46f054009929cc6404f88940097c96e14
[]
no_license
loucx/C
6afd5c9d0262b621a392636c4debaa3446018e9f
0a753febdef4a781cb33e43a010c6fd6dbabdf7e
refs/heads/master
2020-03-29T15:14:32.250445
2019-09-15T10:49:34
2019-09-15T10:49:34
150,052,024
0
0
null
null
null
null
UTF-8
C++
false
false
718
cpp
#1027.cpp
#include<cstdio> #include<cmath> int main(){ int n,x,a; char c; scanf("%d %c",&n,&c); x=int(sqrt(2.0*(n+1))-1); if(x%2==0)x--; a = n - (pow((1+x),2.0)/2-1); //printf("%d",a); for(int i=x;i>0;i=i-2){ for(int k=0;k<(x-i)/2;k++){ printf(" "); } for(int j=0;j<i;j++){ printf("%c",c); } printf("\n"); } for(int i=3;i<=x;i=i+2){ for(int k=0;k<(x-i)/2;k++){ printf(" "); } for(int j=0;j<i;j++){ printf("%c",c); } if(i!=x)printf("\n"); else { printf("\n%d",a); } } if(n<7)printf("%d",n-1); return 0; }
7268d79f8348307de23d6aee4f8e92aed3f52514
65157acc8b12064bde1ed971cf146a66c992948c
/C++/1일차/3_thiscall.cpp
4c6028045d3fb0308f7be4edec4ff505f4d36493
[]
no_license
didw/lecture
b198878cef6d90da3e148bc610f3c094441ac8c3
1cad26211b2e0cfa9ac57a8b98adca0246a225c7
refs/heads/master
2021-01-21T04:41:03.892476
2016-06-28T11:00:49
2016-06-28T11:00:49
48,176,282
1
0
null
null
null
null
UHC
C++
false
false
720
cpp
3_thiscall.cpp
// 3_thiscall - 13 page ~ class Point { int x, y; public: void set(int a, int b) // void set( Point* const this, int a, int b) { x = a; // this->x = a; y = b; // this->y = b; 라고 컴파일 됩니다. } static void foo(int a)// void foo(int a) { x = a; // this->x = a; 로 변경해야 하는데 this가 없다. error } }; int main() { Point::foo(10); // 객체 없이 호출 Point p1, p2; p1.set(10, 20); // 이 한줄의 원리를 생각해 봅시다. // set(&p1, 10, 20)으로 변하게 됩니다. // push 20 // push 10 // mov ecx, &p1 객체 주소는 스택이 아닌 레지스터에 // call set... } // 14 page입니다.
e909ca9302972af2491c63230b2bd8c54d53fd9a
8dec835d8c05df9fbadee9e168b0505be015d4f5
/imgv/pluginNet.cpp
0688fd3221011459769aa7e26150b85d24351758
[]
no_license
blobule/imgv
9936c4681b6f5c7dd1dad516778a687160301c8c
bb3587ecc9af3d112db2db28bb5c99f592337080
refs/heads/master
2020-03-07T07:28:52.570543
2018-03-29T22:08:29
2018-03-29T22:08:29
127,350,524
0
0
null
null
null
null
UTF-8
C++
false
false
13,009
cpp
pluginNet.cpp
#include <imgv/pluginNet.hpp> #include <sys/time.h> #undef VERBOSE //#define VERBOSE using namespace std; #define Q_IN 0 #define Q_OUT 1 #define Q_CMD 2 #define Q_LOG 3 pluginNet::pluginNet() { // ports ports["in"]=Q_IN; // -> mode==SEND: Everything here (image+ctrl) is forwarded to the net. ports["out"]=Q_OUT; // -> mode==RECEIVE : Everything received is put here. ports["cmd"]=Q_CMD; // to control this plugin ports["log"]=Q_LOG; portsIN["in"]=true; portsIN["cmd"]=true; buf=NULL; } pluginNet::~pluginNet() { log << "delete" <<warn;} void pluginNet::init() { log << "init! "<<warn; mode=MODE_NONE; type=TYPE_UDP; n=0; realtime=true; // skip images if net too slow or images arrive to fast n0=-1; scale=-1.0; // no reduction mtu=1500; delay=0; debug=false; if( buf!=NULL ) free(buf); buf=(unsigned char *)malloc(mtu+100); } void pluginNet::uninit() { log << "uninit"<<warn; if( buf!=NULL ) { free(buf);buf=NULL; } } int pluginNet::checksum(unsigned char *data,int size) { unsigned char m=0; for(int i=0;i<size;i++) m=m^data[i]; return(m); } bool pluginNet::loop() { //log << "loop triage size " <<triage.size()<<info; if( mode==MODE_NONE ) { // check commands only pop_front_ctrl_wait(Q_CMD); return true; } // check for commands in case... pop_front_ctrl_nowait(Q_CMD); if( mode==MODE_OUT ) { // empty completely the IN queue to the network // Since we don't decode, we ask for raw message for(;;) { message *m; blob *image; pop_front_wait_nohandler(Q_IN,m,image); if( m==NULL && image==NULL ) break; // queue is empty if( m!=NULL ) { if( debug ) log << "got message size="<<m->size<<" , sending out" << info; if( type==TYPE_TCP ) { char preamble[4]; oscutils::FromInt32(preamble,m->size); if( debug )printf("sending premble 0x%02x%02x%02x%02x\n",preamble[0],preamble[1],preamble[2],preamble[3]); tcp_send_data(&tcp,preamble,4); tcp_send_data(&tcp,(const char *)m->data,m->size); }else{ // UDP or MULTICAST udp_send_data(&udp,(unsigned char *)m->data,m->size); } recyclable::recycle((recyclable **)&m); } if( image!=NULL ) { if( debug ) log << "got image n="<<image->n<<info; //checkOutgoingMessages("image-sending",now,-1,-1); // $x is image number sendImage(image); // we could send it to an output port instead... //recyclable::recycle((recyclable **)&image); push_back(Q_OUT,&image); // event! we just sent an image! struct timeval tv; gettimeofday(&tv,NULL); double now=tv.tv_sec+tv.tv_usec/1000000.0; checkOutgoingMessages("sent",now,-1,-1); // $x is image number } } return true; } if( mode==MODE_IN ) { if( type==TYPE_TCP ) { int k; if( !tcp_server_is_connected(&tcp) ) { log << "waiting for tcp connexion"<<warn; tcp_server_wait(&tcp); if( !tcp_server_is_connected(&tcp) ) { log << "error getting tcp connexion"<<warn; tcp_server_close(&tcp); mode=MODE_NONE; } log << "got tcp connexion"<<warn; } int32 len; char preamble[4]; // get packet size k=tcp_receive_data_exact(&tcp,preamble,4); if( debug ) printf("k=%d, got premble 0x%02x%02x%02x%02x\n",k,preamble[0],preamble[1],preamble[2],preamble[3]); len=oscutils::ToInt32(preamble); if( k==0 ) { log << "lost TCP connexion"<<err; tcp_server_close_connection(&tcp); tcp_server_close(&tcp); return true; } if( len>mtu ) { // skip this packet log << "TCP packet size "<<len<<" too big. Skipping."<<err; while( len>0 ) { int n=len; if( n>mtu ) n=mtu; k=tcp_receive_data_exact(&tcp,(const char *)buf,n); if( k==0 ) break; // lost connexion. done. len-=k; } return true; } // get packet k=tcp_receive_data_exact(&tcp,(const char *)buf,len); if( k>0 ) processInMessage(buf,len); return true; }else{ // wait for something on the network (-1=err, otherwise its the size) // same for UDP and multicast int sz=udp_receive_data(&udp,buf,mtu); if( debug ) log << "got NET message size="<<sz<<info; processInMessage(buf,sz); } } return true; } bool pluginNet::decode(const osc::ReceivedMessage &m) { // verification pour un /defevent log << "decoding "<<m<<" triage size "<<triage.size()<<info; if( plugin::decode(m) ) return true; const char *address=m.AddressPattern(); // en tout temps... if( oscutils::endsWith(address,"/real-time") ) { m.ArgumentStream() >> realtime >> osc::EndMessage; //log << "real-time set to "<<realtime<<warn; }else if( oscutils::endsWith(address,"/view") ) { const char *view; m.ArgumentStream() >> view >> osc::EndMessage; this->view=view; }else if( oscutils::endsWith(address,"/scale") ) { // use <0 to deactivate float v; m.ArgumentStream() >> v >> osc::EndMessage; scale=v; log << "scaling output image by a factor "<<scale<<warn; }else if( oscutils::endsWith(address,"/out/udp") ) { // check if already running... if so, close the socket. // ... mode=MODE_NONE; const char *ip; int32 port; int32 delay; m.ArgumentStream() >> ip >> port >> delay >> osc::EndMessage; this->delay=delay; log << "out UDP to "<< ip <<" port "<<port<<" delay "<<delay<<warn; int k=udp_init_sender(&udp,ip,port,UDP_TYPE_NORMAL); // _BROADCAST, _MULTICAST if( k<0 ) { log << "Unable to access network for "<<ip<<":"<<port<<err; }else{ mode=MODE_OUT; type=TYPE_UDP; } }else if( oscutils::endsWith(address,"/out/multicast") ) { // check if already running... if so, close the socket. //... mode=MODE_NONE; const char *ip; int32 port; int32 delay; m.ArgumentStream() >> ip >> port >> delay >> osc::EndMessage; this->delay=delay; log << "out MULTICAST to "<< ip <<" port "<<port<<" delay "<<delay<<warn; int k=udp_init_sender(&udp,ip,port,UDP_TYPE_MULTICAST); // _BROADCAST, _MULTICAST if( k<0 ) { log << "Unable to access network for "<<ip<<":"<<port<<err; }else{ mode=MODE_OUT; type=TYPE_MULTICAST; } }else if( oscutils::endsWith(address,"/in/udp") ) { // make sure mode is NONE (close everything) mode=MODE_NONE; int32 port; m.ArgumentStream() >> port >> osc::EndMessage; log << "in UDP from "<<" port "<<port<<warn; int k=udp_init_receiver(&udp,port,NULL); if( k<0 ) { log << "network: Unable to listen to port "<<port<<err; }else{ log<<"Listening to "<<port<<warn; mode=MODE_IN; type=TYPE_UDP; } }else if( oscutils::endsWith(address,"/in/multicast") ) { // make sure mode is NONE (close everything) mode=MODE_NONE; const char *ip; int32 port; m.ArgumentStream() >> ip >> port >> osc::EndMessage; log << "in MULTICAST from "<< ip << " : " << port<<warn; int k=udp_init_receiver(&udp,port,(char *)ip); if( k<0 ) { log << "network: Unable to listen to ip "<<ip<<" port "<<port<<err; }else{ log<<"Listening to "<<ip<<" : "<<port<<warn; mode=MODE_IN; type=TYPE_MULTICAST; } }else if( oscutils::endsWith(address,"/out/tcp") ) { // make sure mode is NONE (close everything) mode=MODE_OUT; type=TYPE_TCP; const char *ip; int32 port; m.ArgumentStream() >> ip >> port >> osc::EndMessage; log << "out TCP to "<< ip <<" port "<<port<<warn; int k=tcp_client_init(&tcp,ip,port); if( k ) { log << "unable to open outgoing tcp to " << ip << " port " <<port << err; mode=MODE_NONE; }else{ log << "connected outgoing tcp to " << ip << " port " <<port << err; } }else if( oscutils::endsWith(address,"/in/tcp") ) { // make sure mode is NONE (close everything) mode=MODE_IN; type=TYPE_TCP; int32 port; m.ArgumentStream() >> port >> osc::EndMessage; log << "in TCP from "<<" port "<<port<<warn; int k=tcp_server_init(&tcp,port); if( k ) { log << "unable to listen for TCP connexion on port "<<port<<err; mode=MODE_NONE; } }else if( oscutils::endsWith(address,"/debug") ) { m.ArgumentStream() >> debug >> osc::EndMessage; }else{ log << "commande inconnue: "<<m<<err; return false; } return true; } void pluginNet::processInMessage(unsigned char *buf,int sz) { message *m=getMessage(sz); m->set((const char *)buf,sz); // check special /@@@/stream/image or /@@@/stream/data to reconstruct images // SHOULD CHECK FASTER IF IT IS A /@@@ MESSAGE! m->decode(); int imaging=0; for(int i=0;i<m->msgs.size();i++) { const char *address=m->msgs[i].AddressPattern(); if( oscutils::endsWith(address,"/@@@/stream/image") ) { receiveImageStart(m->msgs[i]); imaging=1; }else if( oscutils::endsWith(address,"/@@@/stream/data") ) { receiveImageData(m->msgs[i]); imaging=1; } } if( imaging==0 ) push_back(Q_OUT,&m); // send out the complete message since it is not /@@@ else recyclable::recycle((recyclable **)&m); // don't send since its an image. just recycle } // // receive an image : start of image // we known the message is /@@@/stream/image // void pluginNet::receiveImageStart(const osc::ReceivedMessage &m) { // send current image, if not already sent if( i0!=NULL ) { log << "event received check" << warn; checkOutgoingMessages("received",0,-1,-1); push_back(Q_OUT,&i0);n0=-1; } //log << "received "<<m<< warn; int32 num,w,h,sz,type; const char *view; m.ArgumentStream() >> n0 >> num >> w >> h >> sz >> type >> view >> dsz >> osc::EndMessage; if( debug ) { log << "got image "<< n0 << " " << num << " " << w << " " << h << " " << sz << " " << type << " " << view << " " << dsz << info; } // get a recyclable image... maybe we should auto-allocate... (/realtime) i0=pop_front_wait(Q_IN); i0->create(cv::Size(w,h),type); //dsz=w*h*i0->elemSize(); // target size //i0->n=num; if( !this->view.empty() ) { // the view was set with /view, so replace it. i0->view=this->view; }else{ i0->view=string(view); } //log << "starting img "<<w<<" x "<<h<<" dsz="<<dsz<<warn; } // // receive an image : data of image // we known the message is /@@@/stream/data // void pluginNet::receiveImageData(const osc::ReceivedMessage &m) { osc::Blob bobo; int32 n0r,b; m.ArgumentStream() >> n0r >> b >> bobo >> osc::EndMessage; if( n0r!=n0 ) { if( debug ) log << "data packet "<<n0r<<" does not match "<<n0<<err; return; } memcpy(i0->data+b,bobo.data,bobo.size); if( debug ) log << "got data "<<b<<" size "<<bobo.size<<" =?= "<<dsz<<info; if( b+bobo.size==dsz ) { // this was the last bloc. send the image log << "event received check" << warn; checkOutgoingMessages("received",0,-1,-1); push_back(Q_OUT,&i0); n0=-1; } } // // send an image // void pluginNet::sendImage(blob *i1) { log << "sending images" << info; message *m=getMessage(mtu); cv::Mat ix; if( scale>0.0 ) cv::resize(*i1,ix, cv::Size(), scale,scale); else ix=*i1; // no data copy... int sz=ix.elemSize(); int ty=ix.type(); int dsz=ix.cols * ix.rows * sz; int chunk=mtu-160; // send general info about a new image *m<<osc::BeginMessage("/@@@/stream/image") << n << i1->n << ix.cols << ix.rows << sz << ty << (this->view.empty()?i1->view:this->view) << dsz << osc::EndMessage; if( type==TYPE_UDP || type==TYPE_MULTICAST ) { udp_send_data(&udp,(unsigned char *)m->ops->Data(),m->ops->Size()); if( delay ) usleepSafe(delay); }else if( type==TYPE_TCP ) { //log << "********** tcp out "<<m->ops->Size()<<info; char preamble[4]; oscutils::FromInt32(preamble,m->ops->Size()); tcp_send_data(&tcp,preamble,4); tcp_send_data(&tcp,m->ops->Data(),m->ops->Size()); //log << "********** checksum "<<checksum((unsigned char *)m->ops->Data(),m->ops->Size()) << info; } m->reset(); int len; for(int b=0;b<dsz;b+=len) { len=chunk; if( b+len>dsz ) { len=dsz-b; } osc::Blob bobo(ix.data+b,len); *m<<osc::BeginMessage("/@@@/stream/data")<< n << b << bobo << osc::EndMessage; if( type==TYPE_UDP || type==TYPE_MULTICAST ) { udp_send_data(&udp,(unsigned char *)m->ops->Data(),m->ops->Size()); if( delay ) usleepSafe(delay); }else if( type==TYPE_TCP ) { char preamble[4]; oscutils::FromInt32(preamble,m->ops->Size()); tcp_send_data(&tcp,preamble,4); tcp_send_data(&tcp,m->ops->Data(),m->ops->Size()); //log << "** checksum "<<checksum((unsigned char *)m->ops->Data(),m->ops->Size()) << info; } //log << "sending b="<<b<<" len="<<len<<" sz="<<m->ops->Size()<<err; m->reset(); // pour envoyer un autre message... } recyclable::recycle((recyclable **)&m); // reuse m }
e92b60ff328f4542af3380833fca2f436f2c0e4e
0304b94fb4bc4682c4d5e25bb65dab2c7e9f324f
/Code/Source/sv4gui/Modules/Path/sv4gui_PathIO.cxx
b3a829f9797425cf26632d160c791cd224fc631a
[ "MIT" ]
permissive
SimVascular/SimVascular
205126a3483079a9744d74bbef05112da0dbcc24
edd1fc7c26cf9550594a7362d66bb5d0fadda4d9
refs/heads/master
2023-08-04T10:48:30.886728
2023-08-03T02:40:08
2023-08-03T02:40:08
41,169,947
228
140
NOASSERTION
2023-08-03T02:40:10
2015-08-21T18:01:19
C++
UTF-8
C++
false
false
6,228
cxx
sv4gui_PathIO.cxx
/* Copyright (c) Stanford University, The Regents of the University of * California, and others. * * All Rights Reserved. * * See Copyright-SimVascular.txt for additional details. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject * to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "sv4gui_PathIO.h" #include "sv4gui_Path.h" #include "sv4gui_XmlIOUtil.h" #include "sv3_PathIO.h" #include <mitkCustomMimeType.h> #include <mitkIOMimeTypes.h> static mitk::CustomMimeType Createsv4guiPathMimeType() { mitk::CustomMimeType mimeType(mitk::IOMimeTypes::DEFAULT_BASE_NAME() + ".svpath"); mimeType.SetCategory("SimVascular Files"); mimeType.AddExtension("pth"); mimeType.SetComment("SimVascular Path"); return mimeType; } sv4guiPathIO::sv4guiPathIO() : mitk::AbstractFileIO(sv4guiPath::GetStaticNameOfClass(), Createsv4guiPathMimeType(), "SimVascular Path") { this->RegisterService(); } std::vector<mitk::BaseData::Pointer> sv4guiPathIO::Read() { std::string fileName=GetInputLocation(); return ReadFile(fileName); } std::vector<mitk::BaseData::Pointer> sv4guiPathIO::ReadFile(std::string fileName) { TiXmlDocument document; if (!document.LoadFile(fileName)) { mitkThrow() << "Could not open/read/parse " << fileName; std::vector<mitk::BaseData::Pointer> empty; return empty; } TiXmlElement* pathElement = document.FirstChildElement("path"); if(!pathElement){ mitkThrow() << "No path data in "<< fileName; } sv4guiPath::Pointer path = sv4guiPath::New(); sv3::PathIO* reader = new sv3::PathIO(); sv3::PathGroup* svPathGrp = reader->ReadFile(fileName); delete reader; path->SetPathID(svPathGrp->GetPathID()); path->SetMethod(svPathGrp->GetMethod()); path->SetCalculationNumber(svPathGrp->GetCalculationNumber()); path->SetSpacing(svPathGrp->GetSpacing()); for (int i=0; i<svPathGrp->GetTimeSize(); i++) path->SetPathElement(static_cast<sv4guiPathElement*>(svPathGrp->GetPathElement(i)),i); //only for GUI double resliceSize=5.0; pathElement->QueryDoubleAttribute("reslice_size", &resliceSize); path->SetResliceSize(resliceSize); std::string point2dsize="",point3dsize=""; pathElement->QueryStringAttribute("point_2D_display_size", &point2dsize); pathElement->QueryStringAttribute("point_size", &point3dsize); path->SetProp("point 2D display size",point2dsize); path->SetProp("point size",point3dsize); std::vector<mitk::BaseData::Pointer> result; result.push_back(path.GetPointer()); delete svPathGrp; return result; } mitk::IFileIO::ConfidenceLevel sv4guiPathIO::GetReaderConfidenceLevel() const { if (mitk::AbstractFileIO::GetReaderConfidenceLevel() == mitk::IFileIO::Unsupported) { return mitk::IFileIO::Unsupported; } return Supported; } void sv4guiPathIO::Write() { ValidateOutputLocation(); const sv4guiPath* path = dynamic_cast<const sv4guiPath*>(this->GetInput()); if(!path) return; TiXmlDocument document; auto decl = new TiXmlDeclaration( "1.0", "UTF-8", "" ); document.LinkEndChild( decl ); auto pathElement = new TiXmlElement("path"); pathElement->SetAttribute("id", path->GetPathID()); pathElement->SetAttribute("method", path->GetMethod()); pathElement->SetAttribute("calculation_number", path->GetCalculationNumber()); pathElement->SetDoubleAttribute("spacing", path->GetSpacing()); pathElement->SetAttribute("version", "1.0" ); //only for GUI pathElement->SetDoubleAttribute("reslice_size", path->GetResliceSize()); pathElement->SetAttribute("point_2D_display_size",path->GetProp("point 2D display size")); pathElement->SetAttribute("point_size",path->GetProp("point size")); document.LinkEndChild(pathElement); for(int t=0;t<path->GetTimeSize();t++) { auto timestepElement = new TiXmlElement("timestep"); timestepElement->SetAttribute("id",t); pathElement->LinkEndChild(timestepElement); sv4guiPathElement* pe=path->GetPathElement(t); if(!pe) continue; sv3::PathElement* svPe=static_cast<sv3::PathElement*>(pe); this->sv3::PathIO::WritePath(svPe,timestepElement); } std::string fileName=GetOutputLocation(); if (document.SaveFile(fileName) == false) { mitkThrow() << "Could not write path to " << fileName; } } mitk::IFileIO::ConfidenceLevel sv4guiPathIO::GetWriterConfidenceLevel() const { if (mitk::AbstractFileIO::GetWriterConfidenceLevel() == mitk::IFileIO::Unsupported) return mitk::IFileIO::Unsupported; const sv4guiPath* input = dynamic_cast<const sv4guiPath*>(this->GetInput()); if (input) { return Supported; }else{ return Unsupported; } } sv4guiPathIO* sv4guiPathIO::IOClone() const { return new sv4guiPathIO(*this); }
831f8697014506a6eb1136b6371e6380fcc8965a
31fb6cefe17843ac81f84f8912447743f3a96951
/img/impl/file_data.cpp
31b80bc32c63fa5adbc9b0c02ee13c7c1c3b4e12
[]
no_license
zhoub/res
1400b5fb48d1e8507bbb18a3524db93d1d4aff26
f2e1ebb208b72cb6c17654fd804663a83588d9e9
refs/heads/master
2021-01-19T14:19:16.247143
2017-04-13T07:54:10
2017-04-13T07:54:10
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,026
cpp
file_data.cpp
#include <stdio.h> #include "../file_data.h" file_data::file_data() { buffer = nullptr; length = 0; } bool load_file(const char* path, file_data& data) { data.buffer = nullptr; FILE* file = nullptr;//fopen(path, "wb+"); if (fopen_s(&file, path, "rb+") != 0 || file == nullptr) { return false; } bool result = true; do { fseek(file, 0, SEEK_END); data.length = ftell(file); if (data.length == 0) { result = false; break; } data.buffer = new unsigned char[data.length]; if (data.buffer == nullptr) { data.length = 0; result = false; break; } fseek(file, 0, SEEK_SET); data.length = static_cast<long>(fread(data.buffer, 1, data.length, file)); if (data.length == 0) { result = false; break; } } while (false); if (!result && data.buffer) { delete data.buffer; data.buffer = nullptr; } fclose(file); return result; } void destroy_file_data(file_data& data) { if (data.buffer) { delete data.buffer; data.buffer = nullptr; } data.length = 0; }
68ddb143aed22059d2d001f2cfd408be1426c01f
42bfba269af853a77b7ee0766413c040a59585b1
/src/HTTP/Request.hpp
d0cb1db98812939e3d73905a4641fb67b73d2a8d
[]
no_license
Ovoda/Webserv
af9cdfcc897dd24194de41e654d9ac8d4d2633bb
4ba55160cf198e9c3967c6409e02548e1afdbf53
refs/heads/master
2023-07-03T18:09:54.143760
2021-08-07T10:51:35
2021-08-07T10:51:35
389,661,427
0
0
null
2021-08-06T16:31:28
2021-07-26T14:28:05
C++
UTF-8
C++
false
false
1,838
hpp
Request.hpp
// // Created by alena on 14/06/2021. // #ifndef WEBSERV_REQUEST_HPP #define WEBSERV_REQUEST_HPP #include "parser/export.hpp" #include "Tokens.hpp" #include "HTTP/Request/RequestLine.hpp" #include "HTTP/Headers/Headers.hpp" #include "Config/Directives/Redirect.hpp" #include <map> /* * Request */ struct Request { private: std::map<std::string, Header> _headers; std::vector<char> _body; public: methods::s_method method; Target target; Version version; Request(); Request(methods::s_method method, Target target, Version version); void set_header(const Header& header); Result<std::string> get_header(const std::string& name); std::vector<char> body(); //TODO check end of body friend std::ostream &operator<<(std::ostream & stream, const Request &req); bool receive(std::vector<char> &vector); }; /* * RequestParser */ class RequestParser: public Parser<Request> { public: RequestParser(); result_type operator()(const slice& input); }; /* * RequestHandler */ namespace status { enum Status { Incomplete, // Waiting for the request to make sense Waiting, // Waiting on full body Complete, // Ready to respond Error // Error occured: Early close, Parse error }; } namespace transfer { enum TransferType { Unset, // None yet Identity, // Content-Length Chunked // Transfer-Encoding }; } class RequestHandler { private: transfer::TransferType _transfer_type; status::Status _status; Result<Request> _req; std::vector<char> _buffer; status::Status parse(); public: RequestHandler(); Result<Request> update(const char *buff, size_t read); Result<Request> receive(); void reset(); }; #endif //WEBSERV_REQUEST_HPP
3e0f00ea431ff3a4861602ee880679863560a4b6
319cea09b4c05e684214debfc81b0112ccd6ea46
/rectangle.hpp
2484cc381fd30ebcda5251c54a7d658c652fcdf1
[]
no_license
KevinPatist/CPSE2_opdracht1_stuiterbal
2602f08e46a555699abbb685106e36bba3bb0af5
53b1409897a05244223594a4caf51cdfab475ca7
refs/heads/master
2020-12-13T19:24:36.106959
2020-01-17T08:58:07
2020-01-17T08:58:07
234,509,247
0
0
null
null
null
null
UTF-8
C++
false
false
666
hpp
rectangle.hpp
#ifndef RECTANGLE_HPP #define RECTANGLE_HPP #include "object.hpp" class rectangle : public object{ protected: sf::Vector2f size; public: rectangle( const sf::Vector2f &startposition, const sf::Vector2f& startspeed, const sf::Vector2f &size, const sf::Color &color): object(startposition,startspeed,color), size(size) {} void draw(sf::RenderWindow &window) override; void interact(object& item) override; sf::FloatRect getCollisionShape() override; // sf::Vector2f getBounce(sf::FloatRect &item) override; void collide(object& item); }; #endif //RECTANGLE_HPP
835eec0e9b0eae80ea552d9878069d615e6d1dab
5fc19aa0f7940c7d96dbf4feb994c3d9839a8332
/src/figure.h
4e82d804c061f7059398e5de3d061d5354be021e
[]
no_license
AIV5/proj-game
64e2b75e3539614039d7f75ec501df5e8855bbdf
3edd4cb1521edec33ece2eecc1b384ce54ad6dd7
refs/heads/master
2023-03-27T01:00:55.554832
2021-03-31T12:57:04
2021-03-31T12:57:04
351,522,098
0
0
null
null
null
null
UTF-8
C++
false
false
705
h
figure.h
#pragma once #include <glm/glm.hpp> #define PGS_MIN_VECTOR_LENGTH 0.001f using glm::fvec3; using glm::dvec4; using glm::dmat4; enum _objType_t {FULL, LIMITED, BOUND}; const dvec4 nullVec = dvec4(0, 0, 0, 0); class Figure { private: void init (fvec3 color, dvec4 p, dvec4 r, dvec4 u, dvec4 f); public: int objIndex; int objType; fvec3 objColor; double objRad; dmat4 objCoord; Figure(void); Figure(fvec3 color, dvec4 p, dvec4 r=nullVec, dvec4 u=nullVec, dvec4 f=nullVec); Figure(_objType_t type, double rad, fvec3 color, dvec4 p, dvec4 r=nullVec, dvec4 u=nullVec, dvec4 f=nullVec); }; dvec4 orthonormal (dvec4 f, dvec4 u=nullVec, dvec4 r=nullVec, dvec4 p=nullVec);
085aa4d5a12685441f640de2b95447ca76eff637
e77ce0f53b884b573717b754ec858f7f28888fd2
/SimpleCar.cpp
2ad7ae24d97072b2b98cda16bbee4250483bda57
[]
no_license
Karthik-Ragunath/competitive_programming
8cbed182bfab93a5260c04e4245696f032e3a039
6ac627154756f43bf6b3759fb632262b034f4fd4
refs/heads/master
2022-03-11T09:12:24.110153
2022-02-16T17:31:08
2022-02-16T17:31:08
194,724,003
1
0
null
null
null
null
UTF-8
C++
false
false
902
cpp
SimpleCar.cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <cmath> #include <cstring> #include <vector> #include <iomanip> #include <limits> #include <cstdlib> using namespace std; int main() { int testcases; cin >> testcases; for(int k = 0; k < testcases; k++) { long long int numberOfTunnels, numberOfCars, distance, speed; cin >> numberOfTunnels; long long int maximum = -1; for(int i = 0; i < numberOfTunnels; i++) { long long int value; cin >> value; if(value > maximum) { maximum = value; } } cin >> numberOfCars >> distance >> speed; double solution = (double)((numberOfCars - 1) * maximum); cout.precision(9); cout << fixed << solution << endl; //cout << fixed << solution << endl; } return 0; }
46e2f78db73afd9113237fa03569e2231a11bf28
f7a9767c7b7ad7de482e590741721bab995e5e7c
/clang-tools-extra/clang-tidy/performance/NoexceptSwapCheck.cpp
65baebd808f6cfa428050c214880243f1acb7173
[ "Apache-2.0", "LLVM-exception", "NCSA" ]
permissive
kitaisreal/llvm-project
891a43345e35c6643ad13ed489018b3273e183e9
ac357a4773c22e0022558b627d8c3fb4aaabc125
refs/heads/main
2023-08-08T13:21:00.967289
2023-07-26T16:06:13
2023-07-26T16:16:41
230,374,981
0
0
Apache-2.0
2019-12-27T04:50:32
2019-12-27T04:50:32
null
UTF-8
C++
false
false
1,322
cpp
NoexceptSwapCheck.cpp
//===--- NoexceptSwapCheck.cpp - clang-tidy -------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "NoexceptSwapCheck.h" #include "clang/ASTMatchers/ASTMatchFinder.h" using namespace clang::ast_matchers; // FixItHint - comment added to fix list.rst generation in add_new_check.py. // Do not remove. Fixes are generated in base class. namespace clang::tidy::performance { void NoexceptSwapCheck::registerMatchers(MatchFinder *Finder) { Finder->addMatcher( functionDecl(unless(isDeleted()), hasName("swap")).bind(BindFuncDeclName), this); } DiagnosticBuilder NoexceptSwapCheck::reportMissingNoexcept(const FunctionDecl *FuncDecl) { return diag(FuncDecl->getLocation(), "swap functions should " "be marked noexcept"); } void NoexceptSwapCheck::reportNoexceptEvaluatedToFalse( const FunctionDecl *FuncDecl, const Expr *NoexceptExpr) { diag(NoexceptExpr->getExprLoc(), "noexcept specifier on swap function evaluates to 'false'"); } } // namespace clang::tidy::performance
c071e9308094a1bf42b6ad52da629979223dbed7
a3d6556180e74af7b555f8d47d3fea55b94bcbda
/chrome/browser/profile_resetter/reset_report_uploader_unittest.cc
f0e71bdce4dda867182ec752434db50170c038af
[ "BSD-3-Clause" ]
permissive
chromium/chromium
aaa9eda10115b50b0616d2f1aed5ef35d1d779d6
a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c
refs/heads/main
2023-08-24T00:35:12.585945
2023-08-23T22:01:11
2023-08-23T22:01:11
120,360,765
17,408
7,102
BSD-3-Clause
2023-09-10T23:44:27
2018-02-05T20:55:32
null
UTF-8
C++
false
false
1,759
cc
reset_report_uploader_unittest.cc
// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/profile_resetter/reset_report_uploader.h" #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/test/task_environment.h" #include "content/public/test/test_utils.h" #include "net/http/http_status_code.h" #include "net/traffic_annotation/network_traffic_annotation_test_helper.h" #include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h" #include "services/network/test/test_url_loader_factory.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" class ResetReportUploaderTest : public testing::Test { public: ResetReportUploaderTest() : test_shared_loader_factory_( base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>( &test_url_loader_factory_)) {} protected: scoped_refptr<network::SharedURLLoaderFactory> shared_url_loader_factory() { return test_shared_loader_factory_; } network::TestURLLoaderFactory* test_url_loader_factory() { return &test_url_loader_factory_; } private: base::test::TaskEnvironment task_environment_; network::TestURLLoaderFactory test_url_loader_factory_; scoped_refptr<network::SharedURLLoaderFactory> test_shared_loader_factory_; }; TEST_F(ResetReportUploaderTest, NoCrash) { test_url_loader_factory()->AddResponse( ResetReportUploader::GetClientReportUrlForTesting().spec(), ""); ResetReportUploader* uploader = new ResetReportUploader(shared_url_loader_factory()); uploader->DispatchReportInternal(""); }
5a81a503950773060685497f911e29a1903fab2b
985fffef8371d3c2c64281446a8666e0f56e62b8
/src/tolua/tolua_MouseInput.h
a0f444e03b1625b90aca27e3365a4115c0490882
[]
no_license
Amakata/wajima-project
acf3f4bb19f02f02b19a440072b2e3e4d1146d97
852181ff344aa0474e1a6866180a04315350a049
refs/heads/master
2020-05-17T01:28:02.743106
2012-12-16T12:01:07
2012-12-16T12:01:07
null
0
0
null
null
null
null
UTF-8
C++
false
false
732
h
tolua_MouseInput.h
#pragma once #include "input/MouseInput.h" // tolua_export // tolua_begin namespace zefiro{ namespace tolua{ class MouseInput{ public: MouseInput(){ input_.create(); } virtual ~MouseInput(){ input_.release(); } bool getState(){ return input_.getState(); } bool isPress( int number )const{ return input_.isPress(number); } int getX()const{ return input_.getX(); } int getY()const{ return input_.getY(); } int getDiffX()const{ return input_.getDiffX(); } int getDiffY()const{ return input_.getDiffY(); } // tolua_end private: ::zefiro::input::MouseInput input_; // tolua_begin }; } } // tolua_end
4b2d7ba21b40a03ad1521a9a9ab50e93b87b7749
3500050a14f59caee9280a1fb5fb3db0e1227419
/UVA/12250_Language-Detection.cpp
ea5478210f41b187c0c5f10c9523559235c3b152
[]
no_license
rafed/codes
122ee21292e8df6d5874e8655156ef6655d068c5
b464f7ae1802ba424f8a111820e509a376259425
refs/heads/master
2022-04-07T20:22:59.357591
2020-03-08T12:17:51
2020-03-08T12:17:51
96,632,637
0
0
null
null
null
null
UTF-8
C++
false
false
629
cpp
12250_Language-Detection.cpp
#include<iostream> #include<cstdio> using namespace std; int main(){ int i; string str; for(i=1; ; i++){ getline(cin, str); if(!str.compare("#")) break; else if(!str.compare("HELLO")) printf("Case %d: ENGLISH\n", i); else if(!str.compare("HOLA")) printf("Case %d: SPANISH\n", i); else if(!str.compare("HALLO")) printf("Case %d: GERMAN\n", i); else if(!str.compare("BONJOUR")) printf("Case %d: FRENCH\n", i); else if(!str.compare("CIAO")) printf("Case %d: ITALIAN\n", i); else if(!str.compare("ZDRAVSTVUJTE")) printf("Case %d: RUSSIAN\n", i); else printf("Case %d: UNKNOWN\n", i); } return 0; }
eb6e7daa60f4468c3e6020904106c37f7a6e8ad8
4a75a7e87890411c96cbd173c046b4c9bb5314ab
/src/framework/ui/uilineedit.cpp
6c56f0c43b7ca5c8080e986af2ec74cb4a1930ad
[ "MIT" ]
permissive
AndreFaramir/otclient
b94b3d646b2dd52db8b363c8dc1ccca0a55264d8
26096d354ce4f1472d28e2eb73659a3d90d1fb33
refs/heads/master
2021-01-17T05:29:54.688615
2012-01-24T22:26:40
2012-01-24T22:26:40
3,167,241
0
0
null
null
null
null
UTF-8
C++
false
false
16,237
cpp
uilineedit.cpp
/* * Copyright (c) 2010-2012 OTClient <https://github.com/edubart/otclient> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include "uilineedit.h" #include <framework/graphics/font.h> #include <framework/graphics/graphics.h> #include <framework/platform/platformwindow.h> #include <framework/core/clock.h> #include <framework/otml/otmlnode.h> UILineEdit::UILineEdit() { m_cursorPos = 0; m_textAlign = Fw::AlignLeftCenter; m_startRenderPos = 0; m_textHorizontalMargin = 0; m_textHidden = false; m_alwaysActive = false; blinkCursor(); } void UILineEdit::drawSelf() { drawBackground(m_rect); drawBorder(m_rect); drawImage(m_rect); drawIcon(m_rect); //TODO: text rendering could be much optimized by using vertex buffer or caching the render into a texture int textLength = m_text.length(); const TexturePtr& texture = m_font->getTexture(); g_painter.setColor(m_color); for(int i=0;i<textLength;++i) g_painter.drawTexturedRect(m_glyphsCoords[i], texture, m_glyphsTexCoords[i]); // render cursor if(isExplicitlyEnabled() && (isActive() || m_alwaysActive) && m_cursorPos >= 0) { assert(m_cursorPos <= textLength); // draw every 333ms const int delay = 333; if(g_clock.ticksElapsed(m_cursorTicks) <= delay) { Rect cursorRect; // when cursor is at 0 or is the first visible element if(m_cursorPos == 0 || m_cursorPos == m_startRenderPos) cursorRect = Rect(m_drawArea.left()-1, m_drawArea.top(), 1, m_font->getGlyphHeight()); else cursorRect = Rect(m_glyphsCoords[m_cursorPos-1].right(), m_glyphsCoords[m_cursorPos-1].top(), 1, m_font->getGlyphHeight()); g_painter.drawFilledRect(cursorRect); } else if(g_clock.ticksElapsed(m_cursorTicks) >= 2*delay) { m_cursorTicks = g_clock.ticks(); } } } void UILineEdit::update() { std::string text = getDisplayedText(); int textLength = text.length(); // prevent glitches if(m_rect.isEmpty()) return; // map glyphs positions Size textBoxSize; const std::vector<Point>& glyphsPositions = m_font->calculateGlyphsPositions(text, m_textAlign, &textBoxSize); const Rect *glyphsTextureCoords = m_font->getGlyphsTextureCoords(); const Size *glyphsSize = m_font->getGlyphsSize(); int glyph; // resize just on demand if(textLength > (int)m_glyphsCoords.size()) { m_glyphsCoords.resize(textLength); m_glyphsTexCoords.resize(textLength); } // readjust start view area based on cursor position if(m_cursorPos >= 0 && textLength > 0) { assert(m_cursorPos <= textLength); if(m_cursorPos < m_startRenderPos) // cursor is before the previuos first rendered glyph, so we need to update { m_startInternalPos.x = glyphsPositions[m_cursorPos].x; m_startInternalPos.y = glyphsPositions[m_cursorPos].y - m_font->getYOffset(); m_startRenderPos = m_cursorPos; } else if(m_cursorPos > m_startRenderPos || // cursor is after the previuos first rendered glyph (m_cursorPos == m_startRenderPos && textLength == m_cursorPos)) // cursor is at the previuos rendered element, and is the last text element { Rect virtualRect(m_startInternalPos, m_rect.size() - Size(2*m_textHorizontalMargin, 0) ); // previous rendered virtual rect int pos = m_cursorPos - 1; // element before cursor glyph = (uchar)text[pos]; // glyph of the element before cursor Rect glyphRect(glyphsPositions[pos], glyphsSize[glyph]); // if the cursor is not on the previous rendered virtual rect we need to update it if(!virtualRect.contains(glyphRect.topLeft()) || !virtualRect.contains(glyphRect.bottomRight())) { // calculate where is the first glyph visible Point startGlyphPos; startGlyphPos.y = std::max(glyphRect.bottom() - virtualRect.height(), 0); startGlyphPos.x = std::max(glyphRect.right() - virtualRect.width(), 0); // find that glyph for(pos = 0; pos < textLength; ++pos) { glyph = (uchar)text[pos]; glyphRect = Rect(glyphsPositions[pos], glyphsSize[glyph]); glyphRect.setTop(std::max(glyphRect.top() - m_font->getYOffset() - m_font->getGlyphSpacing().height(), 0)); glyphRect.setLeft(std::max(glyphRect.left() - m_font->getGlyphSpacing().width(), 0)); // first glyph entirely visible found if(glyphRect.topLeft() >= startGlyphPos) { m_startInternalPos.x = glyphsPositions[pos].x; m_startInternalPos.y = glyphsPositions[pos].y - m_font->getYOffset(); m_startRenderPos = pos; break; } } } } } else { m_startInternalPos = Point(0,0); } Rect textScreenCoords = m_rect; textScreenCoords.expandLeft(-m_textHorizontalMargin); textScreenCoords.expandRight(-m_textHorizontalMargin); m_drawArea = textScreenCoords; if(m_textAlign & Fw::AlignBottom) { m_drawArea.translate(0, textScreenCoords.height() - textBoxSize.height()); } else if(m_textAlign & Fw::AlignVerticalCenter) { m_drawArea.translate(0, (textScreenCoords.height() - textBoxSize.height()) / 2); } else { // AlignTop } if(m_textAlign & Fw::AlignRight) { m_drawArea.translate(textScreenCoords.width() - textBoxSize.width(), 0); } else if(m_textAlign & Fw::AlignHorizontalCenter) { m_drawArea.translate((textScreenCoords.width() - textBoxSize.width()) / 2, 0); } else { // AlignLeft } for(int i = 0; i < textLength; ++i) { glyph = (uchar)text[i]; m_glyphsCoords[i].clear(); // skip invalid glyphs if(glyph < 32) continue; // calculate initial glyph rect and texture coords Rect glyphScreenCoords(glyphsPositions[i], glyphsSize[glyph]); Rect glyphTextureCoords = glyphsTextureCoords[glyph]; // first translate to align position if(m_textAlign & Fw::AlignBottom) { glyphScreenCoords.translate(0, textScreenCoords.height() - textBoxSize.height()); } else if(m_textAlign & Fw::AlignVerticalCenter) { glyphScreenCoords.translate(0, (textScreenCoords.height() - textBoxSize.height()) / 2); } else { // AlignTop // nothing to do } if(m_textAlign & Fw::AlignRight) { glyphScreenCoords.translate(textScreenCoords.width() - textBoxSize.width(), 0); } else if(m_textAlign & Fw::AlignHorizontalCenter) { glyphScreenCoords.translate((textScreenCoords.width() - textBoxSize.width()) / 2, 0); } else { // AlignLeft // nothing to do } // only render glyphs that are after startRenderPosition if(glyphScreenCoords.bottom() < m_startInternalPos.y || glyphScreenCoords.right() < m_startInternalPos.x) continue; // bound glyph topLeft to startRenderPosition if(glyphScreenCoords.top() < m_startInternalPos.y) { glyphTextureCoords.setTop(glyphTextureCoords.top() + (m_startInternalPos.y - glyphScreenCoords.top())); glyphScreenCoords.setTop(m_startInternalPos.y); } if(glyphScreenCoords.left() < m_startInternalPos.x) { glyphTextureCoords.setLeft(glyphTextureCoords.left() + (m_startInternalPos.x - glyphScreenCoords.left())); glyphScreenCoords.setLeft(m_startInternalPos.x); } // subtract startInternalPos glyphScreenCoords.translate(-m_startInternalPos); // translate rect to screen coords glyphScreenCoords.translate(textScreenCoords.topLeft()); // only render if glyph rect is visible on screenCoords if(!textScreenCoords.intersects(glyphScreenCoords)) continue; // bound glyph bottomRight to screenCoords bottomRight if(glyphScreenCoords.bottom() > textScreenCoords.bottom()) { glyphTextureCoords.setBottom(glyphTextureCoords.bottom() + (textScreenCoords.bottom() - glyphScreenCoords.bottom())); glyphScreenCoords.setBottom(textScreenCoords.bottom()); } if(glyphScreenCoords.right() > textScreenCoords.right()) { glyphTextureCoords.setRight(glyphTextureCoords.right() + (textScreenCoords.right() - glyphScreenCoords.right())); glyphScreenCoords.setRight(textScreenCoords.right()); } // render glyph m_glyphsCoords[i] = glyphScreenCoords; m_glyphsTexCoords[i] = glyphTextureCoords; } } void UILineEdit::setTextHorizontalMargin(int margin) { m_textHorizontalMargin = margin; update(); } void UILineEdit::setCursorPos(int pos) { if(pos != m_cursorPos) { if(pos < 0) m_cursorPos = 0; else if((uint)pos >= m_text.length()) m_cursorPos = m_text.length(); else m_cursorPos = pos; update(); } } void UILineEdit::setCursorEnabled(bool enable) { if(enable) { m_cursorPos = 0; blinkCursor(); } else m_cursorPos = -1; update(); } void UILineEdit::setTextHidden(bool hidden) { m_textHidden = true; update(); } void UILineEdit::setAlwaysActive(bool enable) { m_alwaysActive = enable; } void UILineEdit::appendText(std::string text) { if(m_cursorPos >= 0) { // replace characters that are now allowed boost::replace_all(text, "\n", ""); boost::replace_all(text, "\r", " "); if(text.length() > 0) { m_text.insert(m_cursorPos, text); m_cursorPos += text.length(); blinkCursor(); update(); UIWidget::onTextChange(m_text); } } } void UILineEdit::appendCharacter(char c) { if(c == '\n' || c == '\r') return; if(m_cursorPos >= 0) { std::string tmp; tmp = c; m_text.insert(m_cursorPos, tmp); m_cursorPos++; blinkCursor(); update(); UIWidget::onTextChange(m_text); } } void UILineEdit::removeCharacter(bool right) { if(m_cursorPos >= 0 && m_text.length() > 0) { if((uint)m_cursorPos >= m_text.length()) { m_text.erase(m_text.begin() + (--m_cursorPos)); } else { if(right) m_text.erase(m_text.begin() + m_cursorPos); else if(m_cursorPos > 0) m_text.erase(m_text.begin() + --m_cursorPos); } blinkCursor(); update(); UIWidget::onTextChange(m_text); } } void UILineEdit::moveCursor(bool right) { if(right) { if((uint)m_cursorPos+1 <= m_text.length()) { m_cursorPos++; blinkCursor(); } } else { if(m_cursorPos-1 >= 0) { m_cursorPos--; blinkCursor(); } } update(); } int UILineEdit::getTextPos(Point pos) { int textLength = m_text.length(); // find any glyph that is actually on the int candidatePos = -1; for(int i=0;i<textLength;++i) { Rect clickGlyphRect = m_glyphsCoords[i]; clickGlyphRect.expandTop(m_font->getYOffset() + m_font->getGlyphSpacing().height()); clickGlyphRect.expandLeft(m_font->getGlyphSpacing().width()+1); if(clickGlyphRect.contains(pos)) return i; else if(pos.y >= clickGlyphRect.top() && pos.y <= clickGlyphRect.bottom()) { if(pos.x <= clickGlyphRect.left()) candidatePos = i; else if(pos.x >= clickGlyphRect.right()) candidatePos = i+1; } } return candidatePos; } std::string UILineEdit::getDisplayedText() { if(m_textHidden) return std::string(m_text.length(), '*'); else return m_text; } void UILineEdit::onTextChange(const std::string& text) { m_cursorPos = text.length(); blinkCursor(); update(); UIWidget::onTextChange(text); } void UILineEdit::onFontChange(const std::string& font) { update(); UIWidget::onFontChange(font); } void UILineEdit::onStyleApply(const std::string& styleName, const OTMLNodePtr& styleNode) { UIWidget::onStyleApply(styleName, styleNode); for(const OTMLNodePtr& node : styleNode->children()) { if(node->tag() == "text") { setText(node->value()); setCursorPos(m_text.length()); } else if(node->tag() == "text-hidden") setTextHidden(node->value<bool>()); else if(node->tag() == "text-margin") setTextHorizontalMargin(node->value<int>()); else if(node->tag() == "always-active") setAlwaysActive(node->value<bool>()); //else if(node->tag() == "disable-arrow-navitation") // setArrowNavigation(node->value<bool>()); } } void UILineEdit::onGeometryChange(const Rect& oldRect, const Rect& newRect) { update(); UIWidget::onGeometryChange(oldRect, newRect); } void UILineEdit::onFocusChange(bool focused, Fw::FocusReason reason) { if(focused && !m_alwaysActive) { if(reason == Fw::TabFocusReason) setCursorPos(m_text.length()); else blinkCursor(); } UIWidget::onFocusChange(focused, reason); } bool UILineEdit::onKeyPress(uchar keyCode, int keyboardModifiers, bool wouldFilter) { if(UIWidget::onKeyPress(keyCode, keyboardModifiers, wouldFilter)) return true; if(!wouldFilter) { if(keyCode == Fw::KeyDelete) // erase right character removeCharacter(true); else if(keyCode == Fw::KeyBackspace) // erase left character { removeCharacter(false); else if(keyCode == Fw::KeyRight) // move cursor right moveCursor(true); else if(keyCode == Fw::KeyLeft) // move cursor left moveCursor(false); else if(keyCode == Fw::KeyHome) // move cursor to first character setCursorPos(0); else if(keyCode == Fw::KeyEnd) // move cursor to last character setCursorPos(m_text.length()); else if(keyCode == Fw::KeyV && keyboardModifiers == Fw::KeyboardCtrlModifier) appendText(g_window.getClipboardText()); else if(keyCode == Fw::KeyTab) { if(!m_alwaysActive) { if(UIWidgetPtr parent = getParent()) parent->focusNextChild(Fw::TabFocusReason); } } else return false; return true; } return false; } bool UILineEdit::onKeyText(const std::string& keyText) { appendText(keyText); return true; } bool UILineEdit::onMousePress(const Point& mousePos, Fw::MouseButton button) { if(button == Fw::MouseLeftButton) { int pos = getTextPos(mousePos); if(pos >= 0) setCursorPos(pos); } return true; } void UILineEdit::blinkCursor() { m_cursorTicks = g_clock.ticks(); }
02b6b666b25805eec1a536bc23c08582fddea03e
d6e547c5512b52a1f5eac4d5a7fed997b47a3901
/emptypiece.cpp
b7cd4d357197c55ba9470ac566a05eb236542b1c
[]
no_license
C0nstanta/Chess
d162f5629c532f0bb7a5650481d2899fca1825fd
d705dd2041de13d57584fe5d4245dc327b583ab8
refs/heads/main
2023-04-13T17:02:30.925656
2021-04-27T11:53:22
2021-04-27T11:53:22
362,089,362
0
0
null
null
null
null
UTF-8
C++
false
false
377
cpp
emptypiece.cpp
#include "headers/emptypiece.hpp" #include "headers/chessboard.hpp" #include "headers/figure.hpp" EmptyPiece::EmptyPiece(const Color color, const PieceType piece_type, const Cell& key) : Piece(color, piece_type, key){}; bool EmptyPiece::can_move(const std::pair<char, char>& p) { return true; }; void EmptyPiece::computeAttackedCells(){}
4dec548838348581e1efe040f72af5b619cfa289
335cabb84c42d4ef616ea76338dfa50977115f40
/五子棋/cpu.h
b5fdc49ae2859a322615e481dd14ea4362dc9bb7
[]
no_license
Rusell-Wu/gobang
3a99ff308b3d97cbbd1ec2138554cef97b727ea2
fafb65431dc18f156ac9eb576f50c4a5d379b38f
refs/heads/master
2022-05-26T01:59:12.184396
2020-04-23T15:09:51
2020-04-23T15:09:51
257,640,003
2
0
null
null
null
null
GB18030
C++
false
false
573
h
cpu.h
#pragma once class cpu { private: int a; int b; public: cpu(void); ~cpu(void); //玩家四子的情况,必堵 bool FourChess(char CM[][15]); //玩家三子的情况,需看情况堵 bool ThreeChess(char CM[][15]); //玩家二子的特殊情况,需看情况堵 bool TwoChess(char CM[][15]); //除去玩家三、四子的情况后,可攻 void Attach(char CM[][15]); //己方四子的情况,必下 bool MyFourChess(char CM[][15]); private: //找某种颜色的特定长度的串,1为白色,2为黑色 bool FindXString(int X,int Color,char CM[][15]); };
80c98d832d499e1237cb538456159094d0f95b2a
c653af6e8be4eeb88fe6579f87bbfb2860a6555d
/Codes/VisualStudio/ad_Diagram/aa_diagram_Led/aa_diagram_Led/LED_diag.h
0c93fd53b16f104886a166f6d8ab1571db487e19
[]
no_license
Rejoy-CSE-IIT/ArduinoUpdated
91cb09e6ff58e4ad903fc4e88878d80f15c1713f
305609122f183cfbdd099587c4e559d4b8f14e42
refs/heads/master
2021-01-20T09:19:41.286501
2017-06-26T16:50:51
2017-06-26T16:50:51
90,234,236
0
0
null
null
null
null
UTF-8
C++
false
false
971
h
LED_diag.h
#ifndef LED_DIAG_H #define LED_DIAG_H //You need a couple of other things in the header file. One is an #include statement // that gives you access to the standard types and constants of the Arduino // language (this is automatically added to normal sketches, but not to libraries). //It looks like this (and goes above the class definition given previously): #ifdef __cplusplus #if ARDUINO >= 100 #include "Arduino.h" #else #include "WProgram.h" #endif #include"constant_LED.h" class LED_diag { public: LED_diag(int, int); void LED_STEPS(); void initialize_HardWare(); int _STATE; int _Button; #if TEST int _Button_test; void delay_timer(int); #endif private: int _pinLED; int _pinBUTTON; }; #endif #endif
ee7bc305e17c6cb0456d99d664f70346163f7976
6766ab4d11b69421bf596274a352bf144c99a34e
/string/test_ctor_copy.cpp
31090b2e7d930cd76a8c45d538f6f801e00a08d0
[]
no_license
ajhughes7/CS23001
228731ec01133e68d10ee522ee2eb423836ee882
42298562f75b02869d2316f400d2474750bfadb1
refs/heads/main
2023-03-31T09:48:00.973944
2021-03-30T19:28:06
2021-03-30T19:28:06
353,087,411
0
0
null
null
null
null
UTF-8
C++
false
false
606
cpp
test_ctor_copy.cpp
// String class test program // // Tests: copy constructor // #include "string.hpp" #include <cassert> #include <iostream> //=========================================================================== String appendX(String s) { s = s + "x"; return s; } int main () { { //------------------------------------------------------ // SETUP FIXTURE String s0("abc"); // TEST String s1 = appendX(s0); // VERIFY assert(s0 == "abc"); assert(s1 == "abcx"); } std::cout << "Done testing copy constructor." << std::endl; }
bfdbf405c43e58aa5f1e69de6150dcdd7ab571f5
fac201e6ba719956d1799705607cabb825cbe0c8
/LTE/UpdateUEForRBCommand.h
bd3233d12940db29b44c888e9eeb637bafebd4dc
[]
no_license
MichaelZhangBUPT/LAA-Simulation
c1a3a784249b88f4e40a961f3ef3e4c254ec786e
41426a1ac69e3bacd0cecc1e146f9e5f8da648fb
refs/heads/master
2016-09-12T23:43:19.897186
2016-04-13T01:38:12
2016-04-13T01:38:12
56,025,089
0
0
null
null
null
null
GB18030
C++
false
false
788
h
UpdateUEForRBCommand.h
#pragma once #include "command.h" namespace LTESim { class ILTEUE; class NodeB; ///更新某个NodeB当前发射时刻每个RB上对应的UE class UpdateUEForRBCommand : public LTESim::Command { public: ///构造函数 /* * @param pNodeB,要更新的NodeB * @param UEList,要更新的每个RB对应UE的列表 */ UpdateUEForRBCommand(shared_ptr<NodeB> pNodeB, const vector< shared_ptr<ILTEUE> >& UEList); public: ~UpdateUEForRBCommand(void); ///Do函数 /* * 更新NodeB内部每个RB对应的UE */ void Do(const Clock& clk); private: /**要更新的NodeB*/ weak_ptr<NodeB> m_nodeb; /**要更新到的RB对UE的列表*/ vector< shared_ptr<ILTEUE> > m_UEToRBlist; }; }
e13a10b28d6ecc044119e8f5aa7d57b0a7fa5916
461354b7be42e93a93f674cf2c155ba126381055
/td4/ThreadConsumer.h
f58dd35e06485eef844f528b7c6c9e767c2e72f7
[]
no_license
bensarthou/OS-realtime
fc66a33abda625db4d5fa92281414e5419737c3d
8e551499334bcf7bc5fc13c727be89c66b181fa0
refs/heads/master
2020-04-18T12:13:17.608799
2019-02-23T21:35:21
2019-02-23T21:35:21
167,527,370
0
0
null
null
null
null
UTF-8
C++
false
false
1,123
h
ThreadConsumer.h
#ifndef THREADCONSUMER_H #define THREADCONSUMER_H #include "Thread.h" #include "Semaphore.h" /*! * Thread class for consuming tokens of a semaphore object */ class ThreadConsumer : public Thread { private: Semaphore& sem; /*!< Reference to a semaphore object*/ double timeout_ms; /*!< timeout time when trying to take a token, in ms */ int approved; /*!< Number of tokens successfully taken, useful for debug*/ int denied; /*!< Number of tokens that the thread timeouts to take*/ protected: //! Running the thread to take tokens from the semaphore /*! \brief Take tokens from the semaphore, by calling the take method, until one call to take timeouts */ void run(); public: //! Getter for approved /*! \return approved, int value of number of tokens successfully taken from the semaphore */ int getApproved(); //! Getter for denied /*! \return denied, int value of number of tokens that thread timeouts to take. */ int getDenied(); //! Constructor with setting of attributes (tokens_given is initalised at 0) ThreadConsumer(Semaphore& sem, double timeout_ms); }; #endif
6bd723a74e4bcdd6205d74b636be34269cf8104f
9daa3c9c55c49e6d5a0ffdde20ef818c69d1aee2
/hw5b/2/Apple.hpp
b8fd0ce7baf543594f08f7a610f3e3709e6ce079
[]
no_license
CrisRamz17/CSCI169
42304944dbb7bb1a6c5709bef519d700b4e92d1b
2b08703f483540757be9881d3186de7694a4627f
refs/heads/master
2023-03-16T04:39:47.541403
2019-06-09T20:35:23
2019-06-09T20:35:23
null
0
0
null
null
null
null
UTF-8
C++
false
false
199
hpp
Apple.hpp
#ifndef APPLE_HPP #define APPLE_HPP #include <string> #include <time.h> #include "Fruit.hpp" class Apple: public Fruit { public: Apple(time_t ripe); void prepare(); }; #endif
b81a7741b7fbdf638103d1b24aee79f48be3f76d
6c49fad41b5109d4dabc4db0007e1ae931ee4898
/Website/resources/Week02/taj/lab2/arrays.cpp
1304cacba7497ebbb215dc87f0fa27fcd5432e0e
[]
no_license
ZainAU/oop
964fbf6701ccac77fe14d04d83fb7f5d11b1cb15
a895b7ce10ed4ec09a2e178005bb82da7b58e32e
refs/heads/master
2022-01-06T21:03:26.842634
2018-09-26T05:35:13
2018-09-26T05:35:13
null
0
0
null
null
null
null
UTF-8
C++
false
false
674
cpp
arrays.cpp
#include <iostream> using namespace std; int main() { /* * Task 1 * * declare an array * * initialize its members with values ranging from 1-10 * * display its values */ /* * Task 2 * * implement the function zero_array() */ // zero_array(my_array) /* * Task 3 * * implement the function display_array() */ // display_array(my_array) cout << "Hello world!" << endl; return 0; } /* * Task 2 * * implement the function zero_array() */ /* * Task 3 * * implement the function display_array() */
5b0781c47bc380e2875f7100fb761299140d6689
04879a5693a875fc0a374e10c187dafa2fe3b5ed
/AprilChallenge2019/Fencing1.cpp
f56ea6e2bda8513649c8a8b2bff0e3c39e2822f8
[]
no_license
PranjalPandey77/Competitive-Programming
a30cd7785430b1499477c5c3b5f6165cba2d7983
51bf6087fb29109e47ec92231000fe12d0b93ee7
refs/heads/master
2020-12-15T01:37:22.226116
2020-01-19T19:01:03
2020-01-19T19:01:03
234,948,181
0
0
null
null
null
null
UTF-8
C++
false
false
1,052
cpp
Fencing1.cpp
#include<bits/stdc++.h> #define pii pair<int,int> #define mp make_pair #define pb push_back #define F first #define S second #define SizeV 100009 using namespace std; int main() { int T,N,M,K,i; scanf("%d",&T); while(T--) { int a,b,cnt=0; scanf("%d%d%d",&N,&M,&K); set<pii> S; set<pii>:: iterator it; for(i=1;i<=K;i++) { scanf("%d%d",&a,&b); S.insert(mp(a,b)); if((a==1&&b==1)||(a==1&&b==M)||(a==N&&b==1)||(a==N&&b==M)) { cnt+=2; } else if(a==1||a==N||b==1||b==M) { cnt+=1; } } for(it=S.begin();it!=S.end();it++) { a=(*it).F; b=(*it).S; if(a+1<=N&&(S.find(mp(a+1,b))==S.end())) { cnt++; } if(a-1>=1&&(S.find(mp(a-1,b))==S.end())) { cnt++; } if(b+1<=M&&(S.find(mp(a,b+1))==S.end())) { cnt++; } if(b-1>=1&&(S.find(mp(a,b-1))==S.end())) { cnt++; } } cout<<cnt<<endl; } return 0; }
6387608bb7ff789a79ac5accdd540f9ccfa576d9
8c920b0287837e4b43bfdec0f0af1a8c079f99e5
/Primier/hello316/Employee.h
3c0ade60d8a64afb199fc3971792514b1a68aa56
[]
no_license
keyu-lai/cpp-exercise
b0cd67eeb23b55cf1a2ce2977d716fa5ecd2c85c
ef91649fec2fd5bf57741166144934964a88d011
refs/heads/master
2020-07-20T15:50:51.613197
2015-08-10T08:04:43
2015-08-10T08:04:43
40,469,818
0
0
null
null
null
null
UTF-8
C++
false
false
912
h
Employee.h
#ifndef EMPLOYEE_H #define EMPLOYEE_H #include <string> #include <set> #include <iostream> class Message { friend class Folder; private: std::string content; std::set<Folder*> folders; void add_folder(Folder& f); void del_folder(Folder& f); void removeFolders(); public: explicit Message(const std::string &s = std::string()) : content(s) { } Message(const Message &m); Message& operator=(Message m); ~Message(); void output(); }; #endif class Folder { friend class Message; private: std::set<Message*> messages; void removeMessages(); std::string content; public: Folder(const std::string &s) : content(s) { } Folder(const Folder &f); Folder& operator=(Folder f); ~Folder(); void add(Message &m); void remove(Message &m); void output() { for (auto c : messages) std::cout << c->content << std::ends; std::cout << std::endl; } };
7d3fe44eafd939e6c1afbf361c8d58533a7656a3
8645ba7368f2ba10893e1ff8962e9e2eedf5104d
/src/Core/Geometry/Cylinder.hpp
85793e19bf8673f613ee715da280839203951f71
[ "Apache-2.0" ]
permissive
reubenlindroos/OmniPhotos
c4560d74fd1bb031cc5c953269b95153ea3716f1
de62590edc9caf1cfbd1c833bb9176993a10a579
refs/heads/main
2023-05-13T19:21:49.495691
2021-06-07T10:31:55
2021-06-07T10:31:55
344,496,849
1
0
Apache-2.0
2021-03-04T14:10:47
2021-03-04T14:10:46
null
UTF-8
C++
false
false
1,566
hpp
Cylinder.hpp
#pragma once #include "Core/GL/GLRenderable.hpp" #include "Core/Geometry/Circle.hpp" #include "Core/Geometry/Shape.hpp" #include <memory> /** * Class to represent cylinders. */ class Cylinder : public Shape, public GLRenderable { public: Cylinder(); Cylinder(Eigen::Point3f _centroid, float _radius, float _height); Cylinder(Eigen::Point3f _centroid, Eigen::Vector3f _up, Eigen::Vector3f _forward, float _radius, float _height); Cylinder(Eigen::Point3f _centroid, Eigen::Matrix3f _orientation, float _radius, float _height); //copy constructor Cylinder(const Cylinder& otherCylinder); virtual ~Cylinder() = default; void createRenderModel(const std::string& _name) override; // GLRenderable float getRadius(); void setRadius(float _radius); void changeRadius(float _change); float getHeight(); void setHeight(float _height); Eigen::Vector3f getUp(); void setUp(Eigen::Vector3f _up); Eigen::Vector3f getForward(); void setForward(Eigen::Vector3f _forward); // overriding Shape::setCentre to update the circles void setCentre(Eigen::Point3f _centre); void init(int resolution); // creates circles void createVerticesForTriangleStrip(int pointsOnCircles); void setCircleResolution(int _resolution); float radius = 1; // radius [cm] private: int circle_resolution = 512; Eigen::Vector3f up; Eigen::Vector3f forward; Eigen::Matrix3f basis; float height = 1; // height should be infinite std::shared_ptr<Circle> heavenCircle; // infinitely up std::shared_ptr<Circle> hellCircle; // infinitely down };
c2b3cb100b9fa079760d95794026fbf6eaed931a
a4124a0e3fb3495137761c67864af61d559ab8a4
/common/Producer.h
9f2873f48a446597248725a0b891db47c2aadfdc
[]
no_license
coco-zj/demo
50310c757219608186cb9fa5551fe1f6f91f8127
ac99e7cf265bb1cd1926335561d17937e213ad10
refs/heads/master
2020-05-30T10:47:03.004506
2018-01-16T06:09:55
2018-01-16T06:09:55
23,334,903
4
2
null
null
null
null
UTF-8
C++
false
false
580
h
Producer.h
/* * ===================================================================================== * * Filename: Producer.h * * Description: * * Version: 1.0 * Created: 08/30/2014 10:46:51 AM * Revision: none * Compiler: gcc * * Author: YOUR NAME (), * Company: * * ===================================================================================== */ #ifndef __PRODUCER_H__ #define __PRODUCER_H__ class Producer { public: virtual ~Producer() = 0; virtual void signal() = 0; }; #endif
6258e68d49f5f2cd0be0c5f0c36103f892bb32e1
fb0aeb1a6102ef18c06e13aa14e54d13dec9187e
/Source/Visualizers/VisualizerDefault.cpp
ec38dca977affc5de7996fb78eca3d9cc9dfe290
[ "BSD-3-Clause" ]
permissive
ReverieWisp/ASCIIPlayer
972d58a7ac04c0aea8e95ab9ef3bf3e3d9dda017
678a6957b16fd48a20ff6ed97cba6886cbd5a51c
refs/heads/master
2020-05-22T04:50:23.084314
2019-05-12T05:12:11
2019-05-12T05:12:11
186,222,832
0
0
BSD-3-Clause
2019-05-12T07:04:01
2019-05-12T07:04:01
null
UTF-8
C++
false
false
1,364
cpp
VisualizerDefault.cpp
#include <math.h> #include "VisualizerDefault.hpp" #define VERTICAL_PADDING 3 #define DATA_SIZE 64 namespace ASCIIPlayer { // Constructor VisualizerDefault::VisualizerDefault() : ASCIIVisualizer(DATA_SIZE, AUDIODATA_SPECTRUM) , height_(RConsole::Canvas::GetConsoleHeight()) , width_(RConsole::Canvas::GetConsoleWidth()) { RConsole::Canvas::SetCursorVisible(false); } // Is called when the window is resized. void VisualizerDefault::OnResize(int newWidth, int newHeight) { RConsole::Canvas::ReInit(newWidth, newHeight); RConsole::Canvas::ForceClearEverything(); width_ = newWidth; height_ = newHeight; RConsole::Canvas::SetCursorVisible(false); } // Draw waveform based on updating bool VisualizerDefault::Update(float* data) { // Handle drawing for (size_t i = 0; i < GetAudioDataSize() && i < static_cast<size_t>(height_); ++i) { // Calculate the distance of the string to display, and display dv of it. int dv = static_cast<int>(data[i] * 90); // enforce positive value and max width if (dv < 0) dv = 0; else if (dv > width_) dv = width_; RConsole::Canvas::DrawString(std::string(dv, '>').c_str(), 0, static_cast<unsigned int>(i), RConsole::LIGHTCYAN); } // We're good! Return true! return true; } } #undef DATA_SIZE
e485f5b087de24550587cf7bb1820cccf8017661
602cad438099e731f44a14abfa97e663da0ac489
/CommunicationXLib/Common/source/CommunicationModel/VirtualCommandSet/Classes/CommandSets/Plc2/CommandSetProcessInputOutputAccess_VCS_Plc2.cpp
94e335200718fa7f3d9467a7de1e5f41c1eb88ab
[]
no_license
RIVeR-Lab/eposcmd
011e85f61d4a4f87c648e5dacd066652bb0c21b8
8be4584aa41510555018cda09e9882bd8db8c561
refs/heads/master
2021-01-16T18:29:31.351698
2014-12-05T19:49:59
2014-12-05T19:49:59
null
0
0
null
null
null
null
UTF-8
C++
false
false
10,119
cpp
CommandSetProcessInputOutputAccess_VCS_Plc2.cpp
// CommandSetProcessInputOutputAccess_VCS_Plc2.cpp: Implementierung der Klasse CCommandSetProcessInputOutputAccess_VCS_Plc2. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "CommandSetProcessInputOutputAccess_VCS_Plc2.h" #include <CommunicationModel/CommonLayer/Classes/Commands/VirtualCommandSet/Command_VCS_Plc2.h> #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif ////////////////////////////////////////////////////////////////////// // Konstruktion/Destruktion ////////////////////////////////////////////////////////////////////// CCommandSetProcessInputOutputAccess_VCS_Plc2::CCommandSetProcessInputOutputAccess_VCS_Plc2() { m_strCommandSetName = COMMAND_SET_PROCESS_INPUT_OUTPUT_ACCESS; m_pCommand_GetProcessOutput = NULL; m_pCommand_SetProcessInput = NULL; m_pCommand_GetProcessOutputBit = NULL; m_pCommand_SetProcessInputBit = NULL; InitCommands(); } CCommandSetProcessInputOutputAccess_VCS_Plc2::~CCommandSetProcessInputOutputAccess_VCS_Plc2() { DeleteCommands(); } BOOL CCommandSetProcessInputOutputAccess_VCS_Plc2::VCS_SetProcessInput(CLayerManagerBase* p_pManager, HANDLE p_hHandle, HANDLE p_hTransactionHandle, WORD p_usProcessInputType, BYTE p_ubElementNumber, void* p_pDataBuffer, DWORD p_ulNbOfBytesToWrite, DWORD* p_pulNbOfBytesWritten, CErrorInfo* p_pErrorInfo) { BOOL oResult(FALSE); if(m_pCommand_SetProcessInput) { //Set Parameter Data m_pCommand_SetProcessInput->ResetStatus(); m_pCommand_SetProcessInput->SetParameterData(0, &p_usProcessInputType, sizeof(p_usProcessInputType)); m_pCommand_SetProcessInput->SetParameterData(1, &p_ubElementNumber, sizeof(p_ubElementNumber)); m_pCommand_SetProcessInput->SetParameterData(2, &p_ulNbOfBytesToWrite, sizeof(p_ulNbOfBytesToWrite)); m_pCommand_SetProcessInput->SetParameterData(3, p_pDataBuffer, p_ulNbOfBytesToWrite); //Execute Command oResult = m_pCommand_SetProcessInput->Execute(p_pManager, p_hHandle, p_hTransactionHandle); //Get ReturnParameter Data m_pCommand_SetProcessInput->GetReturnParameterData(0, p_pulNbOfBytesWritten, sizeof(*p_pulNbOfBytesWritten)); //Get ErrorCode m_pCommand_SetProcessInput->GetErrorInfo(p_pErrorInfo); } return oResult; } BOOL CCommandSetProcessInputOutputAccess_VCS_Plc2::VCS_GetProcessOutput(CLayerManagerBase* p_pManager, HANDLE p_hHandle, HANDLE p_hTransactionHandle, WORD p_usProcessOutputType, BYTE p_ubElementNumber, void* p_pDataBuffer, DWORD p_ulNbOfBytesToRead, DWORD* p_pulNbOfBytesRead, CErrorInfo* p_pErrorInfo) { BOOL oResult(FALSE); if(m_pCommand_GetProcessOutput) { //Set Parameter Data m_pCommand_GetProcessOutput->ResetStatus(); m_pCommand_GetProcessOutput->SetParameterData(0, &p_usProcessOutputType, sizeof(p_usProcessOutputType)); m_pCommand_GetProcessOutput->SetParameterData(1, &p_ubElementNumber, sizeof(p_ubElementNumber)); m_pCommand_GetProcessOutput->SetParameterData(2, &p_ulNbOfBytesToRead, sizeof(p_ulNbOfBytesToRead)); //Execute Command oResult = m_pCommand_GetProcessOutput->Execute(p_pManager, p_hHandle, p_hTransactionHandle); //Get ReturnParameter Data m_pCommand_GetProcessOutput->GetReturnParameterData(0, p_pulNbOfBytesRead, sizeof(*p_pulNbOfBytesRead)); m_pCommand_GetProcessOutput->GetReturnParameterData(1, p_pDataBuffer, p_ulNbOfBytesToRead); //Get ErrorCode m_pCommand_GetProcessOutput->GetErrorInfo(p_pErrorInfo); } return oResult; } BOOL CCommandSetProcessInputOutputAccess_VCS_Plc2::VCS_SetProcessInputBit(CLayerManagerBase* p_pManager, HANDLE p_hHandle, HANDLE p_hTransactionHandle, WORD p_usProcessInputType, BYTE p_ubElementNumber, BYTE p_ubBitNumber, BYTE p_ubBitState, CErrorInfo* p_pErrorInfo) { BOOL oResult(FALSE); if(m_pCommand_SetProcessInputBit) { //Set Parameter Data m_pCommand_SetProcessInputBit->ResetStatus(); m_pCommand_SetProcessInputBit->SetParameterData(0, &p_usProcessInputType, sizeof(p_usProcessInputType)); m_pCommand_SetProcessInputBit->SetParameterData(1, &p_ubElementNumber, sizeof(p_ubElementNumber)); m_pCommand_SetProcessInputBit->SetParameterData(2, &p_ubBitNumber, sizeof(p_ubBitNumber)); m_pCommand_SetProcessInputBit->SetParameterData(2, &p_ubBitState, sizeof(p_ubBitState)); //Execute Command oResult = m_pCommand_SetProcessInputBit->Execute(p_pManager, p_hHandle, p_hTransactionHandle); //Get ErrorCode m_pCommand_SetProcessInputBit->GetErrorInfo(p_pErrorInfo); } return oResult; } BOOL CCommandSetProcessInputOutputAccess_VCS_Plc2::VCS_GetProcessOutputBit(CLayerManagerBase* p_pManager, HANDLE p_hHandle, HANDLE p_hTransactionHandle, WORD p_usProcessOutputType, BYTE p_ubElementNumber, BYTE p_ubBitNumber, BYTE* p_pubBitState, CErrorInfo* p_pErrorInfo) { BOOL oResult(FALSE); if(m_pCommand_GetProcessOutputBit) { //Set Parameter Data m_pCommand_GetProcessOutputBit->ResetStatus(); m_pCommand_GetProcessOutputBit->SetParameterData(0, &p_usProcessOutputType, sizeof(p_usProcessOutputType)); m_pCommand_GetProcessOutputBit->SetParameterData(1, &p_ubElementNumber, sizeof(p_ubElementNumber)); m_pCommand_GetProcessOutputBit->SetParameterData(2, &p_ubBitNumber, sizeof(p_ubBitNumber)); //Execute Command oResult = m_pCommand_GetProcessOutputBit->Execute(p_pManager, p_hHandle, p_hTransactionHandle); //Get ReturnParameter Data m_pCommand_GetProcessOutputBit->GetReturnParameterData(0, p_pubBitState, sizeof(*p_pubBitState)); //Get ErrorCode m_pCommand_GetProcessOutputBit->GetErrorInfo(p_pErrorInfo); } return oResult; } void CCommandSetProcessInputOutputAccess_VCS_Plc2::InitCommands() { DeleteCommands(); //Init GetProcessOutput m_pCommand_GetProcessOutput = new CCommand_VCS_Plc2(); m_pCommand_GetProcessOutput->InitCommand(PLC2_GET_PROCESS_OUTPUT); //Init SetProcessInput m_pCommand_SetProcessInput = new CCommand_VCS_Plc2(); m_pCommand_SetProcessInput->InitCommand(PLC2_SET_PROCESS_INPUT); //Init GetProcessOutputBit m_pCommand_GetProcessOutputBit = new CCommand_VCS_Plc2(); m_pCommand_GetProcessOutputBit->InitCommand(PLC2_GET_PROCESS_OUTPUT_BIT); //Init SetProcessInputBit m_pCommand_SetProcessInputBit = new CCommand_VCS_Plc2(); m_pCommand_SetProcessInputBit->InitCommand(PLC2_SET_PROCESS_INPUT_BIT); } void CCommandSetProcessInputOutputAccess_VCS_Plc2::DeleteCommands() { if(m_pCommand_GetProcessOutput) { delete m_pCommand_GetProcessOutput; m_pCommand_GetProcessOutput = NULL; } if(m_pCommand_SetProcessInput) { delete m_pCommand_SetProcessInput; m_pCommand_SetProcessInput = NULL; } if(m_pCommand_GetProcessOutputBit) { delete m_pCommand_GetProcessOutputBit; m_pCommand_GetProcessOutputBit = NULL; } if(m_pCommand_SetProcessInputBit) { delete m_pCommand_SetProcessInputBit; m_pCommand_SetProcessInputBit = NULL; } } CXXMLFile::CElementPart* CCommandSetProcessInputOutputAccess_VCS_Plc2::StoreToXMLFile(CXXMLFile* p_pFile, CXXMLFile::CElementPart* p_pParentElement) { CXXMLFile::CElement* pElement(NULL); BOOL oCheckVisibility(FALSE); if(p_pFile && p_pParentElement) { //CommandSet Elements pElement = (CXXMLFile::CElement*)p_pFile->AddElement(p_pParentElement); p_pFile->SetText(pElement, "CommandSet"); pElement->SetAt("Name", m_strCommandSetName); //Command Elements if(m_pCommand_SetProcessInput && !m_pCommand_SetProcessInput->StoreToXMLFile(p_pFile, pElement, oCheckVisibility)) return FALSE; if(m_pCommand_GetProcessOutput && !m_pCommand_GetProcessOutput->StoreToXMLFile(p_pFile, pElement, oCheckVisibility)) return FALSE; if(m_pCommand_SetProcessInputBit && !m_pCommand_SetProcessInputBit->StoreToXMLFile(p_pFile, pElement, oCheckVisibility)) return FALSE; if(m_pCommand_GetProcessOutputBit && !m_pCommand_GetProcessOutputBit->StoreToXMLFile(p_pFile, pElement, oCheckVisibility)) return FALSE; } return pElement; } void CCommandSetProcessInputOutputAccess_VCS_Plc2::InitJournalManager(CJournalManagerBase *p_pJournalManager) { if(m_pCommand_SetProcessInput) m_pCommand_SetProcessInput->InitJournalManager(p_pJournalManager); if(m_pCommand_GetProcessOutput) m_pCommand_GetProcessOutput->InitJournalManager(p_pJournalManager); if(m_pCommand_SetProcessInputBit) m_pCommand_SetProcessInputBit->InitJournalManager(p_pJournalManager); if(m_pCommand_GetProcessOutputBit) m_pCommand_GetProcessOutputBit->InitJournalManager(p_pJournalManager); } void CCommandSetProcessInputOutputAccess_VCS_Plc2::ResetJournalManager() { if(m_pCommand_SetProcessInput) m_pCommand_SetProcessInput->ResetJournalManager(); if(m_pCommand_GetProcessOutput) m_pCommand_GetProcessOutput->ResetJournalManager(); if(m_pCommand_SetProcessInputBit) m_pCommand_SetProcessInputBit->ResetJournalManager(); if(m_pCommand_GetProcessOutputBit) m_pCommand_GetProcessOutputBit->ResetJournalManager(); } BOOL CCommandSetProcessInputOutputAccess_VCS_Plc2::InitGateway(CGateway *p_pGateway) { if(m_pCommand_SetProcessInput && !m_pCommand_SetProcessInput->InitGateway(p_pGateway)) return FALSE; if(m_pCommand_GetProcessOutput && !m_pCommand_GetProcessOutput->InitGateway(p_pGateway)) return FALSE; if(m_pCommand_SetProcessInputBit && !m_pCommand_SetProcessInputBit->InitGateway(p_pGateway)) return FALSE; if(m_pCommand_GetProcessOutputBit && !m_pCommand_GetProcessOutputBit->InitGateway(p_pGateway)) return FALSE; return TRUE; }
8c25a2831d47dc379fbd1e3e0ce71a279c1e16dd
7391491ef4b196077f0b3c903b784aa3b225f47b
/mainwindow.cpp
4651e41ab0997dd06fcd11936402716f832e6db2
[]
no_license
mszlachetka/spis
33cd94e6d2e6937b47b2ec26434a12825b30369f
12920812ce7be99de2657a17512af364ec3b6b2e
refs/heads/master
2021-01-02T23:08:13.911154
2017-05-08T20:47:30
2017-05-08T20:47:30
21,603,838
0
0
null
null
null
null
UTF-8
C++
false
false
6,674
cpp
mainwindow.cpp
#include "mainwindow.h" #include "ui_mainwindow.h" #include "eitem.h" #include "pugiconfig.hpp" #include "pugixml.hpp" #include "string.h" #include "sstream" #include <QMessageBox> #include <iostream> #include <QWindow> using namespace pugi; using namespace std; MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); setWindowTitle("SPIS ELEKTRONIKI"); nrglobal=1; xml_document doc; if(doc.load_file("doc.xml")) { xml_node spis = doc.child("Spis"); for(xml_node przed=spis.child("przedmiot");przed;przed=przed.next_sibling("przedmiot")) { eitem *teitm= new eitem; stringstream ss; ss<<przed.attribute("ilosc").value(); int ilosc=0; ss>>ilosc; teitm->ilosc=ilosc; teitm->nazwa=przed.attribute("nazwa").value(); teitm->typ=przed.attribute("typ").value(); Eitm_vect.push_back(teitm); addItem(0); } } } MainWindow::~MainWindow() { delete ui; } void MainWindow::on_pushButton_clicked() { mDialog= new Dialog(this); QObject::connect(mDialog, SIGNAL(newTextEntered(const QString&,const double&, const QString&,const QIcon&)),this, SLOT(onNewTextEntered(const QString&, const double&,const QString&,const QIcon &))); mDialog->show(); } void MainWindow::onNewTextEntered(const QString &text,const double &ammount,const QString &typ,const QIcon &mIcon) { ui->listWidget->clear(); eitem *przedmiot= new eitem; nrglobal=1; przedmiot->nazwa=text; przedmiot->ilosc=ammount; przedmiot->typ=typ; przedmiot->mIcon=mIcon; Eitm_vect.push_back(przedmiot); if(ui->listWidget->count()!=0) addItem(getnumber()); else addItem(0); } void MainWindow::on_pushButton_2_clicked() { if(!Eitm_vect.isEmpty() && ui->listWidget->isItemSelected(ui->listWidget->currentItem())) { if(Eitm_vect.size()>=1 && getnumber()!=Eitm_vect.size()) Eitm_vect.remove(getnumber()); else if(getnumber()==Eitm_vect.size()) Eitm_vect.removeLast(); if(ui->listWidget->count()!=0) addItem(getnumber()); else addItem(0); } } void MainWindow::on_listWidget_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous) { if(current!=NULL) current->setBackgroundColor(Qt::green); if(previous!=NULL) previous->setBackgroundColor(Qt::white); } void MainWindow::on_pushButton_3_clicked() { xml_document doc; xml_node spis = doc.append_child("Spis"); spis.append_attribute("Tytul")="ELEKTRONIKA"; for(int i=0; i<Eitm_vect.size();i++) { xml_node przedmiot = spis.append_child("przedmiot"); przedmiot.append_attribute("typ") =Eitm_vect.at(i)->typ.toStdString().c_str(); przedmiot.append_attribute("ilosc") = Eitm_vect.at(i)->ilosc; przedmiot.append_attribute("nazwa") =Eitm_vect.at(i)->nazwa.toStdString().c_str(); } doc.save_file("doc.xml"); QApplication::quit(); } void MainWindow::on_actionO_Qt_triggered() { QApplication::aboutQt(); } void MainWindow::on_lineEdit_textChanged(const QString ) { ui->listWidget->clear(); nrglobal=1; QString check; for(int i=0;i<Eitm_vect.size();i++) { check=Eitm_vect.at(i)->nazwa+ " "+QString::number(Eitm_vect.at(i)->ilosc)+" "+Eitm_vect.at(i)->typ; if(check.contains(ui->lineEdit->text())) { QListWidgetItem *itm=new QListWidgetItem(Eitm_vect.at(i)->mIcon ,QString::number(Eitm_vect.at(i)->nrporz)+"[ "+Eitm_vect.at(i)->typ+ " ][ "+Eitm_vect.at(i)->nazwa+" ][ "+QString::number(Eitm_vect.at(i)->ilosc)+" ]",0,0); ui->listWidget->addItem(itm); } } } void MainWindow::on_pushButton_4_clicked() { if(!Eitm_vect.isEmpty() && ui->listWidget->isItemSelected(ui->listWidget->currentItem())) { Eitm_vect.at(getnumber())->ilosc++; if(ui->listWidget->count()!=0) addItem(getnumber()); else addItem(0); } } void MainWindow::addItem(int lastone) { nrglobal=1; ui->listWidget->clear(); for(int i=0;i<Eitm_vect.size();i++) { Eitm_vect.at(i)->nazwa+ " "+QString::number(Eitm_vect.at(i)->ilosc)+" "+Eitm_vect.at(i)->typ; Eitm_vect.at(i)->nrporz=nrglobal; QListWidgetItem *itm=new QListWidgetItem(Eitm_vect.at(i)->mIcon ,QString::number(Eitm_vect.at(i)->nrporz)+"[ "+Eitm_vect.at(i)->typ+ " ][ "+Eitm_vect.at(i)->nazwa+" ][ "+QString::number(Eitm_vect.at(i)->ilosc)+" ]",0,0); ui->listWidget->addItem(itm); nrglobal++; } ui->listWidget->setCurrentRow(lastone); ui->listWidget->show(); if(Eitm_vect.size()<10) { ui->listWidget->setMaximumHeight(19*(Eitm_vect.size()+1)); ui->listWidget->setMinimumHeight(19*(Eitm_vect.size()+1)); } } void MainWindow::on_pushButton_5_clicked() { if(!Eitm_vect.isEmpty() && ui->listWidget->isItemSelected(ui->listWidget->currentItem())) { if(Eitm_vect.at(getnumber())->ilosc>0) Eitm_vect.at(getnumber())->ilosc--; if(ui->listWidget->count()!=0) { addItem(getnumber()); if(Eitm_vect.at(getnumber())->ilosc == 0) { ui->listWidget->currentItem()->setBackgroundColor(Qt::red); } else { ui->listWidget->currentItem()->setBackgroundColor(Qt::green); } } else addItem(0); } } int MainWindow::getnumber() { int i=0; int mNumber=0; while(ui->listWidget->currentItem()->text().at(i).isDigit()) { mNumber=mNumber*10; mNumber=mNumber+(ui->listWidget->currentItem()->text().at(i).digitValue()); i++; } mNumber--; return mNumber; } void MainWindow::on_lineEdit_returnPressed() { ui->listWidget->clear(); nrglobal=1; QString check; for(int i=0;i<Eitm_vect.size();i++) { check=Eitm_vect.at(i)->nazwa+ " "+QString::number(Eitm_vect.at(i)->ilosc)+" "+Eitm_vect.at(i)->typ; if(check.contains(ui->lineEdit->text())) { QListWidgetItem *itm=new QListWidgetItem(Eitm_vect.at(i)->mIcon ,QString::number(Eitm_vect.at(i)->nrporz)+"[ "+Eitm_vect.at(i)->typ+ " ][ "+Eitm_vect.at(i)->nazwa+" ][ "+QString::number(Eitm_vect.at(i)->ilosc)+" ]",0,0); ui->listWidget->addItem(itm); } } } void MainWindow::on_action_triggered() { mSkroty=new skroty(this); mSkroty->show(); }
812032b59bc2105813fa1bac8b12e02a0940defe
0dbbee35b6424f35ac79925e2d086d00314ea1a0
/Session.cc
9d2ffa9f9bd6053dc88eaa5dbfbc592ee01e2191
[]
no_license
alexalkis/mcl
c8f9600969e066e0aaad8eea1901d2fd8c0d3a2f
652f37f7936f7dccbd8afd548ec524f440b5e91a
refs/heads/master
2021-06-07T20:59:59.018136
2020-08-12T06:41:58
2020-08-12T06:41:58
96,246,276
0
0
null
null
null
null
UTF-8
C++
false
false
19,394
cc
Session.cc
// Sesssion.cc // This defines a Session structure which communicates with a MUD #include <ctype.h> #include <fcntl.h> #include <unistd.h> #include <errno.h> #include <time.h> #include <sys/time.h> #include <sys/types.h> #include <arpa/telnet.h> #include "mcl.h" #include "cui.h" #include "Session.h" #include "Interpreter.h" #include "Action.h" #include "Alias.h" #include "Curses.h" #include "Chat.h" const int connectTimeout = 30; // Network window class NetworkStateWindow : public Window { public: NetworkStateWindow (Session& _ses) : Window(screen, 19,1, None, -18, 1), ses(_ses) {} private: virtual void redraw(); virtual bool keypress(int key); Session& ses; }; enum show_t {show_clock, show_clock_sec, show_timer, show_timer_sec, max_show_t }; int timer_show [8][max_show_t] = { {1,1,1,1}, {1,0,1,1}, {1,0,1,0}, {1,1,0,0}, {1,0,0,0}, {0,0,1,1}, {0,0,1,0}, {-1,-1,-1,-1} }; // Convert to X, xK, xM, xG const char* csBytes(int n) { int letter = ' '; double f = n; if (f > 1024) { f /= 1024; letter = 'k'; } if (f > 1024) { f /= 1024; letter = 'm'; } if (letter == ' ' ) return Sprintf("%.0f", f); else return Sprintf("%.1f%c", f, letter); } class StatWindow : public Window { public: StatWindow(Session &_ses) : Window(screen, 15, 1, None, -15, 3), ses(_ses), last_bytes_written(-1), last_bytes_read(-1) { } virtual void idle() { if (last_bytes_written != ses.stats.bytes_written || last_bytes_read != ses.stats.bytes_read) { force_update(); } } virtual void redraw() { set_color(config->getOption(opt_statcolor)); clear(); gotoxy(0,0); printf("%7s/%7s", csBytes(ses.stats.bytes_read), csBytes(ses.stats.bytes_written)); last_bytes_written = ses.stats.bytes_written; last_bytes_read = ses.stats.bytes_read; dirty = false; } private: Session& ses; int last_bytes_written, last_bytes_read; }; class TimerWindow : public Window { public: TimerWindow(Session &_ses) :Window (screen, 17, 1, None, -17, 2 ), ses(_ses), last_update(-1), state(config->getOption(opt_timerstate)) {} private: Session& ses; virtual void redraw(); virtual void idle(); virtual bool keypress(int key); time_t last_update; int state, last_state; }; void TimerWindow::idle() { if (last_update != current_time) force_update(); } void TimerWindow::redraw () { last_state = state; gotoxy (0, 0); set_color (config->getOption (opt_timercolor)); // Adjust dimensions based on what we have to show height = 1; width = 0; if (timer_show[state][show_clock]) width += 5; if (timer_show[state][show_clock_sec]) width += 3; if (timer_show[state][show_timer]) width += 6; if (timer_show[state][show_timer_sec]) width += 3; if (timer_show[state][show_clock] && timer_show[state][show_timer]) width++; resize(width, height); move(parent->width - width, parent_y); clear (); last_update = current_time; if (timer_show[state][show_clock]) { struct tm *tm = localtime (&current_time); printf ("%02d:%02d", tm->tm_hour, tm->tm_min); if (timer_show[state][show_clock_sec]) printf (":%02d", tm->tm_sec); } if (timer_show[state][show_clock] && timer_show[state][show_timer]) print (" "); if (timer_show[state][show_timer]) { int difference = int (difftime (current_time, ses.stats.dial_time)); printf ("%03d:", difference / (60 * 60)); difference -= (difference / (60 * 60)) * 60 * 60; printf ("%02d", difference / 60); if (timer_show[state][show_timer_sec]) printf (":%02d", difference % 60); } dirty = false; } bool TimerWindow::keypress(int key) { if (key == key_ctrl_t) { dirty = true; // Die if we reach the end of the table if (timer_show[++state][show_clock] < 0) { ses.timer = NULL; die(); } return true; } else return false; } void NetworkStateWindow::redraw () { int tx_queue, rx_queue; int timer, retrans; set_color(config->getOption(opt_statcolor)); clear (); gotoxy(0,0); switch (mudcompress_version(ses.mcinfo)) { case 0: printf(" "); break; case 1: printf("c "); break; case 2: printf("C "); break; default: printf("C?"); break; } if (ses.state == disconnected) printf ("Offline"); // Hmm, this cannot really happen else if (ses.get_connection_stats (tx_queue, rx_queue, timer, retrans)) printf ("%4d %2d %5.1f/%2d", tx_queue, rx_queue, timer/100.0, retrans); dirty = false; } bool NetworkStateWindow::keypress(int key) { if (key == key_alt_s) { ses.statWindow->die(); ses.statWindow = NULL; ses.nsw = NULL; die(); return true; } else return false; } Session::Session(MUD& _mud, Window *_window, int _fd) : Socket(_fd), state(disconnected),mud(_mud), window(_window), pos(0), nsw(NULL), timer(NULL), statWindow(NULL), last_nsw_update(0) { input_buffer[0] = NUL; prompt[0] = NUL; memset(&stats,0,sizeof(stats)); if (config->getOption(opt_autostatwin)) show_nsw(); if (config->getOption(opt_autotimerwin)) show_timer(); mcinfo = mudcompress_new(); if (!mud.loaded) { mud.loaded = true; embed_interp->load_file(mud.name, true); } embed_interp->set("mud", mud.name); embed_interp->run_quietly("sys/connect", "", NULL); if (_fd != -1) { stats.dial_time = current_time; establishConnection(true); } } Session::~Session() { close(); if (nsw) nsw->die(); if (timer) timer->die(); if (statWindow) statWindow->die(); unsigned long comp, uncomp; mudcompress_stats(mcinfo, &comp, &uncomp); globalStats.comp_read += comp; globalStats.uncomp_read += uncomp; mudcompress_delete(mcinfo); set_title("mcl - unconnected"); } // Write to whatever we are connected to // Also log, if logging is active? void Session::print (const char *s) { if (window) window->print(s); } // Try to connect to mud bool Session::open() { int res = connect(mud.getHostname(), mud.getPort(), true); if (res != errNoError && res != EINPROGRESS) { status->setf ("%s - error ocurred: %s", mud.getFullName(), getErrorText()); return false; } status->setf ("Connecting to %s", mud.getFullName()); state = connecting; stats.dial_time = current_time; set_title(Sprintf("mcl - connecting to %s", mud.getFullName())); return true; } // Disconnect from mud bool Session::close() { if (state > disconnected) { // Closing a closed session has no effect state = disconnected; embed_interp->run_quietly("sys/loselink", "", NULL); } embed_interp->set("mud", ""); return true; } void Session::writeMUD(const char *s) { writeLine(s); globalStats.bytes_written += strlen(s); stats.bytes_written += strlen(s); } // Do various time updates void Session::idle() { if (state == connecting) { int time_left = stats.dial_time - current_time + connectTimeout; if (time_left <= 0) { close(); status->setf ("Connection to %s timed out", mud.getFullName()); } else { static char filled_string[64]; static char empty_string[64]; char buf[256]; if (!filled_string[0]) { for (unsigned int i = 0; i < sizeof(filled_string)-1; i++) { filled_string[i] = special_chars[sc_filled_box]; empty_string[i] = special_chars[sc_half_filled_box]; } } sprintf(buf,"Connecting to %s %-.*s%-.*s", mud.getFullName(), connectTimeout-time_left+1, filled_string, time_left-1, empty_string); status->setf (buf); } } if (nsw && last_nsw_update != current_time) { nsw->force_update(); last_nsw_update = current_time; } } void Session::set_prompt (const char *s, int len) { char buf[MAX_MUD_BUF]; memcpy(buf, s, len); buf[len] = NUL; embed_interp->run_quietly("sys/prompt", buf, buf); inputLine->set_prompt(buf); } void Session::establishConnection (bool quick_restore) { state = connected; stats.connect_time = current_time; // Send commands, if any if (!quick_restore && mud.commands.len()) interpreter.add(mud.commands, EXPAND_ALL); char buf[256]; sprintf(buf, "mcl - %s", mud.getFullName()); set_title(buf); } void Session::connectionEstablished() { // Called from Socket establishConnection(false); status->setf("Connection to %s successful", mud.getFullName()); } void Session::errorEncountered(int) { status->setf ("%s - %s", mud.getFullName(), getErrorText()); close(); } // Data from the MUD has arrived void Session::inputReady() { char out_buf[MAX_MUD_BUF]; char temp_buf[MAX_MUD_BUF]; char *out; int code_pos; char *prompt_begin; int count; int i; count = read(temp_buf, MAX_MUD_BUF-1); globalStats.bytes_read += count; stats.bytes_read += count; // Filter through mudcompress mudcompress_receive(mcinfo, temp_buf, count); // Error? if (mudcompress_error(mcinfo)) { close(); status->setf ("%s - compression error", mud.getFullName()); return; } // Need to respond? const char *mc_response = mudcompress_response(mcinfo); while (mc_response) { write(mc_response, strlen(mc_response)); mc_response = mudcompress_response(mcinfo); } while (mudcompress_pending(mcinfo) && pos < MAX_MUD_BUF-1) { // Get some data count = mudcompress_get(mcinfo, (char*) input_buffer + pos, MAX_MUD_BUF - pos - 1); if (count > 0 && chatServerSocket) chatServerSocket->handleSnooping((char*)(input_buffer+pos), count); prompt_begin = NULL; out = out_buf; /* If we have data from last call, this means we got some incomplete ansi */ if (pos) code_pos = 0; else code_pos = -1; /* Process the buffer */ for (i = 0; i < count + pos; i++) { /* Lose patience of code does not terminate within 16 characters */ if (code_pos >= 0 && i - code_pos > 16) code_pos = -1; /* IAC: next character is a telnet command */ if (input_buffer[i] == IAC) { if (++i < count + pos) /* just forget it if it appears at the end of a buffer */ { /* spec: handle prompts that split across reads */ if (input_buffer[i] == GA || input_buffer[i] == EOR) /* this is a prompt */ { /* if we have a prompt_begin, that's the start of * the prompt. If we don't, then the contents * of the 'prompt' buffer, plus any output we * have, is the prompt. */ if(!config->getOption(opt_snarf_prompt)) { if(prompt_begin) { int len = out - prompt_begin; char *buf = new char[len + 1]; memcpy(buf, prompt_begin+1, len); buf[len] = '\0'; embed_interp->run_quietly("sys/prompt", buf, buf); } } else if (prompt_begin) { set_prompt (prompt_begin + 1, out - prompt_begin - 1); if (!config->getOption(opt_showprompt)) out = prompt_begin + 1; } else { if (prompt[0] || out[0]) { unsigned char *temp = prompt + strlen ((char*)prompt); *out = NUL; strcat ((char*)prompt, out_buf); set_prompt ((char*)prompt, (int)strlen ((char*)prompt)); *temp = NUL; } if (!config->getOption(opt_showprompt)) out = out_buf; } // Insert a clear color code here // It'd be better to interpret color codes in the prompt properly, // but that is surprisingly hard to do *out++ = SET_COLOR; *out++ = bg_black|fg_white; // Is that really the *default* color? prompt[0] = NUL; prompt_begin = out; } // React to IAC WILL EOR and send back IAC DO EOR else if (input_buffer[i] == WILL && (i+1) < count+pos && input_buffer[i+1] == TELOPT_EOR) { i++; // @@ use telnet.h defines here write ("\377\375\31", 3); } /* Skip the next character if this is an option */ else if (input_buffer[i] >= WILL && input_buffer[i] <= DONT) i++; } continue; } // Escape sequence else if (input_buffer[i] == '\e') code_pos = i; // Attention else if (input_buffer[i] == '\a' && config->getOption(opt_mudbeep)) ::write(STDOUT_FILENO, "\a", 1); // use screen->flash() here? else if (code_pos == -1) { // not inside a color code, real text if (input_buffer[i] == '\n') { // Do regexp trigger magic bool cancel_line = triggerCheck(prompt_begin ? prompt_begin+1 : (char*) out_buf, prompt_begin ? out-prompt_begin-1: out-out_buf, &out); prompt_begin = out; if (cancel_line) { // We just gagged that line, so the \n which otherwise would be the beginning of the prompt // is eaten up. if (out > out_buf) prompt_begin = out-1; else prompt_begin = NULL; continue; } } if (input_buffer[i] != '\r') /* discard those */ *out++ = input_buffer[i]; /* Add to output buffer */ } /* Check if the code should terminate here */ if (code_pos >= 0 && isalpha (input_buffer[i])) { int color; /* Conver this color code to internal representation */ if ((color = colorConverter.convert (input_buffer + code_pos, i - code_pos + 1)) > 0) { *out++ = SET_COLOR; *out++ = color; } if (colorConverter.checkReportStatus()) { /* suggested by Chris Litchfield */ output->printf("\n(Sending location code\n"); writeMUD("\e[40;13R\n"); } code_pos = -1; } } *out = NUL; // Run triggers on incompletely received lines bool cancel_line = triggerCheck(prompt_begin ? prompt_begin+1 : (char*) out_buf, prompt_begin ? out-prompt_begin-1: out-out_buf, &out); prompt_begin = out; if (cancel_line) { // We just gagged that line, so the \n which otherwise would be the beginning of the prompt // is eaten up. if (out > out_buf) prompt_begin = out-1; else prompt_begin = NULL; } print (out_buf); /* Do we have some leftover data, an incomplete ANSI sequence? */ if (code_pos >= 0) { /* Copy so that the buffer is at the beginning of that code */ memcpy (input_buffer, input_buffer + code_pos, count + pos - code_pos); /* Next incoming data will be put there */ pos = count + pos - code_pos; } else pos = 0; /* spec: fix up partial lines for subsequent prompts */ if (prompt_begin) strcpy ((char*)prompt, prompt_begin); else if (strlen((char*)prompt) < MAX_MUD_BUF/4 && strlen(out_buf) < MAX_MUD_BUF/4) { // guard against too long lines strcat((char*)prompt, out_buf); } } // end while } void Session::show_timer() { timer = new TimerWindow(*this); } void Session::show_nsw() { nsw = new NetworkStateWindow(*this); statWindow = new StatWindow(*this); } bool Session::expand_macros(int key) { if (macros_disabled) return false; // This is a bit primitive currently Macro *m = mud.findMacro(key); if (m) { if (config->getOption(opt_echoinput)) { char buf[256]; snprintf (buf, sizeof(buf), "%c>> %s -> %s\n", SOFT_CR, key_name(m->key), ~m->text); print(buf); } interpreter.add(m->text, EXPAND_ALL); return true; } return false; } // Check triggers // Also do replacement: if replacing, adjust *out bool Session::triggerCheck (char *line, int len, char **new_out) { char *s; int old_len = len; // Len can be -1 if all we get is a \nprompt or such if ( len < 0) return false; char buf[MAX_MUD_BUF]; char uncolored[MAX_MUD_BUF]; char *out2 = uncolored; memcpy(buf, line, len); buf[len] = NUL; for (s = line; s < line+len; s++) { if ((unsigned char) *s == SET_COLOR) { s++; } else *out2++ = *s; } *out2 = NUL; if (!actions_disabled) mud.checkActionMatch(uncolored); mud.checkReplacement(buf, len, new_out); // Input stuff if (embed_interp->run_quietly("sys/output", buf, *new_out-len)) { int new_len = strlen(*new_out-len); *new_out += strlen(*new_out-len) - len; len = new_len; } // if we had a >0 char line and now have 0 line.. signal back that // the line shouldn't be shown at all if (old_len > 0 && len == 0) return true; else return false; }
b7d2a13405467a02ee9015eed2b9bd2b48bef36e
62669fbaa3d9b52bd34a8ab8bf781f2d18b3778b
/examples/dnn_mmod_train_find_cars_ex.cpp
b97e25a85b97693bb532babe1f1fcc02ad59c4d3
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference", "CC-PDDC", "BSL-1.0" ]
permissive
davisking/dlib
05c04e5c73c8b92526c77431e9bb622974ffe3f2
f6c58c2d21a49d84967e48ffa33e7d1c783ae671
refs/heads/master
2023-09-06T08:22:13.063202
2023-08-26T23:55:59
2023-08-26T23:55:59
16,331,291
13,118
3,600
BSL-1.0
2023-09-10T12:50:42
2014-01-29T00:45:33
C++
UTF-8
C++
false
false
23,187
cpp
dnn_mmod_train_find_cars_ex.cpp
// The contents of this file are in the public domain. See LICENSE_FOR_EXAMPLE_PROGRAMS.txt /* This example shows how to train a CNN based object detector using dlib's loss_mmod loss layer. This loss layer implements the Max-Margin Object Detection loss as described in the paper: Max-Margin Object Detection by Davis E. King (http://arxiv.org/abs/1502.00046). This is the same loss used by the popular SVM+HOG object detector in dlib (see fhog_object_detector_ex.cpp) except here we replace the HOG features with a CNN and train the entire detector end-to-end. This allows us to make much more powerful detectors. It would be a good idea to become familiar with dlib's DNN tooling before reading this example. So you should read dnn_introduction_ex.cpp and dnn_introduction2_ex.cpp before reading this example program. You should also read the introductory DNN+MMOD example dnn_mmod_ex.cpp as well before proceeding. This example is essentially a more complex version of dnn_mmod_ex.cpp. In it we train a detector that finds the rear ends of motor vehicles. I will also discuss some aspects of data preparation useful when training this kind of detector. */ #include <iostream> #include <dlib/dnn.h> #include <dlib/data_io.h> using namespace std; using namespace dlib; template <long num_filters, typename SUBNET> using con5d = con<num_filters,5,5,2,2,SUBNET>; template <long num_filters, typename SUBNET> using con5 = con<num_filters,5,5,1,1,SUBNET>; template <typename SUBNET> using downsampler = relu<bn_con<con5d<32, relu<bn_con<con5d<32, relu<bn_con<con5d<16,SUBNET>>>>>>>>>; template <typename SUBNET> using rcon5 = relu<bn_con<con5<55,SUBNET>>>; using net_type = loss_mmod<con<1,9,9,1,1,rcon5<rcon5<rcon5<downsampler<input_rgb_image_pyramid<pyramid_down<6>>>>>>>>; // ---------------------------------------------------------------------------------------- int ignore_overlapped_boxes( std::vector<mmod_rect>& boxes, const test_box_overlap& overlaps ) /*! ensures - Whenever two rectangles in boxes overlap, according to overlaps(), we set the smallest box to ignore. - returns the number of newly ignored boxes. !*/ { int num_ignored = 0; for (size_t i = 0; i < boxes.size(); ++i) { if (boxes[i].ignore) continue; for (size_t j = i+1; j < boxes.size(); ++j) { if (boxes[j].ignore) continue; if (overlaps(boxes[i], boxes[j])) { ++num_ignored; if(boxes[i].rect.area() < boxes[j].rect.area()) boxes[i].ignore = true; else boxes[j].ignore = true; } } } return num_ignored; } // ---------------------------------------------------------------------------------------- int main(int argc, char** argv) try { if (argc != 2) { cout << "Give the path to a folder containing training.xml and testing.xml files." << endl; cout << "This example program is specifically designed to run on the dlib vehicle " << endl; cout << "detection dataset, which is available at this URL: " << endl; cout << " http://dlib.net/files/data/dlib_rear_end_vehicles_v1.tar" << endl; cout << endl; cout << "So download that dataset, extract it somewhere, and then run this program" << endl; cout << "with the dlib_rear_end_vehicles folder as an argument. E.g. if you extract" << endl; cout << "the dataset to the current folder then you should run this example program" << endl; cout << "by typing: " << endl; cout << " ./dnn_mmod_train_find_cars_ex dlib_rear_end_vehicles" << endl; cout << endl; cout << "It takes about a day to finish if run on a high end GPU like a 1080ti." << endl; cout << endl; return 0; } const std::string data_directory = argv[1]; std::vector<matrix<rgb_pixel>> images_train, images_test; std::vector<std::vector<mmod_rect>> boxes_train, boxes_test; load_image_dataset(images_train, boxes_train, data_directory+"/training.xml"); load_image_dataset(images_test, boxes_test, data_directory+"/testing.xml"); // When I was creating the dlib vehicle detection dataset I had to label all the cars // in each image. MMOD requires all cars to be labeled, since any unlabeled part of an // image is implicitly assumed to be not a car, and the algorithm will use it as // negative training data. So every car must be labeled, either with a normal // rectangle or an "ignore" rectangle that tells MMOD to simply ignore it (i.e. neither // treat it as a thing to detect nor as negative training data). // // In our present case, many images contain very tiny cars in the distance, ones that // are essentially just dark smudges. It's not reasonable to expect the CNN // architecture we defined to detect such vehicles. However, I erred on the side of // having more complete annotations when creating the dataset. So when I labeled these // images I labeled many of these really difficult cases as vehicles to detect. // // So the first thing we are going to do is clean up our dataset a little bit. In // particular, we are going to mark boxes smaller than 35*35 pixels as ignore since // only really small and blurry cars appear at those sizes. We will also mark boxes // that are heavily overlapped by another box as ignore. We do this because we want to // allow for stronger non-maximum suppression logic in the learned detector, since that // will help make it easier to learn a good detector. // // To explain this non-max suppression idea further it's important to understand how // the detector works. Essentially, sliding window detectors scan all image locations // and ask "is there a car here?". If there really is a car in a specific location in // an image then usually many slightly different sliding window locations will produce // high detection scores, indicating that there is a car at those locations. If we // just stopped there then each car would produce multiple detections. But that isn't // what we want. We want each car to produce just one detection. So it's common for // detectors to include "non-maximum suppression" logic which simply takes the // strongest detection and then deletes all detections "close to" the strongest. This // is a simple post-processing step that can eliminate duplicate detections. However, // we have to define what "close to" means. We can do this by looking at your training // data and checking how close the closest target boxes are to each other, and then // picking a "close to" measure that doesn't suppress those target boxes but is // otherwise as tight as possible. This is exactly what the mmod_options object does // by default. // // Importantly, this means that if your training dataset contains an image with two // target boxes that really overlap a whole lot, then the non-maximum suppression // "close to" measure will be configured to allow detections to really overlap a whole // lot. On the other hand, if your dataset didn't contain any overlapped boxes at all, // then the non-max suppression logic would be configured to filter out any boxes that // overlapped at all, and thus would be performing a much stronger non-max suppression. // // Why does this matter? Well, remember that we want to avoid duplicate detections. // If non-max suppression just kills everything in a really wide area around a car then // the CNN doesn't really need to learn anything about avoiding duplicate detections. // However, if non-max suppression only suppresses a tiny area around each detection // then the CNN will need to learn to output small detection scores for those areas of // the image not suppressed. The smaller the non-max suppression region the more the // CNN has to learn and the more difficult the learning problem will become. This is // why we remove highly overlapped objects from the training dataset. That is, we do // it so the non-max suppression logic will be able to be reasonably effective. Here // we are ensuring that any boxes that are entirely contained by another are // suppressed. We also ensure that boxes with an intersection over union of 0.5 or // greater are suppressed. This will improve the resulting detector since it will be // able to use more aggressive non-max suppression settings. int num_overlapped_ignored_test = 0; for (auto& v : boxes_test) num_overlapped_ignored_test += ignore_overlapped_boxes(v, test_box_overlap(0.50, 0.95)); int num_overlapped_ignored = 0; int num_additional_ignored = 0; for (auto& v : boxes_train) { num_overlapped_ignored += ignore_overlapped_boxes(v, test_box_overlap(0.50, 0.95)); for (auto& bb : v) { if (bb.rect.width() < 35 && bb.rect.height() < 35) { if (!bb.ignore) { bb.ignore = true; ++num_additional_ignored; } } // The dlib vehicle detection dataset doesn't contain any detections with // really extreme aspect ratios. However, some datasets do, often because of // bad labeling. So it's a good idea to check for that and either eliminate // those boxes or set them to ignore. Although, this depends on your // application. // // For instance, if your dataset has boxes with an aspect ratio // of 10 then you should think about what that means for the network // architecture. Does the receptive field even cover the entirety of the box // in those cases? Do you care about these boxes? Are they labeling errors? // I find that many people will download some dataset from the internet and // just take it as given. They run it through some training algorithm and take // the dataset as unchallengeable truth. But many datasets are full of // labeling errors. There are also a lot of datasets that aren't full of // errors, but are annotated in a sloppy and inconsistent way. Fixing those // errors and inconsistencies can often greatly improve models trained from // such data. It's almost always worth the time to try and improve your // training dataset. // // In any case, my point is that there are other types of dataset cleaning you // could put here. What exactly you need depends on your application. But you // should carefully consider it and not take your dataset as a given. The work // of creating a good detector is largely about creating a high quality // training dataset. } } // When modifying a dataset like this, it's a really good idea to print a log of how // many boxes you ignored. It's easy to accidentally ignore a huge block of data, so // you should always look and see that things are doing what you expect. cout << "num_overlapped_ignored: "<< num_overlapped_ignored << endl; cout << "num_additional_ignored: "<< num_additional_ignored << endl; cout << "num_overlapped_ignored_test: "<< num_overlapped_ignored_test << endl; cout << "num training images: " << images_train.size() << endl; cout << "num testing images: " << images_test.size() << endl; // Our vehicle detection dataset has basically 3 different types of boxes. Square // boxes, tall and skinny boxes (e.g. semi trucks), and short and wide boxes (e.g. // sedans). Here we are telling the MMOD algorithm that a vehicle is recognizable as // long as the longest box side is at least 70 pixels long and the shortest box side is // at least 30 pixels long. mmod_options will use these parameters to decide how large // each of the sliding windows needs to be so as to be able to detect all the vehicles. // Since our dataset has basically these 3 different aspect ratios, it will decide to // use 3 different sliding windows. This means the final con layer in the network will // have 3 filters, one for each of these aspect ratios. // // Another thing to consider when setting the sliding window size is the "stride" of // your network. The network we defined above downsamples the image by a factor of 8x // in the first few layers. So when the sliding windows are scanning the image, they // are stepping over it with a stride of 8 pixels. If you set the sliding window size // too small then the stride will become an issue. For instance, if you set the // sliding window size to 4 pixels, then it means a 4x4 window will be moved by 8 // pixels at a time when scanning. This is obviously a problem since 75% of the image // won't even be visited by the sliding window. So you need to set the window size to // be big enough relative to the stride of your network. In our case, the windows are // at least 30 pixels in length, so being moved by 8 pixel steps is fine. mmod_options options(boxes_train, 70, 30); // This setting is very important and dataset specific. The vehicle detection dataset // contains boxes that are marked as "ignore", as we discussed above. Some of them are // ignored because we set ignore to true in the above code. However, the xml files // also contained a lot of ignore boxes. Some of them are large boxes that encompass // large parts of an image and the intention is to have everything inside those boxes // be ignored. Therefore, we need to tell the MMOD algorithm to do that, which we do // by setting options.overlaps_ignore appropriately. // // But first, we need to understand exactly what this option does. The MMOD loss // is essentially counting the number of false alarms + missed detections produced by // the detector for each image. During training, the code is running the detector on // each image in a mini-batch and looking at its output and counting the number of // mistakes. The optimizer tries to find parameters settings that minimize the number // of detector mistakes. // // This overlaps_ignore option allows you to tell the loss that some outputs from the // detector should be totally ignored, as if they never happened. In particular, if a // detection overlaps a box in the training data with ignore==true then that detection // is ignored. This overlap is determined by calling // options.overlaps_ignore(the_detection, the_ignored_training_box). If it returns // true then that detection is ignored. // // You should read the documentation for test_box_overlap, the class type for // overlaps_ignore for full details. However, the gist is that the default behavior is // to only consider boxes as overlapping if their intersection over union is > 0.5. // However, the dlib vehicle detection dataset contains large boxes that are meant to // mask out large areas of an image. So intersection over union isn't an appropriate // way to measure "overlaps with box" in this case. We want any box that is contained // inside one of these big regions to be ignored, even if the detection box is really // small. So we set overlaps_ignore to behave that way with this line. options.overlaps_ignore = test_box_overlap(0.5, 0.95); net_type net(options); // The final layer of the network must be a con layer that contains // options.detector_windows.size() filters. This is because these final filters are // what perform the final "sliding window" detection in the network. For the dlib // vehicle dataset, there will be 3 sliding window detectors, so we will be setting // num_filters to 3 here. net.subnet().layer_details().set_num_filters(options.detector_windows.size()); dnn_trainer<net_type> trainer(net,sgd(0.0001,0.9)); trainer.set_learning_rate(0.1); trainer.be_verbose(); // While training, we are going to use early stopping. That is, we will be checking // how good the detector is performing on our test data and when it stops getting // better on the test data we will drop the learning rate. We will keep doing that // until the learning rate is less than 1e-4. These two settings tell the trainer to // do that. Essentially, we are setting the first argument to infinity, and only the // test iterations without progress threshold will matter. In particular, it says that // once we observe 1000 testing mini-batches where the test loss clearly isn't // decreasing we will lower the learning rate. trainer.set_iterations_without_progress_threshold(50000); trainer.set_test_iterations_without_progress_threshold(1000); const string sync_filename = "mmod_cars_sync"; trainer.set_synchronization_file(sync_filename, std::chrono::minutes(5)); std::vector<matrix<rgb_pixel>> mini_batch_samples; std::vector<std::vector<mmod_rect>> mini_batch_labels; random_cropper cropper; cropper.set_seed(time(0)); cropper.set_chip_dims(350, 350); // Usually you want to give the cropper whatever min sizes you passed to the // mmod_options constructor, or very slightly smaller sizes, which is what we do here. cropper.set_min_object_size(69,28); cropper.set_max_rotation_degrees(2); dlib::rand rnd; // Log the training parameters to the console cout << trainer << cropper << endl; int cnt = 1; // Run the trainer until the learning rate gets small. while(trainer.get_learning_rate() >= 1e-4) { // Every 30 mini-batches we do a testing mini-batch. if (cnt%30 != 0 || images_test.size() == 0) { cropper(87, images_train, boxes_train, mini_batch_samples, mini_batch_labels); // We can also randomly jitter the colors and that often helps a detector // generalize better to new images. for (auto&& img : mini_batch_samples) disturb_colors(img, rnd); // It's a good idea to, at least once, put code here that displays the images // and boxes the random cropper is generating. You should look at them and // think about if the output makes sense for your problem. Most of the time // it will be fine, but sometimes you will realize that the pattern of cropping // isn't really appropriate for your problem and you will need to make some // change to how the mini-batches are being generated. Maybe you will tweak // some of the cropper's settings, or write your own entirely separate code to // create mini-batches. But either way, if you don't look you will never know. // An easy way to do this is to create a dlib::image_window to display the // images and boxes. trainer.train_one_step(mini_batch_samples, mini_batch_labels); } else { cropper(87, images_test, boxes_test, mini_batch_samples, mini_batch_labels); // We can also randomly jitter the colors and that often helps a detector // generalize better to new images. for (auto&& img : mini_batch_samples) disturb_colors(img, rnd); trainer.test_one_step(mini_batch_samples, mini_batch_labels); } ++cnt; } // wait for training threads to stop trainer.get_net(); cout << "done training" << endl; // Save the network to disk net.clean(); serialize("mmod_rear_end_vehicle_detector.dat") << net; // It's a really good idea to print the training parameters. This is because you will // invariably be running multiple rounds of training and should be logging the output // to a file. This print statement will include many of the training parameters in // your log. cout << trainer << cropper << endl; cout << "\nsync_filename: " << sync_filename << endl; cout << "num training images: "<< images_train.size() << endl; cout << "training results: " << test_object_detection_function(net, images_train, boxes_train, test_box_overlap(), 0, options.overlaps_ignore); // Upsampling the data will allow the detector to find smaller cars. Recall that // we configured it to use a sliding window nominally 70 pixels in size. So upsampling // here will let it find things nominally 35 pixels in size. Although we include a // limit of 1800*1800 here which means "don't upsample an image if it's already larger // than 1800*1800". We do this so we don't run out of RAM, which is a concern because // some of the images in the dlib vehicle dataset are really high resolution. upsample_image_dataset<pyramid_down<2>>(images_train, boxes_train, 1800*1800); cout << "training upsampled results: " << test_object_detection_function(net, images_train, boxes_train, test_box_overlap(), 0, options.overlaps_ignore); cout << "num testing images: "<< images_test.size() << endl; cout << "testing results: " << test_object_detection_function(net, images_test, boxes_test, test_box_overlap(), 0, options.overlaps_ignore); upsample_image_dataset<pyramid_down<2>>(images_test, boxes_test, 1800*1800); cout << "testing upsampled results: " << test_object_detection_function(net, images_test, boxes_test, test_box_overlap(), 0, options.overlaps_ignore); /* This program takes many hours to execute on a high end GPU. It took about a day to train on a NVIDIA 1080ti. The resulting model file is available at http://dlib.net/files/mmod_rear_end_vehicle_detector.dat.bz2 It should be noted that this file on dlib.net has a dlib::shape_predictor appended onto the end of it (see dnn_mmod_find_cars_ex.cpp for an example of its use). This explains why the model file on dlib.net is larger than the mmod_rear_end_vehicle_detector.dat output by this program. You can see some videos of this vehicle detector running on YouTube: https://www.youtube.com/watch?v=4B3bzmxMAZU https://www.youtube.com/watch?v=bP2SUo5vSlc Also, the training and testing accuracies were: num training images: 2217 training results: 0.990738 0.736431 0.736073 training upsampled results: 0.986837 0.937694 0.936912 num testing images: 135 testing results: 0.988827 0.471372 0.470806 testing upsampled results: 0.987879 0.651132 0.650399 */ return 0; } catch(std::exception& e) { cout << e.what() << endl; }
d1496c8d8790a4aba2e0be16d719b1a8b5b90ba2
e099279195dabcdcfd6c382f8a4554d146512420
/KJ_Library/KJ_Library/sorce/KJ_Lib/Kphysics/CollisionData.h
183b97aaf07ea957e6774c3f8084b2c3c6c02a6e
[]
no_license
ajokeinjunk/GameLibrary
9c1230ab9e4aa57fbb8eadd7c46ee51d220cbe8e
ffe9c469fc98695a9d6c1e0698f6578e73afbc9a
refs/heads/master
2019-01-01T02:19:54.935586
2014-04-16T06:55:38
2014-04-16T06:55:38
16,857,899
1
0
null
null
null
null
SHIFT_JIS
C++
false
false
1,272
h
CollisionData.h
#ifndef __H_COLLISION_DATA_H__ #define __H_COLLISION_DATA_H__ #include "meshData.h" #include "PhysicsMath.h" namespace Kmath{ #define CONVEX_MESH_MAX_SHAPES 5 //---------------------------------------------------------------------------------------------------------------------------- // 剛体の実体データ //---------------------------------------------------------------------------------------------------------------------------- //形状 struct Shape{ ConvexMesh m_mesh; Vector3 m_offsetPos; Quaternion m_offsetOri; void *userData; //ユーザーデータ(描画用モデルがゲームオブジェクトへのリンク) }; //剛体データ(モデル1つに対してのデータ) struct CollidableMesh{ int m_numShapes; Shape m_shapes[CONVEX_MESH_MAX_SHAPES]; AABB m_aabb; }; //属性 struct RigidBody{ Matrix m_inertia; //Matrix3慣性テンソル float m_mass; float m_restitution; //反発係数 float m_friction; //摩擦係数 }; enum MotionType{ Active, //活動可 Static //固定 }; //状態 struct State{ Vector3 m_pos; //位置 Quaternion m_orientation; //姿勢 Vector3 m_linearVelo; //並進速度 MotionType m_motionType; }; } //namespace Kmath #endif
df8d6cdb37b67a101f63e005eca85ae953c86815
35712fd35cf7e63fc87df55b6f61ccb9f13b727e
/examples/strings/regularExpressionExample/src/ofApp.h
4da1cb8dcb450d905db2cb31ee587c46afab5ba1
[ "MIT" ]
permissive
openframeworks/openFrameworks
25513eb56f83edbee7e5199e988afd7bf6a370cf
aef438b3b31a3f08a5236c52afc3ac81fa4bd379
refs/heads/master
2023-08-25T07:43:30.884259
2023-08-23T22:35:31
2023-08-23T22:35:31
345,337
8,057
2,609
NOASSERTION
2023-09-14T01:23:37
2009-10-21T21:55:54
C++
UTF-8
C++
false
false
452
h
ofApp.h
#pragma once #include "ofMain.h" class ofApp : public ofBaseApp{ public: void setup(); void update(); void draw(); void keyPressed(int key); string grepStringInRegex(string str, string reg); int countOccurencesInRegex(string, string reg); bool isKeyInRegex(int key, string reg); vector<string> matchesInRegex(string str, string reg); string text; string wordsWithS; vector<string> matchesWithR; int countedOccurrences; ofFile file; };
360b3036b9cf21491db0237749591766207981c8
22403061c920508123ae7efb9e4d0ae4d7662ffc
/classes/Stmt/ProcCall.cpp
7e6c7a4d968c13277d2060590c0340e4d22c88ea
[]
no_license
zionsteiner/CPSL_compiler
3c8534a183ff60666051c97d527b6db1c4dfd332
eadeeaf1934c24e4272e54ba817a9e87a0fab723
refs/heads/master
2022-08-20T07:44:00.076243
2020-04-16T00:08:13
2020-04-16T00:08:13
239,211,522
0
0
null
null
null
null
UTF-8
C++
false
false
520
cpp
ProcCall.cpp
// // Created by zion on 2/24/20. // #include "ProcCall.h" ProcCall::ProcCall(Ident* id, std::vector<Expr*>* args): id(id), args(args) {} std::string ProcCall::toString() const { std::string retStr; if (args == nullptr) { retStr += id->toString() + "()"; } else { retStr += id->toString() + '('; for (auto arg = args->begin(); arg != args->end(); ++arg) { retStr += (*arg)->toString(); } retStr += ')'; return retStr; } return retStr; }
b665bf2b179bc42481a59028e284a860fccba031
9d987a215fc54463b5d384512d318201bd12241d
/HVSTCORE/glMain.h
5bf6e7e7fd204691d46093bb55859a41e55eb3a5
[]
no_license
MGZero/Harvest
3f1ea240b73daab0a483273de90e22d157c1f219
5c6c82a51357ecda10d8d796636d50e80922f21b
refs/heads/master
2020-08-23T16:28:52.891235
2012-08-27T02:28:02
2012-08-27T02:28:02
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,127
h
glMain.h
#ifndef _GLMAIN_H_ #define _GLMAIN_H_ #include <windows.h> #include <tchar.h> //#include <gl/gl.h> //#include <gl/glu.h> #include "glew.h" #include "wglew.h" #include "FreeImage.h" #include "stdio.h" #include "stdlib.h" #include <iostream> #include <fstream> #include <istream> #include "global_Objects.h" //sprite scales #define SCALEX_1 (2.0f/320.0f) #define SCALEX_2 SCALEX_1 * 2.0f #define SCALEX_4 SCALEX_1 * 4.0f #define SCALEX_8 SCALEX_1 * 8.0f #define SCALEX_16 SCALEX_1 * 16.0f #define SCALEX_32 SCALEX_1 * 32.0f #define SCALEX_64 SCALEX_1 * 64.0f #define SCALEX_128 SCALEX_1 * 128.0f #define SCALEX_256 SCALEX_1 * 256.0f #define SCALEX_512 SCALEX_1 * 512.0f #define SCALEY_1 (2.0f/240.0f) #define SCALEY_2 SCALEY_1 * 2.0f #define SCALEY_4 SCALEY_1 * 4.0f #define SCALEY_8 SCALEY_1 * 8.0f #define SCALEY_16 SCALEY_1 * 16.0f #define SCALEY_32 SCALEY_1 * 32.0f #define SCALEY_64 SCALEY_1 * 64.0f #define SCALEY_128 SCALEY_1 * 128.0f #define SCALEY_256 SCALEY_1 * 256.0f #define SCALEY_512 SCALEY_1 * 512.0f #define BITMAP_ID 0x4D42 #define WIDTHSCALE .0125 #define HEIGHTSCALE .016875 namespace HVSTGFX { class CSprite; class CAnimation; class CTile; class CXTileSheet; static int tempWidth, tempHeight; enum directions { UP = 0, RIGHT, DOWN, LEFT, DLeft, DRight, ULeft, URight }; typedef struct { int width; int height; DWORD size; FIBITMAP * dib; } IMAGEFILE; unsigned char * loadImageFile(char *fileName, IMAGEFILE *imgFile, GLuint &texture); unsigned char * loadImageFile(CFileData *image, IMAGEFILE *imgFile, GLuint &texture); void createSprite(float width, float height, float x, float y, CSprite & sprite); //createSprite void createSpriteX(float width, float height, float x, float y, CSprite sprite); //createSpriteX void loadTiles(char *fileName, CXTileSheet &tileDump, int pixWidth, int pixHeight); //loadTilesPNG void createTile(int tileID, float x, float y, CXTileSheet tileSht); //createTile bool animateX(HVSTGFX::CAnimation *frames, float x, float y); //animteX void adjustCoords(float& x, float& y); //needed for readHMD() void initGL(); void SetupPixelFormat(HDC hDC); class CSprite { public: CSprite(){loaded = false; error = false;} CSprite(char * fileName); CSprite(char * fileName, bool image); CSprite(CFileData * data); ~CSprite(); unsigned char * sprite; GLuint texture; bool loaded; IMAGEFILE imgFile; int width, height; float animCount; //used for animation bool error; //float x, y; //used for the map file }; class CXTileSheet { public: CXTileSheet(){} CXTileSheet(char * fileName, int pixWidth, int pixHeight); CXTileSheet(char * fileName, int pixWidth, int pixHeight, bool image); unsigned char * sheet; IMAGEFILE imgFile; int totalx, totaly, total; bool loaded; float *xCoords, *yCoords; float width, height; float glWidth, glHeight; int counter; GLuint texture; void calcCoordinates(int tileID); void initialize(char *fileName, int pixWidth, int pixHeight, bool image); }; class CAnimation { public: CAnimation(CSprite * frames, int count, float speed, int width, int height); CAnimation(int count, float speed, int width, int height); ~CAnimation(){} float frameCount; CSprite *sprites; List<CSprite*> mySprites; CSprite * currentFrame; int prevFrame; inline int getNumofFrames(){return numOfFrames;} void addSprite(CSprite *sprite); inline CSprite * getFrames(){return sprites;} inline CSprite getFrame(int index){return sprites[index];} CSprite getFrameX(int index); //getFrameX inline float getSpeed(){return speed;} inline float getWidth(){return width;} inline float getHeight(){return height;} void clearAnimation(); private: int numOfFrames; float speed; float width, height; int frameTracker; //for the animationTrigger }; class CAnimationTrigger : public CBaseEventTrigger { public: ~CAnimationTrigger(); CAnimationTrigger(); void update(CAnimation * frames); }; }; #endif
a3c7d833b650c8f854223b5cdf3a842417ca4c03
0e0aa5b22b0eb4731d98c6bcf7082f328d9fab94
/include/fuzzyone/Term.h
b59312720993fd65a54579dbeddf72b6d5f86265
[]
no_license
dvhex/fuzzyone
cb716ca7d2d789bb5ab13a6169c50aa81a2698be
b7212a2577b4fe7350dcc44f3686ff96b8f7c56c
refs/heads/master
2020-05-04T12:26:35.722226
2013-12-30T13:11:38
2013-12-30T13:11:38
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,178
h
Term.h
#ifndef TERM_H_INCLUDED #define TERM_H_INCLUDED #include "Hedge.h" #include "FuzzyOne.h" namespace Fuzzy { class LVar; //базовый клас термов, поддерживает расчёт значения class Term { protected: double X; public: FuzzyType Value; Term() {Value = 0; X = 0;} Term(const Term& src) {X = src.X; Value = src.Value;} virtual ~Term() {} FuzzyType Set(double x) {return Value = Calc(X = x);} FuzzyType Get() {return Value;} double GetX() {return X;} FuzzyType operator()(double x) const {return Calc(x);} virtual FuzzyType Calc(double x) const = 0; virtual double min() const = 0; virtual double max() const = 0; }; //базовый класс для треугольного и подобных термов class BaseTerm: public Term { protected: double pA, pB; public: BaseTerm(double a, double b); BaseTerm(const BaseTerm &src): Term(src) {pA = src.pA; pB = src.pB;} ~BaseTerm() {} void A(double value) {pA = value;} double A() const {return pA;} void B(double value) {pB = value;} double B() const {return pB;} double min() const {return pA;} double max() const {return pB;} }; //треугольный терм, параметры A, B и C - три точки треугольника class TriangularTerm: public BaseTerm { protected: double pC; public: TriangularTerm(double a, double b, double c); TriangularTerm(const TriangularTerm &src): BaseTerm(src), pC(src.pC) {} ~TriangularTerm() {} void C(double value) {pC = value;} double C() const {return pC;} FuzzyType Calc(double x) const; double max() const {return pC;} }; //терм, уходящий в бесконечность, параметры A, B и Left, границы и куда //уходит в бесконечность, влево или вправо class ShoulderTerm: public BaseTerm { protected: bool pLeft; public: ShoulderTerm(double a, double b, bool left = true); ShoulderTerm(const ShoulderTerm &src): BaseTerm(src), pLeft(src.pLeft) {} ~ShoulderTerm() {}; void Left(bool left) {pLeft = left;} bool Left() const {return pLeft;} FuzzyType Calc(double x) const; }; /* * Терм S-функция, подобно ShoulderTerm, только с плавным переходом */ class STerm: public ShoulderTerm { public: STerm(double a, double b, bool left = true): ShoulderTerm(a, b, left) {} STerm(const STerm &src): ShoulderTerm(src) {} ~STerm() {}; FuzzyType Calc(double x) const; }; /* * Тем Пи-функция, подобно TriangularTerm, только плавная */ class PTerm: public TriangularTerm { public: PTerm(double a, double b, double c): TriangularTerm(a, b, c) {} PTerm(const PTerm &src): TriangularTerm(src) {} ~PTerm() {} FuzzyType Calc(double x) const; }; class HedgeTerm: public Term { protected: const Term &pBase; public: HedgeTerm(const Term &baseTerm): pBase(baseTerm) {} ~HedgeTerm() {} double min() const {return pBase.min();} double max() const {return pBase.max();} private: HedgeTerm(const HedgeTerm&); }; class SimpleHedgeTerm: public HedgeTerm { protected: Hedge *pHedge; public: SimpleHedgeTerm(const Term &baseTerm, Hedge *hedge): HedgeTerm(baseTerm), pHedge(hedge) {} ~SimpleHedgeTerm() {delete pHedge;} FuzzyType Calc(double x) const {return (*pHedge)(pBase.Calc(x));} }; }; #endif //TERM_H_INCLUDED
1587abcefd872d8d00afb47bd3000348ad182a55
2115b406ddf1a38629acaa4a0e8cda0d2b8a02e8
/Aurelius/Game/Map/Cpp's/Chunk.cpp
13b935e6323a89bf24c773aec4080bc79825286a
[]
no_license
HaakonSvane/Aurelius
dbc9edea94cd0025e619ba4142b7cfe44852be07
7f5b83045f6dedc6d56800831a0e8ffb192d0932
refs/heads/master
2022-05-27T00:19:37.657659
2020-05-04T16:22:12
2020-05-04T16:22:12
261,239,550
0
0
null
null
null
null
UTF-8
C++
false
false
275
cpp
Chunk.cpp
// // Chunk.cpp // Aurelius // // Created by Haakon Svane on 23/01/2020. // Copyright © 2020 Haakon Svane. All rights reserved. // #include "Chunk.hpp" Chunk::Chunk(const Surface* map_surf, const Vector2D<Uint8> chunk_indexes) : chunk_ind{chunk_indexes} { }
24a0b264e7c09e1fe50b8ffc86f909c93367de82
6a070489af967c0434589854621316e0615b7f84
/142labs/Jon_Lab_10.2/Student_Code/Archer.h
48377dbe83e58e8dc28a1ef84e57599e1d7e2eaf
[]
no_license
jbelyeu/old_class_code
5fbfcfc0687bb8a9e16234eace72db61b31e3287
6a3afb5d795b7d6aca5e6885394f84f0a5a141ee
refs/heads/master
2021-01-10T08:55:34.728873
2016-03-30T23:25:19
2016-03-30T23:25:19
54,907,018
0
0
null
null
null
null
UTF-8
C++
false
false
365
h
Archer.h
#pragma once #include "Fighter.h" class Archer : public Fighter { public: Archer(string name_in, string type_in, double MXP_in, double strength_in, double speed_in, double magic_in); ~Archer(void); virtual int getDamage(); virtual void reset(); //Use special ability: Dynamic Speed virtual bool useAbility(); int OriginalSpeed; };
8ec5c231858b22d209ea75101c30ed0c7c1a72e6
aef7825fb0a77b4a05a73ead92d27825aaf1a358
/Area.cpp
eae6c62d8c2dac2286bf4bc6b0d493cd8a6bc319
[]
no_license
YogeshJain96/Basic-CPP
760d6920b6c597d2ddf364c8c936089d463f1d6a
583c2f253a22dbf70fb036dc3458cfb8b27c1a00
refs/heads/master
2020-07-08T15:38:07.959367
2019-09-28T18:00:11
2019-09-28T18:00:11
203,714,709
0
0
null
null
null
null
UTF-8
C++
false
false
914
cpp
Area.cpp
//Write functions for calculating area of circle, rectangle, and square and call these functions from main function #include<iostream> using namespace std; int aoc(int r){ float area; area=3.14*r*r; cout<<"\n Area of circle is:\t"<<area; return 0; } int aos(int s){ int z; z=s*s; cout<<"\n Area of square is:\t"<<z; return 0; } int aor(int l,int b){ float ar; ar=l*b; cout<<"\n area of rectangle is:\t"<<ar; return 0; } int main(){ int r,s,l,b,choice; cout<<"\nEnter ur choice(1,2,3):\t"; cin>>choice; switch(choice) { case 1:cout<<"\n enter the radius of circle\t"; cin>>r; aoc(r); break; case 2:cout<<"\n enter the side of a square\t:"; cin>>s; aos(s); break; case 3:cout<<"\n enter the length and breadth of a rectangle:\t"; cin>>l>>b; aor(l,b); break; default:cout<<"\n u have entered a wrong choice\n"; exit(0); } return 0; }
0c47e275c37d0e5fb43013344b466f2448bfc9be
621bbca69cace44de934d11675d55e7f393ad07f
/example-audio/DSP.h
8fe5cdff5c4289b343d9440d5ad25df9f8fbfc4c
[ "BSD-3-Clause" ]
permissive
elf-audio/ofxCppSketch
3479c1ecd597a93cf49ee1c520025e1fc0722411
03c120c3558fd79b239bf60f253dc0dd2d462f6e
refs/heads/master
2020-08-18T08:58:22.383823
2020-07-22T16:24:52
2020-07-22T16:24:52
215,772,416
28
1
BSD-3-Clause
2019-10-21T11:31:40
2019-10-17T11:08:45
C++
UTF-8
C++
false
false
1,290
h
DSP.h
// // DSP.h // SYNTH // // Created by Marek Bereza on 18/11/2019. // #pragma once class Oscillator { public: double phase = 0; float frequency = 440; float getSample() { phase += frequency*M_PI * 2.0 / 44100.0; if(phase>=M_PI * 2.0) phase -= M_PI * 2.0; return phase / M_PI; } }; class Filter { public: float f, p, q; //filter coefficients float b0, b1, b2, b3, b4; //filter buffers (beware denormals!) float t1, t2; //temporary buffers // Set coefficients given cutoff & resonance [0.0...1.0] float cutoff = 0.2; float resonance = 0.5; // http://www.musicdsp.org/en/latest/Filters/25-moog-vcf-variation-1.html float process(float in) { // Moog 24 dB/oct resonant lowpass VCF // References: CSound source code, Stilson/Smith CCRMA paper. // Modified by paul.kellett@maxim.abel.co.uk July 2000 q = 1.0f - cutoff; p = cutoff + 0.8f * cutoff * q; f = p + p - 1.0f; q = resonance * (1.0f + 0.5f * q * (1.0f - q + 5.6f * q * q)); in -= q * b4; //feedback t1 = b1; b1 = (in + b0) * p - b1 * f; t2 = b2; b2 = (b1 + t1) * p - b2 * f; t1 = b3; b3 = (b2 + t2) * p - b3 * f; b4 = (b3 + t1) * p - b4 * f; b4 = b4 - b4 * b4 * b4 * 0.166667f; //clipping b0 = in; return b4; } };
9f9723336ea2ba30a22f75e02ac48cc4167e49dd
12632755d1b994bec86d89152754bb17cf3e06c3
/src/entity.cpp
f92f38417f1dd484a75cca7cd537f29675292c43
[]
no_license
Cedro23/simple_invaders
21dbcd1905711410031c7220621c50dc4fcc4397
55f13af3289c1ca6c6238dbff87e3231e20237c3
refs/heads/master
2022-08-27T03:31:40.974292
2022-08-03T10:36:52
2022-08-03T10:36:52
223,963,502
0
0
null
null
null
null
UTF-8
C++
false
false
245
cpp
entity.cpp
#include <iostream> #include "..\include\entity.h" using namespace std; Entity::Entity(float x, float y) : startingX(x), startingY(y) { } Entity::Entity() { } void Entity::InitTexture(sf::Texture& texture) { sprite.setTexture(texture); }
c5ebc200084370273acb7e80830b27fd1a6c8ee5
1d3783e989d95b7e4f57dbd6d3c1942ceebb551e
/ImageMessager/FileReader.cpp
d58d9f5b31487a274beacfc953836b19d5cca9eb
[]
no_license
Decstar77/ImageMessage
26208cc05222ec310eea5dbf434c3b02a51bd754
92908039cb2f44dc508334862218ec862aec4f5c
refs/heads/master
2020-03-18T10:04:41.307974
2018-05-23T16:20:20
2018-05-23T16:20:20
134,595,951
2
0
null
null
null
null
UTF-8
C++
false
false
1,103
cpp
FileReader.cpp
#include "stdafx.h" #include "FileReader.h" FileReader::FileReader(Validation *valid) { this->isValid = valid; } std::string FileReader::findData(std::vector<char> m_res) { std::string outMessage = ""; bool out = false; int stopkey = this->isValid->GetStopKey(); int startkey = this->isValid->GetStartKey(); for (int i = 0; i < m_res.size(); i++) { if (m_res.at(i) == static_cast<char>(startkey)) { out = true; continue; } if (out) { if (m_res.at(i) == static_cast<char>(stopkey)) break; outMessage.push_back(m_res.at(i)); } } return outMessage; } bool FileReader::ReadFile(std::string fileName) { inFile.open(fileName, std::ios::in | std::ios::binary | std::ios::ate); if (!inFile) { std::cout << "Not found" << std::endl; return false; } this->pos = inFile.tellp(); std::vector<char> res(pos); ////Make it private class inFile.seekp(0, ios::beg); inFile.read(&res[0], pos); inFile.close(); std::cout << findData(res) << std::endl; return true; } FileReader::~FileReader() { }
d74571b8c63cdae385ac505adb7d03615e3b5dfc
58ce9b91f9e67ab3fa6f58b375a06e4c0b49963a
/source/source.cpp
e1227867ea64fcf02e32c9db125539a482c7c650
[]
no_license
DanilBukreev/BSTree-1
b278ac14206319bf95a95d328528634a2e514c9c
88c90b2312095fcbf88c02487103a685ccd7fd66
refs/heads/master
2020-03-17T21:21:36.968254
2018-05-18T12:17:53
2018-05-18T12:17:53
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,784
cpp
source.cpp
#include <iostream> #include "bstree.h" #include <fstream> #include <cstring> using namespace BSTree; using namespace std; Tree::Tree() { root = nullptr; } void Tree::Add_node(int key, Node*& root) { if (root == nullptr) { root = new Node; root->key = key; root->left = root->right = nullptr; } if (key < root->key) { if (root->left != nullptr) Add_node(key, root->left); else { root->left = new Node; root->left->left = root->left->right = nullptr; root->left->key = key; } } if (key > root->key) { if (root->right != nullptr) Add_node(key, root->right); else { root->right = new Node; root->right->left = root->right->right = nullptr; root->right->key = key; } } } bool Tree::Zero() { return (root == nullptr ? true : false); } void Tree::Insert(int key) { Add_node(key, root); } void Tree::ShowTree(Node* node, int field) { if (root != nullptr) { cout << " "; if (node->right != nullptr) { ShowTree(node->right, field + 1); for (int i = 0; i < field; i++) { cout << " "; } } cout << node->key << endl; if (node->left != nullptr) { ShowTree(node->left, field + 1); } } } void Tree::PreOrderTree(Node* node) { if (root != nullptr) { cout << node->key << " "; if (node->left != nullptr) { PreOrderTree(node->left); } if (node->right != nullptr) { PreOrderTree(node->right); } } } void Tree::InOrderTree(Node* node) { if (root != nullptr) { if (node->left != nullptr) { InOrderTree(node->left); } cout << node->key << " "; if (node->right != nullptr) { InOrderTree(node->right); } } } void Tree::PostOrderTree(Node* node) { if (root != nullptr) { if (node->left != nullptr) { PostOrderTree(node->left); } if (node->right != nullptr) { PostOrderTree(node->right); } cout << node->key << " "; } } void Tree::InOrder() { InOrderTree(root); } void Tree::PreOrder() { PreOrderTree(root); } void Tree::PostOrder() { PostOrderTree(root); } void Tree::Show() { if (root != nullptr) ShowTree(root, 0); else cout << "Дерево пусто!" << endl; } void Tree::Deletetree(Node*& node) { if (node != nullptr) { Deletetree(node->left); Deletetree(node->right); delete node; node = nullptr; } } void Tree::Deletetr() { Deletetree(root); } bool Tree::Deletenode(Node*& root, int value) { if (root == nullptr) { return false; } if (value < root->key) { root->left; Deletenode(root->left, value); } else if (value > root->key) { root->right; Deletenode(root->right, value); } else if (root->left != nullptr && root->right != nullptr) { root->key == root->right->key; root->right; Deletenode(root->right, root->key); } else if (root->left == nullptr && root->right == nullptr) { Deletenode(root, value); } else if (root->left != nullptr) root = root->left; else root = root->right; return true; } bool Tree::Deleten(int value) { Deletenode(root, value); } void Tree::Write() { string name; cout << "Введите название файла: "; cin >> name; ifstream fin(name, ios_base::in); string ch_3; if (fin.is_open()) { cout << "Вы хотите переписать файл? Да/Нет" << endl; cin >> ch_3; } fin.close(); if ((ch_3 == "y") || (ch_3 == "Да") || (ch_3 == "Yes") || (ch_3 == "да") || (ch_3 == "yes")) { ofstream fout(name, ios_base::out | ios_base::trunc); fout.close(); WriteInFile(root, name); } } void Tree::WriteInFile(Node* root, std::string name) { ofstream fout(name, ios::app); if (root == nullptr) return; fout << root->key << endl; WriteInFile(root->left, name); WriteInFile(root->right, name); fout.close(); } bool Tree::LoadfromfileTree(Node* root) { cout << "Введите путь к файлу:" << endl; string file_name; cin >> file_name; ifstream fin(file_name); if (!fin.is_open()) return false; int key; while (fin >> key) { Insert(key); } return true; } bool Tree::Loadfromfile() { LoadfromfileTree(root); } bool Tree::Verification(Node*& root, int value) { if (root == nullptr) { cout << "Дерево пусто" << endl; return false; Node *val = root; while(val != nullptr) { if(val->key = value) { cout << "Узел найден" << endl; return true; } else if(val->key < value) { val = val->right; } else if(val->key > value) { val = val->left; } } if(val == nullptr){ cout << "Узел не найден" << endl; return false; } } } bool Tree::VerificationNode(int value) {Verification(root, value);}
91785c0d37d4062386014d5703362082e1364e75
7356f96be38a175fb8c8e54d14421b3a4461c6f5
/upgrade/boot_loader/ImageUpgraderEraseSectors.hpp
d4980f8b3b5cfa9cd05fd4b3c6901b03ee84e3fe
[ "LicenseRef-scancode-protobuf", "LicenseRef-scancode-x11-xconsortium-veillard", "BSD-3-Clause", "MIT", "Apache-2.0", "BSD-2-Clause", "Unlicense", "LicenseRef-scancode-unknown-license-reference" ]
permissive
bkvenkatesh/embeddedinfralib
5381509a4ed676a111b0d14d7a2a82bb74c39998
6a61684c37642a9e37bc757a29e5fbce18705529
refs/heads/master
2021-06-25T03:20:01.966169
2020-12-24T15:47:10
2020-12-24T15:47:10
179,512,848
1
0
NOASSERTION
2020-12-24T15:47:42
2019-04-04T14:22:01
C++
UTF-8
C++
false
false
749
hpp
ImageUpgraderEraseSectors.hpp
#ifndef UPGRADE_IMAGE_UPGRADER_ERASE_SECTORS_HPP #define UPGRADE_IMAGE_UPGRADER_ERASE_SECTORS_HPP #include "infra/util/WithStorage.hpp" #include "upgrade/boot_loader/ImageUpgrader.hpp" namespace application { class ImageUpgraderEraseSectors : public ImageUpgrader { public: ImageUpgraderEraseSectors(const char* targetName, Decryptor& decryptor, hal::SynchronousFlash& internalFlash, uint32_t sectorStart, uint32_t sectorEnd); virtual uint32_t Upgrade(hal::SynchronousFlash& upgradePackFlash, uint32_t imageAddress, uint32_t imageSize, uint32_t destinationAddress) override; private: hal::SynchronousFlash* internalFlash; uint32_t sectorStart; uint32_t sectorEnd; }; } #endif
266d484bde64e1c6e243409aa36c256d693fb56e
df14bf4e907b7270cc8c3cabf52b4d99eda19826
/multipleLayeringFvMesh/run/pantographB/topoSets/processor0/system/topoSetDict
ac48d5d794d84d6257325631e14fae124edcaa2a
[]
no_license
gtessi/OpenFOAM
7d4c86ef35694034285ab75b147c11b907cb7900
5b47faeb74f5178765626e884655b16bcee4737a
refs/heads/master
2021-01-18T14:34:02.165466
2015-06-10T17:49:10
2015-06-10T17:49:10
37,202,220
0
0
null
null
null
null
UTF-8
C++
false
false
3,107
topoSetDict
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object topoSetDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // actions ( { name horizontal1Sup; type faceSet; action new; source boxToFace; sourceInfo { box (0.0000000000 0.2499500000 0.000001) (1.0000000000 0.2500500000 0.999999); } } { name horizontal1SupMasterCells; type cellSet; action new; source cellToCell; sourceInfo { set c0; } } { name horizontal1SupMasterCells; type cellSet; action invert; } { name horizontal2Inf; type faceSet; action new; source boxToFace; sourceInfo { box (0.0000000000 0.7499500000 0.000001) (1.0000000000 0.7500500000 0.999999); } } { name horizontal2InfMasterCells; type cellSet; action new; source cellToCell; sourceInfo { set c0; } } { name horizontal2InfMasterCells; type cellSet; action invert; } { name vertical1Der; type faceSet; action new; source boxToFace; sourceInfo { box (0.3749500000 0.0000000000 0.000001) (0.3750500000 1.0000000000 0.999999); } } { name vertical1DerMasterCells; type cellSet; action new; source cellToCell; sourceInfo { set c0; } } { name vertical1DerMasterCells; type cellSet; action invert; } { name vertical2Izq; type faceSet; action new; source boxToFace; sourceInfo { box (0.8749500000 0.0000000000 0.000001) (0.8750500000 1.0000000000 0.999999); } } { name vertical2IzqMasterCells; type cellSet; action new; source cellToCell; sourceInfo { set c0; } } { name vertical2IzqMasterCells; type cellSet; action invert; } /////////////////////////////////////////////////////////////////////////// ); // ************************************************************************* //
b3e107f66f0d6da42c7a69bb3f5b5656b8b03346
01f2cdd59b3d560ed5f1fa78f1afa4972bb9eeb6
/src/game/generator/DungeonGenerator.cpp
65ddb2c05bc7b8d02d29bce9fcf4b9d58e9564ff
[]
no_license
mrombout/CPP1-DungeonCrawler
faf2352ead62c316223f6bda42a2ab2fb70137f6
440b220fb2c12d643a5ec1a412eacd3a5e05e6f7
refs/heads/master
2021-01-16T21:51:21.565260
2015-11-04T14:51:08
2015-11-04T14:51:08
42,866,902
0
0
null
null
null
null
UTF-8
C++
false
false
4,184
cpp
DungeonGenerator.cpp
#include <stdlib.h> #include "item/Prop.h" #include "fixture/Ladder.h" #include "DungeonGenerator.h" #include "Dungeon.h" #include "FloorGenerator.h" #include "StringGenerator.h" #include "Floor.h" #include "Room.h" #include "generator/MobGenerator.h" using namespace dc::model; std::vector<std::string> dungeonTypes = { "Point", "Delves", "Quarters", "Cells", "Maze", "Vault", "Caves", "Quarry" }; std::vector<std::string> dungeonAdjective { "Frozen", "Scourged", "Mythic", "Uncanny", "Foul", "Octarine", "Twisted", "Nether", "Goblin", "Serene", "Fabled" }; std::vector<std::string> dungeonNoun { "Priest", "Scorpion", "Mountain", "Prison", "Warlock", "King", "Kaizar", "Warmonger", "Wizard", "Order" }; namespace dc { namespace game { DungeonGenerator::DungeonGenerator(FloorGenerator *floorGenerator, MobGenerator &mobGenerator) : mFloorGenerator(floorGenerator), mMobGenerator(mobGenerator) { } DungeonGenerator::~DungeonGenerator() { delete mFloorGenerator; } model::Dungeon *DungeonGenerator::generate(unsigned int seed, unsigned int width, unsigned int height) const { srand(seed); std::string dName = generateDungeonName(); std::vector<Floor*> dFloors = std::vector<Floor*>(); int numFloors = rand() % 10 + 1; Floor *previousFloor = nullptr; Floor *currentFloor = nullptr; for(int i = 1; i <= numFloors; ++i) { previousFloor = currentFloor; currentFloor = generateDungeonFloor(i, width, height); dFloors.push_back(currentFloor); if(!previousFloor) { currentFloor->startRoom().inventory().addItem(new Prop(-1, "Breadcrumb", "Oh! It's that breadcrumb I left here so I can find my way back!")); } else { Room &previousStart = previousFloor->startRoom(); Room &previousEnd = previousFloor->exitRoom(); Room &currentStart = currentFloor->startRoom(); Room &currentExit = currentFloor->exitRoom(); // connect currentStart to previousEnd Ladder *ladderToCurrentStart = new dc::model::Ladder(dc::model::Ladder::Direction::DOWN, currentStart); Ladder *ladderToPreviousEnd = new dc::model::Ladder(dc::model::Ladder::Direction::UP, previousEnd); currentStart.inventory().addItem(*ladderToPreviousEnd); previousEnd.inventory().addItem(*ladderToCurrentStart); } } currentFloor->exitRoom().addMob(mMobGenerator.generate(11)); return new Dungeon(seed, dName, dFloors); } std::string DungeonGenerator::generateDungeonName() const { std::string dungeonName; if(rand() % 100 > 50) { std::vector<std::vector<std::string>> source{ dungeonTypes, dungeonAdjective, dungeonNoun }; std::vector<std::string> words = StringGenerator::generate(source); dungeonName.append(words[0]); dungeonName.append(" of the "); dungeonName.append(words[1] + " "); dungeonName.append(words[2]); } else { std::vector<std::vector<std::string>> source{ dungeonAdjective, dungeonTypes }; std::vector<std::string> words = StringGenerator::generate(source); dungeonName.append("The "); dungeonName.append(words[0]); dungeonName.append(words[1]); } return dungeonName; } Floor *DungeonGenerator::generateDungeonFloor(int level, unsigned int width, unsigned int height) const { return mFloorGenerator->generate(level, width, height); } } }
2aac285a40ca349801ab14fd6d093aa457f3827c
6caff53760d159a3258f7ab7a77536c90a0188d8
/netWork/src/networkthread.h
fb606d52d4a284e9c9850f00d7ca506d7a374804
[]
no_license
wormggmm/SpaceWarServer
0e6acb91be61c7ec27cb905e75f1578505ff9c42
bd56571a1948e0e5dc8a041b37509a5a7aa1526e
refs/heads/master
2021-06-03T13:55:15.850227
2019-04-03T08:50:29
2019-04-03T08:50:29
7,316,831
0
0
null
null
null
null
GB18030
C++
false
false
3,419
h
networkthread.h
#ifndef _NETWORK_THREAD_H_ #define _NETWORK_THREAD_H_ #include "def.h" #include "utilities.h" #include "tools.h" #include "netcommon.h" #define INVALID_CONNECT_INDEX -1 #define MAX_SENDBUFF 1024 * 1024 #define MAX_RECVBUFF 1024 * 1024 #define MAX_SENDPACK 2048 #define MAX_RECVPACK 2048 #define MAX_CONN_QUEUE 1000 #define CLOSE_SOCKET_REPEAT_TIME 30 //typedef int (ItcpThreadOwner::*ClOSECALLBACK)( int connectIdx ); class tcpserver; class tcpclient; interface ItcpThreadOwner; enum enTCPConnectionState { enTCPConnectionState_idle, //两种情况会被用到,1、getConn的时候用到的Idx不合法;2、连接已经被断开,但是Send缓冲区还有数据时 enTCPConnectionState_Closing, //链接关闭,但是缓冲去可能还有数据,所以不能被复用 enTCPConnectionState_free, //可被使用的空闲 enTCPConnectionState_WillClose, //将要关闭 enTCPConnectionState_Connected, //已经连接上 }; struct TCPConnection { int m_ConnectIdx; enTCPConnectionState m_State; SOCKET m_Socket; //ClOSECALLBACK m_CloseCallback; //断开连接时,调用的CallBack函数 int (ItcpThreadOwner::*m_CloseCallback)( int connectIdx ); unsigned int m_CloseTimeStamp; //断开连接时的时间 unsigned int m_lastPingTimeStamp; //最后一次ping协议的时间戳 void CloseCallBack(ItcpThreadOwner *owner) { if ( m_CloseCallback ) (owner->*m_CloseCallback)( m_ConnectIdx ); } void Release() { m_ConnectIdx = INVALID_CONNECT_INDEX; m_State = enTCPConnectionState_free; m_Socket = SOCKET_INVALID; m_CloseCallback = NULL; m_CloseTimeStamp = 0; m_lastPingTimeStamp = 0; } TCPConnection() { Release(); } ~TCPConnection() { Release(); } }; interface ItcpThreadOwner { virtual int getMaxConn() = 0; virtual TCPConnection* getConn( int connIdx ) = 0; virtual int CloseConnect( int connectIdx ) = 0; virtual int OpenConnect( SOCKET sock ) = 0; virtual int PushDataToSendBuff( int connectIdx, void* pBuf, int dataSize ) = 0; virtual const void* GetDataFromRecvBuff( unsigned int& dataSize ) = 0; virtual int PushDataToRecvBuff( void* pBuf, int dataSize ) = 0; virtual const void* GetDataFromSendBuff( unsigned int& dataSize ) = 0; virtual int CloseConnectCallBack(int connectIdx) = 0; }; class tcpThreadInfo { private: ItcpThreadOwner* m_tcpThreadOwner; public: ItcpThreadOwner* getThreadOwner(); void setThreadOwner( ItcpThreadOwner* owner ); void closeConnect(TCPConnection *connInfo); }; class tcpListenThread : public Thread, public tcpThreadInfo { private: bool m_bRun; SOCKET m_ListenSocket; PORT m_ListenPort; public: tcpListenThread( ); ~tcpListenThread(); private: int InitListenSocket( ); int CloseListenSocket(); public: int start( ItcpThreadOwner* owner, PORT listenPort ); void* action(); int stop(); }; class tcpSendThread : public Thread, public tcpThreadInfo { private: bool m_bRun; public: tcpSendThread( ); ~tcpSendThread(); public: int start( ItcpThreadOwner* owner ); void* action(); int stop(); }; class tcpRecvThread : public Thread, public tcpThreadInfo { private: bool m_bRun; public: tcpRecvThread( ); ~tcpRecvThread(); public: int start( ItcpThreadOwner* owner ); void* action(); int stop(); }; #endif
c979e209598492fd29338dc90b39ced313d2dc39
0614cf400f540f999dd2c902c4ab2636957bac56
/programs/add_2_nos.cpp
41b8a94a93fb54565a4e352d2cb746b327d6ce8b
[]
no_license
jeetendrabhattad/C_Plus_Plus
d876589fc3832c8e9b8d76d56527868b11c85043
9c186bd509969a831849621c392cd91c8b7dc0b0
refs/heads/master
2020-03-27T17:47:14.663494
2018-10-04T14:03:47
2018-10-04T14:03:47
146,874,262
16
0
null
null
null
null
UTF-8
C++
false
false
681
cpp
add_2_nos.cpp
#include <iostream> // a = 17 : 10001 // b = 23 : 10111 // a ^ b : 000110 // carry : 100010 //a : 6 : 000110 //b : 34 :100010 //a ^ b :100100 //carry : // a&b:000010 // <<1:000100 //a : 36 : 100100 //b : 4 : 000100 //a ^ b: 100000 //carry : 001000 //a : 32 : 100000 //b : 8 : 001000 //a ^ b : 101000 //carry : 000000 //a : 40 //b : 0 int add(int a, int b) { if (b == 0) return a; int sum = a^b; //std::cout<<sum<<std::endl; int carry = (a&b)<<1; return add(sum, carry); } int sub(int a, int b) { return add(a, add(~b, 1)); } int main() { std::cout<<add(10, 12)<<std::endl; std::cout<<sub(15, 12)<<std::endl; std::cout<<sub(25, 12)<<std::endl; }
9219c0857c6bc83074d3b4f205ae3a3b909e9e3b
7a44204672c44e103aad47f3afd18952fbd9afd0
/tags/release-2.0/Modules/SimpleSpikeGenerator/SimpleSpikeGenerator.h
3ab753b13c3c2c512f9f9b083080f6a3aadcb47b
[ "MIT" ]
permissive
AuditoryBiophysicsLab/EarLab
202acdb79489ea903c20e45239a9a3ba820caeba
bc5ccc39076ee0419078e9ff5147e98f28fac3c9
refs/heads/master
2020-04-15T20:45:36.062819
2019-07-10T11:54:27
2019-07-10T11:54:27
27,502,131
3
1
null
2017-06-28T01:53:57
2014-12-03T18:47:42
C++
UTF-8
C++
false
false
1,683
h
SimpleSpikeGenerator.h
#include "MatrixN.h" #include "Earlab.h" #include "Logger.h" #include "EarlabDataStream.h" #include "CarneySpikeGenerator.h" class SimpleSpikeGenerator { public: SimpleSpikeGenerator(); ~SimpleSpikeGenerator(); int ReadParameters(char *ParameterFileName); int ReadParameters(char *ParameterFileName, char *SectionName); int Start(int NumInputs, EarlabDataStreamType InputTypes[EarlabMaxIOStreamCount], int InputSize[EarlabMaxIOStreamCount][EarlabMaxIOStreamDimensions], int NumOutputs, EarlabDataStreamType OutputTypes[EarlabMaxIOStreamCount], int OutputSize[EarlabMaxIOStreamCount][EarlabMaxIOStreamDimensions], unsigned long OutputElementCounts[EarlabMaxIOStreamCount]); int Advance(EarlabDataStream *InputStream[EarlabMaxIOStreamCount], EarlabDataStream *OutputStream[EarlabMaxIOStreamCount]); int Stop(void); int Unload(void); void SetModuleName(char *ModuleName); void SetLogger(Logger *TheLogger); private: Logger *mLogger; char *mModuleName; int FrameLength_Samples; int NumChannels; int NumReps; double mSampleRate_Hz; double c0; // s0 weighting factor [ Carney default c0 = 0.55] double c1; // s1 weighting factor [ Carney default c1 = 0.45] double s0; // Time constant ms [ Carney default s0 = 0.8] double s1; // Time constant ms [ Carney default s1 = 25] double Ra; // Absolute refractory period ms [ Carney default Ra = 0.75] double Scale; // Scaling factor used to multiply the firing rate sample step double Offset; // Base probability of given cell producing a spike for each sample interval CarneySpikeGenerator **Cells; };
42afe826470b3e49346e817ba9bbdf426d558c92
f16c1347487af58da76d277cc06527d6fd6bbeaa
/project/code/Eduardo Wang Zheng.cpp
9d5a403ca17efab1ee8bc877e057ad3dfa5b0be8
[ "MIT" ]
permissive
eiuflhlasf/CS308-Compiler-Principles
bb10c5f7940bc60460042a388eeaaa5a06780168
bd9fd3c027da5b11ca28338b350811616678ec92
refs/heads/main
2023-02-24T00:43:40.837706
2021-01-16T12:25:52
2021-01-16T12:25:52
330,157,053
0
0
null
null
null
null
UTF-8
C++
false
false
11,399
cpp
Eduardo Wang Zheng.cpp
//Student ID: 51803090025 //Name: Eduardo Wang Zheng #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> #include <fstream> #include <iostream> #include <cstring> #include <cstdio> #include <vector> #include <stack> #include <map> #include <set> #include <algorithm> #include <string> #include <cstdlib> #include <cctype> #define MAX 507 using namespace std; FILE *fp; /* 定义文件指针*/ class WF { public: //产生式左部 string left; //产生式右部 vector<string> right; WF ( const string& str ) { left = str; } void insert ( char str[] ) { right.push_back(str); } void print ( ) { fprintf ( fp, "%s%s%s" , left.c_str() ,"->", right[0].c_str() ); for ( int i = 1 ; i < right.size() ; i++ ) fprintf ( fp, "%s%s" ,"|", right[i].c_str() ); // puts(""); fprintf(fp, "%s\n", ""); } }; char relation[MAX][MAX]; vector<char> VT; vector<WF> VN_set; map<string,int> VN_dic; set<char> first[MAX]; set<char> last[MAX]; int used[MAX]; int vis[MAX]; void dfs ( int x ) { if ( vis[x] ) return; vis[x] = 1; //产生式左部 string& left = VN_set[x].left; for ( int i = 0 ; i < VN_set[x].right.size() ; i++ ) { //产生式右部 string& str = VN_set[x].right[i]; //遇到非终结符号 if ( isupper(str[0]) ) { int y = VN_dic[str.substr(0,1)]-1; //非终结符号后面紧跟着一个终结符号 if ( str.length() > 1 && !isupper(str[1] ) ) first[x].insert ( str[1] ); //对于形如P->Q...的产生式,把firstvt(Q)加入firstvt(P) dfs ( y ); set<char>::iterator it = first[y].begin(); for ( ; it!= first[y].end() ; it++ ) first[x].insert ( *it ); } //是终结符号加入firstvt集合 else first[x].insert ( str[0] ); } } void make_first ( ) { memset ( vis , 0 , sizeof ( vis ) ); for ( int i = 0 ; i < VN_set.size() ; i++ ) if ( vis[i] ) continue; else dfs ( i ); #define DEBUG #ifdef DEBUG fprintf ( fp, "%s\n" , "------------FIRSTVT集-------------------"); //puts("------------FIRSTVT集-------------------"); for ( int i = 0 ; i < VN_set.size() ; i++ ) { fprintf ( fp, "%s%s" , VN_set[i].left.c_str() , " :"); set<char>::iterator it = first[i].begin(); for ( ; it!= first[i].end() ; it++ ) fprintf ( fp, "%c " , *it ); // puts ("" ); fprintf (fp, "%s\n", ""); } #endif } void dfs1 ( int x ) { if ( vis[x] ) return; vis[x] = 1; string& left = VN_set[x].left; for ( int i = 0 ; i < VN_set[x].right.size() ; i++ ) { string& str = VN_set[x].right[i]; int n = str.length() -1; if ( isupper(str[n] ) ) { int y = VN_dic[str.substr(n,1)]-1; //非终结符号前面紧跟着一个终结符号 if ( str.length() > 1 && !isupper(str[n-1]) ) last[x].insert ( str[n-1] ); //对于形如P->...Q的产生式,把lastvt(Q)加入lastvt(P) dfs1 ( y ); set<char>::iterator it = last[y].begin(); for ( ; it != last[y].end() ; it++ ) last[x].insert ( *it ); } else last[x].insert ( str[n] ); } } void make_last ( ) { memset ( vis , 0 , sizeof ( vis ) ); for ( int i = 0 ; i < VN_set.size() ; i++ ) if ( vis[i] ) continue; else dfs1 ( i ); #define DEBUG #ifdef DEBUG //puts("--------------LASTVT集---------------------"); fprintf (fp, "%s\n", "--------------LASTVT集---------------------"); for ( int i = 0 ; i < VN_set.size() ; i++ ) { fprintf (fp, "%s%s" , VN_set[i].left.c_str(), ": " ); set<char>::iterator it = last[i].begin(); for ( ; it!= last[i].end() ; it++ ) fprintf (fp, "%c " , *it ); //puts ("" ); fprintf (fp, "%s\n", ""); } #endif } void make_table ( ) { for ( int i = 0 ; i < MAX ; i++ ) for ( int j = 0 ; j < MAX ; j++ ) relation[i][j] = ' '; for ( int i = 0 ; i < VN_set.size() ; i++ ) for ( int j = 0 ; j < VN_set[i].right.size() ; j++ ) { string& str = VN_set[i].right[j]; for ( int k = 0 ; k < str.length()-1 ; k++ ) { //遇到两个终结符a和b紧挨在一起的情况,则添加关系a=b if ( !isupper(str[k]) && !isupper(str[k+1]) ) relation[str[k]][str[k+1]] = '='; //遇到一个终结符a后面紧跟着一个非终结符P的情况,则对于firstvt(P)中的每一个终结符b,添加关系a<b if ( !isupper(str[k]) && isupper(str[k+1]) ) { int x = VN_dic[str.substr(k+1,1)]-1; set<char>::iterator it = first[x].begin(); for ( ; it != first[x].end() ; it++ ) relation[str[k]][*it] = '<'; } //遇到一个非终结符P后面紧跟着一个终结符a的情况,则对于lastvt(P)中的每一个终结符b,添加关系b>a if ( isupper(str[k]) && !isupper(str[k+1]) ) { int x = VN_dic[str.substr(k,1)]-1; set<char>::iterator it = last[x].begin(); for ( ; it != last[x].end() ; it++ ) relation[*it][str[k+1]] = '>'; } //当遍历的位置后面至少有2个元素时,如果遇到两个终结符a和b中间夹着一个非终结符P的情况(形如aPb),添加关系a=b if ( k > str.length()-2 ) continue; if ( !isupper(str[k]) && !isupper(str[k+2]) && isupper(str[k+1]) ) relation[str[k]][str[k+2]] = '='; } } #define DEBUG #ifdef DEBUG for ( int i = 0 ; i < VT.size()*5 ; i++ ) fprintf (fp, "%s", "-"); fprintf (fp, "%s", "算符优先关系表" ); for ( int i = 0 ; i < VT.size()*5 ; i++ ) fprintf (fp, "%s", "-"); //puts(""); fprintf (fp, "%s\n", ""); fprintf (fp, "%s%8s%s" , "|", "", "|" ); for ( int i = 0 ; i < VT.size() ; i++ ) fprintf (fp, "%5c%5s" , VT[i] , "|" ); //puts (""); fprintf (fp, "%s\n", ""); for ( int i = 0 ; i < (VT.size()+1)*10 ; i++ ) fprintf (fp, "%s", "-"); // puts(""); fprintf (fp, "%s\n", ""); for ( int i = 0 ; i < VT.size() ; i++ ) { fprintf (fp, "%s%4c%5s" , "|" , VT[i] , "|"); for ( int j = 0 ; j < VT.size() ; j++ ) fprintf (fp, "%5c%5s" , relation[VT[i]][VT[j]] , "|" ); //puts (""); fprintf (fp, "%s\n", ""); for ( int i = 0 ; i < (VT.size()+1)*10 ; i++ ) fprintf (fp, "%s", "-"); //puts(""); fprintf (fp, "%s\n", ""); } #endif } int main ( ) { if( ( fp = fopen("out.txt", "w") ) == NULL){ /* 打开文件 */ printf("File open error!\n"); exit(0); } int n; char s[MAX]; ifstream myfile("test.txt"); //ofstream outfile("out.txt", ios::app); string temp; if (!myfile.is_open()) { cout << "未成功打开文件" << endl; } while(getline(myfile,temp)) { memset ( used , 0 , sizeof ( used ) ); int i; for(i=0; i<temp.length();i++) s[i]=temp[i]; int len = strlen(s),j; for ( j = 0 ; j < len ; j++ ) if ( s[j] == '-' ) break; s[j] = 0; if ( !VN_dic[s] ) { //构造存放产生式的容器 VN_set.push_back ( WF(s) ); VN_dic[s] = VN_set.size(); } int x = VN_dic[s]-1; VN_set[x].insert ( s+j+2 ); //将产生式左部的所有终结符存入终结符集 for ( int k = 0 ; k < j; k++ ) if ( !isupper(s[k] )&& s[k]!='|' ) { if ( used[s[k]] ) continue; used[s[k]] = 1; VT.push_back ( s[k] ); } //将产生式右部的所有终结符存入终结符集 for ( int k = j+2 ; k < len; k++ ) if ( !isupper(s[k] ) && s[k]!='|') { if ( used[s[k]] ) continue; VT.push_back ( s[k] ); used[s[k]] = VT.size(); } //outfile << temp; //outfile << endl; } myfile.close(); //outfile.close(); #define DEBUG #ifdef DEBUG fprintf (fp, "%s\n", "************VT集*******************"); for ( int i = 0 ; i < VT.size() ; i++ ) fprintf (fp, "%c " , VT[i] ); //puts (""); fprintf (fp, "%s\n", ""); //puts("*************产生式*****************"); fprintf (fp, "%s\n", "************产生式******************"); for ( int i = 0 ; i < VN_set.size() ; i++ ) VN_set[i].print(); //puts("************************************"); fprintf (fp, "%s\n", "************************************"); //puts ("************VT集*******************"); // puts (""); // puts("*************产生式*****************"); //puts("************************************"); #endif make_first(); make_last(); make_table(); if( fclose( fp ) ){ /* 关闭文件 */ printf( "Can not close the file!\n" ); exit(0); } return 0; /* while ( ~scanf ( "%d" , &n ) ) { memset ( used , 0 , sizeof ( used ) ); for ( int i = 0 ; i < n ; i++ ) { scanf ( "%s" , s ); int len = strlen(s),j; for ( j = 0 ; j < len ; j++ ) if ( s[j] == '-' ) break; s[j] = 0; if ( !VN_dic[s] ) { VN_set.push_back ( WF(s) ); VN_dic[s] = VN_set.size(); } int x = VN_dic[s]-1; VN_set[x].insert ( s+j+2 ); for ( int k = 0 ; k < j; k++ ) if ( !isupper(s[k] ) ) { if ( used[s[k]] ) continue; used[s[k]] = 1; VT.push_back ( s[k] ); } for ( int k = j+2 ; k < len; k++ ) if ( !isupper(s[k] ) ) { if ( used[s[k]] ) continue; VT.push_back ( s[k] ); used[s[k]] = VT.size(); } }*/ }
8e670e5869fc0d3732cf1b37530f21e128c3ef76
51635684d03e47ebad12b8872ff469b83f36aa52
/external/gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/accumulate/48750.cc
ea216df837b7e46e9ee46f1b820ee21c4e56c14d
[ "LGPL-2.1-only", "GPL-3.0-only", "GCC-exception-3.1", "GPL-2.0-only", "LGPL-3.0-only", "LGPL-2.0-or-later", "Zlib", "LicenseRef-scancode-public-domain" ]
permissive
zhmu/ananas
8fb48ddfe3582f85ff39184fc7a3c58725fe731a
30850c1639f03bccbfb2f2b03361792cc8fae52e
refs/heads/master
2022-06-25T10:44:46.256604
2022-06-12T17:04:40
2022-06-12T17:04:40
30,108,381
59
8
Zlib
2021-09-26T17:30:30
2015-01-31T09:44:33
C
UTF-8
C++
false
false
1,689
cc
48750.cc
// Copyright (C) 2011-2022 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License along // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. #include <vector> #include <numeric> class NaturalParameters { public: NaturalParameters() : m_data(2) { } std::vector<double>::const_iterator begin() const { return m_data.begin(); } std::vector<double>::const_iterator end() const { return m_data.begin(); } NaturalParameters& operator+=(const NaturalParameters&) { return *this; } private: std::vector<double> m_data; }; inline NaturalParameters operator+(const NaturalParameters& a, const NaturalParameters& b) { NaturalParameters tmp = a; return tmp += b; } // libstdc++/48750 void test01() { // Used to fail in parallel-mode with a segfault. for (std::size_t i = 0; i < 1000; ++i) { std::vector<NaturalParameters> ChildrenNP(1000); NaturalParameters init; NaturalParameters NP = std::accumulate(ChildrenNP.begin(), ChildrenNP.end(), init); } } int main() { test01(); return 0; }
5066512ebc0e437324230bf5ba5c1f3f2198649e
9cf371fe3b5a747cb75dc479cfb52d300887d944
/ScreenCapture/FFMpegVideoEncoder.cpp
499bf2b046500516b4cb8f8b4bdf74f79007763b
[]
no_license
ideic/ScreenCapture
a281d939c579266b3371d155b238600c713bb5a1
f82ac1a9586c9aebc47af8dd563933370f97d409
refs/heads/master
2020-04-23T21:24:58.710887
2019-02-19T12:31:55
2019-02-19T12:31:55
171,469,967
0
1
null
null
null
null
UTF-8
C++
false
false
4,693
cpp
FFMpegVideoEncoder.cpp
#include "stdafx.h" #include "FFMpegVideoEncoder.h" #include <stdexcept> FFMpegVideoEncoder::FFMpegVideoEncoder() { } FFMpegVideoEncoder::~FFMpegVideoEncoder() { } void FFMpegVideoEncoder::Init(int width, int height, int fpsrate, int bitrate, std::string outputFileName) { _fps = fpsrate; _outputFile = outputFileName; int err; if (!(_oformat = av_guess_format(NULL, _outputFile.c_str(), NULL))) { throw std::runtime_error("FFMPEG Failed to define output format"); } if ((err = avformat_alloc_output_context2(&_formatCtx, _oformat, NULL, _outputFile.c_str()) < 0)) { avformat_free_context(_formatCtx); throw std::runtime_error("Failed to allocate output context" + std::to_string(err)); } if (!(_codec = avcodec_find_encoder(_oformat->video_codec))) { avformat_free_context(_formatCtx); throw std::runtime_error("Failed to find encoder"); } if (!(_videoStream = avformat_new_stream(_formatCtx, _codec))) { avformat_free_context(_formatCtx); throw std::runtime_error("Failed to create new stream"); } if (!(_codecCtx = avcodec_alloc_context3(_codec))) { // free video stream ? // free codec ? avformat_free_context(_formatCtx); throw std::runtime_error("Failed to allocate codec context"); } _videoStream->codecpar->codec_id = _oformat->video_codec; _videoStream->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; _videoStream->codecpar->width = width; _videoStream->codecpar->height = height; _videoStream->codecpar->format = AV_PIX_FMT_YUV420P; _videoStream->codecpar->bit_rate = bitrate * 1000; AVRational timeBase; timeBase.den = _fps; timeBase.num = 1; _videoStream->time_base = timeBase; avcodec_parameters_to_context(_codecCtx, _videoStream->codecpar); _codecCtx->time_base = timeBase; _codecCtx->max_b_frames = 2; _codecCtx->gop_size = 12; if (_videoStream->codecpar->codec_id == AV_CODEC_ID_H264) { av_opt_set(_codecCtx, "preset", "ultrafast", 0); } if (_formatCtx->oformat->flags & AVFMT_GLOBALHEADER) { _codecCtx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; } avcodec_parameters_from_context(_videoStream->codecpar, _codecCtx); if ((err = avcodec_open2(_codecCtx, _codec, NULL)) < 0) { //Free throw std::runtime_error("Failed to open codec" + std::to_string(err)); } if (!(_oformat->flags & AVFMT_NOFILE)) { if ((err = avio_open(&_formatCtx->pb, _outputFile.c_str(), AVIO_FLAG_WRITE)) < 0) { //Free throw std::runtime_error("Failed to open file" + std::to_string(err)); } } if ((err = avformat_write_header(_formatCtx, NULL)) < 0) { // Free throw std::runtime_error("Failed to write header"+ std::to_string(err)); } av_dump_format(_formatCtx, 0, _outputFile.c_str(), 1); } void FFMpegVideoEncoder::AddFrame(uint8_t * data) { int err; if (!_videoFrame) { _videoFrame = av_frame_alloc(); _videoFrame->format = AV_PIX_FMT_YUV420P; _videoFrame->width = _codecCtx->width; _videoFrame->height = _codecCtx->height; if ((err = av_frame_get_buffer(_videoFrame, 32)) < 0) { throw std::runtime_error("Failed to allocate picture" + std::to_string(err)); } } if (!_swsCtx) { _swsCtx = sws_getContext(_codecCtx->width, _codecCtx->height, AV_PIX_FMT_BGRA, _codecCtx->width, _codecCtx->height, AV_PIX_FMT_YUV420P, SWS_BICUBIC, 0, 0, 0); //AV_PIX_FMT_RGB24 } int inLinesize[1] = { 4 * _codecCtx->width }; // From RGB to YUV sws_scale(_swsCtx, (const uint8_t * const *)&data, inLinesize, 0, _codecCtx->height, _videoFrame->data, _videoFrame->linesize); _videoFrame->pts = _frameCounter++; if ((err = avcodec_send_frame(_codecCtx, _videoFrame)) < 0) { throw std::runtime_error("Failed to send frame" + std::to_string(err)); } AVPacket pkt; av_init_packet(&pkt); pkt.data = NULL; pkt.size = 0; if (avcodec_receive_packet(_codecCtx, &pkt) == 0) { pkt.flags |= AV_PKT_FLAG_KEY; av_interleaved_write_frame(_formatCtx, &pkt); av_packet_unref(&pkt); } } void FFMpegVideoEncoder::Finish() { AVPacket pkt; av_init_packet(&pkt); pkt.data = NULL; pkt.size = 0; for (;;) { avcodec_send_frame(_codecCtx, NULL); if (avcodec_receive_packet(_codecCtx, &pkt) == 0) { av_interleaved_write_frame(_formatCtx, &pkt); av_packet_unref(&pkt); } else { break; } } av_write_trailer(_formatCtx); if (!(_oformat->flags & AVFMT_NOFILE)) { int err = avio_close(_formatCtx->pb); if (err < 0) { throw std::runtime_error("Failed to close file: " + std::to_string(err)); } } Free(); //Remux(); } void FFMpegVideoEncoder::Free() { if (_videoFrame) { av_frame_free(&_videoFrame); } if (_codecCtx) { avcodec_free_context(&_codecCtx); } if (_formatCtx) { avformat_free_context(_formatCtx); } if (_swsCtx) { sws_freeContext(_swsCtx); } }
07b303da4eb134fcbb5fb81ecdb3ea590031a87b
a0543e819f65f75612298b0d2bcf4f933443d915
/src/core/DungeonGenerator.h
4266fe8e0825deff3ad4fd35c072b92c86e79ffc
[]
no_license
lucasrlt/Medieval-Roguelike
56492fd6f97e513bc723ee568a211ac6bb26d97a
b9b73abce53e32af92f1ea805d2f4c2b0de735a9
refs/heads/master
2020-11-25T20:20:17.225530
2019-05-06T14:12:10
2019-05-06T14:12:10
228,827,065
0
0
null
null
null
null
UTF-8
C++
false
false
4,298
h
DungeonGenerator.h
/** * @brief Module gérant la génération d'un donjon * * @author Lucas ROLLET @file DungeonGenerator.h */ #ifndef MEDIEVALROGUELIKE_DUNGEONGENERATOR_H #define MEDIEVALROGUELIKE_DUNGEONGENERATOR_H #include <vector> #include "Vector2D.h" #include "Room.h" const int MAZE_SIZE = 5; /** * @brief Classe s'occupant de la génération d'un donjon de manière procédurale. * Contient la liste de toutes les salles du jeu, le chemin du labyrinthe, et le nom des salles du labyrinthe. */ class DungeonGenerator { private: int roomCount; /// @brief Nombre de salles dans data/tilemaps Room *allRooms; /// @brief Liste de toutes le salles qu'il est possible d'utiliser dans le donjon. /// @brief Tableau d'entiers représentant le chemin du labyrinthe. 0 = pas de salle, 1 = mettre une salle. int maze[MAZE_SIZE][MAZE_SIZE]; /** * @brief Utilise un algorithme de recherche en profondeur (depth-first search) afin de * générer une chemin depuis un point de départ donné. * Tous les points du chemin doivent être connectés à un autre point relié à ce chemin. * Chaque point du chemin sera remplacé plus tard par une salle. Remplit le tableau maze * de DungeonGenerator avec des 0 pour les cases vides et des 1 pour les cases occupées par des salles. * * @param x,y coordonnées de départ du chemin */ void generateMaze(unsigned int x, unsigned int y); /// @brief Remplit le tableau maze de zéros. void fillMazeWithZeros(); /** * @brief Compte le nombre de salles adjacentes (maze[x][y] > 0) à la position donnée en paramètre. * * @param x,y coordonnées du point (dans le tableau maze) dont on cherche le nombre de voisins. * @return int nombre de voisins (> 0) du point (x, y) */ int countAdjacentRooms(unsigned int x, unsigned int y) const; /** * @brief Retourne les positions adjacentes au point (x,y) en faisant attention aux * extrémités du tableau. * * @param x,y coordonnées du point (x,y) * @param neighbours retour des coordonnées voisines au point (x,y) sous la forme * d'un vecteur de tuples */ void findNeighbours(unsigned int x, unsigned int y, vector<Point> &neighbours) const; /** * @brief Retourne une salle adaptée au point (x,y), c'est-à-dire qu'elle doit avoir des * ouvertures correspondant aux salles qui l'entourent. * En cas de plusieurs possibilité, la salle est choisie aléatoirement. * * @note Cette fonction est appelée lors du deuxième passage sur maze, pour * générer le plan des salles à partir du chemin du donjon. * * @param x,y coordonnées du point (x,y) * @return Room salle adaptée au point (x,y) */ Room getRandomRoomForPos(unsigned int x, unsigned int y); /** * @brief Trouve une salle correspondant aux critères d'une salle de boss dans le donjon. * C'est une salle à l'extrémité d'un chemin, donc avec un seul voisin. * * @param dungeon donjon dans lequel chercher la salle * @return true la fonction a réussi à trouver une salle * @return false la fonction n'a pas réussi à trouver de salle */ bool findBossRoom(Room** dungeon); public: DungeonGenerator(); ~DungeonGenerator(); /// @brief Affiche le tableau maze. void displayMaze() const; /** * @brief Génère un donjon de taille MAZE_SIZE x MAZE_SIZE procéduralement à partir * des différentes salles créées dans les tilemaps. * * @param dungeon tableau dans lequel les salles du donjon sont stockées. */ void generateDungeon(Room** &dungeon); /** * @brief Crée des salles à partir de toutes les tilemaps stockées dans le dossier dir et * les ajoute dans le vecteur allRooms. * * @param dir dossier dans lequel se trouve les tilemaps représentant les salles. */ void fetchRooms(const char *dir); /** * @brief Supprime un donjon de la mémoire. * * @param dungeon le donjon à supprimer. */ void deleteDungeon(Room** &dungeon); /// @brief Test de regression de la classe DungeonGenerator. void regressionTest(); }; #endif //MEDIEVALROGUELIKE_DUNGEONGENERATOR_H
a971c96290e1b44e1d13ef8159151f5f02602436
071876a47f0ef216af47c5b22dcecb7c3d5c360c
/aijaRand/binomial_distribution.cpp
2e7d7dbc98556610ab0581b394cf81a91c842980
[]
no_license
aijagluk/aijaRand
ef4e50072dc14449249c1706a4eacaa8b520a696
c554bdf2d7a687df7f034377ef2e24f27a4874af
refs/heads/master
2020-05-30T01:38:34.136115
2013-07-15T13:54:37
2013-07-15T13:54:37
null
0
0
null
null
null
null
UTF-8
C++
false
false
966
cpp
binomial_distribution.cpp
#include "distribution.hpp" #include "binomial_distribution.hpp" #include "bernoulli_distribution.hpp" double BinomialDistribution::GetRandNum() { if (_p < 0 || _p > 1) { throw BadArgumentException(); } BernoulliDistribution* bd = new BernoulliDistribution(_p); double total_y(0.0); for (unsigned int i = 0; i < _n; ++i) { total_y += bd->GetRandNum(); } delete bd; return total_y; } std::vector<double>* BinomialDistribution::GetRandNums(unsigned int count) { if (_p < 0 || _p > 1) { throw BadArgumentException(); } std::vector<double>* the_vector = new std::vector<double>(); the_vector->reserve(count); BernoulliDistribution* bd = new BernoulliDistribution(_p); double total_y(0.0); for (unsigned int n = 0; n < count; ++n) { for (unsigned int i = 0; i < _n; ++i) { total_y += bd->GetRandNum(); } the_vector->push_back(total_y); total_y = 0; } delete bd; return the_vector; }
516963ddeafaf318d91d5bcc453db829d6064532
1e1ad5ae19f17e7db246cc3f911d3cc4c2072e65
/03 - Problem Solving Paradigms/01 - Complete Search/01 - Iterative (One Loop, linear Scan)/10976 - Fractions Again.cpp
8707445b2fc120422642a76dab54e1fbc38652f6
[]
no_license
km36388/UVA-Solutions
5d34138fd7adc4fe338cfaeb11af6155916d3309
e5171b04d6a8bb17426245f650723d41345b7fc8
refs/heads/master
2020-12-11T18:16:27.847801
2018-08-23T16:11:29
2018-08-23T16:11:29
null
0
0
null
null
null
null
UTF-8
C++
false
false
596
cpp
10976 - Fractions Again.cpp
#include <bits/stdc++.h> using namespace std; vector< pair<int, int> > res; int main() { int x, y, k; while (scanf("%d", &k) != EOF) { int cnt = 0; for (int y = k + 1; y <= 2*k; ++y) { if ((k*y) % (y-k) == 0) { res.push_back({(k*y)/(y-k), y}); ++cnt; } } printf("%d\n", cnt); for (int i = 0; i < res.size(); ++i) { printf("1/%d = 1/%d + 1/%d\n", k, res[i].first, res[i].second); } res.clear(); } return 0; } /* Author: bumpy (-_-) date: 10-Jul-2016 */
acddbb6f4e48c6fcbe01bbc9e78cb1fda1fb9862
6f21c23eae789080a2f1669046a8de54b18f6be8
/innNative.cpp
aa347df557d89ddf9f0d3c88b417d06ee528f6b3
[]
no_license
LevkinSergey/NativeAPI
58f8fd0810f247b73206a1ddf0bb5fc8e51a8ac3
5cd12c7e1ed765bab8749ff352bad38e10c65785
refs/heads/master
2020-12-05T10:32:30.570153
2019-09-10T14:34:44
2019-09-10T14:34:44
232,081,643
2
0
null
2020-01-06T10:54:29
2020-01-06T10:54:28
null
UTF-8
C++
false
false
25,086
cpp
innNative.cpp
 #include "innNative.h" #ifdef WIN32 #pragma setlocale("ru-RU" ) #endif static const wchar_t *g_PropNames[] = { L"Verison" }; static const wchar_t *g_PropNamesRu[] = { L"Версия" }; static const wchar_t *g_MethodNames[] = { L"GetVersion", L"GetDescription", L"GetLastError", L"GetParameters", L"SetParameter", L"Open", L"Close", L"DeviceTest", L"GetAdditionalActions", L"DoAdditionalAction" }; static const wchar_t *g_MethodNamesRu[] = { L"ПолучитьНомерВерсии", L"ПолучитьОписание", L"ПолучитьОшибку", L"ПолучитьПараметры", L"УстановитьПараметр", L"Подключить", L"Отключить", L"ТестУстройства", L"ПолучитьДополнительныеДействия", L"ВыполнитьДополнительноеДействие" }; static const wchar_t g_kClassNames[] = L"innNative"; static const wchar_t* extensionName = L"InnovaIT"; static const wchar_t* extensionVersion = L"1.0.0.0"; // Мажорная версия, минорная версия, исправления, номер сборки static IAddInDefBase *pAsyncEvent = NULL; uint32_t convToShortWchar(WCHAR_T** Dest, const wchar_t* Source, uint32_t len = 0); uint32_t convFromShortWchar(wchar_t** Dest, const WCHAR_T* Source, uint32_t len = 0); uint32_t getLenShortWcharStr(const WCHAR_T* Source); static AppCapabilities g_capabilities = eAppCapabilitiesInvalid; static WcharWrapper s_names(g_kClassNames); char* WCHAR_2_CHAR(wchar_t *in_str); wchar_t* CHAR_2_WCHAR(char *in_str); //---------------------------------------------------------------------------// long GetClassObject(const WCHAR_T* wsName, IComponentBase** pInterface) { if(!*pInterface) { *pInterface= new innNative; return (long)*pInterface; } return 0; } //---------------------------------------------------------------------------// AppCapabilities SetPlatformCapabilities(const AppCapabilities capabilities) { g_capabilities = capabilities; return eAppCapabilitiesLast; } //---------------------------------------------------------------------------// long DestroyObject(IComponentBase** pIntf) { if(!*pIntf) return -1; delete *pIntf; *pIntf = 0; return 0; } //---------------------------------------------------------------------------// const WCHAR_T* GetClassNames() { return s_names; } //---------------------------------------------------------------------------// // innNative //---------------------------------------------------------------------------// innNative::innNative() { m_iMemory = 0; m_iConnect = 0; } //---------------------------------------------------------------------------// innNative::~innNative() { } //---------------------------------------------------------------------------// bool innNative::Init(void* pConnection) { m_iConnect = (IAddInDefBase*)pConnection; m_iConnect->SetEventBufferDepth(100); return m_iConnect != NULL; } //---------------------------------------------------------------------------// long innNative::GetInfo() { // Component should put supported component technology version // This component supports 2.0 version return 2000; } //---------------------------------------------------------------------------// void innNative::Done() { } ///////////////////////////////////////////////////////////////////////////// // ILanguageExtenderBase //---------------------------------------------------------------------------// bool innNative::RegisterExtensionAs(WCHAR_T** wsExtensionName) { const wchar_t *wsExtension = extensionName; size_t iActualSize = ::wcslen(wsExtension) + 1; WCHAR_T* dest = 0; if (m_iMemory) { if(m_iMemory->AllocMemory((void**)wsExtensionName, iActualSize * sizeof(WCHAR_T))) ::convToShortWchar(wsExtensionName, wsExtension, iActualSize); return true; } return false; } //---------------------------------------------------------------------------// long innNative::GetNProps() { return epLast; } //---------------------------------------------------------------------------// long innNative::FindProp(const WCHAR_T* wsPropName) { long plPropNum = -1; wchar_t* propName = 0; ::convFromShortWchar(&propName, wsPropName); plPropNum = findName(g_PropNames, propName, epLast); if (plPropNum == -1) plPropNum = findName(g_PropNamesRu, propName, epLast); delete[] propName; return plPropNum; } //---------------------------------------------------------------------------// const WCHAR_T* innNative::GetPropName(long lPropNum, long lPropAlias) { if (lPropNum >= epLast) return NULL; wchar_t *wsCurrentName = NULL; WCHAR_T *wsPropName = NULL; int iActualSize = 0; switch(lPropAlias) { case 0: // First language wsCurrentName = (wchar_t*)g_PropNames[lPropNum]; break; case 1: // Second language wsCurrentName = (wchar_t*)g_PropNamesRu[lPropNum]; break; default: return 0; } iActualSize = wcslen(wsCurrentName) + 1; if (m_iMemory && wsCurrentName) { if (m_iMemory->AllocMemory((void**)&wsPropName, iActualSize * sizeof(WCHAR_T))) ::convToShortWchar(&wsPropName, wsCurrentName, iActualSize); } return wsPropName; } //---------------------------------------------------------------------------// bool innNative::GetPropVal(const long lPropNum, tVariant* pvarPropVal) { switch(lPropNum) { case epVersion: { setWStringToTVariant(pvarPropVal, extensionVersion); return true; } default: return false; } return true; } //---------------------------------------------------------------------------// bool innNative::SetPropVal(const long lPropNum, tVariant *varPropVal) { switch(lPropNum) { default: return false; } return true; } //---------------------------------------------------------------------------// bool innNative::IsPropReadable(const long lPropNum) { switch(lPropNum) { case epVersion: return true; default: return false; } return false; } //---------------------------------------------------------------------------// bool innNative::IsPropWritable(const long lPropNum) { switch(lPropNum) { case epVersion: return false; default: return false; } return false; } //---------------------------------------------------------------------------// long innNative::GetNMethods() { return emLast; } //---------------------------------------------------------------------------// long innNative::FindMethod(const WCHAR_T* wsMethodName) { long plMethodNum = -1; wchar_t* name = 0; ::convFromShortWchar(&name, wsMethodName); plMethodNum = findName(g_MethodNames, name, emLast); if (plMethodNum == -1) plMethodNum = findName(g_MethodNamesRu, name, emLast); delete[] name; return plMethodNum; } //---------------------------------------------------------------------------// const WCHAR_T* innNative::GetMethodName(const long lMethodNum, const long lMethodAlias) { if (lMethodNum >= emLast) return NULL; wchar_t *wsCurrentName = NULL; WCHAR_T *wsMethodName = NULL; int iActualSize = 0; switch(lMethodAlias) { case 0: // First language wsCurrentName = (wchar_t*)g_MethodNames[lMethodNum]; break; case 1: // Second language wsCurrentName = (wchar_t*)g_MethodNamesRu[lMethodNum]; break; default: return 0; } iActualSize = wcslen(wsCurrentName) + 1; if (m_iMemory && wsCurrentName) { if(m_iMemory->AllocMemory((void**)&wsMethodName, iActualSize * sizeof(WCHAR_T))) ::convToShortWchar(&wsMethodName, wsCurrentName, iActualSize); } return wsMethodName; } //---------------------------------------------------------------------------// long innNative::GetNParams(const long lMethodNum) { switch(lMethodNum) { case emGetVersion: return 0; case emGetDescription: return 7; case emGetLastError: return 1; case emGetParameters: return 1; case emSetParameter: return 2; case emOpen: return 1; case emClose: return 1; case emDeviceTest: return 2; case emGetAdditionalActions: return 1; case emDoAdditionalAction: return 1; default: return 0; } return 0; } //---------------------------------------------------------------------------// bool innNative::GetParamDefValue(const long lMethodNum, const long lParamNum, tVariant *pvarParamDefValue) { TV_VT(pvarParamDefValue)= VTYPE_EMPTY; switch(lMethodNum) { default: return false; } return false; } //---------------------------------------------------------------------------// bool innNative::HasRetVal(const long lMethodNum) { switch (lMethodNum) { case emGetVersion: return true; case emGetDescription: return true; case emGetLastError: return true; case emGetParameters: return true; case emSetParameter: return true; case emOpen: return true; case emClose: return true; case emDeviceTest: return true; case emGetAdditionalActions: return true; case emDoAdditionalAction: return true; default: return false; } return false; } //---------------------------------------------------------------------------// bool innNative::CallAsProc(const long lMethodNum, tVariant* paParams, const long lSizeArray) { switch (lMethodNum) { default: return false; } return true; } //---------------------------------------------------------------------------// void innNative::setWStringToTVariant(tVariant *dest, const wchar_t* source) { size_t len = ::wcslen(source)+1; TV_VT(dest) = VTYPE_PWSTR; if (m_iMemory->AllocMemory((void**)&dest->pwstrVal, len * sizeof(WCHAR_T))) convToShortWchar(&dest->pwstrVal, source, len); dest->wstrLen = ::wcslen(source); } //---------------------------------------------------------------------------// bool innNative::mGetVersion(tVariant* retVal) { if (retVal) { setWStringToTVariant(retVal, extensionVersion); return true; } return false; } //---------------------------------------------------------------------------// bool innNative::mGetDescription(tVariant* retVal, tVariant* name, tVariant* description, tVariant* equipmentType, tVariant* interfaceRevision, tVariant* integrationLibrary, tVariant* mainDriverInstalled, tVariant* getDownloadURL) { TV_VT(interfaceRevision) = VTYPE_I4; TV_VT(integrationLibrary) = VTYPE_BOOL; TV_VT(mainDriverInstalled) = VTYPE_BOOL; setWStringToTVariant(name, L"Наименование драйвера"); setWStringToTVariant(description, L"Описание драйвера"); // Тип оборудования //СканерШтрихкода, СчитывательМагнитныхКарт, ФискальныйРегистратор, ПринтерЧеков, ПринтерЭтикеток, //ДисплейПокупателя, ТерминалСбораДанных, ЭквайринговыйТерминал, ЭлектронныеВесы, ВесыСПечатьюЭтикеток, СчитывательRFID, ККТ. setWStringToTVariant(equipmentType, L"СканерШтрихкода"); TV_I4(interfaceRevision) = 2004; TV_BOOL(integrationLibrary) = false; TV_BOOL(mainDriverInstalled) = true; setWStringToTVariant(getDownloadURL, L""); if (retVal) { TV_VT(retVal) = VTYPE_BOOL; TV_BOOL(retVal) = true; return true; } return false; } //---------------------------------------------------------------------------// bool innNative::mGetLastError(tVariant* retVal, tVariant* retDescription) { setWStringToTVariant(retDescription, L"Возвращаем последнюю ошибку"); if (retVal) { TV_VT(retVal) = VTYPE_I4; TV_I4(retVal) = 0; return true; } return false; } //---------------------------------------------------------------------------// bool innNative::mGetParameters(tVariant* retVal, tVariant* xml) { setWStringToTVariant(xml, L"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" "<Settings>" "<Page Caption=\"Параметры\">" "<Group Caption=\"Параметры подключения\">" "<Parameter Name=\"Par1\" Caption=\"Параметр1\" Description=\"Описание в выпадающей подсказке\" TypeValue=\"String\" DefaultValue=\"ЗначениеПоУмолчанию\" />" "<Parameter Name=\"Par2\" Caption=\"Параметр2\" Description=\"Описание в выпадающей подсказке\" TypeValue=\"Number\" DefaultValue=\"0\">" "<Parameter Name=\"Par3\" Caption=\"Параметр3\" Description=\"Описание в выпадающей подсказке\" TypeValue=\"Boolean\" DefaultValue=\"True\">" "<ChoiceList>" "<Item Value=\"0\">0</Item>" "<Item Value=\"1\">1</Item>" "<Item Value=\"2\">2</Item>" "<Item Value=\"3\">3</Item>" "<Item Value=\"4\">4</Item>" "</ChoiceList>" "</Parameter>" "</Group>" "</Page>" "</Settings>" ); if (retVal) { TV_VT(retVal) = VTYPE_BOOL; TV_BOOL(retVal) = true; return true; } return false; } //---------------------------------------------------------------------------// bool innNative::mSetParameter(tVariant* retVal, tVariant* par, tVariant* val) { wchar_t* wPar = 0; if (TV_VT(par) == VTYPE_PWSTR) { convFromShortWchar(&wPar, TV_WSTR(par)); } else { return false; } if (retVal) { TV_VT(retVal) = VTYPE_BOOL; TV_BOOL(retVal) = true; return true; } return false; } //---------------------------------------------------------------------------// bool innNative::mOpen(tVariant* retVal, tVariant* par) { wchar_t* wPar = 0; if (TV_VT(par) == VTYPE_PWSTR) { convFromShortWchar(&wPar, TV_WSTR(par)); } else { return false; } receiveInThread = true; bool res; #if defined( __linux__ ) res = openThreadLinux(wPar); #endif #ifdef _WINDOWS res = openThreadWindows(wPar); #endif if (retVal) { TV_VT(retVal) = VTYPE_BOOL; TV_BOOL(retVal) = res; return res; } return false; } //---------------------------------------------------------------------------// bool innNative::mClose(tVariant* retVal, tVariant* par) { wchar_t* wPar = 0; if (TV_VT(par) == VTYPE_PWSTR) { convFromShortWchar(&wPar, TV_WSTR(par)); } else { return false; } receiveInThread = false; bool res; #if defined( __linux__ ) res = closeThreadLinux(wPar); #endif #ifdef _WINDOWS res = openThreadWindows(wPar); #endif if (retVal) { TV_VT(retVal) = VTYPE_BOOL; TV_BOOL(retVal) = res; return res; } return false; } //---------------------------------------------------------------------------// bool innNative::mDeviceTest(tVariant* retVal, tVariant* description, tVariant* demoModeIsActivated) { if (retVal) { TV_VT(retVal) = VTYPE_BOOL; TV_BOOL(retVal) = true; return true; } return false; } //---------------------------------------------------------------------------// bool innNative::mGetAdditionalActions(tVariant* retVal, tVariant* xml) { setWStringToTVariant(xml, L"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" "<Actions>" "<Action Name = \"Action1\" Caption = \"Дополнительное действие 1\" / >" "</Actions>" ); if (retVal) { TV_VT(retVal) = VTYPE_BOOL; TV_BOOL(retVal) = true; return true; } return false; } //---------------------------------------------------------------------------// bool innNative::mDoAdditionalAction(tVariant* retVal, tVariant* actionName) { if (retVal) { TV_VT(retVal) = VTYPE_BOOL; TV_BOOL(retVal) = true; return true; } return false; } //---------------------------------------------------------------------------// bool innNative::CallAsFunc(const long lMethodNum, tVariant* pvarRetValue, tVariant* paParams, const long lSizeArray) { switch(lMethodNum) { // Method acceps one argument of type BinaryData ant returns its copy case emGetVersion: return mGetVersion(pvarRetValue); case emGetDescription: return mGetDescription(pvarRetValue, paParams, &paParams[1], &paParams[2], &paParams[3], &paParams[4], &paParams[5], &paParams[6]); case emGetLastError: return mGetLastError(pvarRetValue, paParams); case emGetParameters: return mGetParameters(pvarRetValue, paParams); case emSetParameter: return mSetParameter(pvarRetValue, paParams, &paParams[1]); case emOpen: return mOpen(pvarRetValue, paParams); case emClose: return mClose(pvarRetValue, paParams); case emDeviceTest: return mDeviceTest(pvarRetValue, paParams, &paParams[1]); case emGetAdditionalActions: return mGetAdditionalActions(pvarRetValue, paParams); case emDoAdditionalAction: return mDoAdditionalAction(pvarRetValue, paParams); default: return false; } return false; } //---------------------------------------------------------------------------// void innNative::SetLocale(const WCHAR_T* loc) { #if !defined( __linux__ ) && !defined(__APPLE__) _wsetlocale(LC_ALL, loc); #endif } ///////////////////////////////////////////////////////////////////////////// // LocaleBase //---------------------------------------------------------------------------// bool innNative::setMemManager(void* mem) { m_iMemory = (IMemoryManager*)mem; return m_iMemory != 0; } //---------------------------------------------------------------------------// void innNative::addError(uint32_t wcode, const wchar_t* source, const wchar_t* descriptor, long code) { if (m_iConnect) { WCHAR_T *err = 0; WCHAR_T *descr = 0; ::convToShortWchar(&err, source); ::convToShortWchar(&descr, descriptor); m_iConnect->AddError(wcode, err, descr, code); delete[] err; delete[] descr; } } //---------------------------------------------------------------------------// long innNative::findName(const wchar_t* names[], const wchar_t* name, const uint32_t size) const { long ret = -1; for (uint32_t i = 0; i < size; i++) { if (!wcscmp(names[i], name)) { ret = i; break; } } return ret; } bool innNative::sendEvent(wchar_t* msg, wchar_t* data) { if (m_iConnect) { WCHAR_T *who = 0, *what = 0, *wdata = 0; ::convToShortWchar(&who, extensionName); ::convToShortWchar(&what, msg); ::convToShortWchar(&wdata, data); bool res = m_iConnect->ExternalEvent(who, what, wdata); delete[] who; delete[] what; delete[] wdata; return res; } return false; } //---------------------------------------------------------------------------// uint32_t convToShortWchar(WCHAR_T** Dest, const wchar_t* Source, uint32_t len) { if (!len) len = ::wcslen(Source) + 1; if (!*Dest) *Dest = new WCHAR_T[len]; WCHAR_T* tmpShort = *Dest; wchar_t* tmpWChar = (wchar_t*) Source; uint32_t res = 0; ::memset(*Dest, 0, len * sizeof(WCHAR_T)); #ifdef __linux__ size_t succeed = (size_t)-1; size_t f = len * sizeof(wchar_t), t = len * sizeof(WCHAR_T); const char* fromCode = sizeof(wchar_t) == 2 ? "UTF-16" : "UTF-32"; iconv_t cd = iconv_open("UTF-16LE", fromCode); if (cd != (iconv_t)-1) { succeed = iconv(cd, (char**)&tmpWChar, &f, (char**)&tmpShort, &t); iconv_close(cd); if(succeed != (size_t)-1) return (uint32_t)succeed; } #endif //__linux__ for (; len; --len, ++res, ++tmpWChar, ++tmpShort) { *tmpShort = (WCHAR_T)*tmpWChar; } return res; } //---------------------------------------------------------------------------// uint32_t convFromShortWchar(wchar_t** Dest, const WCHAR_T* Source, uint32_t len) { if (!len) len = getLenShortWcharStr(Source) + 1; if (!*Dest) *Dest = new wchar_t[len]; wchar_t* tmpWChar = *Dest; WCHAR_T* tmpShort = (WCHAR_T*)Source; uint32_t res = 0; ::memset(*Dest, 0, len * sizeof(wchar_t)); #ifdef __linux__ size_t succeed = (size_t)-1; const char* fromCode = sizeof(wchar_t) == 2 ? "UTF-16" : "UTF-32"; size_t f = len * sizeof(WCHAR_T), t = len * sizeof(wchar_t); iconv_t cd = iconv_open("UTF-32LE", fromCode); if (cd != (iconv_t)-1) { succeed = iconv(cd, (char**)&tmpShort, &f, (char**)&tmpWChar, &t); iconv_close(cd); if(succeed != (size_t)-1) return (uint32_t)succeed; } #endif //__linux__ for (; len; --len, ++res, ++tmpWChar, ++tmpShort) { *tmpWChar = (wchar_t)*tmpShort; } return res; } //---------------------------------------------------------------------------// uint32_t getLenShortWcharStr(const WCHAR_T* Source) { uint32_t res = 0; WCHAR_T *tmpShort = (WCHAR_T*)Source; while (*tmpShort++) ++res; return res; } //---------------------------------------------------------------------------// // --------------------------------------------------------------Innova-IT ------------------------------------------------------------------------// char* WCHAR_2_CHAR(wchar_t *in_str) { size_t len = wcslen(in_str) / sizeof(char) + 1; char* out_str = new char[len]; size_t* out_str_len = 0; wcstombs(out_str, in_str, len); delete &len; delete out_str_len; return out_str; } // --------------------------------------------------------------Innova-IT ------------------------------------------------------------------------// wchar_t* CHAR_2_WCHAR(char *in_str) { size_t len = strlen(in_str) + 1; wchar_t* out_str = new wchar_t[len * sizeof(wchar_t)]; size_t* out_str_len = 0; mbstowcs(out_str, in_str,len); return out_str; } //----------------------------------------------------------Процедуры Потоков-----------------------------------------------------------------------// #ifdef _WINDOWS static unsigned int _stdcall threadWindows(void*p) { innNative *serialCl = (innNative*)p; while (true) { Sleep(3000); if (!serialCl->receiveInThread) { serialCl->sendEvent(L"НовыеДанные", L"Стоп"); return true; } serialCl->sendEvent(L"НовыеДанные", L"Тик"); } return true; } //---------------------------------------------------------------------------// bool innNative::openThreadWindows(wchar_t* par) { hTh = 0; hTh = (HANDLE)_beginthreadex(NULL, 10, threadWindows, (LPVOID)this, 0, &thID); if (hTh == 0) { sendEvent(L"Ошибка", L"Не удалось создать новый поток"); return false; } return true; } bool innNative::closeThreadWindows(wchar_t* par) { if (hTh) { DWORD stopThRes = WaitForSingleObject(hTh, 200); hTh = 0; if (stopThRes != WAIT_OBJECT_0) return false; } return true; } #endif #if defined( __linux__ ) void* threadLinux(void* p) { innNative *serialCl = (innNative*)p; while (true) { usleep(3000000); if (!serialCl->receiveInThread) { serialCl->sendEvent(L"НовыеДанные", L"Стоп"); pthread_exit(0); } serialCl->sendEvent(L"НовыеДанные", L"Тик"); } pthread_exit(0); } bool innNative::openThreadLinux(wchar_t* par) { if (pthread_create(&thID, NULL, threadLinux, (LPVOID)this) != 0) { sendEvent(L"Ошибка", L"Не удалось создать новый поток"); return false; } return true; } bool innNative::closeThreadLinux(wchar_t* par) { pthread_join(thID, NULL); return true; } #endif // __LINE__ #ifdef LINUX_OR_MACOS WcharWrapper::WcharWrapper(const WCHAR_T* str) : m_str_WCHAR(NULL), m_str_wchar(NULL) { if (str) { int len = getLenShortWcharStr(str); m_str_WCHAR = new WCHAR_T[len + 1]; memset(m_str_WCHAR, 0, sizeof(WCHAR_T) * (len + 1)); memcpy(m_str_WCHAR, str, sizeof(WCHAR_T) * len); ::convFromShortWchar(&m_str_wchar, m_str_WCHAR); } } #endif //---------------------------------------------------------------------------// WcharWrapper::WcharWrapper(const wchar_t* str) : #ifdef LINUX_OR_MACOS m_str_WCHAR(NULL), #endif m_str_wchar(NULL) { if (str) { int len = wcslen(str); m_str_wchar = new wchar_t[len + 1]; memset(m_str_wchar, 0, sizeof(wchar_t) * (len + 1)); memcpy(m_str_wchar, str, sizeof(wchar_t) * len); #ifdef LINUX_OR_MACOS ::convToShortWchar(&m_str_WCHAR, m_str_wchar); #endif } } //---------------------------------------------------------------------------// WcharWrapper::~WcharWrapper() { #ifdef LINUX_OR_MACOS if (m_str_WCHAR) { delete [] m_str_WCHAR; m_str_WCHAR = NULL; } #endif if (m_str_wchar) { delete [] m_str_wchar; m_str_wchar = NULL; } } //---------------------------------------------------------------------------//
fcb7c57627a5a084a7663d2ae6b9079f7dfc23bb
dd0e33b8547fe497acc44b2b0f50b551f77a49d4
/bk.main.cpp
9c70714484dbe3861a50bacc2649c6d9c8bcbdc1
[]
no_license
UTEC-PE/binary-tree-amaru666
ee2460a79189f4f7e20d5c785f3cd68c2f57d129
66bd78e4114fbb6c5d054b164c4901f7347fd925
refs/heads/master
2020-03-29T22:29:19.054440
2018-10-05T02:00:28
2018-10-05T02:00:28
150,423,659
0
1
null
null
null
null
UTF-8
C++
false
false
655
cpp
bk.main.cpp
#include "bst.h" int main() { BinaryTree mytree = BinaryTree(); mytree.insert(30,mytree.root); mytree.insert(21,mytree.root); mytree.insert(60,mytree.root); mytree.insert(19,mytree.root); mytree.insert(28,mytree.root); mytree.insert(54,mytree.root); mytree.insert(73,mytree.root); mytree.InOrder(mytree.root); cout<<"\n"; for(Iterator it = mytree.begin(); it != nullptr; ++it) cout<<*it<<endl; cout<<"----------------------------------------------------------"<<endl; mytree.delete_node(30); for(Iterator it = mytree.begin(); it != nullptr; ++it) cout<<*it<<endl; return 0; }
52350dec38ff183334c82377383066904fd79420
b357dd228b826df8f0beac86a9200c6d9adc4e78
/qualification/tools/hashsolver/CSVParser.h
2ad46a8fc1b8a31b433c6b7eea82dd5c80f4fa8a
[]
no_license
sebastian-knopp/googleHashCode2015
0c2c9f2e700b35573c78afd7933b191f741364e6
9bf852ab21680eefb816d4bd97b007e5ee1bc579
refs/heads/master
2021-01-20T13:47:08.118740
2015-03-28T15:56:21
2015-03-28T15:56:21
32,046,682
0
1
null
null
null
null
UTF-8
C++
false
false
1,593
h
CSVParser.h
#pragma once #include "LineParser.h" #include "base/Exception.h" #include <map> #include <vector> #include <sstream> class CSVParser { public: //! Can be used to indicate a parse error. struct Exception : public base::Exception { Exception(std::string a_what); }; CSVParser(std::istream& a_istream, char m_separator); //! Returns if there is still a line remaining to be read. operator bool() const; //! Reads header information and check if the expected columns are present. void readHeader(); //! Reads the next line. void getLine(); //! Returns the number of the columns of the line that was previously read. size_t getNmbColumns() const; //! Returns the value for the given key of the current line. std::string get(const std::string& a_key) const; //! Returns the value in the given column of the current line. std::string get(size_t a_columnIndex) const; template<typename T> T get(const std::string& a_key) const { std::stringstream s(get(a_key)); T value; s >> value; return value; } template<typename T> T get(const size_t a_columnIndex) const { std::stringstream s(get(a_columnIndex)); T value; s >> value; return value; } private: LineParser m_lineParser; const char m_separator; std::vector<std::string> m_currentLine = {}; //! Maps keys to columns std::map<std::string, size_t> m_keyToColumn; };
9717535b37c50a7051b1ef69a40c31d25cd9e73e
2f565281c67e9bc13877120def8c1a04de7abe94
/miniRender/miniRender/Math/cwPlane.cpp
2c31be1a7346ec090a15fbdab7a0941b0c2bb476
[]
no_license
happysunny2001/miniRender
3d99377a01cf1aff40115d607b352f828fbfa2f7
334f160fa5a9eef626632b5cda46f8f7624671f2
refs/heads/master
2021-01-17T13:34:45.677255
2017-04-10T12:15:31
2017-04-10T12:15:31
37,502,617
0
0
null
null
null
null
UTF-8
C++
false
false
3,522
cpp
cwPlane.cpp
/* Copyright © 2015 Ziwei Wang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "cwPlane.h" #include "cwRay.h" #include "cwCircle.h" #include "cwAABB.h" //#include "cwIntersection.h" #include "cwMathUtil.h" NS_MINIR_BEGIN cwPlane::cwPlane(): m_fD(0) { } cwPlane::cwPlane(const cwVector3D& n, float d): m_nNormal(n), m_fD(d) { } cwPlane::cwPlane(const cwPoint3D& p1, const cwPoint3D& p2, const cwPoint3D& p3) { cwVector3D e1 = p2 - p1; cwVector3D e2 = p3 - p1; m_nNormal = e1.cross(e2); m_nNormal.normalize(); m_fD = m_nNormal.dot(p1); } cwPlane::cwPlane(const cwPlane& p): m_nNormal(p.m_nNormal), m_fD(p.m_fD) { } cwPlane::~cwPlane() { } cwVector3D cwPlane::closestPoint(const cwPoint3D& p) const { return p + (m_fD - p.dot(m_nNormal))*m_nNormal; } float cwPlane::closestPoint(const cwPoint3D& p, cwVector3D& ret) const { float f = m_fD - p.dot(m_nNormal); ret = p + f*m_nNormal; return f; } void cwPlane::update(const cwMatrix4X4& mat) { cwVector3D vecTrans = mat.getTranslation(); m_nNormal *= mat; m_nNormal.normalize(); m_fD = m_nNormal.dot(vecTrans); } void cwPlane::normalize() { float fDivLen = 1.0f / m_nNormal.length(); m_nNormal *= fDivLen; m_fD *= fDivLen; } //int cwPlane::intersection(const cwShape& other) const //{ // switch (other.m_eType) { // case eShapeRay: // return cwIntersectionRayPlane(static_cast<const cwRay&>(other), *this); // case eShapePlane: // return cwIntersectionPlanePlane(*this, static_cast<const cwPlane&>(other)); // case eShapeCircle: // return cwIntersectionPlaneCircle(*this, static_cast<const cwCircle&>(other)); // case eShapeAABB: // return cwIntersectionPlaneAABB(*this, static_cast<const cwAABB&>(other)); // default: // return false; // } // return false; //} int cwPlane::intersection(const cwRay& ray) const { float f = ray.m_nDir.dot(this->m_nNormal); if (f < cwMathUtil::cwFloatEpsilon) return 0; float t = (this->m_fD - ray.m_nOrigin.dot(this->m_nNormal)) / f; if (t < 0 || t > ray.m_fT) return 0; return 1; } int cwPlane::intersection(const cwPlane& plane) const { if (fabsf(fabsf(this->m_nNormal.dot(plane.m_nNormal)) - 1.0f) < cwMathUtil::cwFloatEpsilon) return 0; return 1; } int cwPlane::intersection(const cwCircle& circle) const { return circle.intersection(*this); } int cwPlane::intersection(const cwAABB& aabb) const { return aabb.intersection(*this); } NS_MINIR_END
4eaf6188436d38f948c50564b5d05c300f32aebb
a5616297d6cb76553a62737868a277851513ba6a
/Thuc Hanh/9-10.Max_Min.cpp
f393d3556b1dfbd5aaaa94b32a3e19424f2ab512
[]
no_license
vanhai260300/CTDL-GT
c31b2885bdd82a49be2b199f078212a24cfc0745
b1c254287e4b74f4017ee9ca769d293315d7d62b
refs/heads/master
2023-01-01T13:43:17.010048
2020-10-30T05:00:28
2020-10-30T05:00:28
308,529,200
0
0
null
null
null
null
UTF-8
C++
false
false
357
cpp
9-10.Max_Min.cpp
#include<stdio.h> int SLN(int n) { if(n<10) return n; if((n%10)>SLN(n/10)) return n%10; else return SLN(n/10); } int SBN(int m) { if(m<10) return m; if((m%10)<SBN(m/10)) return m%10; else return SBN(m/10); } int main() { int x; printf("Nhap x: "); scanf("%d",&x); printf("So lon nhat %d\n",SLN(x)); printf("So be nhat %d",SBN(x)); }
e65eb49c08c6adb007913463b408d99feb7ef0c4
d57ac0bb2963430a09540b30e7050d9943c8d6c4
/src/sol/CnfBuilder.cpp
54bd11ecd2347da77a441d3b6603540d83d739e7
[]
no_license
ntp890517/sat
60cb43c611ea4c78a1d7c2805028cac4275ce5e7
9e6f917a790d36e706cb43a61d3fbca2c75532c0
refs/heads/master
2021-01-01T03:54:49.434348
2016-05-12T15:30:18
2016-05-12T15:30:18
56,508,209
0
0
null
null
null
null
UTF-8
C++
false
false
1,422
cpp
CnfBuilder.cpp
#include "CnfBuilder.h" #include "../db/db.h" #include "../ut/ut.h" Cnf* CnfBuilder::GetCnf() { if (_isDone) { return _cnf; } else { PROGERROR() << "Cnf building is not finised" << endl; assert(0); return nullptr; } }; void DpllCnfBuilder::BuildVariableTable(unsigned nrVars) { for (unsigned i = 0 ; i < nrVars+1 ; i++) { Variable* var; var = new Variable(i); var->InitLiterals<LiteralDPLL>(); _cnf->PushVariable(var); } } void DpllCnfBuilder::BuildClause(string s) { istringstream iss(s); ClauseDPLL* c = new ClauseDPLL; LiteralDPLL *pLit = nullptr; int lit; while(iss >> lit) { if (lit == 0) { break; } else if (lit > 0) { pLit = static_cast<LiteralDPLL*>(_cnf->GetVariable(lit)->GetPosLit()); c->Insert(pLit); } else { pLit = static_cast<LiteralDPLL*>(_cnf->GetVariable(-lit)->GetNegLit()); c->Insert(pLit); } } _cnf->PushClause(c); } void DpllCnfBuilder::PostProcess() { Setup2WatchLiteral(); _isDone = true; } void DpllCnfBuilder::Setup2WatchLiteral() { for (unsigned i = 0 ; i < _cnf->GetClausesSize() ; i++) { ClauseDPLL* c = static_cast<ClauseDPLL*>(_cnf->GetClause(i)); c->Setup2Watch(); c->GetWatch1()->AddClause(c); c->GetWatch2()->AddClause(c); } }
ec5c9a6fadb0269803efe03f1611782a8e7d0b13
f2573a598412070632fa56ba2eaac5fb4fb7eaf6
/Project5/src/poisson.cpp
f43e99a77f656cbd6cad53171f6dc472bb7556a8
[]
no_license
jostbr/FYS4150-Projects
4dc4a2090a8ec96f97e70267342829385d015004
915c3c07b0edc1b6849b9dfb7a496a0ffbe0c1b7
refs/heads/master
2021-01-20T04:16:40.964224
2017-12-08T14:32:23
2017-12-08T14:32:23
101,383,776
0
0
null
null
null
null
UTF-8
C++
false
false
9,463
cpp
poisson.cpp
# include "poisson.hpp" /* Function implementing the Thomas algorithm for solving the linear system Ax = y where A * is a general tridiagonal matrix (NxN) with lower diag a (length N-1), main diag b (length N) * and upper diag c (length N-1). Further y is the known right-hand-side vector and solution * is the array to hold the solution x. Can e.g. be applied to solve the 1D Poisson equation * * d^2(solution)/dx^2 = y * * Note that this only solves for the interior points. */ void tridiag_general(double* a, double* b, double* c, double* y, int N, double* solution){ /* STEP 1: Forward substitution. */ for (int i = 1; i < N; i++){ b[i] = b[i] - a[i-1]*c[i-1]/b[i-1]; // Eliminating lower diagonal y[i] = y[i] - (a[i-1]/b[i-1])*y[i-1]; // Corresponding change to RHS of eq. } /* STEP 2: Backward substitution. */ solution[N-1] = y[N-1]/b[N-1]; // Special case for obtaining final element of solution for (int i = N-2; i >= 0; i--){ solution[i] = (y[i] - c[i]*solution[i+1])/b[i]; // Eliminating upper diag and dividing by main diag } } /* Function for solving the linear system Ax = y where A is a special tridiagonal matrix (NxN) with * all elements along lower and upper diag equal to -1, while the main diag has all values equal to * 2. Further y is the known right-hand-side vector and solution is the array to hold the solution x. * Can e.g. be applied to solve the 1D Poisson equation * * d^2(solution)/dx^2 = y * * Note that this only solves for the interior points. This algorithm is optimized; cost = 5*N. */ void tridiag_ferrari(double* b, double* y, int N, double* solution){ b[0] = 2.0; /* STEP 1: Forward substitution. */ for (int i = 1; i < N; i++){ b[i] = (i + 2)/((double)(i + 1)); // Eliminating lower diagonal y[i] = y[i] + (y[i-1]/b[i-1]); // Corresponding change to RHS of eq. } /* STEP 2: Backward substitution. */ solution[N-1] = y[N-1]/b[N-1]; // Special case for obtaining final element of solution for (int i = N-2; i >= 0; i--){ solution[i] = (y[i] + solution[i+1])/b[i]; // Eliminating upper diag and dividing by main diag } } /* Function that implements the iterative Jacobi algorithm for solving the 2D Poisson equation * * d^2f/dx^2 + d^f/dy^2 = g * * with source function g(x,y) and (constant) boundary conditions * * f(0,y) = bc_0y * f(1,y) = bc_1y * f(x,0) = bc_x0 * f(x,1) = bc_x1 * * using num_iter number of iterations for convergence at each of the (N_x, N_y) spatial points. */ void poisson_jacobi(double* g, double* bc_0y, double* bc_1y, double* bc_x0, double* bc_x1, double dx, double dy, int N_x, int N_y, int max_iter, double* f){ double dxdx = dx*dx; double dydy = dy*dy; double dxdxdydy = dxdx*dydy; double dxdx_pluss_dydy_2 = 2*(dxdx + dydy); for (int j = 0; j < N_y; j++){ f[0 + j] = bc_0y[j]; // Boundary condition at (x = 0, y) f[(N_x-1)*N_y + j] = bc_1y[j]; // Boundary condition at (x = 1, y) } for (int i = 0; i < N_x; i++){ f[i*N_y + 0] = bc_x0[i]; // Boundary condition at (x, y = 0) f[i*N_y + (N_y-1)] = bc_x1[i]; // Boundary condition at (x, y = 1) } int iter = 0; double diff = 1.0E+20; // To check for convergence double eps = 1.0E-6; // Tolerance for convergence double* f_tmp; // To temporary hold solution for each iteration alloc_array_1D(f_tmp, N_x*N_y); /* Iterate until satisafactory convergence is reached (or max iter is reached). */ while (iter <= max_iter && fabs(diff) > eps){ diff = 0.0; for (int i = 0; i < N_x; i++){ for (int j = 0; j < N_y; j++){ f_tmp[i*N_y + j] = f[i*N_y + j]; // Need previous "solution" } } /* Do one sweep over the array step each point closer to the solution. */ for (int i = 1; i < N_x-1; i++){ for (int j = 1; j < N_y-1; j++){ f[i*N_y + j] = (dydy*(f_tmp[(i+1)*N_y + j] + f_tmp[(i-1)*N_y + j]) + dxdx*(f_tmp[i*N_y + (j+1)] + f_tmp[i*N_y + (j-1)]) - dxdxdydy*g[i*N_y + j])/dxdx_pluss_dydy_2; diff += f[i*N_y + j] - f_tmp[i*N_y + j]; } } //std::cout << diff << std::endl; iter++; } if (fabs(diff) > eps){ //std::cout << "Did not reach satisfactory convergence!" << std::endl; } free_array_1D(f_tmp); } /* Function that implements the iterative Jacobi algorithm for solving the 2D Poisson equation * * d^2f/dx^2 + d^f/dy^2 = g * * with source function g(x,y) and periodic boundary conditions * * f(0,y) = f(1,y) * f(x,0) = f(x,1) * * using num_iter number of iterations for convergence at each of the (N_x, N_y) spatial points. */ void poisson_jacobi_periodic(double* g, double dx, double dy, int N_x, int N_y, int max_iter, double* f){ double dxdx = dx*dx; double dydy = dy*dy; double dxdxdydy = dxdx*dydy; double dxdx_pluss_dydy_2 = 2*(dxdx + dydy); int iter = 0; double diff = 1.0E+20; // To check for convergence double eps = 1.0E-6; // Tolerance for convergence double* f_tmp; // To temporary hold solution for each iteration alloc_array_1D(f_tmp, N_x*N_y); /* Iterate until satisafactory convergence is reached (or max iter is reached). */ while (iter <= max_iter && fabs(diff) > eps){ diff = 0.0; for (int i = 0; i < N_x; i++){ for (int j = 0; j < N_y; j++){ f_tmp[i*N_y + j] = f[i*N_y + j]; // Need previous "solution" } } /* Do one sweep over the array step each point closer to the solution. */ for (int i = 0; i < N_x; i++){ for (int j = 0; j < N_y; j++){ /* Corner: x = 0, y = 0. */ if (i == 0 && j == 0){ f[0*N_y + 0] = (dydy*(f_tmp[1*N_y + 0] + f_tmp[(N_x-2)*N_y + 0]) + dxdx*(f_tmp[0*N_y + 1] + f_tmp[0*N_y + N_y-2]) - dxdxdydy*g[0*N_y + 0])/dxdx_pluss_dydy_2; } /* Corner: x = 1, y = 0. */ else if (i == N_x-1 && j == 0){ f[(N_x-1)*N_y + 0] = (dydy*(f_tmp[1*N_y + 0] + f_tmp[(N_x-2)*N_y + 0]) + dxdx*(f_tmp[(N_x-1)*N_y + 1] + f_tmp[(N_x-1)*N_y + (N_y-2)]) - dxdxdydy*g[(N_x-1)*N_y + 0])/dxdx_pluss_dydy_2; } /* Corner: x = 0, y = 1. */ else if (i == 0 && j == N_y-1){ f[0*N_y + (N_y-1)] = (dydy*(f_tmp[1*N_y + (N_y-1)] + f_tmp[(N_x-2)*N_y + (N_y-1)]) + dxdx*(f_tmp[0*N_y + 1] + f_tmp[0*N_y + (N_y-2)]) - dxdxdydy*g[0*N_y + (N_y-1)])/dxdx_pluss_dydy_2; } /* Corner: x = 1, y = 1. */ else if (i == N_x-1 && j == N_y-1){ f[(N_x-1)*N_y + (N_y-1)] = (dydy*(f_tmp[1*N_y + (N_y-1)] + f_tmp[(N_x-2)*N_y + (N_y-1)]) + dxdx*(f_tmp[(N_x-1)*N_y + 1] + f_tmp[(N_x-1)*N_y + N_y-2]) - dxdxdydy*g[(N_x-1)*N_y + (N_y-1)])/dxdx_pluss_dydy_2; } /* Wall: x = 0, y. */ else if (i == 0 && j != 0 && j != N_y-1){ f[0*N_y + j] = (dydy*(f_tmp[1*N_y + j] + f_tmp[(N_x-2)*N_y + j]) + dxdx*(f_tmp[0*N_y + (j+1)] + f_tmp[0*N_y + (j-1)]) - dxdxdydy*g[0*N_y + j])/dxdx_pluss_dydy_2; } /* Wall: x = 1, y. */ else if (i == N_x-1 && j != 0 && j != N_y-1){ f[(N_x-1)*N_y + j] = (dydy*(f_tmp[1*N_y + j] + f_tmp[(N_x-2)*N_y + j]) + dxdx*(f_tmp[(N_x-1)*N_y + (j+1)] + f_tmp[(N_x-1)*N_y + (j-1)]) - dxdxdydy*g[(N_x-1)*N_y + j])/dxdx_pluss_dydy_2; } /* Wall: x, y = 0. */ else if (j == 0 && i != 0 && i != N_x-1){ f[i*N_y + 0] = (dydy*(f_tmp[(i+1)*N_y + 0] + f_tmp[(i-1)*N_y + 0]) + dxdx*(f_tmp[i*N_y + 1] + f_tmp[i*N_y + (N_y-2)]) - dxdxdydy*g[i*N_y + 0])/dxdx_pluss_dydy_2; } /* Wall: x, y = 1. */ else if (j == N_y-1 && i != 0 && i != N_x-1){ f[i*N_y + (N_y-1)] = (dydy*(f_tmp[(i+1)*N_y + (N_y-1)] + f_tmp[(i-1)*N_y + N_y-1]) + dxdx*(f_tmp[i*N_y + 1] + f_tmp[i*N_y + (N_y-2)]) - dxdxdydy*g[i*N_y + (N_y-1)])/dxdx_pluss_dydy_2; } /* Interior: x, y. */ else { f[i*N_y + j] = (dydy*(f_tmp[(i+1)*N_y + j] + f_tmp[(i-1)*N_y + j]) + dxdx*(f_tmp[i*N_y + (j+1)] + f_tmp[i*N_y + (j-1)]) - dxdxdydy*g[i*N_y + j])/dxdx_pluss_dydy_2; } diff += f[i*N_y + j] - f_tmp[i*N_y + j]; } } //std::cout << diff << std::endl; iter++; } if (fabs(diff) > eps){ //std::cout << "Did not reach satisfactory convergence!" << std::endl; } free_array_1D(f_tmp); }
0bc3a1a132221ca50a09abf9de242d8a72e9fe31
8d38010bfece4490f9ad29f6868a55faa9a70751
/src/sequencer_src/interface/components/field/ParameterField.h
b3dc3302146cd4dafd67c1424d0cfcbd025e31c0
[ "Unlicense" ]
permissive
pigatron-industries/xen_sequence
3bfd8908051a37ac0fc76c375fa988f03d92618e
0deb8d066b1476a7bd72d83efe3534dd0ab9fbf1
refs/heads/master
2023-06-10T02:51:33.854274
2021-06-24T19:15:23
2021-06-24T19:15:23
267,106,418
0
0
Unlicense
2021-03-27T14:58:01
2020-05-26T17:20:49
C++
UTF-8
C++
false
false
1,167
h
ParameterField.h
#ifndef ParameterField_h #define ParameterField_h #include "ParameterFieldListener.h" #include "lib/drivers/Display.h" #include "../Component.h" #define FIELD_HEIGHT 11 #define TEXT_HEIGHT 7 #define FIELD_NAME_WIDTH 48 #define FIELD_VALUE_WIDTH 80 #define FIELD_WIDTH 128 // TODO get max width of display #define VALUE_COLOUR Colour::YELLOW #define SELECTED_COLOUR Colour::ORANGE class ParameterField : public Component { public: enum SelectMode { FIELD, VALUE }; static SelectMode selectMode; ParameterField(const char* _name); virtual void increment(int16_t amount) = 0; virtual void decrement(int16_t amount) = 0; virtual void changeSelectMode(); virtual void render(GraphicsContext& graphicsContext); void setListener(ParameterFieldListener* listener) { this->listener = listener; } void setSelected(bool _selected) { selected = _selected; dirtyValue = true; } void setDirty() { dirtyLabel = true; dirtyValue = true; } protected: const char* name; bool selected = false; bool dirtyLabel = true; bool dirtyValue = true; ParameterFieldListener* listener = NULL; }; #endif
efe9f661723018c04ede52adeec02a4c81201202
d2b40f79fd3825076815df8d8386bd71e283edd5
/swarm/pid.ino
4dd4e904261d2475b77fd4ab5fdb8d472d8a35f7
[]
no_license
amanchandra333/swarm_embedded
17d752555ba26b384dab4966b32d3a87cccf571f
0276560a6d16e1d234b1cc9ded495294319cdc33
refs/heads/master
2021-01-23T00:07:26.640044
2017-05-24T15:20:29
2017-05-24T15:20:29
85,702,426
0
2
null
2017-03-21T13:01:56
2017-03-21T13:01:56
null
UTF-8
C++
false
false
647
ino
pid.ino
const double kpA=1000; const double kiA=22; const double kdA=1.3; const double kpB=1000; const double kiB=22; const double kdB=1.3; void pwm_pid(){ errorA = set_rpmA - curr_rpmA; IA+=errorA; double x = 0; if((kpA*errorA + kiA*IA + kdA*(errorA-preverrorA))<0) x = 0; else x = (kpA*errorA + kiA*IA + kdA*(errorA-preverrorA)); PWMA=map(x, 0, max_rpmA*kpA, 0, 255); preverrorA=errorA; double y = 0; errorB = set_rpmB - curr_rpmB; IB+=errorB; if((kpB*errorB + kiB*IB + kdB*(errorB-preverrorB))<0) y = 0; else y = (kpB*errorB + kiB*IB + kdB*(errorB-preverrorB)); PWMB=map(y, 0, max_rpmB*kpB, 0, 255); preverrorB=errorB; }