hexsha
stringlengths 40
40
| size
int64 7
1.05M
| ext
stringclasses 13
values | lang
stringclasses 1
value | max_stars_repo_path
stringlengths 4
269
| max_stars_repo_name
stringlengths 5
109
| max_stars_repo_head_hexsha
stringlengths 40
40
| max_stars_repo_licenses
listlengths 1
9
| max_stars_count
int64 1
191k
⌀ | max_stars_repo_stars_event_min_datetime
stringlengths 24
24
⌀ | max_stars_repo_stars_event_max_datetime
stringlengths 24
24
⌀ | max_issues_repo_path
stringlengths 4
269
| max_issues_repo_name
stringlengths 5
116
| max_issues_repo_head_hexsha
stringlengths 40
40
| max_issues_repo_licenses
listlengths 1
9
| max_issues_count
int64 1
48.5k
⌀ | max_issues_repo_issues_event_min_datetime
stringlengths 24
24
⌀ | max_issues_repo_issues_event_max_datetime
stringlengths 24
24
⌀ | max_forks_repo_path
stringlengths 4
269
| max_forks_repo_name
stringlengths 5
116
| max_forks_repo_head_hexsha
stringlengths 40
40
| max_forks_repo_licenses
listlengths 1
9
| max_forks_count
int64 1
105k
⌀ | max_forks_repo_forks_event_min_datetime
stringlengths 24
24
⌀ | max_forks_repo_forks_event_max_datetime
stringlengths 24
24
⌀ | content
stringlengths 7
1.05M
| avg_line_length
float64 1.21
330k
| max_line_length
int64 6
990k
| alphanum_fraction
float64 0.01
0.99
| author_id
stringlengths 2
40
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aae0cb37ec13ed23db0eda82896fe2487f52025a
| 508
|
cpp
|
C++
|
honours_project/main.cpp
|
alexbarker/soc10101_honours_project
|
c29c10f0e5d7bed50819c948f841dd97e7d68809
|
[
"MIT"
] | null | null | null |
honours_project/main.cpp
|
alexbarker/soc10101_honours_project
|
c29c10f0e5d7bed50819c948f841dd97e7d68809
|
[
"MIT"
] | null | null | null |
honours_project/main.cpp
|
alexbarker/soc10101_honours_project
|
c29c10f0e5d7bed50819c948f841dd97e7d68809
|
[
"MIT"
] | null | null | null |
#include "engine.h"
#include "app.h"
#include "scenes/scene_splash.h"
#include <SFML/Audio.hpp>
// SOC10101 - Honours Project (40 Credits)
// Snake Prototype 3
// Version 0.x.x
// Alexander Barker
// 40333139
// Last Updated on 19th March 2019
// main.cpp - This file is used to start the engine with predefined size and name.
using namespace std;
SplashScene splash;
MenuScene menu;
SettingsScene settings;
TutorialScene tutorial;
int main() {
Engine::Start(1504, 846, "Honours Project", &splash);
}
| 20.32
| 82
| 0.730315
|
alexbarker
|
aae28e821c18fa9345b0ea45a42436cc109d76cf
| 3,517
|
cpp
|
C++
|
tests/array/test_array_single_index_operator.cpp
|
BenKoehler/ndcontainer
|
07cda63f8193425d4e6654eb72fd003a55ebf434
|
[
"MIT"
] | null | null | null |
tests/array/test_array_single_index_operator.cpp
|
BenKoehler/ndcontainer
|
07cda63f8193425d4e6654eb72fd003a55ebf434
|
[
"MIT"
] | null | null | null |
tests/array/test_array_single_index_operator.cpp
|
BenKoehler/ndcontainer
|
07cda63f8193425d4e6654eb72fd003a55ebf434
|
[
"MIT"
] | null | null | null |
/*
* MIT License
*
* Copyright (c) 2018-2020 Benjamin Köhler
*
* 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 "common.h"
#include "nd/array.h"
TEST(nd_array, single_index_operator)
{
{
constexpr nd::array<int, 3, 2, 1> a{0, 1, 2, 3, 4, 5};
for (std::size_t i = 0; i < a.num_values(); ++i)
{ EXPECT_EQ(a[i], i); }
}
{
constexpr nd::array<int, 5, 3, 1> a{4, 5, 3, 7, 8, 4, 7, 8, 4, 3, 5, 7, 2, 1, 4};
EXPECT_EQ(a[0], 4);
EXPECT_EQ(a[0], a.at_list<0>());
EXPECT_EQ(a[0], a.at_list(0));
EXPECT_EQ(a[1], 5);
EXPECT_EQ(a[1], a.at_list<1>());
EXPECT_EQ(a[1], a.at_list(1));
EXPECT_EQ(a[2], 3);
EXPECT_EQ(a[2], a.at_list<2>());
EXPECT_EQ(a[2], a.at_list(2));
EXPECT_EQ(a[3], 7);
EXPECT_EQ(a[3], a.at_list<3>());
EXPECT_EQ(a[3], a.at_list(3));
EXPECT_EQ(a[4], 8);
EXPECT_EQ(a[4], a.at_list<4>());
EXPECT_EQ(a[4], a.at_list(4));
EXPECT_EQ(a[5], 4);
EXPECT_EQ(a[5], a.at_list<5>());
EXPECT_EQ(a[5], a.at_list(5));
EXPECT_EQ(a[6], 7);
EXPECT_EQ(a[6], a.at_list<6>());
EXPECT_EQ(a[6], a.at_list(6));
EXPECT_EQ(a[7], 8);
EXPECT_EQ(a[7], a.at_list<7>());
EXPECT_EQ(a[7], a.at_list(7));
EXPECT_EQ(a[8], 4);
EXPECT_EQ(a[8], a.at_list<8>());
EXPECT_EQ(a[8], a.at_list(8));
EXPECT_EQ(a[9], 3);
EXPECT_EQ(a[9], a.at_list<9>());
EXPECT_EQ(a[9], a.at_list(9));
EXPECT_EQ(a[10], 5);
EXPECT_EQ(a[10], a.at_list<10>());
EXPECT_EQ(a[10], a.at_list(10));
EXPECT_EQ(a[11], 7);
EXPECT_EQ(a[11], a.at_list<11>());
EXPECT_EQ(a[11], a.at_list(11));
EXPECT_EQ(a[12], 2);
EXPECT_EQ(a[12], a.at_list<12>());
EXPECT_EQ(a[12], a.at_list(12));
EXPECT_EQ(a[13], 1);
EXPECT_EQ(a[13], a.at_list<13>());
EXPECT_EQ(a[13], a.at_list(13));
EXPECT_EQ(a[14], 4);
EXPECT_EQ(a[14], a.at_list<14>());
EXPECT_EQ(a[14], a.at_list(14));
}
{
nd::array<int, 2, 1> a{0, 1};
#ifdef ND_DEBUG
EXPECT_DEATH(a[2] = 0, "");
#endif
EXPECT_ANY_THROW(a.at_list(2) = 0);
EXPECT_EQ(a.at_list<0>(), 0);
EXPECT_EQ(a.at_list<1>(), 1);
a.at_list<0>() = 5;
a.at_list<1>() = 6;
EXPECT_EQ(a.at_list<0>(), 5);
EXPECT_EQ(a.at_list<1>(), 6);
}
}
| 36.257732
| 89
| 0.571794
|
BenKoehler
|
aae473c31447e2409e148edb1b2efd10e4ad59e2
| 3,629
|
hpp
|
C++
|
Opal Prospect/OpenGL/ArrayTextureAtlas.hpp
|
swbengs/OpalProspect
|
5f77dd07c1bb4197673589ac3f42546a4d0329b3
|
[
"MIT"
] | 2
|
2018-06-06T02:01:08.000Z
|
2020-07-25T18:10:32.000Z
|
Opal Prospect/OpenGL/ArrayTextureAtlas.hpp
|
swbengs/OpalProspect
|
5f77dd07c1bb4197673589ac3f42546a4d0329b3
|
[
"MIT"
] | 10
|
2018-07-27T01:56:45.000Z
|
2019-02-23T01:49:36.000Z
|
Opal Prospect/OpenGL/ArrayTextureAtlas.hpp
|
swbengs/OpalProspect
|
5f77dd07c1bb4197673589ac3f42546a4d0329b3
|
[
"MIT"
] | null | null | null |
#pragma once
//std lib includes
#include <string>
#include <vector>
//other includes
/*
MIT License
Copyright (c) 2018 Scott Bengs
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.
*/
/*
Class to load and store a texture that is array of textures. 256 max supported z depth with OpenGL 3.3. 4.0+ adds support for 1024 or more I believe. Also can load multiple files and combine them into a single array texture as long as they all
share the same individual size. Instead of a texture atlas, one big image that you divide with texture coordinates, you have lots of smaller textures of the same size. Such as 16x16px
*/
class ArrayTextureAtlas
{
public:
ArrayTextureAtlas();
void bind() const;
void unbind() const;
void createTexture(); //creates the id and loads the texture file the given filename
void destroy();
//gets
unsigned int getID() const;
std::string getFilename() const;
int getWidth() const;
int getHeight() const;
int getAtlasWidth() const;
int getAtlasHeight() const;
int getAtlasDepth() const;
size_t getAtlasCount() const;
//sets
void setTextureWidth(int width);
void setTextureHeight(int height);
void setFilename(std::string filename);
//loads the image and does everything but interact with opengl. Use this to test without having a context created
void testLoading(std::vector<unsigned char>& store_data);
private:
unsigned int id; //opengl ID to this texture
std::string name; //filename
std::vector<std::vector<unsigned char>> atlas_data; //this way we can have the images completely seperate. Each image is loaded into its own unsigned char vector we can access
//these two are given by file
int texture_width; //in pixels for each individual texture in the array
int texture_height;
//these 3 are calculated
int atlas_width; //atlas variables pertain to the count of textures in width and height
int atlas_height;
int atlas_depth;//in total layers. OpenGL 3.0 and above has 256 minimum. 4.0 and above has 2048 or more
void loadTexture(std::string filename, int& texture_width, int& texture_height, std::vector<std::vector<unsigned char>>& vector);
void flipVertical(int width, int height, std::vector<unsigned char>& vector);
void uploadTexture(int z_offset, void* data) const; //void pointers because we don't care what the data is. Just send it up byte by byte
void uploadCompleteTexture(int count, void* data) const;
void extractTexture(std::vector<unsigned char>& data, std::vector<unsigned char>& atlas, size_t start, int atlas_x, int atlas_y, int pixel_size) const;
};
| 41.712644
| 243
| 0.751171
|
swbengs
|
aaf75fdb1ea2ae1d25317dd54f71fe36a26d5ee8
| 9,991
|
cpp
|
C++
|
Battle.cpp
|
Ricecrackie/Fantasy-Battle
|
058dc323101d405e222e9c8f135500044ce6e180
|
[
"Apache-2.0"
] | null | null | null |
Battle.cpp
|
Ricecrackie/Fantasy-Battle
|
058dc323101d405e222e9c8f135500044ce6e180
|
[
"Apache-2.0"
] | null | null | null |
Battle.cpp
|
Ricecrackie/Fantasy-Battle
|
058dc323101d405e222e9c8f135500044ce6e180
|
[
"Apache-2.0"
] | null | null | null |
#include "Battle.h"
#include "Tower.h"
#include "Character/Boss.h"
#include "Character/StrongEnemy.h"
#include "Character/WeakEnemy.h"
#include <random>
#include "QRandomGenerator"
extern int random_number(const int&, const int&);
extern const int BossATK;
extern const int BossDEF;
extern const int StrongEnemyATK;
extern const int StrongEnemyDEF;
extern const int WeakEnemyATK;
extern const int WeakEnemyDEF;
// generates a random power up
int random_power_up(const int begin, const int end) {
std::random_device dev;
std::mt19937 rng(dev());
std::uniform_int_distribution<std::mt19937::result_type> dist6(begin,end);
return dist6(rng);
}
// call constructor to create a Battle Object by passing the player and enemy objects to the constructor
Battle::Battle(Character* player, Enemy** enemy) : player(player), playerOriginalATK(player->ATK), playerOriginalDEF(player->DEF) {
Player* play = dynamic_cast<Player*>(player);
int num_of_enemy = play->tower.get_floors()[play->tower.get_current_floor_index()].get_number_of_enemy();
this->enemy = enemy;
current_round = new Round();
}
// returns the character's status
std::string Battle::view_status(Character& chara) const {
return chara.info();
}
// returns the values called by the function
bool Battle::get_isPlayerWin() const {return isPlayerWin;}
bool Battle::get_isPlayerLose() const {return isPlayerLose;}
Round*& Battle::get_current_round() {return current_round;}
int Battle::get_round_counter() const {return round_counter;}
Enemy** Battle::get_enemy() const {return enemy;}
// Check if the player has defeated all the enemies or lost all their health
bool Battle::isSomebodyWin() {
Player* temp = dynamic_cast<Player*>(player);
if (player->HP == 0) {
isPlayerLose = true;
return true;
}
else if (temp->tower.get_floors()[temp->tower.get_current_floor_index()].get_enemy_HP() == 0) {
isPlayerWin = true;
return true;
}
else {
return false;
}
}
// Battle proceeds to the next round and outputs the actions done on each turn
void Battle::go_to_next_round() { // The winning condition is always checked.
player->AP = player->get_AP_max(); // Restore the AP of players & enemies.
Player* play = dynamic_cast<Player*>(player);
for (int i = 0; i < play->tower.get_floors()[play->tower.get_current_floor_index()].get_number_of_enemy(); ++i) {
enemy[i]->AP = enemy[i]->get_AP_max();
} //
for (int i = 0; i < action_effect.size(); ++i) { // Execute post-action effect of skills from previous rounds.
if (isSomebodyWin()) return;
if (action_effect[i]->skill != nullptr) {
std::string continuous_effect = action_effect[i]->skill->continuous_effect(action_effect[i]->receiver, action_effect[i]->doer);
if (continuous_effect != "") {cout << continuous_effect << endl;}
--action_effect_count[i];
}
} //
if (isSomebodyWin()) return;
cout << "Round " << round_counter << endl; // Execute and display actions in the current round's action list.
for (int j = 0; j < current_round->action_list.size(); ++j) {
if (isSomebodyWin()) return;
int isPowerup = QRandomGenerator::global()->bounded(4);
int PowerUp_index = QRandomGenerator::global()->bounded(1, 6);
if (isPowerup != 3) {
PowerUp_index = 0;
}
cout << current_round->action_doer_process(current_round->action_list[j], power_up[PowerUp_index]) << endl;
cout << current_round->action_receiver_process(current_round->action_list[j], power_up[PowerUp_index]) << endl;
if (current_round->action_list[j]->get_type() == Action::type::USE_A_SKILL) { // Add actions in action list to action effect list
if (action_effect.size() != 0) {
action_effect.push_back(current_round->action_list[j]);
action_effect_count.push_back(current_round->action_list[j]->get_skill()->rounds_of_effect);
}
else {
action_effect.resize(1);
action_effect[0] = current_round->action_list[j];
action_effect_count.resize(1);
action_effect_count[0] = current_round->action_list[j]->get_skill()->rounds_of_effect;
}
}
} //
if (isSomebodyWin()) return;
int i = 0;
while (i < action_effect.size()) { // Clear actions that finish all post-action effect execution from the action effect list
if (action_effect_count[i] == 0) {
std::string undo = action_effect[i]->get_skill()->undo_effect();
if (undo != "") {cout << undo << endl;}
delete action_effect[i];
action_effect.erase(action_effect.begin()+i);
action_effect_count.erase(action_effect_count.begin()+i);
continue;
}
else {
++i;
continue;
}
}
delete current_round;
current_round = new Round;
player->AP = player->get_AP_max();
round_counter++;
}
// sets the status of Win or Lose
void Battle::setIsPlayerWin(bool isPlayerWin) {this->isPlayerWin = isPlayerWin;}
void Battle::setIsPlayerLose(bool isPlayerLose) {this->isPlayerLose = isPlayerLose;}
// returns the player pointer
Character* Battle::get_player() const{return player;}
// To determine whether the enemy would use buff skills like Strengthen or Defence. The chances are 20% (1/5).
bool useBuffSkill() {
int temp = QRandomGenerator::global()->bounded(1, 6);
if (temp == 1) return true;
else return false;
}
// checks if the Enemy has enough MP to use the skill
bool Battle::isEnemyMPenough(Enemy* enemy, Skill* skill) {
if (enemy->MP >= skill->get_MP_cost()) return true;
else return false;
}
// generates a random action by the enemy
Action* Battle::enemy_random_action(Enemy* enemy) {
int WeakEnemyBuffSkillIndices = 1;
int WeakEnemyAttackSkillIndices = 0;
int StrongEnemyBuffSkillIndices[2] = {1, 2};
int StrongEnemyAttackSkillIndices[2] = {0, 3};
int BossBuffSkillIndices[4] = {1, 2, 7, 8};
int BossAttackSkillIndices[5] = {0, 3, 4, 5, 6};
int pick;
while (true) {
switch (enemy->get_type()) {
case Enemy::enemy_type::WeakEnemy:
if (useBuffSkill()) {
if (isEnemyMPenough(enemy, enemy->learned_skill[WeakEnemyBuffSkillIndices]))
return new Action(enemy, enemy, enemy->learned_skill[WeakEnemyBuffSkillIndices]);
else break;
}
else {
return new Action(enemy, player, enemy->learned_skill[WeakEnemyAttackSkillIndices]);
}
case Enemy::enemy_type::StrongEnemy:
if (useBuffSkill()) {
pick = QRandomGenerator::global()->bounded(2);
if (isEnemyMPenough(enemy, enemy->learned_skill[StrongEnemyBuffSkillIndices[pick]]))
return new Action(enemy, enemy, enemy->learned_skill[StrongEnemyBuffSkillIndices[pick]]);
else break;
}
else {
pick = QRandomGenerator::global()->bounded(2);
if (isEnemyMPenough(enemy, enemy->learned_skill[StrongEnemyAttackSkillIndices[pick]]))
return new Action(enemy, player, enemy->learned_skill[StrongEnemyAttackSkillIndices[pick]]);
else break;
}
case Enemy::enemy_type::Boss:
if (useBuffSkill()) {
pick = QRandomGenerator::global()->bounded(4);
if (isEnemyMPenough(enemy, enemy->learned_skill[BossBuffSkillIndices[pick]]))
return new Action(enemy, enemy, enemy->learned_skill[BossBuffSkillIndices[pick]]);
else break;
}
else {
pick = QRandomGenerator::global()->bounded(5);
if (isEnemyMPenough(enemy, enemy->learned_skill[BossAttackSkillIndices[pick]]))
return new Action (enemy, player, enemy->learned_skill[BossAttackSkillIndices[pick]]);
else break;
}
}
}
}
// generates the list of actions of the enemy
void Battle::generate_enemy_actionlist() {
Enemy** enemies = dynamic_cast<Player*>(player)->tower.get_floors()[dynamic_cast<Player*>(player)->tower.get_current_floor_index()].get_enemy();
for (int i = 0; i < dynamic_cast<Player*>(player)->tower.get_floors()[dynamic_cast<Player*>(player)->tower.get_current_floor_index()].get_number_of_enemy(); ++i) {
if (enemies[i]->HP == 0) continue;
Action* action = enemy_random_action(enemies[i]);
if (current_round->action_list.size() == 0) {
current_round->action_list.resize(1);
current_round->action_list[0] = action;
}
else {
current_round->action_list.push_back(action);
}
}
}
// destructor of Battle Object, deallocates the memory of current round and resets the values
Battle::~Battle() {
player->ATK = playerOriginalATK;
player->DEF = playerOriginalDEF;
Player* play = dynamic_cast<Player*>(player);
for (int i = 0; i < play->tower.get_floors()[play->tower.get_current_floor_index()].get_number_of_enemy(); ++i) {
int ATK; int DEF;
switch(static_cast<int>(play->tower.get_floors()[play->tower.get_current_floor_index()].get_enemy()[i]->get_type())) {
case 1: ATK = WeakEnemyATK; DEF = WeakEnemyDEF; break;
case 2: ATK = StrongEnemyATK; DEF = StrongEnemyDEF; break;
case 3: ATK = BossATK; DEF = BossDEF; break;
}
play->tower.get_floors()[play->tower.get_current_floor_index()].get_enemy()[i]->ATK = ATK;
play->tower.get_floors()[play->tower.get_current_floor_index()].get_enemy()[i]->DEF = DEF;
}
delete current_round;
}
| 44.404444
| 167
| 0.635172
|
Ricecrackie
|
aafccea20f3d3ed3259de1bdc59dfce3e7078bba
| 2,041
|
cpp
|
C++
|
test/test_ekf.cpp
|
Amit10311/robot_localization
|
7a2219c0579cfcad27fb59f1a7650bdc26f8ff72
|
[
"BSD-3-Clause"
] | null | null | null |
test/test_ekf.cpp
|
Amit10311/robot_localization
|
7a2219c0579cfcad27fb59f1a7650bdc26f8ff72
|
[
"BSD-3-Clause"
] | null | null | null |
test/test_ekf.cpp
|
Amit10311/robot_localization
|
7a2219c0579cfcad27fb59f1a7650bdc26f8ff72
|
[
"BSD-3-Clause"
] | null | null | null |
#include "robot_localization/ekf.h"
#include <gtest/gtest.h>
TEST (EkfTest, Measurements)
{
RobotLocalization::Ekf ekf;
Eigen::VectorXd measurement(12);
for(size_t i = 0; i < 12; ++i)
{
measurement[i] = i;
}
Eigen::MatrixXd measurementCovariance(12, 12);
for(size_t i = 0; i < 12; ++i)
{
measurementCovariance(i, i) = 0.5;
}
std::vector<int> updateVector(12, true);
// Ensure that measurements are being placed in the queue correctly
ekf.enqueueMeasurement("odom0",
measurement,
measurementCovariance,
updateVector,
1000);
std::map<std::string, Eigen::VectorXd> postUpdateStates;
ekf.integrateMeasurements(1001,
postUpdateStates);
EXPECT_EQ(ekf.getState(), measurement);
EXPECT_EQ(ekf.getEstimateErrorCovariance(), measurementCovariance);
// Now fuse another measurement and check the output.
// We know what the filter's state should be when
// this is complete, so we'll check the difference and
// make sure it's suitably small.
Eigen::VectorXd measurement2 = measurement;
measurement2 *= 2.0;
ekf.enqueueMeasurement("odom0",
measurement,
measurementCovariance,
updateVector,
1002);
ekf.integrateMeasurements(1003,
postUpdateStates);
measurement[0] = -2.8975;
measurement[1] = -0.42068;
measurement[2] = 5.5751;
measurement[3] = 2.7582;
measurement[4] = -2.0858;
measurement[5] = -2.0859;
measurement[6] = 3.7596;
measurement[7] = 4.3694;
measurement[8] = 5.1206;
measurement[9] = 9.2408;
measurement[10] = 9.8034;
measurement[11] = 11.796;
measurement = measurement.eval() - ekf.getState();
for(size_t i = 0; i < 12; ++i)
{
EXPECT_LT(::fabs(measurement[i]), 0.001);
}
}
int main(int argc, char **argv)
{
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
| 25.197531
| 69
| 0.603626
|
Amit10311
|
c90577a0fb4c50e8650c8032cb1cf8a08e936173
| 6,285
|
cpp
|
C++
|
Chapter_14/src/Gui.cpp
|
9ndres/Ray-Tracing-Gems-II
|
5fef3b49375c823431ef06f8c67d1b44b432304a
|
[
"MIT"
] | 603
|
2021-08-04T11:46:33.000Z
|
2022-03-28T12:12:31.000Z
|
Chapter_14/src/Gui.cpp
|
9ndres/Ray-Tracing-Gems-II
|
5fef3b49375c823431ef06f8c67d1b44b432304a
|
[
"MIT"
] | 4
|
2021-07-09T09:00:43.000Z
|
2021-07-20T09:44:54.000Z
|
Chapter_14/src/Gui.cpp
|
9ndres/Ray-Tracing-Gems-II
|
5fef3b49375c823431ef06f8c67d1b44b432304a
|
[
"MIT"
] | 45
|
2021-08-04T18:57:37.000Z
|
2022-03-11T11:33:49.000Z
|
/* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of NVIDIA CORPORATION nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "Gui.h"
#include "imgui/imgui.h"
#include "imgui/imgui_impl_win32.h"
#include "imgui/imgui_impl_dx12.h"
IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
void Gui::Init(D3D12Global &d3d, HWND window) {
IMGUI_CHECKVERSION();
ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO(); (void)io;
ImGui::StyleColorsDark();
{
D3D12_DESCRIPTOR_HEAP_DESC desc = {};
desc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV;
desc.NumDescriptors = 1;
desc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE;
if (d3d.device->CreateDescriptorHeap(&desc, IID_PPV_ARGS(&g_pd3dSrvDescHeap)) != S_OK)
return;
}
// Setup Platform/Renderer bindings
ImGui_ImplWin32_Init((void*)window);
ImGui_ImplDX12_Init(d3d.device, NUM_FRAMES_IN_FLIGHT,
DXGI_FORMAT_R8G8B8A8_UNORM, g_pd3dSrvDescHeap,
g_pd3dSrvDescHeap->GetCPUDescriptorHandleForHeapStart(),
g_pd3dSrvDescHeap->GetGPUDescriptorHandleForHeapStart());
}
void Gui::Update(D3D12Global& d3d, float elapsedTime)
{
if (!d3d.renderGui) return;
// Start the Dear ImGui frame
ImGui_ImplDX12_NewFrame();
ImGui_ImplWin32_NewFrame();
ImGui::NewFrame();
// Size the debug window based on the application height
ImGui::SetNextWindowSize(ImVec2(ImGui::GetWindowWidth() * dpiScaling, d3d.height - 40.f));
ImGui::Begin("Path Tracer", NULL, ImGuiWindowFlags_AlwaysAutoResize);
// We must select font scale inside of Begin/End
ImGui::SetWindowFontScale(dpiScaling);
Text("Frame Time: %.02fms", elapsedTime);
}
void Gui::Render(D3D12Global &d3d, D3D12Resources &resources) {
if (!d3d.renderGui) return;
ImGui::End();
UINT backBufferIdx = d3d.swapChain->GetCurrentBackBufferIndex();
d3d.cmdAlloc[d3d.frameIndex]->Reset();
D3D12_RESOURCE_BARRIER barrier = {};
barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
barrier.Transition.pResource = d3d.backBuffer[d3d.frameIndex];
barrier.Transition.Subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES;
barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_PRESENT;
barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_RENDER_TARGET;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
D3D12_CPU_DESCRIPTOR_HANDLE renderTargetViewHandle = resources.rtvHeap->GetCPUDescriptorHandleForHeapStart();
UINT renderTargetViewDescriptorSize = resources.rtvDescSize;
renderTargetViewHandle.ptr += (SIZE_T(renderTargetViewDescriptorSize) * d3d.frameIndex);
d3d.cmdList->Reset(d3d.cmdAlloc[d3d.frameIndex], NULL);
d3d.cmdList->ResourceBarrier(1, &barrier);
d3d.cmdList->OMSetRenderTargets(1, &renderTargetViewHandle, FALSE, NULL);
d3d.cmdList->SetDescriptorHeaps(1, &g_pd3dSrvDescHeap);
ImGui::Render();
ImGui_ImplDX12_RenderDrawData(ImGui::GetDrawData(), d3d.cmdList);
barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_RENDER_TARGET;
barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_PRESENT;
d3d.cmdList->ResourceBarrier(1, &barrier);
d3d.cmdList->Close();
d3d.cmdQueue->ExecuteCommandLists(1, (ID3D12CommandList* const*)&d3d.cmdList);
}
void Gui::SetDpiScaling(float newDpiScaling) {
dpiScaling = newDpiScaling;
}
bool Gui::CallWndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
return ImGui_ImplWin32_WndProcHandler(hWnd, msg, wParam, lParam);
}
bool Gui::WantCaptureMouse()
{
ImGuiIO& io = ImGui::GetIO();
return io.WantCaptureMouse;
}
void Gui::Text(const char* text) {
ImGui::Text(text);
}
void Gui::Text(const char* text, double x) {
ImGui::Text(text, x);
}
bool Gui::SliderFloat(const char* label, float* v, float min, float max) {
return ImGui::SliderFloat(label, v, min, max);
}
bool Gui::SliderInt(const char* label, int* v, int min, int max) {
return ImGui::SliderInt(label, v, min, max);
}
bool Gui::DragInt(const char* label, int* v, int min, int max) {
return ImGui::DragInt(label, v, 1, min, max);
}
bool Gui::DragFloat(const char* label, float* v, float min, float max) {
return ImGui::DragFloat(label, v, (max - min) * 0.01f, min, max);
}
bool Gui::Combo(const char* label, int* currentItem, const char* options) {
return ImGui::Combo(label, currentItem, options);
}
bool Gui::Button(const char* label, float width, float height)
{
return ImGui::Button(label, ImVec2(width * dpiScaling, height * dpiScaling));
}
bool Gui::Checkbox(const char* label, bool* v) {
return ImGui::Checkbox(label, v);
}
void Gui::Separator() {
ImGui::Separator();
}
void Gui::SameLine() {
ImGui::SameLine();
}
void Gui::Indent(float v) {
ImGui::Indent(v);
}
void Gui::Destroy() {
ImGui_ImplDX12_Shutdown();
ImGui_ImplWin32_Shutdown();
ImGui::DestroyContext();
g_pd3dSrvDescHeap->Release();
g_pd3dSrvDescHeap = nullptr;
}
| 33.790323
| 110
| 0.760223
|
9ndres
|
c90fe1fe059e66be2d19893cc552b95727357d11
| 6,428
|
cpp
|
C++
|
lib/targets/cuda/comm_target.cpp
|
Marcogarofalo/quda
|
7dd7ba316d5f872d1a332bdf55a2204a1a4a7dda
|
[
"MIT"
] | null | null | null |
lib/targets/cuda/comm_target.cpp
|
Marcogarofalo/quda
|
7dd7ba316d5f872d1a332bdf55a2204a1a4a7dda
|
[
"MIT"
] | null | null | null |
lib/targets/cuda/comm_target.cpp
|
Marcogarofalo/quda
|
7dd7ba316d5f872d1a332bdf55a2204a1a4a7dda
|
[
"MIT"
] | null | null | null |
#include <comm_quda.h>
#include <quda_api.h>
#include <quda_cuda_api.h>
#include <algorithm>
#include <shmem_helper.cuh>
#define CHECK_CUDA_ERROR(func) \
quda::target::cuda::set_runtime_error(func, #func, __func__, __FILE__, __STRINGIFY__(__LINE__));
bool comm_peer2peer_possible(int local_gpuid, int neighbor_gpuid)
{
int canAccessPeer[2];
CHECK_CUDA_ERROR(cudaDeviceCanAccessPeer(&canAccessPeer[0], local_gpuid, neighbor_gpuid));
CHECK_CUDA_ERROR(cudaDeviceCanAccessPeer(&canAccessPeer[1], neighbor_gpuid, local_gpuid));
// require symmetric peer-to-peer access to enable peer-to-peer
return canAccessPeer[0] && canAccessPeer[1];
}
int comm_peer2peer_performance(int local_gpuid, int neighbor_gpuid)
{
int accessRank[2] = {};
if (comm_peer2peer_possible(local_gpuid, neighbor_gpuid)) {
CHECK_CUDA_ERROR(
cudaDeviceGetP2PAttribute(&accessRank[0], cudaDevP2PAttrPerformanceRank, local_gpuid, neighbor_gpuid));
CHECK_CUDA_ERROR(
cudaDeviceGetP2PAttribute(&accessRank[1], cudaDevP2PAttrPerformanceRank, neighbor_gpuid, local_gpuid));
}
// return the slowest direction of access (lower is faster)
return std::max(accessRank[0], accessRank[1]);
}
void comm_create_neighbor_memory(void *remote[QUDA_MAX_DIM][2], void *local)
{
// handles for obtained ghost pointers
cudaIpcMemHandle_t remote_handle[2][QUDA_MAX_DIM];
#ifndef NVSHMEM_COMMS
for (int dim = 0; dim < 4; ++dim) {
if (comm_dim(dim) == 1) continue;
for (int dir = 0; dir < 2; ++dir) {
MsgHandle *sendHandle = nullptr;
MsgHandle *receiveHandle = nullptr;
int disp = (dir == 1) ? +1 : -1;
// first set up receive
if (comm_peer2peer_enabled(1 - dir, dim)) {
receiveHandle = comm_declare_receive_relative(&remote_handle[1 - dir][dim], dim, -disp, sizeof(remote_handle));
}
// now send
cudaIpcMemHandle_t local_handle;
if (comm_peer2peer_enabled(dir, dim)) {
CHECK_CUDA_ERROR(cudaIpcGetMemHandle(&local_handle, local));
sendHandle = comm_declare_send_relative(&local_handle, dim, disp, sizeof(local_handle));
}
if (receiveHandle) comm_start(receiveHandle);
if (sendHandle) comm_start(sendHandle);
if (receiveHandle) comm_wait(receiveHandle);
if (sendHandle) comm_wait(sendHandle);
if (sendHandle) comm_free(sendHandle);
if (receiveHandle) comm_free(receiveHandle);
}
}
#endif
// open the remote memory handles and set the send ghost pointers
for (int dim = 0; dim < 4; ++dim) {
#ifndef NVSHMEM_COMMS
// TODO: We maybe can force loopback comms to use the IB path here
if (comm_dim(dim) == 1) continue;
#endif
// even if comm_dim(2) == 2, we might not have p2p enabled in both directions, so check this
const int num_dir = (comm_dim(dim) == 2 && comm_peer2peer_enabled(0, dim) && comm_peer2peer_enabled(1, dim)) ? 1 : 2;
for (int dir = 0; dir < num_dir; dir++) {
remote[dim][dir] = nullptr;
#ifndef NVSHMEM_COMMS
if (!comm_peer2peer_enabled(dir, dim)) continue;
CHECK_CUDA_ERROR(cudaIpcOpenMemHandle(&remote[dim][dir], remote_handle[dir][dim], cudaIpcMemLazyEnablePeerAccess));
#else
remote[dim][dir] = nvshmem_ptr(static_cast<char *>(local), comm_neighbor_rank(dir, dim));
#endif
}
if (num_dir == 1) remote[dim][1] = remote[dim][0];
}
}
#ifndef NVSHMEM_COMMS
void comm_destroy_neighbor_memory(void *remote[QUDA_MAX_DIM][2])
{
for (int dim = 0; dim < 4; ++dim) {
if (comm_dim(dim) == 1) continue;
const int num_dir = (comm_dim(dim) == 2 && comm_peer2peer_enabled(0, dim) && comm_peer2peer_enabled(1, dim)) ? 1 : 2;
if (comm_peer2peer_enabled(1, dim)) {
// only close this handle if it doesn't alias the back ghost
if (num_dir == 2 && remote[dim][1]) CHECK_CUDA_ERROR(cudaIpcCloseMemHandle(remote[dim][1]));
}
if (comm_peer2peer_enabled(0, dim)) {
if (remote[dim][0]) CHECK_CUDA_ERROR(cudaIpcCloseMemHandle(remote[dim][0]));
}
} // iterate over dim
}
#else
void comm_destroy_neighbor_memory(void *[QUDA_MAX_DIM][2]) { }
#endif
void comm_create_neighbor_event(qudaEvent_t remote[2][QUDA_MAX_DIM], qudaEvent_t local[2][QUDA_MAX_DIM])
{
// handles for obtained events
cudaIpcEventHandle_t ipcRemoteEventHandle[2][QUDA_MAX_DIM];
for (int dim = 0; dim < 4; ++dim) {
if (comm_dim(dim) == 1) continue;
for (int dir = 0; dir < 2; ++dir) {
MsgHandle *sendHandle = nullptr;
MsgHandle *receiveHandle = nullptr;
int disp = (dir == 1) ? +1 : -1;
// first set up receive
if (comm_peer2peer_enabled(1 - dir, dim)) {
receiveHandle = comm_declare_receive_relative(&ipcRemoteEventHandle[1 - dir][dim], dim, -disp,
sizeof(ipcRemoteEventHandle[1 - dir][dim]));
}
cudaIpcEventHandle_t handle;
// now send
if (comm_peer2peer_enabled(dir, dim)) {
cudaEvent_t event;
CHECK_CUDA_ERROR(cudaEventCreate(&event, cudaEventDisableTiming | cudaEventInterprocess));
local[dir][dim].event = reinterpret_cast<void *>(event);
CHECK_CUDA_ERROR(cudaIpcGetEventHandle(&handle, event));
sendHandle = comm_declare_send_relative(&handle, dim, disp, sizeof(handle));
}
if (receiveHandle) comm_start(receiveHandle);
if (sendHandle) comm_start(sendHandle);
if (receiveHandle) comm_wait(receiveHandle);
if (sendHandle) comm_wait(sendHandle);
if (sendHandle) comm_free(sendHandle);
if (receiveHandle) comm_free(receiveHandle);
}
}
for (int dim = 0; dim < 4; ++dim) {
if (comm_dim(dim) == 1) continue;
for (int dir = 0; dir < 2; ++dir) {
if (!comm_peer2peer_enabled(dir, dim)) continue;
cudaEvent_t event;
CHECK_CUDA_ERROR(cudaIpcOpenEventHandle(&event, ipcRemoteEventHandle[dir][dim]));
remote[dir][dim].event = reinterpret_cast<void *>(event);
}
}
}
void comm_destroy_neighbor_event(qudaEvent_t[2][QUDA_MAX_DIM], qudaEvent_t local[2][QUDA_MAX_DIM])
{
for (int dim = 0; dim < 4; ++dim) {
if (comm_dim(dim) == 1) continue;
for (int dir = 0; dir < 2; dir++) {
cudaEvent_t &event = reinterpret_cast<cudaEvent_t &>(local[dir][dim].event);
if (comm_peer2peer_enabled(dir, dim)) CHECK_CUDA_ERROR(cudaEventDestroy(event));
}
} // iterate over dim
}
| 37.156069
| 121
| 0.671437
|
Marcogarofalo
|
c910eea999b17044cd9f674f2095ae6742803d40
| 682
|
cpp
|
C++
|
cards/WymianaKart.cpp
|
programistagd/TrachOnline
|
2acd9ffac0add87fd0f1824ae2b75132933496c7
|
[
"MIT"
] | 3
|
2016-06-07T11:55:23.000Z
|
2016-06-09T17:17:52.000Z
|
cards/WymianaKart.cpp
|
radeusgd/TrachOnline
|
2acd9ffac0add87fd0f1824ae2b75132933496c7
|
[
"MIT"
] | 25
|
2016-06-13T16:14:18.000Z
|
2017-07-29T08:12:23.000Z
|
cards/WymianaKart.cpp
|
radeusgd/TrachOnline
|
2acd9ffac0add87fd0f1824ae2b75132933496c7
|
[
"MIT"
] | null | null | null |
#include "cards/WymianaKart.hpp"
#include "GameServer.hpp"
using namespace Cards;
string WymianaKart::getName(){
return "wymiana_kart";
}
bool WymianaKart::canBePlayedAt(CardPtr card, GameServer* game){
if(card==nullptr) return true;
return false;
}
CardPtr WymianaKart::makeNew(){
return make_shared<WymianaKart>();
}
void WymianaKart::played(GameServer& game){
int to = WymianaKart::to.playerId;//TODO get rid of shadowing
for(auto c : game.players[to].hand) game.recycleCard(c);
game.players[to].hand.clear();
game.fillCards(game.players[to]);
}
bool WymianaKart::canBeTargetedAt(Target t){
if(t.cardId==-1) return true;
return false;
}
| 22.733333
| 65
| 0.71261
|
programistagd
|
c9114b64a479bbb8f2ae530ee6235965133f18e4
| 1,440
|
cpp
|
C++
|
cpp/MergekSortedLists.cpp
|
thinksource/code_interview
|
08be992240508b73894eaf6b8c025168fd19df19
|
[
"Apache-2.0"
] | 12
|
2015-03-12T03:27:26.000Z
|
2021-03-11T09:26:16.000Z
|
cpp/MergekSortedLists.cpp
|
thinksource/code_interview
|
08be992240508b73894eaf6b8c025168fd19df19
|
[
"Apache-2.0"
] | null | null | null |
cpp/MergekSortedLists.cpp
|
thinksource/code_interview
|
08be992240508b73894eaf6b8c025168fd19df19
|
[
"Apache-2.0"
] | 11
|
2015-01-28T16:45:40.000Z
|
2017-03-28T20:01:38.000Z
|
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
struct ListNodeWrapper{
ListNode* node;
int listIndex;
};
bool Compare(ListNodeWrapper lw1, ListNodeWrapper lw2)
{
return lw1.node->val > lw2.node->val;
}
class Solution {
public:
ListNode *mergeKLists(vector<ListNode *> &lists) {
priority_queue<ListNodeWrapper, vector<ListNodeWrapper>, function<bool(ListNodeWrapper, ListNodeWrapper)>> pq(Compare);
vector<int> indexes(lists.size());
for(int i=0;i<lists.size();i++) {
if(lists[i] == NULL) {
continue;
}
ListNodeWrapper lw;
lw.node = lists[i];
lw.listIndex = i;
pq.push(lw);
lists[i] = lists[i]->next;
}
ListNode *res = new ListNode(0);
ListNode *p = res;
while(!pq.empty()){
ListNodeWrapper lw= pq.top();
pq.pop();
p->next = lw.node;
p = p->next;
if(lists[lw.listIndex] !=NULL) {
ListNodeWrapper lw1;
lw1.node = lists[lw.listIndex];
lw1.listIndex = lw.listIndex;
pq.push(lw1);
lists[lw.listIndex] = lists[lw.listIndex]->next;
}
p->next = NULL;
}
return res->next;
}
};
| 26.666667
| 127
| 0.509722
|
thinksource
|
c913e129515426561924bec1f5f394858259527f
| 7,579
|
hpp
|
C++
|
include/GlobalNamespace/Levenshtein.hpp
|
RedBrumbler/virtuoso-codegen
|
e83f6f0f9b47bec4b6dd976b21edc1d46bf3cfe3
|
[
"Unlicense"
] | null | null | null |
include/GlobalNamespace/Levenshtein.hpp
|
RedBrumbler/virtuoso-codegen
|
e83f6f0f9b47bec4b6dd976b21edc1d46bf3cfe3
|
[
"Unlicense"
] | null | null | null |
include/GlobalNamespace/Levenshtein.hpp
|
RedBrumbler/virtuoso-codegen
|
e83f6f0f9b47bec4b6dd976b21edc1d46bf3cfe3
|
[
"Unlicense"
] | null | null | null |
// Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
#include "beatsaber-hook/shared/utils/byref.hpp"
// Including type: UnityEngine.MonoBehaviour
#include "UnityEngine/MonoBehaviour.hpp"
// Including type: System.Int32
#include "System/Int32.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils-methods.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils-properties.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils-fields.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
#include "beatsaber-hook/shared/utils/typedefs-array.hpp"
#include "beatsaber-hook/shared/utils/typedefs-string.hpp"
// Completed includes
// Begin forward declares
// Forward declaring namespace: GlobalNamespace
namespace GlobalNamespace {
// Forward declaring type: NGramGenerator
class NGramGenerator;
}
// Forward declaring namespace: UnityEngine::UI
namespace UnityEngine::UI {
// Forward declaring type: Text
class Text;
}
// Forward declaring namespace: System::Collections::Generic
namespace System::Collections::Generic {
// Forward declaring type: List`1<T>
template<typename T>
class List_1;
}
// Completed forward declares
// Type namespace:
namespace GlobalNamespace {
// Forward declaring type: Levenshtein
class Levenshtein;
}
#include "beatsaber-hook/shared/utils/il2cpp-type-check.hpp"
NEED_NO_BOX(::GlobalNamespace::Levenshtein);
DEFINE_IL2CPP_ARG_TYPE(::GlobalNamespace::Levenshtein*, "", "Levenshtein");
// Type namespace:
namespace GlobalNamespace {
// Size: 0x32
#pragma pack(push, 1)
// Autogenerated type: Levenshtein
// [TokenAttribute] Offset: FFFFFFFF
class Levenshtein : public ::UnityEngine::MonoBehaviour {
public:
// Nested type: ::GlobalNamespace::Levenshtein::LevenshteinDistance
class LevenshteinDistance;
// Nested type: ::GlobalNamespace::Levenshtein::$$c
class $$c;
#ifdef USE_CODEGEN_FIELDS
public:
#else
#ifdef CODEGEN_FIELD_ACCESSIBILITY
CODEGEN_FIELD_ACCESSIBILITY:
#else
protected:
#endif
#endif
// public NGramGenerator NGramHandler
// Size: 0x8
// Offset: 0x18
::GlobalNamespace::NGramGenerator* NGramHandler;
// Field size check
static_assert(sizeof(::GlobalNamespace::NGramGenerator*) == 0x8);
// public UnityEngine.UI.Text[] ButtonLabels
// Size: 0x8
// Offset: 0x20
::ArrayW<::UnityEngine::UI::Text*> ButtonLabels;
// Field size check
static_assert(sizeof(::ArrayW<::UnityEngine::UI::Text*>) == 0x8);
// private System.Collections.Generic.List`1<System.String> corpus
// Size: 0x8
// Offset: 0x28
::System::Collections::Generic::List_1<::StringW>* corpus;
// Field size check
static_assert(sizeof(::System::Collections::Generic::List_1<::StringW>*) == 0x8);
// private System.Boolean isUppercase
// Size: 0x1
// Offset: 0x30
bool isUppercase;
// Field size check
static_assert(sizeof(bool) == 0x1);
// private System.Boolean isFirstLetterUpper
// Size: 0x1
// Offset: 0x31
bool isFirstLetterUpper;
// Field size check
static_assert(sizeof(bool) == 0x1);
public:
// Deleting conversion operator: operator ::System::IntPtr
constexpr operator ::System::IntPtr() const noexcept = delete;
// static field const value: static private System.Int32 maxWordLength
static constexpr const int maxWordLength = 15;
// Get static field: static private System.Int32 maxWordLength
static int _get_maxWordLength();
// Set static field: static private System.Int32 maxWordLength
static void _set_maxWordLength(int value);
// static field const value: static private System.Int32 maxLevenshteinCost
static constexpr const int maxLevenshteinCost = 7;
// Get static field: static private System.Int32 maxLevenshteinCost
static int _get_maxLevenshteinCost();
// Set static field: static private System.Int32 maxLevenshteinCost
static void _set_maxLevenshteinCost(int value);
// static field const value: static private System.Int32 minLevenshteinCost
static constexpr const int minLevenshteinCost = 1;
// Get static field: static private System.Int32 minLevenshteinCost
static int _get_minLevenshteinCost();
// Set static field: static private System.Int32 minLevenshteinCost
static void _set_minLevenshteinCost(int value);
// Get instance field reference: public NGramGenerator NGramHandler
::GlobalNamespace::NGramGenerator*& dyn_NGramHandler();
// Get instance field reference: public UnityEngine.UI.Text[] ButtonLabels
::ArrayW<::UnityEngine::UI::Text*>& dyn_ButtonLabels();
// Get instance field reference: private System.Collections.Generic.List`1<System.String> corpus
::System::Collections::Generic::List_1<::StringW>*& dyn_corpus();
// Get instance field reference: private System.Boolean isUppercase
bool& dyn_isUppercase();
// Get instance field reference: private System.Boolean isFirstLetterUpper
bool& dyn_isFirstLetterUpper();
// private System.Void Start()
// Offset: 0x138C774
void Start();
// public System.Void RunAutoComplete(System.String input)
// Offset: 0x138C848
void RunAutoComplete(::StringW input);
// public System.Void .ctor()
// Offset: 0x138D034
// Implemented from: UnityEngine.MonoBehaviour
// Base method: System.Void MonoBehaviour::.ctor()
// Base method: System.Void Behaviour::.ctor()
// Base method: System.Void Component::.ctor()
// Base method: System.Void Object::.ctor()
// Base method: System.Void Object::.ctor()
template<::il2cpp_utils::CreationType creationType = ::il2cpp_utils::CreationType::Temporary>
static Levenshtein* New_ctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::GlobalNamespace::Levenshtein::.ctor");
return THROW_UNLESS((::il2cpp_utils::New<Levenshtein*, creationType>()));
}
}; // Levenshtein
#pragma pack(pop)
static check_size<sizeof(Levenshtein), 49 + sizeof(bool)> __GlobalNamespace_LevenshteinSizeCheck;
static_assert(sizeof(Levenshtein) == 0x32);
}
#include "beatsaber-hook/shared/utils/il2cpp-utils-methods.hpp"
// Writing MetadataGetter for method: GlobalNamespace::Levenshtein::Start
// Il2CppName: Start
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (GlobalNamespace::Levenshtein::*)()>(&GlobalNamespace::Levenshtein::Start)> {
static const MethodInfo* get() {
return ::il2cpp_utils::FindMethod(classof(GlobalNamespace::Levenshtein*), "Start", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{});
}
};
// Writing MetadataGetter for method: GlobalNamespace::Levenshtein::RunAutoComplete
// Il2CppName: RunAutoComplete
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (GlobalNamespace::Levenshtein::*)(::StringW)>(&GlobalNamespace::Levenshtein::RunAutoComplete)> {
static const MethodInfo* get() {
static auto* input = &::il2cpp_utils::GetClassFromName("System", "String")->byval_arg;
return ::il2cpp_utils::FindMethod(classof(GlobalNamespace::Levenshtein*), "RunAutoComplete", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{input});
}
};
// Writing MetadataGetter for method: GlobalNamespace::Levenshtein::New_ctor
// Il2CppName: .ctor
// Cannot get method pointer of value based method overload from template for constructor!
// Try using FindMethod instead!
| 43.809249
| 170
| 0.727537
|
RedBrumbler
|
c9157ede81b6c55289ae23dd53dd870006d85b88
| 385
|
hpp
|
C++
|
core/code/core/LanguageTypes.hpp
|
iboB/word-grid
|
d1029323d5c51499298f3ed19390928371cb70a6
|
[
"MIT"
] | 2
|
2019-07-01T00:10:43.000Z
|
2019-09-18T19:37:38.000Z
|
core/code/core/LanguageTypes.hpp
|
iboB/word-grid
|
d1029323d5c51499298f3ed19390928371cb70a6
|
[
"MIT"
] | null | null | null |
core/code/core/LanguageTypes.hpp
|
iboB/word-grid
|
d1029323d5c51499298f3ed19390928371cb70a6
|
[
"MIT"
] | 2
|
2019-07-17T17:44:16.000Z
|
2020-12-21T07:56:11.000Z
|
// word-grid
// Copyright (c) 2019-2021 Borislav Stanimirov
//
// Distributed under the MIT Software License
// See accompanying file LICENSE.txt or copy at
// https://opensource.org/licenses/MIT
//
#pragma once
#include "GridElement.hpp"
#include <vector>
namespace core
{
using Alphabet = std::vector<GridElement>;
using Specials = std::vector<GridElement>;
} // namespace core
| 18.333333
| 47
| 0.735065
|
iboB
|
c9217162272e6f713c48fdf56e5724b5dfc7ca21
| 227,750
|
cpp
|
C++
|
test/grapheme_iterator_05.cpp
|
jan-moeller/text
|
c61e51c82dfb0ae6e74200c01ce040fa6db730c4
|
[
"BSL-1.0"
] | null | null | null |
test/grapheme_iterator_05.cpp
|
jan-moeller/text
|
c61e51c82dfb0ae6e74200c01ce040fa6db730c4
|
[
"BSL-1.0"
] | null | null | null |
test/grapheme_iterator_05.cpp
|
jan-moeller/text
|
c61e51c82dfb0ae6e74200c01ce040fa6db730c4
|
[
"BSL-1.0"
] | null | null | null |
// Warning! This file is autogenerated.
#include <boost/text/grapheme_iterator.hpp>
#include <boost/text/utf8.hpp>
#include <gtest/gtest.h>
#include <algorithm>
TEST(grapheme, iterator_05_0_fwd)
{
// ÷ 0600 × 1F1E6 ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.2] REGIONAL INDICATOR SYMBOL LETTER A (RI) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x1F1E6 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_0_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x1F1E6 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_0_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x1F1E6 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_0_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x1F1E6 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_0_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0x1F1E6 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_1_fwd)
{
// ÷ 0600 × 0308 ÷ 1F1E6 ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] REGIONAL INDICATOR SYMBOL LETTER A (RI) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x0308, 0x1F1E6 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_1_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x0308, 0x1F1E6 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_1_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x0308, 0x1F1E6 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_1_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x0308, 0x1F1E6 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_1_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0x0308, 0x1F1E6 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(*it.base(), cps[2]);
EXPECT_EQ(*it->begin(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[2]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_2_fwd)
{
// ÷ 0600 × 0600 ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.2] ARABIC NUMBER SIGN (Prepend) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x0600 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_2_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x0600 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_2_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x0600 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_2_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x0600 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_2_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0x0600 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_3_fwd)
{
// ÷ 0600 × 0308 ÷ 0600 ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] ARABIC NUMBER SIGN (Prepend) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x0308, 0x0600 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_3_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x0308, 0x0600 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_3_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x0308, 0x0600 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_3_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x0308, 0x0600 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_3_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0x0308, 0x0600 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(*it.base(), cps[2]);
EXPECT_EQ(*it->begin(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[2]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_4_fwd)
{
// ÷ 0600 × 0903 ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x0903 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_4_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x0903 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_4_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x0903 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_4_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x0903 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_4_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0x0903 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_5_fwd)
{
// ÷ 0600 × 0308 × 0903 ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x0308, 0x0903 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_5_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x0308, 0x0903 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
}
}
TEST(grapheme, iterator_05_5_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x0308, 0x0903 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
}
}
TEST(grapheme, iterator_05_5_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x0308, 0x0903 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_5_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0x0308, 0x0903 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_6_fwd)
{
// ÷ 0600 × 1100 ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.2] HANGUL CHOSEONG KIYEOK (L) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x1100 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_6_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x1100 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_6_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x1100 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_6_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x1100 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_6_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0x1100 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_7_fwd)
{
// ÷ 0600 × 0308 ÷ 1100 ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] HANGUL CHOSEONG KIYEOK (L) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x0308, 0x1100 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_7_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x0308, 0x1100 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_7_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x0308, 0x1100 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_7_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x0308, 0x1100 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_7_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0x0308, 0x1100 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(*it.base(), cps[2]);
EXPECT_EQ(*it->begin(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[2]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_8_fwd)
{
// ÷ 0600 × 1160 ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.2] HANGUL JUNGSEONG FILLER (V) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x1160 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_8_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x1160 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_8_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x1160 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_8_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x1160 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_8_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0x1160 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_9_fwd)
{
// ÷ 0600 × 0308 ÷ 1160 ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] HANGUL JUNGSEONG FILLER (V) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x0308, 0x1160 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_9_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x0308, 0x1160 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_9_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x0308, 0x1160 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_9_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x0308, 0x1160 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_9_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0x0308, 0x1160 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(*it.base(), cps[2]);
EXPECT_EQ(*it->begin(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[2]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_10_fwd)
{
// ÷ 0600 × 11A8 ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.2] HANGUL JONGSEONG KIYEOK (T) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x11A8 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_10_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x11A8 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_10_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x11A8 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_10_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x11A8 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_10_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0x11A8 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_11_fwd)
{
// ÷ 0600 × 0308 ÷ 11A8 ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] HANGUL JONGSEONG KIYEOK (T) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x0308, 0x11A8 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_11_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x0308, 0x11A8 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_11_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x0308, 0x11A8 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_11_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x0308, 0x11A8 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_11_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0x0308, 0x11A8 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(*it.base(), cps[2]);
EXPECT_EQ(*it->begin(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[2]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_12_fwd)
{
// ÷ 0600 × AC00 ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.2] HANGUL SYLLABLE GA (LV) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0xAC00 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_12_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0xAC00 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_12_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0xAC00 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_12_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0xAC00 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_12_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0xAC00 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_13_fwd)
{
// ÷ 0600 × 0308 ÷ AC00 ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] HANGUL SYLLABLE GA (LV) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x0308, 0xAC00 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_13_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x0308, 0xAC00 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_13_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x0308, 0xAC00 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_13_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x0308, 0xAC00 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_13_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0x0308, 0xAC00 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(*it.base(), cps[2]);
EXPECT_EQ(*it->begin(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[2]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_14_fwd)
{
// ÷ 0600 × AC01 ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.2] HANGUL SYLLABLE GAG (LVT) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0xAC01 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_14_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0xAC01 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_14_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0xAC01 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_14_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0xAC01 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_14_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0xAC01 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_15_fwd)
{
// ÷ 0600 × 0308 ÷ AC01 ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] HANGUL SYLLABLE GAG (LVT) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x0308, 0xAC01 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_15_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x0308, 0xAC01 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_15_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x0308, 0xAC01 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_15_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x0308, 0xAC01 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_15_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0x0308, 0xAC01 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(*it.base(), cps[2]);
EXPECT_EQ(*it->begin(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[2]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_16_fwd)
{
// ÷ 0600 × 231A ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.2] WATCH (ExtPict) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x231A };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_16_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x231A };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_16_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x231A };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_16_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x231A };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_16_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0x231A };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_17_fwd)
{
// ÷ 0600 × 0308 ÷ 231A ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] WATCH (ExtPict) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x0308, 0x231A };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_17_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x0308, 0x231A };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_17_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x0308, 0x231A };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_17_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x0308, 0x231A };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_17_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0x0308, 0x231A };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(*it.base(), cps[2]);
EXPECT_EQ(*it->begin(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[2]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_18_fwd)
{
// ÷ 0600 × 0300 ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.0] COMBINING GRAVE ACCENT (Extend_ExtCccZwj) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x0300 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_18_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x0300 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_18_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x0300 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_18_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x0300 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_18_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0x0300 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_19_fwd)
{
// ÷ 0600 × 0308 × 0300 ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] COMBINING GRAVE ACCENT (Extend_ExtCccZwj) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x0308, 0x0300 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_19_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x0308, 0x0300 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
}
}
TEST(grapheme, iterator_05_19_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x0308, 0x0300 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
}
}
TEST(grapheme, iterator_05_19_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x0308, 0x0300 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_19_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0x0308, 0x0300 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_20_fwd)
{
// ÷ 0600 × 200D ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x200D };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_20_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x200D };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_20_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x200D };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_20_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x200D };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_20_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0x200D };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_21_fwd)
{
// ÷ 0600 × 0308 × 200D ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x0308, 0x200D };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_21_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x0308, 0x200D };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
}
}
TEST(grapheme, iterator_05_21_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x0308, 0x200D };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
}
}
TEST(grapheme, iterator_05_21_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x0308, 0x200D };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_21_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0x0308, 0x200D };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_22_fwd)
{
// ÷ 0600 × 0378 ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.2] <reserved-0378> (Other) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x0378 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_22_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x0378 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_22_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x0378 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_22_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x0378 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_22_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0x0378 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_23_fwd)
{
// ÷ 0600 × 0308 ÷ 0378 ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x0308, 0x0378 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_23_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x0308, 0x0378 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_23_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x0308, 0x0378 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_23_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x0308, 0x0378 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_23_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0600, 0x0308, 0x0378 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(*it.base(), cps[2]);
EXPECT_EQ(*it->begin(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[2]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_24_fwd)
{
// ÷ 0600 ÷ D800 ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0xD800 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_24_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0xD800 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
}
}
TEST(grapheme, iterator_05_24_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0xD800 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
}
}
TEST(grapheme, iterator_05_24_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0xD800 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
// Skipping from-utf8 test due to presence of surrogate code point.
TEST(grapheme, iterator_05_25_fwd)
{
// ÷ 0600 × 0308 ÷ D800 ÷
// ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3]
{
uint32_t const cps[] = { 0x0600, 0x0308, 0xD800 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_25_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0600, 0x0308, 0xD800 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_25_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0600, 0x0308, 0xD800 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_25_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0600, 0x0308, 0xD800 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
// Skipping from-utf8 test due to presence of surrogate code point.
TEST(grapheme, iterator_05_26_fwd)
{
// ÷ 0903 ÷ 0020 ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) ÷ [999.0] SPACE (Other) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x0020 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_26_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x0020 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
}
}
TEST(grapheme, iterator_05_26_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x0020 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
}
}
TEST(grapheme, iterator_05_26_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x0020 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_26_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x0020 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[1]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[1]);
++it;
EXPECT_EQ(*it.base(), cps[1]);
EXPECT_EQ(*it->begin(), cps[1]);
EXPECT_EQ(it.base().base(), cus + cp_indices[1]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[1]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_27_fwd)
{
// ÷ 0903 × 0308 ÷ 0020 ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] SPACE (Other) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x0308, 0x0020 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_27_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x0308, 0x0020 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_27_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x0308, 0x0020 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_27_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x0308, 0x0020 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_27_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x0308, 0x0020 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(*it.base(), cps[2]);
EXPECT_EQ(*it->begin(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[2]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_28_fwd)
{
// ÷ 0903 ÷ 000D ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x000D };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_28_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x000D };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
}
}
TEST(grapheme, iterator_05_28_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x000D };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
}
}
TEST(grapheme, iterator_05_28_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x000D };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_28_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x000D };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[1]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[1]);
++it;
EXPECT_EQ(*it.base(), cps[1]);
EXPECT_EQ(*it->begin(), cps[1]);
EXPECT_EQ(it.base().base(), cus + cp_indices[1]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[1]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_29_fwd)
{
// ÷ 0903 × 0308 ÷ 000D ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x0308, 0x000D };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_29_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x0308, 0x000D };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_29_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x0308, 0x000D };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_29_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x0308, 0x000D };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_29_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x0308, 0x000D };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(*it.base(), cps[2]);
EXPECT_EQ(*it->begin(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[2]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_30_fwd)
{
// ÷ 0903 ÷ 000A ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) ÷ [5.0] <LINE FEED (LF)> (LF) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x000A };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_30_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x000A };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
}
}
TEST(grapheme, iterator_05_30_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x000A };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
}
}
TEST(grapheme, iterator_05_30_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x000A };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_30_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x000A };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[1]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[1]);
++it;
EXPECT_EQ(*it.base(), cps[1]);
EXPECT_EQ(*it->begin(), cps[1]);
EXPECT_EQ(it.base().base(), cus + cp_indices[1]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[1]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_31_fwd)
{
// ÷ 0903 × 0308 ÷ 000A ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <LINE FEED (LF)> (LF) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x0308, 0x000A };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_31_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x0308, 0x000A };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_31_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x0308, 0x000A };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_31_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x0308, 0x000A };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_31_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x0308, 0x000A };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(*it.base(), cps[2]);
EXPECT_EQ(*it->begin(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[2]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_32_fwd)
{
// ÷ 0903 ÷ 0001 ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) ÷ [5.0] <START OF HEADING> (Control) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x0001 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_32_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x0001 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
}
}
TEST(grapheme, iterator_05_32_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x0001 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
}
}
TEST(grapheme, iterator_05_32_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x0001 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_32_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x0001 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[1]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[1]);
++it;
EXPECT_EQ(*it.base(), cps[1]);
EXPECT_EQ(*it->begin(), cps[1]);
EXPECT_EQ(it.base().base(), cus + cp_indices[1]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[1]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_33_fwd)
{
// ÷ 0903 × 0308 ÷ 0001 ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <START OF HEADING> (Control) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x0308, 0x0001 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_33_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x0308, 0x0001 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_33_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x0308, 0x0001 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_33_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x0308, 0x0001 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_33_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x0308, 0x0001 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(*it.base(), cps[2]);
EXPECT_EQ(*it->begin(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[2]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_34_fwd)
{
// ÷ 0903 × 034F ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) × [9.0] COMBINING GRAPHEME JOINER (Extend) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x034F };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_34_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x034F };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_34_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x034F };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_34_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x034F };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_34_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x034F };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_35_fwd)
{
// ÷ 0903 × 0308 × 034F ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] COMBINING GRAPHEME JOINER (Extend) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x0308, 0x034F };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_35_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x0308, 0x034F };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
}
}
TEST(grapheme, iterator_05_35_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x0308, 0x034F };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
}
}
TEST(grapheme, iterator_05_35_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x0308, 0x034F };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_35_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x0308, 0x034F };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_36_fwd)
{
// ÷ 0903 ÷ 1F1E6 ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) ÷ [999.0] REGIONAL INDICATOR SYMBOL LETTER A (RI) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x1F1E6 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_36_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x1F1E6 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
}
}
TEST(grapheme, iterator_05_36_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x1F1E6 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
}
}
TEST(grapheme, iterator_05_36_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x1F1E6 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_36_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x1F1E6 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[1]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[1]);
++it;
EXPECT_EQ(*it.base(), cps[1]);
EXPECT_EQ(*it->begin(), cps[1]);
EXPECT_EQ(it.base().base(), cus + cp_indices[1]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[1]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_37_fwd)
{
// ÷ 0903 × 0308 ÷ 1F1E6 ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] REGIONAL INDICATOR SYMBOL LETTER A (RI) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x0308, 0x1F1E6 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_37_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x0308, 0x1F1E6 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_37_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x0308, 0x1F1E6 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_37_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x0308, 0x1F1E6 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_37_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x0308, 0x1F1E6 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(*it.base(), cps[2]);
EXPECT_EQ(*it->begin(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[2]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_38_fwd)
{
// ÷ 0903 ÷ 0600 ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) ÷ [999.0] ARABIC NUMBER SIGN (Prepend) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x0600 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_38_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x0600 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
}
}
TEST(grapheme, iterator_05_38_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x0600 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
}
}
TEST(grapheme, iterator_05_38_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x0600 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_38_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x0600 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[1]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[1]);
++it;
EXPECT_EQ(*it.base(), cps[1]);
EXPECT_EQ(*it->begin(), cps[1]);
EXPECT_EQ(it.base().base(), cus + cp_indices[1]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[1]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_39_fwd)
{
// ÷ 0903 × 0308 ÷ 0600 ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] ARABIC NUMBER SIGN (Prepend) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x0308, 0x0600 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_39_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x0308, 0x0600 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_39_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x0308, 0x0600 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_39_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x0308, 0x0600 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_39_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x0308, 0x0600 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(*it.base(), cps[2]);
EXPECT_EQ(*it->begin(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[2]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_40_fwd)
{
// ÷ 0903 × 0903 ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) × [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x0903 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_40_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x0903 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_40_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x0903 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_40_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x0903 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_40_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x0903 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_41_fwd)
{
// ÷ 0903 × 0308 × 0903 ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x0308, 0x0903 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_41_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x0308, 0x0903 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
}
}
TEST(grapheme, iterator_05_41_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x0308, 0x0903 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
}
}
TEST(grapheme, iterator_05_41_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x0308, 0x0903 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_41_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x0308, 0x0903 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_42_fwd)
{
// ÷ 0903 ÷ 1100 ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) ÷ [999.0] HANGUL CHOSEONG KIYEOK (L) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x1100 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_42_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x1100 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
}
}
TEST(grapheme, iterator_05_42_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x1100 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
}
}
TEST(grapheme, iterator_05_42_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x1100 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_42_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x1100 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[1]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[1]);
++it;
EXPECT_EQ(*it.base(), cps[1]);
EXPECT_EQ(*it->begin(), cps[1]);
EXPECT_EQ(it.base().base(), cus + cp_indices[1]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[1]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_43_fwd)
{
// ÷ 0903 × 0308 ÷ 1100 ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] HANGUL CHOSEONG KIYEOK (L) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x0308, 0x1100 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_43_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x0308, 0x1100 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_43_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x0308, 0x1100 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_43_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x0308, 0x1100 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_43_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x0308, 0x1100 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(*it.base(), cps[2]);
EXPECT_EQ(*it->begin(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[2]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_44_fwd)
{
// ÷ 0903 ÷ 1160 ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) ÷ [999.0] HANGUL JUNGSEONG FILLER (V) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x1160 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_44_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x1160 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
}
}
TEST(grapheme, iterator_05_44_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x1160 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
}
}
TEST(grapheme, iterator_05_44_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x1160 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_44_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x1160 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[1]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[1]);
++it;
EXPECT_EQ(*it.base(), cps[1]);
EXPECT_EQ(*it->begin(), cps[1]);
EXPECT_EQ(it.base().base(), cus + cp_indices[1]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[1]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_45_fwd)
{
// ÷ 0903 × 0308 ÷ 1160 ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] HANGUL JUNGSEONG FILLER (V) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x0308, 0x1160 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_45_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x0308, 0x1160 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_45_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x0308, 0x1160 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_45_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x0308, 0x1160 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_45_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x0308, 0x1160 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(*it.base(), cps[2]);
EXPECT_EQ(*it->begin(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[2]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_46_fwd)
{
// ÷ 0903 ÷ 11A8 ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) ÷ [999.0] HANGUL JONGSEONG KIYEOK (T) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x11A8 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_46_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x11A8 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
}
}
TEST(grapheme, iterator_05_46_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x11A8 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
}
}
TEST(grapheme, iterator_05_46_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x11A8 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_46_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x11A8 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[1]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[1]);
++it;
EXPECT_EQ(*it.base(), cps[1]);
EXPECT_EQ(*it->begin(), cps[1]);
EXPECT_EQ(it.base().base(), cus + cp_indices[1]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[1]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_47_fwd)
{
// ÷ 0903 × 0308 ÷ 11A8 ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] HANGUL JONGSEONG KIYEOK (T) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x0308, 0x11A8 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_47_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x0308, 0x11A8 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_47_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x0308, 0x11A8 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_47_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x0308, 0x11A8 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_47_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x0308, 0x11A8 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(*it.base(), cps[2]);
EXPECT_EQ(*it->begin(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[2]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_48_fwd)
{
// ÷ 0903 ÷ AC00 ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) ÷ [999.0] HANGUL SYLLABLE GA (LV) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0xAC00 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_48_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0xAC00 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
}
}
TEST(grapheme, iterator_05_48_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0xAC00 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 2);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
}
}
TEST(grapheme, iterator_05_48_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0xAC00 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 2, cps + 2);
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 1);
++it;
EXPECT_EQ(it.base(), cps + 1);
EXPECT_EQ((*it).begin(), cps + 1);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_48_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0xAC00 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 2),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 2, cps + 2),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[1]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[1]);
++it;
EXPECT_EQ(*it.base(), cps[1]);
EXPECT_EQ(*it->begin(), cps[1]);
EXPECT_EQ(it.base().base(), cus + cp_indices[1]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[1]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_49_fwd)
{
// ÷ 0903 × 0308 ÷ AC00 ÷
// ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] HANGUL SYLLABLE GA (LV) ÷ [0.3]
{
uint32_t const cps[] = { 0x0903, 0x0308, 0xAC00 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_49_rev)
{
{
// reverse
uint32_t const cps[] = { 0x0903, 0x0308, 0xAC00 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_49_fab)
{
{
// forth and back
uint32_t const cps[] = { 0x0903, 0x0308, 0xAC00 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps, cps + 3);
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
}
}
TEST(grapheme, iterator_05_49_baf)
{
{
// back and forth
uint32_t const cps[] = { 0x0903, 0x0308, 0xAC00 };
boost::text::grapheme_iterator<uint32_t const *> it(cps, cps + 3, cps + 3);
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
--it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
--it;
EXPECT_EQ(it.base(), cps + 0);
EXPECT_EQ((*it).begin(), cps + 0);
EXPECT_EQ((*it).end(), cps + 2);
++it;
EXPECT_EQ(it.base(), cps + 2);
EXPECT_EQ((*it).begin(), cps + 2);
EXPECT_EQ((*it).end(), cps + 3);
++it;
EXPECT_EQ(it.base(), cps + 3);
EXPECT_EQ((*it).begin(), (*it).end());
}
}
TEST(grapheme, iterator_05_49_utf8)
{
{
// from UTF8
uint32_t const cps[] = { 0x0903, 0x0308, 0xAC00 };
char cus[1024] = { 0 };
int cp_indices[1024] = { 0 };
std::copy(
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps, cps + 3),
boost::text::utf8::from_utf32_iterator<uint32_t const *>(cps, cps + 3, cps + 3),
cus);
boost::text::utf8::null_sentinel sentinel;
int * index_it = cp_indices;
for (boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel> it(cus, cus, boost::text::utf8::null_sentinel{}); ; ++it) {
*index_it++ = it.base() - cus;
if (it == sentinel)
break;
}
using iter_t = boost::text::utf8::to_utf32_iterator<char const *, boost::text::utf8::null_sentinel>;
boost::text::grapheme_iterator<iter_t, boost::text::utf8::null_sentinel> it(
iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, iter_t{cus, cus, boost::text::utf8::null_sentinel{}}, sentinel);
EXPECT_EQ(*it.base(), cps[0]);
EXPECT_EQ(*it->begin(), cps[0]);
EXPECT_EQ(*it->end(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[0]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[0]);
EXPECT_EQ(it->end().base(), cus + cp_indices[2]);
++it;
EXPECT_EQ(*it.base(), cps[2]);
EXPECT_EQ(*it->begin(), cps[2]);
EXPECT_EQ(it.base().base(), cus + cp_indices[2]);
EXPECT_EQ(it->begin().base(), cus + cp_indices[2]);
EXPECT_EQ(it->end().base(), cus + cp_indices[3]);
++it;
EXPECT_EQ(it.base().base(), cus + cp_indices[3]);
EXPECT_EQ(it->begin(), (*it).end());
}
}
| 28.723673
| 157
| 0.506828
|
jan-moeller
|
c926667f12ee50afa92b001e20f68d2a8a57af74
| 5,457
|
cpp
|
C++
|
src/FSString.cpp
|
pperehozhih/transform-cxx
|
f630079779e9e3cf6d06dcfc04b3ad0bd99d7e48
|
[
"BSD-3-Clause"
] | 4
|
2018-09-16T09:55:22.000Z
|
2020-12-19T02:02:40.000Z
|
src/FSString.cpp
|
pperehozhih/transform-cxx
|
f630079779e9e3cf6d06dcfc04b3ad0bd99d7e48
|
[
"BSD-3-Clause"
] | null | null | null |
src/FSString.cpp
|
pperehozhih/transform-cxx
|
f630079779e9e3cf6d06dcfc04b3ad0bd99d7e48
|
[
"BSD-3-Clause"
] | 2
|
2015-11-24T20:27:35.000Z
|
2019-06-04T15:23:30.000Z
|
/*
* FSString.cpp
* Transform SWF
*
* Created by Stuart MacKay on Thu Feb 13 2003.
* Copyright (c) 2003 Flagstone Software Ltd. All rights reserved.
*
* This file contains Original Code and/or Modifications of Original Code as defined in
* and that are subject to the Flagstone Software Source License Version 1.0 (the
* 'License'). You may not use this file except in compliance with the License. Please
* obtain a copy of the License at http://www.flagstonesoftware.com/licenses/source.html
* and read it before using this file.
*
* The Original Code and all software distributed under the License are distributed on an
* 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND Flagstone
* HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF THIRD PARTY
* RIGHTS. Please see the License for the specific language governing rights and limitations
* under the License.
*/
#include "FSString.h"
#include <string.h>
#include "FSException.h"
#include "FSInputStream.h"
#include "FSOutputStream.h"
using namespace transform;
namespace transform
{
FSString::FSString(FSInputStream* aStream) : FSValue(FSValue::String), buffer(0), strLength(0), bufferLength(0)
{
strLength = 0;
bufferLength = strLength + 1;
buffer = new char[bufferLength];
if (bufferLength > 0 && buffer == 0)
throw FSAllocationException("Cannot allocate memory to copy an FSString.");
buffer[0] = '\0';
decodeFromStream(aStream);
}
FSString::FSString(const char* aValue) : FSValue(FSValue::String), buffer(0), strLength(0), bufferLength(0)
{
if (aValue == 0)
aValue = "";
strLength = (int)strlen(aValue);
bufferLength = strLength + 1;
buffer = new char[bufferLength];
if (bufferLength > 0 && buffer == 0)
throw FSAllocationException("Cannot allocate memory to copy an FSString.");
strcpy(buffer, aValue);
}
FSString::FSString(const FSString& rhs) : FSValue(rhs), buffer(0), strLength(0), bufferLength(0)
{
strLength = rhs.length();
bufferLength = strLength + 1;
buffer = new char[bufferLength];
if (bufferLength > 0 && buffer == 0)
throw FSAllocationException("Cannot allocate memory to copy an FSString.");
strcpy(buffer, rhs.buffer);
}
FSString::~FSString()
{
delete [] buffer;
buffer = 0;
}
const char* FSString::className() const
{
const static char _name[] = "FSString";
return _name;
}
const FSString& FSString::operator= (const FSString& rhs)
{
if (this != &rhs)
{
this->FSValue::operator=(rhs);
if (bufferLength < rhs.length() + 1)
{
delete [] buffer;
bufferLength = rhs.length() + 1;
buffer = new char[bufferLength];
if (bufferLength > 0 && buffer == 0)
throw FSAllocationException("Cannot allocate memory to copy an FSString.");
}
strLength = rhs.length();
strcpy(buffer, rhs.buffer);
}
return *this;
}
const FSString& FSString::operator+=(const FSString& rhs)
{
if (this == &rhs)
{
FSString copy(rhs);
return *this += copy;
}
int newLength = length() + rhs.length();
if (newLength >= bufferLength)
{
bufferLength = 2 * (newLength + 1);
char* oldBuffer = buffer;
buffer = new char[ bufferLength ];
if (bufferLength > 0 && buffer == 0)
throw FSAllocationException("Cannot allocate memory to copy an FSString.");
strcpy(buffer, oldBuffer );
delete [] oldBuffer;
}
strcpy(buffer+length(), rhs.buffer);
strLength = newLength;
return *this;
}
int FSString::lengthInStream(FSOutputStream* aStream)
{
int tagLength = FSValue::lengthInStream(aStream);
tagLength += strLength+1;
return tagLength;
}
void FSString::encodeToStream(FSOutputStream* aStream)
{
#ifdef _DEBUG
aStream->startEncoding(className());
#endif
FSValue::encodeToStream(aStream);
aStream->write((byte*)buffer, strLength+1);
#ifdef _DEBUG
aStream->endEncoding(className());
#endif
}
void FSString::decodeFromStream(FSInputStream* aStream)
{
#ifdef _DEBUG
aStream->startDecoding(className());
#endif
FSValue::decodeFromStream(aStream);
buffer = aStream->readString();
strLength = (int)strlen(buffer);
bufferLength = strLength+1;
#ifdef _DEBUG
aStream->endDecoding(className());
#endif
}
/*
* Overloaded operations that can be performed on strings
*/
FSString operator+(const FSString& lhs, const FSString& rhs)
{
FSString result = lhs;
result += rhs;
return result;
}
}
| 28.873016
| 117
| 0.575591
|
pperehozhih
|
c92766fe41b83766d8d2e2aefa3d6df894063e7e
| 8,728
|
hpp
|
C++
|
matrix.hpp
|
ArvinSKushwaha/moldyn
|
cef3a3545c0975742c0786916b6d40a9f199b281
|
[
"MIT"
] | null | null | null |
matrix.hpp
|
ArvinSKushwaha/moldyn
|
cef3a3545c0975742c0786916b6d40a9f199b281
|
[
"MIT"
] | null | null | null |
matrix.hpp
|
ArvinSKushwaha/moldyn
|
cef3a3545c0975742c0786916b6d40a9f199b281
|
[
"MIT"
] | null | null | null |
#ifndef MOLDYN_MATRIX_HPP
#define MOLDYN_MATRIX_HPP
#include <algorithm>
#include <cmath>
#include <initializer_list>
#include <vector>
#include <iostream>
#include <functional>
#include <ostream>
#include <numeric>
#include <string>
#include <memory>
template <typename T, size_t M, size_t N>
class Matrix;
template <typename T, size_t N>
using CVec = Matrix<T, N, 1>;
template <typename T, size_t N>
using RVec = Matrix<T, 1, N>;
template <typename T, size_t M, size_t N>
class Matrix {
public:
std::shared_ptr<std::vector<T>> data = std::make_shared<std::vector<T>>(M * N);
size_t rows = M;
size_t cols = N;
size_t stride = 1;
size_t offset = 0;
Matrix() = default;
Matrix(T val) { std::fill(data->begin(), data->end(), val); }
Matrix(std::initializer_list<T> list) { std::copy(list.begin(), list.end(), data->begin()); }
Matrix(const Matrix<T, M, N>& mat) : data(mat.data) {}
template <typename V>
Matrix<V, M, N> map(std::function<V(T)> f) const {
Matrix<V, M, N> result;
for (size_t i = 0; i < M; i++) {
for (size_t j = 0; j < N; j++) {
std::cout << result(i, j) << " " << (*this)(i, j) << " " << f((*this)(i, j)) << " " << i << " " << j << " " << M << " " << N << std::endl;
result(i, j) = f((*this)(i, j));
}
}
return result;
}
template <typename U, typename V>
Matrix<V, M, N> map2(Matrix<U, M, N> m2, std::function<V(T, U)> f) const {
Matrix<V, M, N> result;
for (size_t i = 0; i < M; i++) {
for (size_t j = 0; j < N; j++) {
result(i, j) = f((*this)(i, j), m2(i, j));
}
}
return result;
}
template <typename V>
V accumulate(V init, std::function<V(V, T)> f) const {
for (size_t i = 0; i < M; i++) {
for (size_t j = 0; j < N; j++) {
init = f(init, (*this)(i, j));
}
}
return init;
}
T reduce(std::function<T(T, T)> f) const {
T result = this(0, 0);
for (size_t i = 1; i < M; i++) {
for (size_t j = 0; j < N; j++) {
if (i != 0 && j != 0) { result = f(result, (*this)(i, j)); }
}
}
return result;
}
Matrix<T, M, N> operator+(const Matrix<T, M, N>& mat) const {
return map2<T, T>(mat, std::plus<T>());
}
Matrix<T, M, N> operator-(const Matrix<T, M, N>& mat) const {
return map2<T, T>(mat, std::minus<T>());
}
Matrix<T, M, N> operator*(const Matrix<T, M, N>& mat) const {
return map2<T, T>(mat, std::multiplies<T>());
}
Matrix<T, M, N> operator/(const Matrix<T, M, N>& mat) const {
return map2<T, T>(mat, std::divides<T>());
}
Matrix<T, M, N> operator+(const T& val) const {
return map<T>(std::bind2nd(std::plus<T>(), val));
}
Matrix<T, M, N> operator-(const T& val) const {
return map<T>(std::bind2nd(std::minus<T>(), val));
}
Matrix<T, M, N> operator*(const T& val) const {
return map<T>(std::bind2nd(std::multiplies<T>(), val));
}
Matrix<T, M, N> operator/(const T& val) const {
return map<T>(std::bind2nd(std::divides<T>(), val));
}
Matrix<T, M, N> operator-() const {
return map<T>(std::negate<T>());
}
Matrix<T, M, N> &operator=(const Matrix<T, M, N>& mat) {
for (size_t i = 0; i < M; i++) {
for (size_t j = 0; j < N; j++) {
(*this)(i, j) = mat(i, j);
}
}
return *this;
}
Matrix<T, M, N> &operator+=(const Matrix<T, M, N>& mat) {
return *this = *this + mat;
}
Matrix<T, M, N> &operator-=(const Matrix<T, M, N>& mat) {
return *this = *this - mat;
}
Matrix<T, M, N> &operator*=(const Matrix<T, M, N>& mat) {
return *this = *this * mat;
}
Matrix<T, M, N> &operator/=(const Matrix<T, M, N>& mat) {
return *this = *this / mat;
}
Matrix<T, M, N> &operator+=(const T& val) {
return *this = *this + val;
}
Matrix<T, M, N> &operator-=(const T& val) {
return *this = *this - val;
}
Matrix<T, M, N> &operator*=(const T& val) const {
return *this = *this * val;
}
Matrix<T, M, N> &operator/=(const T& val) const {
return *this = *this / val;
}
template<size_t O>
Matrix<T, M, O> mm(const Matrix<T, N, O>& mat) const {
Matrix<T, M, O> result(0.);
for (int j = 0; j < N; ++j) {
for (int i = 0; i < M; ++i) {
for (int k = 0; k < O; ++k) {
result(i, k) += (*this)(i, j) * mat(j, k);
}
}
}
return result;
}
Matrix<T, N, M> transpose() const {
Matrix<T, N, M> result;
for (int i = 0; i < M; ++i) {
for (int j = 0; j < N; ++j) {
result(j, i) = (*this)(i, j);
}
}
return result;
}
Matrix<bool, M, N> operator==(const Matrix<T, M, N>& m2) const {
return map2(m2, [](T a, T b) { return a == b; });
}
Matrix<bool, M, N> operator!=(const Matrix<T, M, N>& m2) const {
return map2(m2, [](T a, T b) { return a != b; });
}
Matrix<bool, M, N> operator<(const Matrix<T, M, N>& m2) const {
return map2(m2, [](T a, T b) { return a < b; });
}
Matrix<bool, M, N> operator>(const Matrix<T, M, N>& m2) const {
return map2(m2, [](T a, T b) { return a > b; });
}
Matrix<bool, M, N> operator<=(const Matrix<T, M, N>& m2) const {
return map2(m2, [](T a, T b) { return a <= b; });
}
Matrix<bool, M, N> operator>=(const Matrix<T, M, N>& m2) const {
return map2(m2, [](T a, T b) { return a >= b; });
}
T& operator()(size_t i) {
return (*data)[i * stride + offset];
}
T& operator()(size_t i, size_t j) {
std::cout << "operator() " << i << " " << j << " " << stride << " " << offset << " " << (i * M + j) * stride + offset << " " << (*data)[(i * M + j) * stride + offset] << std::endl;
return (*data)[(i * M + j) * stride + offset];
}
const T& operator()(size_t i, size_t j) const {
return (*data)[(i * M + j) * stride + offset];
}
RVec<T, N> row(size_t i) const {
RVec<T, N> result;
result.data = data;
result.offset = i * M;
result.stride = 1;
return result;
}
CVec<T, M> col(size_t j) const {
CVec<T, M> result;
result.data = data;
result.offset = j;
result.stride = 1;
return result;
}
T sum() const {
return accumulate(0, std::plus<T>());
}
T prod() const {
return accumulate(1, std::multiplies<T>());
}
T min() const {
return reduce([](T a, T b) { return a < b ? a : b; });
}
T max() const {
return reduce([](T a, T b) { return a > b ? a : b; });
}
};
template <typename T, size_t M, size_t N>
Matrix<T, M, N> operator+(const T& val, const Matrix<T, M, N> mat) {
return mat + val;
}
template <typename T, size_t M, size_t N>
Matrix<T, M, N> operator-(const T& val, const Matrix<T, M, N> mat) {
return (-mat) + val;
}
template <typename T, size_t M, size_t N>
Matrix<T, M, N> operator*(const T& val, const Matrix<T, M, N> mat) {
return mat * val;
}
template <typename T, size_t M, size_t N>
Matrix<T, M, N> operator/(const T& val, const Matrix<T, M, N> mat) {
return mat.template map<T>(std::bind1st(std::divides<T>(), val));
}
template <typename T, size_t M, size_t N>
std::ostream &operator<<(std::ostream& os, const Matrix<T, M, N> mat) {
if (N == 0 || M == 0) { os << "[ ]"; return os; }
for (size_t i = 0; i < M - 1; ++i) {
os << "[ ";
for (size_t j = 0; j < N - 1; ++j) {
os << mat(i, j) << ", ";
}
os << mat(i, N - 1) << " ]\n";
}
os << "[ " << mat(M - 1, N - 1) << " ]";
return os;
}
#endif
| 35.052209
| 192
| 0.438932
|
ArvinSKushwaha
|
c928cb81ac5116527c878624f2755360f848dd59
| 4,075
|
hpp
|
C++
|
lib/rtos_data/include/rtos_file.hpp
|
kdeoliveira/coen320
|
4c788b3c2544e57e27bac8a59232f06c7a04d67a
|
[
"MIT"
] | null | null | null |
lib/rtos_data/include/rtos_file.hpp
|
kdeoliveira/coen320
|
4c788b3c2544e57e27bac8a59232f06c7a04d67a
|
[
"MIT"
] | null | null | null |
lib/rtos_data/include/rtos_file.hpp
|
kdeoliveira/coen320
|
4c788b3c2544e57e27bac8a59232f06c7a04d67a
|
[
"MIT"
] | null | null | null |
#pragma once
#include <stdio.h>
#include <fstream>
#include <cstring>
#include <memory>
#include <utility>
#include <deque>
#include <sys/stat.h>
#include <rtos_common.hpp>
namespace rtos
{
/**
* @brief Input stream for files. Alternative C implementation of ifstream provided by the std library
* File buffering is set _IOLBF.
* On output, data is written when a newline character is inserted into the stream or when the buffer is full
*/
class InputFile
{
public:
InputFile() = default;
/**
* @brief Construct a new Input File object and creates a new file descriptor for that stream
*
* @param filename absolute path of file
*/
InputFile(const char *filename)
{
if (
( this->file_stream = fopen(filename, "rb+") ) == NULL
){
throw "Unable to open file";
}
this->_line_index = 0;
this->line_stream = new BYTE[BUFFER_SIZE];
this->position = 0L;
this->buffer_stream = new char[BUFFER_SIZE];
if(this->file_stream != NULL)
setvbuf(
this->file_stream, this->buffer_stream, _IOLBF, sizeof(char) * BUFFER_SIZE
);
this->fd = fileno(this->file_stream);
struct stat st;
fstat(this->fd, &st);
this->file_size = st.st_size;
}
InputFile(const InputFile&) = delete;
InputFile& operator=(const InputFile&) = delete;
/**
* @brief Opens file in read mode
*
* @param filename
*/
void open(const char* filename){
try{
this->file_stream = fopen(
filename, "rb+"
);
}catch(std::exception& e){
puts(e.what());
}
}
~InputFile()
{
fflush(this->file_stream);
if (this->file_stream != nullptr) {
fclose(this->file_stream);
}
delete[] this->buffer_stream;
delete[] this->line_stream;
}
/**
* @brief Reads file line by line and stores inside a temporary buffer
* Note that maximum size of read bytes is defined by BUFFER_SIZE
* @return BYTE* char* equivalent value of the buffer.
*/
BYTE* read_line()
{
if( fgets(this->line_stream, BUFFER_SIZE, this->file_stream) == nullptr ){
if(ferror(this->file_stream)) throw "Error reading the file";
return this->line_stream;
}
this->_line_index++;
position = ftell(this->file_stream);
return this->line_stream;
}
/**
* @brief Get current line number
*
* @return const int
*/
const int line_index() const{
return this->_line_index;
}
/**
* @brief Get the file size object
*
* @return const size_t
*/
const size_t get_file_size() const{
return this->file_size;
}
/**
* @brief Get the current position of the stream
*
* @return long int
*/
long int get_position(){
return this->position;
}
/**
* @brief Get a file descriptor for the input stream
*
* @return int
*/
int get_fd(){
return this->fd;
}
/**
* @brief Returns if stream has reached END OF FILE
*
* @return bool
*/
bool is_eof(){
return this->file_size <= this->position;
}
private:
BYTE* line_stream;
FILE* file_stream;
int _line_index;
char* buffer_stream;
long int position;
int fd;
size_t file_size;
};
}
| 23.970588
| 113
| 0.488834
|
kdeoliveira
|
c92d479a517780a1c04d34b12e83a6d5821280d1
| 2,928
|
hpp
|
C++
|
Paper/Curve.hpp
|
mokafolio/Paper
|
d7e9c1450b29b1d3d8873de4f959bffa02232055
|
[
"MIT"
] | 20
|
2016-12-13T22:34:35.000Z
|
2021-09-20T12:44:56.000Z
|
Paper/Curve.hpp
|
mokafolio/Paper
|
d7e9c1450b29b1d3d8873de4f959bffa02232055
|
[
"MIT"
] | null | null | null |
Paper/Curve.hpp
|
mokafolio/Paper
|
d7e9c1450b29b1d3d8873de4f959bffa02232055
|
[
"MIT"
] | null | null | null |
#ifndef PAPER_CURVE_HPP
#define PAPER_CURVE_HPP
#include <Paper/Path.hpp>
namespace paper
{
class CurveLocation;
class Segment;
class STICK_API Curve
{
friend class Path;
friend class Segment;
public:
Curve();
Curve(const Path & _path, stick::Size _segmentA, stick::Size _segmentB);
Path path() const;
void setPositionOne(const Vec2f & _vec);
void setHandleOne(const Vec2f & _vec);
void setPositionTwo(const Vec2f & _vec);
void setHandleTwo(const Vec2f & _vec);
const Vec2f & positionOne() const;
const Vec2f & positionTwo() const;
const Vec2f & handleOne() const;
Vec2f handleOneAbsolute() const;
const Vec2f & handleTwo() const;
Vec2f handleTwoAbsolute() const;
Segment & segmentOne();
const Segment & segmentOne() const;
Segment & segmentTwo();
const Segment & segmentTwo() const;
Vec2f positionAt(Float _offset) const;
Vec2f normalAt(Float _offset) const;
Vec2f tangentAt(Float _offset) const;
Float curvatureAt(Float _offset) const;
Float angleAt(Float _offset) const;
stick::Maybe<Curve&> divideAt(Float _offset);
Vec2f positionAtParameter(Float _t) const;
Vec2f normalAtParameter(Float _t) const;
Vec2f tangentAtParameter(Float _t) const;
Float curvatureAtParameter(Float _t) const;
Float angleAtParameter(Float _t) const;
stick::Maybe<Curve&> divideAtParameter(Float _t);
Float parameterAtOffset(Float _offset) const;
Float closestParameter(const Vec2f & _point) const;
Float closestParameter(const Vec2f & _point, Float & _outDistance) const;
Float lengthBetween(Float _tStart, Float _tEnd) const;
Float pathOffset() const;
void peaks(stick::DynamicArray<Float> & _peaks) const;
void extrema(stick::DynamicArray<Float> & _extrema) const;
CurveLocation closestCurveLocation(const Vec2f & _point) const;
CurveLocation curveLocationAt(Float _offset) const;
CurveLocation curveLocationAtParameter(Float _t) const;
bool isLinear() const;
bool isStraight() const;
bool isArc() const;
bool isOrthogonal(const Curve & _other) const;
bool isCollinear(const Curve & _other) const;
Float length() const;
Float area() const;
const Rect & bounds() const;
Rect bounds(Float _padding) const;
const Bezier & bezier() const;
private:
void markDirty();
Path m_path;
stick::Size m_segmentA;
stick::Size m_segmentB;
Bezier m_curve;
mutable bool m_bLengthCached;
mutable bool m_bBoundsCached;
mutable Float m_length;
mutable Rect m_bounds;
};
}
#endif //PAPER_CURVE_HPP
| 21.372263
| 81
| 0.635929
|
mokafolio
|
c92e15e6011444b62e2084bf8b7b9f2ce6012528
| 3,642
|
cpp
|
C++
|
3.三维空间刚体运动/useGeometry/eigenGeometry_test.cpp
|
HustRobot/VSLAM
|
e6759dc3769b3cca6ecf551a3bf120b0edeaeaa3
|
[
"MIT"
] | 24
|
2019-03-14T06:00:15.000Z
|
2022-03-04T06:35:49.000Z
|
3.三维空间刚体运动/useGeometry/eigenGeometry_test.cpp
|
HustRobot/VSLAM
|
e6759dc3769b3cca6ecf551a3bf120b0edeaeaa3
|
[
"MIT"
] | null | null | null |
3.三维空间刚体运动/useGeometry/eigenGeometry_test.cpp
|
HustRobot/VSLAM
|
e6759dc3769b3cca6ecf551a3bf120b0edeaeaa3
|
[
"MIT"
] | 13
|
2018-09-17T15:56:51.000Z
|
2022-03-03T07:27:34.000Z
|
/*=================================================================================
* Copyleft! 2018 William Yu
* Some rights reserved:CC(creativecommons.org)BY-NC-SA
* Copyleft! 2018 William Yu
* 版权部分所有,遵循CC(creativecommons.org)BY-NC-SA协议授权方式使用
*
* Filename :
* Description : 视觉SLAM十四讲/ch3/useGeometry/eigenGeometry.cpp 学习记录
矩阵库
* Reference :
* Programmer(s) : William Yu, windmillyucong@163.com
* Company : HUST, DMET国家重点实验室FOCUS团队
* Modification History : ver1.0, 2018.03.26, William Yu
=================================================================================*/
/// Include Files
#include <iostream>
#include <cmath>
#include <Eigen/Core>
// Eigen 几何模块
#include <Eigen/Geometry>
using namespace std;
/// Global Variables
/// Function Definitions
/**
* @function main
* @author William Yu
* @brief Eigen几何模块的使用方法
* @param None
* @retval None
*/
int main ( int argc, char** argv )
{
//---------------------------------------------------------------------------
// 旋转平移表示
//----------------------------------------------------------------
// Eigen/Geometry 几何模块提供了各种旋转和平移的表示
// 3D 旋转矩阵直接使用 Matrix3d 或 Matrix3f
Eigen::Matrix3d rotation_matrix = Eigen::Matrix3d::Identity();
// 旋转向量使用 AngleAxis, 它底层不直接是Matrix,但运算可以当作矩阵(因为重载了运算符)
Eigen::AngleAxisd rotation_vector ( M_PI/4, Eigen::Vector3d ( 0,0,1 ) ); //沿 Z 轴旋转 45 度
cout .precision(3);
cout<<"rotation matrix =\n"<<rotation_vector.matrix() <<endl; //用matrix()转换成矩阵
// 也可以直接赋值
rotation_matrix = rotation_vector.toRotationMatrix();
// 用 AngleAxis 可以进行坐标变换
Eigen::Vector3d v ( 1,0,0 );
Eigen::Vector3d v_rotated = rotation_vector * v;
cout<<"(1,0,0) after rotation = "<<v_rotated.transpose()<<endl;
// 或者用旋转矩阵
v_rotated = rotation_matrix * v;
cout<<"(1,0,0) after rotation = "<<v_rotated.transpose()<<endl;
//---------------------------------------------------------------------------
// 欧拉角
//----------------------------------------------------------------
//-- 可以将旋转矩阵直接转换成欧拉角
Eigen::Vector3d euler_angles = rotation_matrix.eulerAngles ( 2,1,0 ); // ZYX顺序,即roll pitch yaw顺序
cout<<"yaw pitch roll = "<<euler_angles.transpose()<<endl;
// 欧氏变换矩阵使用 Eigen::Isometry
Eigen::Isometry3d T=Eigen::Isometry3d::Identity(); // 虽然称为3d,实质上是4*4的矩阵
T.rotate ( rotation_vector ); // 按照rotation_vector进行旋转
T.pretranslate ( Eigen::Vector3d ( 1,3,4 ) ); // 把平移向量设成(1,3,4)
cout << "Transform matrix = \n" << T.matrix() <<endl;
// 用变换矩阵进行坐标变换
Eigen::Vector3d v_transformed = T*v; // 相当于R*v+t
cout<<"v tranformed = "<<v_transformed.transpose()<<endl;
// 对于仿射和射影变换,使用 Eigen::Affine3d 和 Eigen::Projective3d 即可,略
//---------------------------------------------------------------------------
// 四元数
//----------------------------------------------------------------
// 可以直接把AngleAxis赋值给四元数,反之亦然
Eigen::Quaterniond q = Eigen::Quaterniond ( rotation_vector );
cout<<"quaternion = \n"<<q.coeffs() <<endl; // 请注意coeffs的顺序是(x,y,z,w),w为实部,前三者为虚部
// 也可以把旋转矩阵赋给它
q = Eigen::Quaterniond ( rotation_matrix );
cout<<"quaternion = \n"<<q.coeffs() <<endl;
// 使用四元数旋转一个向量,使用重载的乘法即可
v_rotated = q*v; // 注意数学上是qvq^{-1}
cout<<"(1,0,0) after rotation = "<<v_rotated.transpose()<<endl;
return 0;
}
| 36.787879
| 100
| 0.494509
|
HustRobot
|
c9315d56f9441080a8b66650198537cc54ca3647
| 758
|
cpp
|
C++
|
code/select.cpp
|
ldionne/cppnow-2016-metaprogramming-for-the-brave
|
580f900d778553b8a7affc1dd02bbc597f992df6
|
[
"MIT"
] | 6
|
2016-05-25T08:10:50.000Z
|
2017-09-14T14:36:48.000Z
|
code/select.cpp
|
ldionne/cppnow-2016-metaprogramming-for-the-brave
|
580f900d778553b8a7affc1dd02bbc597f992df6
|
[
"MIT"
] | null | null | null |
code/select.cpp
|
ldionne/cppnow-2016-metaprogramming-for-the-brave
|
580f900d778553b8a7affc1dd02bbc597f992df6
|
[
"MIT"
] | null | null | null |
// Copyright Louis Dionne 2016
// Distributed under the Boost Software License, Version 1.0.
#include <cassert>
#include <cstddef>
#include <tuple>
#include <utility>
// sample(main)
template <typename Tuple, std::size_t ...i>
auto select(Tuple&& tuple, std::index_sequence<i...> const&) {
using Result = std::tuple<
std::tuple_element_t<i, std::remove_reference_t<Tuple>>...
>;
return Result{std::get<i>(static_cast<Tuple&&>(tuple))...};
}
// end-sample
int main() {
long four = 4;
std::tuple<int, char, float, long&> ts{1, '2', 3.3f, four};
auto slice = select(ts, std::index_sequence<0, 2, 3>{});
assert(std::get<0>(slice) == 1);
assert(std::get<1>(slice) == 3.3f);
assert(&std::get<2>(slice) == &four);
}
| 26.137931
| 66
| 0.624011
|
ldionne
|
c935e0e85242912c0782350958aa0f76a4104813
| 1,163
|
cpp
|
C++
|
online_judges/cf/4/d/d.cpp
|
miaortizma/competitive-programming
|
ea5adfc07e49935acfc0697eeb0a12c7dc6cd8cc
|
[
"MIT"
] | 2
|
2018-02-20T14:44:57.000Z
|
2018-02-20T14:45:03.000Z
|
online_judges/cf/4/d/d.cpp
|
miaortizma/competitive-programming
|
ea5adfc07e49935acfc0697eeb0a12c7dc6cd8cc
|
[
"MIT"
] | null | null | null |
online_judges/cf/4/d/d.cpp
|
miaortizma/competitive-programming
|
ea5adfc07e49935acfc0697eeb0a12c7dc6cd8cc
|
[
"MIT"
] | null | null | null |
#include<bits/stdc++.h>
using namespace std;
typedef pair<int,int> pii;
const int N = 5 * 1e3 + 100;
struct dta {
int w, h, i;
dta() : w(0), h(0), i(0) {}
dta(int w, int h, int i) : w(w), h(h), i(i) {}
};
dta arr[N];
bool cmp(dta lh, dta rh) {
if (lh.w == rh.w)
return lh.h < rh.h;
return lh.w < rh.w;
}
int dp[N], par[N];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(NULL);
int n, w, h;
cin >> n >> w >> h;
for (int i = 0; i < n; ++i) {
int a, b;
cin >> a >> b;
arr[i] = {a, b, i + 1};
}
memset(par, -1, sizeof par);
sort(arr, arr + n, cmp);
int ans = 0, b = -1;
for (int i = n - 1; i >= 0; --i) {
for (int j = i + 1; j < n; ++j) {
if (arr[j].w > arr[i].w && arr[j].h > arr[i].h) {
if (dp[j] + 1 > dp[i]) {
par[arr[i].i] = arr[j].i;
dp[i] = dp[j] + 1;
}
}
}
if (arr[i].w > w && arr[i].h > h) {
if (dp[i] + 1 > ans) {
ans = dp[i] + 1;
b = arr[i].i;
}
}
}
if (b == -1) {
cout << 0;
} else {
cout << ans << "\n";
while (b != -1) {
cout << b << " ";
b = par[b];
}
}
return 0;
}
| 18.460317
| 55
| 0.395529
|
miaortizma
|
c938029b54fb586fd362b694813273e28d0a692d
| 336
|
hpp
|
C++
|
test/qsbr_test_utils.hpp
|
laurynas-biveinis/unodb
|
4865a2c5ca97a93e8d4e3e7c990ebb7be12371b9
|
[
"Apache-2.0"
] | 24
|
2019-11-26T09:31:31.000Z
|
2022-03-27T16:31:45.000Z
|
test/qsbr_test_utils.hpp
|
laurynas-biveinis/unodb
|
4865a2c5ca97a93e8d4e3e7c990ebb7be12371b9
|
[
"Apache-2.0"
] | 222
|
2019-10-26T12:50:54.000Z
|
2022-03-31T10:29:50.000Z
|
test/qsbr_test_utils.hpp
|
laurynas-biveinis/unodb
|
4865a2c5ca97a93e8d4e3e7c990ebb7be12371b9
|
[
"Apache-2.0"
] | 1
|
2021-03-10T14:55:48.000Z
|
2021-03-10T14:55:48.000Z
|
// Copyright 2021 Laurynas Biveinis
#ifndef UNODB_DETAIL_QSBR_TEST_UTILS_HPP
#define UNODB_DETAIL_QSBR_TEST_UTILS_HPP
#include "global.hpp" // IWYU pragma: keep
#include <gtest/gtest.h> // IWYU pragma: keep
namespace unodb::test {
void expect_idle_qsbr();
} // namespace unodb::test
#endif // UNODB_DETAIL_QSBR_TEST_UTILS_HPP
| 21
| 46
| 0.77381
|
laurynas-biveinis
|
c9459f2c2d895101891d127fb9a4f3022d8dcb6b
| 8,309
|
hpp
|
C++
|
include/HMUI/HierarchyManager.hpp
|
RedBrumbler/BeatSaber-Quest-Codegen
|
73dda50b5a3e51f10d86b766dcaa24b0c6226e25
|
[
"Unlicense"
] | null | null | null |
include/HMUI/HierarchyManager.hpp
|
RedBrumbler/BeatSaber-Quest-Codegen
|
73dda50b5a3e51f10d86b766dcaa24b0c6226e25
|
[
"Unlicense"
] | null | null | null |
include/HMUI/HierarchyManager.hpp
|
RedBrumbler/BeatSaber-Quest-Codegen
|
73dda50b5a3e51f10d86b766dcaa24b0c6226e25
|
[
"Unlicense"
] | null | null | null |
// Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
#include "beatsaber-hook/shared/utils/byref.hpp"
// Including type: UnityEngine.MonoBehaviour
#include "UnityEngine/MonoBehaviour.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils-methods.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils-properties.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils-fields.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Begin forward declares
// Forward declaring namespace: HMUI
namespace HMUI {
// Forward declaring type: ScreenSystem
class ScreenSystem;
// Forward declaring type: FlowCoordinator
class FlowCoordinator;
}
// Forward declaring namespace: GlobalNamespace
namespace GlobalNamespace {
// Forward declaring type: GameScenesManager
class GameScenesManager;
// Forward declaring type: ScenesTransitionSetupDataSO
class ScenesTransitionSetupDataSO;
}
// Forward declaring namespace: Zenject
namespace Zenject {
// Forward declaring type: DiContainer
class DiContainer;
}
// Completed forward declares
// Type namespace: HMUI
namespace HMUI {
// Forward declaring type: HierarchyManager
class HierarchyManager;
}
#include "beatsaber-hook/shared/utils/il2cpp-type-check.hpp"
NEED_NO_BOX(::HMUI::HierarchyManager);
DEFINE_IL2CPP_ARG_TYPE(::HMUI::HierarchyManager*, "HMUI", "HierarchyManager");
// Type namespace: HMUI
namespace HMUI {
// Size: 0x30
#pragma pack(push, 1)
// Autogenerated type: HMUI.HierarchyManager
// [TokenAttribute] Offset: FFFFFFFF
class HierarchyManager : public ::UnityEngine::MonoBehaviour {
public:
#ifdef USE_CODEGEN_FIELDS
public:
#else
#ifdef CODEGEN_FIELD_ACCESSIBILITY
CODEGEN_FIELD_ACCESSIBILITY:
#else
protected:
#endif
#endif
// private HMUI.ScreenSystem _screenSystem
// Size: 0x8
// Offset: 0x18
::HMUI::ScreenSystem* screenSystem;
// Field size check
static_assert(sizeof(::HMUI::ScreenSystem*) == 0x8);
// [InjectAttribute] Offset: 0x123B234
// private GameScenesManager _gameScenesManager
// Size: 0x8
// Offset: 0x20
::GlobalNamespace::GameScenesManager* gameScenesManager;
// Field size check
static_assert(sizeof(::GlobalNamespace::GameScenesManager*) == 0x8);
// private HMUI.FlowCoordinator _rootFlowCoordinator
// Size: 0x8
// Offset: 0x28
::HMUI::FlowCoordinator* rootFlowCoordinator;
// Field size check
static_assert(sizeof(::HMUI::FlowCoordinator*) == 0x8);
public:
// Deleting conversion operator: operator ::System::IntPtr
constexpr operator ::System::IntPtr() const noexcept = delete;
// Get instance field reference: private HMUI.ScreenSystem _screenSystem
::HMUI::ScreenSystem*& dyn__screenSystem();
// Get instance field reference: private GameScenesManager _gameScenesManager
::GlobalNamespace::GameScenesManager*& dyn__gameScenesManager();
// Get instance field reference: private HMUI.FlowCoordinator _rootFlowCoordinator
::HMUI::FlowCoordinator*& dyn__rootFlowCoordinator();
// protected System.Void Start()
// Offset: 0x16EBAD4
void Start();
// protected System.Void OnDestroy()
// Offset: 0x16EBC90
void OnDestroy();
// private System.Void HandleSceneTransitionDidFinish(ScenesTransitionSetupDataSO scenesTransitionSetupData, Zenject.DiContainer container)
// Offset: 0x16EBBD4
void HandleSceneTransitionDidFinish(::GlobalNamespace::ScenesTransitionSetupDataSO* scenesTransitionSetupData, ::Zenject::DiContainer* container);
// private System.Void HandleBeforeDismissingScenes()
// Offset: 0x16EBD68
void HandleBeforeDismissingScenes();
// public System.Void StartWithFlowCoordinator(HMUI.FlowCoordinator flowCoordinator)
// Offset: 0x16EBE24
void StartWithFlowCoordinator(::HMUI::FlowCoordinator* flowCoordinator);
// public System.Void .ctor()
// Offset: 0x16EBE48
// Implemented from: UnityEngine.MonoBehaviour
// Base method: System.Void MonoBehaviour::.ctor()
// Base method: System.Void Behaviour::.ctor()
// Base method: System.Void Component::.ctor()
// Base method: System.Void Object::.ctor()
// Base method: System.Void Object::.ctor()
template<::il2cpp_utils::CreationType creationType = ::il2cpp_utils::CreationType::Temporary>
static HierarchyManager* New_ctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::HMUI::HierarchyManager::.ctor");
return THROW_UNLESS((::il2cpp_utils::New<HierarchyManager*, creationType>()));
}
}; // HMUI.HierarchyManager
#pragma pack(pop)
static check_size<sizeof(HierarchyManager), 40 + sizeof(::HMUI::FlowCoordinator*)> __HMUI_HierarchyManagerSizeCheck;
static_assert(sizeof(HierarchyManager) == 0x30);
}
#include "beatsaber-hook/shared/utils/il2cpp-utils-methods.hpp"
// Writing MetadataGetter for method: HMUI::HierarchyManager::Start
// Il2CppName: Start
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (HMUI::HierarchyManager::*)()>(&HMUI::HierarchyManager::Start)> {
static const MethodInfo* get() {
return ::il2cpp_utils::FindMethod(classof(HMUI::HierarchyManager*), "Start", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{});
}
};
// Writing MetadataGetter for method: HMUI::HierarchyManager::OnDestroy
// Il2CppName: OnDestroy
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (HMUI::HierarchyManager::*)()>(&HMUI::HierarchyManager::OnDestroy)> {
static const MethodInfo* get() {
return ::il2cpp_utils::FindMethod(classof(HMUI::HierarchyManager*), "OnDestroy", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{});
}
};
// Writing MetadataGetter for method: HMUI::HierarchyManager::HandleSceneTransitionDidFinish
// Il2CppName: HandleSceneTransitionDidFinish
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (HMUI::HierarchyManager::*)(::GlobalNamespace::ScenesTransitionSetupDataSO*, ::Zenject::DiContainer*)>(&HMUI::HierarchyManager::HandleSceneTransitionDidFinish)> {
static const MethodInfo* get() {
static auto* scenesTransitionSetupData = &::il2cpp_utils::GetClassFromName("", "ScenesTransitionSetupDataSO")->byval_arg;
static auto* container = &::il2cpp_utils::GetClassFromName("Zenject", "DiContainer")->byval_arg;
return ::il2cpp_utils::FindMethod(classof(HMUI::HierarchyManager*), "HandleSceneTransitionDidFinish", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{scenesTransitionSetupData, container});
}
};
// Writing MetadataGetter for method: HMUI::HierarchyManager::HandleBeforeDismissingScenes
// Il2CppName: HandleBeforeDismissingScenes
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (HMUI::HierarchyManager::*)()>(&HMUI::HierarchyManager::HandleBeforeDismissingScenes)> {
static const MethodInfo* get() {
return ::il2cpp_utils::FindMethod(classof(HMUI::HierarchyManager*), "HandleBeforeDismissingScenes", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{});
}
};
// Writing MetadataGetter for method: HMUI::HierarchyManager::StartWithFlowCoordinator
// Il2CppName: StartWithFlowCoordinator
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (HMUI::HierarchyManager::*)(::HMUI::FlowCoordinator*)>(&HMUI::HierarchyManager::StartWithFlowCoordinator)> {
static const MethodInfo* get() {
static auto* flowCoordinator = &::il2cpp_utils::GetClassFromName("HMUI", "FlowCoordinator")->byval_arg;
return ::il2cpp_utils::FindMethod(classof(HMUI::HierarchyManager*), "StartWithFlowCoordinator", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{flowCoordinator});
}
};
// Writing MetadataGetter for method: HMUI::HierarchyManager::New_ctor
// Il2CppName: .ctor
// Cannot get method pointer of value based method overload from template for constructor!
// Try using FindMethod instead!
| 48.876471
| 237
| 0.73282
|
RedBrumbler
|
c94c406b00cf49bf343116eabc871095a1580203
| 2,425
|
cpp
|
C++
|
SkyBox.cpp
|
soleilgames/Zinc
|
af34cd2698a8d392d266802a67b4607df6a79033
|
[
"MIT"
] | null | null | null |
SkyBox.cpp
|
soleilgames/Zinc
|
af34cd2698a8d392d266802a67b4607df6a79033
|
[
"MIT"
] | null | null | null |
SkyBox.cpp
|
soleilgames/Zinc
|
af34cd2698a8d392d266802a67b4607df6a79033
|
[
"MIT"
] | null | null | null |
/*
* Copyright (C) 2017 Florian GOLESTIN
*
* 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 <osg/Depth>
#include <osgUtil/CullVisitor>
#include "SkyBox.h"
SkyBox::SkyBox() {
setReferenceFrame(osg::Transform::ABSOLUTE_RF);
setCullingActive(false);
osg::StateSet *ss = getOrCreateStateSet();
ss->setAttributeAndModes(new osg::Depth(osg::Depth::LEQUAL, 1.0f, 1.0f));
ss->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
ss->setMode(GL_CULL_FACE, osg::StateAttribute::OFF);
ss->setRenderBinDetails(5, "RenderBin");
}
bool SkyBox::computeLocalToWorldMatrix(osg::Matrix &matrix,
osg::NodeVisitor *nv) const {
if (nv && nv->getVisitorType() == osg::NodeVisitor::CULL_VISITOR) {
osgUtil::CullVisitor *cv = static_cast<osgUtil::CullVisitor *>(nv);
matrix.preMult(osg::Matrix::translate(cv->getEyeLocal()));
return true;
} else
return osg::Transform::computeLocalToWorldMatrix(matrix, nv);
}
bool SkyBox::computeWorldToLocalMatrix(osg::Matrix &matrix,
osg::NodeVisitor *nv) const {
if (nv && nv->getVisitorType() == osg::NodeVisitor::CULL_VISITOR) {
osgUtil::CullVisitor *cv = static_cast<osgUtil::CullVisitor *>(nv);
matrix.postMult(osg::Matrix::translate(-cv->getEyeLocal()));
return true;
} else
return osg::Transform::computeWorldToLocalMatrix(matrix, nv);
}
| 43.303571
| 80
| 0.715052
|
soleilgames
|
c9559c08c8c8f002b7c3cf0e5c6d0a0ff30d6d02
| 703
|
hpp
|
C++
|
include/htool/types/virtual_generator.hpp
|
htool-ddm/htool
|
e4dbec7c08c5008e62344fd0d5ebfdf95ef8863f
|
[
"MIT"
] | 15
|
2020-05-06T15:20:42.000Z
|
2022-03-15T10:27:56.000Z
|
include/htool/types/virtual_generator.hpp
|
htool-ddm/htool
|
e4dbec7c08c5008e62344fd0d5ebfdf95ef8863f
|
[
"MIT"
] | 14
|
2020-05-25T13:59:11.000Z
|
2022-03-02T16:40:45.000Z
|
include/htool/types/virtual_generator.hpp
|
PierreMarchand20/htool
|
b6e91690f8d7c20d67dfb3b8db2e7ea674405a37
|
[
"MIT"
] | 2
|
2018-04-25T07:44:35.000Z
|
2019-11-05T16:57:00.000Z
|
#ifndef HTOOL_GENERATOR_HPP
#define HTOOL_GENERATOR_HPP
#include "vector.hpp"
#include <cassert>
#include <iterator>
namespace htool {
template <typename T>
class VirtualGenerator {
protected:
// Data members
int nr;
int nc;
int dimension;
public:
VirtualGenerator(int nr0, int nc0, int dimension0 = 1) : nr(nr0), nc(nc0), dimension(dimension0) {}
// C style
virtual void copy_submatrix(int M, int N, const int *const rows, const int *const cols, T *ptr) const = 0;
int nb_rows() const { return nr; }
int nb_cols() const { return nc; }
int get_dimension() const { return dimension; }
virtual ~VirtualGenerator(){};
};
} // namespace htool
#endif
| 20.676471
| 110
| 0.672831
|
htool-ddm
|
c958cb28035ae321dea1795ba9e70317e2d1b435
| 4,797
|
cpp
|
C++
|
src/Walker.cpp
|
SrinidhiSreenath/turtlebot-roomba
|
ec8d80c70ce077a8d2891557fbe9fa65f4f58bcc
|
[
"BSD-3-Clause"
] | null | null | null |
src/Walker.cpp
|
SrinidhiSreenath/turtlebot-roomba
|
ec8d80c70ce077a8d2891557fbe9fa65f4f58bcc
|
[
"BSD-3-Clause"
] | null | null | null |
src/Walker.cpp
|
SrinidhiSreenath/turtlebot-roomba
|
ec8d80c70ce077a8d2891557fbe9fa65f4f58bcc
|
[
"BSD-3-Clause"
] | null | null | null |
/************************************************************************************
* BSD 3-Clause License
* Copyright (c) 2018, Srinidhi Sreenath
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
************************************************************************************/
/**
* @file Walker.cpp
* @author Srinidhi Sreenath (SrinidhiSreenath)
* @date 11/18/2018
* @version 1.0
*
* @brief Walker class definition.
*
* @section DESCRIPTION
*
* Source file for class Walker. The class implements a simple walker algorithm
* to emulate roombs robot's behavior. The class commands the turtlebot to
* navigate and subscribes to laser scan data to check for potential
* collisions. If a possible collision is expected, the turtlebot is asked to
* navigate in a different direction to avoid collision.
*
*/
// Walker class header
#include "turtlebot_roomba/Walker.hpp"
// CPP Headers
#include <cmath>
#include <limits>
#include <vector>
Walker::Walker(ros::NodeHandle &n) : n_(n) {
ROS_INFO_STREAM("Walker Node Initialized!");
// Setup the velocity publisher topic with master
velocityPub_ =
n_.advertise<geometry_msgs::Twist>("/mobile_base/commands/velocity", 100);
// subscribe to the laserscan topic
laserSub_ = n_.subscribe("scan", 50, &Walker::processLaserScan, this);
}
Walker::~Walker() {}
void Walker::processLaserScan(const sensor_msgs::LaserScan::ConstPtr &scan) {
// Get min and max range values
auto minRange = scan->range_min;
auto maxRange = scan->range_max;
// Get angle resolution
auto angleRes = scan->angle_increment;
// Extract scan range values
std::vector<float> rangeValues = scan->ranges;
size_t size = rangeValues.size();
auto mid = size / 2;
// Check for obstacle within a range of 20 degrees from center i.e 10 degrees
// on left and 10 degrees on the right of center
float checkRange = 10 * M_PI / 180;
size_t checkRangeIncrement = checkRange / angleRes;
// Get minimum range value in that region of interest
float minDist = std::numeric_limits<float>::max();
for (size_t it = mid - checkRangeIncrement; it < mid + checkRangeIncrement;
it++) {
if (rangeValues[it] < minDist) {
minDist = rangeValues[it];
}
}
// ROS_DEBUG_STREAM("Minimum distance: " << minDist);
// If the scan value is invalid, then there is no change in turtlebot's
// behavior i.e keep going straight.
if (std::isnan(minDist) || minDist > maxRange || minDist < minRange) {
changeCourse_ = false;
navigate(changeCourse_);
return;
}
// If minimum distance is close i.e 1 meter, command the turtlebot to rotate
// else there is no change in course
if (minDist < 1.0) {
ROS_WARN_STREAM("Obstacle detected ahead! Changing course");
changeCourse_ = true;
} else {
changeCourse_ = false;
}
// Publish navigation command to turtlebot
navigate(changeCourse_);
}
void Walker::navigate(bool changeCourse) {
// the default behavior is to keep going straight. If change in course is
// requested, the turtlebot is commanded to rotate
if (changeCourse) {
msg.linear.x = 0.0;
msg.angular.z = -0.5;
} else {
msg.linear.x = 0.1;
msg.angular.z = 0.0;
}
// Publish the desired velocity commands
velocityPub_.publish(msg);
}
| 36.618321
| 86
| 0.693767
|
SrinidhiSreenath
|
c95c16202557ff8003219858c01790821bc06a4f
| 348,708
|
cc
|
C++
|
iWorkFileInspector/iWorkFileInspector/Messages/TSKArchives.pb.cc
|
obriensp/iWorkFileFormat
|
8575e441beaaaa56f480fdd91721f5bb06d07d43
|
[
"MIT"
] | 151
|
2015-01-07T01:39:17.000Z
|
2022-01-05T22:46:02.000Z
|
iWorkFileInspector/iWorkFileInspector/Messages/TSKArchives.pb.cc
|
Zearin/iWorkFileFormat
|
8575e441beaaaa56f480fdd91721f5bb06d07d43
|
[
"MIT"
] | 5
|
2015-06-29T14:34:38.000Z
|
2022-03-25T20:55:38.000Z
|
iWorkFileInspector/iWorkFileInspector/Messages/TSKArchives.pb.cc
|
Zearin/iWorkFileFormat
|
8575e441beaaaa56f480fdd91721f5bb06d07d43
|
[
"MIT"
] | 28
|
2015-01-09T01:45:20.000Z
|
2022-03-23T13:33:19.000Z
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: TSKArchives.proto
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "TSKArchives.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
namespace TSK {
namespace {
const ::google::protobuf::Descriptor* TreeNode_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
TreeNode_reflection_ = NULL;
const ::google::protobuf::Descriptor* CommandHistory_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
CommandHistory_reflection_ = NULL;
const ::google::protobuf::Descriptor* DocumentArchive_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
DocumentArchive_reflection_ = NULL;
const ::google::protobuf::Descriptor* DocumentSupportArchive_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
DocumentSupportArchive_reflection_ = NULL;
const ::google::protobuf::Descriptor* ViewStateArchive_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
ViewStateArchive_reflection_ = NULL;
const ::google::protobuf::Descriptor* CommandArchive_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
CommandArchive_reflection_ = NULL;
const ::google::protobuf::Descriptor* CommandGroupArchive_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
CommandGroupArchive_reflection_ = NULL;
const ::google::protobuf::Descriptor* CommandContainerArchive_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
CommandContainerArchive_reflection_ = NULL;
const ::google::protobuf::Descriptor* ReplaceAllChildCommandArchive_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
ReplaceAllChildCommandArchive_reflection_ = NULL;
const ::google::protobuf::Descriptor* ReplaceAllCommandArchive_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
ReplaceAllCommandArchive_reflection_ = NULL;
const ::google::protobuf::Descriptor* ShuffleMappingArchive_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
ShuffleMappingArchive_reflection_ = NULL;
const ::google::protobuf::Descriptor* ShuffleMappingArchive_Entry_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
ShuffleMappingArchive_Entry_reflection_ = NULL;
const ::google::protobuf::Descriptor* ProgressiveCommandGroupArchive_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
ProgressiveCommandGroupArchive_reflection_ = NULL;
const ::google::protobuf::Descriptor* CommandSelectionBehaviorHistoryArchive_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
CommandSelectionBehaviorHistoryArchive_reflection_ = NULL;
const ::google::protobuf::Descriptor* CommandSelectionBehaviorHistoryArchive_Entry_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
CommandSelectionBehaviorHistoryArchive_Entry_reflection_ = NULL;
const ::google::protobuf::Descriptor* UndoRedoStateCommandSelectionBehaviorArchive_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
UndoRedoStateCommandSelectionBehaviorArchive_reflection_ = NULL;
const ::google::protobuf::Descriptor* FormatStructArchive_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
FormatStructArchive_reflection_ = NULL;
const ::google::protobuf::Descriptor* CustomFormatArchive_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
CustomFormatArchive_reflection_ = NULL;
const ::google::protobuf::Descriptor* CustomFormatArchive_Condition_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
CustomFormatArchive_Condition_reflection_ = NULL;
const ::google::protobuf::Descriptor* AnnotationAuthorArchive_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
AnnotationAuthorArchive_reflection_ = NULL;
const ::google::protobuf::Descriptor* DeprecatedChangeAuthorArchive_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
DeprecatedChangeAuthorArchive_reflection_ = NULL;
const ::google::protobuf::Descriptor* AnnotationAuthorStorageArchive_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
AnnotationAuthorStorageArchive_reflection_ = NULL;
const ::google::protobuf::Descriptor* AddAnnotationAuthorCommandArchive_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
AddAnnotationAuthorCommandArchive_reflection_ = NULL;
const ::google::protobuf::Descriptor* SetAnnotationAuthorColorCommandArchive_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
SetAnnotationAuthorColorCommandArchive_reflection_ = NULL;
} // namespace
void protobuf_AssignDesc_TSKArchives_2eproto() {
protobuf_AddDesc_TSKArchives_2eproto();
const ::google::protobuf::FileDescriptor* file =
::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
"TSKArchives.proto");
GOOGLE_CHECK(file != NULL);
TreeNode_descriptor_ = file->message_type(0);
static const int TreeNode_offsets_[3] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TreeNode, name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TreeNode, children_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TreeNode, object_),
};
TreeNode_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
TreeNode_descriptor_,
TreeNode::default_instance_,
TreeNode_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TreeNode, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TreeNode, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(TreeNode));
CommandHistory_descriptor_ = file->message_type(1);
static const int CommandHistory_offsets_[5] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandHistory, undo_count_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandHistory, commands_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandHistory, marked_redo_commands_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandHistory, pending_preflight_command_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandHistory, fixed_radar_13365177_),
};
CommandHistory_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
CommandHistory_descriptor_,
CommandHistory::default_instance_,
CommandHistory_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandHistory, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandHistory, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(CommandHistory));
DocumentArchive_descriptor_ = file->message_type(2);
static const int DocumentArchive_offsets_[2] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DocumentArchive, locale_identifier_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DocumentArchive, annotation_author_storage_),
};
DocumentArchive_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
DocumentArchive_descriptor_,
DocumentArchive::default_instance_,
DocumentArchive_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DocumentArchive, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DocumentArchive, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(DocumentArchive));
DocumentSupportArchive_descriptor_ = file->message_type(3);
static const int DocumentSupportArchive_offsets_[7] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DocumentSupportArchive, command_history_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DocumentSupportArchive, command_selection_behavior_history_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DocumentSupportArchive, undo_count_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DocumentSupportArchive, redo_count_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DocumentSupportArchive, undo_action_string_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DocumentSupportArchive, redo_action_string_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DocumentSupportArchive, web_state_),
};
DocumentSupportArchive_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
DocumentSupportArchive_descriptor_,
DocumentSupportArchive::default_instance_,
DocumentSupportArchive_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DocumentSupportArchive, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DocumentSupportArchive, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(DocumentSupportArchive));
ViewStateArchive_descriptor_ = file->message_type(4);
static const int ViewStateArchive_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ViewStateArchive, view_state_root_),
};
ViewStateArchive_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
ViewStateArchive_descriptor_,
ViewStateArchive::default_instance_,
ViewStateArchive_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ViewStateArchive, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ViewStateArchive, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(ViewStateArchive));
CommandArchive_descriptor_ = file->message_type(5);
static const int CommandArchive_offsets_[2] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandArchive, undoredostate_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandArchive, undocollection_),
};
CommandArchive_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
CommandArchive_descriptor_,
CommandArchive::default_instance_,
CommandArchive_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandArchive, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandArchive, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(CommandArchive));
CommandGroupArchive_descriptor_ = file->message_type(6);
static const int CommandGroupArchive_offsets_[3] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandGroupArchive, super_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandGroupArchive, commands_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandGroupArchive, process_results_),
};
CommandGroupArchive_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
CommandGroupArchive_descriptor_,
CommandGroupArchive::default_instance_,
CommandGroupArchive_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandGroupArchive, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandGroupArchive, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(CommandGroupArchive));
CommandContainerArchive_descriptor_ = file->message_type(7);
static const int CommandContainerArchive_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandContainerArchive, commands_),
};
CommandContainerArchive_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
CommandContainerArchive_descriptor_,
CommandContainerArchive::default_instance_,
CommandContainerArchive_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandContainerArchive, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandContainerArchive, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(CommandContainerArchive));
ReplaceAllChildCommandArchive_descriptor_ = file->message_type(8);
static const int ReplaceAllChildCommandArchive_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReplaceAllChildCommandArchive, super_),
};
ReplaceAllChildCommandArchive_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
ReplaceAllChildCommandArchive_descriptor_,
ReplaceAllChildCommandArchive::default_instance_,
ReplaceAllChildCommandArchive_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReplaceAllChildCommandArchive, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReplaceAllChildCommandArchive, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(ReplaceAllChildCommandArchive));
ReplaceAllCommandArchive_descriptor_ = file->message_type(9);
static const int ReplaceAllCommandArchive_offsets_[5] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReplaceAllCommandArchive, super_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReplaceAllCommandArchive, commands_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReplaceAllCommandArchive, find_string_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReplaceAllCommandArchive, replace_string_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReplaceAllCommandArchive, options_),
};
ReplaceAllCommandArchive_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
ReplaceAllCommandArchive_descriptor_,
ReplaceAllCommandArchive::default_instance_,
ReplaceAllCommandArchive_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReplaceAllCommandArchive, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReplaceAllCommandArchive, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(ReplaceAllCommandArchive));
ShuffleMappingArchive_descriptor_ = file->message_type(10);
static const int ShuffleMappingArchive_offsets_[8] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ShuffleMappingArchive, start_index_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ShuffleMappingArchive, end_index_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ShuffleMappingArchive, entries_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ShuffleMappingArchive, is_vertical_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ShuffleMappingArchive, is_move_operation_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ShuffleMappingArchive, first_moved_index_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ShuffleMappingArchive, destination_index_for_move_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ShuffleMappingArchive, number_of_indices_moved_),
};
ShuffleMappingArchive_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
ShuffleMappingArchive_descriptor_,
ShuffleMappingArchive::default_instance_,
ShuffleMappingArchive_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ShuffleMappingArchive, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ShuffleMappingArchive, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(ShuffleMappingArchive));
ShuffleMappingArchive_Entry_descriptor_ = ShuffleMappingArchive_descriptor_->nested_type(0);
static const int ShuffleMappingArchive_Entry_offsets_[2] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ShuffleMappingArchive_Entry, from_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ShuffleMappingArchive_Entry, to_),
};
ShuffleMappingArchive_Entry_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
ShuffleMappingArchive_Entry_descriptor_,
ShuffleMappingArchive_Entry::default_instance_,
ShuffleMappingArchive_Entry_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ShuffleMappingArchive_Entry, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ShuffleMappingArchive_Entry, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(ShuffleMappingArchive_Entry));
ProgressiveCommandGroupArchive_descriptor_ = file->message_type(11);
static const int ProgressiveCommandGroupArchive_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ProgressiveCommandGroupArchive, super_),
};
ProgressiveCommandGroupArchive_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
ProgressiveCommandGroupArchive_descriptor_,
ProgressiveCommandGroupArchive::default_instance_,
ProgressiveCommandGroupArchive_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ProgressiveCommandGroupArchive, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ProgressiveCommandGroupArchive, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(ProgressiveCommandGroupArchive));
CommandSelectionBehaviorHistoryArchive_descriptor_ = file->message_type(12);
static const int CommandSelectionBehaviorHistoryArchive_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandSelectionBehaviorHistoryArchive, entries_),
};
CommandSelectionBehaviorHistoryArchive_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
CommandSelectionBehaviorHistoryArchive_descriptor_,
CommandSelectionBehaviorHistoryArchive::default_instance_,
CommandSelectionBehaviorHistoryArchive_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandSelectionBehaviorHistoryArchive, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandSelectionBehaviorHistoryArchive, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(CommandSelectionBehaviorHistoryArchive));
CommandSelectionBehaviorHistoryArchive_Entry_descriptor_ = CommandSelectionBehaviorHistoryArchive_descriptor_->nested_type(0);
static const int CommandSelectionBehaviorHistoryArchive_Entry_offsets_[2] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandSelectionBehaviorHistoryArchive_Entry, command_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandSelectionBehaviorHistoryArchive_Entry, command_selection_behavior_),
};
CommandSelectionBehaviorHistoryArchive_Entry_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
CommandSelectionBehaviorHistoryArchive_Entry_descriptor_,
CommandSelectionBehaviorHistoryArchive_Entry::default_instance_,
CommandSelectionBehaviorHistoryArchive_Entry_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandSelectionBehaviorHistoryArchive_Entry, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CommandSelectionBehaviorHistoryArchive_Entry, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(CommandSelectionBehaviorHistoryArchive_Entry));
UndoRedoStateCommandSelectionBehaviorArchive_descriptor_ = file->message_type(13);
static const int UndoRedoStateCommandSelectionBehaviorArchive_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UndoRedoStateCommandSelectionBehaviorArchive, undo_redo_state_),
};
UndoRedoStateCommandSelectionBehaviorArchive_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
UndoRedoStateCommandSelectionBehaviorArchive_descriptor_,
UndoRedoStateCommandSelectionBehaviorArchive::default_instance_,
UndoRedoStateCommandSelectionBehaviorArchive_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UndoRedoStateCommandSelectionBehaviorArchive, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UndoRedoStateCommandSelectionBehaviorArchive, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(UndoRedoStateCommandSelectionBehaviorArchive));
FormatStructArchive_descriptor_ = file->message_type(14);
static const int FormatStructArchive_offsets_[40] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, format_type_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, decimal_places_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, currency_code_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, negative_style_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, show_thousands_separator_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, use_accounting_style_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, duration_style_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, base_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, base_places_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, base_use_minus_sign_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, fraction_accuracy_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, suppress_date_format_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, suppress_time_format_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, date_time_format_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, duration_unit_largest_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, duration_unit_smallest_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, custom_id_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, custom_format_string_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, scale_factor_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, requires_fraction_replacement_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, control_minimum_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, control_maximum_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, control_increment_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, control_format_type_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, slider_orientation_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, slider_position_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, decimal_width_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, min_integer_width_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, num_nonspace_integer_digits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, num_nonspace_decimal_digits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, index_from_right_last_integer_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, interstitial_strings_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, inters_str_insertion_indexes_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, num_hash_decimal_digits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, total_num_decimal_digits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, is_complex_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, contains_integer_token_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, multiple_choice_list_initial_value_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, multiple_choice_list_id_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, use_automatic_duration_units_),
};
FormatStructArchive_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
FormatStructArchive_descriptor_,
FormatStructArchive::default_instance_,
FormatStructArchive_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, _unknown_fields_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormatStructArchive, _extensions_),
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(FormatStructArchive));
CustomFormatArchive_descriptor_ = file->message_type(15);
static const int CustomFormatArchive_offsets_[4] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomFormatArchive, name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomFormatArchive, format_type_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomFormatArchive, default_format_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomFormatArchive, conditions_),
};
CustomFormatArchive_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
CustomFormatArchive_descriptor_,
CustomFormatArchive::default_instance_,
CustomFormatArchive_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomFormatArchive, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomFormatArchive, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(CustomFormatArchive));
CustomFormatArchive_Condition_descriptor_ = CustomFormatArchive_descriptor_->nested_type(0);
static const int CustomFormatArchive_Condition_offsets_[4] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomFormatArchive_Condition, condition_type_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomFormatArchive_Condition, condition_value_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomFormatArchive_Condition, condition_format_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomFormatArchive_Condition, condition_value_dbl_),
};
CustomFormatArchive_Condition_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
CustomFormatArchive_Condition_descriptor_,
CustomFormatArchive_Condition::default_instance_,
CustomFormatArchive_Condition_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomFormatArchive_Condition, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CustomFormatArchive_Condition, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(CustomFormatArchive_Condition));
AnnotationAuthorArchive_descriptor_ = file->message_type(16);
static const int AnnotationAuthorArchive_offsets_[2] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AnnotationAuthorArchive, name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AnnotationAuthorArchive, color_),
};
AnnotationAuthorArchive_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
AnnotationAuthorArchive_descriptor_,
AnnotationAuthorArchive::default_instance_,
AnnotationAuthorArchive_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AnnotationAuthorArchive, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AnnotationAuthorArchive, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(AnnotationAuthorArchive));
DeprecatedChangeAuthorArchive_descriptor_ = file->message_type(17);
static const int DeprecatedChangeAuthorArchive_offsets_[2] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DeprecatedChangeAuthorArchive, name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DeprecatedChangeAuthorArchive, change_color_),
};
DeprecatedChangeAuthorArchive_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
DeprecatedChangeAuthorArchive_descriptor_,
DeprecatedChangeAuthorArchive::default_instance_,
DeprecatedChangeAuthorArchive_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DeprecatedChangeAuthorArchive, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DeprecatedChangeAuthorArchive, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(DeprecatedChangeAuthorArchive));
AnnotationAuthorStorageArchive_descriptor_ = file->message_type(18);
static const int AnnotationAuthorStorageArchive_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AnnotationAuthorStorageArchive, annotation_author_),
};
AnnotationAuthorStorageArchive_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
AnnotationAuthorStorageArchive_descriptor_,
AnnotationAuthorStorageArchive::default_instance_,
AnnotationAuthorStorageArchive_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AnnotationAuthorStorageArchive, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AnnotationAuthorStorageArchive, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(AnnotationAuthorStorageArchive));
AddAnnotationAuthorCommandArchive_descriptor_ = file->message_type(19);
static const int AddAnnotationAuthorCommandArchive_offsets_[3] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AddAnnotationAuthorCommandArchive, super_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AddAnnotationAuthorCommandArchive, document_root_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AddAnnotationAuthorCommandArchive, annotation_author_),
};
AddAnnotationAuthorCommandArchive_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
AddAnnotationAuthorCommandArchive_descriptor_,
AddAnnotationAuthorCommandArchive::default_instance_,
AddAnnotationAuthorCommandArchive_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AddAnnotationAuthorCommandArchive, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AddAnnotationAuthorCommandArchive, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(AddAnnotationAuthorCommandArchive));
SetAnnotationAuthorColorCommandArchive_descriptor_ = file->message_type(20);
static const int SetAnnotationAuthorColorCommandArchive_offsets_[3] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SetAnnotationAuthorColorCommandArchive, super_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SetAnnotationAuthorColorCommandArchive, annotation_author_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SetAnnotationAuthorColorCommandArchive, color_),
};
SetAnnotationAuthorColorCommandArchive_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
SetAnnotationAuthorColorCommandArchive_descriptor_,
SetAnnotationAuthorColorCommandArchive::default_instance_,
SetAnnotationAuthorColorCommandArchive_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SetAnnotationAuthorColorCommandArchive, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SetAnnotationAuthorColorCommandArchive, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(SetAnnotationAuthorColorCommandArchive));
}
namespace {
GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
inline void protobuf_AssignDescriptorsOnce() {
::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
&protobuf_AssignDesc_TSKArchives_2eproto);
}
void protobuf_RegisterTypes(const ::std::string&) {
protobuf_AssignDescriptorsOnce();
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
TreeNode_descriptor_, &TreeNode::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
CommandHistory_descriptor_, &CommandHistory::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
DocumentArchive_descriptor_, &DocumentArchive::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
DocumentSupportArchive_descriptor_, &DocumentSupportArchive::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
ViewStateArchive_descriptor_, &ViewStateArchive::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
CommandArchive_descriptor_, &CommandArchive::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
CommandGroupArchive_descriptor_, &CommandGroupArchive::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
CommandContainerArchive_descriptor_, &CommandContainerArchive::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
ReplaceAllChildCommandArchive_descriptor_, &ReplaceAllChildCommandArchive::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
ReplaceAllCommandArchive_descriptor_, &ReplaceAllCommandArchive::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
ShuffleMappingArchive_descriptor_, &ShuffleMappingArchive::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
ShuffleMappingArchive_Entry_descriptor_, &ShuffleMappingArchive_Entry::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
ProgressiveCommandGroupArchive_descriptor_, &ProgressiveCommandGroupArchive::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
CommandSelectionBehaviorHistoryArchive_descriptor_, &CommandSelectionBehaviorHistoryArchive::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
CommandSelectionBehaviorHistoryArchive_Entry_descriptor_, &CommandSelectionBehaviorHistoryArchive_Entry::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
UndoRedoStateCommandSelectionBehaviorArchive_descriptor_, &UndoRedoStateCommandSelectionBehaviorArchive::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
FormatStructArchive_descriptor_, &FormatStructArchive::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
CustomFormatArchive_descriptor_, &CustomFormatArchive::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
CustomFormatArchive_Condition_descriptor_, &CustomFormatArchive_Condition::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
AnnotationAuthorArchive_descriptor_, &AnnotationAuthorArchive::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
DeprecatedChangeAuthorArchive_descriptor_, &DeprecatedChangeAuthorArchive::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
AnnotationAuthorStorageArchive_descriptor_, &AnnotationAuthorStorageArchive::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
AddAnnotationAuthorCommandArchive_descriptor_, &AddAnnotationAuthorCommandArchive::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
SetAnnotationAuthorColorCommandArchive_descriptor_, &SetAnnotationAuthorColorCommandArchive::default_instance());
}
} // namespace
void protobuf_ShutdownFile_TSKArchives_2eproto() {
delete TreeNode::default_instance_;
delete TreeNode_reflection_;
delete CommandHistory::default_instance_;
delete CommandHistory_reflection_;
delete DocumentArchive::default_instance_;
delete DocumentArchive_reflection_;
delete DocumentSupportArchive::default_instance_;
delete DocumentSupportArchive_reflection_;
delete ViewStateArchive::default_instance_;
delete ViewStateArchive_reflection_;
delete CommandArchive::default_instance_;
delete CommandArchive_reflection_;
delete CommandGroupArchive::default_instance_;
delete CommandGroupArchive_reflection_;
delete CommandContainerArchive::default_instance_;
delete CommandContainerArchive_reflection_;
delete ReplaceAllChildCommandArchive::default_instance_;
delete ReplaceAllChildCommandArchive_reflection_;
delete ReplaceAllCommandArchive::default_instance_;
delete ReplaceAllCommandArchive_reflection_;
delete ShuffleMappingArchive::default_instance_;
delete ShuffleMappingArchive_reflection_;
delete ShuffleMappingArchive_Entry::default_instance_;
delete ShuffleMappingArchive_Entry_reflection_;
delete ProgressiveCommandGroupArchive::default_instance_;
delete ProgressiveCommandGroupArchive_reflection_;
delete CommandSelectionBehaviorHistoryArchive::default_instance_;
delete CommandSelectionBehaviorHistoryArchive_reflection_;
delete CommandSelectionBehaviorHistoryArchive_Entry::default_instance_;
delete CommandSelectionBehaviorHistoryArchive_Entry_reflection_;
delete UndoRedoStateCommandSelectionBehaviorArchive::default_instance_;
delete UndoRedoStateCommandSelectionBehaviorArchive_reflection_;
delete FormatStructArchive::default_instance_;
delete FormatStructArchive_reflection_;
delete CustomFormatArchive::default_instance_;
delete CustomFormatArchive_reflection_;
delete CustomFormatArchive_Condition::default_instance_;
delete CustomFormatArchive_Condition_reflection_;
delete AnnotationAuthorArchive::default_instance_;
delete AnnotationAuthorArchive_reflection_;
delete DeprecatedChangeAuthorArchive::default_instance_;
delete DeprecatedChangeAuthorArchive_reflection_;
delete AnnotationAuthorStorageArchive::default_instance_;
delete AnnotationAuthorStorageArchive_reflection_;
delete AddAnnotationAuthorCommandArchive::default_instance_;
delete AddAnnotationAuthorCommandArchive_reflection_;
delete SetAnnotationAuthorColorCommandArchive::default_instance_;
delete SetAnnotationAuthorColorCommandArchive_reflection_;
}
void protobuf_AddDesc_TSKArchives_2eproto() {
static bool already_here = false;
if (already_here) return;
already_here = true;
GOOGLE_PROTOBUF_VERIFY_VERSION;
::TSP::protobuf_AddDesc_TSPMessages_2eproto();
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
"\n\021TSKArchives.proto\022\003TSK\032\021TSPMessages.pr"
"oto\"Z\n\010TreeNode\022\014\n\004name\030\001 \001(\t\022 \n\010childre"
"n\030\002 \003(\0132\016.TSP.Reference\022\036\n\006object\030\003 \001(\0132"
"\016.TSP.Reference\"\305\001\n\016CommandHistory\022\022\n\nun"
"do_count\030\001 \002(\r\022 \n\010commands\030\002 \003(\0132\016.TSP.R"
"eference\022,\n\024marked_redo_commands\030\003 \003(\0132\016"
".TSP.Reference\0221\n\031pending_preflight_comm"
"and\030\004 \001(\0132\016.TSP.Reference\022\034\n\024fixed_radar"
"_13365177\030\n \001(\010\"_\n\017DocumentArchive\022\031\n\021lo"
"cale_identifier\030\004 \001(\t\0221\n\031annotation_auth"
"or_storage\030\007 \001(\0132\016.TSP.Reference\"\200\002\n\026Doc"
"umentSupportArchive\022\'\n\017command_history\030\001"
" \001(\0132\016.TSP.Reference\022:\n\"command_selectio"
"n_behavior_history\030\002 \001(\0132\016.TSP.Reference"
"\022\022\n\nundo_count\030\004 \001(\r\022\022\n\nredo_count\030\005 \001(\r"
"\022\032\n\022undo_action_string\030\006 \001(\t\022\032\n\022redo_act"
"ion_string\030\007 \001(\t\022!\n\tweb_state\030\010 \001(\0132\016.TS"
"P.Reference\";\n\020ViewStateArchive\022\'\n\017view_"
"state_root\030\001 \002(\0132\016.TSP.Reference\"_\n\016Comm"
"andArchive\022%\n\rundoRedoState\030\001 \001(\0132\016.TSP."
"Reference\022&\n\016undoCollection\030\002 \001(\0132\016.TSP."
"Reference\"\203\001\n\023CommandGroupArchive\022\"\n\005sup"
"er\030\001 \002(\0132\023.TSK.CommandArchive\022 \n\010command"
"s\030\002 \003(\0132\016.TSP.Reference\022&\n\017process_resul"
"ts\030\003 \001(\0132\r.TSP.IndexSet\";\n\027CommandContai"
"nerArchive\022 \n\010commands\030\001 \003(\0132\016.TSP.Refer"
"ence\"C\n\035ReplaceAllChildCommandArchive\022\"\n"
"\005super\030\001 \002(\0132\023.TSK.CommandArchive\"\236\001\n\030Re"
"placeAllCommandArchive\022\"\n\005super\030\001 \002(\0132\023."
"TSK.CommandArchive\022 \n\010commands\030\002 \003(\0132\016.T"
"SP.Reference\022\023\n\013find_string\030\003 \002(\t\022\026\n\016rep"
"lace_string\030\004 \002(\t\022\017\n\007options\030\005 \002(\r\"\273\002\n\025S"
"huffleMappingArchive\022\023\n\013start_index\030\001 \002("
"\r\022\021\n\tend_index\030\002 \002(\r\0221\n\007entries\030\003 \003(\0132 ."
"TSK.ShuffleMappingArchive.Entry\022\031\n\013is_ve"
"rtical\030\004 \001(\010:\004true\022 \n\021is_move_operation\030"
"\005 \001(\010:\005false\022\034\n\021first_moved_index\030\006 \001(\r:"
"\0010\022%\n\032destination_index_for_move\030\007 \001(\r:\001"
"0\022\"\n\027number_of_indices_moved\030\010 \001(\r:\0010\032!\n"
"\005Entry\022\014\n\004from\030\001 \002(\r\022\n\n\002to\030\002 \002(\r\"I\n\036Prog"
"ressiveCommandGroupArchive\022\'\n\005super\030\001 \002("
"\0132\030.TSK.CommandGroupArchive\"\312\001\n&CommandS"
"electionBehaviorHistoryArchive\022B\n\007entrie"
"s\030\001 \003(\01321.TSK.CommandSelectionBehaviorHi"
"storyArchive.Entry\032\\\n\005Entry\022\037\n\007command\030\001"
" \002(\0132\016.TSP.Reference\0222\n\032command_selectio"
"n_behavior\030\002 \002(\0132\016.TSP.Reference\"W\n,Undo"
"RedoStateCommandSelectionBehaviorArchive"
"\022\'\n\017undo_redo_state\030\002 \001(\0132\016.TSP.Referenc"
"e\"\257\t\n\023FormatStructArchive\022\023\n\013format_type"
"\030\001 \002(\r\022\026\n\016decimal_places\030\002 \001(\r\022\025\n\rcurren"
"cy_code\030\003 \001(\t\022\026\n\016negative_style\030\004 \001(\r\022 \n"
"\030show_thousands_separator\030\005 \001(\010\022\034\n\024use_a"
"ccounting_style\030\006 \001(\010\022\026\n\016duration_style\030"
"\007 \001(\r\022\014\n\004base\030\010 \001(\r\022\023\n\013base_places\030\t \001(\r"
"\022\033\n\023base_use_minus_sign\030\n \001(\010\022\031\n\021fractio"
"n_accuracy\030\013 \001(\r\022\034\n\024suppress_date_format"
"\030\014 \001(\010\022\034\n\024suppress_time_format\030\r \001(\010\022\030\n\020"
"date_time_format\030\016 \001(\t\022\035\n\025duration_unit_"
"largest\030\017 \001(\r\022\036\n\026duration_unit_smallest\030"
"\020 \001(\r\022\021\n\tcustom_id\030\021 \001(\r\022\034\n\024custom_forma"
"t_string\030\022 \001(\t\022\024\n\014scale_factor\030\023 \001(\001\022%\n\035"
"requires_fraction_replacement\030\024 \001(\010\022\027\n\017c"
"ontrol_minimum\030\025 \001(\001\022\027\n\017control_maximum\030"
"\026 \001(\001\022\031\n\021control_increment\030\027 \001(\001\022\033\n\023cont"
"rol_format_type\030\030 \001(\r\022\032\n\022slider_orientat"
"ion\030\031 \001(\r\022\027\n\017slider_position\030\032 \001(\r\022\025\n\rde"
"cimal_width\030\033 \001(\r\022\031\n\021min_integer_width\030\034"
" \001(\r\022#\n\033num_nonspace_integer_digits\030\035 \001("
"\r\022#\n\033num_nonspace_decimal_digits\030\036 \001(\r\022%"
"\n\035index_from_right_last_integer\030\037 \001(\r\022\034\n"
"\024interstitial_strings\030 \003(\t\0223\n\034inters_st"
"r_insertion_indexes\030! \001(\0132\r.TSP.IndexSet"
"\022\037\n\027num_hash_decimal_digits\030\" \001(\r\022 \n\030tot"
"al_num_decimal_digits\030# \001(\r\022\022\n\nis_comple"
"x\030$ \001(\010\022\036\n\026contains_integer_token\030% \001(\010\022"
"*\n\"multiple_choice_list_initial_value\030& "
"\001(\r\022\037\n\027multiple_choice_list_id\030\' \001(\r\022$\n\034"
"use_automatic_duration_units\030( \001(\010*\007\010\220N\020"
"\240\234\001\"\262\002\n\023CustomFormatArchive\022\014\n\004name\030\001 \002("
"\t\022\023\n\013format_type\030\002 \002(\r\0220\n\016default_format"
"\030\003 \002(\0132\030.TSK.FormatStructArchive\0226\n\ncond"
"itions\030\004 \003(\0132\".TSK.CustomFormatArchive.C"
"ondition\032\215\001\n\tCondition\022\026\n\016condition_type"
"\030\001 \002(\r\022\027\n\017condition_value\030\002 \001(\002\0222\n\020condi"
"tion_format\030\003 \002(\0132\030.TSK.FormatStructArch"
"ive\022\033\n\023condition_value_dbl\030\004 \001(\001\"B\n\027Anno"
"tationAuthorArchive\022\014\n\004name\030\001 \001(\t\022\031\n\005col"
"or\030\002 \001(\0132\n.TSP.Color\"O\n\035DeprecatedChange"
"AuthorArchive\022\014\n\004name\030\001 \001(\t\022 \n\014change_co"
"lor\030\002 \001(\0132\n.TSP.Color\"K\n\036AnnotationAutho"
"rStorageArchive\022)\n\021annotation_author\030\001 \003"
"(\0132\016.TSP.Reference\"\231\001\n!AddAnnotationAuth"
"orCommandArchive\022\"\n\005super\030\001 \002(\0132\023.TSK.Co"
"mmandArchive\022%\n\rdocument_root\030\002 \001(\0132\016.TS"
"P.Reference\022)\n\021annotation_author\030\003 \001(\0132\016"
".TSP.Reference\"\222\001\n&SetAnnotationAuthorCo"
"lorCommandArchive\022\"\n\005super\030\001 \002(\0132\023.TSK.C"
"ommandArchive\022)\n\021annotation_author\030\002 \001(\013"
"2\016.TSP.Reference\022\031\n\005color\030\003 \001(\0132\n.TSP.Co"
"lor", 4003);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"TSKArchives.proto", &protobuf_RegisterTypes);
TreeNode::default_instance_ = new TreeNode();
CommandHistory::default_instance_ = new CommandHistory();
DocumentArchive::default_instance_ = new DocumentArchive();
DocumentSupportArchive::default_instance_ = new DocumentSupportArchive();
ViewStateArchive::default_instance_ = new ViewStateArchive();
CommandArchive::default_instance_ = new CommandArchive();
CommandGroupArchive::default_instance_ = new CommandGroupArchive();
CommandContainerArchive::default_instance_ = new CommandContainerArchive();
ReplaceAllChildCommandArchive::default_instance_ = new ReplaceAllChildCommandArchive();
ReplaceAllCommandArchive::default_instance_ = new ReplaceAllCommandArchive();
ShuffleMappingArchive::default_instance_ = new ShuffleMappingArchive();
ShuffleMappingArchive_Entry::default_instance_ = new ShuffleMappingArchive_Entry();
ProgressiveCommandGroupArchive::default_instance_ = new ProgressiveCommandGroupArchive();
CommandSelectionBehaviorHistoryArchive::default_instance_ = new CommandSelectionBehaviorHistoryArchive();
CommandSelectionBehaviorHistoryArchive_Entry::default_instance_ = new CommandSelectionBehaviorHistoryArchive_Entry();
UndoRedoStateCommandSelectionBehaviorArchive::default_instance_ = new UndoRedoStateCommandSelectionBehaviorArchive();
FormatStructArchive::default_instance_ = new FormatStructArchive();
CustomFormatArchive::default_instance_ = new CustomFormatArchive();
CustomFormatArchive_Condition::default_instance_ = new CustomFormatArchive_Condition();
AnnotationAuthorArchive::default_instance_ = new AnnotationAuthorArchive();
DeprecatedChangeAuthorArchive::default_instance_ = new DeprecatedChangeAuthorArchive();
AnnotationAuthorStorageArchive::default_instance_ = new AnnotationAuthorStorageArchive();
AddAnnotationAuthorCommandArchive::default_instance_ = new AddAnnotationAuthorCommandArchive();
SetAnnotationAuthorColorCommandArchive::default_instance_ = new SetAnnotationAuthorColorCommandArchive();
TreeNode::default_instance_->InitAsDefaultInstance();
CommandHistory::default_instance_->InitAsDefaultInstance();
DocumentArchive::default_instance_->InitAsDefaultInstance();
DocumentSupportArchive::default_instance_->InitAsDefaultInstance();
ViewStateArchive::default_instance_->InitAsDefaultInstance();
CommandArchive::default_instance_->InitAsDefaultInstance();
CommandGroupArchive::default_instance_->InitAsDefaultInstance();
CommandContainerArchive::default_instance_->InitAsDefaultInstance();
ReplaceAllChildCommandArchive::default_instance_->InitAsDefaultInstance();
ReplaceAllCommandArchive::default_instance_->InitAsDefaultInstance();
ShuffleMappingArchive::default_instance_->InitAsDefaultInstance();
ShuffleMappingArchive_Entry::default_instance_->InitAsDefaultInstance();
ProgressiveCommandGroupArchive::default_instance_->InitAsDefaultInstance();
CommandSelectionBehaviorHistoryArchive::default_instance_->InitAsDefaultInstance();
CommandSelectionBehaviorHistoryArchive_Entry::default_instance_->InitAsDefaultInstance();
UndoRedoStateCommandSelectionBehaviorArchive::default_instance_->InitAsDefaultInstance();
FormatStructArchive::default_instance_->InitAsDefaultInstance();
CustomFormatArchive::default_instance_->InitAsDefaultInstance();
CustomFormatArchive_Condition::default_instance_->InitAsDefaultInstance();
AnnotationAuthorArchive::default_instance_->InitAsDefaultInstance();
DeprecatedChangeAuthorArchive::default_instance_->InitAsDefaultInstance();
AnnotationAuthorStorageArchive::default_instance_->InitAsDefaultInstance();
AddAnnotationAuthorCommandArchive::default_instance_->InitAsDefaultInstance();
SetAnnotationAuthorColorCommandArchive::default_instance_->InitAsDefaultInstance();
::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_TSKArchives_2eproto);
}
// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_TSKArchives_2eproto {
StaticDescriptorInitializer_TSKArchives_2eproto() {
protobuf_AddDesc_TSKArchives_2eproto();
}
} static_descriptor_initializer_TSKArchives_2eproto_;
// ===================================================================
#ifndef _MSC_VER
const int TreeNode::kNameFieldNumber;
const int TreeNode::kChildrenFieldNumber;
const int TreeNode::kObjectFieldNumber;
#endif // !_MSC_VER
TreeNode::TreeNode()
: ::google::protobuf::Message() {
SharedCtor();
}
void TreeNode::InitAsDefaultInstance() {
object_ = const_cast< ::TSP::Reference*>(&::TSP::Reference::default_instance());
}
TreeNode::TreeNode(const TreeNode& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void TreeNode::SharedCtor() {
_cached_size_ = 0;
name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
object_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
TreeNode::~TreeNode() {
SharedDtor();
}
void TreeNode::SharedDtor() {
if (name_ != &::google::protobuf::internal::kEmptyString) {
delete name_;
}
if (this != default_instance_) {
delete object_;
}
}
void TreeNode::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* TreeNode::descriptor() {
protobuf_AssignDescriptorsOnce();
return TreeNode_descriptor_;
}
const TreeNode& TreeNode::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
TreeNode* TreeNode::default_instance_ = NULL;
TreeNode* TreeNode::New() const {
return new TreeNode;
}
void TreeNode::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_name()) {
if (name_ != &::google::protobuf::internal::kEmptyString) {
name_->clear();
}
}
if (has_object()) {
if (object_ != NULL) object_->::TSP::Reference::Clear();
}
}
children_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool TreeNode::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional string name = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(18)) goto parse_children;
break;
}
// repeated .TSP.Reference children = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_children:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_children()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(18)) goto parse_children;
if (input->ExpectTag(26)) goto parse_object;
break;
}
// optional .TSP.Reference object = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_object:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_object()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void TreeNode::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional string name = 1;
if (has_name()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
1, this->name(), output);
}
// repeated .TSP.Reference children = 2;
for (int i = 0; i < this->children_size(); i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2, this->children(i), output);
}
// optional .TSP.Reference object = 3;
if (has_object()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3, this->object(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* TreeNode::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional string name = 1;
if (has_name()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->name(), target);
}
// repeated .TSP.Reference children = 2;
for (int i = 0; i < this->children_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
2, this->children(i), target);
}
// optional .TSP.Reference object = 3;
if (has_object()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
3, this->object(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int TreeNode::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// optional string name = 1;
if (has_name()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->name());
}
// optional .TSP.Reference object = 3;
if (has_object()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->object());
}
}
// repeated .TSP.Reference children = 2;
total_size += 1 * this->children_size();
for (int i = 0; i < this->children_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->children(i));
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void TreeNode::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const TreeNode* source =
::google::protobuf::internal::dynamic_cast_if_available<const TreeNode*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void TreeNode::MergeFrom(const TreeNode& from) {
GOOGLE_CHECK_NE(&from, this);
children_.MergeFrom(from.children_);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_name()) {
set_name(from.name());
}
if (from.has_object()) {
mutable_object()->::TSP::Reference::MergeFrom(from.object());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void TreeNode::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void TreeNode::CopyFrom(const TreeNode& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool TreeNode::IsInitialized() const {
for (int i = 0; i < children_size(); i++) {
if (!this->children(i).IsInitialized()) return false;
}
if (has_object()) {
if (!this->object().IsInitialized()) return false;
}
return true;
}
void TreeNode::Swap(TreeNode* other) {
if (other != this) {
std::swap(name_, other->name_);
children_.Swap(&other->children_);
std::swap(object_, other->object_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata TreeNode::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = TreeNode_descriptor_;
metadata.reflection = TreeNode_reflection_;
return metadata;
}
// ===================================================================
#ifndef _MSC_VER
const int CommandHistory::kUndoCountFieldNumber;
const int CommandHistory::kCommandsFieldNumber;
const int CommandHistory::kMarkedRedoCommandsFieldNumber;
const int CommandHistory::kPendingPreflightCommandFieldNumber;
const int CommandHistory::kFixedRadar13365177FieldNumber;
#endif // !_MSC_VER
CommandHistory::CommandHistory()
: ::google::protobuf::Message() {
SharedCtor();
}
void CommandHistory::InitAsDefaultInstance() {
pending_preflight_command_ = const_cast< ::TSP::Reference*>(&::TSP::Reference::default_instance());
}
CommandHistory::CommandHistory(const CommandHistory& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void CommandHistory::SharedCtor() {
_cached_size_ = 0;
undo_count_ = 0u;
pending_preflight_command_ = NULL;
fixed_radar_13365177_ = false;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
CommandHistory::~CommandHistory() {
SharedDtor();
}
void CommandHistory::SharedDtor() {
if (this != default_instance_) {
delete pending_preflight_command_;
}
}
void CommandHistory::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* CommandHistory::descriptor() {
protobuf_AssignDescriptorsOnce();
return CommandHistory_descriptor_;
}
const CommandHistory& CommandHistory::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
CommandHistory* CommandHistory::default_instance_ = NULL;
CommandHistory* CommandHistory::New() const {
return new CommandHistory;
}
void CommandHistory::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
undo_count_ = 0u;
if (has_pending_preflight_command()) {
if (pending_preflight_command_ != NULL) pending_preflight_command_->::TSP::Reference::Clear();
}
fixed_radar_13365177_ = false;
}
commands_.Clear();
marked_redo_commands_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool CommandHistory::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required uint32 undo_count = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &undo_count_)));
set_has_undo_count();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(18)) goto parse_commands;
break;
}
// repeated .TSP.Reference commands = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_commands:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_commands()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(18)) goto parse_commands;
if (input->ExpectTag(26)) goto parse_marked_redo_commands;
break;
}
// repeated .TSP.Reference marked_redo_commands = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_marked_redo_commands:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_marked_redo_commands()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(26)) goto parse_marked_redo_commands;
if (input->ExpectTag(34)) goto parse_pending_preflight_command;
break;
}
// optional .TSP.Reference pending_preflight_command = 4;
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_pending_preflight_command:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_pending_preflight_command()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(80)) goto parse_fixed_radar_13365177;
break;
}
// optional bool fixed_radar_13365177 = 10;
case 10: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_fixed_radar_13365177:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &fixed_radar_13365177_)));
set_has_fixed_radar_13365177();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void CommandHistory::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// required uint32 undo_count = 1;
if (has_undo_count()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->undo_count(), output);
}
// repeated .TSP.Reference commands = 2;
for (int i = 0; i < this->commands_size(); i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2, this->commands(i), output);
}
// repeated .TSP.Reference marked_redo_commands = 3;
for (int i = 0; i < this->marked_redo_commands_size(); i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3, this->marked_redo_commands(i), output);
}
// optional .TSP.Reference pending_preflight_command = 4;
if (has_pending_preflight_command()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
4, this->pending_preflight_command(), output);
}
// optional bool fixed_radar_13365177 = 10;
if (has_fixed_radar_13365177()) {
::google::protobuf::internal::WireFormatLite::WriteBool(10, this->fixed_radar_13365177(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* CommandHistory::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// required uint32 undo_count = 1;
if (has_undo_count()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->undo_count(), target);
}
// repeated .TSP.Reference commands = 2;
for (int i = 0; i < this->commands_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
2, this->commands(i), target);
}
// repeated .TSP.Reference marked_redo_commands = 3;
for (int i = 0; i < this->marked_redo_commands_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
3, this->marked_redo_commands(i), target);
}
// optional .TSP.Reference pending_preflight_command = 4;
if (has_pending_preflight_command()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
4, this->pending_preflight_command(), target);
}
// optional bool fixed_radar_13365177 = 10;
if (has_fixed_radar_13365177()) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(10, this->fixed_radar_13365177(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int CommandHistory::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// required uint32 undo_count = 1;
if (has_undo_count()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->undo_count());
}
// optional .TSP.Reference pending_preflight_command = 4;
if (has_pending_preflight_command()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->pending_preflight_command());
}
// optional bool fixed_radar_13365177 = 10;
if (has_fixed_radar_13365177()) {
total_size += 1 + 1;
}
}
// repeated .TSP.Reference commands = 2;
total_size += 1 * this->commands_size();
for (int i = 0; i < this->commands_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->commands(i));
}
// repeated .TSP.Reference marked_redo_commands = 3;
total_size += 1 * this->marked_redo_commands_size();
for (int i = 0; i < this->marked_redo_commands_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->marked_redo_commands(i));
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void CommandHistory::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const CommandHistory* source =
::google::protobuf::internal::dynamic_cast_if_available<const CommandHistory*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void CommandHistory::MergeFrom(const CommandHistory& from) {
GOOGLE_CHECK_NE(&from, this);
commands_.MergeFrom(from.commands_);
marked_redo_commands_.MergeFrom(from.marked_redo_commands_);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_undo_count()) {
set_undo_count(from.undo_count());
}
if (from.has_pending_preflight_command()) {
mutable_pending_preflight_command()->::TSP::Reference::MergeFrom(from.pending_preflight_command());
}
if (from.has_fixed_radar_13365177()) {
set_fixed_radar_13365177(from.fixed_radar_13365177());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void CommandHistory::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void CommandHistory::CopyFrom(const CommandHistory& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool CommandHistory::IsInitialized() const {
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
for (int i = 0; i < commands_size(); i++) {
if (!this->commands(i).IsInitialized()) return false;
}
for (int i = 0; i < marked_redo_commands_size(); i++) {
if (!this->marked_redo_commands(i).IsInitialized()) return false;
}
if (has_pending_preflight_command()) {
if (!this->pending_preflight_command().IsInitialized()) return false;
}
return true;
}
void CommandHistory::Swap(CommandHistory* other) {
if (other != this) {
std::swap(undo_count_, other->undo_count_);
commands_.Swap(&other->commands_);
marked_redo_commands_.Swap(&other->marked_redo_commands_);
std::swap(pending_preflight_command_, other->pending_preflight_command_);
std::swap(fixed_radar_13365177_, other->fixed_radar_13365177_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata CommandHistory::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = CommandHistory_descriptor_;
metadata.reflection = CommandHistory_reflection_;
return metadata;
}
// ===================================================================
#ifndef _MSC_VER
const int DocumentArchive::kLocaleIdentifierFieldNumber;
const int DocumentArchive::kAnnotationAuthorStorageFieldNumber;
#endif // !_MSC_VER
DocumentArchive::DocumentArchive()
: ::google::protobuf::Message() {
SharedCtor();
}
void DocumentArchive::InitAsDefaultInstance() {
annotation_author_storage_ = const_cast< ::TSP::Reference*>(&::TSP::Reference::default_instance());
}
DocumentArchive::DocumentArchive(const DocumentArchive& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void DocumentArchive::SharedCtor() {
_cached_size_ = 0;
locale_identifier_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
annotation_author_storage_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
DocumentArchive::~DocumentArchive() {
SharedDtor();
}
void DocumentArchive::SharedDtor() {
if (locale_identifier_ != &::google::protobuf::internal::kEmptyString) {
delete locale_identifier_;
}
if (this != default_instance_) {
delete annotation_author_storage_;
}
}
void DocumentArchive::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DocumentArchive::descriptor() {
protobuf_AssignDescriptorsOnce();
return DocumentArchive_descriptor_;
}
const DocumentArchive& DocumentArchive::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
DocumentArchive* DocumentArchive::default_instance_ = NULL;
DocumentArchive* DocumentArchive::New() const {
return new DocumentArchive;
}
void DocumentArchive::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_locale_identifier()) {
if (locale_identifier_ != &::google::protobuf::internal::kEmptyString) {
locale_identifier_->clear();
}
}
if (has_annotation_author_storage()) {
if (annotation_author_storage_ != NULL) annotation_author_storage_->::TSP::Reference::Clear();
}
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool DocumentArchive::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional string locale_identifier = 4;
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_locale_identifier()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->locale_identifier().data(), this->locale_identifier().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(58)) goto parse_annotation_author_storage;
break;
}
// optional .TSP.Reference annotation_author_storage = 7;
case 7: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_annotation_author_storage:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_annotation_author_storage()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void DocumentArchive::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional string locale_identifier = 4;
if (has_locale_identifier()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->locale_identifier().data(), this->locale_identifier().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
4, this->locale_identifier(), output);
}
// optional .TSP.Reference annotation_author_storage = 7;
if (has_annotation_author_storage()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
7, this->annotation_author_storage(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* DocumentArchive::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional string locale_identifier = 4;
if (has_locale_identifier()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->locale_identifier().data(), this->locale_identifier().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4, this->locale_identifier(), target);
}
// optional .TSP.Reference annotation_author_storage = 7;
if (has_annotation_author_storage()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
7, this->annotation_author_storage(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int DocumentArchive::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// optional string locale_identifier = 4;
if (has_locale_identifier()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->locale_identifier());
}
// optional .TSP.Reference annotation_author_storage = 7;
if (has_annotation_author_storage()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->annotation_author_storage());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void DocumentArchive::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const DocumentArchive* source =
::google::protobuf::internal::dynamic_cast_if_available<const DocumentArchive*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void DocumentArchive::MergeFrom(const DocumentArchive& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_locale_identifier()) {
set_locale_identifier(from.locale_identifier());
}
if (from.has_annotation_author_storage()) {
mutable_annotation_author_storage()->::TSP::Reference::MergeFrom(from.annotation_author_storage());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void DocumentArchive::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void DocumentArchive::CopyFrom(const DocumentArchive& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool DocumentArchive::IsInitialized() const {
if (has_annotation_author_storage()) {
if (!this->annotation_author_storage().IsInitialized()) return false;
}
return true;
}
void DocumentArchive::Swap(DocumentArchive* other) {
if (other != this) {
std::swap(locale_identifier_, other->locale_identifier_);
std::swap(annotation_author_storage_, other->annotation_author_storage_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata DocumentArchive::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = DocumentArchive_descriptor_;
metadata.reflection = DocumentArchive_reflection_;
return metadata;
}
// ===================================================================
#ifndef _MSC_VER
const int DocumentSupportArchive::kCommandHistoryFieldNumber;
const int DocumentSupportArchive::kCommandSelectionBehaviorHistoryFieldNumber;
const int DocumentSupportArchive::kUndoCountFieldNumber;
const int DocumentSupportArchive::kRedoCountFieldNumber;
const int DocumentSupportArchive::kUndoActionStringFieldNumber;
const int DocumentSupportArchive::kRedoActionStringFieldNumber;
const int DocumentSupportArchive::kWebStateFieldNumber;
#endif // !_MSC_VER
DocumentSupportArchive::DocumentSupportArchive()
: ::google::protobuf::Message() {
SharedCtor();
}
void DocumentSupportArchive::InitAsDefaultInstance() {
command_history_ = const_cast< ::TSP::Reference*>(&::TSP::Reference::default_instance());
command_selection_behavior_history_ = const_cast< ::TSP::Reference*>(&::TSP::Reference::default_instance());
web_state_ = const_cast< ::TSP::Reference*>(&::TSP::Reference::default_instance());
}
DocumentSupportArchive::DocumentSupportArchive(const DocumentSupportArchive& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void DocumentSupportArchive::SharedCtor() {
_cached_size_ = 0;
command_history_ = NULL;
command_selection_behavior_history_ = NULL;
undo_count_ = 0u;
redo_count_ = 0u;
undo_action_string_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
redo_action_string_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
web_state_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
DocumentSupportArchive::~DocumentSupportArchive() {
SharedDtor();
}
void DocumentSupportArchive::SharedDtor() {
if (undo_action_string_ != &::google::protobuf::internal::kEmptyString) {
delete undo_action_string_;
}
if (redo_action_string_ != &::google::protobuf::internal::kEmptyString) {
delete redo_action_string_;
}
if (this != default_instance_) {
delete command_history_;
delete command_selection_behavior_history_;
delete web_state_;
}
}
void DocumentSupportArchive::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DocumentSupportArchive::descriptor() {
protobuf_AssignDescriptorsOnce();
return DocumentSupportArchive_descriptor_;
}
const DocumentSupportArchive& DocumentSupportArchive::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
DocumentSupportArchive* DocumentSupportArchive::default_instance_ = NULL;
DocumentSupportArchive* DocumentSupportArchive::New() const {
return new DocumentSupportArchive;
}
void DocumentSupportArchive::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_command_history()) {
if (command_history_ != NULL) command_history_->::TSP::Reference::Clear();
}
if (has_command_selection_behavior_history()) {
if (command_selection_behavior_history_ != NULL) command_selection_behavior_history_->::TSP::Reference::Clear();
}
undo_count_ = 0u;
redo_count_ = 0u;
if (has_undo_action_string()) {
if (undo_action_string_ != &::google::protobuf::internal::kEmptyString) {
undo_action_string_->clear();
}
}
if (has_redo_action_string()) {
if (redo_action_string_ != &::google::protobuf::internal::kEmptyString) {
redo_action_string_->clear();
}
}
if (has_web_state()) {
if (web_state_ != NULL) web_state_->::TSP::Reference::Clear();
}
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool DocumentSupportArchive::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional .TSP.Reference command_history = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_command_history()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(18)) goto parse_command_selection_behavior_history;
break;
}
// optional .TSP.Reference command_selection_behavior_history = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_command_selection_behavior_history:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_command_selection_behavior_history()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(32)) goto parse_undo_count;
break;
}
// optional uint32 undo_count = 4;
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_undo_count:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &undo_count_)));
set_has_undo_count();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(40)) goto parse_redo_count;
break;
}
// optional uint32 redo_count = 5;
case 5: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_redo_count:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &redo_count_)));
set_has_redo_count();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(50)) goto parse_undo_action_string;
break;
}
// optional string undo_action_string = 6;
case 6: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_undo_action_string:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_undo_action_string()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->undo_action_string().data(), this->undo_action_string().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(58)) goto parse_redo_action_string;
break;
}
// optional string redo_action_string = 7;
case 7: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_redo_action_string:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_redo_action_string()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->redo_action_string().data(), this->redo_action_string().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(66)) goto parse_web_state;
break;
}
// optional .TSP.Reference web_state = 8;
case 8: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_web_state:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_web_state()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void DocumentSupportArchive::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional .TSP.Reference command_history = 1;
if (has_command_history()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, this->command_history(), output);
}
// optional .TSP.Reference command_selection_behavior_history = 2;
if (has_command_selection_behavior_history()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2, this->command_selection_behavior_history(), output);
}
// optional uint32 undo_count = 4;
if (has_undo_count()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(4, this->undo_count(), output);
}
// optional uint32 redo_count = 5;
if (has_redo_count()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->redo_count(), output);
}
// optional string undo_action_string = 6;
if (has_undo_action_string()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->undo_action_string().data(), this->undo_action_string().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
6, this->undo_action_string(), output);
}
// optional string redo_action_string = 7;
if (has_redo_action_string()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->redo_action_string().data(), this->redo_action_string().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
7, this->redo_action_string(), output);
}
// optional .TSP.Reference web_state = 8;
if (has_web_state()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
8, this->web_state(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* DocumentSupportArchive::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional .TSP.Reference command_history = 1;
if (has_command_history()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
1, this->command_history(), target);
}
// optional .TSP.Reference command_selection_behavior_history = 2;
if (has_command_selection_behavior_history()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
2, this->command_selection_behavior_history(), target);
}
// optional uint32 undo_count = 4;
if (has_undo_count()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(4, this->undo_count(), target);
}
// optional uint32 redo_count = 5;
if (has_redo_count()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(5, this->redo_count(), target);
}
// optional string undo_action_string = 6;
if (has_undo_action_string()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->undo_action_string().data(), this->undo_action_string().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
6, this->undo_action_string(), target);
}
// optional string redo_action_string = 7;
if (has_redo_action_string()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->redo_action_string().data(), this->redo_action_string().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
7, this->redo_action_string(), target);
}
// optional .TSP.Reference web_state = 8;
if (has_web_state()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
8, this->web_state(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int DocumentSupportArchive::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// optional .TSP.Reference command_history = 1;
if (has_command_history()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->command_history());
}
// optional .TSP.Reference command_selection_behavior_history = 2;
if (has_command_selection_behavior_history()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->command_selection_behavior_history());
}
// optional uint32 undo_count = 4;
if (has_undo_count()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->undo_count());
}
// optional uint32 redo_count = 5;
if (has_redo_count()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->redo_count());
}
// optional string undo_action_string = 6;
if (has_undo_action_string()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->undo_action_string());
}
// optional string redo_action_string = 7;
if (has_redo_action_string()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->redo_action_string());
}
// optional .TSP.Reference web_state = 8;
if (has_web_state()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->web_state());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void DocumentSupportArchive::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const DocumentSupportArchive* source =
::google::protobuf::internal::dynamic_cast_if_available<const DocumentSupportArchive*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void DocumentSupportArchive::MergeFrom(const DocumentSupportArchive& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_command_history()) {
mutable_command_history()->::TSP::Reference::MergeFrom(from.command_history());
}
if (from.has_command_selection_behavior_history()) {
mutable_command_selection_behavior_history()->::TSP::Reference::MergeFrom(from.command_selection_behavior_history());
}
if (from.has_undo_count()) {
set_undo_count(from.undo_count());
}
if (from.has_redo_count()) {
set_redo_count(from.redo_count());
}
if (from.has_undo_action_string()) {
set_undo_action_string(from.undo_action_string());
}
if (from.has_redo_action_string()) {
set_redo_action_string(from.redo_action_string());
}
if (from.has_web_state()) {
mutable_web_state()->::TSP::Reference::MergeFrom(from.web_state());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void DocumentSupportArchive::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void DocumentSupportArchive::CopyFrom(const DocumentSupportArchive& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool DocumentSupportArchive::IsInitialized() const {
if (has_command_history()) {
if (!this->command_history().IsInitialized()) return false;
}
if (has_command_selection_behavior_history()) {
if (!this->command_selection_behavior_history().IsInitialized()) return false;
}
if (has_web_state()) {
if (!this->web_state().IsInitialized()) return false;
}
return true;
}
void DocumentSupportArchive::Swap(DocumentSupportArchive* other) {
if (other != this) {
std::swap(command_history_, other->command_history_);
std::swap(command_selection_behavior_history_, other->command_selection_behavior_history_);
std::swap(undo_count_, other->undo_count_);
std::swap(redo_count_, other->redo_count_);
std::swap(undo_action_string_, other->undo_action_string_);
std::swap(redo_action_string_, other->redo_action_string_);
std::swap(web_state_, other->web_state_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata DocumentSupportArchive::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = DocumentSupportArchive_descriptor_;
metadata.reflection = DocumentSupportArchive_reflection_;
return metadata;
}
// ===================================================================
#ifndef _MSC_VER
const int ViewStateArchive::kViewStateRootFieldNumber;
#endif // !_MSC_VER
ViewStateArchive::ViewStateArchive()
: ::google::protobuf::Message() {
SharedCtor();
}
void ViewStateArchive::InitAsDefaultInstance() {
view_state_root_ = const_cast< ::TSP::Reference*>(&::TSP::Reference::default_instance());
}
ViewStateArchive::ViewStateArchive(const ViewStateArchive& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void ViewStateArchive::SharedCtor() {
_cached_size_ = 0;
view_state_root_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
ViewStateArchive::~ViewStateArchive() {
SharedDtor();
}
void ViewStateArchive::SharedDtor() {
if (this != default_instance_) {
delete view_state_root_;
}
}
void ViewStateArchive::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ViewStateArchive::descriptor() {
protobuf_AssignDescriptorsOnce();
return ViewStateArchive_descriptor_;
}
const ViewStateArchive& ViewStateArchive::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
ViewStateArchive* ViewStateArchive::default_instance_ = NULL;
ViewStateArchive* ViewStateArchive::New() const {
return new ViewStateArchive;
}
void ViewStateArchive::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_view_state_root()) {
if (view_state_root_ != NULL) view_state_root_->::TSP::Reference::Clear();
}
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool ViewStateArchive::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required .TSP.Reference view_state_root = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_view_state_root()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void ViewStateArchive::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// required .TSP.Reference view_state_root = 1;
if (has_view_state_root()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, this->view_state_root(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* ViewStateArchive::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// required .TSP.Reference view_state_root = 1;
if (has_view_state_root()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
1, this->view_state_root(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int ViewStateArchive::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// required .TSP.Reference view_state_root = 1;
if (has_view_state_root()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->view_state_root());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void ViewStateArchive::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const ViewStateArchive* source =
::google::protobuf::internal::dynamic_cast_if_available<const ViewStateArchive*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void ViewStateArchive::MergeFrom(const ViewStateArchive& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_view_state_root()) {
mutable_view_state_root()->::TSP::Reference::MergeFrom(from.view_state_root());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void ViewStateArchive::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void ViewStateArchive::CopyFrom(const ViewStateArchive& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ViewStateArchive::IsInitialized() const {
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
if (has_view_state_root()) {
if (!this->view_state_root().IsInitialized()) return false;
}
return true;
}
void ViewStateArchive::Swap(ViewStateArchive* other) {
if (other != this) {
std::swap(view_state_root_, other->view_state_root_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata ViewStateArchive::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = ViewStateArchive_descriptor_;
metadata.reflection = ViewStateArchive_reflection_;
return metadata;
}
// ===================================================================
#ifndef _MSC_VER
const int CommandArchive::kUndoRedoStateFieldNumber;
const int CommandArchive::kUndoCollectionFieldNumber;
#endif // !_MSC_VER
CommandArchive::CommandArchive()
: ::google::protobuf::Message() {
SharedCtor();
}
void CommandArchive::InitAsDefaultInstance() {
undoredostate_ = const_cast< ::TSP::Reference*>(&::TSP::Reference::default_instance());
undocollection_ = const_cast< ::TSP::Reference*>(&::TSP::Reference::default_instance());
}
CommandArchive::CommandArchive(const CommandArchive& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void CommandArchive::SharedCtor() {
_cached_size_ = 0;
undoredostate_ = NULL;
undocollection_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
CommandArchive::~CommandArchive() {
SharedDtor();
}
void CommandArchive::SharedDtor() {
if (this != default_instance_) {
delete undoredostate_;
delete undocollection_;
}
}
void CommandArchive::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* CommandArchive::descriptor() {
protobuf_AssignDescriptorsOnce();
return CommandArchive_descriptor_;
}
const CommandArchive& CommandArchive::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
CommandArchive* CommandArchive::default_instance_ = NULL;
CommandArchive* CommandArchive::New() const {
return new CommandArchive;
}
void CommandArchive::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_undoredostate()) {
if (undoredostate_ != NULL) undoredostate_->::TSP::Reference::Clear();
}
if (has_undocollection()) {
if (undocollection_ != NULL) undocollection_->::TSP::Reference::Clear();
}
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool CommandArchive::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional .TSP.Reference undoRedoState = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_undoredostate()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(18)) goto parse_undoCollection;
break;
}
// optional .TSP.Reference undoCollection = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_undoCollection:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_undocollection()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void CommandArchive::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional .TSP.Reference undoRedoState = 1;
if (has_undoredostate()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, this->undoredostate(), output);
}
// optional .TSP.Reference undoCollection = 2;
if (has_undocollection()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2, this->undocollection(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* CommandArchive::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional .TSP.Reference undoRedoState = 1;
if (has_undoredostate()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
1, this->undoredostate(), target);
}
// optional .TSP.Reference undoCollection = 2;
if (has_undocollection()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
2, this->undocollection(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int CommandArchive::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// optional .TSP.Reference undoRedoState = 1;
if (has_undoredostate()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->undoredostate());
}
// optional .TSP.Reference undoCollection = 2;
if (has_undocollection()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->undocollection());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void CommandArchive::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const CommandArchive* source =
::google::protobuf::internal::dynamic_cast_if_available<const CommandArchive*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void CommandArchive::MergeFrom(const CommandArchive& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_undoredostate()) {
mutable_undoredostate()->::TSP::Reference::MergeFrom(from.undoredostate());
}
if (from.has_undocollection()) {
mutable_undocollection()->::TSP::Reference::MergeFrom(from.undocollection());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void CommandArchive::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void CommandArchive::CopyFrom(const CommandArchive& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool CommandArchive::IsInitialized() const {
if (has_undoredostate()) {
if (!this->undoredostate().IsInitialized()) return false;
}
if (has_undocollection()) {
if (!this->undocollection().IsInitialized()) return false;
}
return true;
}
void CommandArchive::Swap(CommandArchive* other) {
if (other != this) {
std::swap(undoredostate_, other->undoredostate_);
std::swap(undocollection_, other->undocollection_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata CommandArchive::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = CommandArchive_descriptor_;
metadata.reflection = CommandArchive_reflection_;
return metadata;
}
// ===================================================================
#ifndef _MSC_VER
const int CommandGroupArchive::kSuperFieldNumber;
const int CommandGroupArchive::kCommandsFieldNumber;
const int CommandGroupArchive::kProcessResultsFieldNumber;
#endif // !_MSC_VER
CommandGroupArchive::CommandGroupArchive()
: ::google::protobuf::Message() {
SharedCtor();
}
void CommandGroupArchive::InitAsDefaultInstance() {
super_ = const_cast< ::TSK::CommandArchive*>(&::TSK::CommandArchive::default_instance());
process_results_ = const_cast< ::TSP::IndexSet*>(&::TSP::IndexSet::default_instance());
}
CommandGroupArchive::CommandGroupArchive(const CommandGroupArchive& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void CommandGroupArchive::SharedCtor() {
_cached_size_ = 0;
super_ = NULL;
process_results_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
CommandGroupArchive::~CommandGroupArchive() {
SharedDtor();
}
void CommandGroupArchive::SharedDtor() {
if (this != default_instance_) {
delete super_;
delete process_results_;
}
}
void CommandGroupArchive::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* CommandGroupArchive::descriptor() {
protobuf_AssignDescriptorsOnce();
return CommandGroupArchive_descriptor_;
}
const CommandGroupArchive& CommandGroupArchive::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
CommandGroupArchive* CommandGroupArchive::default_instance_ = NULL;
CommandGroupArchive* CommandGroupArchive::New() const {
return new CommandGroupArchive;
}
void CommandGroupArchive::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_super()) {
if (super_ != NULL) super_->::TSK::CommandArchive::Clear();
}
if (has_process_results()) {
if (process_results_ != NULL) process_results_->::TSP::IndexSet::Clear();
}
}
commands_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool CommandGroupArchive::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required .TSK.CommandArchive super = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_super()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(18)) goto parse_commands;
break;
}
// repeated .TSP.Reference commands = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_commands:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_commands()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(18)) goto parse_commands;
if (input->ExpectTag(26)) goto parse_process_results;
break;
}
// optional .TSP.IndexSet process_results = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_process_results:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_process_results()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void CommandGroupArchive::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// required .TSK.CommandArchive super = 1;
if (has_super()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, this->super(), output);
}
// repeated .TSP.Reference commands = 2;
for (int i = 0; i < this->commands_size(); i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2, this->commands(i), output);
}
// optional .TSP.IndexSet process_results = 3;
if (has_process_results()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3, this->process_results(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* CommandGroupArchive::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// required .TSK.CommandArchive super = 1;
if (has_super()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
1, this->super(), target);
}
// repeated .TSP.Reference commands = 2;
for (int i = 0; i < this->commands_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
2, this->commands(i), target);
}
// optional .TSP.IndexSet process_results = 3;
if (has_process_results()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
3, this->process_results(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int CommandGroupArchive::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// required .TSK.CommandArchive super = 1;
if (has_super()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->super());
}
// optional .TSP.IndexSet process_results = 3;
if (has_process_results()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->process_results());
}
}
// repeated .TSP.Reference commands = 2;
total_size += 1 * this->commands_size();
for (int i = 0; i < this->commands_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->commands(i));
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void CommandGroupArchive::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const CommandGroupArchive* source =
::google::protobuf::internal::dynamic_cast_if_available<const CommandGroupArchive*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void CommandGroupArchive::MergeFrom(const CommandGroupArchive& from) {
GOOGLE_CHECK_NE(&from, this);
commands_.MergeFrom(from.commands_);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_super()) {
mutable_super()->::TSK::CommandArchive::MergeFrom(from.super());
}
if (from.has_process_results()) {
mutable_process_results()->::TSP::IndexSet::MergeFrom(from.process_results());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void CommandGroupArchive::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void CommandGroupArchive::CopyFrom(const CommandGroupArchive& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool CommandGroupArchive::IsInitialized() const {
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
if (has_super()) {
if (!this->super().IsInitialized()) return false;
}
for (int i = 0; i < commands_size(); i++) {
if (!this->commands(i).IsInitialized()) return false;
}
if (has_process_results()) {
if (!this->process_results().IsInitialized()) return false;
}
return true;
}
void CommandGroupArchive::Swap(CommandGroupArchive* other) {
if (other != this) {
std::swap(super_, other->super_);
commands_.Swap(&other->commands_);
std::swap(process_results_, other->process_results_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata CommandGroupArchive::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = CommandGroupArchive_descriptor_;
metadata.reflection = CommandGroupArchive_reflection_;
return metadata;
}
// ===================================================================
#ifndef _MSC_VER
const int CommandContainerArchive::kCommandsFieldNumber;
#endif // !_MSC_VER
CommandContainerArchive::CommandContainerArchive()
: ::google::protobuf::Message() {
SharedCtor();
}
void CommandContainerArchive::InitAsDefaultInstance() {
}
CommandContainerArchive::CommandContainerArchive(const CommandContainerArchive& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void CommandContainerArchive::SharedCtor() {
_cached_size_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
CommandContainerArchive::~CommandContainerArchive() {
SharedDtor();
}
void CommandContainerArchive::SharedDtor() {
if (this != default_instance_) {
}
}
void CommandContainerArchive::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* CommandContainerArchive::descriptor() {
protobuf_AssignDescriptorsOnce();
return CommandContainerArchive_descriptor_;
}
const CommandContainerArchive& CommandContainerArchive::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
CommandContainerArchive* CommandContainerArchive::default_instance_ = NULL;
CommandContainerArchive* CommandContainerArchive::New() const {
return new CommandContainerArchive;
}
void CommandContainerArchive::Clear() {
commands_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool CommandContainerArchive::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// repeated .TSP.Reference commands = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_commands:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_commands()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(10)) goto parse_commands;
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void CommandContainerArchive::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// repeated .TSP.Reference commands = 1;
for (int i = 0; i < this->commands_size(); i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, this->commands(i), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* CommandContainerArchive::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// repeated .TSP.Reference commands = 1;
for (int i = 0; i < this->commands_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
1, this->commands(i), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int CommandContainerArchive::ByteSize() const {
int total_size = 0;
// repeated .TSP.Reference commands = 1;
total_size += 1 * this->commands_size();
for (int i = 0; i < this->commands_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->commands(i));
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void CommandContainerArchive::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const CommandContainerArchive* source =
::google::protobuf::internal::dynamic_cast_if_available<const CommandContainerArchive*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void CommandContainerArchive::MergeFrom(const CommandContainerArchive& from) {
GOOGLE_CHECK_NE(&from, this);
commands_.MergeFrom(from.commands_);
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void CommandContainerArchive::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void CommandContainerArchive::CopyFrom(const CommandContainerArchive& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool CommandContainerArchive::IsInitialized() const {
for (int i = 0; i < commands_size(); i++) {
if (!this->commands(i).IsInitialized()) return false;
}
return true;
}
void CommandContainerArchive::Swap(CommandContainerArchive* other) {
if (other != this) {
commands_.Swap(&other->commands_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata CommandContainerArchive::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = CommandContainerArchive_descriptor_;
metadata.reflection = CommandContainerArchive_reflection_;
return metadata;
}
// ===================================================================
#ifndef _MSC_VER
const int ReplaceAllChildCommandArchive::kSuperFieldNumber;
#endif // !_MSC_VER
ReplaceAllChildCommandArchive::ReplaceAllChildCommandArchive()
: ::google::protobuf::Message() {
SharedCtor();
}
void ReplaceAllChildCommandArchive::InitAsDefaultInstance() {
super_ = const_cast< ::TSK::CommandArchive*>(&::TSK::CommandArchive::default_instance());
}
ReplaceAllChildCommandArchive::ReplaceAllChildCommandArchive(const ReplaceAllChildCommandArchive& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void ReplaceAllChildCommandArchive::SharedCtor() {
_cached_size_ = 0;
super_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
ReplaceAllChildCommandArchive::~ReplaceAllChildCommandArchive() {
SharedDtor();
}
void ReplaceAllChildCommandArchive::SharedDtor() {
if (this != default_instance_) {
delete super_;
}
}
void ReplaceAllChildCommandArchive::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ReplaceAllChildCommandArchive::descriptor() {
protobuf_AssignDescriptorsOnce();
return ReplaceAllChildCommandArchive_descriptor_;
}
const ReplaceAllChildCommandArchive& ReplaceAllChildCommandArchive::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
ReplaceAllChildCommandArchive* ReplaceAllChildCommandArchive::default_instance_ = NULL;
ReplaceAllChildCommandArchive* ReplaceAllChildCommandArchive::New() const {
return new ReplaceAllChildCommandArchive;
}
void ReplaceAllChildCommandArchive::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_super()) {
if (super_ != NULL) super_->::TSK::CommandArchive::Clear();
}
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool ReplaceAllChildCommandArchive::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required .TSK.CommandArchive super = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_super()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void ReplaceAllChildCommandArchive::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// required .TSK.CommandArchive super = 1;
if (has_super()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, this->super(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* ReplaceAllChildCommandArchive::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// required .TSK.CommandArchive super = 1;
if (has_super()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
1, this->super(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int ReplaceAllChildCommandArchive::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// required .TSK.CommandArchive super = 1;
if (has_super()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->super());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void ReplaceAllChildCommandArchive::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const ReplaceAllChildCommandArchive* source =
::google::protobuf::internal::dynamic_cast_if_available<const ReplaceAllChildCommandArchive*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void ReplaceAllChildCommandArchive::MergeFrom(const ReplaceAllChildCommandArchive& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_super()) {
mutable_super()->::TSK::CommandArchive::MergeFrom(from.super());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void ReplaceAllChildCommandArchive::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void ReplaceAllChildCommandArchive::CopyFrom(const ReplaceAllChildCommandArchive& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ReplaceAllChildCommandArchive::IsInitialized() const {
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
if (has_super()) {
if (!this->super().IsInitialized()) return false;
}
return true;
}
void ReplaceAllChildCommandArchive::Swap(ReplaceAllChildCommandArchive* other) {
if (other != this) {
std::swap(super_, other->super_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata ReplaceAllChildCommandArchive::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = ReplaceAllChildCommandArchive_descriptor_;
metadata.reflection = ReplaceAllChildCommandArchive_reflection_;
return metadata;
}
// ===================================================================
#ifndef _MSC_VER
const int ReplaceAllCommandArchive::kSuperFieldNumber;
const int ReplaceAllCommandArchive::kCommandsFieldNumber;
const int ReplaceAllCommandArchive::kFindStringFieldNumber;
const int ReplaceAllCommandArchive::kReplaceStringFieldNumber;
const int ReplaceAllCommandArchive::kOptionsFieldNumber;
#endif // !_MSC_VER
ReplaceAllCommandArchive::ReplaceAllCommandArchive()
: ::google::protobuf::Message() {
SharedCtor();
}
void ReplaceAllCommandArchive::InitAsDefaultInstance() {
super_ = const_cast< ::TSK::CommandArchive*>(&::TSK::CommandArchive::default_instance());
}
ReplaceAllCommandArchive::ReplaceAllCommandArchive(const ReplaceAllCommandArchive& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void ReplaceAllCommandArchive::SharedCtor() {
_cached_size_ = 0;
super_ = NULL;
find_string_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
replace_string_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
options_ = 0u;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
ReplaceAllCommandArchive::~ReplaceAllCommandArchive() {
SharedDtor();
}
void ReplaceAllCommandArchive::SharedDtor() {
if (find_string_ != &::google::protobuf::internal::kEmptyString) {
delete find_string_;
}
if (replace_string_ != &::google::protobuf::internal::kEmptyString) {
delete replace_string_;
}
if (this != default_instance_) {
delete super_;
}
}
void ReplaceAllCommandArchive::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ReplaceAllCommandArchive::descriptor() {
protobuf_AssignDescriptorsOnce();
return ReplaceAllCommandArchive_descriptor_;
}
const ReplaceAllCommandArchive& ReplaceAllCommandArchive::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
ReplaceAllCommandArchive* ReplaceAllCommandArchive::default_instance_ = NULL;
ReplaceAllCommandArchive* ReplaceAllCommandArchive::New() const {
return new ReplaceAllCommandArchive;
}
void ReplaceAllCommandArchive::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_super()) {
if (super_ != NULL) super_->::TSK::CommandArchive::Clear();
}
if (has_find_string()) {
if (find_string_ != &::google::protobuf::internal::kEmptyString) {
find_string_->clear();
}
}
if (has_replace_string()) {
if (replace_string_ != &::google::protobuf::internal::kEmptyString) {
replace_string_->clear();
}
}
options_ = 0u;
}
commands_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool ReplaceAllCommandArchive::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required .TSK.CommandArchive super = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_super()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(18)) goto parse_commands;
break;
}
// repeated .TSP.Reference commands = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_commands:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_commands()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(18)) goto parse_commands;
if (input->ExpectTag(26)) goto parse_find_string;
break;
}
// required string find_string = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_find_string:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_find_string()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->find_string().data(), this->find_string().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(34)) goto parse_replace_string;
break;
}
// required string replace_string = 4;
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_replace_string:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_replace_string()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->replace_string().data(), this->replace_string().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(40)) goto parse_options;
break;
}
// required uint32 options = 5;
case 5: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_options:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &options_)));
set_has_options();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void ReplaceAllCommandArchive::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// required .TSK.CommandArchive super = 1;
if (has_super()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, this->super(), output);
}
// repeated .TSP.Reference commands = 2;
for (int i = 0; i < this->commands_size(); i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2, this->commands(i), output);
}
// required string find_string = 3;
if (has_find_string()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->find_string().data(), this->find_string().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
3, this->find_string(), output);
}
// required string replace_string = 4;
if (has_replace_string()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->replace_string().data(), this->replace_string().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
4, this->replace_string(), output);
}
// required uint32 options = 5;
if (has_options()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->options(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* ReplaceAllCommandArchive::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// required .TSK.CommandArchive super = 1;
if (has_super()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
1, this->super(), target);
}
// repeated .TSP.Reference commands = 2;
for (int i = 0; i < this->commands_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
2, this->commands(i), target);
}
// required string find_string = 3;
if (has_find_string()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->find_string().data(), this->find_string().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3, this->find_string(), target);
}
// required string replace_string = 4;
if (has_replace_string()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->replace_string().data(), this->replace_string().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4, this->replace_string(), target);
}
// required uint32 options = 5;
if (has_options()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(5, this->options(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int ReplaceAllCommandArchive::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// required .TSK.CommandArchive super = 1;
if (has_super()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->super());
}
// required string find_string = 3;
if (has_find_string()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->find_string());
}
// required string replace_string = 4;
if (has_replace_string()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->replace_string());
}
// required uint32 options = 5;
if (has_options()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->options());
}
}
// repeated .TSP.Reference commands = 2;
total_size += 1 * this->commands_size();
for (int i = 0; i < this->commands_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->commands(i));
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void ReplaceAllCommandArchive::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const ReplaceAllCommandArchive* source =
::google::protobuf::internal::dynamic_cast_if_available<const ReplaceAllCommandArchive*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void ReplaceAllCommandArchive::MergeFrom(const ReplaceAllCommandArchive& from) {
GOOGLE_CHECK_NE(&from, this);
commands_.MergeFrom(from.commands_);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_super()) {
mutable_super()->::TSK::CommandArchive::MergeFrom(from.super());
}
if (from.has_find_string()) {
set_find_string(from.find_string());
}
if (from.has_replace_string()) {
set_replace_string(from.replace_string());
}
if (from.has_options()) {
set_options(from.options());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void ReplaceAllCommandArchive::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void ReplaceAllCommandArchive::CopyFrom(const ReplaceAllCommandArchive& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ReplaceAllCommandArchive::IsInitialized() const {
if ((_has_bits_[0] & 0x0000001d) != 0x0000001d) return false;
if (has_super()) {
if (!this->super().IsInitialized()) return false;
}
for (int i = 0; i < commands_size(); i++) {
if (!this->commands(i).IsInitialized()) return false;
}
return true;
}
void ReplaceAllCommandArchive::Swap(ReplaceAllCommandArchive* other) {
if (other != this) {
std::swap(super_, other->super_);
commands_.Swap(&other->commands_);
std::swap(find_string_, other->find_string_);
std::swap(replace_string_, other->replace_string_);
std::swap(options_, other->options_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata ReplaceAllCommandArchive::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = ReplaceAllCommandArchive_descriptor_;
metadata.reflection = ReplaceAllCommandArchive_reflection_;
return metadata;
}
// ===================================================================
#ifndef _MSC_VER
const int ShuffleMappingArchive_Entry::kFromFieldNumber;
const int ShuffleMappingArchive_Entry::kToFieldNumber;
#endif // !_MSC_VER
ShuffleMappingArchive_Entry::ShuffleMappingArchive_Entry()
: ::google::protobuf::Message() {
SharedCtor();
}
void ShuffleMappingArchive_Entry::InitAsDefaultInstance() {
}
ShuffleMappingArchive_Entry::ShuffleMappingArchive_Entry(const ShuffleMappingArchive_Entry& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void ShuffleMappingArchive_Entry::SharedCtor() {
_cached_size_ = 0;
from_ = 0u;
to_ = 0u;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
ShuffleMappingArchive_Entry::~ShuffleMappingArchive_Entry() {
SharedDtor();
}
void ShuffleMappingArchive_Entry::SharedDtor() {
if (this != default_instance_) {
}
}
void ShuffleMappingArchive_Entry::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ShuffleMappingArchive_Entry::descriptor() {
protobuf_AssignDescriptorsOnce();
return ShuffleMappingArchive_Entry_descriptor_;
}
const ShuffleMappingArchive_Entry& ShuffleMappingArchive_Entry::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
ShuffleMappingArchive_Entry* ShuffleMappingArchive_Entry::default_instance_ = NULL;
ShuffleMappingArchive_Entry* ShuffleMappingArchive_Entry::New() const {
return new ShuffleMappingArchive_Entry;
}
void ShuffleMappingArchive_Entry::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
from_ = 0u;
to_ = 0u;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool ShuffleMappingArchive_Entry::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required uint32 from = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &from_)));
set_has_from();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_to;
break;
}
// required uint32 to = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_to:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &to_)));
set_has_to();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void ShuffleMappingArchive_Entry::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// required uint32 from = 1;
if (has_from()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->from(), output);
}
// required uint32 to = 2;
if (has_to()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->to(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* ShuffleMappingArchive_Entry::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// required uint32 from = 1;
if (has_from()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->from(), target);
}
// required uint32 to = 2;
if (has_to()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->to(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int ShuffleMappingArchive_Entry::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// required uint32 from = 1;
if (has_from()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->from());
}
// required uint32 to = 2;
if (has_to()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->to());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void ShuffleMappingArchive_Entry::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const ShuffleMappingArchive_Entry* source =
::google::protobuf::internal::dynamic_cast_if_available<const ShuffleMappingArchive_Entry*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void ShuffleMappingArchive_Entry::MergeFrom(const ShuffleMappingArchive_Entry& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_from()) {
set_from(from.from());
}
if (from.has_to()) {
set_to(from.to());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void ShuffleMappingArchive_Entry::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void ShuffleMappingArchive_Entry::CopyFrom(const ShuffleMappingArchive_Entry& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ShuffleMappingArchive_Entry::IsInitialized() const {
if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
return true;
}
void ShuffleMappingArchive_Entry::Swap(ShuffleMappingArchive_Entry* other) {
if (other != this) {
std::swap(from_, other->from_);
std::swap(to_, other->to_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata ShuffleMappingArchive_Entry::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = ShuffleMappingArchive_Entry_descriptor_;
metadata.reflection = ShuffleMappingArchive_Entry_reflection_;
return metadata;
}
// -------------------------------------------------------------------
#ifndef _MSC_VER
const int ShuffleMappingArchive::kStartIndexFieldNumber;
const int ShuffleMappingArchive::kEndIndexFieldNumber;
const int ShuffleMappingArchive::kEntriesFieldNumber;
const int ShuffleMappingArchive::kIsVerticalFieldNumber;
const int ShuffleMappingArchive::kIsMoveOperationFieldNumber;
const int ShuffleMappingArchive::kFirstMovedIndexFieldNumber;
const int ShuffleMappingArchive::kDestinationIndexForMoveFieldNumber;
const int ShuffleMappingArchive::kNumberOfIndicesMovedFieldNumber;
#endif // !_MSC_VER
ShuffleMappingArchive::ShuffleMappingArchive()
: ::google::protobuf::Message() {
SharedCtor();
}
void ShuffleMappingArchive::InitAsDefaultInstance() {
}
ShuffleMappingArchive::ShuffleMappingArchive(const ShuffleMappingArchive& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void ShuffleMappingArchive::SharedCtor() {
_cached_size_ = 0;
start_index_ = 0u;
end_index_ = 0u;
is_vertical_ = true;
is_move_operation_ = false;
first_moved_index_ = 0u;
destination_index_for_move_ = 0u;
number_of_indices_moved_ = 0u;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
ShuffleMappingArchive::~ShuffleMappingArchive() {
SharedDtor();
}
void ShuffleMappingArchive::SharedDtor() {
if (this != default_instance_) {
}
}
void ShuffleMappingArchive::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ShuffleMappingArchive::descriptor() {
protobuf_AssignDescriptorsOnce();
return ShuffleMappingArchive_descriptor_;
}
const ShuffleMappingArchive& ShuffleMappingArchive::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
ShuffleMappingArchive* ShuffleMappingArchive::default_instance_ = NULL;
ShuffleMappingArchive* ShuffleMappingArchive::New() const {
return new ShuffleMappingArchive;
}
void ShuffleMappingArchive::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
start_index_ = 0u;
end_index_ = 0u;
is_vertical_ = true;
is_move_operation_ = false;
first_moved_index_ = 0u;
destination_index_for_move_ = 0u;
number_of_indices_moved_ = 0u;
}
entries_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool ShuffleMappingArchive::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required uint32 start_index = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &start_index_)));
set_has_start_index();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_end_index;
break;
}
// required uint32 end_index = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_end_index:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &end_index_)));
set_has_end_index();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(26)) goto parse_entries;
break;
}
// repeated .TSK.ShuffleMappingArchive.Entry entries = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_entries:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_entries()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(26)) goto parse_entries;
if (input->ExpectTag(32)) goto parse_is_vertical;
break;
}
// optional bool is_vertical = 4 [default = true];
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_is_vertical:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &is_vertical_)));
set_has_is_vertical();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(40)) goto parse_is_move_operation;
break;
}
// optional bool is_move_operation = 5 [default = false];
case 5: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_is_move_operation:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &is_move_operation_)));
set_has_is_move_operation();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(48)) goto parse_first_moved_index;
break;
}
// optional uint32 first_moved_index = 6 [default = 0];
case 6: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_first_moved_index:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &first_moved_index_)));
set_has_first_moved_index();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(56)) goto parse_destination_index_for_move;
break;
}
// optional uint32 destination_index_for_move = 7 [default = 0];
case 7: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_destination_index_for_move:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &destination_index_for_move_)));
set_has_destination_index_for_move();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(64)) goto parse_number_of_indices_moved;
break;
}
// optional uint32 number_of_indices_moved = 8 [default = 0];
case 8: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_number_of_indices_moved:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &number_of_indices_moved_)));
set_has_number_of_indices_moved();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void ShuffleMappingArchive::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// required uint32 start_index = 1;
if (has_start_index()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->start_index(), output);
}
// required uint32 end_index = 2;
if (has_end_index()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->end_index(), output);
}
// repeated .TSK.ShuffleMappingArchive.Entry entries = 3;
for (int i = 0; i < this->entries_size(); i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3, this->entries(i), output);
}
// optional bool is_vertical = 4 [default = true];
if (has_is_vertical()) {
::google::protobuf::internal::WireFormatLite::WriteBool(4, this->is_vertical(), output);
}
// optional bool is_move_operation = 5 [default = false];
if (has_is_move_operation()) {
::google::protobuf::internal::WireFormatLite::WriteBool(5, this->is_move_operation(), output);
}
// optional uint32 first_moved_index = 6 [default = 0];
if (has_first_moved_index()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(6, this->first_moved_index(), output);
}
// optional uint32 destination_index_for_move = 7 [default = 0];
if (has_destination_index_for_move()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(7, this->destination_index_for_move(), output);
}
// optional uint32 number_of_indices_moved = 8 [default = 0];
if (has_number_of_indices_moved()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(8, this->number_of_indices_moved(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* ShuffleMappingArchive::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// required uint32 start_index = 1;
if (has_start_index()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->start_index(), target);
}
// required uint32 end_index = 2;
if (has_end_index()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->end_index(), target);
}
// repeated .TSK.ShuffleMappingArchive.Entry entries = 3;
for (int i = 0; i < this->entries_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
3, this->entries(i), target);
}
// optional bool is_vertical = 4 [default = true];
if (has_is_vertical()) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, this->is_vertical(), target);
}
// optional bool is_move_operation = 5 [default = false];
if (has_is_move_operation()) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->is_move_operation(), target);
}
// optional uint32 first_moved_index = 6 [default = 0];
if (has_first_moved_index()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(6, this->first_moved_index(), target);
}
// optional uint32 destination_index_for_move = 7 [default = 0];
if (has_destination_index_for_move()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(7, this->destination_index_for_move(), target);
}
// optional uint32 number_of_indices_moved = 8 [default = 0];
if (has_number_of_indices_moved()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(8, this->number_of_indices_moved(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int ShuffleMappingArchive::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// required uint32 start_index = 1;
if (has_start_index()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->start_index());
}
// required uint32 end_index = 2;
if (has_end_index()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->end_index());
}
// optional bool is_vertical = 4 [default = true];
if (has_is_vertical()) {
total_size += 1 + 1;
}
// optional bool is_move_operation = 5 [default = false];
if (has_is_move_operation()) {
total_size += 1 + 1;
}
// optional uint32 first_moved_index = 6 [default = 0];
if (has_first_moved_index()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->first_moved_index());
}
// optional uint32 destination_index_for_move = 7 [default = 0];
if (has_destination_index_for_move()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->destination_index_for_move());
}
// optional uint32 number_of_indices_moved = 8 [default = 0];
if (has_number_of_indices_moved()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->number_of_indices_moved());
}
}
// repeated .TSK.ShuffleMappingArchive.Entry entries = 3;
total_size += 1 * this->entries_size();
for (int i = 0; i < this->entries_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->entries(i));
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void ShuffleMappingArchive::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const ShuffleMappingArchive* source =
::google::protobuf::internal::dynamic_cast_if_available<const ShuffleMappingArchive*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void ShuffleMappingArchive::MergeFrom(const ShuffleMappingArchive& from) {
GOOGLE_CHECK_NE(&from, this);
entries_.MergeFrom(from.entries_);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_start_index()) {
set_start_index(from.start_index());
}
if (from.has_end_index()) {
set_end_index(from.end_index());
}
if (from.has_is_vertical()) {
set_is_vertical(from.is_vertical());
}
if (from.has_is_move_operation()) {
set_is_move_operation(from.is_move_operation());
}
if (from.has_first_moved_index()) {
set_first_moved_index(from.first_moved_index());
}
if (from.has_destination_index_for_move()) {
set_destination_index_for_move(from.destination_index_for_move());
}
if (from.has_number_of_indices_moved()) {
set_number_of_indices_moved(from.number_of_indices_moved());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void ShuffleMappingArchive::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void ShuffleMappingArchive::CopyFrom(const ShuffleMappingArchive& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ShuffleMappingArchive::IsInitialized() const {
if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
for (int i = 0; i < entries_size(); i++) {
if (!this->entries(i).IsInitialized()) return false;
}
return true;
}
void ShuffleMappingArchive::Swap(ShuffleMappingArchive* other) {
if (other != this) {
std::swap(start_index_, other->start_index_);
std::swap(end_index_, other->end_index_);
entries_.Swap(&other->entries_);
std::swap(is_vertical_, other->is_vertical_);
std::swap(is_move_operation_, other->is_move_operation_);
std::swap(first_moved_index_, other->first_moved_index_);
std::swap(destination_index_for_move_, other->destination_index_for_move_);
std::swap(number_of_indices_moved_, other->number_of_indices_moved_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata ShuffleMappingArchive::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = ShuffleMappingArchive_descriptor_;
metadata.reflection = ShuffleMappingArchive_reflection_;
return metadata;
}
// ===================================================================
#ifndef _MSC_VER
const int ProgressiveCommandGroupArchive::kSuperFieldNumber;
#endif // !_MSC_VER
ProgressiveCommandGroupArchive::ProgressiveCommandGroupArchive()
: ::google::protobuf::Message() {
SharedCtor();
}
void ProgressiveCommandGroupArchive::InitAsDefaultInstance() {
super_ = const_cast< ::TSK::CommandGroupArchive*>(&::TSK::CommandGroupArchive::default_instance());
}
ProgressiveCommandGroupArchive::ProgressiveCommandGroupArchive(const ProgressiveCommandGroupArchive& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void ProgressiveCommandGroupArchive::SharedCtor() {
_cached_size_ = 0;
super_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
ProgressiveCommandGroupArchive::~ProgressiveCommandGroupArchive() {
SharedDtor();
}
void ProgressiveCommandGroupArchive::SharedDtor() {
if (this != default_instance_) {
delete super_;
}
}
void ProgressiveCommandGroupArchive::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ProgressiveCommandGroupArchive::descriptor() {
protobuf_AssignDescriptorsOnce();
return ProgressiveCommandGroupArchive_descriptor_;
}
const ProgressiveCommandGroupArchive& ProgressiveCommandGroupArchive::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
ProgressiveCommandGroupArchive* ProgressiveCommandGroupArchive::default_instance_ = NULL;
ProgressiveCommandGroupArchive* ProgressiveCommandGroupArchive::New() const {
return new ProgressiveCommandGroupArchive;
}
void ProgressiveCommandGroupArchive::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_super()) {
if (super_ != NULL) super_->::TSK::CommandGroupArchive::Clear();
}
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool ProgressiveCommandGroupArchive::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required .TSK.CommandGroupArchive super = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_super()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void ProgressiveCommandGroupArchive::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// required .TSK.CommandGroupArchive super = 1;
if (has_super()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, this->super(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* ProgressiveCommandGroupArchive::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// required .TSK.CommandGroupArchive super = 1;
if (has_super()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
1, this->super(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int ProgressiveCommandGroupArchive::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// required .TSK.CommandGroupArchive super = 1;
if (has_super()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->super());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void ProgressiveCommandGroupArchive::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const ProgressiveCommandGroupArchive* source =
::google::protobuf::internal::dynamic_cast_if_available<const ProgressiveCommandGroupArchive*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void ProgressiveCommandGroupArchive::MergeFrom(const ProgressiveCommandGroupArchive& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_super()) {
mutable_super()->::TSK::CommandGroupArchive::MergeFrom(from.super());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void ProgressiveCommandGroupArchive::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void ProgressiveCommandGroupArchive::CopyFrom(const ProgressiveCommandGroupArchive& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ProgressiveCommandGroupArchive::IsInitialized() const {
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
if (has_super()) {
if (!this->super().IsInitialized()) return false;
}
return true;
}
void ProgressiveCommandGroupArchive::Swap(ProgressiveCommandGroupArchive* other) {
if (other != this) {
std::swap(super_, other->super_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata ProgressiveCommandGroupArchive::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = ProgressiveCommandGroupArchive_descriptor_;
metadata.reflection = ProgressiveCommandGroupArchive_reflection_;
return metadata;
}
// ===================================================================
#ifndef _MSC_VER
const int CommandSelectionBehaviorHistoryArchive_Entry::kCommandFieldNumber;
const int CommandSelectionBehaviorHistoryArchive_Entry::kCommandSelectionBehaviorFieldNumber;
#endif // !_MSC_VER
CommandSelectionBehaviorHistoryArchive_Entry::CommandSelectionBehaviorHistoryArchive_Entry()
: ::google::protobuf::Message() {
SharedCtor();
}
void CommandSelectionBehaviorHistoryArchive_Entry::InitAsDefaultInstance() {
command_ = const_cast< ::TSP::Reference*>(&::TSP::Reference::default_instance());
command_selection_behavior_ = const_cast< ::TSP::Reference*>(&::TSP::Reference::default_instance());
}
CommandSelectionBehaviorHistoryArchive_Entry::CommandSelectionBehaviorHistoryArchive_Entry(const CommandSelectionBehaviorHistoryArchive_Entry& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void CommandSelectionBehaviorHistoryArchive_Entry::SharedCtor() {
_cached_size_ = 0;
command_ = NULL;
command_selection_behavior_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
CommandSelectionBehaviorHistoryArchive_Entry::~CommandSelectionBehaviorHistoryArchive_Entry() {
SharedDtor();
}
void CommandSelectionBehaviorHistoryArchive_Entry::SharedDtor() {
if (this != default_instance_) {
delete command_;
delete command_selection_behavior_;
}
}
void CommandSelectionBehaviorHistoryArchive_Entry::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* CommandSelectionBehaviorHistoryArchive_Entry::descriptor() {
protobuf_AssignDescriptorsOnce();
return CommandSelectionBehaviorHistoryArchive_Entry_descriptor_;
}
const CommandSelectionBehaviorHistoryArchive_Entry& CommandSelectionBehaviorHistoryArchive_Entry::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
CommandSelectionBehaviorHistoryArchive_Entry* CommandSelectionBehaviorHistoryArchive_Entry::default_instance_ = NULL;
CommandSelectionBehaviorHistoryArchive_Entry* CommandSelectionBehaviorHistoryArchive_Entry::New() const {
return new CommandSelectionBehaviorHistoryArchive_Entry;
}
void CommandSelectionBehaviorHistoryArchive_Entry::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_command()) {
if (command_ != NULL) command_->::TSP::Reference::Clear();
}
if (has_command_selection_behavior()) {
if (command_selection_behavior_ != NULL) command_selection_behavior_->::TSP::Reference::Clear();
}
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool CommandSelectionBehaviorHistoryArchive_Entry::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required .TSP.Reference command = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_command()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(18)) goto parse_command_selection_behavior;
break;
}
// required .TSP.Reference command_selection_behavior = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_command_selection_behavior:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_command_selection_behavior()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void CommandSelectionBehaviorHistoryArchive_Entry::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// required .TSP.Reference command = 1;
if (has_command()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, this->command(), output);
}
// required .TSP.Reference command_selection_behavior = 2;
if (has_command_selection_behavior()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2, this->command_selection_behavior(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* CommandSelectionBehaviorHistoryArchive_Entry::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// required .TSP.Reference command = 1;
if (has_command()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
1, this->command(), target);
}
// required .TSP.Reference command_selection_behavior = 2;
if (has_command_selection_behavior()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
2, this->command_selection_behavior(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int CommandSelectionBehaviorHistoryArchive_Entry::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// required .TSP.Reference command = 1;
if (has_command()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->command());
}
// required .TSP.Reference command_selection_behavior = 2;
if (has_command_selection_behavior()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->command_selection_behavior());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void CommandSelectionBehaviorHistoryArchive_Entry::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const CommandSelectionBehaviorHistoryArchive_Entry* source =
::google::protobuf::internal::dynamic_cast_if_available<const CommandSelectionBehaviorHistoryArchive_Entry*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void CommandSelectionBehaviorHistoryArchive_Entry::MergeFrom(const CommandSelectionBehaviorHistoryArchive_Entry& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_command()) {
mutable_command()->::TSP::Reference::MergeFrom(from.command());
}
if (from.has_command_selection_behavior()) {
mutable_command_selection_behavior()->::TSP::Reference::MergeFrom(from.command_selection_behavior());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void CommandSelectionBehaviorHistoryArchive_Entry::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void CommandSelectionBehaviorHistoryArchive_Entry::CopyFrom(const CommandSelectionBehaviorHistoryArchive_Entry& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool CommandSelectionBehaviorHistoryArchive_Entry::IsInitialized() const {
if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
if (has_command()) {
if (!this->command().IsInitialized()) return false;
}
if (has_command_selection_behavior()) {
if (!this->command_selection_behavior().IsInitialized()) return false;
}
return true;
}
void CommandSelectionBehaviorHistoryArchive_Entry::Swap(CommandSelectionBehaviorHistoryArchive_Entry* other) {
if (other != this) {
std::swap(command_, other->command_);
std::swap(command_selection_behavior_, other->command_selection_behavior_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata CommandSelectionBehaviorHistoryArchive_Entry::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = CommandSelectionBehaviorHistoryArchive_Entry_descriptor_;
metadata.reflection = CommandSelectionBehaviorHistoryArchive_Entry_reflection_;
return metadata;
}
// -------------------------------------------------------------------
#ifndef _MSC_VER
const int CommandSelectionBehaviorHistoryArchive::kEntriesFieldNumber;
#endif // !_MSC_VER
CommandSelectionBehaviorHistoryArchive::CommandSelectionBehaviorHistoryArchive()
: ::google::protobuf::Message() {
SharedCtor();
}
void CommandSelectionBehaviorHistoryArchive::InitAsDefaultInstance() {
}
CommandSelectionBehaviorHistoryArchive::CommandSelectionBehaviorHistoryArchive(const CommandSelectionBehaviorHistoryArchive& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void CommandSelectionBehaviorHistoryArchive::SharedCtor() {
_cached_size_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
CommandSelectionBehaviorHistoryArchive::~CommandSelectionBehaviorHistoryArchive() {
SharedDtor();
}
void CommandSelectionBehaviorHistoryArchive::SharedDtor() {
if (this != default_instance_) {
}
}
void CommandSelectionBehaviorHistoryArchive::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* CommandSelectionBehaviorHistoryArchive::descriptor() {
protobuf_AssignDescriptorsOnce();
return CommandSelectionBehaviorHistoryArchive_descriptor_;
}
const CommandSelectionBehaviorHistoryArchive& CommandSelectionBehaviorHistoryArchive::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
CommandSelectionBehaviorHistoryArchive* CommandSelectionBehaviorHistoryArchive::default_instance_ = NULL;
CommandSelectionBehaviorHistoryArchive* CommandSelectionBehaviorHistoryArchive::New() const {
return new CommandSelectionBehaviorHistoryArchive;
}
void CommandSelectionBehaviorHistoryArchive::Clear() {
entries_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool CommandSelectionBehaviorHistoryArchive::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// repeated .TSK.CommandSelectionBehaviorHistoryArchive.Entry entries = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_entries:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_entries()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(10)) goto parse_entries;
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void CommandSelectionBehaviorHistoryArchive::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// repeated .TSK.CommandSelectionBehaviorHistoryArchive.Entry entries = 1;
for (int i = 0; i < this->entries_size(); i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, this->entries(i), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* CommandSelectionBehaviorHistoryArchive::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// repeated .TSK.CommandSelectionBehaviorHistoryArchive.Entry entries = 1;
for (int i = 0; i < this->entries_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
1, this->entries(i), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int CommandSelectionBehaviorHistoryArchive::ByteSize() const {
int total_size = 0;
// repeated .TSK.CommandSelectionBehaviorHistoryArchive.Entry entries = 1;
total_size += 1 * this->entries_size();
for (int i = 0; i < this->entries_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->entries(i));
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void CommandSelectionBehaviorHistoryArchive::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const CommandSelectionBehaviorHistoryArchive* source =
::google::protobuf::internal::dynamic_cast_if_available<const CommandSelectionBehaviorHistoryArchive*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void CommandSelectionBehaviorHistoryArchive::MergeFrom(const CommandSelectionBehaviorHistoryArchive& from) {
GOOGLE_CHECK_NE(&from, this);
entries_.MergeFrom(from.entries_);
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void CommandSelectionBehaviorHistoryArchive::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void CommandSelectionBehaviorHistoryArchive::CopyFrom(const CommandSelectionBehaviorHistoryArchive& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool CommandSelectionBehaviorHistoryArchive::IsInitialized() const {
for (int i = 0; i < entries_size(); i++) {
if (!this->entries(i).IsInitialized()) return false;
}
return true;
}
void CommandSelectionBehaviorHistoryArchive::Swap(CommandSelectionBehaviorHistoryArchive* other) {
if (other != this) {
entries_.Swap(&other->entries_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata CommandSelectionBehaviorHistoryArchive::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = CommandSelectionBehaviorHistoryArchive_descriptor_;
metadata.reflection = CommandSelectionBehaviorHistoryArchive_reflection_;
return metadata;
}
// ===================================================================
#ifndef _MSC_VER
const int UndoRedoStateCommandSelectionBehaviorArchive::kUndoRedoStateFieldNumber;
#endif // !_MSC_VER
UndoRedoStateCommandSelectionBehaviorArchive::UndoRedoStateCommandSelectionBehaviorArchive()
: ::google::protobuf::Message() {
SharedCtor();
}
void UndoRedoStateCommandSelectionBehaviorArchive::InitAsDefaultInstance() {
undo_redo_state_ = const_cast< ::TSP::Reference*>(&::TSP::Reference::default_instance());
}
UndoRedoStateCommandSelectionBehaviorArchive::UndoRedoStateCommandSelectionBehaviorArchive(const UndoRedoStateCommandSelectionBehaviorArchive& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void UndoRedoStateCommandSelectionBehaviorArchive::SharedCtor() {
_cached_size_ = 0;
undo_redo_state_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
UndoRedoStateCommandSelectionBehaviorArchive::~UndoRedoStateCommandSelectionBehaviorArchive() {
SharedDtor();
}
void UndoRedoStateCommandSelectionBehaviorArchive::SharedDtor() {
if (this != default_instance_) {
delete undo_redo_state_;
}
}
void UndoRedoStateCommandSelectionBehaviorArchive::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* UndoRedoStateCommandSelectionBehaviorArchive::descriptor() {
protobuf_AssignDescriptorsOnce();
return UndoRedoStateCommandSelectionBehaviorArchive_descriptor_;
}
const UndoRedoStateCommandSelectionBehaviorArchive& UndoRedoStateCommandSelectionBehaviorArchive::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
UndoRedoStateCommandSelectionBehaviorArchive* UndoRedoStateCommandSelectionBehaviorArchive::default_instance_ = NULL;
UndoRedoStateCommandSelectionBehaviorArchive* UndoRedoStateCommandSelectionBehaviorArchive::New() const {
return new UndoRedoStateCommandSelectionBehaviorArchive;
}
void UndoRedoStateCommandSelectionBehaviorArchive::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_undo_redo_state()) {
if (undo_redo_state_ != NULL) undo_redo_state_->::TSP::Reference::Clear();
}
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool UndoRedoStateCommandSelectionBehaviorArchive::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional .TSP.Reference undo_redo_state = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_undo_redo_state()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void UndoRedoStateCommandSelectionBehaviorArchive::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional .TSP.Reference undo_redo_state = 2;
if (has_undo_redo_state()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2, this->undo_redo_state(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* UndoRedoStateCommandSelectionBehaviorArchive::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional .TSP.Reference undo_redo_state = 2;
if (has_undo_redo_state()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
2, this->undo_redo_state(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int UndoRedoStateCommandSelectionBehaviorArchive::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// optional .TSP.Reference undo_redo_state = 2;
if (has_undo_redo_state()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->undo_redo_state());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void UndoRedoStateCommandSelectionBehaviorArchive::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const UndoRedoStateCommandSelectionBehaviorArchive* source =
::google::protobuf::internal::dynamic_cast_if_available<const UndoRedoStateCommandSelectionBehaviorArchive*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void UndoRedoStateCommandSelectionBehaviorArchive::MergeFrom(const UndoRedoStateCommandSelectionBehaviorArchive& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_undo_redo_state()) {
mutable_undo_redo_state()->::TSP::Reference::MergeFrom(from.undo_redo_state());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void UndoRedoStateCommandSelectionBehaviorArchive::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void UndoRedoStateCommandSelectionBehaviorArchive::CopyFrom(const UndoRedoStateCommandSelectionBehaviorArchive& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool UndoRedoStateCommandSelectionBehaviorArchive::IsInitialized() const {
if (has_undo_redo_state()) {
if (!this->undo_redo_state().IsInitialized()) return false;
}
return true;
}
void UndoRedoStateCommandSelectionBehaviorArchive::Swap(UndoRedoStateCommandSelectionBehaviorArchive* other) {
if (other != this) {
std::swap(undo_redo_state_, other->undo_redo_state_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata UndoRedoStateCommandSelectionBehaviorArchive::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = UndoRedoStateCommandSelectionBehaviorArchive_descriptor_;
metadata.reflection = UndoRedoStateCommandSelectionBehaviorArchive_reflection_;
return metadata;
}
// ===================================================================
#ifndef _MSC_VER
const int FormatStructArchive::kFormatTypeFieldNumber;
const int FormatStructArchive::kDecimalPlacesFieldNumber;
const int FormatStructArchive::kCurrencyCodeFieldNumber;
const int FormatStructArchive::kNegativeStyleFieldNumber;
const int FormatStructArchive::kShowThousandsSeparatorFieldNumber;
const int FormatStructArchive::kUseAccountingStyleFieldNumber;
const int FormatStructArchive::kDurationStyleFieldNumber;
const int FormatStructArchive::kBaseFieldNumber;
const int FormatStructArchive::kBasePlacesFieldNumber;
const int FormatStructArchive::kBaseUseMinusSignFieldNumber;
const int FormatStructArchive::kFractionAccuracyFieldNumber;
const int FormatStructArchive::kSuppressDateFormatFieldNumber;
const int FormatStructArchive::kSuppressTimeFormatFieldNumber;
const int FormatStructArchive::kDateTimeFormatFieldNumber;
const int FormatStructArchive::kDurationUnitLargestFieldNumber;
const int FormatStructArchive::kDurationUnitSmallestFieldNumber;
const int FormatStructArchive::kCustomIdFieldNumber;
const int FormatStructArchive::kCustomFormatStringFieldNumber;
const int FormatStructArchive::kScaleFactorFieldNumber;
const int FormatStructArchive::kRequiresFractionReplacementFieldNumber;
const int FormatStructArchive::kControlMinimumFieldNumber;
const int FormatStructArchive::kControlMaximumFieldNumber;
const int FormatStructArchive::kControlIncrementFieldNumber;
const int FormatStructArchive::kControlFormatTypeFieldNumber;
const int FormatStructArchive::kSliderOrientationFieldNumber;
const int FormatStructArchive::kSliderPositionFieldNumber;
const int FormatStructArchive::kDecimalWidthFieldNumber;
const int FormatStructArchive::kMinIntegerWidthFieldNumber;
const int FormatStructArchive::kNumNonspaceIntegerDigitsFieldNumber;
const int FormatStructArchive::kNumNonspaceDecimalDigitsFieldNumber;
const int FormatStructArchive::kIndexFromRightLastIntegerFieldNumber;
const int FormatStructArchive::kInterstitialStringsFieldNumber;
const int FormatStructArchive::kIntersStrInsertionIndexesFieldNumber;
const int FormatStructArchive::kNumHashDecimalDigitsFieldNumber;
const int FormatStructArchive::kTotalNumDecimalDigitsFieldNumber;
const int FormatStructArchive::kIsComplexFieldNumber;
const int FormatStructArchive::kContainsIntegerTokenFieldNumber;
const int FormatStructArchive::kMultipleChoiceListInitialValueFieldNumber;
const int FormatStructArchive::kMultipleChoiceListIdFieldNumber;
const int FormatStructArchive::kUseAutomaticDurationUnitsFieldNumber;
#endif // !_MSC_VER
FormatStructArchive::FormatStructArchive()
: ::google::protobuf::Message() {
SharedCtor();
}
void FormatStructArchive::InitAsDefaultInstance() {
inters_str_insertion_indexes_ = const_cast< ::TSP::IndexSet*>(&::TSP::IndexSet::default_instance());
}
FormatStructArchive::FormatStructArchive(const FormatStructArchive& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void FormatStructArchive::SharedCtor() {
_cached_size_ = 0;
format_type_ = 0u;
decimal_places_ = 0u;
currency_code_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
negative_style_ = 0u;
show_thousands_separator_ = false;
use_accounting_style_ = false;
duration_style_ = 0u;
base_ = 0u;
base_places_ = 0u;
base_use_minus_sign_ = false;
fraction_accuracy_ = 0u;
suppress_date_format_ = false;
suppress_time_format_ = false;
date_time_format_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
duration_unit_largest_ = 0u;
duration_unit_smallest_ = 0u;
custom_id_ = 0u;
custom_format_string_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
scale_factor_ = 0;
requires_fraction_replacement_ = false;
control_minimum_ = 0;
control_maximum_ = 0;
control_increment_ = 0;
control_format_type_ = 0u;
slider_orientation_ = 0u;
slider_position_ = 0u;
decimal_width_ = 0u;
min_integer_width_ = 0u;
num_nonspace_integer_digits_ = 0u;
num_nonspace_decimal_digits_ = 0u;
index_from_right_last_integer_ = 0u;
inters_str_insertion_indexes_ = NULL;
num_hash_decimal_digits_ = 0u;
total_num_decimal_digits_ = 0u;
is_complex_ = false;
contains_integer_token_ = false;
multiple_choice_list_initial_value_ = 0u;
multiple_choice_list_id_ = 0u;
use_automatic_duration_units_ = false;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
FormatStructArchive::~FormatStructArchive() {
SharedDtor();
}
void FormatStructArchive::SharedDtor() {
if (currency_code_ != &::google::protobuf::internal::kEmptyString) {
delete currency_code_;
}
if (date_time_format_ != &::google::protobuf::internal::kEmptyString) {
delete date_time_format_;
}
if (custom_format_string_ != &::google::protobuf::internal::kEmptyString) {
delete custom_format_string_;
}
if (this != default_instance_) {
delete inters_str_insertion_indexes_;
}
}
void FormatStructArchive::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* FormatStructArchive::descriptor() {
protobuf_AssignDescriptorsOnce();
return FormatStructArchive_descriptor_;
}
const FormatStructArchive& FormatStructArchive::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
FormatStructArchive* FormatStructArchive::default_instance_ = NULL;
FormatStructArchive* FormatStructArchive::New() const {
return new FormatStructArchive;
}
void FormatStructArchive::Clear() {
_extensions_.Clear();
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
format_type_ = 0u;
decimal_places_ = 0u;
if (has_currency_code()) {
if (currency_code_ != &::google::protobuf::internal::kEmptyString) {
currency_code_->clear();
}
}
negative_style_ = 0u;
show_thousands_separator_ = false;
use_accounting_style_ = false;
duration_style_ = 0u;
base_ = 0u;
}
if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
base_places_ = 0u;
base_use_minus_sign_ = false;
fraction_accuracy_ = 0u;
suppress_date_format_ = false;
suppress_time_format_ = false;
if (has_date_time_format()) {
if (date_time_format_ != &::google::protobuf::internal::kEmptyString) {
date_time_format_->clear();
}
}
duration_unit_largest_ = 0u;
duration_unit_smallest_ = 0u;
}
if (_has_bits_[16 / 32] & (0xffu << (16 % 32))) {
custom_id_ = 0u;
if (has_custom_format_string()) {
if (custom_format_string_ != &::google::protobuf::internal::kEmptyString) {
custom_format_string_->clear();
}
}
scale_factor_ = 0;
requires_fraction_replacement_ = false;
control_minimum_ = 0;
control_maximum_ = 0;
control_increment_ = 0;
control_format_type_ = 0u;
}
if (_has_bits_[24 / 32] & (0xffu << (24 % 32))) {
slider_orientation_ = 0u;
slider_position_ = 0u;
decimal_width_ = 0u;
min_integer_width_ = 0u;
num_nonspace_integer_digits_ = 0u;
num_nonspace_decimal_digits_ = 0u;
index_from_right_last_integer_ = 0u;
}
if (_has_bits_[32 / 32] & (0xffu << (32 % 32))) {
if (has_inters_str_insertion_indexes()) {
if (inters_str_insertion_indexes_ != NULL) inters_str_insertion_indexes_->::TSP::IndexSet::Clear();
}
num_hash_decimal_digits_ = 0u;
total_num_decimal_digits_ = 0u;
is_complex_ = false;
contains_integer_token_ = false;
multiple_choice_list_initial_value_ = 0u;
multiple_choice_list_id_ = 0u;
use_automatic_duration_units_ = false;
}
interstitial_strings_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool FormatStructArchive::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required uint32 format_type = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &format_type_)));
set_has_format_type();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_decimal_places;
break;
}
// optional uint32 decimal_places = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_decimal_places:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &decimal_places_)));
set_has_decimal_places();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(26)) goto parse_currency_code;
break;
}
// optional string currency_code = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_currency_code:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_currency_code()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->currency_code().data(), this->currency_code().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(32)) goto parse_negative_style;
break;
}
// optional uint32 negative_style = 4;
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_negative_style:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &negative_style_)));
set_has_negative_style();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(40)) goto parse_show_thousands_separator;
break;
}
// optional bool show_thousands_separator = 5;
case 5: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_show_thousands_separator:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &show_thousands_separator_)));
set_has_show_thousands_separator();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(48)) goto parse_use_accounting_style;
break;
}
// optional bool use_accounting_style = 6;
case 6: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_use_accounting_style:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &use_accounting_style_)));
set_has_use_accounting_style();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(56)) goto parse_duration_style;
break;
}
// optional uint32 duration_style = 7;
case 7: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_duration_style:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &duration_style_)));
set_has_duration_style();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(64)) goto parse_base;
break;
}
// optional uint32 base = 8;
case 8: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_base:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &base_)));
set_has_base();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(72)) goto parse_base_places;
break;
}
// optional uint32 base_places = 9;
case 9: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_base_places:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &base_places_)));
set_has_base_places();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(80)) goto parse_base_use_minus_sign;
break;
}
// optional bool base_use_minus_sign = 10;
case 10: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_base_use_minus_sign:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &base_use_minus_sign_)));
set_has_base_use_minus_sign();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(88)) goto parse_fraction_accuracy;
break;
}
// optional uint32 fraction_accuracy = 11;
case 11: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_fraction_accuracy:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &fraction_accuracy_)));
set_has_fraction_accuracy();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(96)) goto parse_suppress_date_format;
break;
}
// optional bool suppress_date_format = 12;
case 12: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_suppress_date_format:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &suppress_date_format_)));
set_has_suppress_date_format();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(104)) goto parse_suppress_time_format;
break;
}
// optional bool suppress_time_format = 13;
case 13: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_suppress_time_format:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &suppress_time_format_)));
set_has_suppress_time_format();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(114)) goto parse_date_time_format;
break;
}
// optional string date_time_format = 14;
case 14: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_date_time_format:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_date_time_format()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->date_time_format().data(), this->date_time_format().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(120)) goto parse_duration_unit_largest;
break;
}
// optional uint32 duration_unit_largest = 15;
case 15: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_duration_unit_largest:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &duration_unit_largest_)));
set_has_duration_unit_largest();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(128)) goto parse_duration_unit_smallest;
break;
}
// optional uint32 duration_unit_smallest = 16;
case 16: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_duration_unit_smallest:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &duration_unit_smallest_)));
set_has_duration_unit_smallest();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(136)) goto parse_custom_id;
break;
}
// optional uint32 custom_id = 17;
case 17: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_custom_id:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &custom_id_)));
set_has_custom_id();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(146)) goto parse_custom_format_string;
break;
}
// optional string custom_format_string = 18;
case 18: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_custom_format_string:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_custom_format_string()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->custom_format_string().data(), this->custom_format_string().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(153)) goto parse_scale_factor;
break;
}
// optional double scale_factor = 19;
case 19: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
parse_scale_factor:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &scale_factor_)));
set_has_scale_factor();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(160)) goto parse_requires_fraction_replacement;
break;
}
// optional bool requires_fraction_replacement = 20;
case 20: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_requires_fraction_replacement:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &requires_fraction_replacement_)));
set_has_requires_fraction_replacement();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(169)) goto parse_control_minimum;
break;
}
// optional double control_minimum = 21;
case 21: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
parse_control_minimum:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &control_minimum_)));
set_has_control_minimum();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(177)) goto parse_control_maximum;
break;
}
// optional double control_maximum = 22;
case 22: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
parse_control_maximum:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &control_maximum_)));
set_has_control_maximum();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(185)) goto parse_control_increment;
break;
}
// optional double control_increment = 23;
case 23: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
parse_control_increment:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &control_increment_)));
set_has_control_increment();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(192)) goto parse_control_format_type;
break;
}
// optional uint32 control_format_type = 24;
case 24: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_control_format_type:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &control_format_type_)));
set_has_control_format_type();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(200)) goto parse_slider_orientation;
break;
}
// optional uint32 slider_orientation = 25;
case 25: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_slider_orientation:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &slider_orientation_)));
set_has_slider_orientation();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(208)) goto parse_slider_position;
break;
}
// optional uint32 slider_position = 26;
case 26: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_slider_position:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &slider_position_)));
set_has_slider_position();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(216)) goto parse_decimal_width;
break;
}
// optional uint32 decimal_width = 27;
case 27: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_decimal_width:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &decimal_width_)));
set_has_decimal_width();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(224)) goto parse_min_integer_width;
break;
}
// optional uint32 min_integer_width = 28;
case 28: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_min_integer_width:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &min_integer_width_)));
set_has_min_integer_width();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(232)) goto parse_num_nonspace_integer_digits;
break;
}
// optional uint32 num_nonspace_integer_digits = 29;
case 29: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_num_nonspace_integer_digits:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &num_nonspace_integer_digits_)));
set_has_num_nonspace_integer_digits();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(240)) goto parse_num_nonspace_decimal_digits;
break;
}
// optional uint32 num_nonspace_decimal_digits = 30;
case 30: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_num_nonspace_decimal_digits:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &num_nonspace_decimal_digits_)));
set_has_num_nonspace_decimal_digits();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(248)) goto parse_index_from_right_last_integer;
break;
}
// optional uint32 index_from_right_last_integer = 31;
case 31: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_index_from_right_last_integer:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &index_from_right_last_integer_)));
set_has_index_from_right_last_integer();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(258)) goto parse_interstitial_strings;
break;
}
// repeated string interstitial_strings = 32;
case 32: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_interstitial_strings:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_interstitial_strings()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->interstitial_strings(this->interstitial_strings_size() - 1).data(),
this->interstitial_strings(this->interstitial_strings_size() - 1).length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(258)) goto parse_interstitial_strings;
if (input->ExpectTag(266)) goto parse_inters_str_insertion_indexes;
break;
}
// optional .TSP.IndexSet inters_str_insertion_indexes = 33;
case 33: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_inters_str_insertion_indexes:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_inters_str_insertion_indexes()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(272)) goto parse_num_hash_decimal_digits;
break;
}
// optional uint32 num_hash_decimal_digits = 34;
case 34: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_num_hash_decimal_digits:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &num_hash_decimal_digits_)));
set_has_num_hash_decimal_digits();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(280)) goto parse_total_num_decimal_digits;
break;
}
// optional uint32 total_num_decimal_digits = 35;
case 35: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_total_num_decimal_digits:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &total_num_decimal_digits_)));
set_has_total_num_decimal_digits();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(288)) goto parse_is_complex;
break;
}
// optional bool is_complex = 36;
case 36: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_is_complex:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &is_complex_)));
set_has_is_complex();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(296)) goto parse_contains_integer_token;
break;
}
// optional bool contains_integer_token = 37;
case 37: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_contains_integer_token:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &contains_integer_token_)));
set_has_contains_integer_token();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(304)) goto parse_multiple_choice_list_initial_value;
break;
}
// optional uint32 multiple_choice_list_initial_value = 38;
case 38: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_multiple_choice_list_initial_value:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &multiple_choice_list_initial_value_)));
set_has_multiple_choice_list_initial_value();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(312)) goto parse_multiple_choice_list_id;
break;
}
// optional uint32 multiple_choice_list_id = 39;
case 39: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_multiple_choice_list_id:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &multiple_choice_list_id_)));
set_has_multiple_choice_list_id();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(320)) goto parse_use_automatic_duration_units;
break;
}
// optional bool use_automatic_duration_units = 40;
case 40: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_use_automatic_duration_units:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &use_automatic_duration_units_)));
set_has_use_automatic_duration_units();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
if ((80000u <= tag && tag < 160000u)) {
DO_(_extensions_.ParseField(tag, input, default_instance_,
mutable_unknown_fields()));
continue;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void FormatStructArchive::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// required uint32 format_type = 1;
if (has_format_type()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->format_type(), output);
}
// optional uint32 decimal_places = 2;
if (has_decimal_places()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->decimal_places(), output);
}
// optional string currency_code = 3;
if (has_currency_code()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->currency_code().data(), this->currency_code().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
3, this->currency_code(), output);
}
// optional uint32 negative_style = 4;
if (has_negative_style()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(4, this->negative_style(), output);
}
// optional bool show_thousands_separator = 5;
if (has_show_thousands_separator()) {
::google::protobuf::internal::WireFormatLite::WriteBool(5, this->show_thousands_separator(), output);
}
// optional bool use_accounting_style = 6;
if (has_use_accounting_style()) {
::google::protobuf::internal::WireFormatLite::WriteBool(6, this->use_accounting_style(), output);
}
// optional uint32 duration_style = 7;
if (has_duration_style()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(7, this->duration_style(), output);
}
// optional uint32 base = 8;
if (has_base()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(8, this->base(), output);
}
// optional uint32 base_places = 9;
if (has_base_places()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(9, this->base_places(), output);
}
// optional bool base_use_minus_sign = 10;
if (has_base_use_minus_sign()) {
::google::protobuf::internal::WireFormatLite::WriteBool(10, this->base_use_minus_sign(), output);
}
// optional uint32 fraction_accuracy = 11;
if (has_fraction_accuracy()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(11, this->fraction_accuracy(), output);
}
// optional bool suppress_date_format = 12;
if (has_suppress_date_format()) {
::google::protobuf::internal::WireFormatLite::WriteBool(12, this->suppress_date_format(), output);
}
// optional bool suppress_time_format = 13;
if (has_suppress_time_format()) {
::google::protobuf::internal::WireFormatLite::WriteBool(13, this->suppress_time_format(), output);
}
// optional string date_time_format = 14;
if (has_date_time_format()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->date_time_format().data(), this->date_time_format().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
14, this->date_time_format(), output);
}
// optional uint32 duration_unit_largest = 15;
if (has_duration_unit_largest()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(15, this->duration_unit_largest(), output);
}
// optional uint32 duration_unit_smallest = 16;
if (has_duration_unit_smallest()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(16, this->duration_unit_smallest(), output);
}
// optional uint32 custom_id = 17;
if (has_custom_id()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(17, this->custom_id(), output);
}
// optional string custom_format_string = 18;
if (has_custom_format_string()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->custom_format_string().data(), this->custom_format_string().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
18, this->custom_format_string(), output);
}
// optional double scale_factor = 19;
if (has_scale_factor()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(19, this->scale_factor(), output);
}
// optional bool requires_fraction_replacement = 20;
if (has_requires_fraction_replacement()) {
::google::protobuf::internal::WireFormatLite::WriteBool(20, this->requires_fraction_replacement(), output);
}
// optional double control_minimum = 21;
if (has_control_minimum()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(21, this->control_minimum(), output);
}
// optional double control_maximum = 22;
if (has_control_maximum()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(22, this->control_maximum(), output);
}
// optional double control_increment = 23;
if (has_control_increment()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(23, this->control_increment(), output);
}
// optional uint32 control_format_type = 24;
if (has_control_format_type()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(24, this->control_format_type(), output);
}
// optional uint32 slider_orientation = 25;
if (has_slider_orientation()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(25, this->slider_orientation(), output);
}
// optional uint32 slider_position = 26;
if (has_slider_position()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(26, this->slider_position(), output);
}
// optional uint32 decimal_width = 27;
if (has_decimal_width()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(27, this->decimal_width(), output);
}
// optional uint32 min_integer_width = 28;
if (has_min_integer_width()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(28, this->min_integer_width(), output);
}
// optional uint32 num_nonspace_integer_digits = 29;
if (has_num_nonspace_integer_digits()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(29, this->num_nonspace_integer_digits(), output);
}
// optional uint32 num_nonspace_decimal_digits = 30;
if (has_num_nonspace_decimal_digits()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(30, this->num_nonspace_decimal_digits(), output);
}
// optional uint32 index_from_right_last_integer = 31;
if (has_index_from_right_last_integer()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(31, this->index_from_right_last_integer(), output);
}
// repeated string interstitial_strings = 32;
for (int i = 0; i < this->interstitial_strings_size(); i++) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->interstitial_strings(i).data(), this->interstitial_strings(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
32, this->interstitial_strings(i), output);
}
// optional .TSP.IndexSet inters_str_insertion_indexes = 33;
if (has_inters_str_insertion_indexes()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
33, this->inters_str_insertion_indexes(), output);
}
// optional uint32 num_hash_decimal_digits = 34;
if (has_num_hash_decimal_digits()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(34, this->num_hash_decimal_digits(), output);
}
// optional uint32 total_num_decimal_digits = 35;
if (has_total_num_decimal_digits()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(35, this->total_num_decimal_digits(), output);
}
// optional bool is_complex = 36;
if (has_is_complex()) {
::google::protobuf::internal::WireFormatLite::WriteBool(36, this->is_complex(), output);
}
// optional bool contains_integer_token = 37;
if (has_contains_integer_token()) {
::google::protobuf::internal::WireFormatLite::WriteBool(37, this->contains_integer_token(), output);
}
// optional uint32 multiple_choice_list_initial_value = 38;
if (has_multiple_choice_list_initial_value()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(38, this->multiple_choice_list_initial_value(), output);
}
// optional uint32 multiple_choice_list_id = 39;
if (has_multiple_choice_list_id()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(39, this->multiple_choice_list_id(), output);
}
// optional bool use_automatic_duration_units = 40;
if (has_use_automatic_duration_units()) {
::google::protobuf::internal::WireFormatLite::WriteBool(40, this->use_automatic_duration_units(), output);
}
// Extension range [10000, 20000)
_extensions_.SerializeWithCachedSizes(
10000, 20000, output);
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* FormatStructArchive::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// required uint32 format_type = 1;
if (has_format_type()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->format_type(), target);
}
// optional uint32 decimal_places = 2;
if (has_decimal_places()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->decimal_places(), target);
}
// optional string currency_code = 3;
if (has_currency_code()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->currency_code().data(), this->currency_code().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3, this->currency_code(), target);
}
// optional uint32 negative_style = 4;
if (has_negative_style()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(4, this->negative_style(), target);
}
// optional bool show_thousands_separator = 5;
if (has_show_thousands_separator()) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->show_thousands_separator(), target);
}
// optional bool use_accounting_style = 6;
if (has_use_accounting_style()) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(6, this->use_accounting_style(), target);
}
// optional uint32 duration_style = 7;
if (has_duration_style()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(7, this->duration_style(), target);
}
// optional uint32 base = 8;
if (has_base()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(8, this->base(), target);
}
// optional uint32 base_places = 9;
if (has_base_places()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(9, this->base_places(), target);
}
// optional bool base_use_minus_sign = 10;
if (has_base_use_minus_sign()) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(10, this->base_use_minus_sign(), target);
}
// optional uint32 fraction_accuracy = 11;
if (has_fraction_accuracy()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(11, this->fraction_accuracy(), target);
}
// optional bool suppress_date_format = 12;
if (has_suppress_date_format()) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(12, this->suppress_date_format(), target);
}
// optional bool suppress_time_format = 13;
if (has_suppress_time_format()) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(13, this->suppress_time_format(), target);
}
// optional string date_time_format = 14;
if (has_date_time_format()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->date_time_format().data(), this->date_time_format().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
14, this->date_time_format(), target);
}
// optional uint32 duration_unit_largest = 15;
if (has_duration_unit_largest()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(15, this->duration_unit_largest(), target);
}
// optional uint32 duration_unit_smallest = 16;
if (has_duration_unit_smallest()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(16, this->duration_unit_smallest(), target);
}
// optional uint32 custom_id = 17;
if (has_custom_id()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(17, this->custom_id(), target);
}
// optional string custom_format_string = 18;
if (has_custom_format_string()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->custom_format_string().data(), this->custom_format_string().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
18, this->custom_format_string(), target);
}
// optional double scale_factor = 19;
if (has_scale_factor()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(19, this->scale_factor(), target);
}
// optional bool requires_fraction_replacement = 20;
if (has_requires_fraction_replacement()) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(20, this->requires_fraction_replacement(), target);
}
// optional double control_minimum = 21;
if (has_control_minimum()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(21, this->control_minimum(), target);
}
// optional double control_maximum = 22;
if (has_control_maximum()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(22, this->control_maximum(), target);
}
// optional double control_increment = 23;
if (has_control_increment()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(23, this->control_increment(), target);
}
// optional uint32 control_format_type = 24;
if (has_control_format_type()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(24, this->control_format_type(), target);
}
// optional uint32 slider_orientation = 25;
if (has_slider_orientation()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(25, this->slider_orientation(), target);
}
// optional uint32 slider_position = 26;
if (has_slider_position()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(26, this->slider_position(), target);
}
// optional uint32 decimal_width = 27;
if (has_decimal_width()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(27, this->decimal_width(), target);
}
// optional uint32 min_integer_width = 28;
if (has_min_integer_width()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(28, this->min_integer_width(), target);
}
// optional uint32 num_nonspace_integer_digits = 29;
if (has_num_nonspace_integer_digits()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(29, this->num_nonspace_integer_digits(), target);
}
// optional uint32 num_nonspace_decimal_digits = 30;
if (has_num_nonspace_decimal_digits()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(30, this->num_nonspace_decimal_digits(), target);
}
// optional uint32 index_from_right_last_integer = 31;
if (has_index_from_right_last_integer()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(31, this->index_from_right_last_integer(), target);
}
// repeated string interstitial_strings = 32;
for (int i = 0; i < this->interstitial_strings_size(); i++) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->interstitial_strings(i).data(), this->interstitial_strings(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target = ::google::protobuf::internal::WireFormatLite::
WriteStringToArray(32, this->interstitial_strings(i), target);
}
// optional .TSP.IndexSet inters_str_insertion_indexes = 33;
if (has_inters_str_insertion_indexes()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
33, this->inters_str_insertion_indexes(), target);
}
// optional uint32 num_hash_decimal_digits = 34;
if (has_num_hash_decimal_digits()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(34, this->num_hash_decimal_digits(), target);
}
// optional uint32 total_num_decimal_digits = 35;
if (has_total_num_decimal_digits()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(35, this->total_num_decimal_digits(), target);
}
// optional bool is_complex = 36;
if (has_is_complex()) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(36, this->is_complex(), target);
}
// optional bool contains_integer_token = 37;
if (has_contains_integer_token()) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(37, this->contains_integer_token(), target);
}
// optional uint32 multiple_choice_list_initial_value = 38;
if (has_multiple_choice_list_initial_value()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(38, this->multiple_choice_list_initial_value(), target);
}
// optional uint32 multiple_choice_list_id = 39;
if (has_multiple_choice_list_id()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(39, this->multiple_choice_list_id(), target);
}
// optional bool use_automatic_duration_units = 40;
if (has_use_automatic_duration_units()) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(40, this->use_automatic_duration_units(), target);
}
// Extension range [10000, 20000)
target = _extensions_.SerializeWithCachedSizesToArray(
10000, 20000, target);
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int FormatStructArchive::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// required uint32 format_type = 1;
if (has_format_type()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->format_type());
}
// optional uint32 decimal_places = 2;
if (has_decimal_places()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->decimal_places());
}
// optional string currency_code = 3;
if (has_currency_code()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->currency_code());
}
// optional uint32 negative_style = 4;
if (has_negative_style()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->negative_style());
}
// optional bool show_thousands_separator = 5;
if (has_show_thousands_separator()) {
total_size += 1 + 1;
}
// optional bool use_accounting_style = 6;
if (has_use_accounting_style()) {
total_size += 1 + 1;
}
// optional uint32 duration_style = 7;
if (has_duration_style()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->duration_style());
}
// optional uint32 base = 8;
if (has_base()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->base());
}
}
if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
// optional uint32 base_places = 9;
if (has_base_places()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->base_places());
}
// optional bool base_use_minus_sign = 10;
if (has_base_use_minus_sign()) {
total_size += 1 + 1;
}
// optional uint32 fraction_accuracy = 11;
if (has_fraction_accuracy()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->fraction_accuracy());
}
// optional bool suppress_date_format = 12;
if (has_suppress_date_format()) {
total_size += 1 + 1;
}
// optional bool suppress_time_format = 13;
if (has_suppress_time_format()) {
total_size += 1 + 1;
}
// optional string date_time_format = 14;
if (has_date_time_format()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->date_time_format());
}
// optional uint32 duration_unit_largest = 15;
if (has_duration_unit_largest()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->duration_unit_largest());
}
// optional uint32 duration_unit_smallest = 16;
if (has_duration_unit_smallest()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->duration_unit_smallest());
}
}
if (_has_bits_[16 / 32] & (0xffu << (16 % 32))) {
// optional uint32 custom_id = 17;
if (has_custom_id()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->custom_id());
}
// optional string custom_format_string = 18;
if (has_custom_format_string()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->custom_format_string());
}
// optional double scale_factor = 19;
if (has_scale_factor()) {
total_size += 2 + 8;
}
// optional bool requires_fraction_replacement = 20;
if (has_requires_fraction_replacement()) {
total_size += 2 + 1;
}
// optional double control_minimum = 21;
if (has_control_minimum()) {
total_size += 2 + 8;
}
// optional double control_maximum = 22;
if (has_control_maximum()) {
total_size += 2 + 8;
}
// optional double control_increment = 23;
if (has_control_increment()) {
total_size += 2 + 8;
}
// optional uint32 control_format_type = 24;
if (has_control_format_type()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->control_format_type());
}
}
if (_has_bits_[24 / 32] & (0xffu << (24 % 32))) {
// optional uint32 slider_orientation = 25;
if (has_slider_orientation()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->slider_orientation());
}
// optional uint32 slider_position = 26;
if (has_slider_position()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->slider_position());
}
// optional uint32 decimal_width = 27;
if (has_decimal_width()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->decimal_width());
}
// optional uint32 min_integer_width = 28;
if (has_min_integer_width()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->min_integer_width());
}
// optional uint32 num_nonspace_integer_digits = 29;
if (has_num_nonspace_integer_digits()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->num_nonspace_integer_digits());
}
// optional uint32 num_nonspace_decimal_digits = 30;
if (has_num_nonspace_decimal_digits()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->num_nonspace_decimal_digits());
}
// optional uint32 index_from_right_last_integer = 31;
if (has_index_from_right_last_integer()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->index_from_right_last_integer());
}
}
if (_has_bits_[32 / 32] & (0xffu << (32 % 32))) {
// optional .TSP.IndexSet inters_str_insertion_indexes = 33;
if (has_inters_str_insertion_indexes()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->inters_str_insertion_indexes());
}
// optional uint32 num_hash_decimal_digits = 34;
if (has_num_hash_decimal_digits()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->num_hash_decimal_digits());
}
// optional uint32 total_num_decimal_digits = 35;
if (has_total_num_decimal_digits()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->total_num_decimal_digits());
}
// optional bool is_complex = 36;
if (has_is_complex()) {
total_size += 2 + 1;
}
// optional bool contains_integer_token = 37;
if (has_contains_integer_token()) {
total_size += 2 + 1;
}
// optional uint32 multiple_choice_list_initial_value = 38;
if (has_multiple_choice_list_initial_value()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->multiple_choice_list_initial_value());
}
// optional uint32 multiple_choice_list_id = 39;
if (has_multiple_choice_list_id()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->multiple_choice_list_id());
}
// optional bool use_automatic_duration_units = 40;
if (has_use_automatic_duration_units()) {
total_size += 2 + 1;
}
}
// repeated string interstitial_strings = 32;
total_size += 2 * this->interstitial_strings_size();
for (int i = 0; i < this->interstitial_strings_size(); i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->interstitial_strings(i));
}
total_size += _extensions_.ByteSize();
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void FormatStructArchive::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const FormatStructArchive* source =
::google::protobuf::internal::dynamic_cast_if_available<const FormatStructArchive*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void FormatStructArchive::MergeFrom(const FormatStructArchive& from) {
GOOGLE_CHECK_NE(&from, this);
interstitial_strings_.MergeFrom(from.interstitial_strings_);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_format_type()) {
set_format_type(from.format_type());
}
if (from.has_decimal_places()) {
set_decimal_places(from.decimal_places());
}
if (from.has_currency_code()) {
set_currency_code(from.currency_code());
}
if (from.has_negative_style()) {
set_negative_style(from.negative_style());
}
if (from.has_show_thousands_separator()) {
set_show_thousands_separator(from.show_thousands_separator());
}
if (from.has_use_accounting_style()) {
set_use_accounting_style(from.use_accounting_style());
}
if (from.has_duration_style()) {
set_duration_style(from.duration_style());
}
if (from.has_base()) {
set_base(from.base());
}
}
if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
if (from.has_base_places()) {
set_base_places(from.base_places());
}
if (from.has_base_use_minus_sign()) {
set_base_use_minus_sign(from.base_use_minus_sign());
}
if (from.has_fraction_accuracy()) {
set_fraction_accuracy(from.fraction_accuracy());
}
if (from.has_suppress_date_format()) {
set_suppress_date_format(from.suppress_date_format());
}
if (from.has_suppress_time_format()) {
set_suppress_time_format(from.suppress_time_format());
}
if (from.has_date_time_format()) {
set_date_time_format(from.date_time_format());
}
if (from.has_duration_unit_largest()) {
set_duration_unit_largest(from.duration_unit_largest());
}
if (from.has_duration_unit_smallest()) {
set_duration_unit_smallest(from.duration_unit_smallest());
}
}
if (from._has_bits_[16 / 32] & (0xffu << (16 % 32))) {
if (from.has_custom_id()) {
set_custom_id(from.custom_id());
}
if (from.has_custom_format_string()) {
set_custom_format_string(from.custom_format_string());
}
if (from.has_scale_factor()) {
set_scale_factor(from.scale_factor());
}
if (from.has_requires_fraction_replacement()) {
set_requires_fraction_replacement(from.requires_fraction_replacement());
}
if (from.has_control_minimum()) {
set_control_minimum(from.control_minimum());
}
if (from.has_control_maximum()) {
set_control_maximum(from.control_maximum());
}
if (from.has_control_increment()) {
set_control_increment(from.control_increment());
}
if (from.has_control_format_type()) {
set_control_format_type(from.control_format_type());
}
}
if (from._has_bits_[24 / 32] & (0xffu << (24 % 32))) {
if (from.has_slider_orientation()) {
set_slider_orientation(from.slider_orientation());
}
if (from.has_slider_position()) {
set_slider_position(from.slider_position());
}
if (from.has_decimal_width()) {
set_decimal_width(from.decimal_width());
}
if (from.has_min_integer_width()) {
set_min_integer_width(from.min_integer_width());
}
if (from.has_num_nonspace_integer_digits()) {
set_num_nonspace_integer_digits(from.num_nonspace_integer_digits());
}
if (from.has_num_nonspace_decimal_digits()) {
set_num_nonspace_decimal_digits(from.num_nonspace_decimal_digits());
}
if (from.has_index_from_right_last_integer()) {
set_index_from_right_last_integer(from.index_from_right_last_integer());
}
}
if (from._has_bits_[32 / 32] & (0xffu << (32 % 32))) {
if (from.has_inters_str_insertion_indexes()) {
mutable_inters_str_insertion_indexes()->::TSP::IndexSet::MergeFrom(from.inters_str_insertion_indexes());
}
if (from.has_num_hash_decimal_digits()) {
set_num_hash_decimal_digits(from.num_hash_decimal_digits());
}
if (from.has_total_num_decimal_digits()) {
set_total_num_decimal_digits(from.total_num_decimal_digits());
}
if (from.has_is_complex()) {
set_is_complex(from.is_complex());
}
if (from.has_contains_integer_token()) {
set_contains_integer_token(from.contains_integer_token());
}
if (from.has_multiple_choice_list_initial_value()) {
set_multiple_choice_list_initial_value(from.multiple_choice_list_initial_value());
}
if (from.has_multiple_choice_list_id()) {
set_multiple_choice_list_id(from.multiple_choice_list_id());
}
if (from.has_use_automatic_duration_units()) {
set_use_automatic_duration_units(from.use_automatic_duration_units());
}
}
_extensions_.MergeFrom(from._extensions_);
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void FormatStructArchive::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void FormatStructArchive::CopyFrom(const FormatStructArchive& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool FormatStructArchive::IsInitialized() const {
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
if (has_inters_str_insertion_indexes()) {
if (!this->inters_str_insertion_indexes().IsInitialized()) return false;
}
if (!_extensions_.IsInitialized()) return false; return true;
}
void FormatStructArchive::Swap(FormatStructArchive* other) {
if (other != this) {
std::swap(format_type_, other->format_type_);
std::swap(decimal_places_, other->decimal_places_);
std::swap(currency_code_, other->currency_code_);
std::swap(negative_style_, other->negative_style_);
std::swap(show_thousands_separator_, other->show_thousands_separator_);
std::swap(use_accounting_style_, other->use_accounting_style_);
std::swap(duration_style_, other->duration_style_);
std::swap(base_, other->base_);
std::swap(base_places_, other->base_places_);
std::swap(base_use_minus_sign_, other->base_use_minus_sign_);
std::swap(fraction_accuracy_, other->fraction_accuracy_);
std::swap(suppress_date_format_, other->suppress_date_format_);
std::swap(suppress_time_format_, other->suppress_time_format_);
std::swap(date_time_format_, other->date_time_format_);
std::swap(duration_unit_largest_, other->duration_unit_largest_);
std::swap(duration_unit_smallest_, other->duration_unit_smallest_);
std::swap(custom_id_, other->custom_id_);
std::swap(custom_format_string_, other->custom_format_string_);
std::swap(scale_factor_, other->scale_factor_);
std::swap(requires_fraction_replacement_, other->requires_fraction_replacement_);
std::swap(control_minimum_, other->control_minimum_);
std::swap(control_maximum_, other->control_maximum_);
std::swap(control_increment_, other->control_increment_);
std::swap(control_format_type_, other->control_format_type_);
std::swap(slider_orientation_, other->slider_orientation_);
std::swap(slider_position_, other->slider_position_);
std::swap(decimal_width_, other->decimal_width_);
std::swap(min_integer_width_, other->min_integer_width_);
std::swap(num_nonspace_integer_digits_, other->num_nonspace_integer_digits_);
std::swap(num_nonspace_decimal_digits_, other->num_nonspace_decimal_digits_);
std::swap(index_from_right_last_integer_, other->index_from_right_last_integer_);
interstitial_strings_.Swap(&other->interstitial_strings_);
std::swap(inters_str_insertion_indexes_, other->inters_str_insertion_indexes_);
std::swap(num_hash_decimal_digits_, other->num_hash_decimal_digits_);
std::swap(total_num_decimal_digits_, other->total_num_decimal_digits_);
std::swap(is_complex_, other->is_complex_);
std::swap(contains_integer_token_, other->contains_integer_token_);
std::swap(multiple_choice_list_initial_value_, other->multiple_choice_list_initial_value_);
std::swap(multiple_choice_list_id_, other->multiple_choice_list_id_);
std::swap(use_automatic_duration_units_, other->use_automatic_duration_units_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
std::swap(_has_bits_[1], other->_has_bits_[1]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
_extensions_.Swap(&other->_extensions_);
}
}
::google::protobuf::Metadata FormatStructArchive::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = FormatStructArchive_descriptor_;
metadata.reflection = FormatStructArchive_reflection_;
return metadata;
}
// ===================================================================
#ifndef _MSC_VER
const int CustomFormatArchive_Condition::kConditionTypeFieldNumber;
const int CustomFormatArchive_Condition::kConditionValueFieldNumber;
const int CustomFormatArchive_Condition::kConditionFormatFieldNumber;
const int CustomFormatArchive_Condition::kConditionValueDblFieldNumber;
#endif // !_MSC_VER
CustomFormatArchive_Condition::CustomFormatArchive_Condition()
: ::google::protobuf::Message() {
SharedCtor();
}
void CustomFormatArchive_Condition::InitAsDefaultInstance() {
condition_format_ = const_cast< ::TSK::FormatStructArchive*>(&::TSK::FormatStructArchive::default_instance());
}
CustomFormatArchive_Condition::CustomFormatArchive_Condition(const CustomFormatArchive_Condition& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void CustomFormatArchive_Condition::SharedCtor() {
_cached_size_ = 0;
condition_type_ = 0u;
condition_value_ = 0;
condition_format_ = NULL;
condition_value_dbl_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
CustomFormatArchive_Condition::~CustomFormatArchive_Condition() {
SharedDtor();
}
void CustomFormatArchive_Condition::SharedDtor() {
if (this != default_instance_) {
delete condition_format_;
}
}
void CustomFormatArchive_Condition::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* CustomFormatArchive_Condition::descriptor() {
protobuf_AssignDescriptorsOnce();
return CustomFormatArchive_Condition_descriptor_;
}
const CustomFormatArchive_Condition& CustomFormatArchive_Condition::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
CustomFormatArchive_Condition* CustomFormatArchive_Condition::default_instance_ = NULL;
CustomFormatArchive_Condition* CustomFormatArchive_Condition::New() const {
return new CustomFormatArchive_Condition;
}
void CustomFormatArchive_Condition::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
condition_type_ = 0u;
condition_value_ = 0;
if (has_condition_format()) {
if (condition_format_ != NULL) condition_format_->::TSK::FormatStructArchive::Clear();
}
condition_value_dbl_ = 0;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool CustomFormatArchive_Condition::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required uint32 condition_type = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &condition_type_)));
set_has_condition_type();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(21)) goto parse_condition_value;
break;
}
// optional float condition_value = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_condition_value:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &condition_value_)));
set_has_condition_value();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(26)) goto parse_condition_format;
break;
}
// required .TSK.FormatStructArchive condition_format = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_condition_format:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_condition_format()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(33)) goto parse_condition_value_dbl;
break;
}
// optional double condition_value_dbl = 4;
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
parse_condition_value_dbl:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &condition_value_dbl_)));
set_has_condition_value_dbl();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void CustomFormatArchive_Condition::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// required uint32 condition_type = 1;
if (has_condition_type()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->condition_type(), output);
}
// optional float condition_value = 2;
if (has_condition_value()) {
::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->condition_value(), output);
}
// required .TSK.FormatStructArchive condition_format = 3;
if (has_condition_format()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3, this->condition_format(), output);
}
// optional double condition_value_dbl = 4;
if (has_condition_value_dbl()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(4, this->condition_value_dbl(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* CustomFormatArchive_Condition::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// required uint32 condition_type = 1;
if (has_condition_type()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->condition_type(), target);
}
// optional float condition_value = 2;
if (has_condition_value()) {
target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->condition_value(), target);
}
// required .TSK.FormatStructArchive condition_format = 3;
if (has_condition_format()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
3, this->condition_format(), target);
}
// optional double condition_value_dbl = 4;
if (has_condition_value_dbl()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(4, this->condition_value_dbl(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int CustomFormatArchive_Condition::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// required uint32 condition_type = 1;
if (has_condition_type()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->condition_type());
}
// optional float condition_value = 2;
if (has_condition_value()) {
total_size += 1 + 4;
}
// required .TSK.FormatStructArchive condition_format = 3;
if (has_condition_format()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->condition_format());
}
// optional double condition_value_dbl = 4;
if (has_condition_value_dbl()) {
total_size += 1 + 8;
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void CustomFormatArchive_Condition::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const CustomFormatArchive_Condition* source =
::google::protobuf::internal::dynamic_cast_if_available<const CustomFormatArchive_Condition*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void CustomFormatArchive_Condition::MergeFrom(const CustomFormatArchive_Condition& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_condition_type()) {
set_condition_type(from.condition_type());
}
if (from.has_condition_value()) {
set_condition_value(from.condition_value());
}
if (from.has_condition_format()) {
mutable_condition_format()->::TSK::FormatStructArchive::MergeFrom(from.condition_format());
}
if (from.has_condition_value_dbl()) {
set_condition_value_dbl(from.condition_value_dbl());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void CustomFormatArchive_Condition::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void CustomFormatArchive_Condition::CopyFrom(const CustomFormatArchive_Condition& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool CustomFormatArchive_Condition::IsInitialized() const {
if ((_has_bits_[0] & 0x00000005) != 0x00000005) return false;
if (has_condition_format()) {
if (!this->condition_format().IsInitialized()) return false;
}
return true;
}
void CustomFormatArchive_Condition::Swap(CustomFormatArchive_Condition* other) {
if (other != this) {
std::swap(condition_type_, other->condition_type_);
std::swap(condition_value_, other->condition_value_);
std::swap(condition_format_, other->condition_format_);
std::swap(condition_value_dbl_, other->condition_value_dbl_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata CustomFormatArchive_Condition::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = CustomFormatArchive_Condition_descriptor_;
metadata.reflection = CustomFormatArchive_Condition_reflection_;
return metadata;
}
// -------------------------------------------------------------------
#ifndef _MSC_VER
const int CustomFormatArchive::kNameFieldNumber;
const int CustomFormatArchive::kFormatTypeFieldNumber;
const int CustomFormatArchive::kDefaultFormatFieldNumber;
const int CustomFormatArchive::kConditionsFieldNumber;
#endif // !_MSC_VER
CustomFormatArchive::CustomFormatArchive()
: ::google::protobuf::Message() {
SharedCtor();
}
void CustomFormatArchive::InitAsDefaultInstance() {
default_format_ = const_cast< ::TSK::FormatStructArchive*>(&::TSK::FormatStructArchive::default_instance());
}
CustomFormatArchive::CustomFormatArchive(const CustomFormatArchive& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void CustomFormatArchive::SharedCtor() {
_cached_size_ = 0;
name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
format_type_ = 0u;
default_format_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
CustomFormatArchive::~CustomFormatArchive() {
SharedDtor();
}
void CustomFormatArchive::SharedDtor() {
if (name_ != &::google::protobuf::internal::kEmptyString) {
delete name_;
}
if (this != default_instance_) {
delete default_format_;
}
}
void CustomFormatArchive::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* CustomFormatArchive::descriptor() {
protobuf_AssignDescriptorsOnce();
return CustomFormatArchive_descriptor_;
}
const CustomFormatArchive& CustomFormatArchive::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
CustomFormatArchive* CustomFormatArchive::default_instance_ = NULL;
CustomFormatArchive* CustomFormatArchive::New() const {
return new CustomFormatArchive;
}
void CustomFormatArchive::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_name()) {
if (name_ != &::google::protobuf::internal::kEmptyString) {
name_->clear();
}
}
format_type_ = 0u;
if (has_default_format()) {
if (default_format_ != NULL) default_format_->::TSK::FormatStructArchive::Clear();
}
}
conditions_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool CustomFormatArchive::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required string name = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_format_type;
break;
}
// required uint32 format_type = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_format_type:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &format_type_)));
set_has_format_type();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(26)) goto parse_default_format;
break;
}
// required .TSK.FormatStructArchive default_format = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_default_format:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_default_format()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(34)) goto parse_conditions;
break;
}
// repeated .TSK.CustomFormatArchive.Condition conditions = 4;
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_conditions:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_conditions()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(34)) goto parse_conditions;
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void CustomFormatArchive::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// required string name = 1;
if (has_name()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
1, this->name(), output);
}
// required uint32 format_type = 2;
if (has_format_type()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->format_type(), output);
}
// required .TSK.FormatStructArchive default_format = 3;
if (has_default_format()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3, this->default_format(), output);
}
// repeated .TSK.CustomFormatArchive.Condition conditions = 4;
for (int i = 0; i < this->conditions_size(); i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
4, this->conditions(i), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* CustomFormatArchive::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// required string name = 1;
if (has_name()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->name(), target);
}
// required uint32 format_type = 2;
if (has_format_type()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->format_type(), target);
}
// required .TSK.FormatStructArchive default_format = 3;
if (has_default_format()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
3, this->default_format(), target);
}
// repeated .TSK.CustomFormatArchive.Condition conditions = 4;
for (int i = 0; i < this->conditions_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
4, this->conditions(i), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int CustomFormatArchive::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// required string name = 1;
if (has_name()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->name());
}
// required uint32 format_type = 2;
if (has_format_type()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->format_type());
}
// required .TSK.FormatStructArchive default_format = 3;
if (has_default_format()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->default_format());
}
}
// repeated .TSK.CustomFormatArchive.Condition conditions = 4;
total_size += 1 * this->conditions_size();
for (int i = 0; i < this->conditions_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->conditions(i));
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void CustomFormatArchive::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const CustomFormatArchive* source =
::google::protobuf::internal::dynamic_cast_if_available<const CustomFormatArchive*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void CustomFormatArchive::MergeFrom(const CustomFormatArchive& from) {
GOOGLE_CHECK_NE(&from, this);
conditions_.MergeFrom(from.conditions_);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_name()) {
set_name(from.name());
}
if (from.has_format_type()) {
set_format_type(from.format_type());
}
if (from.has_default_format()) {
mutable_default_format()->::TSK::FormatStructArchive::MergeFrom(from.default_format());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void CustomFormatArchive::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void CustomFormatArchive::CopyFrom(const CustomFormatArchive& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool CustomFormatArchive::IsInitialized() const {
if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false;
if (has_default_format()) {
if (!this->default_format().IsInitialized()) return false;
}
for (int i = 0; i < conditions_size(); i++) {
if (!this->conditions(i).IsInitialized()) return false;
}
return true;
}
void CustomFormatArchive::Swap(CustomFormatArchive* other) {
if (other != this) {
std::swap(name_, other->name_);
std::swap(format_type_, other->format_type_);
std::swap(default_format_, other->default_format_);
conditions_.Swap(&other->conditions_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata CustomFormatArchive::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = CustomFormatArchive_descriptor_;
metadata.reflection = CustomFormatArchive_reflection_;
return metadata;
}
// ===================================================================
#ifndef _MSC_VER
const int AnnotationAuthorArchive::kNameFieldNumber;
const int AnnotationAuthorArchive::kColorFieldNumber;
#endif // !_MSC_VER
AnnotationAuthorArchive::AnnotationAuthorArchive()
: ::google::protobuf::Message() {
SharedCtor();
}
void AnnotationAuthorArchive::InitAsDefaultInstance() {
color_ = const_cast< ::TSP::Color*>(&::TSP::Color::default_instance());
}
AnnotationAuthorArchive::AnnotationAuthorArchive(const AnnotationAuthorArchive& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void AnnotationAuthorArchive::SharedCtor() {
_cached_size_ = 0;
name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
color_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
AnnotationAuthorArchive::~AnnotationAuthorArchive() {
SharedDtor();
}
void AnnotationAuthorArchive::SharedDtor() {
if (name_ != &::google::protobuf::internal::kEmptyString) {
delete name_;
}
if (this != default_instance_) {
delete color_;
}
}
void AnnotationAuthorArchive::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* AnnotationAuthorArchive::descriptor() {
protobuf_AssignDescriptorsOnce();
return AnnotationAuthorArchive_descriptor_;
}
const AnnotationAuthorArchive& AnnotationAuthorArchive::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
AnnotationAuthorArchive* AnnotationAuthorArchive::default_instance_ = NULL;
AnnotationAuthorArchive* AnnotationAuthorArchive::New() const {
return new AnnotationAuthorArchive;
}
void AnnotationAuthorArchive::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_name()) {
if (name_ != &::google::protobuf::internal::kEmptyString) {
name_->clear();
}
}
if (has_color()) {
if (color_ != NULL) color_->::TSP::Color::Clear();
}
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool AnnotationAuthorArchive::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional string name = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(18)) goto parse_color;
break;
}
// optional .TSP.Color color = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_color:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_color()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void AnnotationAuthorArchive::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional string name = 1;
if (has_name()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
1, this->name(), output);
}
// optional .TSP.Color color = 2;
if (has_color()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2, this->color(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* AnnotationAuthorArchive::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional string name = 1;
if (has_name()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->name(), target);
}
// optional .TSP.Color color = 2;
if (has_color()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
2, this->color(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int AnnotationAuthorArchive::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// optional string name = 1;
if (has_name()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->name());
}
// optional .TSP.Color color = 2;
if (has_color()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->color());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void AnnotationAuthorArchive::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const AnnotationAuthorArchive* source =
::google::protobuf::internal::dynamic_cast_if_available<const AnnotationAuthorArchive*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void AnnotationAuthorArchive::MergeFrom(const AnnotationAuthorArchive& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_name()) {
set_name(from.name());
}
if (from.has_color()) {
mutable_color()->::TSP::Color::MergeFrom(from.color());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void AnnotationAuthorArchive::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void AnnotationAuthorArchive::CopyFrom(const AnnotationAuthorArchive& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool AnnotationAuthorArchive::IsInitialized() const {
if (has_color()) {
if (!this->color().IsInitialized()) return false;
}
return true;
}
void AnnotationAuthorArchive::Swap(AnnotationAuthorArchive* other) {
if (other != this) {
std::swap(name_, other->name_);
std::swap(color_, other->color_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata AnnotationAuthorArchive::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = AnnotationAuthorArchive_descriptor_;
metadata.reflection = AnnotationAuthorArchive_reflection_;
return metadata;
}
// ===================================================================
#ifndef _MSC_VER
const int DeprecatedChangeAuthorArchive::kNameFieldNumber;
const int DeprecatedChangeAuthorArchive::kChangeColorFieldNumber;
#endif // !_MSC_VER
DeprecatedChangeAuthorArchive::DeprecatedChangeAuthorArchive()
: ::google::protobuf::Message() {
SharedCtor();
}
void DeprecatedChangeAuthorArchive::InitAsDefaultInstance() {
change_color_ = const_cast< ::TSP::Color*>(&::TSP::Color::default_instance());
}
DeprecatedChangeAuthorArchive::DeprecatedChangeAuthorArchive(const DeprecatedChangeAuthorArchive& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void DeprecatedChangeAuthorArchive::SharedCtor() {
_cached_size_ = 0;
name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
change_color_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
DeprecatedChangeAuthorArchive::~DeprecatedChangeAuthorArchive() {
SharedDtor();
}
void DeprecatedChangeAuthorArchive::SharedDtor() {
if (name_ != &::google::protobuf::internal::kEmptyString) {
delete name_;
}
if (this != default_instance_) {
delete change_color_;
}
}
void DeprecatedChangeAuthorArchive::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DeprecatedChangeAuthorArchive::descriptor() {
protobuf_AssignDescriptorsOnce();
return DeprecatedChangeAuthorArchive_descriptor_;
}
const DeprecatedChangeAuthorArchive& DeprecatedChangeAuthorArchive::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
DeprecatedChangeAuthorArchive* DeprecatedChangeAuthorArchive::default_instance_ = NULL;
DeprecatedChangeAuthorArchive* DeprecatedChangeAuthorArchive::New() const {
return new DeprecatedChangeAuthorArchive;
}
void DeprecatedChangeAuthorArchive::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_name()) {
if (name_ != &::google::protobuf::internal::kEmptyString) {
name_->clear();
}
}
if (has_change_color()) {
if (change_color_ != NULL) change_color_->::TSP::Color::Clear();
}
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool DeprecatedChangeAuthorArchive::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional string name = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(18)) goto parse_change_color;
break;
}
// optional .TSP.Color change_color = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_change_color:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_change_color()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void DeprecatedChangeAuthorArchive::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional string name = 1;
if (has_name()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
1, this->name(), output);
}
// optional .TSP.Color change_color = 2;
if (has_change_color()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2, this->change_color(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* DeprecatedChangeAuthorArchive::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional string name = 1;
if (has_name()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->name(), target);
}
// optional .TSP.Color change_color = 2;
if (has_change_color()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
2, this->change_color(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int DeprecatedChangeAuthorArchive::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// optional string name = 1;
if (has_name()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->name());
}
// optional .TSP.Color change_color = 2;
if (has_change_color()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->change_color());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void DeprecatedChangeAuthorArchive::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const DeprecatedChangeAuthorArchive* source =
::google::protobuf::internal::dynamic_cast_if_available<const DeprecatedChangeAuthorArchive*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void DeprecatedChangeAuthorArchive::MergeFrom(const DeprecatedChangeAuthorArchive& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_name()) {
set_name(from.name());
}
if (from.has_change_color()) {
mutable_change_color()->::TSP::Color::MergeFrom(from.change_color());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void DeprecatedChangeAuthorArchive::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void DeprecatedChangeAuthorArchive::CopyFrom(const DeprecatedChangeAuthorArchive& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool DeprecatedChangeAuthorArchive::IsInitialized() const {
if (has_change_color()) {
if (!this->change_color().IsInitialized()) return false;
}
return true;
}
void DeprecatedChangeAuthorArchive::Swap(DeprecatedChangeAuthorArchive* other) {
if (other != this) {
std::swap(name_, other->name_);
std::swap(change_color_, other->change_color_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata DeprecatedChangeAuthorArchive::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = DeprecatedChangeAuthorArchive_descriptor_;
metadata.reflection = DeprecatedChangeAuthorArchive_reflection_;
return metadata;
}
// ===================================================================
#ifndef _MSC_VER
const int AnnotationAuthorStorageArchive::kAnnotationAuthorFieldNumber;
#endif // !_MSC_VER
AnnotationAuthorStorageArchive::AnnotationAuthorStorageArchive()
: ::google::protobuf::Message() {
SharedCtor();
}
void AnnotationAuthorStorageArchive::InitAsDefaultInstance() {
}
AnnotationAuthorStorageArchive::AnnotationAuthorStorageArchive(const AnnotationAuthorStorageArchive& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void AnnotationAuthorStorageArchive::SharedCtor() {
_cached_size_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
AnnotationAuthorStorageArchive::~AnnotationAuthorStorageArchive() {
SharedDtor();
}
void AnnotationAuthorStorageArchive::SharedDtor() {
if (this != default_instance_) {
}
}
void AnnotationAuthorStorageArchive::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* AnnotationAuthorStorageArchive::descriptor() {
protobuf_AssignDescriptorsOnce();
return AnnotationAuthorStorageArchive_descriptor_;
}
const AnnotationAuthorStorageArchive& AnnotationAuthorStorageArchive::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
AnnotationAuthorStorageArchive* AnnotationAuthorStorageArchive::default_instance_ = NULL;
AnnotationAuthorStorageArchive* AnnotationAuthorStorageArchive::New() const {
return new AnnotationAuthorStorageArchive;
}
void AnnotationAuthorStorageArchive::Clear() {
annotation_author_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool AnnotationAuthorStorageArchive::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// repeated .TSP.Reference annotation_author = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_annotation_author:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_annotation_author()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(10)) goto parse_annotation_author;
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void AnnotationAuthorStorageArchive::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// repeated .TSP.Reference annotation_author = 1;
for (int i = 0; i < this->annotation_author_size(); i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, this->annotation_author(i), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* AnnotationAuthorStorageArchive::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// repeated .TSP.Reference annotation_author = 1;
for (int i = 0; i < this->annotation_author_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
1, this->annotation_author(i), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int AnnotationAuthorStorageArchive::ByteSize() const {
int total_size = 0;
// repeated .TSP.Reference annotation_author = 1;
total_size += 1 * this->annotation_author_size();
for (int i = 0; i < this->annotation_author_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->annotation_author(i));
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void AnnotationAuthorStorageArchive::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const AnnotationAuthorStorageArchive* source =
::google::protobuf::internal::dynamic_cast_if_available<const AnnotationAuthorStorageArchive*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void AnnotationAuthorStorageArchive::MergeFrom(const AnnotationAuthorStorageArchive& from) {
GOOGLE_CHECK_NE(&from, this);
annotation_author_.MergeFrom(from.annotation_author_);
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void AnnotationAuthorStorageArchive::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void AnnotationAuthorStorageArchive::CopyFrom(const AnnotationAuthorStorageArchive& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool AnnotationAuthorStorageArchive::IsInitialized() const {
for (int i = 0; i < annotation_author_size(); i++) {
if (!this->annotation_author(i).IsInitialized()) return false;
}
return true;
}
void AnnotationAuthorStorageArchive::Swap(AnnotationAuthorStorageArchive* other) {
if (other != this) {
annotation_author_.Swap(&other->annotation_author_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata AnnotationAuthorStorageArchive::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = AnnotationAuthorStorageArchive_descriptor_;
metadata.reflection = AnnotationAuthorStorageArchive_reflection_;
return metadata;
}
// ===================================================================
#ifndef _MSC_VER
const int AddAnnotationAuthorCommandArchive::kSuperFieldNumber;
const int AddAnnotationAuthorCommandArchive::kDocumentRootFieldNumber;
const int AddAnnotationAuthorCommandArchive::kAnnotationAuthorFieldNumber;
#endif // !_MSC_VER
AddAnnotationAuthorCommandArchive::AddAnnotationAuthorCommandArchive()
: ::google::protobuf::Message() {
SharedCtor();
}
void AddAnnotationAuthorCommandArchive::InitAsDefaultInstance() {
super_ = const_cast< ::TSK::CommandArchive*>(&::TSK::CommandArchive::default_instance());
document_root_ = const_cast< ::TSP::Reference*>(&::TSP::Reference::default_instance());
annotation_author_ = const_cast< ::TSP::Reference*>(&::TSP::Reference::default_instance());
}
AddAnnotationAuthorCommandArchive::AddAnnotationAuthorCommandArchive(const AddAnnotationAuthorCommandArchive& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void AddAnnotationAuthorCommandArchive::SharedCtor() {
_cached_size_ = 0;
super_ = NULL;
document_root_ = NULL;
annotation_author_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
AddAnnotationAuthorCommandArchive::~AddAnnotationAuthorCommandArchive() {
SharedDtor();
}
void AddAnnotationAuthorCommandArchive::SharedDtor() {
if (this != default_instance_) {
delete super_;
delete document_root_;
delete annotation_author_;
}
}
void AddAnnotationAuthorCommandArchive::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* AddAnnotationAuthorCommandArchive::descriptor() {
protobuf_AssignDescriptorsOnce();
return AddAnnotationAuthorCommandArchive_descriptor_;
}
const AddAnnotationAuthorCommandArchive& AddAnnotationAuthorCommandArchive::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
AddAnnotationAuthorCommandArchive* AddAnnotationAuthorCommandArchive::default_instance_ = NULL;
AddAnnotationAuthorCommandArchive* AddAnnotationAuthorCommandArchive::New() const {
return new AddAnnotationAuthorCommandArchive;
}
void AddAnnotationAuthorCommandArchive::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_super()) {
if (super_ != NULL) super_->::TSK::CommandArchive::Clear();
}
if (has_document_root()) {
if (document_root_ != NULL) document_root_->::TSP::Reference::Clear();
}
if (has_annotation_author()) {
if (annotation_author_ != NULL) annotation_author_->::TSP::Reference::Clear();
}
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool AddAnnotationAuthorCommandArchive::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required .TSK.CommandArchive super = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_super()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(18)) goto parse_document_root;
break;
}
// optional .TSP.Reference document_root = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_document_root:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_document_root()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(26)) goto parse_annotation_author;
break;
}
// optional .TSP.Reference annotation_author = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_annotation_author:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_annotation_author()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void AddAnnotationAuthorCommandArchive::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// required .TSK.CommandArchive super = 1;
if (has_super()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, this->super(), output);
}
// optional .TSP.Reference document_root = 2;
if (has_document_root()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2, this->document_root(), output);
}
// optional .TSP.Reference annotation_author = 3;
if (has_annotation_author()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3, this->annotation_author(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* AddAnnotationAuthorCommandArchive::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// required .TSK.CommandArchive super = 1;
if (has_super()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
1, this->super(), target);
}
// optional .TSP.Reference document_root = 2;
if (has_document_root()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
2, this->document_root(), target);
}
// optional .TSP.Reference annotation_author = 3;
if (has_annotation_author()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
3, this->annotation_author(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int AddAnnotationAuthorCommandArchive::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// required .TSK.CommandArchive super = 1;
if (has_super()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->super());
}
// optional .TSP.Reference document_root = 2;
if (has_document_root()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->document_root());
}
// optional .TSP.Reference annotation_author = 3;
if (has_annotation_author()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->annotation_author());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void AddAnnotationAuthorCommandArchive::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const AddAnnotationAuthorCommandArchive* source =
::google::protobuf::internal::dynamic_cast_if_available<const AddAnnotationAuthorCommandArchive*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void AddAnnotationAuthorCommandArchive::MergeFrom(const AddAnnotationAuthorCommandArchive& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_super()) {
mutable_super()->::TSK::CommandArchive::MergeFrom(from.super());
}
if (from.has_document_root()) {
mutable_document_root()->::TSP::Reference::MergeFrom(from.document_root());
}
if (from.has_annotation_author()) {
mutable_annotation_author()->::TSP::Reference::MergeFrom(from.annotation_author());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void AddAnnotationAuthorCommandArchive::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void AddAnnotationAuthorCommandArchive::CopyFrom(const AddAnnotationAuthorCommandArchive& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool AddAnnotationAuthorCommandArchive::IsInitialized() const {
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
if (has_super()) {
if (!this->super().IsInitialized()) return false;
}
if (has_document_root()) {
if (!this->document_root().IsInitialized()) return false;
}
if (has_annotation_author()) {
if (!this->annotation_author().IsInitialized()) return false;
}
return true;
}
void AddAnnotationAuthorCommandArchive::Swap(AddAnnotationAuthorCommandArchive* other) {
if (other != this) {
std::swap(super_, other->super_);
std::swap(document_root_, other->document_root_);
std::swap(annotation_author_, other->annotation_author_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata AddAnnotationAuthorCommandArchive::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = AddAnnotationAuthorCommandArchive_descriptor_;
metadata.reflection = AddAnnotationAuthorCommandArchive_reflection_;
return metadata;
}
// ===================================================================
#ifndef _MSC_VER
const int SetAnnotationAuthorColorCommandArchive::kSuperFieldNumber;
const int SetAnnotationAuthorColorCommandArchive::kAnnotationAuthorFieldNumber;
const int SetAnnotationAuthorColorCommandArchive::kColorFieldNumber;
#endif // !_MSC_VER
SetAnnotationAuthorColorCommandArchive::SetAnnotationAuthorColorCommandArchive()
: ::google::protobuf::Message() {
SharedCtor();
}
void SetAnnotationAuthorColorCommandArchive::InitAsDefaultInstance() {
super_ = const_cast< ::TSK::CommandArchive*>(&::TSK::CommandArchive::default_instance());
annotation_author_ = const_cast< ::TSP::Reference*>(&::TSP::Reference::default_instance());
color_ = const_cast< ::TSP::Color*>(&::TSP::Color::default_instance());
}
SetAnnotationAuthorColorCommandArchive::SetAnnotationAuthorColorCommandArchive(const SetAnnotationAuthorColorCommandArchive& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void SetAnnotationAuthorColorCommandArchive::SharedCtor() {
_cached_size_ = 0;
super_ = NULL;
annotation_author_ = NULL;
color_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
SetAnnotationAuthorColorCommandArchive::~SetAnnotationAuthorColorCommandArchive() {
SharedDtor();
}
void SetAnnotationAuthorColorCommandArchive::SharedDtor() {
if (this != default_instance_) {
delete super_;
delete annotation_author_;
delete color_;
}
}
void SetAnnotationAuthorColorCommandArchive::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* SetAnnotationAuthorColorCommandArchive::descriptor() {
protobuf_AssignDescriptorsOnce();
return SetAnnotationAuthorColorCommandArchive_descriptor_;
}
const SetAnnotationAuthorColorCommandArchive& SetAnnotationAuthorColorCommandArchive::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_TSKArchives_2eproto();
return *default_instance_;
}
SetAnnotationAuthorColorCommandArchive* SetAnnotationAuthorColorCommandArchive::default_instance_ = NULL;
SetAnnotationAuthorColorCommandArchive* SetAnnotationAuthorColorCommandArchive::New() const {
return new SetAnnotationAuthorColorCommandArchive;
}
void SetAnnotationAuthorColorCommandArchive::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_super()) {
if (super_ != NULL) super_->::TSK::CommandArchive::Clear();
}
if (has_annotation_author()) {
if (annotation_author_ != NULL) annotation_author_->::TSP::Reference::Clear();
}
if (has_color()) {
if (color_ != NULL) color_->::TSP::Color::Clear();
}
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool SetAnnotationAuthorColorCommandArchive::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required .TSK.CommandArchive super = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_super()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(18)) goto parse_annotation_author;
break;
}
// optional .TSP.Reference annotation_author = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_annotation_author:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_annotation_author()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(26)) goto parse_color;
break;
}
// optional .TSP.Color color = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_color:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_color()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void SetAnnotationAuthorColorCommandArchive::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// required .TSK.CommandArchive super = 1;
if (has_super()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, this->super(), output);
}
// optional .TSP.Reference annotation_author = 2;
if (has_annotation_author()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2, this->annotation_author(), output);
}
// optional .TSP.Color color = 3;
if (has_color()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3, this->color(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* SetAnnotationAuthorColorCommandArchive::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// required .TSK.CommandArchive super = 1;
if (has_super()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
1, this->super(), target);
}
// optional .TSP.Reference annotation_author = 2;
if (has_annotation_author()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
2, this->annotation_author(), target);
}
// optional .TSP.Color color = 3;
if (has_color()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
3, this->color(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int SetAnnotationAuthorColorCommandArchive::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// required .TSK.CommandArchive super = 1;
if (has_super()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->super());
}
// optional .TSP.Reference annotation_author = 2;
if (has_annotation_author()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->annotation_author());
}
// optional .TSP.Color color = 3;
if (has_color()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->color());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void SetAnnotationAuthorColorCommandArchive::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const SetAnnotationAuthorColorCommandArchive* source =
::google::protobuf::internal::dynamic_cast_if_available<const SetAnnotationAuthorColorCommandArchive*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void SetAnnotationAuthorColorCommandArchive::MergeFrom(const SetAnnotationAuthorColorCommandArchive& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_super()) {
mutable_super()->::TSK::CommandArchive::MergeFrom(from.super());
}
if (from.has_annotation_author()) {
mutable_annotation_author()->::TSP::Reference::MergeFrom(from.annotation_author());
}
if (from.has_color()) {
mutable_color()->::TSP::Color::MergeFrom(from.color());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void SetAnnotationAuthorColorCommandArchive::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void SetAnnotationAuthorColorCommandArchive::CopyFrom(const SetAnnotationAuthorColorCommandArchive& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool SetAnnotationAuthorColorCommandArchive::IsInitialized() const {
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
if (has_super()) {
if (!this->super().IsInitialized()) return false;
}
if (has_annotation_author()) {
if (!this->annotation_author().IsInitialized()) return false;
}
if (has_color()) {
if (!this->color().IsInitialized()) return false;
}
return true;
}
void SetAnnotationAuthorColorCommandArchive::Swap(SetAnnotationAuthorColorCommandArchive* other) {
if (other != this) {
std::swap(super_, other->super_);
std::swap(annotation_author_, other->annotation_author_);
std::swap(color_, other->color_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata SetAnnotationAuthorColorCommandArchive::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = SetAnnotationAuthorColorCommandArchive_descriptor_;
metadata.reflection = SetAnnotationAuthorColorCommandArchive_reflection_;
return metadata;
}
// @@protoc_insertion_point(namespace_scope)
} // namespace TSK
// @@protoc_insertion_point(global_scope)
| 36.709969
| 148
| 0.701114
|
obriensp
|
c960bc4204cf3b5412b1a4dfcab2a738dbb8c815
| 3,442
|
cpp
|
C++
|
Course_2_Ordered Data Structures/Week_3_Advanced Tree Structures/Week3_Challenge_implementation.cpp
|
pgautam8601/Accelerated_Computer_Science_Fundamentals_Specialization
|
2c11f943ab1f7e41e374f10708cf7b357979d5c3
|
[
"MIT"
] | 37
|
2020-01-04T08:27:54.000Z
|
2022-03-28T07:37:16.000Z
|
Course_2_Ordered Data Structures/Week_3_Advanced Tree Structures/Week3_Challenge_implementation.cpp
|
pgautam8601/Accelerated_Computer_Science_Fundamentals_Specialization
|
2c11f943ab1f7e41e374f10708cf7b357979d5c3
|
[
"MIT"
] | null | null | null |
Course_2_Ordered Data Structures/Week_3_Advanced Tree Structures/Week3_Challenge_implementation.cpp
|
pgautam8601/Accelerated_Computer_Science_Fundamentals_Specialization
|
2c11f943ab1f7e41e374f10708cf7b357979d5c3
|
[
"MIT"
] | 25
|
2020-04-29T18:37:01.000Z
|
2022-03-20T13:15:34.000Z
|
// The height of a node is the number of edges in
// its longest chain of descendants.
// Implement computeHeight to compute the height
// of the subtree rooted at the node n. Note that
// this function does not return a value. You should
// store the calculated height in that node's own
// height member variable. Your function should also
// do the same for EVERY node in the subtree rooted
// at the current node. (This naturally lends itself
// to a recursive solution!)
// Assume that the following includes have already been
// provided. You should not need any other includes
// than these.
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
using namespace std;
// You have also the following class Node already defined.
// You cannot change this class definition, so it is
// shown here in a comment for your reference only:
class Node {
public:
int height; // to be set by computeHeight()
Node *left, *right;
Node() { height = -1; left = right = nullptr; }
~Node() {
delete left;
left = nullptr;
delete right;
right = nullptr;
}
};
void computeHeight(Node *n) {
if( nullptr == n )
{
//std::cout << "null, empty" << std::endl;
return;
}
else
{
//std::cout << "calcing left sub tree" << std::endl;
Node *leftNode = n->left;
computeHeight( leftNode );
//std::cout << "calcing right sub tree" << std::endl;
Node *rightNode = n->right;
computeHeight( rightNode );
if( nullptr == leftNode && nullptr == rightNode )
{
// current node is leave node, height = 0
n->height = 0;
}
else if( nullptr == leftNode && nullptr != rightNode )
{
//current node adds right node's height
n->height = 1 + rightNode->height;
}
else if( nullptr == rightNode && nullptr != leftNode )
{
//current node adds left node's height
n->height = 1 + leftNode->height;
}
else
{
//current node has two sub-tree
//adds the one with longer height
if( leftNode->height >= rightNode->height )
{
n->height = 1 + leftNode->height;
}
else
{
n->height = 1 + rightNode->height;
}
}
return;
}
//end of if( nullptr == n ) ... else ...
}
//end of function computeHeight
// This function prints the tree in a nested linear format.
void printTree(const Node *n) {
if (!n) return;
std::cout << n->height << "(";
printTree(n->left);
std::cout << ")(";
printTree(n->right);
std::cout << ")";
}
// The printTreeVertical function gives you a verbose,
// vertical printout of the tree, where the leftmost nodes
// are displayed highest. This function has already been
// defined in some hidden code.
// It has this function prototype: void printTreeVertical(const Node* n);
// This main() function is for your personal testing with
// the Run button. When you're ready, click Submit to have
// your work tested and graded.
// expected output of main:
/*
3(0()())(2(0()())(1()(0()())))
*/
int main() {
Node *n = new Node();
n->left = new Node();
n->right = new Node();
n->right->left = new Node();
n->right->right = new Node();
n->right->right->right = new Node();
computeHeight(n);
printTree(n);
std::cout << std::endl << std::endl;
//printTreeVertical(n);
// The Node destructor will recursively
// delete its children nodes.
delete n;
n = nullptr;
return 0;
}
| 23.256757
| 73
| 0.626089
|
pgautam8601
|
c9616b0871dbbf789c73c33b7865c497f13e351a
| 1,199
|
cpp
|
C++
|
src/dynarmic/frontend/A32/translate/impl/a32_exception_generating.cpp
|
liushuyu/dynarmic
|
40afbe19279820e59382b7460643c62398ba0fb8
|
[
"0BSD"
] | 77
|
2021-09-03T09:40:01.000Z
|
2022-03-30T05:18:36.000Z
|
src/dynarmic/frontend/A32/translate/impl/a32_exception_generating.cpp
|
xerpi/dynarmic
|
bcfe377aaa5138af740e90af5be7a7dff7b62a52
|
[
"0BSD"
] | 16
|
2021-09-03T13:13:54.000Z
|
2022-03-30T20:07:38.000Z
|
src/dynarmic/frontend/A32/translate/impl/a32_exception_generating.cpp
|
xerpi/dynarmic
|
bcfe377aaa5138af740e90af5be7a7dff7b62a52
|
[
"0BSD"
] | 15
|
2021-09-01T11:19:26.000Z
|
2022-03-27T09:19:14.000Z
|
/* This file is part of the dynarmic project.
* Copyright (c) 2016 MerryMage
* SPDX-License-Identifier: 0BSD
*/
#include "dynarmic/frontend/A32/translate/impl/a32_translate_impl.h"
#include "dynarmic/interface/A32/config.h"
namespace Dynarmic::A32 {
// BKPT #<imm16>
bool TranslatorVisitor::arm_BKPT(Cond cond, Imm<12> /*imm12*/, Imm<4> /*imm4*/) {
if (cond != Cond::AL && !options.define_unpredictable_behaviour) {
return UnpredictableInstruction();
}
// UNPREDICTABLE: The instruction executes conditionally.
if (!ArmConditionPassed(cond)) {
return true;
}
return RaiseException(Exception::Breakpoint);
}
// SVC<c> #<imm24>
bool TranslatorVisitor::arm_SVC(Cond cond, Imm<24> imm24) {
if (!ArmConditionPassed(cond)) {
return true;
}
const u32 imm32 = imm24.ZeroExtend();
ir.PushRSB(ir.current_location.AdvancePC(4));
ir.BranchWritePC(ir.Imm32(ir.current_location.PC() + 4));
ir.CallSupervisor(ir.Imm32(imm32));
ir.SetTerm(IR::Term::CheckHalt{IR::Term::PopRSBHint{}});
return false;
}
// UDF<c> #<imm16>
bool TranslatorVisitor::arm_UDF() {
return UndefinedInstruction();
}
} // namespace Dynarmic::A32
| 26.644444
| 81
| 0.681401
|
liushuyu
|
c961f1b6fca899f8e3f4c2719f1970f98b1a52b7
| 4,399
|
cpp
|
C++
|
framework/src/manager/TBoardConfigDAQ.cpp
|
AudreyFrancisco/MultiLadderOperation
|
fd6fefd616d73487835c31bc9916bbd8490d1864
|
[
"BSD-4-Clause"
] | null | null | null |
framework/src/manager/TBoardConfigDAQ.cpp
|
AudreyFrancisco/MultiLadderOperation
|
fd6fefd616d73487835c31bc9916bbd8490d1864
|
[
"BSD-4-Clause"
] | null | null | null |
framework/src/manager/TBoardConfigDAQ.cpp
|
AudreyFrancisco/MultiLadderOperation
|
fd6fefd616d73487835c31bc9916bbd8490d1864
|
[
"BSD-4-Clause"
] | null | null | null |
#include "TBoardConfigDAQ.h"
using namespace std;
// default values for config parameters; less important ones are set in the TBoardConfig constructor
//---- ADC module
const int TBoardConfigDAQ::LIMIT_DIGITAL = 300;
const int TBoardConfigDAQ::LIMIT_IO = 50;
const int TBoardConfigDAQ::LIMIT_ANALOGUE = 300;
//---- READOUT module
const bool TBoardConfigDAQ::DATA_SAMPLING_EDGE = true;
const bool TBoardConfigDAQ::DATA_PKTBASED_EN = false;
const bool TBoardConfigDAQ::DATA_DDR_EN = false;
const int TBoardConfigDAQ::DATA_PORT = 2;
const bool TBoardConfigDAQ::HEADER_TYPE = true;
const int TBoardConfigDAQ::BOARD_VERSION = 1;
//---- TRIGGER module
const int TBoardConfigDAQ::TRIGGER_MODE = 2;
const uint32_t TBoardConfigDAQ::STROBE_DELAY = 10;
const bool TBoardConfigDAQ::BUSY_CONFIG = false;
const bool TBoardConfigDAQ::BUSY_OVERRIDE = true;
//---- RESET module
const int TBoardConfigDAQ::AUTOSHTDWN_TIME = 10;
const int TBoardConfigDAQ::CLOCK_ENABLE_TIME = 12;
const int TBoardConfigDAQ::SIGNAL_ENABLE_TIME = 12;
const int TBoardConfigDAQ::DRST_TIME = 13;
const int TBoardConfigDAQ::PULSE_STROBE_DELAY = 10;
const int TBoardConfigDAQ::STROBE_PULSE_SEQ = 2;
//___________________________________________________________________
TBoardConfigDAQ::TBoardConfigDAQ() : TBoardConfig()
{
//---- ADC module
fBoardType = TBoardType::kBOARD_DAQ;
// ADC config reg 0 !! values as found in old TDaqBoard::PowerOn()
fCurrentLimitDigital = LIMIT_DIGITAL;
fCurrentLimitIo = LIMIT_IO;
fAutoShutdownEnable = true;
fLDOEnable = false;
fADCEnable = false;
fADCSelfStop = false;
fDisableTstmpReset = true;
fPktBasedROEnableADC = false;
// ADC config reg 1
fCurrentLimitAnalogue = LIMIT_ANALOGUE;
// ADC config reg 2
fAutoShutOffDelay = 0;
fADCDownSamplingFact = 0;
//---- READOUT module
// Event builder config reg
fMaxDiffTriggers = 1; // TODO: check if any influence
fSamplingEdgeSelect = DATA_SAMPLING_EDGE; // 0: positive edge, 1: negative edge (for pA1 inverted..)
fPktBasedROEnable = DATA_PKTBASED_EN; // 0: disable, 1: enable
fDDREnable = DATA_DDR_EN; // 0: disable, 1: enable
fDataPortSelect = DATA_PORT; // 01: serial port, 10: parallel port
fFPGAEmulationMode = 0; // 00: FPGA is bus master
fHeaderType = HEADER_TYPE;
fBoardVersion = BOARD_VERSION;
//---- TRIGGER module
// Busy configuration register
//uint32_t fBusyDuration = 4;
// Trigger configuration register
fNTriggers = 1; // TODO: feature ever used?
fTriggerMode = TRIGGER_MODE;
fStrobeDuration = 10; // depreciated
fBusyConfig = BUSY_CONFIG;
// Strobe delay register
fStrobeDelay = STROBE_DELAY;
// Busy override register
fBusyOverride = BUSY_OVERRIDE;
//---- CMU module
// CMU config register
fManchesterDisable = true; // 0: enable manchester encoding; 1: disable
fSamplingEdgeSelectCMU = true; // 0: positive edge; 1: negative edge
fInvertCMUBus = false; // 0: bus not inverted; 1: bus inverted
fChipMaster = false; // 0: chip is master; 1: chip is slave
//---- RESET module
// PULSE DRST PRST duration reg
fPRSTDuration = 10; // depreciated
fDRSTDuration = 10; // TODO: should rather be done via opcode?
fPULSEDuration = 10; // depreciated
// Power up sequencer delay reg
fAutoShutdownTime = AUTOSHTDWN_TIME;
fClockEnableTime = CLOCK_ENABLE_TIME;
fSignalEnableTime = SIGNAL_ENABLE_TIME;
fDrstTime = DRST_TIME;
// PULSE STROBE delay sequence reg
fPulseDelay = PULSE_STROBE_DELAY;
fStrobePulseSeq = STROBE_PULSE_SEQ;
// PowerOnReset disable reg
fPORDisable = true; // 0; 0: enable POR; 1: disable
//---- ID module
//---- SOFTRESET module
// Software reset duration register
fSoftResetDuration = 10;
InitParamMap();
}
//___________________________________________________________________
void TBoardConfigDAQ::InitParamMap()
{
TBoardConfig::InitParamMap();
fSettings["BOARDVERSION"] = &fBoardVersion;
}
| 34.912698
| 105
| 0.663333
|
AudreyFrancisco
|
e92e0960cf571d07187d5c035243bf4c8fbda2ee
| 240
|
cpp
|
C++
|
Item.cpp
|
stephens2633/CppPractice
|
05e886885466bc0fd43957c887c19545678e9230
|
[
"MIT"
] | null | null | null |
Item.cpp
|
stephens2633/CppPractice
|
05e886885466bc0fd43957c887c19545678e9230
|
[
"MIT"
] | null | null | null |
Item.cpp
|
stephens2633/CppPractice
|
05e886885466bc0fd43957c887c19545678e9230
|
[
"MIT"
] | null | null | null |
#include "Item.h"
#include<iostream>
using namespace std;
Item::Item()
{
//ctor
}
Item::~Item()
{
//dtor
}
void Item::getWriting(){
if(!writing.compare(""))
cout << "Nothing written" << endl;
else
cout << writing <<endl;
}
| 11.428571
| 36
| 0.595833
|
stephens2633
|
e9352f717a0cf9277d2af3df76fac7a65f958819
| 1,040
|
cpp
|
C++
|
snippets/cpp/VS_Snippets_CLR_System/system.IO.TextReaderWriter/CPP/textrw.cpp
|
BohdanMosiyuk/samples
|
59d435ba9e61e0fc19f5176c96b1cdbd53596142
|
[
"CC-BY-4.0",
"MIT"
] | 2
|
2020-02-22T09:30:21.000Z
|
2021-08-02T23:44:31.000Z
|
snippets/cpp/VS_Snippets_CLR_System/system.IO.TextReaderWriter/CPP/textrw.cpp
|
BohdanMosiyuk/samples
|
59d435ba9e61e0fc19f5176c96b1cdbd53596142
|
[
"CC-BY-4.0",
"MIT"
] | 555
|
2019-09-23T22:22:58.000Z
|
2021-07-15T18:51:12.000Z
|
snippets/cpp/VS_Snippets_CLR_System/system.IO.TextReaderWriter/CPP/textrw.cpp
|
BohdanMosiyuk/samples
|
59d435ba9e61e0fc19f5176c96b1cdbd53596142
|
[
"CC-BY-4.0",
"MIT"
] | 3
|
2020-01-29T16:31:15.000Z
|
2021-08-24T07:00:15.000Z
|
// <Snippet1>
using namespace System;
using namespace System::IO;
// <Snippet4>
void WriteText( TextWriter^ textWriter )
{
textWriter->Write( "Invalid file path characters are: " );
textWriter->Write( Path::InvalidPathChars );
textWriter->Write( Char::Parse( "." ) );
}
// </Snippet4>
// <Snippet5>
void ReadText( TextReader^ textReader )
{
Console::WriteLine( "From {0} - {1}", textReader->GetType()->Name, textReader->ReadToEnd() );
}
// </Snippet5>
int main()
{
// <Snippet2>
TextWriter^ stringWriter = gcnew StringWriter;
TextWriter^ streamWriter = gcnew StreamWriter( "InvalidPathChars.txt" );
// </Snippet2>
WriteText( stringWriter );
WriteText( streamWriter );
streamWriter->Close();
// <Snippet3>
TextReader^ stringReader = gcnew StringReader( stringWriter->ToString() );
TextReader^ streamReader = gcnew StreamReader( "InvalidPathChars.txt" );
// </Snippet3>
ReadText( stringReader );
ReadText( streamReader );
streamReader->Close();
}
// </Snippet1>
| 22.12766
| 96
| 0.661538
|
BohdanMosiyuk
|
e938acd34564df6e26baa94ee69d6e654d7b2123
| 1,842
|
cpp
|
C++
|
apps/myApps/idolHackerthon/src/Scenes/SquareRippleScene.cpp
|
marble-seijin/idolHackerthon
|
a1f1312f4a9a4b1dc25eea94ee496088490f5cfc
|
[
"MIT"
] | null | null | null |
apps/myApps/idolHackerthon/src/Scenes/SquareRippleScene.cpp
|
marble-seijin/idolHackerthon
|
a1f1312f4a9a4b1dc25eea94ee496088490f5cfc
|
[
"MIT"
] | null | null | null |
apps/myApps/idolHackerthon/src/Scenes/SquareRippleScene.cpp
|
marble-seijin/idolHackerthon
|
a1f1312f4a9a4b1dc25eea94ee496088490f5cfc
|
[
"MIT"
] | null | null | null |
//
// SquareRipple.cpp
// idolHackerthon
//
// Created by NAMBU AKIFUMI on 2015/09/12.
//
//
#include "SquareRippleScene.h"
SquareRippleScene::SquareRippleScene(){
ofBackground(255);
}
void SquareRippleScene::update(){
for (vector<SquareRipple>::iterator it = ripples.begin(); it != ripples.end(); ++it) {
if(it->isDead()){
ripples.erase(it);
-- it;
}
}
for (vector<SquareRipple>::iterator it = ripples.begin(); it != ripples.end(); ++it) {
it -> update();
}
}
void SquareRippleScene::draw(){
for (vector<SquareRipple>::iterator it = ripples.begin(); it != ripples.end(); ++it) {
it -> draw();
}
}
void SquareRippleScene::keyPressed(int key){
if(key==' '){
ripples.push_back(SquareRipple());
}
}
//--------------------------------------------------------------
void SquareRippleScene::keyReleased(int key){
}
//--------------------------------------------------------------
void SquareRippleScene::mouseMoved(int x, int y ){
}
//--------------------------------------------------------------
void SquareRippleScene::mouseDragged(int x, int y, int button){
}
//--------------------------------------------------------------
void SquareRippleScene::mousePressed(int x, int y, int button){
}
//--------------------------------------------------------------
void SquareRippleScene::mouseReleased(int x, int y, int button){
}
//--------------------------------------------------------------
void SquareRippleScene::windowResized(int w, int h){
}
//--------------------------------------------------------------
void SquareRippleScene::gotMessage(ofMessage msg){
}
//--------------------------------------------------------------
void SquareRippleScene::dragEvent(ofDragInfo dragInfo){
}
| 23.615385
| 90
| 0.449511
|
marble-seijin
|
e939008e50edd11d330217bc598402b9eca5c7e9
| 1,113
|
cpp
|
C++
|
src/ConcoleGame/clock.cpp
|
Aswiz/C_Plus_Plus
|
6768a67e821a444383232c41915fb9b6d81ceac4
|
[
"MIT"
] | null | null | null |
src/ConcoleGame/clock.cpp
|
Aswiz/C_Plus_Plus
|
6768a67e821a444383232c41915fb9b6d81ceac4
|
[
"MIT"
] | null | null | null |
src/ConcoleGame/clock.cpp
|
Aswiz/C_Plus_Plus
|
6768a67e821a444383232c41915fb9b6d81ceac4
|
[
"MIT"
] | null | null | null |
//пример использования функции clock
#include <iostream> // для оператора cout
#include <ctime> // для функции clock
#include <cmath> // для функции sqrt
int frequencyPrimes (int n) // функция поиска простых чисел
{
int freq = n-1;
for (int i = 2; i <= n; ++i)
for (int j = sqrt( (float)i ); j > 1; --j)
if (i % j == 0)
{
--freq;
break;
}
return freq;
}
int main ()
{
std::cout << "Вычисление..." << std::endl;
int f = frequencyPrimes (100000); // ищем простые числа в интервале от 2 до 100000
int t = clock(); // получаем количество тиков времени
std::cout << "Количество простых чисел меньших 100 000 = "
<< f << std::endl;
std::cout << "Для вычисления понадобилось "
<< t << " тиков времени или "
<< ((float)t) / CLOCKS_PER_SEC << " секунд.n"
<< std::endl;
return 0;
}
| 34.78125
| 105
| 0.446541
|
Aswiz
|
e93dfb562dc983971f42a200a07b431647652436
| 95
|
cpp
|
C++
|
contracts/test.inline/test.inline.cpp
|
TP-Lab/enumivo
|
76d81a36d2db8cea93fb54cd95a6ec5f6c407f97
|
[
"MIT"
] | 8
|
2018-08-02T02:31:19.000Z
|
2018-08-16T03:31:02.000Z
|
contracts/test.inline/test.inline.cpp
|
TP-Lab/enumivo
|
76d81a36d2db8cea93fb54cd95a6ec5f6c407f97
|
[
"MIT"
] | null | null | null |
contracts/test.inline/test.inline.cpp
|
TP-Lab/enumivo
|
76d81a36d2db8cea93fb54cd95a6ec5f6c407f97
|
[
"MIT"
] | null | null | null |
#include <test.inline/test.inline.hpp>
ENUMIVO_ABI( enumivo::testinline, (reqauth)(forward) )
| 23.75
| 54
| 0.757895
|
TP-Lab
|
e940c26ed9a92c15255d1b8e3017b811662e8893
| 69,542
|
cpp
|
C++
|
src/plugProjectEbisawaU/ebiCardMgr_Load.cpp
|
projectPiki/pikmin2
|
a431d992acde856d092889a515ecca0e07a3ea7c
|
[
"Unlicense"
] | 33
|
2021-12-08T11:10:59.000Z
|
2022-03-26T19:59:37.000Z
|
src/plugProjectEbisawaU/ebiCardMgr_Load.cpp
|
projectPiki/pikmin2
|
a431d992acde856d092889a515ecca0e07a3ea7c
|
[
"Unlicense"
] | 6
|
2021-12-22T17:54:31.000Z
|
2022-01-07T21:43:18.000Z
|
src/plugProjectEbisawaU/ebiCardMgr_Load.cpp
|
projectPiki/pikmin2
|
a431d992acde856d092889a515ecca0e07a3ea7c
|
[
"Unlicense"
] | 2
|
2022-01-04T06:00:49.000Z
|
2022-01-26T07:27:28.000Z
|
#include "types.h"
/*
Generated from dpostproc
.section .rodata # 0x804732E0 - 0x8049E220
.global lbl_80497118
lbl_80497118:
.4byte 0x65626943
.4byte 0x6172644D
.4byte 0x67725F4C
.4byte 0x6F61642E
.4byte 0x63707000
.global lbl_8049712C
lbl_8049712C:
.asciz "P2Assert"
.skip 3
.section .data, "wa" # 0x8049E220 - 0x804EFC20
.global __vt__Q33ebi9CardError29FSMState_WN1_NowCreateNewFile
__vt__Q33ebi9CardError29FSMState_WN1_NowCreateNewFile:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError20FSMState_CardRequestFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError20FSMState_CardRequestFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError29FSMState_WN1_NowCreateNewFileFPQ33ebi9CardError4TMgr
.4byte do_cardRequest__Q33ebi9CardError29FSMState_WN1_NowCreateNewFileFv
.4byte
do_transitCardReady__Q33ebi9CardError29FSMState_WN1_NowCreateNewFileFPQ33ebi9CardError4TMgr
.4byte
do_transitCardNoCard__Q33ebi9CardError29FSMState_WN1_NowCreateNewFileFPQ33ebi9CardError4TMgr
.4byte
do_transitCardIOError__Q33ebi9CardError29FSMState_WN1_NowCreateNewFileFPQ33ebi9CardError4TMgr
.4byte
do_transitCardWrongDevice__Q33ebi9CardError20FSMState_CardRequestFPQ33ebi9CardError4TMgr
.4byte
do_transitCardWrongSector__Q33ebi9CardError20FSMState_CardRequestFPQ33ebi9CardError4TMgr
.4byte
do_transitCardBroken__Q33ebi9CardError20FSMState_CardRequestFPQ33ebi9CardError4TMgr
.4byte
do_transitCardEncoding__Q33ebi9CardError20FSMState_CardRequestFPQ33ebi9CardError4TMgr
.4byte
do_transitCardNoFileSpace__Q33ebi9CardError20FSMState_CardRequestFPQ33ebi9CardError4TMgr
.4byte
do_transitCardNoFileEntry__Q33ebi9CardError20FSMState_CardRequestFPQ33ebi9CardError4TMgr
.4byte
do_transitCardFileOpenError__Q33ebi9CardError20FSMState_CardRequestFPQ33ebi9CardError4TMgr
.4byte
do_transitCardSerialNoError__Q33ebi9CardError20FSMState_CardRequestFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError22FSMState_WN0_NowFormat
__vt__Q33ebi9CardError22FSMState_WN0_NowFormat:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError20FSMState_CardRequestFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError20FSMState_CardRequestFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError22FSMState_WN0_NowFormatFPQ33ebi9CardError4TMgr
.4byte do_cardRequest__Q33ebi9CardError22FSMState_WN0_NowFormatFv
.4byte
do_transitCardReady__Q33ebi9CardError22FSMState_WN0_NowFormatFPQ33ebi9CardError4TMgr
.4byte
do_transitCardNoCard__Q33ebi9CardError22FSMState_WN0_NowFormatFPQ33ebi9CardError4TMgr
.4byte
do_transitCardIOError__Q33ebi9CardError22FSMState_WN0_NowFormatFPQ33ebi9CardError4TMgr
.4byte
do_transitCardWrongDevice__Q33ebi9CardError20FSMState_CardRequestFPQ33ebi9CardError4TMgr
.4byte
do_transitCardWrongSector__Q33ebi9CardError20FSMState_CardRequestFPQ33ebi9CardError4TMgr
.4byte
do_transitCardBroken__Q33ebi9CardError20FSMState_CardRequestFPQ33ebi9CardError4TMgr
.4byte
do_transitCardEncoding__Q33ebi9CardError20FSMState_CardRequestFPQ33ebi9CardError4TMgr
.4byte
do_transitCardNoFileSpace__Q33ebi9CardError20FSMState_CardRequestFPQ33ebi9CardError4TMgr
.4byte
do_transitCardNoFileEntry__Q33ebi9CardError20FSMState_CardRequestFPQ33ebi9CardError4TMgr
.4byte
do_transitCardFileOpenError__Q33ebi9CardError20FSMState_CardRequestFPQ33ebi9CardError4TMgr
.4byte
do_transitCardSerialNoError__Q33ebi9CardError20FSMState_CardRequestFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError25FSMState_Q05_GameCantSave
__vt__Q33ebi9CardError25FSMState_Q05_GameCantSave:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError17FSMState_QuestionFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError17FSMState_QuestionFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError25FSMState_Q05_GameCantSaveFPQ33ebi9CardError4TMgr
.4byte
do_transitYes__Q33ebi9CardError25FSMState_Q05_GameCantSaveFPQ33ebi9CardError4TMgr
.4byte
do_transitNo__Q33ebi9CardError25FSMState_Q05_GameCantSaveFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError38FSMState_Q04_DoYouStartGameWithoutSave
__vt__Q33ebi9CardError38FSMState_Q04_DoYouStartGameWithoutSave:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError17FSMState_QuestionFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError17FSMState_QuestionFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError38FSMState_Q04_DoYouStartGameWithoutSaveFPQ33ebi9CardError4TMgr
.4byte
do_transitYes__Q33ebi9CardError38FSMState_Q04_DoYouStartGameWithoutSaveFPQ33ebi9CardError4TMgr
.4byte
do_transitNo__Q33ebi9CardError38FSMState_Q04_DoYouStartGameWithoutSaveFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError31FSMState_Q03_DoYouCreateNewFile
__vt__Q33ebi9CardError31FSMState_Q03_DoYouCreateNewFile:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError17FSMState_QuestionFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError17FSMState_QuestionFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError31FSMState_Q03_DoYouCreateNewFileFPQ33ebi9CardError4TMgr
.4byte
do_transitYes__Q33ebi9CardError31FSMState_Q03_DoYouCreateNewFileFPQ33ebi9CardError4TMgr
.4byte
do_transitNo__Q33ebi9CardError31FSMState_Q03_DoYouCreateNewFileFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError24FSMState_Q02_DoYouFormat
__vt__Q33ebi9CardError24FSMState_Q02_DoYouFormat:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError17FSMState_QuestionFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError17FSMState_QuestionFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError24FSMState_Q02_DoYouFormatFPQ33ebi9CardError4TMgr
.4byte
do_transitYes__Q33ebi9CardError24FSMState_Q02_DoYouFormatFPQ33ebi9CardError4TMgr
.4byte
do_transitNo__Q33ebi9CardError24FSMState_Q02_DoYouFormatFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError25FSMState_Q01_DoYouOpenIPL
__vt__Q33ebi9CardError25FSMState_Q01_DoYouOpenIPL:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError17FSMState_QuestionFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError17FSMState_QuestionFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError25FSMState_Q01_DoYouOpenIPLFPQ33ebi9CardError4TMgr
.4byte
do_transitYes__Q33ebi9CardError25FSMState_Q01_DoYouOpenIPLFPQ33ebi9CardError4TMgr
.4byte
do_transitNo__Q33ebi9CardError25FSMState_Q01_DoYouOpenIPLFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError37FSMState_Q00_DataBrokenAndDoYouFormat
__vt__Q33ebi9CardError37FSMState_Q00_DataBrokenAndDoYouFormat:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError17FSMState_QuestionFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError17FSMState_QuestionFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError37FSMState_Q00_DataBrokenAndDoYouFormatFPQ33ebi9CardError4TMgr
.4byte
do_transitYes__Q33ebi9CardError37FSMState_Q00_DataBrokenAndDoYouFormatFPQ33ebi9CardError4TMgr
.4byte
do_transitNo__Q33ebi9CardError37FSMState_Q00_DataBrokenAndDoYouFormatFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError31FSMState_WF5_FailToSave_IOError
__vt__Q33ebi9CardError31FSMState_WF5_FailToSave_IOError:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError31FSMState_WF5_FailToSave_IOErrorFPQ33ebi9CardError4TMgr
.4byte
do_transit__Q33ebi9CardError31FSMState_WF5_FailToSave_IOErrorFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError30FSMState_WF4_FailToSave_NoCard
__vt__Q33ebi9CardError30FSMState_WF4_FailToSave_NoCard:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError30FSMState_WF4_FailToSave_NoCardFPQ33ebi9CardError4TMgr
.4byte
do_transit__Q33ebi9CardError30FSMState_WF4_FailToSave_NoCardFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError40FSMState_WF3_FailToCreateNewFile_IOError
__vt__Q33ebi9CardError40FSMState_WF3_FailToCreateNewFile_IOError:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError40FSMState_WF3_FailToCreateNewFile_IOErrorFPQ33ebi9CardError4TMgr
.4byte
do_transit__Q33ebi9CardError40FSMState_WF3_FailToCreateNewFile_IOErrorFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError39FSMState_WF2_FailToCreateNewFile_NoCard
__vt__Q33ebi9CardError39FSMState_WF2_FailToCreateNewFile_NoCard:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError39FSMState_WF2_FailToCreateNewFile_NoCardFPQ33ebi9CardError4TMgr
.4byte
do_transit__Q33ebi9CardError39FSMState_WF2_FailToCreateNewFile_NoCardFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError33FSMState_WF1_FailToFormat_IOError
__vt__Q33ebi9CardError33FSMState_WF1_FailToFormat_IOError:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError33FSMState_WF1_FailToFormat_IOErrorFPQ33ebi9CardError4TMgr
.4byte
do_transit__Q33ebi9CardError33FSMState_WF1_FailToFormat_IOErrorFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError32FSMState_WF0_FailToFormat_NoCard
__vt__Q33ebi9CardError32FSMState_WF0_FailToFormat_NoCard:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError32FSMState_WF0_FailToFormat_NoCardFPQ33ebi9CardError4TMgr
.4byte
do_transit__Q33ebi9CardError32FSMState_WF0_FailToFormat_NoCardFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError26FSMState_W10_SerialNoError
__vt__Q33ebi9CardError26FSMState_W10_SerialNoError:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError26FSMState_W10_SerialNoErrorFPQ33ebi9CardError4TMgr
.4byte
do_transit__Q33ebi9CardError26FSMState_W10_SerialNoErrorFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError32FSMState_W09_FinishCreateNewFile
__vt__Q33ebi9CardError32FSMState_W09_FinishCreateNewFile:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError32FSMState_W09_FinishCreateNewFileFPQ33ebi9CardError4TMgr
.4byte
do_transit__Q33ebi9CardError32FSMState_W09_FinishCreateNewFileFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError25FSMState_W08_FinishFormat
__vt__Q33ebi9CardError25FSMState_W08_FinishFormat:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError25FSMState_W08_FinishFormatFPQ33ebi9CardError4TMgr
.4byte
do_transit__Q33ebi9CardError25FSMState_W08_FinishFormatFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError26FSMState_W07_NoFileForSave
__vt__Q33ebi9CardError26FSMState_W07_NoFileForSave:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError26FSMState_W07_NoFileForSaveFPQ33ebi9CardError4TMgr
.4byte
do_transit__Q33ebi9CardError26FSMState_W07_NoFileForSaveFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError26FSMState_W06_CardNotUsable
__vt__Q33ebi9CardError26FSMState_W06_CardNotUsable:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError26FSMState_W06_CardNotUsableFPQ33ebi9CardError4TMgr
.4byte
do_transit__Q33ebi9CardError26FSMState_W06_CardNotUsableFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError26FSMState_W05_InitCardOnIPL
__vt__Q33ebi9CardError26FSMState_W05_InitCardOnIPL:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError26FSMState_W05_InitCardOnIPLFPQ33ebi9CardError4TMgr
.4byte
do_transit__Q33ebi9CardError26FSMState_W05_InitCardOnIPLFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError25FSMState_W04_OverCapacity
__vt__Q33ebi9CardError25FSMState_W04_OverCapacity:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError25FSMState_W04_OverCapacityFPQ33ebi9CardError4TMgr
.4byte
do_transit__Q33ebi9CardError25FSMState_W04_OverCapacityFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError24FSMState_W03_WrongSector
__vt__Q33ebi9CardError24FSMState_W03_WrongSector:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError24FSMState_W03_WrongSectorFPQ33ebi9CardError4TMgr
.4byte
do_transit__Q33ebi9CardError24FSMState_W03_WrongSectorFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError24FSMState_W02_WrongDevice
__vt__Q33ebi9CardError24FSMState_W02_WrongDevice:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError24FSMState_W02_WrongDeviceFPQ33ebi9CardError4TMgr
.4byte
do_transit__Q33ebi9CardError24FSMState_W02_WrongDeviceFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError20FSMState_W01_IOError
__vt__Q33ebi9CardError20FSMState_W01_IOError:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte
do_exec__Q33ebi9CardError16FSMState_WarningFPQ33ebi9CardError4TMgr .4byte
do_open__Q33ebi9CardError20FSMState_W01_IOErrorFPQ33ebi9CardError4TMgr .4byte
do_transit__Q33ebi9CardError20FSMState_W01_IOErrorFPQ33ebi9CardError4TMgr
.global __vt__Q33ebi9CardError19FSMState_W00_NoCard
__vt__Q33ebi9CardError19FSMState_W00_NoCard:
.4byte 0
.4byte 0
.4byte
init__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte exec__Q33ebi9CardError8FSMStateFPQ33ebi9CardError4TMgr
.4byte
"cleanup__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"resume__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"restart__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgr"
.4byte
"transit__Q24Game31FSMState<Q33ebi9CardError4TMgr>FPQ33ebi9CardError4TMgriPQ24Game8StateArg"
.4byte
do_init__Q33ebi9CardError15FSMState_NoCardFPQ33ebi9CardError4TMgrPQ24Game8StateArg
.4byte do_exec__Q33ebi9CardError15FSMState_NoCardFPQ33ebi9CardError4TMgr
.4byte
do_open__Q33ebi9CardError19FSMState_W00_NoCardFPQ33ebi9CardError4TMgr .4byte
do_transit__Q33ebi9CardError19FSMState_W00_NoCardFPQ33ebi9CardError4TMgr
.4byte
do_transitOnCard__Q33ebi9CardError19FSMState_W00_NoCardFPQ33ebi9CardError4TMgr
.4byte 0
*/
namespace ebi {
/*
* --INFO--
* Address: 803E2520
* Size: 00004C
*/
void CardError::FSMState_W00_NoCard::do_open(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E2548
mr r3, r4
li r4, 1
bl open__Q33ebi6Screen11TMemoryCardFl
b lbl_803E255C
lbl_803E2548:
cmpwi r0, 1
bne lbl_803E255C
mr r3, r4
li r4, 0x14
bl open__Q33ebi6Screen11TMemoryCardFl
lbl_803E255C:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E256C
* Size: 000058
*/
void CardError::FSMState_W00_NoCard::do_transit(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E25A0
lwz r12, 0(r3)
li r5, 0x17
li r6, 0
lwz r12, 0x1c(r12)
mtctr r12
bctrl
b lbl_803E25B4
lbl_803E25A0:
cmpwi r0, 1
bne lbl_803E25B4
mr r3, r4
li r4, 3
bl goEnd___Q33ebi9CardError4TMgrFQ43ebi9CardError4TMgr7enumEnd
lbl_803E25B4:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E25C4
* Size: 00004C
*/
void CardError::FSMState_W00_NoCard::do_transitOnCard(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E25EC
mr r3, r4
li r4, 2
bl goEnd___Q33ebi9CardError4TMgrFQ43ebi9CardError4TMgr7enumEnd
b lbl_803E2600
lbl_803E25EC:
cmpwi r0, 1
bne lbl_803E2600
mr r3, r4
li r4, 4
bl goEnd___Q33ebi9CardError4TMgrFQ43ebi9CardError4TMgr7enumEnd
lbl_803E2600:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2610
* Size: 000054
*/
void CardError::FSMState_W01_IOError::do_open(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
li r0, 1
stb r0, 0x12(r3)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E2640
mr r3, r4
li r4, 2
bl open__Q33ebi6Screen11TMemoryCardFl
b lbl_803E2654
lbl_803E2640:
cmpwi r0, 1
bne lbl_803E2654
mr r3, r4
li r4, 0x15
bl open__Q33ebi6Screen11TMemoryCardFl
lbl_803E2654:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2664
* Size: 000058
*/
void CardError::FSMState_W01_IOError::do_transit(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E2698
lwz r12, 0(r3)
li r5, 0x17
li r6, 0
lwz r12, 0x1c(r12)
mtctr r12
bctrl
b lbl_803E26AC
lbl_803E2698:
cmpwi r0, 1
bne lbl_803E26AC
mr r3, r4
li r4, 3
bl goEnd___Q33ebi9CardError4TMgrFQ43ebi9CardError4TMgr7enumEnd
lbl_803E26AC:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E26BC
* Size: 000054
*/
void CardError::FSMState_W02_WrongDevice::do_open(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
li r0, 1
stb r0, 0x12(r3)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E26EC
mr r3, r4
li r4, 3
bl open__Q33ebi6Screen11TMemoryCardFl
b lbl_803E2700
lbl_803E26EC:
cmpwi r0, 1
bne lbl_803E2700
mr r3, r4
li r4, 0x16
bl open__Q33ebi6Screen11TMemoryCardFl
lbl_803E2700:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2710
* Size: 000058
*/
void CardError::FSMState_W02_WrongDevice::do_transit(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E2744
lwz r12, 0(r3)
li r5, 0x17
li r6, 0
lwz r12, 0x1c(r12)
mtctr r12
bctrl
b lbl_803E2758
lbl_803E2744:
cmpwi r0, 1
bne lbl_803E2758
mr r3, r4
li r4, 3
bl goEnd___Q33ebi9CardError4TMgrFQ43ebi9CardError4TMgr7enumEnd
lbl_803E2758:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2768
* Size: 000054
*/
void CardError::FSMState_W03_WrongSector::do_open(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
li r0, 1
stb r0, 0x12(r3)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E2798
mr r3, r4
li r4, 4
bl open__Q33ebi6Screen11TMemoryCardFl
b lbl_803E27AC
lbl_803E2798:
cmpwi r0, 1
bne lbl_803E27AC
mr r3, r4
li r4, 0x17
bl open__Q33ebi6Screen11TMemoryCardFl
lbl_803E27AC:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E27BC
* Size: 000058
*/
void CardError::FSMState_W03_WrongSector::do_transit(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E27F0
lwz r12, 0(r3)
li r5, 0x17
li r6, 0
lwz r12, 0x1c(r12)
mtctr r12
bctrl
b lbl_803E2804
lbl_803E27F0:
cmpwi r0, 1
bne lbl_803E2804
mr r3, r4
li r4, 3
bl goEnd___Q33ebi9CardError4TMgrFQ43ebi9CardError4TMgr7enumEnd
lbl_803E2804:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2814
* Size: 000054
*/
void CardError::FSMState_W04_OverCapacity::do_open(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
li r0, 1
stb r0, 0x12(r3)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E2844
mr r3, r4
li r4, 6
bl open__Q33ebi6Screen11TMemoryCardFl
b lbl_803E2858
lbl_803E2844:
cmpwi r0, 1
bne lbl_803E2858
mr r3, r4
li r4, 0x19
bl open__Q33ebi6Screen11TMemoryCardFl
lbl_803E2858:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2868
* Size: 000064
*/
void CardError::FSMState_W04_OverCapacity::do_transit(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E289C
lwz r12, 0(r3)
li r5, 7
li r6, 0
lwz r12, 0x1c(r12)
mtctr r12
bctrl
b lbl_803E28BC
lbl_803E289C:
cmpwi r0, 1
bne lbl_803E28BC
lwz r12, 0(r3)
li r5, 7
li r6, 0
lwz r12, 0x1c(r12)
mtctr r12
bctrl
lbl_803E28BC:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E28CC
* Size: 000054
*/
void CardError::FSMState_W05_InitCardOnIPL::do_open(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
li r0, 1
stb r0, 0x12(r3)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E28FC
mr r3, r4
li r4, 7
bl open__Q33ebi6Screen11TMemoryCardFl
b lbl_803E2910
lbl_803E28FC:
cmpwi r0, 1
bne lbl_803E2910
mr r3, r4
li r4, 0x1a
bl open__Q33ebi6Screen11TMemoryCardFl
lbl_803E2910:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2920
* Size: 000064
*/
void CardError::FSMState_W05_InitCardOnIPL::do_transit(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E2954
lwz r12, 0(r3)
li r5, 0x14
li r6, 0
lwz r12, 0x1c(r12)
mtctr r12
bctrl
b lbl_803E2974
lbl_803E2954:
cmpwi r0, 1
bne lbl_803E2974
lwz r12, 0(r3)
li r5, 0x14
li r6, 0
lwz r12, 0x1c(r12)
mtctr r12
bctrl
lbl_803E2974:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2984
* Size: 000054
*/
void CardError::FSMState_W06_CardNotUsable::do_open(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
li r0, 1
stb r0, 0x12(r3)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E29B4
mr r3, r4
li r4, 0xc
bl open__Q33ebi6Screen11TMemoryCardFl
b lbl_803E29C8
lbl_803E29B4:
cmpwi r0, 1
bne lbl_803E29C8
mr r3, r4
li r4, 0x1f
bl open__Q33ebi6Screen11TMemoryCardFl
lbl_803E29C8:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E29D8
* Size: 000058
*/
void CardError::FSMState_W06_CardNotUsable::do_transit(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E2A0C
lwz r12, 0(r3)
li r5, 0x17
li r6, 0
lwz r12, 0x1c(r12)
mtctr r12
bctrl
b lbl_803E2A20
lbl_803E2A0C:
cmpwi r0, 1
bne lbl_803E2A20
mr r3, r4
li r4, 3
bl goEnd___Q33ebi9CardError4TMgrFQ43ebi9CardError4TMgr7enumEnd
lbl_803E2A20:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2A30
* Size: 000054
*/
void CardError::FSMState_W07_NoFileForSave::do_open(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
li r0, 1
stb r0, 0x12(r3)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E2A60
mr r3, r4
li r4, 0x10
bl open__Q33ebi6Screen11TMemoryCardFl
b lbl_803E2A74
lbl_803E2A60:
cmpwi r0, 1
bne lbl_803E2A74
mr r3, r4
li r4, 0x23
bl open__Q33ebi6Screen11TMemoryCardFl
lbl_803E2A74:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2A84
* Size: 000058
*/
void CardError::FSMState_W07_NoFileForSave::do_transit(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E2AB8
lwz r12, 0(r3)
li r5, 0x17
li r6, 0
lwz r12, 0x1c(r12)
mtctr r12
bctrl
b lbl_803E2ACC
lbl_803E2AB8:
cmpwi r0, 1
bne lbl_803E2ACC
mr r3, r4
li r4, 3
bl goEnd___Q33ebi9CardError4TMgrFQ43ebi9CardError4TMgr7enumEnd
lbl_803E2ACC:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2ADC
* Size: 000054
*/
void CardError::FSMState_W08_FinishFormat::do_open(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
li r0, 1
stb r0, 0x12(r3)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E2B0C
mr r3, r4
li r4, 9
bl open__Q33ebi6Screen11TMemoryCardFl
b lbl_803E2B20
lbl_803E2B0C:
cmpwi r0, 1
bne lbl_803E2B20
mr r3, r4
li r4, 0x1c
bl open__Q33ebi6Screen11TMemoryCardFl
lbl_803E2B20:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2B30
* Size: 00004C
*/
void CardError::FSMState_W08_FinishFormat::do_transit(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E2B58
mr r3, r4
li r4, 2
bl goEnd___Q33ebi9CardError4TMgrFQ43ebi9CardError4TMgr7enumEnd
b lbl_803E2B6C
lbl_803E2B58:
cmpwi r0, 1
bne lbl_803E2B6C
mr r3, r4
li r4, 4
bl goEnd___Q33ebi9CardError4TMgrFQ43ebi9CardError4TMgr7enumEnd
lbl_803E2B6C:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2B7C
* Size: 000054
*/
void CardError::FSMState_W09_FinishCreateNewFile::do_open((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
li r0, 0x1
stb r0, 0x12(r3)
lwz r0, 0x2A4(r4)
cmpwi r0, 0
bne- .loc_0x30
mr r3, r4
li r4, 0x13
bl -0x202AC
b .loc_0x44
.loc_0x30:
cmpwi r0, 0x1
bne- .loc_0x44
mr r3, r4
li r4, 0x26
bl -0x202C4
.loc_0x44:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2BD0
* Size: 00004C
*/
void CardError::FSMState_W09_FinishCreateNewFile::do_transit((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2A4(r4)
cmpwi r0, 0
bne- .loc_0x28
mr r3, r4
li r4, 0x2
bl -0xF7E8
b .loc_0x3C
.loc_0x28:
cmpwi r0, 0x1
bne- .loc_0x3C
mr r3, r4
li r4, 0x4
bl -0xF800
.loc_0x3C:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2C1C
* Size: 000064
*/
void CardError::FSMState_W10_SerialNoError::do_open(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
li r0, 1
stb r0, 0x12(r3)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E2C5C
lis r3, lbl_80497118@ha
lis r5, lbl_8049712C@ha
addi r3, r3, lbl_80497118@l
li r4, 0xec
addi r5, r5, lbl_8049712C@l
crclr 6
bl panic_f__12JUTExceptionFPCciPCce
b lbl_803E2C70
lbl_803E2C5C:
cmpwi r0, 1
bne lbl_803E2C70
mr r3, r4
li r4, 0x27
bl open__Q33ebi6Screen11TMemoryCardFl
lbl_803E2C70:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2C80
* Size: 00005C
*/
void CardError::FSMState_W10_SerialNoError::do_transit(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E2CB8
lis r3, lbl_80497118@ha
lis r5, lbl_8049712C@ha
addi r3, r3, lbl_80497118@l
li r4, 0xf5
addi r5, r5, lbl_8049712C@l
crclr 6
bl panic_f__12JUTExceptionFPCciPCce
b lbl_803E2CCC
lbl_803E2CB8:
cmpwi r0, 1
bne lbl_803E2CCC
mr r3, r4
li r4, 3
bl goEnd___Q33ebi9CardError4TMgrFQ43ebi9CardError4TMgr7enumEnd
lbl_803E2CCC:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2CDC
* Size: 000054
*/
void CardError::FSMState_WF0_FailToFormat_NoCard::do_open((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
li r0, 0
stb r0, 0x12(r3)
lwz r0, 0x2A4(r4)
cmpwi r0, 0
bne- .loc_0x30
mr r3, r4
li r4, 0x8
bl -0x2040C
b .loc_0x44
.loc_0x30:
cmpwi r0, 0x1
bne- .loc_0x44
mr r3, r4
li r4, 0x1B
bl -0x20424
.loc_0x44:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2D30
* Size: 00004C
*/
void CardError::FSMState_WF0_FailToFormat_NoCard::do_transit((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2A4(r4)
cmpwi r0, 0
bne- .loc_0x28
mr r3, r4
li r4, 0x2
bl -0xF948
b .loc_0x3C
.loc_0x28:
cmpwi r0, 0x1
bne- .loc_0x3C
mr r3, r4
li r4, 0x4
bl -0xF960
.loc_0x3C:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2D7C
* Size: 000054
*/
void CardError::FSMState_WF1_FailToFormat_IOError::do_open((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
li r0, 0x1
stb r0, 0x12(r3)
lwz r0, 0x2A4(r4)
cmpwi r0, 0
bne- .loc_0x30
mr r3, r4
li r4, 0x8
bl -0x204AC
b .loc_0x44
.loc_0x30:
cmpwi r0, 0x1
bne- .loc_0x44
mr r3, r4
li r4, 0x1B
bl -0x204C4
.loc_0x44:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2DD0
* Size: 00004C
*/
void CardError::FSMState_WF1_FailToFormat_IOError::do_transit((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2A4(r4)
cmpwi r0, 0
bne- .loc_0x28
mr r3, r4
li r4, 0x2
bl -0xF9E8
b .loc_0x3C
.loc_0x28:
cmpwi r0, 0x1
bne- .loc_0x3C
mr r3, r4
li r4, 0x4
bl -0xFA00
.loc_0x3C:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2E1C
* Size: 000054
*/
void CardError::FSMState_WF2_FailToCreateNewFile_NoCard::do_open((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
li r0, 0
stb r0, 0x12(r3)
lwz r0, 0x2A4(r4)
cmpwi r0, 0
bne- .loc_0x30
mr r3, r4
li r4, 0x11
bl -0x2054C
b .loc_0x44
.loc_0x30:
cmpwi r0, 0x1
bne- .loc_0x44
mr r3, r4
li r4, 0x25
bl -0x20564
.loc_0x44:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2E70
* Size: 00004C
*/
void CardError::FSMState_WF2_FailToCreateNewFile_NoCard::do_transit((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2A4(r4)
cmpwi r0, 0
bne- .loc_0x28
mr r3, r4
li r4, 0x2
bl -0xFA88
b .loc_0x3C
.loc_0x28:
cmpwi r0, 0x1
bne- .loc_0x3C
mr r3, r4
li r4, 0x4
bl -0xFAA0
.loc_0x3C:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2EBC
* Size: 000054
*/
void CardError::FSMState_WF3_FailToCreateNewFile_IOError::do_open((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
li r0, 0x1
stb r0, 0x12(r3)
lwz r0, 0x2A4(r4)
cmpwi r0, 0
bne- .loc_0x30
mr r3, r4
li r4, 0x11
bl -0x205EC
b .loc_0x44
.loc_0x30:
cmpwi r0, 0x1
bne- .loc_0x44
mr r3, r4
li r4, 0x25
bl -0x20604
.loc_0x44:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2F10
* Size: 00004C
*/
void CardError::FSMState_WF3_FailToCreateNewFile_IOError::do_transit((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2A4(r4)
cmpwi r0, 0
bne- .loc_0x28
mr r3, r4
li r4, 0x2
bl -0xFB28
b .loc_0x3C
.loc_0x28:
cmpwi r0, 0x1
bne- .loc_0x3C
mr r3, r4
li r4, 0x4
bl -0xFB40
.loc_0x3C:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2F5C
* Size: 000064
*/
void CardError::FSMState_WF4_FailToSave_NoCard::do_open(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
li r0, 0
stb r0, 0x12(r3)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E2F9C
lis r3, lbl_80497118@ha
lis r5, lbl_8049712C@ha
addi r3, r3, lbl_80497118@l
li r4, 0x156
addi r5, r5, lbl_8049712C@l
crclr 6
bl panic_f__12JUTExceptionFPCciPCce
b lbl_803E2FB0
lbl_803E2F9C:
cmpwi r0, 1
bne lbl_803E2FB0
mr r3, r4
li r4, 0x2b
bl open__Q33ebi6Screen11TMemoryCardFl
lbl_803E2FB0:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E2FC0
* Size: 00004C
*/
void CardError::FSMState_WF4_FailToSave_NoCard::do_transit((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2A4(r4)
cmpwi r0, 0
bne- .loc_0x28
mr r3, r4
li r4, 0x2
bl -0xFBD8
b .loc_0x3C
.loc_0x28:
cmpwi r0, 0x1
bne- .loc_0x3C
mr r3, r4
li r4, 0x4
bl -0xFBF0
.loc_0x3C:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E300C
* Size: 000064
*/
void CardError::FSMState_WF5_FailToSave_IOError::do_open(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
li r0, 1
stb r0, 0x12(r3)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E304C
lis r3, lbl_80497118@ha
lis r5, lbl_8049712C@ha
addi r3, r3, lbl_80497118@l
li r4, 0x16b
addi r5, r5, lbl_8049712C@l
crclr 6
bl panic_f__12JUTExceptionFPCciPCce
b lbl_803E3060
lbl_803E304C:
cmpwi r0, 1
bne lbl_803E3060
mr r3, r4
li r4, 0x2b
bl open__Q33ebi6Screen11TMemoryCardFl
lbl_803E3060:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E3070
* Size: 00004C
*/
void CardError::FSMState_WF5_FailToSave_IOError::do_transit((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2A4(r4)
cmpwi r0, 0
bne- .loc_0x28
mr r3, r4
li r4, 0x2
bl -0xFC88
b .loc_0x3C
.loc_0x28:
cmpwi r0, 0x1
bne- .loc_0x3C
mr r3, r4
li r4, 0x4
bl -0xFCA0
.loc_0x3C:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E30BC
* Size: 000054
*/
void CardError::FSMState_Q00_DataBrokenAndDoYouFormat::do_open((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
li r0, 0x1
stb r0, 0x10(r3)
lwz r0, 0x2A4(r4)
cmpwi r0, 0
bne- .loc_0x30
mr r3, r4
li r4, 0x5
bl -0x207EC
b .loc_0x44
.loc_0x30:
cmpwi r0, 0x1
bne- .loc_0x44
mr r3, r4
li r4, 0x18
bl -0x20804
.loc_0x44:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E3110
* Size: 000064
*/
void CardError::FSMState_Q00_DataBrokenAndDoYouFormat::do_transitYes((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2A4(r4)
cmpwi r0, 0
bne- .loc_0x34
lwz r12, 0x0(r3)
li r5, 0x15
li r6, 0
lwz r12, 0x1C(r12)
mtctr r12
bctrl
b .loc_0x54
.loc_0x34:
cmpwi r0, 0x1
bne- .loc_0x54
lwz r12, 0x0(r3)
li r5, 0x15
li r6, 0
lwz r12, 0x1C(r12)
mtctr r12
bctrl
.loc_0x54:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E3174
* Size: 000064
*/
void CardError::FSMState_Q00_DataBrokenAndDoYouFormat::do_transitNo((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2A4(r4)
cmpwi r0, 0
bne- .loc_0x34
lwz r12, 0x0(r3)
li r5, 0x8
li r6, 0
lwz r12, 0x1C(r12)
mtctr r12
bctrl
b .loc_0x54
.loc_0x34:
cmpwi r0, 0x1
bne- .loc_0x54
lwz r12, 0x0(r3)
li r5, 0x8
li r6, 0
lwz r12, 0x1C(r12)
mtctr r12
bctrl
.loc_0x54:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E31D8
* Size: 000054
*/
void CardError::FSMState_Q01_DoYouOpenIPL::do_open(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
li r0, 1
stb r0, 0x10(r3)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E3208
mr r3, r4
li r4, 0xd
bl open__Q33ebi6Screen11TMemoryCardFl
b lbl_803E321C
lbl_803E3208:
cmpwi r0, 1
bne lbl_803E321C
mr r3, r4
li r4, 0x21
bl open__Q33ebi6Screen11TMemoryCardFl
lbl_803E321C:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E322C
* Size: 000058
*/
void CardError::FSMState_Q01_DoYouOpenIPL::do_transitYes(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E3254
lwz r3, sys@sda21(r13)
li r4, 1
bl resetOn__6SystemFb
b lbl_803E3274
lbl_803E3254:
cmpwi r0, 1
bne lbl_803E3274
lwz r12, 0(r3)
li r5, 0x18
li r6, 0
lwz r12, 0x1c(r12)
mtctr r12
bctrl
lbl_803E3274:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E3284
* Size: 000058
*/
void CardError::FSMState_Q01_DoYouOpenIPL::do_transitNo(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E32B8
lwz r12, 0(r3)
li r5, 0x17
li r6, 0
lwz r12, 0x1c(r12)
mtctr r12
bctrl
b lbl_803E32CC
lbl_803E32B8:
cmpwi r0, 1
bne lbl_803E32CC
mr r3, r4
li r4, 3
bl goEnd___Q33ebi9CardError4TMgrFQ43ebi9CardError4TMgr7enumEnd
lbl_803E32CC:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E32DC
* Size: 000054
*/
void CardError::FSMState_Q02_DoYouFormat::do_open(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
li r0, 1
stb r0, 0x10(r3)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E330C
mr r3, r4
li r4, 0xb
bl open__Q33ebi6Screen11TMemoryCardFl
b lbl_803E3320
lbl_803E330C:
cmpwi r0, 1
bne lbl_803E3320
mr r3, r4
li r4, 0x1e
bl open__Q33ebi6Screen11TMemoryCardFl
lbl_803E3320:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E3330
* Size: 000064
*/
void CardError::FSMState_Q02_DoYouFormat::do_transitYes(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E3364
lwz r12, 0(r3)
li r5, 0x19
li r6, 0
lwz r12, 0x1c(r12)
mtctr r12
bctrl
b lbl_803E3384
lbl_803E3364:
cmpwi r0, 1
bne lbl_803E3384
lwz r12, 0(r3)
li r5, 0x19
li r6, 0
lwz r12, 0x1c(r12)
mtctr r12
bctrl
lbl_803E3384:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E3394
* Size: 000064
*/
void CardError::FSMState_Q02_DoYouFormat::do_transitNo(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E33C8
lwz r12, 0(r3)
li r5, 8
li r6, 0
lwz r12, 0x1c(r12)
mtctr r12
bctrl
b lbl_803E33E8
lbl_803E33C8:
cmpwi r0, 1
bne lbl_803E33E8
lwz r12, 0(r3)
li r5, 8
li r6, 0
lwz r12, 0x1c(r12)
mtctr r12
bctrl
lbl_803E33E8:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E33F8
* Size: 000054
*/
void CardError::FSMState_Q03_DoYouCreateNewFile::do_open(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
li r0, 1
stb r0, 0x10(r3)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E3428
mr r3, r4
li r4, 0xf
bl open__Q33ebi6Screen11TMemoryCardFl
b lbl_803E343C
lbl_803E3428:
cmpwi r0, 1
bne lbl_803E343C
mr r3, r4
li r4, 0x22
bl open__Q33ebi6Screen11TMemoryCardFl
lbl_803E343C:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E344C
* Size: 000064
*/
void CardError::FSMState_Q03_DoYouCreateNewFile::do_transitYes((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2A4(r4)
cmpwi r0, 0
bne- .loc_0x34
lwz r12, 0x0(r3)
li r5, 0x1A
li r6, 0
lwz r12, 0x1C(r12)
mtctr r12
bctrl
b .loc_0x54
.loc_0x34:
cmpwi r0, 0x1
bne- .loc_0x54
lwz r12, 0x0(r3)
li r5, 0x1A
li r6, 0
lwz r12, 0x1C(r12)
mtctr r12
bctrl
.loc_0x54:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E34B0
* Size: 000064
*/
void CardError::FSMState_Q03_DoYouCreateNewFile::do_transitNo((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2A4(r4)
cmpwi r0, 0
bne- .loc_0x34
lwz r12, 0x0(r3)
li r5, 0x9
li r6, 0
lwz r12, 0x1C(r12)
mtctr r12
bctrl
b .loc_0x54
.loc_0x34:
cmpwi r0, 0x1
bne- .loc_0x54
lwz r12, 0x0(r3)
li r5, 0x9
li r6, 0
lwz r12, 0x1C(r12)
mtctr r12
bctrl
.loc_0x54:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E3514
* Size: 000064
*/
void CardError::FSMState_Q04_DoYouStartGameWithoutSave::do_open((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
li r0, 0
stb r0, 0x10(r3)
lwz r0, 0x2A4(r4)
cmpwi r0, 0
bne- .loc_0x30
mr r3, r4
li r4, 0xE
bl -0x20C44
b .loc_0x54
.loc_0x30:
cmpwi r0, 0x1
bne- .loc_0x54
lis r3, 0x8049
lis r5, 0x8049
addi r3, r3, 0x7118
li r4, 0x1FD
addi r5, r5, 0x712C
crclr 6, 0x6
bl -0x3B8F24
.loc_0x54:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E3578
* Size: 00005C
*/
void CardError::FSMState_Q04_DoYouStartGameWithoutSave::do_transitYes((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2A4(r4)
cmpwi r0, 0
bne- .loc_0x28
mr r3, r4
li r4, 0x1
bl -0x10190
b .loc_0x4C
.loc_0x28:
cmpwi r0, 0x1
bne- .loc_0x4C
lis r3, 0x8049
lis r5, 0x8049
addi r3, r3, 0x7118
li r4, 0x206
addi r5, r5, 0x712C
crclr 6, 0x6
bl -0x3B8F80
.loc_0x4C:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E35D4
* Size: 00005C
*/
void CardError::FSMState_Q04_DoYouStartGameWithoutSave::do_transitNo((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2A4(r4)
cmpwi r0, 0
bne- .loc_0x28
mr r3, r4
li r4, 0x2
bl -0x101EC
b .loc_0x4C
.loc_0x28:
cmpwi r0, 0x1
bne- .loc_0x4C
lis r3, 0x8049
lis r5, 0x8049
addi r3, r3, 0x7118
li r4, 0x20F
addi r5, r5, 0x712C
crclr 6, 0x6
bl -0x3B8FDC
.loc_0x4C:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E3630
* Size: 000064
*/
void CardError::FSMState_Q05_GameCantSave::do_open(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
li r0, 0
stb r0, 0x10(r3)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E3670
lis r3, lbl_80497118@ha
lis r5, lbl_8049712C@ha
addi r3, r3, lbl_80497118@l
li r4, 0x219
addi r5, r5, lbl_8049712C@l
crclr 6
bl panic_f__12JUTExceptionFPCciPCce
b lbl_803E3684
lbl_803E3670:
cmpwi r0, 1
bne lbl_803E3684
mr r3, r4
li r4, 0x20
bl open__Q33ebi6Screen11TMemoryCardFl
lbl_803E3684:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E3694
* Size: 00005C
*/
void CardError::FSMState_Q05_GameCantSave::do_transitYes(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E36CC
lis r3, lbl_80497118@ha
lis r5, lbl_8049712C@ha
addi r3, r3, lbl_80497118@l
li r4, 0x222
addi r5, r5, lbl_8049712C@l
crclr 6
bl panic_f__12JUTExceptionFPCciPCce
b lbl_803E36E0
lbl_803E36CC:
cmpwi r0, 1
bne lbl_803E36E0
lwz r3, sys@sda21(r13)
li r4, 1
bl resetOn__6SystemFb
lbl_803E36E0:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E36F0
* Size: 00005C
*/
void CardError::FSMState_Q05_GameCantSave::do_transitNo(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E3728
lis r3, lbl_80497118@ha
lis r5, lbl_8049712C@ha
addi r3, r3, lbl_80497118@l
li r4, 0x22b
addi r5, r5, lbl_8049712C@l
crclr 6
bl panic_f__12JUTExceptionFPCciPCce
b lbl_803E373C
lbl_803E3728:
cmpwi r0, 1
bne lbl_803E373C
mr r3, r4
li r4, 3
bl goEnd___Q33ebi9CardError4TMgrFQ43ebi9CardError4TMgr7enumEnd
lbl_803E373C:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E374C
* Size: 000028
*/
void CardError::FSMState_WN0_NowFormat::do_cardRequest(void)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r3, sys@sda21(r13)
lwz r3, 0x5c(r3)
bl format__Q34Game10MemoryCard3MgrFv
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E3774
* Size: 00004C
*/
void CardError::FSMState_WN0_NowFormat::do_open(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E379C
mr r3, r4
li r4, 0xa
bl open__Q33ebi6Screen11TMemoryCardFl
b lbl_803E37B0
lbl_803E379C:
cmpwi r0, 1
bne lbl_803E37B0
mr r3, r4
li r4, 0x1d
bl open__Q33ebi6Screen11TMemoryCardFl
lbl_803E37B0:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E37C0
* Size: 000034
*/
void CardError::FSMState_WN0_NowFormat::do_transitCardReady((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
li r5, 0xA
li r6, 0
stw r0, 0x14(r1)
lwz r12, 0x0(r3)
lwz r12, 0x1C(r12)
mtctr r12
bctrl
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E37F4
* Size: 000034
*/
void CardError::FSMState_WN0_NowFormat::do_transitCardNoCard((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
li r5, 0xD
li r6, 0
stw r0, 0x14(r1)
lwz r12, 0x0(r3)
lwz r12, 0x1C(r12)
mtctr r12
bctrl
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E3828
* Size: 000034
*/
void CardError::FSMState_WN0_NowFormat::do_transitCardIOError((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
li r5, 0xE
li r6, 0
stw r0, 0x14(r1)
lwz r12, 0x0(r3)
lwz r12, 0x1C(r12)
mtctr r12
bctrl
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E385C
* Size: 00004C
*/
void CardError::FSMState_WN1_NowCreateNewFile::do_open(ebi::CardError::TMgr*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r0, 0x2a4(r4)
cmpwi r0, 0
bne lbl_803E3884
mr r3, r4
li r4, 0x12
bl open__Q33ebi6Screen11TMemoryCardFl
b lbl_803E3898
lbl_803E3884:
cmpwi r0, 1
bne lbl_803E3898
mr r3, r4
li r4, 0x24
bl open__Q33ebi6Screen11TMemoryCardFl
lbl_803E3898:
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E38A8
* Size: 000028
*/
void CardError::FSMState_WN1_NowCreateNewFile::do_cardRequest(void)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
lwz r3, sys@sda21(r13)
lwz r3, 0x5c(r3)
bl createNewFile__Q34Game10MemoryCard3MgrFv
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E38D0
* Size: 000034
*/
void CardError::FSMState_WN1_NowCreateNewFile::do_transitCardReady((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
li r5, 0xB
li r6, 0
stw r0, 0x14(r1)
lwz r12, 0x0(r3)
lwz r12, 0x1C(r12)
mtctr r12
bctrl
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E3904
* Size: 000034
*/
void CardError::FSMState_WN1_NowCreateNewFile::do_transitCardNoCard((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
li r5, 0xF
li r6, 0
stw r0, 0x14(r1)
lwz r12, 0x0(r3)
lwz r12, 0x1C(r12)
mtctr r12
bctrl
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 803E3938
* Size: 000034
*/
void CardError::FSMState_WN1_NowCreateNewFile::do_transitCardIOError((ebi::CardError::TMgr*))
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
li r5, 0x10
li r6, 0
stw r0, 0x14(r1)
lwz r12, 0x0(r3)
lwz r12, 0x1C(r12)
mtctr r12
bctrl
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
} // namespace ebi
| 24.256017
| 97
| 0.672845
|
projectPiki
|
e942f0a147ac55f005dd5ff7d2c9306a4e155173
| 1,514
|
cpp
|
C++
|
stacks_queues/queue_using_ll.cpp
|
ramchandra94/datastructures_in_cpp
|
28274ff4f0d9736cfe690ef002b90b9ebbfaf2f7
|
[
"MIT"
] | null | null | null |
stacks_queues/queue_using_ll.cpp
|
ramchandra94/datastructures_in_cpp
|
28274ff4f0d9736cfe690ef002b90b9ebbfaf2f7
|
[
"MIT"
] | null | null | null |
stacks_queues/queue_using_ll.cpp
|
ramchandra94/datastructures_in_cpp
|
28274ff4f0d9736cfe690ef002b90b9ebbfaf2f7
|
[
"MIT"
] | null | null | null |
/************************************************************
Following is the structure of the node class
class Node {
public :
int data;
Node *next;
Node(int data) {
this->data = data;
next = NULL;
}
};
**************************************************************/
class Queue {
// Define the data members
Node *head;
Node *tail;
int size;
public:
Queue() {
// Implement the Constructor
head = NULL;
tail = NULL;
size = 0;
}
/*----------------- Public Functions of Stack -----------------*/
int getSize() {
// Implement the getSize() function
return size;
}
bool isEmpty() {
// Implement the isEmpty() function
return size == 0;
}
void enqueue(int data) {
// Implement the enqueue() function
Node * newNode = new Node(data);
if(head == NULL){
head = newNode;
tail = newNode;
}else{
tail -> next = newNode;
tail = tail -> next;
}
size++;
}
int dequeue() {
// Implement the dequeue() function
if(head == NULL){
return -1;
}
Node *temp = head;
head = head -> next;
size--;
int temp1 = temp -> data;
delete temp;
return temp1;
}
int front() {
// Implement the front() function
if(head == NULL){
return -1;
}
return head -> data;
}
};
| 19.921053
| 66
| 0.423382
|
ramchandra94
|
e943e557728193cb6a24d56e908d51244119978e
| 9,622
|
cpp
|
C++
|
vm/instruments/profiler.cpp
|
samleb/rubinius
|
38eec1983b9b6739d7a552081e208aa433b99483
|
[
"BSD-3-Clause"
] | 1
|
2016-05-09T10:45:38.000Z
|
2016-05-09T10:45:38.000Z
|
vm/instruments/profiler.cpp
|
samleb/rubinius
|
38eec1983b9b6739d7a552081e208aa433b99483
|
[
"BSD-3-Clause"
] | null | null | null |
vm/instruments/profiler.cpp
|
samleb/rubinius
|
38eec1983b9b6739d7a552081e208aa433b99483
|
[
"BSD-3-Clause"
] | null | null | null |
#include "instruments/profiler.hpp"
#include "vm/object_utils.hpp"
#include "builtin/array.hpp"
#include "builtin/class.hpp"
#include "builtin/compiledmethod.hpp"
#include "builtin/integer.hpp"
#include "builtin/lookuptable.hpp"
#include "builtin/module.hpp"
#include "builtin/string.hpp"
#include "builtin/symbol.hpp"
#include "detection.hpp"
#include "arguments.hpp"
#include "dispatch.hpp"
#include "instruments/timing.hpp"
#include <time.h>
#include <iostream>
#include <vector>
#include <algorithm>
namespace rubinius {
namespace profiler {
bool Key::operator==(const Key& other) const {
return meth_ == other.meth_ &&
container_ == other.container_ &&
kind_ == other.kind_;
}
size_t Key::hash() const {
return (size_t)meth_ ^ (size_t)container_;
}
void Invocation::start() {
start_time_ = get_current_time();
}
void Invocation::stop() {
leaf_->add_total_time(get_current_time() - start_time_);
}
Method::~Method() {
for(Leaves::iterator i = leaves_.begin();
i != leaves_.end();
i++) {
delete i->second;
}
}
static uint64_t in_nanoseconds(uint64_t time) {
#ifdef USE_MACH_TIME
static mach_timebase_info_data_t timebase = {0, 0};
if(timebase.denom == 0) {
mach_timebase_info(&timebase);
}
return time * timebase.numer / timebase.denom;
#else
return time;
#endif
}
String* Method::name(STATE) {
const char *module = "";
const char *method_name = method()->c_str(state);
if(Symbol* klass = try_as<Symbol>(container())) {
module = klass->c_str(state);
}
String* name = String::create(state, module);
switch(kind()) {
case kNormal:
name->append(state, "#");
name->append(state, method_name);
break;
case kSingleton:
name->append(state, ".");
name->append(state, method_name);
break;
case kBlock:
name->append(state, "#");
name->append(state, method_name);
name->append(state, " {}");
break;
}
return name;
}
uint64_t Method::total_time_in_ns() {
return in_nanoseconds(total_time_);
}
uint64_t Leaf::total_time_in_ns() {
return in_nanoseconds(total_time_);
}
Leaf* Method::find_leaf(Method* callee) {
Leaves::iterator i = leaves_.find(callee);
if(i != leaves_.end()) {
return i->second;
}
Leaf* leaf = new Leaf(callee);
leaves_[callee] = leaf;
return leaf;
}
void Leaf::add_total_time(uint64_t diff) {
total_time_ += diff;
method_->add_total_time(diff);
}
Profiler::Profiler(STATE)
: state_(state)
{
top_ = new Method(0, 0, false);
current_ = top_;
}
Profiler::~Profiler() {
for(MethodMap::iterator i = methods_.begin();
i != methods_.end();
i++) {
delete i->second;
}
delete top_;
}
Symbol* Profiler::module_name(Module* module) {
if(IncludedModule* im = try_as<IncludedModule>(module)) {
return im->module()->name();
} else {
return module->name();
}
}
void Profiler::enter_block(Symbol* name, Module* module, CompiledMethod* cm) {
record_method(cm, name, module_name(module), kBlock);
}
void Profiler::enter_method(Dispatch& msg, Arguments& args) {
enter_method(msg, args, reinterpret_cast<CompiledMethod*>(Qnil));
}
void Profiler::enter_method(Dispatch &msg, Arguments& args, CompiledMethod* cm) {
if(MetaClass* mc = try_as<MetaClass>(msg.module)) {
Object* attached = mc->attached_instance();
if(Module* mod = try_as<Module>(attached)) {
record_method(cm, msg.name, mod->name(), kSingleton);
} else {
Symbol* name = args.recv()->to_s(state_)->to_sym(state_);
record_method(cm, msg.name, name, kSingleton);
}
} else {
record_method(cm, msg.name, module_name(msg.module), kNormal);
}
}
Method* Profiler::record_method(CompiledMethod* cm, Symbol* name,
Object* container, Kind kind) {
Key key(name, container, kind);
Method* method = find_key(key);
if(!method) {
method = new Method(methods_.size(), name, container, kind);
methods_[key] = method;
}
Leaf* leaf = current_->find_leaf(method);
current_ = method;
method->called();
if(!method->file() && !cm->nil_p()) {
method->set_position(cm->file(), cm->start_line(state_));
}
Invocation invoke(leaf);
invoke.start();
running_.push(invoke);
return method;
}
void Profiler::leave() {
// Depending on when we started profiling, there could be calls
// above the first time we entered a method, so ignore these.
if(running_.empty()) return;
Invocation& invoke = running_.top();
invoke.stop();
running_.pop();
if(running_.empty()) {
current_ = top_;
} else {
current_ = running_.top().leaf()->method();
}
}
size_t Profiler::number_of_entries() {
return methods_.size();
}
size_t Profiler::depth() {
return running_.size();
}
Method* Profiler::find_key(Key& key) {
return methods_[key];
}
// internal helper method
static Array* update_method(STATE, LookupTable* profile, Method* meth) {
LookupTable* methods = as<LookupTable>(profile->fetch(
state, state->symbol("methods")));
Symbol* total_sym = state->symbol("total");
Symbol* called_sym = state->symbol("called");
Symbol* leaves_sym = state->symbol("leaves");
LookupTable* method;
Fixnum* method_id = Fixnum::from(meth->id());
if((method = try_as<LookupTable>(methods->fetch(state, method_id)))) {
uint64_t total = as<Integer>(method->fetch(state, total_sym))->to_ulong_long();
method->store(state, total_sym,
Integer::from(state, total + meth->total_time_in_ns()));
size_t called = as<Fixnum>(method->fetch(state, called_sym))->to_native();
method->store(state, called_sym, Fixnum::from(called + meth->called_times()));
return as<Array>(method->fetch(state, leaves_sym));
} else {
method = LookupTable::create(state);
methods->store(state, method_id, method);
method->store(state, state->symbol("name"), meth->name(state));
method->store(state, total_sym, Integer::from(state, meth->total_time_in_ns()));
method->store(state, called_sym, Fixnum::from(meth->called_times()));
if(meth->file()) {
const char *file;
if(meth->file()->nil_p()) {
file = "unknown file";
} else {
file = meth->file()->c_str(state);
}
method->store(state, state->symbol("file"), String::create(state, file));
method->store(state, state->symbol("line"), Fixnum::from(meth->line()));
}
Array* leaves = Array::create(state, meth->number_of_leaves());
method->store(state, leaves_sym, leaves);
return leaves;
}
}
void Profiler::results(LookupTable* profile) {
std::vector<Method*> all_methods(0);
for(MethodMap::iterator i = methods_.begin();
i != methods_.end();
i++) {
all_methods.push_back(i->second);
}
for(std::vector<Method*>::iterator i = all_methods.begin();
i != all_methods.end();
i++) {
Method* meth = *i;
Array* leaves = update_method(state_, profile, meth);
size_t idx = 0;
for(Leaves::iterator li = meth->leaves_begin();
li != meth->leaves_end();
li++) {
Leaf* leaf = li->second;
Array* l = Array::create(state_, 2);
leaves->set(state_, idx++, l);
l->set(state_, 0, Fixnum::from(leaf->method()->id()));
l->set(state_, 1, Integer::from(state_, leaf->total_time_in_ns()));
}
}
}
ProfilerCollection::ProfilerCollection(STATE)
: profile_(state, (LookupTable*)Qnil)
{
LookupTable* profile = LookupTable::create(state);
LookupTable* methods = LookupTable::create(state);
profile->store(state, state->symbol("methods"), methods);
profile->store(state, state->symbol("method"),
String::create(state, TIMING_METHOD));
profile_.set(profile);
}
ProfilerCollection::~ProfilerCollection() {
for(ProfilerMap::iterator iter = profilers_.begin();
iter != profilers_.end();
iter++) {
iter->first->remove_profiler();
delete iter->second;
}
}
void ProfilerCollection::add_profiler(VM* vm, Profiler* profiler) {
profilers_[vm] = profiler;
}
void ProfilerCollection::remove_profiler(VM* vm, Profiler* profiler) {
ProfilerMap::iterator iter = profilers_.find(vm);
if(iter != profilers_.end()) {
Profiler* profiler = iter->second;
profiler->results(profile_.get());
iter->first->remove_profiler();
delete iter->second;
profilers_.erase(iter);
}
}
LookupTable* ProfilerCollection::results(STATE) {
LookupTable* profile = profile_.get();
for(ProfilerMap::iterator iter = profilers_.begin();
iter != profilers_.end();
iter++) {
iter->second->results(profile);
}
return profile;
}
}
}
| 27.104225
| 88
| 0.585429
|
samleb
|
e9470c962dfb222d6d049f4ae0f01c8ed0117873
| 1,960
|
hpp
|
C++
|
source/backend/cuda/core/BufferConvertor.hpp
|
zjd1988/mnn_cuda
|
d487534a2f6ffb0b98e3070a74682348e46ec4d1
|
[
"Apache-2.0"
] | 1
|
2020-10-04T04:40:38.000Z
|
2020-10-04T04:40:38.000Z
|
source/backend/cuda/core/BufferConvertor.hpp
|
zjd1988/mnn_cuda
|
d487534a2f6ffb0b98e3070a74682348e46ec4d1
|
[
"Apache-2.0"
] | null | null | null |
source/backend/cuda/core/BufferConvertor.hpp
|
zjd1988/mnn_cuda
|
d487534a2f6ffb0b98e3070a74682348e46ec4d1
|
[
"Apache-2.0"
] | null | null | null |
//
// ImageBufferConvertor.hpp
// MNN
//
// Created by MNN on 2019/01/31.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef BufferConvertor_hpp
#define BufferConvertor_hpp
#include "core/Macro.h"
#include <MNN/Tensor.hpp>
#include "backend/cuda/core/runtime/CUDARuntime.hpp"
#include "backend/cuda/core/CUDARunningUtils.hpp"
#include "backend/cuda/execution/kernel_impl/transpose_impl.cuh"
namespace MNN {
namespace CUDA {
/**
* @brief convert nchw buffer to image.
* @param input input tensor.
* @param output output tensor.
* @param bufferToImageKernel opencl kernel reference.
* @param runtime opencl runtime instance pointer.
* @param needWait whether need wait opencl complete before return or not, default false.
* @return true if success, false otherwise.
*/
bool convertFromNCHWBuffer(const Tensor *input, const Tensor *output, const MNN_DATA_FORMAT dstType,
CUDARuntime *runtime, bool needWait = false);
/**
* @brief convert from nhwc buffer to image.
* @param input input tensor.
* @param output output tensor.
* @param bufferToImageKernel opencl kernel reference.
* @param runtime opencl runtime instance pointer.
* @param needWait whether need wait opencl complete before return or not, default false.
* @return true if success, false otherwise.
*/
bool convertFromNHWCBuffer(const Tensor *input, const Tensor *output, const MNN_DATA_FORMAT dstType,
CUDARuntime *runtime, bool needWait = false);
class BufferConvertor {
public:
explicit BufferConvertor(CUDARuntime *cuda_runtime) : mCudaRuntime(cuda_runtime) {
}
bool convertBuffer(const Tensor *srcBuffer, const MNN_DATA_FORMAT srcType, Tensor *dstBuffer,
const MNN_DATA_FORMAT dstType, bool needWait = false);
private:
CUDARuntime *mCudaRuntime;
};
} // namespace CUDA
} // namespace MNN
#endif /* BufferConvertor_hpp */
| 33.220339
| 100
| 0.715816
|
zjd1988
|
e94d1e020929f6c4c5f17fcd54f16ba1cadd18cf
| 147
|
cpp
|
C++
|
test/CompileVariableTest.cpp
|
hzx/mutant2
|
5029d4ef59dca55819a98975b47554110913d62e
|
[
"MIT"
] | 1
|
2016-08-03T13:15:05.000Z
|
2016-08-03T13:15:05.000Z
|
test/CompileVariableTest.cpp
|
hzx/mutant2
|
5029d4ef59dca55819a98975b47554110913d62e
|
[
"MIT"
] | null | null | null |
test/CompileVariableTest.cpp
|
hzx/mutant2
|
5029d4ef59dca55819a98975b47554110913d62e
|
[
"MIT"
] | null | null | null |
#include <gmock/gmock.h>
class CompileVariableTest: public ::testing::Test {
public:
};
TEST_F(CompileVariableTest, declaration) {
FAIL();
}
| 12.25
| 51
| 0.714286
|
hzx
|
e94e5a06f97fe5c203caaf0c930b74c4042a9d3d
| 418
|
cpp
|
C++
|
07.connect/connect.cpp
|
JackeyLea/Wayland_Freshman
|
e6467ad05642d433bcff252c14507b52e199835f
|
[
"MIT"
] | 7
|
2022-01-14T14:58:47.000Z
|
2022-03-10T07:19:24.000Z
|
07.connect/connect.cpp
|
JackeyLea/Wayland_Freshman
|
e6467ad05642d433bcff252c14507b52e199835f
|
[
"MIT"
] | 1
|
2022-01-28T03:14:03.000Z
|
2022-01-28T03:14:03.000Z
|
07.connect/connect.cpp
|
JackeyLea/Wayland_Freshman
|
e6467ad05642d433bcff252c14507b52e199835f
|
[
"MIT"
] | 2
|
2022-01-01T23:51:54.000Z
|
2022-02-02T08:35:07.000Z
|
/////////////////////
// \author JackeyLea
// \date
// \note 测试能否正常链接wayland server
/////////////////////
#include <wayland-client.h>
#include <iostream>
using namespace std;
int main() {
wl_display *display = wl_display_connect(0);
if (!display) {
std::cout << "Unable to connect to wayland compositor" << std::endl;
return -1;
}
wl_display_disconnect(display);
return 0;
}
| 17.416667
| 76
| 0.57177
|
JackeyLea
|
e9549399459a47c49e73042e2a7f3a4bbca0f452
| 5,726
|
cpp
|
C++
|
code/scripting/api/objs/particle.cpp
|
trgswe/fs2open.github.com
|
a159eba0cebca911ad14a118412fddfe5be8e9f8
|
[
"Unlicense"
] | null | null | null |
code/scripting/api/objs/particle.cpp
|
trgswe/fs2open.github.com
|
a159eba0cebca911ad14a118412fddfe5be8e9f8
|
[
"Unlicense"
] | null | null | null |
code/scripting/api/objs/particle.cpp
|
trgswe/fs2open.github.com
|
a159eba0cebca911ad14a118412fddfe5be8e9f8
|
[
"Unlicense"
] | null | null | null |
//
//
#include "particle.h"
#include "vecmath.h"
#include "object.h"
namespace scripting {
namespace api {
particle_h::particle_h() {
}
particle_h::particle_h(const particle::WeakParticlePtr& part_p) {
this->part = part_p;
}
particle::WeakParticlePtr particle_h::Get() {
return this->part;
}
bool particle_h::isValid() {
return !part.expired();
}
//**********HANDLE: Particle
ADE_OBJ(l_Particle, particle_h, "particle", "Handle to a particle");
ADE_VIRTVAR(Position, l_Particle, "vector", "The current position of the particle (world vector)", "vector", "The current position")
{
particle_h *ph = NULL;
vec3d newVec = vmd_zero_vector;
if (!ade_get_args(L, "o|o", l_Particle.GetPtr(&ph), l_Vector.Get(&newVec)))
return ade_set_error(L, "o", l_Vector.Set(vmd_zero_vector));
if (ph == NULL)
return ade_set_error(L, "o", l_Vector.Set(vmd_zero_vector));
if (!ph->isValid())
return ade_set_error(L, "o", l_Vector.Set(vmd_zero_vector));
if (ADE_SETTING_VAR)
{
ph->Get().lock()->pos = newVec;
}
return ade_set_args(L, "o", l_Vector.Set(ph->Get().lock()->pos));
}
ADE_VIRTVAR(Velocity, l_Particle, "vector", "The current velocity of the particle (world vector)", "vector", "The current velocity")
{
particle_h *ph = NULL;
vec3d newVec = vmd_zero_vector;
if (!ade_get_args(L, "o|o", l_Particle.GetPtr(&ph), l_Vector.Get(&newVec)))
return ade_set_error(L, "o", l_Vector.Set(vmd_zero_vector));
if (ph == NULL)
return ade_set_error(L, "o", l_Vector.Set(vmd_zero_vector));
if (!ph->isValid())
return ade_set_error(L, "o", l_Vector.Set(vmd_zero_vector));
if (ADE_SETTING_VAR)
{
ph->Get().lock()->velocity = newVec;
}
return ade_set_args(L, "o", l_Vector.Set(ph->Get().lock()->velocity));
}
ADE_VIRTVAR(Age, l_Particle, "number", "The time this particle already lives", "number", "The current age or -1 on error")
{
particle_h *ph = NULL;
float newAge = -1.0f;
if (!ade_get_args(L, "o|f", l_Particle.GetPtr(&ph), &newAge))
return ade_set_error(L, "f", -1.0f);
if (ph == NULL)
return ade_set_error(L, "f", -1.0f);
if (!ph->isValid())
return ade_set_error(L, "f", -1.0f);
if (ADE_SETTING_VAR)
{
if (newAge >= 0)
ph->Get().lock()->age = newAge;
}
return ade_set_args(L, "f", ph->Get().lock()->age);
}
ADE_VIRTVAR(MaximumLife, l_Particle, "number", "The time this particle can live", "number", "The maximal life or -1 on error")
{
particle_h *ph = NULL;
float newLife = -1.0f;
if (!ade_get_args(L, "o|f", l_Particle.GetPtr(&ph), &newLife))
return ade_set_error(L, "f", -1.0f);
if (ph == NULL)
return ade_set_error(L, "f", -1.0f);
if (!ph->isValid())
return ade_set_error(L, "f", -1.0f);
if (ADE_SETTING_VAR)
{
if (newLife >= 0)
ph->Get().lock()->max_life = newLife;
}
return ade_set_args(L, "f", ph->Get().lock()->max_life);
}
ADE_VIRTVAR(Looping, l_Particle, "boolean",
"The looping status of the particle. If a particle loops then it will not be removed when its max_life "
"value has been reached. Instead its animation will be reset to the start. When the particle should "
"finally be removed then set this to false and set MaxLife to 0.",
"boolean", "The looping status")
{
particle_h* ph = nullptr;
bool newloop = false;
if (!ade_get_args(L, "o|b", l_Particle.GetPtr(&ph), &newloop))
return ADE_RETURN_FALSE;
if (ph == nullptr)
return ADE_RETURN_FALSE;
if (!ph->isValid())
return ADE_RETURN_FALSE;
if (ADE_SETTING_VAR) {
ph->Get().lock()->looping = newloop;
}
return ade_set_args(L, "b", ph->Get().lock()->looping);
}
ADE_VIRTVAR(Radius, l_Particle, "number", "The radius of the particle", "number", "The radius or -1 on error")
{
particle_h *ph = NULL;
float newRadius = -1.0f;
if (!ade_get_args(L, "o|f", l_Particle.GetPtr(&ph), &newRadius))
return ade_set_error(L, "f", -1.0f);
if (ph == NULL)
return ade_set_error(L, "f", -1.0f);
if (!ph->isValid())
return ade_set_error(L, "f", -1.0f);
if (ADE_SETTING_VAR)
{
if (newRadius >= 0)
ph->Get().lock()->radius = newRadius;
}
return ade_set_args(L, "f", ph->Get().lock()->radius);
}
ADE_VIRTVAR(TracerLength, l_Particle, "number", "The tracer legth of the particle", "number", "The radius or -1 on error")
{
particle_h *ph = NULL;
float newTracer = -1.0f;
if (!ade_get_args(L, "o|f", l_Particle.GetPtr(&ph), &newTracer))
return ade_set_error(L, "f", -1.0f);
if (ph == NULL)
return ade_set_error(L, "f", -1.0f);
if (!ph->isValid())
return ade_set_error(L, "f", -1.0f);
// tracer_length has been deprecated
return ade_set_args(L, "f", -1.0f);
}
ADE_VIRTVAR(AttachedObject, l_Particle, "object", "The object this particle is attached to. If valid the position will be relative to this object and the velocity will be ignored.", "object", "Attached object or invalid object handle on error")
{
particle_h *ph = NULL;
object_h *newObj = nullptr;
if (!ade_get_args(L, "o|o", l_Particle.GetPtr(&ph), l_Object.GetPtr(&newObj)))
return ade_set_error(L, "o", l_Object.Set(object_h()));
if (ph == NULL)
return ade_set_error(L, "o", l_Object.Set(object_h()));
if (!ph->isValid())
return ade_set_error(L, "o", l_Object.Set(object_h()));
if (ADE_SETTING_VAR)
{
if (newObj != nullptr && newObj->IsValid())
ph->Get().lock()->attached_objnum = newObj->objp->signature;
}
return ade_set_object_with_breed(L, ph->Get().lock()->attached_objnum);
}
ADE_FUNC(isValid, l_Particle, NULL, "Detects whether this handle is valid", "boolean", "true if valid false if not")
{
particle_h *ph = NULL;
if (!ade_get_args(L, "o", l_Particle.GetPtr(&ph)))
return ADE_RETURN_FALSE;
if (ph == NULL)
return ADE_RETURN_FALSE;
return ade_set_args(L, "b", ph->isValid());
}
}
}
| 26.757009
| 244
| 0.66591
|
trgswe
|
e959cabacfd844292fb49a13e989bebb56ff73ab
| 2,536
|
hpp
|
C++
|
irohad/simulator/impl/simulator.hpp
|
laSinteZ/iroha
|
78f152a85ee2b3b86db7b705831938e96a186c36
|
[
"Apache-2.0"
] | 1
|
2017-01-15T08:47:16.000Z
|
2017-01-15T08:47:16.000Z
|
irohad/simulator/impl/simulator.hpp
|
laSinteZ/iroha
|
78f152a85ee2b3b86db7b705831938e96a186c36
|
[
"Apache-2.0"
] | 1
|
2017-11-08T02:34:24.000Z
|
2017-11-08T02:34:24.000Z
|
irohad/simulator/impl/simulator.hpp
|
laSinteZ/iroha
|
78f152a85ee2b3b86db7b705831938e96a186c36
|
[
"Apache-2.0"
] | null | null | null |
/**
* Copyright Soramitsu Co., Ltd. 2017 All Rights Reserved.
* http://soramitsu.co.jp
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef IROHA_SIMULATOR_HPP
#define IROHA_SIMULATOR_HPP
#include <nonstd/optional.hpp>
#include "ametsuchi/block_query.hpp"
#include "ametsuchi/temporary_factory.hpp"
#include "model/model_crypto_provider.hpp"
#include "network/ordering_gate.hpp"
#include "simulator/block_creator.hpp"
#include "simulator/verified_proposal_creator.hpp"
#include "validation/stateful_validator.hpp"
#include "logger/logger.hpp"
namespace iroha {
namespace simulator {
class Simulator : public VerifiedProposalCreator, public BlockCreator {
public:
Simulator(
std::shared_ptr<network::OrderingGate> ordering_gate,
std::shared_ptr<validation::StatefulValidator> statefulValidator,
std::shared_ptr<ametsuchi::TemporaryFactory> factory,
std::shared_ptr<ametsuchi::BlockQuery> blockQuery,
std::shared_ptr<model::ModelCryptoProvider> crypto_provider);
Simulator(const Simulator&) = delete;
Simulator& operator=(const Simulator&) = delete;
void process_proposal(model::Proposal proposal) override;
rxcpp::observable<model::Proposal> on_verified_proposal() override;
void process_verified_proposal(model::Proposal proposal) override;
rxcpp::observable<model::Block> on_block() override;
private:
// internal
rxcpp::subjects::subject<model::Proposal> notifier_;
rxcpp::subjects::subject<model::Block> block_notifier_;
std::shared_ptr<validation::StatefulValidator> validator_;
std::shared_ptr<ametsuchi::TemporaryFactory> ametsuchi_factory_;
std::shared_ptr<ametsuchi::BlockQuery> block_queries_;
std::shared_ptr<model::ModelCryptoProvider> crypto_provider_;
logger::Logger log_;
// last block
nonstd::optional<model::Block> last_block;
};
} // namespace simulator
} // namespace iroha
#endif // IROHA_SIMULATOR_HPP
| 34.27027
| 75
| 0.733438
|
laSinteZ
|
e9605dde96f17d5d1f28fae32ccb8114647a6658
| 2,958
|
hpp
|
C++
|
src/cpu/x64/jit_uni_quantization_injector.hpp
|
IvanNovoselov/oneDNN
|
aa47fcd2a03ee5caac119b6417bc66abe3154aab
|
[
"Apache-2.0"
] | null | null | null |
src/cpu/x64/jit_uni_quantization_injector.hpp
|
IvanNovoselov/oneDNN
|
aa47fcd2a03ee5caac119b6417bc66abe3154aab
|
[
"Apache-2.0"
] | null | null | null |
src/cpu/x64/jit_uni_quantization_injector.hpp
|
IvanNovoselov/oneDNN
|
aa47fcd2a03ee5caac119b6417bc66abe3154aab
|
[
"Apache-2.0"
] | 1
|
2021-03-10T17:25:36.000Z
|
2021-03-10T17:25:36.000Z
|
/*******************************************************************************
* Copyright 2019-2020 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
#ifndef CPU_X64_JIT_UNI_QUANTIZATION_INJECTOR_HPP
#define CPU_X64_JIT_UNI_QUANTIZATION_INJECTOR_HPP
#include <assert.h>
#include "common/c_types_map.hpp"
#include "common/primitive_attr.hpp"
#include "common/type_helpers.hpp"
#include "common/utils.hpp"
#include "cpu/x64/jit_generator.hpp"
namespace dnnl {
namespace impl {
namespace cpu {
namespace x64 {
template <cpu_isa_t isa, typename Vmm = typename cpu_isa_traits<isa>::Vmm>
struct jit_uni_quantization_injector_f32 {
jit_uni_quantization_injector_f32(jit_generator* host, dnnl_post_ops::entry_t post_op,
Vmm vmm_d_weights, Vmm vmm_d_bias, Xbyak::Reg64 reg_d_weights, Xbyak::Reg64 reg_d_bias)
: h(host), post_op_(post_op), vmm_d_weights_(vmm_d_weights), vmm_d_bias_(vmm_d_bias), reg_d_weights_(reg_d_weights), reg_d_bias_(reg_d_bias) {
assert(post_op.is_quantization());
assert(utils::one_of(post_op.quantization.alg, alg_kind::quantization_quantize, alg_kind::quantization_quantize_dequantize));
do_dequantization = post_op_.quantization.alg == alg_kind::quantization_quantize_dequantize;
xmm_d_weights_ = Xbyak::Xmm(vmm_d_weights.getIdx());
xmm_d_bias_ = Xbyak::Xmm(vmm_d_bias.getIdx());
}
void init_crop_ptrs(const Xbyak::Operand& ch_off);
void init_input_scale_shift_ptrs(const Xbyak::Operand& ch_off);
void init_output_scale_shift_ptrs(const Xbyak::Operand& ch_off);
void compute_crop(int start_idx, int end_idx, int offset, bool is_scalar = false, bool is_broadcast = false);
void compute_input_scale_shift(int start_idx, int end_idx, int offset, bool do_rounding, bool is_scalar = false, bool is_broadcast = false);
void compute_output_scale_shift(int start_idx, int end_idx, int offset, bool is_scalar = false, bool is_broadcast = false);
private:
jit_generator* h;
size_t vlen = cpu_isa_traits<isa>::vlen;
dnnl_post_ops::entry_t post_op_;
Vmm vmm_d_weights_;
Vmm vmm_d_bias_;
Xbyak::Xmm xmm_d_weights_;
Xbyak::Xmm xmm_d_bias_;
Xbyak::Reg64 reg_d_weights_;
Xbyak::Reg64 reg_d_bias_;
bool do_dequantization;
};
} // namespace x64
} // namespace cpu
} // namespace impl
} // namespace dnnl
#endif
| 36.975
| 150
| 0.7167
|
IvanNovoselov
|
e960710f7378f48754c078c90573c372f2620647
| 924
|
hh
|
C++
|
src/Nuxed/Http/Server/__Private/NextMiddlewareProcessor.hh
|
tomoki1337/framework
|
ff06d260c5bf2a78a99b8d17b041de756550f95a
|
[
"MIT"
] | 1
|
2019-01-25T20:05:55.000Z
|
2019-01-25T20:05:55.000Z
|
src/Nuxed/Http/Server/__Private/NextMiddlewareProcessor.hh
|
gitter-badger/framework-27
|
368b734f2753b06b7f19f819185091f896838467
|
[
"MIT"
] | null | null | null |
src/Nuxed/Http/Server/__Private/NextMiddlewareProcessor.hh
|
gitter-badger/framework-27
|
368b734f2753b06b7f19f819185091f896838467
|
[
"MIT"
] | null | null | null |
<?hh // strict
namespace Nuxed\Http\Server\__Private;
use type Nuxed\Contract\Http\Message\ResponseInterface;
use type Nuxed\Contract\Http\Message\ServerRequestInterface;
use type Nuxed\Contract\Http\Server\RequestHandlerInterface;
use type Nuxed\Contract\Http\Server\MiddlewareInterface;
use type SplPriorityQueue;
class NextMiddlewareProcessor implements RequestHandlerInterface {
private SplPriorityQueue<MiddlewareInterface> $queue;
public function __construct(
SplPriorityQueue<MiddlewareInterface> $queue,
private RequestHandlerInterface $handler,
) {
$this->queue = clone $queue;
}
public async function handle(
ServerRequestInterface $request,
): Awaitable<ResponseInterface> {
if (0 === $this->queue->count()) {
return await $this->handler->handle($request);
}
$middleware = $this->queue->extract();
return await $middleware->process($request, $this);
}
}
| 28
| 66
| 0.75
|
tomoki1337
|
e96957d7604f6b91f2f1403e55a8f6b3dc262022
| 10,293
|
hpp
|
C++
|
core/src/cogs/collections/slink.hpp
|
cogmine/cogs
|
ef1c369a36a4f811704e0ced0493c3a6f8eca821
|
[
"MIT"
] | 5
|
2019-02-08T15:59:14.000Z
|
2022-01-22T19:12:33.000Z
|
core/src/cogs/collections/slink.hpp
|
cogmine/cogs
|
ef1c369a36a4f811704e0ced0493c3a6f8eca821
|
[
"MIT"
] | 1
|
2019-12-03T03:11:34.000Z
|
2019-12-03T03:11:34.000Z
|
core/src/cogs/collections/slink.hpp
|
cogmine/cogs
|
ef1c369a36a4f811704e0ced0493c3a6f8eca821
|
[
"MIT"
] | null | null | null |
//
// Copyright (C) 2000-2020 - Colen M. Garoutte-Carson <colen at cogmine.com>, Cog Mine LLC
//
// Status: Good
#ifndef COGS_HEADER_COLLECTION_SLINK
#define COGS_HEADER_COLLECTION_SLINK
#include <type_traits>
#include "cogs/mem/ptr.hpp"
namespace cogs {
/// @defgroup CollectionMixIns Collection Mix-In's
/// @{
/// @ingroup Collections
/// @}
/// @defgroup CollectionAccessorMixIns Accessor Mix-In's
/// @{
/// @ingroup CollectionMixIns
/// @brief Accessor mix-in's provide intrusive collection algorithms with access to the links within intrusive elements.
/// They are an alternative to deriving from an intrusive link base class. They allow use of an intrusive element that
/// do not publicly expose access to the link accessors.
/// @}
/// @ingroup CollectionAccessorMixIns
/// @brief Provides a default slink accessor mix-in type which leverages accessors in the intrusive element.
/// @tparam link_t The link type to wrap access to.
/// @tparam ref_type Type used to reference elements. Default: ptr
template <class link_t, template <typename> class ref_type = ptr>
class default_slink_accessor
{
public:
typedef ref_type<link_t> ref_t;
static const ref_t& get_next(const link_t& l) { return l.get_next_link(); }
static const volatile ref_t& get_next(const volatile link_t& l) { return l.get_next_link(); }
static void set_next(link_t& l, const ref_t& src) { l.set_next_link(src); }
static void set_next(volatile link_t& l, const ref_t& src) { l.set_next_link(src); }
};
template <class link_t, template <typename> class ref_type = ptr, class link_accessor = default_slink_accessor<link_t, ref_type> >
class slink_methods
{
public:
typedef ref_type<link_t> ref_t;
static const ref_t& get_next(const link_t& l) { return link_accessor::get_next(l); }
static const volatile ref_t& get_next(const volatile link_t& l) { return link_accessor::get_next(l); }
static void set_next(link_t& l, const ref_t& src) { link_accessor::set_next_link(l, src); }
static void set_next(volatile link_t& l, const ref_t& src) { link_accessor::set_next_link(l, src); }
static void insert_next(link_t& ths, const ref_t& l)
{
set_next(*l, get_next(ths));
set_next(ths, l);
}
static ref_t remove_next(link_t& ths)
{
ref_t l(get_next(ths));
set_next(ths, get_next(*l));
return l;
}
static void insert_segment(link_t& ths, const ref_t& seq_start, const ref_t& seq_end)
{
set_next(*seq_end, get_next(ths));
set_next(ths, seq_start);
}
static ref_t insert_terminated_list(link_t& ths, const ref_t& l, const ref_t& terminator = ref_t())
{
ref_t last(find_last_terminated(ths, l, terminator));
set_next(*last, get_next(ths));
set_next(ths, l);
return last;
}
static ref_t insert_circular_list(link_t& ths, const ref_t& l)
{
ref_t last(find_last_circular(l));
set_next(*last, get_next(ths));
set_next(ths, l);
return last;
}
static ref_t insert_list(link_t& ths, const ref_t& l, const ref_t& terminator = ref_t())
{
ref_t last(find_last(l, terminator)); // supports terminator or full circular
set_next(*last, get_next(ths));
set_next(ths, l);
return last;
}
static bool is_circular(const link_t& ths, const ref_t& terminator = ref_t())
{
bool result = false;
size_t count = 0;
size_t loop_at = 1;
ref_t loop = ths;
ref_t cur(get_next(ths));
for(;;)
{
if (terminator != cur)
{
if (loop != cur)
{
if (++count == loop_at)
{
loop_at <<= 1;
count = 0;
loop = cur;
}
cur = get_next(*cur);
continue;
}
result = true;
}
break;
}
return result;
}
static bool is_full_circular(const link_t& ths, const ref_t& terminator = ref_t())
{
bool result = false;
size_t count = 0;
size_t loop_at = 1;
ref_t loop;
ref_t cur(get_next(ths));
for(;;)
{
if (terminator != cur)
{
if (cur != ths)
{
if (++count == loop_at)
{
loop_at <<= 1;
count = 0;
loop = cur;
}
cur = get_next(*cur);
if (loop == cur)
break;
continue;
}
result = true;
}
break;
}
return result;
}
static bool is_tail_circular(const link_t& ths, const ref_t& terminator = ref_t())
{
bool result = false;
size_t count = 0;
size_t loop_at = 1;
ref_t loop;
ref_t cur(get_next(ths));
for(;;)
{
if (terminator != cur)
{
if (ths != cur)
{
if (++count == loop_at)
{
loop_at <<= 1;
count = 0;
loop = cur;
}
cur = get_next(*cur);
if (loop != cur)
continue;
result = true;
}
}
break;
}
return result;
}
static ref_t find_last(const ref_t& l, const ref_t& terminator = ref_t())
{
ref_t last(l);
for (;;)
{
ref_t cur(get_next(*last));
if ((cur != l) && (cur != terminator))
{
last = cur;
continue;
}
break;
}
return last;
}
static ref_t find_last_terminated(const ref_t& l, const ref_t& terminator = ref_t())
{
ref_t last(l);
for (;;)
{
ref_t cur(get_next(*last));
if (cur != terminator)
{
last = cur;
continue;
}
break;
}
return last;
}
static ref_t find_last_circular(const ref_t& l)
{
ref_t last(l);
for (;;)
{
ref_t cur(get_next(*last));
if (cur != l)
{
last = cur;
continue;
}
break;
}
return last;
}
static ref_t reverse(const ref_t& l)
{
if (!l)
return l;
ref_t cur(l);
ref_t prev;
ref_t prevprev;
do {
prevprev = prev;
prev = cur;
cur = get_next(*cur);
get_next(*prev) = prevprev;
} while (!!cur);
return prev;
}
};
/// @ingroup Collections
/// @brief Base class for a single-link list element. Does not include storage or link accessor methods.
/// @tparam derived_t Derived type of this class.
/// This <a href="https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern">curiously recurring template pattern</a>
/// allows links to refer to the derived type. Storage and access can be defined in the derived type.
/// @tparam ref_type Type used to reference elements. Default: ptr
/// @tparam link_accessor Mix-in type providing access to the link. Default: default_slink_accessor<derived_t, ref_type>
template <class derived_t, template <typename> class ref_type = ptr, class link_accessor = default_slink_accessor<derived_t, ref_type> >
class slink_base
{
public:
typedef slink_base<derived_t, ref_type, link_accessor> this_t;
typedef std::conditional_t<std::is_void_v<derived_t>, this_t, derived_t> link_t;
typedef ref_type<link_t> ref_t;
typedef slink_methods<link_t, ref_type, link_accessor> slink_methods_t;
// non-volatile misc
void insert_next(const ref_t& l) { slink_methods_t::insert_next(*(derived_t*)this, l); }
ref_t remove_next() { return slink_methods_t::remove_next(*(derived_t*)this); }
void insert_segment(const ref_t& seq_start, const ref_t& seq_end) { slink_methods_t::insert_segment(*(derived_t*)this, seq_start, seq_end); }
ref_t insert_terminated_list(const ref_t& l, const ref_t& terminator = ref_t()) { return slink_methods_t::insert_terminated_list(*(derived_t*)this, l, terminator); }
ref_t insert_circular_list(const ref_t& l) { return slink_methods_t::insert_circular_list(*(derived_t*)this, l); }
ref_t insert_list(const ref_t& l, const ref_t& terminator = ref_t()) { return slink_methods_t::insert_list(*(derived_t*)this, l, terminator); }
bool is_circular(const ref_t& terminator = ref_t()) const { return slink_methods_t::is_circular(*(derived_t*)this, terminator); }
bool is_full_circular(const ref_t& terminator = ref_t()) const { return slink_methods_t::is_full_circular(*(derived_t*)this, terminator); }
bool is_tail_circular(const ref_t& terminator = ref_t()) const { return slink_methods_t::is_tail_circular(*(derived_t*)this, terminator); }
static ref_t find_last(const ref_t& l, const ref_t& terminator = ref_t()) { return slink_methods_t::find_last(l, terminator); }
static ref_t find_last_terminated(const ref_t& l, const ref_t& terminator = ref_t()) { return slink_methods_t::find_last_terminated(l, terminator); }
static ref_t find_last_circular(const ref_t& l) { return slink_methods_t::find_last_circular(l); }
static ref_t reverse(const ref_t& l) { return slink_methods_t::reverse(l); }
};
/// @ingroup Collections
/// @brief Base class for a single-link list element.
/// @tparam derived_t Derived type of this class.
/// This <a href="https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern">curiously recurring template pattern</a>
/// allows links to refer to the derived type.
/// If void is specified, links will point to slink_t<void, ref_type, link_accessor>. Default: void
/// @tparam ref_type Type used to reference elements. Default: ptr
/// @tparam link_accessor Mix-in type providing access to the link. Default: default_slink_accessor<derived_t, ref_type>
template <class derived_t = void, template <typename> class ref_type = ptr, class link_accessor = default_slink_accessor<derived_t, ref_type> >
class slink_t : public slink_base<derived_t, ref_type, link_accessor>
{
public:
typedef slink_t<derived_t, ref_type, link_accessor> this_t;
typedef std::conditional_t<std::is_void_v<derived_t>, this_t, derived_t> link_t;
typedef ref_type<link_t> ref_t;
typedef default_slink_accessor<this_t, ref_type> default_link_accessor;
private:
ref_t m_next;
slink_t(const this_t& t) = delete;
this_t& operator=(const this_t& t) = delete;
public:
slink_t() { }
slink_t(this_t&& t)
: m_next(std::move(t.m_next))
{
}
this_t& operator=(this_t&& t)
{
m_next = std::move(t.m_next);
return *this;
}
ref_t& get_next_link() { return m_next; }
const ref_t& get_next_link() const { return m_next; }
volatile ref_t& get_next_link() volatile { return m_next; }
const volatile ref_t& get_next_link() const volatile { return m_next; }
void set_next_link(const ref_t& n) { m_next = n; }
void set_next_link(const volatile ref_t& n) { m_next = n; }
void set_next_link(const ref_t& n) volatile { m_next = n; }
void set_next_link(const volatile ref_t& n) volatile { m_next = n; }
};
template <template <typename> class ref_type>
class default_slink_accessor<void, ref_type> : public default_slink_accessor<slink_t<void, ref_type, default_slink_accessor<void, ref_type> > >
{
};
typedef slink_t<void> slink;
}
#endif
| 28.671309
| 166
| 0.69727
|
cogmine
|
e976852fe01b660f90e281aae7d41b1bfa44be63
| 435
|
inl
|
C++
|
node_modules/lzz-gyp/lzz-source/smtc_TmplFuncDefn.inl
|
SuperDizor/dizornator
|
9f57dbb3f6af80283b4d977612c95190a3d47900
|
[
"ISC"
] | 3
|
2019-09-18T16:44:33.000Z
|
2021-03-29T13:45:27.000Z
|
node_modules/lzz-gyp/lzz-source/smtc_TmplFuncDefn.inl
|
SuperDizor/dizornator
|
9f57dbb3f6af80283b4d977612c95190a3d47900
|
[
"ISC"
] | null | null | null |
node_modules/lzz-gyp/lzz-source/smtc_TmplFuncDefn.inl
|
SuperDizor/dizornator
|
9f57dbb3f6af80283b4d977612c95190a3d47900
|
[
"ISC"
] | 2
|
2019-03-29T01:06:38.000Z
|
2019-09-18T16:44:34.000Z
|
// smtc_TmplFuncDefn.inl
//
#ifdef LZZ_ENABLE_INLINE
#define LZZ_INLINE inline
#else
#define LZZ_INLINE
#endif
namespace smtc
{
LZZ_INLINE TmplFuncDefn::TmplFuncDefn (TmplSpecPtrVector const & tmpl_spec_set, FuncDefnPtr const & func_defn)
: TmplFuncDecl (tmpl_spec_set, func_defn)
{}
}
namespace smtc
{
LZZ_INLINE FuncDefnPtr TmplFuncDefn::getFuncDefn () const
{
return getFuncDecl ();
}
}
#undef LZZ_INLINE
| 18.913043
| 112
| 0.744828
|
SuperDizor
|
e976bb3f488e776db80e97ce4b4eca75e15d8607
| 2,641
|
cpp
|
C++
|
demos/Tweening.cpp
|
liavt/MACE
|
9a4e83b2b5cb39d9a69b2e699b57c05d9dd94aad
|
[
"MIT"
] | 9
|
2016-03-01T03:10:50.000Z
|
2021-04-15T09:17:14.000Z
|
demos/Tweening.cpp
|
liavt/The-Poor-Plebs-Engine
|
9a4e83b2b5cb39d9a69b2e699b57c05d9dd94aad
|
[
"MIT"
] | 10
|
2016-07-09T04:00:27.000Z
|
2019-12-09T09:14:49.000Z
|
demos/Tweening.cpp
|
liavt/The-Poor-Plebs-Engine
|
9a4e83b2b5cb39d9a69b2e699b57c05d9dd94aad
|
[
"MIT"
] | 3
|
2017-05-24T04:07:40.000Z
|
2019-10-11T20:31:25.000Z
|
/*
Copyright (c) 2016-2019 Liav Turkia
See LICENSE.md for full copyright information
*/
#include <MACE/MACE.h>
using namespace mc;
gfx::Image square;
void create(gfx::WindowModule& win) {
square = gfx::Image(Colors::RED);
square.setX(-0.5f);
square.setY(0.5f);
square.setWidth(0.1f);
square.setHeight(0.1f);
std::shared_ptr<gfx::ComponentQueue> queue = std::shared_ptr<gfx::ComponentQueue>(new gfx::ComponentQueue());
TransformMatrix dest1 = TransformMatrix();
dest1.scaler = { 0.2f, 0.2f, 0.0f };
dest1.translation = { 0.5f, 0.5f, 0.0f };
dest1.rotation = { 0.0f, 0.0f, 0.5f };
gfx::EaseSettings settings = gfx::EaseSettings();
settings.ms = 1000;
settings.ease = gfx::EaseFunctions::BOUNCE_OUT;
settings.repeats = 1;
settings.reverseOnRepeat = false;
queue->addComponent(std::shared_ptr<gfx::Component>(new gfx::TweenComponent(&square, dest1, settings)));
TransformMatrix dest2 = TransformMatrix(dest1);
dest2.scaler = { 0.5f, 0.5f, 0.0f };
dest2.translation = { 0.5f, -0.5f, 0.0f };
dest2.rotation = { 0.0f, 0.0f, 1.5f };
settings.ms = 1500;
settings.ease = gfx::EaseFunctions::QUADRATIC_IN;
settings.repeats = 3;
settings.reverseOnRepeat = true;
queue->addComponent(std::shared_ptr<gfx::Component>(new gfx::TweenComponent(&square, dest1, dest2, settings)));
TransformMatrix dest3 = TransformMatrix(dest2);
dest3.scaler = { 0.05f, 0.05f, 0.0f };
dest3.translation = { -0.5f, -0.5f, 0.0f };
dest3.rotation = { 0.0f, 0.0f, 6.0f };
settings.ms = 2000;
settings.ease = gfx::EaseFunctions::LINEAR;
settings.repeats = 1;
settings.reverseOnRepeat = false;
queue->addComponent(std::shared_ptr<gfx::Component>(new gfx::TweenComponent(&square, dest2, dest3, settings)));
//have it end up at the same place
settings.ms = 2000;
settings.ease = gfx::EaseFunctions::ELASTIC_IN;
settings.repeats = 3;
settings.reverseOnRepeat = false;
queue->addComponent(std::shared_ptr<gfx::Component>(new gfx::TweenComponent(&square, dest3, square.getTransformation(), settings)));
square.addComponent(queue);
win.addChild(square);
win.getContext()->getRenderer()->setRefreshColor(Colors::DARK_BLUE);
}
int main() {
Instance instance = Instance();
try {
gfx::WindowModule::LaunchConfig config = gfx::WindowModule::LaunchConfig(600, 600, "Tweening Demo");
config.onCreate = &create;
config.resizable = true;
gfx::WindowModule module = gfx::WindowModule(config);
instance.addModule(module);
os::ErrorModule errModule = os::ErrorModule();
instance.addModule(errModule);
instance.start();
} catch (const std::exception& e) {
Error::handleError(e, instance);
return -1;
}
return 0;
}
| 29.344444
| 133
| 0.709958
|
liavt
|
e97db13c29a28aecb05281afbf709bf303a77a36
| 5,352
|
cc
|
C++
|
squid_wrap/squid_win_helpers/auth/ext_AD_Group/AD_group/rfc1738.cc
|
NPaolini/NPS_OpenSource
|
0c7da066b02b57ce282a1903a3901a563d04a28f
|
[
"Unlicense"
] | null | null | null |
squid_wrap/squid_win_helpers/auth/ext_AD_Group/AD_group/rfc1738.cc
|
NPaolini/NPS_OpenSource
|
0c7da066b02b57ce282a1903a3901a563d04a28f
|
[
"Unlicense"
] | null | null | null |
squid_wrap/squid_win_helpers/auth/ext_AD_Group/AD_group/rfc1738.cc
|
NPaolini/NPS_OpenSource
|
0c7da066b02b57ce282a1903a3901a563d04a28f
|
[
"Unlicense"
] | null | null | null |
/*
* Copyright (C) 1996-2018 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
* Please see the COPYING and CONTRIBUTORS files for details.
*/
#define _CRT_SECURE_NO_WARNINGS
//#include "squid.h"
#include "rfc1738.h"
//#if HAVE_STRING_H
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
//#endif
/*
* RFC 1738 defines that these characters should be escaped, as well
* any non-US-ASCII character or anything between 0x00 - 0x1F.
*/
static TCHAR rfc1738_unsafe_chars[] = {
(TCHAR) 0x3C, /* < */
(TCHAR) 0x3E, /* > */
(TCHAR) 0x22, /* " */
(TCHAR) 0x23, /* # */
#if 0 /* done in code */
(TCHAR) 0x20, /* space */
(TCHAR) 0x25, /* % */
#endif
(TCHAR) 0x7B, /* { */
(TCHAR) 0x7D, /* } */
(TCHAR) 0x7C, /* | */
(TCHAR) 0x5C, /* \ */
(TCHAR) 0x5E, /* ^ */
(TCHAR) 0x7E, /* ~ */
(TCHAR) 0x5B, /* [ */
(TCHAR) 0x5D, /* ] */
(TCHAR) 0x60, /* ` */
(TCHAR) 0x27 /* ' */
};
static TCHAR rfc1738_reserved_chars[] = {
(TCHAR) 0x3b, /* ; */
(TCHAR) 0x2f, /* / */
(TCHAR) 0x3f, /* ? */
(TCHAR) 0x3a, /* : */
(TCHAR) 0x40, /* @ */
(TCHAR) 0x3d, /* = */
(TCHAR) 0x26 /* & */
};
/*
* rfc1738_escape - Returns a static buffer contains the RFC 1738
* compliant, escaped version of the given url.
*/
TCHAR *
rfc1738_do_escape(const TCHAR *url, int flags)
{
static TCHAR *buf;
static size_t bufsize = 0;
const TCHAR *src;
TCHAR *dst;
unsigned int i, do_escape;
if (buf == NULL || _tcslen(url) * 3 > bufsize) {
delete []buf;
bufsize = _tcslen(url) * 3 + 1;
buf = new TCHAR[bufsize];
}
for (src = url, dst = buf; *src != _T('\0') && dst < (buf + bufsize - 1); src++, dst++) {
/* a-z, A-Z and 0-9 are SAFE. */
if ((*src >= _T('a') && *src <= _T('z')) || (*src >= _T('A') && *src <= _T('Z')) || (*src >= _T('0') && *src <= _T('9'))) {
*dst = *src;
continue;
}
do_escape = 0;
/* RFC 1738 defines these chars as unsafe */
if ((flags & RFC1738_ESCAPE_UNSAFE)) {
for (i = 0; i < sizeof(rfc1738_unsafe_chars); i++) {
if (*src == rfc1738_unsafe_chars[i]) {
do_escape = 1;
break;
}
}
/* Handle % separately */
if (!(flags & RFC1738_ESCAPE_NOPERCENT) && *src == _T('%'))
do_escape = 1;
/* Handle space separately */
else if (!(flags & RFC1738_ESCAPE_NOSPACE) && *src <= _T(' '))
do_escape = 1;
}
/* RFC 1738 defines these chars as reserved */
if ((flags & RFC1738_ESCAPE_RESERVED) && do_escape == 0) {
for (i = 0; i < sizeof(rfc1738_reserved_chars); i++) {
if (*src == rfc1738_reserved_chars[i]) {
do_escape = 1;
break;
}
}
}
if ((flags & RFC1738_ESCAPE_CTRLS) && do_escape == 0) {
/* RFC 1738 says any control chars (0x00-0x1F) are encoded */
if ((unsigned char) *src <= (unsigned char) 0x1F)
do_escape = 1;
/* RFC 1738 says 0x7f is encoded */
else if (*src == (TCHAR) 0x7F)
do_escape = 1;
/* RFC 1738 says any non-US-ASCII are encoded */
else if (((unsigned char) *src >= (unsigned char) 0x80))
do_escape = 1;
}
/* Do the triplet encoding, or just copy the TCHAR */
if (do_escape == 1) {
(void)_sntprintf(dst, (bufsize-(dst-buf)), _T("%%%02X"), (unsigned) *src);
dst += 2; //sizeof(TCHAR) * 2;
} else {
*dst = *src;
}
}
*dst = _T('\0');
return (buf);
}
/*
* Converts a ascii hex code into a binary character.
*/
static int
fromhex(TCHAR ch)
{
if (ch >= _T('0') && ch <= _T('9'))
return ch - _T('0');
if (ch >= _T('a') && ch <= _T('f'))
return ch - _T('a') + 10;
if (ch >= _T('A') && ch <= _T('F'))
return ch - _T('A') + 10;
return -1;
}
/*
* rfc1738_unescape() - Converts escaped characters (%xy numbers) in
* given the string. %% is a %. %ab is the 8-bit hexadecimal number "ab"
*/
void
rfc1738_unescape(TCHAR *s)
{
int i, j; /* i is write, j is read */
for (i = j = 0; s[j]; i++, j++) {
s[i] = s[j];
if (s[j] != _T('%')) {
/* normal case, nothing more to do */
} else if (s[j + 1] == _T('%')) { /* %% case */
j++; /* Skip % */
} else {
/* decode */
int v1, v2, x;
v1 = fromhex(s[j + 1]);
if (v1 < 0)
continue; /* non-hex or \0 */
v2 = fromhex(s[j + 2]);
if (v2 < 0)
continue; /* non-hex or \0 */
x = v1 << 4 | v2;
if (x > 0 && x <= 255) {
s[i] = x;
j += 2;
}
}
}
s[i] = _T('\0');
}
| 30.237288
| 131
| 0.448617
|
NPaolini
|
e97f3b8b5f0e037da3dccfaba4bac513eb31f0f4
| 29
|
cpp
|
C++
|
DinoLasers/ContactManifold.cpp
|
QRayarch/DinoLasers
|
500f4144fad2a813cd140d6067b41a41f4573e8c
|
[
"MIT"
] | null | null | null |
DinoLasers/ContactManifold.cpp
|
QRayarch/DinoLasers
|
500f4144fad2a813cd140d6067b41a41f4573e8c
|
[
"MIT"
] | null | null | null |
DinoLasers/ContactManifold.cpp
|
QRayarch/DinoLasers
|
500f4144fad2a813cd140d6067b41a41f4573e8c
|
[
"MIT"
] | null | null | null |
#include "ContactManifold.h"
| 14.5
| 28
| 0.793103
|
QRayarch
|
e97f792fcdfd9dde7882bb657cf63e706c34d5e9
| 15,997
|
cpp
|
C++
|
source/MultiLibrary/Window/Windows/Window.cpp
|
danielga/multilibrary
|
3d1177dd3affa875e06015f5e3e42dda525f3336
|
[
"BSD-3-Clause"
] | 2
|
2018-06-22T12:43:57.000Z
|
2019-05-31T21:56:27.000Z
|
source/MultiLibrary/Window/Windows/Window.cpp
|
danielga/multilibrary
|
3d1177dd3affa875e06015f5e3e42dda525f3336
|
[
"BSD-3-Clause"
] | 1
|
2017-09-09T01:21:31.000Z
|
2017-11-12T17:52:56.000Z
|
source/MultiLibrary/Window/Windows/Window.cpp
|
danielga/multilibrary
|
3d1177dd3affa875e06015f5e3e42dda525f3336
|
[
"BSD-3-Clause"
] | 1
|
2022-03-30T18:57:41.000Z
|
2022-03-30T18:57:41.000Z
|
/*************************************************************************
* MultiLibrary - https://danielga.github.io/multilibrary/
* A C++ library that covers multiple low level systems.
*------------------------------------------------------------------------
* Copyright (c) 2014-2022, Daniel Almeida
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*************************************************************************/
#include <MultiLibrary/Window/Window.hpp>
#include <MultiLibrary/Window/Windows/Context.hpp>
#include <MultiLibrary/Common/Unicode.hpp>
#include <stdexcept>
#include <cstring>
#include <Windows.h>
#undef CreateWindow
namespace MultiLibrary
{
enum ButtonState
{
BUTTON_RELEASED,
BUTTON_PRESSED,
BUTTON_STICKY
};
namespace Internal
{
class WindowInitializer
{
public:
WindowInitializer( ) :
class_atom( nullptr )
{
WNDCLASS wc;
wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
wc.lpfnWndProc = WindowProcedure;
wc.cbClsExtra = 0;
wc.cbWndExtra = sizeof( void * ) + sizeof( int32_t );
wc.hInstance = GetModuleHandle( nullptr );
wc.hCursor = LoadCursor( nullptr, IDC_ARROW );
wc.hbrBackground = nullptr;
wc.lpszMenuName = nullptr;
wc.lpszClassName = window_class;
wc.hIcon = LoadIcon( nullptr, IDI_WINLOGO );
ATOM atom = RegisterClass( &wc );
if( atom == 0 )
throw std::runtime_error( "failed to create window class" );
class_atom = MAKEINTATOM( atom );
HWND temp_window = CreateWindowEx( 0, L"STATIC", L"", WS_POPUP | WS_DISABLED, 0, 0, 0, 0, nullptr, nullptr, GetModuleHandle( nullptr ), nullptr );
if( temp_window == nullptr )
throw std::runtime_error( "failed to create temporary window" );
{
Context context( temp_window, WindowSettings( ) );
context.SetActive( true );
if( glewInit( ) != GLEW_OK )
throw new std::runtime_error( "unable to initialize glew" );
}
DestroyWindow( temp_window );
}
~WindowInitializer( )
{
UnregisterClass( class_atom, GetModuleHandle( nullptr ) );
}
LPCWSTR GetWindowClass( )
{
return class_atom;
}
private:
static LRESULT CALLBACK WindowProcedure( HWND window, UINT msg, WPARAM wparam, LPARAM lparam )
{
switch( msg )
{
case WM_NCCREATE:
{
LPCREATESTRUCT create_struct = reinterpret_cast<LPCREATESTRUCT>( lparam );
SetWindowLongPtr( window, GWLP_USERDATA, reinterpret_cast<LONG_PTR>( create_struct->lpCreateParams ) );
break;
}
case WM_CLOSE:
reinterpret_cast<Window *>( GetWindowLongPtr( window, GWLP_USERDATA ) )->SetShouldClose( true );
return 0;
}
return DefWindowProc( window, msg, wparam, lparam );
}
LPCWSTR class_atom;
static const wchar_t window_class[];
};
const wchar_t WindowInitializer::window_class[] = L"MultiLibrary";
static void GetFullWindowSize( DWORD flags, DWORD exflags, int32_t win, int32_t hin, int32_t &wout, int32_t &hout )
{
RECT rect = { 0, 0, win, hin };
if( AdjustWindowRectEx( &rect, flags, FALSE, exflags ) == FALSE )
return;
wout = rect.right - rect.left;
hout = rect.bottom - rect.top;
}
} // namespace Internal
struct Window::Handle
{
Handle( HWND window, const WindowSettings &window_settings ) :
handle( window, DestroyWindow ),
icon( nullptr, DestroyIcon ),
context( window, window_settings )
{
std::memset( keyboard_buttons, BUTTON_RELEASED, sizeof( keyboard_buttons ) );
std::memset( mouse_buttons, BUTTON_RELEASED, sizeof( mouse_buttons ) );
}
std::unique_ptr<HWND__, BOOL ( WINAPI * )( HWND )> handle;
std::unique_ptr<HICON__, BOOL ( WINAPI * )( HICON )> icon;
Context context;
Monitor monitor;
DWORD flags;
DWORD exflags;
bool sticky_keys;
bool sticky_mouse;
ButtonState keyboard_buttons[KEY_CODE_LAST + 1];
ButtonState mouse_buttons[MOUSE_BUTTON_LAST + 1];
};
Window::Window( ) :
should_close( false )
{ }
Window::Window( const std::string &title, const WindowSettings &window_setup ) :
should_close( false )
{
Create( title, window_setup );
}
Window::~Window( )
{ }
bool Window::IsValid( ) const
{
return static_cast<bool>( window_internal );
}
bool Window::Create( const std::string &title, const WindowSettings &window_setup )
{
if( IsValid( ) )
return false;
static Internal::WindowInitializer window_initializer;
std::wstring widetitle;
UTF16::FromUTF8( title.begin( ), title.end( ), std::back_inserter( widetitle ) );
DWORD flags = WS_CLIPSIBLINGS | WS_CLIPCHILDREN, exflags = WS_EX_APPWINDOW | WS_EX_ACCEPTFILES;
int32_t x = window_setup.x, y = window_setup.y, w = 0, h = 0;
if( window_setup.monitor.IsValid( ) )
{
flags |= WS_POPUP;
if( window_setup.visible )
flags |= WS_VISIBLE;
Vector2i pos = window_setup.monitor.GetPosition( );
x = pos.x;
y = pos.y;
w = window_setup.width;
h = window_setup.height;
}
else
{
if( window_setup.decorated )
{
flags |= WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;
if( window_setup.resizable )
{
flags |= WS_MAXIMIZEBOX | WS_SIZEBOX;
exflags |= WS_EX_WINDOWEDGE;
}
}
else
{
flags |= WS_POPUP;
}
if( window_setup.visible )
flags |= WS_VISIBLE;
Internal::GetFullWindowSize( flags, exflags, window_setup.width, window_setup.height, w, h );
}
HWND handle = CreateWindowEx(
exflags,
window_initializer.GetWindowClass( ),
widetitle.c_str( ),
flags,
x, y,
w, h,
nullptr,
nullptr,
GetModuleHandle( nullptr ),
this
);
if( handle == nullptr )
return false;
#if defined MSGFLT_ALLOW
ChangeWindowMessageFilterEx( handle, WM_DROPFILES, MSGFLT_ALLOW, nullptr );
ChangeWindowMessageFilterEx( handle, WM_COPYDATA, MSGFLT_ALLOW, nullptr );
ChangeWindowMessageFilterEx( handle, 0x0049, MSGFLT_ALLOW, nullptr ); // WM_COPYGLOBALDATA
#endif
DWORD newflags = GetWindowLong( handle, GWL_STYLE );
DWORD newexflags = GetWindowLong( handle, GWL_EXSTYLE );
window_settings = window_setup;
window_internal = std::make_shared<Handle>( handle, window_setup );
window_internal->flags = newflags;
window_internal->exflags = newexflags;
window_internal->monitor = window_setup.monitor;
return true;
}
void Window::Close( )
{
if( !IsValid( ) )
return;
window_internal.reset( );
}
bool Window::ShouldClose( ) const
{
if( !IsValid( ) )
return false;
return should_close;
}
void Window::SetShouldClose( bool close )
{
if( !IsValid( ) )
return;
should_close = close;
}
bool Window::IsActive( ) const
{
return window_internal->context.IsActive( );
}
void Window::SetActive( bool active )
{
if( !IsValid( ) )
return;
window_internal->context.SetActive( active );
}
void Window::SetTitle( const std::string &title )
{
if( !IsValid( ) )
return;
std::wstring widetitle;
UTF16::FromUTF8( title.begin( ), title.end( ), std::back_inserter( widetitle ) );
SetWindowText( window_internal->handle.get( ), widetitle.c_str( ) );
}
void Window::SetIcon( uint32_t width, uint32_t height, const uint8_t *pixels )
{
std::vector<uint8_t> iconPixels( width * height * 4 );
for( std::size_t i = 0; i < iconPixels.size( ) / 4; ++i )
{
iconPixels[i * 4 + 0] = pixels[i * 4 + 2];
iconPixels[i * 4 + 1] = pixels[i * 4 + 1];
iconPixels[i * 4 + 2] = pixels[i * 4 + 0];
iconPixels[i * 4 + 3] = pixels[i * 4 + 3];
}
window_internal->icon.reset( CreateIcon( GetModuleHandle( nullptr ), width, height, 1, 32, nullptr, &iconPixels[0] ) );
if( window_internal->icon )
{
SendMessage( window_internal->handle.get( ), WM_SETICON, ICON_BIG, reinterpret_cast<LPARAM>( window_internal->icon.get( ) ) );
SendMessage( window_internal->handle.get( ), WM_SETICON, ICON_SMALL, reinterpret_cast<LPARAM>( window_internal->icon.get( ) ) );
}
}
Vector2i Window::GetSize( ) const
{
Vector2i size;
if( !IsValid( ) )
return size;
RECT area;
if( GetClientRect( window_internal->handle.get( ), &area ) == FALSE )
return size;
size.x = area.right;
size.y = area.bottom;
return size;
}
void Window::SetSize( const Vector2i &size )
{
if( !IsValid( ) )
return;
int32_t w = 0, h = 0;
Internal::GetFullWindowSize( window_internal->flags, window_internal->exflags, size.x, size.y, w, h );
SetWindowPos( window_internal->handle.get( ), HWND_TOP, 0, 0, w, h, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_NOZORDER );
}
Vector2i Window::GetFramebufferSize( ) const
{
return GetSize( );
}
Vector2i Window::GetPosition( ) const
{
Vector2i pos;
if( !IsValid( ) )
return pos;
POINT wpos = { 0, 0 };
if( ClientToScreen( window_internal->handle.get( ), &wpos ) == FALSE )
return pos;
pos.x = wpos.x;
pos.y = wpos.y;
return pos;
}
void Window::SetPosition( const Vector2i &pos )
{
if( !IsValid( ) )
return;
RECT rect = { pos.x, pos.y, pos.x, pos.y };
if( AdjustWindowRectEx( &rect, window_internal->flags, FALSE, window_internal->exflags ) == FALSE )
return;
SetWindowPos( window_internal->handle.get( ), nullptr, rect.left, rect.top, 0, 0, SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE );
}
Vector2i Window::GetCursorPos( ) const
{
Vector2i pos;
if( !IsValid( ) )
return pos;
POINT point;
if( ::GetCursorPos( &point ) == FALSE )
return pos;
if( ScreenToClient( window_internal->handle.get( ), &point ) == FALSE )
return pos;
pos.x = point.x;
pos.y = point.y;
return pos;
}
void Window::SetCursorPos( const Vector2i &pos )
{
if( !IsValid( ) )
return;
POINT wpos = { pos.x, pos.y };
if( ClientToScreen( window_internal->handle.get( ), &wpos ) == FALSE )
return;
::SetCursorPos( wpos.x, wpos.y );
}
std::string Window::GetClipboardString( ) const
{
std::string clipboard;
if( !IsValid( ) )
return clipboard;
if( IsClipboardFormatAvailable( CF_UNICODETEXT ) == FALSE )
return clipboard;
if( OpenClipboard( window_internal->handle.get( ) ) == FALSE )
return clipboard;
HANDLE string_handle = GetClipboardData( CF_UNICODETEXT );
if( string_handle == nullptr )
{
CloseClipboard( );
return clipboard;
}
wchar_t *widechar = reinterpret_cast<wchar_t *>( GlobalLock( string_handle ) );
GlobalUnlock( string_handle );
CloseClipboard( );
if( widechar == nullptr )
return clipboard;
UTF8::FromUTF16( widechar, widechar + wcslen( widechar ), std::back_inserter( clipboard ) );
return clipboard;
}
void Window::SetClipboardString( const std::string &text )
{
if( !IsValid( ) )
return;
std::wstring widetext;
UTF16::FromUTF8( text.begin( ), text.end( ), std::back_inserter( widetext ) );
size_t widesize = widetext.size( ) + 1;
HANDLE string_handle = GlobalAlloc( GMEM_MOVEABLE, widesize );
if( string_handle == nullptr )
return;
void *buffer = GlobalLock( string_handle );
if( buffer == nullptr )
return;
std::memcpy( buffer, widetext.c_str( ), widesize );
GlobalUnlock( string_handle );
if( OpenClipboard( window_internal->handle.get( ) ) == FALSE )
{
GlobalFree( string_handle );
return;
}
EmptyClipboard( );
SetClipboardData( CF_UNICODETEXT, string_handle );
CloseClipboard( );
}
CursorMode Window::GetCursorMode( ) const
{
if( !IsValid( ) )
return static_cast<CursorMode>( -1 );
return static_cast<CursorMode>( -1 );
}
void Window::SetCursorMode( CursorMode mode )
{
if( !IsValid( ) )
return;
switch( mode )
{
case CURSOR_MODE_DISABLED:
break;
case CURSOR_MODE_HIDDEN:
break;
case CURSOR_MODE_NORMAL:
break;
}
}
bool Window::GetStickyKeysActive( ) const
{
if( !IsValid( ) )
return false;
return window_internal->sticky_keys;
}
void Window::SetStickyKeysActive( bool active )
{
if( !IsValid( ) )
return;
window_internal->sticky_keys = active;
}
bool Window::GetStickyMouseButtonsActive( ) const
{
if( !IsValid( ) )
return false;
return window_internal->sticky_mouse;
}
void Window::SetStickyMouseButtonsActive( bool active )
{
if( !IsValid( ) )
return;
window_internal->sticky_mouse = active;
}
bool Window::IsKeyPressed( KeyCode code ) const
{
if( !IsValid( ) )
return false;
ButtonState state = window_internal->keyboard_buttons[code];
if( state == BUTTON_STICKY )
window_internal->keyboard_buttons[code] = BUTTON_RELEASED;
return state != BUTTON_RELEASED;
}
bool Window::IsMouseButtonPressed( MouseButton code ) const
{
if( !IsValid( ) )
return false;
ButtonState state = window_internal->mouse_buttons[code];
if( state == BUTTON_STICKY )
window_internal->mouse_buttons[code] = BUTTON_RELEASED;
return state != BUTTON_RELEASED;
}
Monitor Window::GetFullscreenMonitor( ) const
{
if( !IsValid( ) )
return Monitor( );
return window_internal->monitor;
}
bool Window::IsFocused( ) const
{
if( !IsValid( ) )
return false;
return GetForegroundWindow( ) == window_internal->handle.get( );
}
bool Window::IsResizable( ) const
{
if( !IsValid( ) )
return false;
return window_settings.resizable;
}
bool Window::IsDecorated( ) const
{
if( !IsValid( ) )
return false;
return window_settings.decorated;
}
bool Window::IsIconified( ) const
{
if( !IsValid( ) )
return false;
return IsIconic( window_internal->handle.get( ) ) == TRUE;
}
void Window::SetIconified( bool iconified )
{
if( !IsValid( ) )
return;
ShowWindow( window_internal->handle.get( ), iconified ? SW_MINIMIZE : SW_RESTORE );
}
bool Window::IsVisible( ) const
{
if( !IsValid( ) )
return false;
return IsWindowVisible( window_internal->handle.get( ) ) == TRUE;
}
void Window::SetVisible( bool visible )
{
if( !IsValid( ) )
return;
ShowWindow( window_internal->handle.get( ), visible ? SW_SHOWNORMAL : SW_HIDE );
}
bool Window::SwapBuffers( )
{
if( !IsValid( ) )
return false;
return ::SwapBuffers( window_internal->context.device_context ) == TRUE;
}
bool Window::SwapInterval( int32_t refreshes )
{
if( !IsValid( ) || wglSwapIntervalEXT == nullptr )
return false;
return wglSwapIntervalEXT( refreshes ) == TRUE;
}
void Window::PollEvents( )
{
MSG msg;
while( PeekMessage( &msg, nullptr, 0, 0, PM_REMOVE ) == TRUE )
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}
}
void Window::WaitEvents( )
{
WaitMessage( );
PollEvents( );
}
void Window::OnClose( ) { }
void Window::OnRefresh( ) { }
void Window::OnResize( const Vector2i & ) { }
void Window::OnReposition( const Vector2i & ) { }
void Window::OnFocus( bool ) { }
void Window::OnIconify( bool ) { }
void Window::OnFramebufferResize( const Vector2i & ) { }
void Window::OnKeyPress( int32_t, int32_t, int32_t, int32_t ) { }
void Window::OnCharacterInput( uint32_t ) { }
void Window::OnMousePress( int32_t, int32_t, int32_t ) { }
void Window::OnCursorReposition( const Vector2d & ) { }
void Window::OnCursorEnter( bool ) { }
void Window::OnScroll( const Vector2d & ) { }
} // namespace MultiLibrary
| 22.918338
| 148
| 0.69213
|
danielga
|
e984acd57e07bbd11e2f3a3f8bfcd4b8762ead7b
| 4,770
|
cpp
|
C++
|
Uno/GUI/ServerScreen.cpp
|
Wolchy/Uno
|
3ebb485b7e71b801cdd08d2cf97bbbb9579f44b5
|
[
"MIT"
] | null | null | null |
Uno/GUI/ServerScreen.cpp
|
Wolchy/Uno
|
3ebb485b7e71b801cdd08d2cf97bbbb9579f44b5
|
[
"MIT"
] | null | null | null |
Uno/GUI/ServerScreen.cpp
|
Wolchy/Uno
|
3ebb485b7e71b801cdd08d2cf97bbbb9579f44b5
|
[
"MIT"
] | null | null | null |
#include "ServerScreen.h"
ServerScreen::ServerScreen(Mya mya) : Screen::Screen("screenServer")
{
assets = new Assets(mya);
tv_port = new TextView(*assets->font, "Port: ", 5, 5, mya.getRenderer());
et_port = new EditText("9998", *assets->font, mya.getRenderer(), tv_port->tex.w + 5, 5);
btn_host = new Button("Host", *assets->font, mya.getRenderer(), 5, 35);
tv_player = new TextView(*assets->font, "Players: ", 5, 35, mya.getRenderer());
btn_startRound = new Button("Start Round", *assets->font, mya.getRenderer(), 5, 5);
network.isServer = true;
}
void ServerScreen::render(Mya mya)
{
if (!isOn) {
tv_port->render(mya.getRenderer());
et_port->butt->renderButton(mya.getRenderer());
btn_host->renderButton(mya.getRenderer());
}
else {
btn_startRound->renderButton(mya.getRenderer());
tv_player->render(mya.getRenderer());
for (TextView* tv : tv_players)
tv->render(mya.getRenderer());
}
}
void ServerScreen::update(Mya mya)
{
if (isOn) {
network.server_update();
if (network.hasNewMessage) {
SplitString ss;
for (std::string s : network._buffer) {
std::cout << s << std::endl;
std::vector<std::string> abba = ss.split(s, "&");
int id = std::stoi(abba[0]);
std::string o = abba[1];
std::vector<std::string> b = ss.split(o, "|");
if (b[0] == "regPlayer") {
Player p;
p.user = id;
p.name = b[1];
board.players.push_back(p);
tv_players.push_back(new TextView(*assets->font, p.name, 25, 65 + (tv_players.size() * 30), mya.getRenderer()));
}
if (b[0] == "ichewyou") {
Card c;
c.type = b[1];
c.color = b[2];
board.pile.deck.push_back(c);
bool aboola = false;
if (b[1] == "cardWild" || b[1] == "cardWild4") {
c.color = "null";
aboola = true;
}
if (b[1] == "cardPlusTwo") {
board.cycleUser();
std::string s = "fix1]";
for (int i = 0; i < 2; i++) {
SDL_Delay(20);
Card wah = board.deck.grabCard();
board.players[board.user].takeCard(wah);
s = s + "heresanude|" + c.type + "|" + c.color + "^";
}
network.server_sendMessage(board.user, s);
}
if (b[1] == "cardWild4") {
board.cycleUser();
std::string s = "fix1]";
for (int i = 0; i < 4; i++) {
SDL_Delay(20);
Card wah = board.deck.grabCard();
board.players[board.user].takeCard(wah);
s = s + "heresanude|" + c.type + "|" + c.color + "^";
}
network.server_sendMessage(board.user, s);
}
board.players[id].useCard(c);
if(!aboola)
board.pile.deck.push_back(c);
board.useCard(c);
//UNO check
if (board.players[id].cards.size() == 1)
network.sendMessage("UNO|" + board.players[id].name);
if (board.players[id].cards.size() == 0) {
network.sendMessage("WINNER|" + board.players[id].name);
}
board.cycleUser();
Card ncard = board.pile.deck[board.pile.deck.size()-1];//not what it looks like
SDL_Delay(20);
std::cout << std::to_string(board.user) << std::endl;
network.server_sendMessage(board.user, "urturnsir|" + ncard.type + "|" + ncard.color);
}
if (b[0] == "sendnudes") {
Card c = board.deck.grabCard();
board.players[id].takeCard(c);
SDL_Delay(20);
network.server_sendMessage(id, "heresanude|" + c.type + "|" + c.color);
board.cycleUser();
Card ncard = board.pile.deck[board.pile.deck.size() - 1];//not what it looks like
SDL_Delay(20);
std::cout << std::to_string(board.user) << std::endl;
network.server_sendMessage(board.user, "urturnsir|" + ncard.type + "|" + ncard.color);
}
}
network._buffer.clear();
network.hasNewMessage = false;
}
}
}
void ServerScreen::mouseKeyUp(Mya mya, SDL_MouseButtonEvent & k)
{
if (k.button == SDL_BUTTON_LEFT) {
if (!isOn) {
et_port->wasPressed(mouseX, mouseY);
if (btn_host->wasPressed(mouseX, mouseY)) {
isOn = true;
network.PORT = std::stoi(et_port->butt->tv->getText());
network.init();
}
}
else {
if (btn_startRound->wasPressed(mouseX, mouseY)) {
board.isThisRealLife = true;
board.start();
network.sendMessage("clean");
for (int i = 0; i < board.players.size(); i++) {
std::string s = "fix1]";
for (Card c : board.players[i].cards) {
s = s + "heresanude|" + c.type + "|" + c.color + "^";
}
SDL_Delay(25);
network.server_sendMessage(board.players[i].user, s);
}
SDL_Delay(25);
Card ncard = board.pile.deck[board.pile.deck.size() - 1];//not what it looks like
network.server_sendMessage(board.user, "urturnsir|" + ncard.type + "|" + ncard.color);
}
}
}
}
void ServerScreen::keyUp(Mya mya, Uint8 k)
{
if (!isOn)
et_port->handleKey(k, mya.getRenderer());
}
| 29.444444
| 117
| 0.592034
|
Wolchy
|
e9860e961e26f6900dea4d6d50ad1d4df42b20c0
| 564
|
cpp
|
C++
|
src/model/common/comtu.cpp
|
fanghaocong/GitlHEVCAnalyzer
|
1dbf3adca4822b0a55af03c7a7f49c92798c91d6
|
[
"Apache-2.0"
] | null | null | null |
src/model/common/comtu.cpp
|
fanghaocong/GitlHEVCAnalyzer
|
1dbf3adca4822b0a55af03c7a7f49c92798c91d6
|
[
"Apache-2.0"
] | null | null | null |
src/model/common/comtu.cpp
|
fanghaocong/GitlHEVCAnalyzer
|
1dbf3adca4822b0a55af03c7a7f49c92798c91d6
|
[
"Apache-2.0"
] | null | null | null |
#include "comtu.h"
ComTU::ComTU()
{
}
bool ComTU::isValid(int cuLeft, int cuTop, int cuRight, int cuBottom)
{
if ( m_iX < cuLeft || m_iX > cuRight )
{
return false;
}
if ( m_iY < cuTop || m_iY > cuBottom )
{
return false;
}
int tuRight = m_iX + m_iWidth - 1;
if (tuRight < m_iX || tuRight > cuRight )
{
return false;
}
int tuBottom = m_iY + m_iHeight - 1;
if (tuBottom < m_iY || tuBottom > cuBottom )
{
return false;
}
return true;
}
| 17.090909
| 70
| 0.5
|
fanghaocong
|
e9862a8d8d79bf90db88df6722c9342dbab39e70
| 11,842
|
hpp
|
C++
|
include/fiction/algorithms/network_transformation/fanout_substitution.hpp
|
ElderDelp/fiction
|
f16bf67bbfd94e5a3d5b6b5cd9cbce5275e44ce8
|
[
"MIT"
] | null | null | null |
include/fiction/algorithms/network_transformation/fanout_substitution.hpp
|
ElderDelp/fiction
|
f16bf67bbfd94e5a3d5b6b5cd9cbce5275e44ce8
|
[
"MIT"
] | null | null | null |
include/fiction/algorithms/network_transformation/fanout_substitution.hpp
|
ElderDelp/fiction
|
f16bf67bbfd94e5a3d5b6b5cd9cbce5275e44ce8
|
[
"MIT"
] | null | null | null |
//
// Created by marcel on 31.05.21.
//
#ifndef FICTION_FANOUT_SUBSTITUTION_HPP
#define FICTION_FANOUT_SUBSTITUTION_HPP
#include "fiction/algorithms/network_transformation/network_conversion.hpp"
#include "fiction/traits.hpp"
#include <mockturtle/algorithms/cleanup.hpp>
#include <mockturtle/traits.hpp>
#include <mockturtle/utils/node_map.hpp>
#include <mockturtle/views/topo_view.hpp>
#include <algorithm>
#include <cmath>
#include <deque>
#include <functional>
#include <queue>
#include <utility>
#include <vector>
#if (PROGRESS_BARS)
#include <mockturtle/utils/progress_bar.hpp>
#endif
namespace fiction
{
struct fanout_substitution_params
{
enum substitution_strategy
{
BREADTH,
DEPTH
};
/**
* Decomposition strategy (DEPTH vs. BREADTH).
*/
substitution_strategy strategy = BREADTH;
/**
* Maximum output degree of each fan-out node.
*/
uint32_t degree = 2ul;
/**
* Maximum number of outputs any gate is allowed to have before substitution applies.
*/
uint32_t threshold = 1ul;
};
namespace detail
{
template <typename NtkDest, typename NtkSrc>
class fanout_substitution_impl
{
public:
fanout_substitution_impl(const NtkSrc& src, const fanout_substitution_params p) :
ntk_topo{convert_network<NtkDest>(src)},
available_fanouts{ntk_topo},
ps{p}
{}
NtkDest run()
{
// initialize a network copy
auto init = mockturtle::initialize_copy_network<NtkDest>(ntk_topo);
auto substituted = init.first;
auto old2new = init.second;
ntk_topo.foreach_pi([this, &substituted, &old2new](const auto& pi)
{ generate_fanout_tree(substituted, pi, old2new); });
#if (PROGRESS_BARS)
// initialize a progress bar
mockturtle::progress_bar bar{static_cast<uint32_t>(ntk_topo.num_gates()), "[i] fanout substitution: |{0}|"};
#endif
ntk_topo.foreach_gate(
[&, this](const auto& n, [[maybe_unused]] auto i)
{
// gather children, but substitute fanouts where applicable
std::vector<mockturtle::signal<mockturtle::topo_view<NtkDest>>> children{};
ntk_topo.foreach_fanin(n,
[this, &old2new, &children, &substituted](const auto& f)
{
const auto fn = ntk_topo.get_node(f);
auto child = old2new[fn];
// constants do not need fanout trees
if (!ntk_topo.is_constant(fn))
{
child = get_fanout(substituted, fn, child);
}
children.push_back(child);
});
// clone the node with new children according to its depth
old2new[n] = substituted.clone_node(ntk_topo, n, children);
// generate the fanout tree for n
generate_fanout_tree(substituted, n, old2new);
#if (PROGRESS_BARS)
// update progress
bar(i);
#endif
});
// add primary outputs to finalize the network
ntk_topo.foreach_po(
[this, &old2new, &substituted](const auto& po)
{
const auto po_node = ntk_topo.get_node(po);
auto tgt_signal = old2new[po_node];
auto tgt_po = get_fanout(substituted, po_node, tgt_signal);
tgt_po = ntk_topo.is_complemented(po) ? substituted.create_not(tgt_signal) : tgt_po;
substituted.create_po(tgt_po);
});
// restore signal names if applicable
fiction::restore_names(ntk_topo, substituted, old2new);
return substituted;
}
private:
mockturtle::topo_view<NtkDest> ntk_topo;
using old2new_map = mockturtle::node_map<mockturtle::signal<NtkDest>, mockturtle::topo_view<NtkDest>>;
using old2new_queue_map =
mockturtle::node_map<std::queue<mockturtle::signal<NtkDest>>, mockturtle::topo_view<NtkDest>>;
old2new_queue_map available_fanouts;
const fanout_substitution_params ps;
void generate_fanout_tree(NtkDest& substituted, const mockturtle::node<NtkSrc>& n, const old2new_map& old2new)
{
// skip fanout tree generation if n is a proper fanout node
if constexpr (has_is_fanout_v<NtkDest>)
{
if (ntk_topo.is_fanout(n) && ntk_topo.fanout_size(n) <= ps.degree)
return;
}
auto num_fanouts = static_cast<uint32_t>(
std::ceil(static_cast<double>(std::max(
static_cast<int32_t>(ntk_topo.fanout_size(n)) - static_cast<int32_t>(ps.threshold), 0)) /
static_cast<double>(std::max(static_cast<int32_t>(ps.degree) - 1, 1))));
auto child = old2new[n];
if (num_fanouts == 0)
return;
if (ps.strategy == fanout_substitution_params::substitution_strategy::DEPTH)
{
std::queue<mockturtle::signal<NtkDest>> q{};
for (auto i = 0u; i < num_fanouts; ++i)
{
child = substituted.create_buf(child);
q.push(child);
}
available_fanouts[n] = q;
}
else if (ps.strategy == fanout_substitution_params::substitution_strategy::BREADTH)
{
std::queue<mockturtle::signal<NtkDest>> q{{child}};
for (auto f = 0ul; f < num_fanouts; ++f)
{
child = q.front();
q.pop();
child = substituted.create_buf(child);
for (auto i = 0u; i < ps.degree; ++i) q.push(child);
}
available_fanouts[n] = q;
}
}
mockturtle::signal<NtkDest> get_fanout(const NtkDest& substituted, const mockturtle::node<NtkSrc>& n,
mockturtle::signal<NtkDest>& child)
{
if (substituted.fanout_size(child) >= ps.threshold)
{
if (auto fanouts = available_fanouts[n]; !fanouts.empty())
{
// find non-overfull fanout node
do {
child = fanouts.front();
if (substituted.fanout_size(child) >= ps.degree)
fanouts.pop();
else
break;
} while (true);
}
}
return child;
}
};
template <typename Ntk>
class is_fanout_substituted_impl
{
public:
is_fanout_substituted_impl(const Ntk& src, fanout_substitution_params p) : ntk{src}, ps{p} {}
bool run()
{
ntk.foreach_node(
[this](const auto& n)
{
// skip constants
if (ntk.is_constant(n))
return substituted;
// check degree of fanout nodes
if constexpr (fiction::has_is_fanout_v<Ntk>)
{
if (ntk.is_fanout(n))
{
if (ntk.fanout_size(n) > ps.degree)
{
substituted = false;
}
return substituted;
}
}
// check threshold of non-fanout nodes
if (ntk.fanout_size(n) > ps.threshold)
{
substituted = false;
}
return substituted;
});
return substituted;
}
private:
const Ntk& ntk;
const fanout_substitution_params ps;
bool substituted = true;
};
} // namespace detail
/**
* Substitutes high-output degrees in a logic network with fanout nodes that compute the identity function. For this
* purpose, create_buf is utilized. Therefore, NtkDest should support identity nodes. If it does not, no new nodes will
* in fact be created. In either case, the returned network will be logically equivalent to the input one.
*
* The process is rather naive with two possible strategies to pick from: breath-first and depth-first. The former
* creates partially balanced fanout trees while the latter leads to fanout chains. Further parameterization includes
* thresholds for the maximum number of output each node and fanout is allowed to have.
*
* The returned network is newly created from scratch because its type NtkDest may differ from NtkSrc.
*
* NOTE: The physical design algorithms natively provided in fiction do not require their input networks to be
* fanout-substituted. If that is necessary, they will do it themselves. Providing already substituted networks does
* however allows for the control over maximum output degrees.
*
* @tparam NtkDest Type of the returned logic network.
* @tparam NtkSrc Type of the input logic network.
* @param ntk_src The input logic network.
* @param ps Parameters.
* @return A fanout-substituted logic network of type NtkDest that is logically equivalent to ntk_src.
*/
template <typename NtkDest, typename NtkSrc>
NtkDest fanout_substitution(const NtkSrc& ntk_src, fanout_substitution_params ps = {})
{
static_assert(mockturtle::is_network_type_v<NtkSrc>, "NtkSrc is not a network type");
static_assert(mockturtle::is_network_type_v<NtkDest>, "NtkDest is not a network type");
static_assert(mockturtle::has_is_constant_v<NtkDest>, "NtkSrc does not implement the is_constant function");
static_assert(mockturtle::has_create_pi_v<NtkDest>, "NtkDest does not implement the create_pi function");
static_assert(mockturtle::has_create_not_v<NtkDest>, "NtkDest does not implement the create_not function");
static_assert(mockturtle::has_create_po_v<NtkDest>, "NtkDest does not implement the create_po function");
static_assert(mockturtle::has_create_buf_v<NtkDest>, "NtkDest does not implement the create_buf function");
static_assert(mockturtle::has_clone_node_v<NtkDest>, "NtkDest does not implement the clone_node function");
static_assert(mockturtle::has_fanout_size_v<NtkDest>, "NtkDest does not implement the fanout_size function");
static_assert(mockturtle::has_foreach_gate_v<NtkDest>, "NtkDest does not implement the foreach_gate function");
static_assert(mockturtle::has_foreach_fanin_v<NtkDest>, "NtkDest does not implement the foreach_fanin function");
static_assert(mockturtle::has_foreach_po_v<NtkDest>, "NtkDest does not implement the foreach_po function");
detail::fanout_substitution_impl<NtkDest, NtkSrc> p{ntk_src, ps};
auto result = p.run();
return result;
}
/**
* Checks if a logic network is properly fanout-substituted with regard to the provided parameters, i.e., if no node
* exceeds the specified fanout limits.
*
* @tparam Ntk Logic network type.
* @param ntk The logic network to check.
* @param ps Parameters.
* @return True iff ntk is properly fanout-substituted with regard to ps.
*/
template <typename Ntk>
bool is_fanout_substituted(const Ntk& ntk, fanout_substitution_params ps = {}) noexcept
{
static_assert(mockturtle::is_network_type_v<Ntk>, "NtkSrc is not a network type");
static_assert(mockturtle::has_foreach_gate_v<Ntk>, "Ntk does not implement the foreach_gate function");
static_assert(mockturtle::has_fanout_size_v<Ntk>, "Ntk does not implement the fanout_size function");
detail::is_fanout_substituted_impl<Ntk> p{ntk, ps};
auto result = p.run();
return result;
}
} // namespace fiction
#endif // FICTION_FANOUT_SUBSTITUTION_HPP
| 35.561562
| 119
| 0.613748
|
ElderDelp
|
e988506ac6657e8bea19a368918fbb2a90b88158
| 1,400
|
hh
|
C++
|
source/format/KBWPointCluster.hh
|
KUNPL/KEBII
|
7feba36bb2ac2812c0dec21f5e3f3a0dcc1c8e39
|
[
"MIT"
] | null | null | null |
source/format/KBWPointCluster.hh
|
KUNPL/KEBII
|
7feba36bb2ac2812c0dec21f5e3f3a0dcc1c8e39
|
[
"MIT"
] | null | null | null |
source/format/KBWPointCluster.hh
|
KUNPL/KEBII
|
7feba36bb2ac2812c0dec21f5e3f3a0dcc1c8e39
|
[
"MIT"
] | null | null | null |
#ifndef KBWPOINTCLUSTER_HH
#define KBWPOINTCLUSTER_HH
#ifdef ACTIVATE_EVE
#include "TEveElement.h"
#include "TEvePointSet.h"
#endif
#include "KBWPoint.hh"
#include <vector>
#include <cmath>
/* Cluster of TWPoint.
* Adding KBWPoint to KBWPointCluster will calculate mean, covariance.
* MeanError(i,j) returns covariance/weight_sum.
*/
class KBWPointCluster : public KBWPoint
{
public:
KBWPointCluster();
virtual ~KBWPointCluster();
virtual void Print(Option_t *option = "") const;
virtual void Clear(Option_t *option = "");
virtual void Copy (TObject &object) const;
void Add(KBWPoint wp);
void Remove(KBWPoint wp);
void SetCov(Double_t cov[][3]);
void SetCov(Int_t i, Int_t j, Double_t cov);
void SetPosSigma(Double_t sigx, Double_t sigy, Double_t sigz);
void SetPosSigma(TVector3 sig);
TVector3 GetPosSigma();
Double_t StandardDeviation(Int_t i) { return sqrt(fCov[i][i]); }
Double_t Covariance(Int_t i, Int_t j) { return fCov[i][j]; }
Double_t MeanError(Int_t i, Int_t j) { return fCov[i][j]/fW; }
#ifdef ACTIVATE_EVE
virtual bool DrawByDefault();
virtual bool IsEveSet();
virtual TEveElement *CreateEveElement();
virtual void SetEveElement(TEveElement *element);
virtual void AddToEveSet(TEveElement *eveSet);
#endif
protected:
Double_t fCov[3][3];
ClassDef(KBWPointCluster, 1)
};
#endif
| 24.561404
| 70
| 0.707143
|
KUNPL
|
e9890a4a899fe4210cd202c733f2a7fea34326f7
| 2,060
|
cpp
|
C++
|
src/feata/util/shared_lib.cpp
|
master-clown/ofeata
|
306cbc3a402551fb62b3925d23a2d4f63f60d525
|
[
"MIT"
] | 1
|
2021-08-30T13:51:42.000Z
|
2021-08-30T13:51:42.000Z
|
src/feata/util/shared_lib.cpp
|
master-clown/ofeata
|
306cbc3a402551fb62b3925d23a2d4f63f60d525
|
[
"MIT"
] | null | null | null |
src/feata/util/shared_lib.cpp
|
master-clown/ofeata
|
306cbc3a402551fb62b3925d23a2d4f63f60d525
|
[
"MIT"
] | 1
|
2021-08-30T13:51:35.000Z
|
2021-08-30T13:51:35.000Z
|
#include "util/shared_lib.hpp"
#include "util/filesys.hpp"
#include "defs/arch.hpp"
#if defined(FEATA_SYSTEM_WIN)
#include <Windows.h>
#elif defined(FEATA_SYSTEM_UNIX)
#include <dlfcn.h>
#endif
namespace util
{
SharedLib::SharedLib(const String& file_name,
const bool local_search)
{
Load(file_name, local_search);
}
SharedLib::~SharedLib()
{
Free();
}
SharedLib::SharedLib(SharedLib&& lib)
{
handle_ = lib.handle_;
lib.handle_ = nullptr;
}
SharedLib& SharedLib::operator=(SharedLib&& lib)
{
handle_ = lib.handle_;
lib.handle_ = nullptr;
return *this;
}
bool SharedLib::Load(const String& file_name, const bool local_search)
{
if(local_search && !util::filesys::IsFileExists(file_name))
return false;
if(IsOpen())
Free();
#if defined(FEATA_SYSTEM_WIN)
const auto ws { file_name.toStdWString() };
handle_ = LoadLibraryW(ws.c_str());
#elif defined(FEATA_SYSTEM_UNIX)
const auto str { file_name.toStdString() };
handle_ = dlopen(str.c_str(), RTLD_LAZY);
#endif
return IsOpen();
}
void SharedLib::Free()
{
if(!IsOpen())
return;
#if defined(FEATA_SYSTEM_WIN)
FreeLibrary(static_cast<HMODULE>(handle_));
#elif defined(FEATA_SYSTEM_UNIX)
dlclose(handle_);
#endif
handle_ = nullptr;
}
void* SharedLib::FindSymbol(const String& name)
{
if(!IsOpen())
return nullptr;
const auto str { name.toStdString() };
#if defined(FEATA_SYSTEM_WIN)
return (void*)GetProcAddress(static_cast<HMODULE>(handle_), str.c_str());
#elif defined(FEATA_SYSTEM_UNIX)
return dlsym(handle_, str.c_str());
#endif
}
bool SharedLib::IsOpen() const { return handle_ != nullptr; }
shlib_t SharedLib::GetHandle() const { return handle_; }
}
| 23.146067
| 82
| 0.581553
|
master-clown
|
e991b46d1a4e8d9dd727ad89a3fc06d1a7d53e0f
| 544
|
cpp
|
C++
|
BOJ19941/BOJ19941_src.cpp
|
wjoh0315/BOJSolutions4
|
1a5910f6dda33c58fdcb806ed0a2806a4f5d764a
|
[
"MIT"
] | null | null | null |
BOJ19941/BOJ19941_src.cpp
|
wjoh0315/BOJSolutions4
|
1a5910f6dda33c58fdcb806ed0a2806a4f5d764a
|
[
"MIT"
] | null | null | null |
BOJ19941/BOJ19941_src.cpp
|
wjoh0315/BOJSolutions4
|
1a5910f6dda33c58fdcb806ed0a2806a4f5d764a
|
[
"MIT"
] | null | null | null |
//https://www.acmicpc.net/problem/19941
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n, k;
cin >> n >> k;
string pos;
cin >> pos;
int j = 0;
int cnt = 0;
for (int i=0; i < n; i++)
{
if (pos[i] == 'H') continue;
for (j=max(j, i-k); j < min(n, i+k+1); j++)
{
if (pos[j] == 'P') continue;
j++;
cnt++;
break;
}
}
cout << cnt << '\n';
return 0;
}
| 17.548387
| 51
| 0.420956
|
wjoh0315
|
e993ca58efd042faa8667ada9364d12b35a1e14b
| 17,027
|
cpp
|
C++
|
Ambit/Source/Ambit/Actors/Spawners/SpawnerBase.cpp
|
brhook-aws/aws-ambit-scenario-designer-ue4
|
4f1fea7d4ac27a4fad792607a1d6dbf2aa237747
|
[
"Apache-2.0"
] | null | null | null |
Ambit/Source/Ambit/Actors/Spawners/SpawnerBase.cpp
|
brhook-aws/aws-ambit-scenario-designer-ue4
|
4f1fea7d4ac27a4fad792607a1d6dbf2aa237747
|
[
"Apache-2.0"
] | null | null | null |
Ambit/Source/Ambit/Actors/Spawners/SpawnerBase.cpp
|
brhook-aws/aws-ambit-scenario-designer-ue4
|
4f1fea7d4ac27a4fad792607a1d6dbf2aa237747
|
[
"Apache-2.0"
] | null | null | null |
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "SpawnerBase.h"
#include "EngineUtils.h"
#include "Components/BillboardComponent.h"
#include "Kismet/GameplayStatics.h"
#include "Kismet/KismetMathLibrary.h"
#include "Ambit/AmbitModule.h"
#include "Ambit/Actors/SpawnedObjectConfigs/SpawnedObjectConfig.h"
#include "Ambit/Mode/Constant.h"
#include "Ambit/Utils/AmbitSpawnerCollisionHelpers.h"
#include "Ambit/Utils/UserMetricsSubsystem.h"
#include "AmbitUtils/JsonHelpers.h"
#include <AmbitUtils/MenuHelpers.h>
// Sets default values
ASpawnerBase::ASpawnerBase()
{
IconComponent = CreateDefaultSubobject<UBillboardComponent>("Icon");
}
void ASpawnerBase::GenerateSpawnedObjectConfiguration()
{
GenerateSpawnedObjectConfiguration(RandomSeed);
}
void ASpawnerBase::GenerateSpawnedObjectConfiguration(int32 Seed)
{
USpawnedObjectConfig* Config = NewObject<USpawnedObjectConfig>();
const int32 OriginalSeed = RandomSeed;
RandomSeed = Seed;
Config->SpawnedObjects = GenerateActors();
DestroyGeneratedActors();
RandomSeed = OriginalSeed;
auto FinalConfig = TScriptInterface<IConfigJsonSerializer>(Config);
OnSpawnedObjectConfigCompleted.ExecuteIfBound(FinalConfig, true);
}
template <typename Struct>
TSharedPtr<Struct> ASpawnerBase::GetConfiguration() const
{
TSharedPtr<Struct> Config = MakeShareable(new Struct);
Config->SpawnerLocation = this->GetActorLocation();
Config->SpawnerRotation = this->GetActorRotation();
Config->MatchBy = MatchBy;
Config->SurfaceNamePattern = SurfaceNamePattern;
Config->SurfaceTags = SurfaceTags;
Config->DensityMin = DensityMin;
Config->DensityMax = DensityMax;
Config->RotationMin = RotationMin;
Config->RotationMax = RotationMax;
Config->bAddPhysics = bAddPhysics;
TArray<TSubclassOf<AActor>> ActorsToSpawnClean;
for (const auto& Actor : ActorsToSpawn)
{
ActorsToSpawnClean.AddUnique(Actor);
}
Config->ActorsToSpawn = ActorsToSpawnClean;
Config->bRemoveOverlaps = bRemoveOverlaps;
Config->RandomSeed = RandomSeed;
return Config;
}
template <typename Struct>
void ASpawnerBase::Configure(const TSharedPtr<Struct>& Config)
{
MatchBy = Config->MatchBy;
SurfaceNamePattern = Config->SurfaceNamePattern;
SurfaceTags = Config->SurfaceTags;
DensityMin = Config->DensityMin;
DensityMax = Config->DensityMax;
RotationMin = Config->RotationMin;
RotationMax = Config->RotationMax;
bAddPhysics = Config->bAddPhysics;
ActorsToSpawn = Config->ActorsToSpawn;
bRemoveOverlaps = Config->bRemoveOverlaps;
RandomSeed = Config->RandomSeed;
}
// Called when the game starts or when spawned
void ASpawnerBase::BeginPlay()
{
Super::BeginPlay();
GenerateActors();
const TSharedRef<FJsonObject> MetricContextData = MakeShareable(new FJsonObject);
MetricContextData->SetNumberField(UserMetrics::AmbitSpawner::KAmbitSpawnerSpawnNumberContextData,
SpawnedActors.Num());
GEngine->GetEngineSubsystem<UUserMetricsSubsystem>()->Track(UserMetrics::AmbitSpawner::KAmbitSpawnerRunEvent,
UserMetrics::AmbitSpawner::KAmbitSpawnerNameSpace,
MetricContextData);
}
void ASpawnerBase::PostActorCreated()
{
//Currently there is a bug that this function could be called twice in UE engine
if (!HasAllFlags(RF_Transient))
{
GEngine->GetEngineSubsystem<UUserMetricsSubsystem>()->Track(UserMetrics::AmbitSpawner::KAmbitSpawnerPlacedEvent,
UserMetrics::AmbitSpawner::KAmbitSpawnerNameSpace);
}
}
void ASpawnerBase::DestroyGeneratedActors()
{
// Remove previously created actors.
for (AActor* Actor : SpawnedActors)
{
// This class does not explicitly retain strong references to the actors in the
// SpawnedActors array. Therefore, we must check for null pointers to
// accommodate cases where the actor no longer exists.
if (IsValid(Actor))
{
Actor->Destroy();
}
}
SpawnedActors.Empty();
}
bool ASpawnerBase::HasActorsToSpawn() const
{
return ActorsToSpawn.Num() > 0 && !ActorsToSpawn.Contains(nullptr);
}
void ASpawnerBase::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
{
Super::PostEditChangeProperty(PropertyChangedEvent);
PostEditErrorFixes();
}
bool ASpawnerBase::AreParametersValid() const
{
if (ActorsToSpawn.Num() > 0)
{
for (const auto& Actor : ActorsToSpawn)
{
if (!IsValid(Actor))
{
const FString& Message = FString::Printf(
TEXT("An actor to spawn in the array of %s is not specified, which is not allowed."),
*this->GetActorLabel());
FMenuHelpers::DisplayMessagePopup(Message, "Warning");
return false;
}
}
}
else
{
const FString& Message = FString::Printf(
TEXT("The array ActorsToSpawn of %s is not specified, which is not allowed."), *this->GetActorLabel());
FMenuHelpers::DisplayMessagePopup(Message, "Warning");
return false;
}
return AreMinMaxValid();
}
bool ASpawnerBase::AreMinMaxValid() const
{
if (RotationMin > RotationMax)
{
const FString& Message = FString::Printf(
TEXT(
"The minimum degree of rotation is greater than the maximum degree of rotation in %s, which is not allowed."),
*this->GetActorLabel());
FMenuHelpers::DisplayMessagePopup(Message, "Warning");
return false;
}
if (DensityMin > DensityMax)
{
const FString& Message = FString::Printf(
TEXT("The minimum density is greater than the maximum density in %s, which is not allowed."),
*this->GetActorLabel());
FMenuHelpers::DisplayMessagePopup(Message, "Warning");
return false;
}
return true;
}
void ASpawnerBase::PostEditErrorFixes()
{
if (bRestrictToOneRotation && RotationMax != RotationMin)
{
RotationMax = RotationMin;
}
const float DensityWarningLimit = 3.f;
const float PracticalMax = FMath::Max(DensityMin, DensityMax);
if (PracticalMax > DensityWarningLimit)
{
// TODO: This text should eventually support localization.
const FString& Message = FString::Printf(
TEXT(
"You've set a maximum density of %s items per square meter in %s, which is pretty high. Be aware that high density values may cause performance problems when you run your simulation."),
*FString::SanitizeFloat(PracticalMax), *this->GetActorLabel());
FMenuHelpers::DisplayMessagePopup(Message, "Warning");
}
}
void ASpawnerBase::CleanAndSetUpActorsToSpawn(TArray<TSubclassOf<AActor>>& OutArray,
TMap<FString, TArray<FCollisionResponseTemplate>>& OutMap)
{
OutMap.Empty();
OutArray.Empty();
for (const TSubclassOf<AActor>& Actor : ActorsToSpawn)
{
const int32 LastIndex = OutArray.Num() - 1;
// AddUnique returns the Index of the provided Actor
// if it already exists in the array; if not,
// AddUnique adds Actor to the end of the array;
// this checks if the actor already existed, and if so,
// notifies the user that a duplicate was found in the array
if (OutArray.AddUnique(Actor) <= LastIndex)
{
UE_LOG(LogAmbit, Warning, TEXT("%s: Duplicate of %s found in ActorsToSpawn. Ignoring..."),
*this->GetActorLabel(), *Actor->GetName());
}
else
{
TArray<UStaticMeshComponent*> StaticMeshComponents;
AmbitSpawnerCollisionHelpers::FindDefaultStaticMeshComponents(Actor.Get(), StaticMeshComponents);
AmbitSpawnerCollisionHelpers::StoreCollisionProfiles(Actor->GetPathName(), StaticMeshComponents, OutMap);
AmbitSpawnerCollisionHelpers::SetCollisionForAllStaticMeshComponents(StaticMeshComponents, bRemoveOverlaps);
}
}
}
void ASpawnerBase::SpawnActorsAtTransforms(const TArray<FTransform>& Transforms,
TMap<FString, TArray<FTransform>>& OutMap)
{
OutMap.Empty();
Random.Initialize(RandomSeed);
UWorld* World = GetWorld();
TArray<AActor*> AllActors;
UGameplayStatics::GetAllActorsOfClass(World, AActor::StaticClass(), AllActors);
TMap<FString, TArray<bool>> OriginalGenerateOverlapEventsMap;
for (AActor* Actor : AllActors)
{
TArray<bool> OriginalGenerateOverlapEvents;
// Set GenerateOverlapEvents to true while Play mode is active
AmbitSpawnerCollisionHelpers::SetGenerateOverlapEventsForActor(Actor, OriginalGenerateOverlapEvents);
// Store original overlap event settings
OriginalGenerateOverlapEventsMap.Add(Actor->GetName(), OriginalGenerateOverlapEvents);
}
// Remove duplicates from array and set up collision profiles for ActorsToSpawn
TArray<TSubclassOf<AActor>> ActorsToSpawnClean;
TMap<FString, TArray<FCollisionResponseTemplate>> OriginalCollisionProfiles;
CleanAndSetUpActorsToSpawn(ActorsToSpawnClean, OriginalCollisionProfiles);
for (const FTransform& Transform : Transforms)
{
FVector SpawnedActorLocation = Transform.GetLocation();
const FRotator& SpawnedActorRotation = Transform.Rotator();
int32 RandomIndex = 0;
if (ActorsToSpawnClean.Num() > 1)
{
RandomIndex = Random.RandRange(0, ActorsToSpawnClean.Num() - 1);
}
// ActorsToSpawnClean will always have at least one element;
// it contains all elements of a non-empty ActorsToSpawn (with duplicates removed)
TSubclassOf<AActor> ChosenActor = ActorsToSpawnClean[RandomIndex];
FActorSpawnParameters ActorSpawnParams;
ActorSpawnParams.SpawnCollisionHandlingOverride =
ESpawnActorCollisionHandlingMethod::AdjustIfPossibleButDontSpawnIfColliding;
// Try to spawn actor at location
// will do nothing if it would overlap with any other spawned actor
AActor* SpawnedActor = World->SpawnActor(ChosenActor.Get(), &SpawnedActorLocation, &SpawnedActorRotation,
ActorSpawnParams);
// Try to spawn actor again at offset
// if bAddPhysics is true and first spawn attempt failed
// in order to potentially "stack"
// TODO: If Add Physics is turned on, should AmbitSpawners spawn obstacles one at a time?
// TODO: Unreal Engine does not necessarily have a set order in which Actors are processed,
// so this may be non-deterministic
if (!IsValid(SpawnedActor) && bAddPhysics)
{
FVector LocationOffset(0, 0, 100);
SpawnedActorLocation = SpawnedActorLocation + LocationOffset;
SpawnedActor = World->SpawnActor(ChosenActor.Get(), &SpawnedActorLocation, &SpawnedActorRotation,
ActorSpawnParams);
}
if (IsValid(SpawnedActor))
{
UStaticMeshComponent* PhysicsComponent = SpawnedActor->FindComponentByClass<UStaticMeshComponent>();
if (bAddPhysics)
{
// Set mobility
PhysicsComponent->SetMobility(EComponentMobility::Movable);
// If actor could not be spawned at surface level,
// we want to sweep it to the surface and check for collision along the way
// before enabling SimulatePhysics
if (SpawnedActor->GetActorLocation() != Transform.GetLocation())
{
PhysicsComponent->SetWorldLocation(Transform.GetLocation(), true, nullptr,
ETeleportType::ResetPhysics);
}
}
// Check for any overlaps and verify that overlaps are not beyond the surface
// of the overlapping actor
TArray<UPrimitiveComponent*> OverlappingComponents;
SpawnedActor->GetOverlappingComponents(OverlappingComponents);
for (UPrimitiveComponent* OverlappingComponent : OverlappingComponents)
{
if (AmbitSpawnerCollisionHelpers::IsPenetratingOverlap(OverlappingComponent, SpawnedActor))
{
SpawnedActor->Destroy();
break;
}
}
// Makes sure that SpawnedActor did not have any overlaps
// and was not destroyed
if (IsValid(SpawnedActor))
{
// Set the collision profile(s) of this ActorToSpawn instance
// to the original collision profile(s) of the class default object
TArray<UStaticMeshComponent*> StaticMeshComponents;
SpawnedActor->GetComponents<UStaticMeshComponent>(StaticMeshComponents);
const FString& PathName = ChosenActor.Get()->GetPathName();
const TArray<FCollisionResponseTemplate> OriginalResponses = OriginalCollisionProfiles.FindChecked(
PathName);
for (int i = 0; i < StaticMeshComponents.Num(); i++)
{
UStaticMeshComponent* StaticMeshComponent = StaticMeshComponents[i];
FCollisionResponseTemplate Response = OriginalResponses[i];
// Restores the collision profile of this specific actor
// to match expected collision behavior of the asset
// Maintains ObjectType as "AmbitSpawnerObstacle"
// to ensure no overlaps occur with future spawned objects
StaticMeshComponent->SetCollisionResponseToChannels(Response.ResponseToChannels);
StaticMeshComponent->SetCollisionEnabled(Response.CollisionEnabled);
// Maintains that "Overlappable" Obstacles
// are continued to be recognized as such
// This is set to Overlap to ensure that
// actors (not spawned by AmbitSpawners)
// will respond to the spawned obstacle correctly
// if it is supposed to generate overlap events.
// The AmbitSpawner Overlap detection/destruction
// will ignore AMBIT_SPAWNER_OVERLAP typed objects.
StaticMeshComponent->SetCollisionResponseToChannel(ECC_GameTraceChannel2, // AMBIT_SPAWNED_OVERLAP
ECR_Overlap);
}
// Turn on Simulate Physics if bAddPhysics is true
if (bAddPhysics && !PhysicsComponent->IsSimulatingPhysics())
{
PhysicsComponent->SetSimulatePhysics(true);
}
// Add FTransform to map for SDF export
SpawnedActors.Push(SpawnedActor);
TArray<FTransform> PathNameTransforms;
if (bAddPhysics)
{
PathNameTransforms.Add(PhysicsComponent->GetComponentTransform());
}
else
{
PathNameTransforms.Add(SpawnedActor->GetActorTransform());
}
// Update map array value to include new transform
if (OutMap.Find(PathName) != nullptr)
{
PathNameTransforms.Append(OutMap.FindAndRemoveChecked(PathName));
}
OutMap.Add(PathName, PathNameTransforms);
}
}
}
// Restore CDO collision profiles to original
AmbitSpawnerCollisionHelpers::ResetCollisionProfiles(OriginalCollisionProfiles, ActorsToSpawnClean);
for (const auto& Actor : AllActors)
{
TArray<bool> OriginalGenerateOverlapEvents = OriginalGenerateOverlapEventsMap.FindChecked(Actor->GetName());
// Reset GenerateOverlapEvents
AmbitSpawnerCollisionHelpers::SetGenerateOverlapEventsForActor(Actor, OriginalGenerateOverlapEvents, true);
}
}
| 41.32767
| 201
| 0.646914
|
brhook-aws
|
e996ad96f208f01c2890faf6e7faf6925d2b8fa2
| 1,351
|
cpp
|
C++
|
cpp/src/test.cpp
|
cnloni/othello
|
f80f190e505b6a4dd2b2bd49054651dbea4f00fa
|
[
"Apache-2.0"
] | 1
|
2021-01-16T03:34:06.000Z
|
2021-01-16T03:34:06.000Z
|
cpp/src/test.cpp
|
cnloni/othello
|
f80f190e505b6a4dd2b2bd49054651dbea4f00fa
|
[
"Apache-2.0"
] | null | null | null |
cpp/src/test.cpp
|
cnloni/othello
|
f80f190e505b6a4dd2b2bd49054651dbea4f00fa
|
[
"Apache-2.0"
] | null | null | null |
#include <iostream>
#include "b16.hpp"
#include "b36.hpp"
#include "board.hpp"
using namespace std;
int execute16(uint64_t bp, uint64_t wp, int turn, int alpha, int beta) {
Board<B16> board;
int result = board.getBestResult(bp, wp, turn, alpha, beta);
cout << board.getFinalBoardString() << endl;
cout << "Initial = " << board.getInitialNodeString() << endl;
cout << "Final = " << board.getFinalNodeString() << endl;
cout << "Result = " << result << endl;
cout << "Moves = " << board.getMoveListString() << endl;
cout << "Count = " << board.getNodeCount() << endl;
cout << "Elapsed = " << board.getElapsedTime() << endl;
return 0;
}
int execute36(uint64_t bp, uint64_t wp, int turn, int alpha, int beta) {
Board<B36> board;
int result = board.getBestResult(bp, wp, turn, alpha, beta);
cout << board.getFinalBoardString() << endl;
cout << "Initial = " << board.getInitialNodeString() << endl;
cout << "Final = " << board.getFinalNodeString() << endl;
cout << "Result = " << result << endl;
cout << "Moves = " << board.getMoveListString() << endl;
cout << "Count = " << board.getNodeCount() << endl;
cout << "Elapsed = " << board.getElapsedTime() << endl;
return 0;
}
int main() {
execute16(B16::INITIAL_BP, B16::INITIAL_WP, 0, -(B16::CELLS+1), B16::CELLS+1);
//14駒から
execute36(551158016, 69329408, 0, -6, -2);
return 0;
}
| 32.166667
| 79
| 0.640266
|
cnloni
|
e9a1ff9570260abd9e652b8d41c348b4db46b0a4
| 18,729
|
cpp
|
C++
|
test/unittest/regextest.cpp
|
lktrgl/rapidjson
|
f09bafdd7e5eac006ea1d926a16a5b941ea71d9a
|
[
"BSD-3-Clause"
] | null | null | null |
test/unittest/regextest.cpp
|
lktrgl/rapidjson
|
f09bafdd7e5eac006ea1d926a16a5b941ea71d9a
|
[
"BSD-3-Clause"
] | null | null | null |
test/unittest/regextest.cpp
|
lktrgl/rapidjson
|
f09bafdd7e5eac006ea1d926a16a5b941ea71d9a
|
[
"BSD-3-Clause"
] | null | null | null |
// Tencent is pleased to support the open source community by making RapidJSON available.
//
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
//
// Licensed under the MIT License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy of the License at
//
// http://opensource.org/licenses/MIT
//
// Unless required by applicable law or agreed to in writing, software distributed
// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.
#include "unittest.h"
#include "rapidjson/internal/regex.h"
using namespace rapidjson::internal;
TEST ( Regex, Single )
{
Regex re ( "a" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "a" ) );
EXPECT_FALSE ( rs.Match ( "" ) );
EXPECT_FALSE ( rs.Match ( "b" ) );
}
TEST ( Regex, Concatenation )
{
Regex re ( "abc" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "abc" ) );
EXPECT_FALSE ( rs.Match ( "" ) );
EXPECT_FALSE ( rs.Match ( "a" ) );
EXPECT_FALSE ( rs.Match ( "b" ) );
EXPECT_FALSE ( rs.Match ( "ab" ) );
EXPECT_FALSE ( rs.Match ( "abcd" ) );
}
TEST ( Regex, Alternation1 )
{
Regex re ( "abab|abbb" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "abab" ) );
EXPECT_TRUE ( rs.Match ( "abbb" ) );
EXPECT_FALSE ( rs.Match ( "" ) );
EXPECT_FALSE ( rs.Match ( "ab" ) );
EXPECT_FALSE ( rs.Match ( "ababa" ) );
EXPECT_FALSE ( rs.Match ( "abb" ) );
EXPECT_FALSE ( rs.Match ( "abbbb" ) );
}
TEST ( Regex, Alternation2 )
{
Regex re ( "a|b|c" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "a" ) );
EXPECT_TRUE ( rs.Match ( "b" ) );
EXPECT_TRUE ( rs.Match ( "c" ) );
EXPECT_FALSE ( rs.Match ( "" ) );
EXPECT_FALSE ( rs.Match ( "aa" ) );
EXPECT_FALSE ( rs.Match ( "ab" ) );
}
TEST ( Regex, Parenthesis1 )
{
Regex re ( "(ab)c" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "abc" ) );
EXPECT_FALSE ( rs.Match ( "" ) );
EXPECT_FALSE ( rs.Match ( "a" ) );
EXPECT_FALSE ( rs.Match ( "b" ) );
EXPECT_FALSE ( rs.Match ( "ab" ) );
EXPECT_FALSE ( rs.Match ( "abcd" ) );
}
TEST ( Regex, Parenthesis2 )
{
Regex re ( "a(bc)" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "abc" ) );
EXPECT_FALSE ( rs.Match ( "" ) );
EXPECT_FALSE ( rs.Match ( "a" ) );
EXPECT_FALSE ( rs.Match ( "b" ) );
EXPECT_FALSE ( rs.Match ( "ab" ) );
EXPECT_FALSE ( rs.Match ( "abcd" ) );
}
TEST ( Regex, Parenthesis3 )
{
Regex re ( "(a|b)(c|d)" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "ac" ) );
EXPECT_TRUE ( rs.Match ( "ad" ) );
EXPECT_TRUE ( rs.Match ( "bc" ) );
EXPECT_TRUE ( rs.Match ( "bd" ) );
EXPECT_FALSE ( rs.Match ( "" ) );
EXPECT_FALSE ( rs.Match ( "ab" ) );
EXPECT_FALSE ( rs.Match ( "cd" ) );
}
TEST ( Regex, ZeroOrOne1 )
{
Regex re ( "a?" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "" ) );
EXPECT_TRUE ( rs.Match ( "a" ) );
EXPECT_FALSE ( rs.Match ( "aa" ) );
}
TEST ( Regex, ZeroOrOne2 )
{
Regex re ( "a?b" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "b" ) );
EXPECT_TRUE ( rs.Match ( "ab" ) );
EXPECT_FALSE ( rs.Match ( "a" ) );
EXPECT_FALSE ( rs.Match ( "aa" ) );
EXPECT_FALSE ( rs.Match ( "bb" ) );
EXPECT_FALSE ( rs.Match ( "ba" ) );
}
TEST ( Regex, ZeroOrOne3 )
{
Regex re ( "ab?" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "a" ) );
EXPECT_TRUE ( rs.Match ( "ab" ) );
EXPECT_FALSE ( rs.Match ( "b" ) );
EXPECT_FALSE ( rs.Match ( "aa" ) );
EXPECT_FALSE ( rs.Match ( "bb" ) );
EXPECT_FALSE ( rs.Match ( "ba" ) );
}
TEST ( Regex, ZeroOrOne4 )
{
Regex re ( "a?b?" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "" ) );
EXPECT_TRUE ( rs.Match ( "a" ) );
EXPECT_TRUE ( rs.Match ( "b" ) );
EXPECT_TRUE ( rs.Match ( "ab" ) );
EXPECT_FALSE ( rs.Match ( "aa" ) );
EXPECT_FALSE ( rs.Match ( "bb" ) );
EXPECT_FALSE ( rs.Match ( "ba" ) );
EXPECT_FALSE ( rs.Match ( "abc" ) );
}
TEST ( Regex, ZeroOrOne5 )
{
Regex re ( "a(ab)?b" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "ab" ) );
EXPECT_TRUE ( rs.Match ( "aabb" ) );
EXPECT_FALSE ( rs.Match ( "aab" ) );
EXPECT_FALSE ( rs.Match ( "abb" ) );
}
TEST ( Regex, ZeroOrMore1 )
{
Regex re ( "a*" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "" ) );
EXPECT_TRUE ( rs.Match ( "a" ) );
EXPECT_TRUE ( rs.Match ( "aa" ) );
EXPECT_FALSE ( rs.Match ( "b" ) );
EXPECT_FALSE ( rs.Match ( "ab" ) );
}
TEST ( Regex, ZeroOrMore2 )
{
Regex re ( "a*b" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "b" ) );
EXPECT_TRUE ( rs.Match ( "ab" ) );
EXPECT_TRUE ( rs.Match ( "aab" ) );
EXPECT_FALSE ( rs.Match ( "" ) );
EXPECT_FALSE ( rs.Match ( "bb" ) );
}
TEST ( Regex, ZeroOrMore3 )
{
Regex re ( "a*b*" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "" ) );
EXPECT_TRUE ( rs.Match ( "a" ) );
EXPECT_TRUE ( rs.Match ( "aa" ) );
EXPECT_TRUE ( rs.Match ( "b" ) );
EXPECT_TRUE ( rs.Match ( "bb" ) );
EXPECT_TRUE ( rs.Match ( "ab" ) );
EXPECT_TRUE ( rs.Match ( "aabb" ) );
EXPECT_FALSE ( rs.Match ( "ba" ) );
}
TEST ( Regex, ZeroOrMore4 )
{
Regex re ( "a(ab)*b" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "ab" ) );
EXPECT_TRUE ( rs.Match ( "aabb" ) );
EXPECT_TRUE ( rs.Match ( "aababb" ) );
EXPECT_FALSE ( rs.Match ( "" ) );
EXPECT_FALSE ( rs.Match ( "aa" ) );
}
TEST ( Regex, OneOrMore1 )
{
Regex re ( "a+" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "a" ) );
EXPECT_TRUE ( rs.Match ( "aa" ) );
EXPECT_FALSE ( rs.Match ( "" ) );
EXPECT_FALSE ( rs.Match ( "b" ) );
EXPECT_FALSE ( rs.Match ( "ab" ) );
}
TEST ( Regex, OneOrMore2 )
{
Regex re ( "a+b" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "ab" ) );
EXPECT_TRUE ( rs.Match ( "aab" ) );
EXPECT_FALSE ( rs.Match ( "" ) );
EXPECT_FALSE ( rs.Match ( "b" ) );
}
TEST ( Regex, OneOrMore3 )
{
Regex re ( "a+b+" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "ab" ) );
EXPECT_TRUE ( rs.Match ( "aab" ) );
EXPECT_TRUE ( rs.Match ( "abb" ) );
EXPECT_TRUE ( rs.Match ( "aabb" ) );
EXPECT_FALSE ( rs.Match ( "" ) );
EXPECT_FALSE ( rs.Match ( "b" ) );
EXPECT_FALSE ( rs.Match ( "ba" ) );
}
TEST ( Regex, OneOrMore4 )
{
Regex re ( "a(ab)+b" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "aabb" ) );
EXPECT_TRUE ( rs.Match ( "aababb" ) );
EXPECT_FALSE ( rs.Match ( "" ) );
EXPECT_FALSE ( rs.Match ( "ab" ) );
}
TEST ( Regex, QuantifierExact1 )
{
Regex re ( "ab{3}c" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "abbbc" ) );
EXPECT_FALSE ( rs.Match ( "ac" ) );
EXPECT_FALSE ( rs.Match ( "abc" ) );
EXPECT_FALSE ( rs.Match ( "abbc" ) );
EXPECT_FALSE ( rs.Match ( "abbbbc" ) );
}
TEST ( Regex, QuantifierExact2 )
{
Regex re ( "a(bc){3}d" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "abcbcbcd" ) );
EXPECT_FALSE ( rs.Match ( "ad" ) );
EXPECT_FALSE ( rs.Match ( "abcd" ) );
EXPECT_FALSE ( rs.Match ( "abcbcd" ) );
EXPECT_FALSE ( rs.Match ( "abcbcbcbcd" ) );
}
TEST ( Regex, QuantifierExact3 )
{
Regex re ( "a(b|c){3}d" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "abbbd" ) );
EXPECT_TRUE ( rs.Match ( "acccd" ) );
EXPECT_TRUE ( rs.Match ( "abcbd" ) );
EXPECT_FALSE ( rs.Match ( "ad" ) );
EXPECT_FALSE ( rs.Match ( "abbd" ) );
EXPECT_FALSE ( rs.Match ( "accccd" ) );
EXPECT_FALSE ( rs.Match ( "abbbbd" ) );
}
TEST ( Regex, QuantifierMin1 )
{
Regex re ( "ab{3,}c" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "abbbc" ) );
EXPECT_TRUE ( rs.Match ( "abbbbc" ) );
EXPECT_TRUE ( rs.Match ( "abbbbbc" ) );
EXPECT_FALSE ( rs.Match ( "ac" ) );
EXPECT_FALSE ( rs.Match ( "abc" ) );
EXPECT_FALSE ( rs.Match ( "abbc" ) );
}
TEST ( Regex, QuantifierMin2 )
{
Regex re ( "a(bc){3,}d" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "abcbcbcd" ) );
EXPECT_TRUE ( rs.Match ( "abcbcbcbcd" ) );
EXPECT_FALSE ( rs.Match ( "ad" ) );
EXPECT_FALSE ( rs.Match ( "abcd" ) );
EXPECT_FALSE ( rs.Match ( "abcbcd" ) );
}
TEST ( Regex, QuantifierMin3 )
{
Regex re ( "a(b|c){3,}d" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "abbbd" ) );
EXPECT_TRUE ( rs.Match ( "acccd" ) );
EXPECT_TRUE ( rs.Match ( "abcbd" ) );
EXPECT_TRUE ( rs.Match ( "accccd" ) );
EXPECT_TRUE ( rs.Match ( "abbbbd" ) );
EXPECT_FALSE ( rs.Match ( "ad" ) );
EXPECT_FALSE ( rs.Match ( "abbd" ) );
}
TEST ( Regex, QuantifierMinMax1 )
{
Regex re ( "ab{3,5}c" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "abbbc" ) );
EXPECT_TRUE ( rs.Match ( "abbbbc" ) );
EXPECT_TRUE ( rs.Match ( "abbbbbc" ) );
EXPECT_FALSE ( rs.Match ( "ac" ) );
EXPECT_FALSE ( rs.Match ( "abc" ) );
EXPECT_FALSE ( rs.Match ( "abbc" ) );
EXPECT_FALSE ( rs.Match ( "abbbbbbc" ) );
}
TEST ( Regex, QuantifierMinMax2 )
{
Regex re ( "a(bc){3,5}d" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "abcbcbcd" ) );
EXPECT_TRUE ( rs.Match ( "abcbcbcbcd" ) );
EXPECT_TRUE ( rs.Match ( "abcbcbcbcbcd" ) );
EXPECT_FALSE ( rs.Match ( "ad" ) );
EXPECT_FALSE ( rs.Match ( "abcd" ) );
EXPECT_FALSE ( rs.Match ( "abcbcd" ) );
EXPECT_FALSE ( rs.Match ( "abcbcbcbcbcbcd" ) );
}
TEST ( Regex, QuantifierMinMax3 )
{
Regex re ( "a(b|c){3,5}d" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "abbbd" ) );
EXPECT_TRUE ( rs.Match ( "acccd" ) );
EXPECT_TRUE ( rs.Match ( "abcbd" ) );
EXPECT_TRUE ( rs.Match ( "accccd" ) );
EXPECT_TRUE ( rs.Match ( "abbbbd" ) );
EXPECT_TRUE ( rs.Match ( "acccccd" ) );
EXPECT_TRUE ( rs.Match ( "abbbbbd" ) );
EXPECT_FALSE ( rs.Match ( "ad" ) );
EXPECT_FALSE ( rs.Match ( "abbd" ) );
EXPECT_FALSE ( rs.Match ( "accccccd" ) );
EXPECT_FALSE ( rs.Match ( "abbbbbbd" ) );
}
// Issue538
TEST ( Regex, QuantifierMinMax4 )
{
Regex re ( "a(b|c){0,3}d" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "ad" ) );
EXPECT_TRUE ( rs.Match ( "abd" ) );
EXPECT_TRUE ( rs.Match ( "acd" ) );
EXPECT_TRUE ( rs.Match ( "abbd" ) );
EXPECT_TRUE ( rs.Match ( "accd" ) );
EXPECT_TRUE ( rs.Match ( "abcd" ) );
EXPECT_TRUE ( rs.Match ( "abbbd" ) );
EXPECT_TRUE ( rs.Match ( "acccd" ) );
EXPECT_FALSE ( rs.Match ( "abbbbd" ) );
EXPECT_FALSE ( rs.Match ( "add" ) );
EXPECT_FALSE ( rs.Match ( "accccd" ) );
EXPECT_FALSE ( rs.Match ( "abcbcd" ) );
}
// Issue538
TEST ( Regex, QuantifierMinMax5 )
{
Regex re ( "a(b|c){0,}d" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "ad" ) );
EXPECT_TRUE ( rs.Match ( "abd" ) );
EXPECT_TRUE ( rs.Match ( "acd" ) );
EXPECT_TRUE ( rs.Match ( "abbd" ) );
EXPECT_TRUE ( rs.Match ( "accd" ) );
EXPECT_TRUE ( rs.Match ( "abcd" ) );
EXPECT_TRUE ( rs.Match ( "abbbd" ) );
EXPECT_TRUE ( rs.Match ( "acccd" ) );
EXPECT_TRUE ( rs.Match ( "abbbbd" ) );
EXPECT_TRUE ( rs.Match ( "accccd" ) );
EXPECT_TRUE ( rs.Match ( "abcbcd" ) );
EXPECT_FALSE ( rs.Match ( "add" ) );
EXPECT_FALSE ( rs.Match ( "aad" ) );
}
#define EURO "\xE2\x82\xAC" // "\xE2\x82\xAC" is UTF-8 rsquence of Euro sign U+20AC
TEST ( Regex, Unicode )
{
Regex re ( "a" EURO "+b" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "a" EURO "b" ) );
EXPECT_TRUE ( rs.Match ( "a" EURO EURO "b" ) );
EXPECT_FALSE ( rs.Match ( "a?b" ) );
EXPECT_FALSE ( rs.Match ( "a" EURO "\xAC" "b" ) ); // unaware of UTF-8 will match
}
TEST ( Regex, AnyCharacter )
{
Regex re ( "." );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "a" ) );
EXPECT_TRUE ( rs.Match ( "b" ) );
EXPECT_TRUE ( rs.Match ( EURO ) );
EXPECT_FALSE ( rs.Match ( "" ) );
EXPECT_FALSE ( rs.Match ( "aa" ) );
}
TEST ( Regex, CharacterRange1 )
{
Regex re ( "[abc]" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "a" ) );
EXPECT_TRUE ( rs.Match ( "b" ) );
EXPECT_TRUE ( rs.Match ( "c" ) );
EXPECT_FALSE ( rs.Match ( "" ) );
EXPECT_FALSE ( rs.Match ( "`" ) );
EXPECT_FALSE ( rs.Match ( "d" ) );
EXPECT_FALSE ( rs.Match ( "aa" ) );
}
TEST ( Regex, CharacterRange2 )
{
Regex re ( "[^abc]" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "`" ) );
EXPECT_TRUE ( rs.Match ( "d" ) );
EXPECT_FALSE ( rs.Match ( "a" ) );
EXPECT_FALSE ( rs.Match ( "b" ) );
EXPECT_FALSE ( rs.Match ( "c" ) );
EXPECT_FALSE ( rs.Match ( "" ) );
EXPECT_FALSE ( rs.Match ( "aa" ) );
}
TEST ( Regex, CharacterRange3 )
{
Regex re ( "[a-c]" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "a" ) );
EXPECT_TRUE ( rs.Match ( "b" ) );
EXPECT_TRUE ( rs.Match ( "c" ) );
EXPECT_FALSE ( rs.Match ( "" ) );
EXPECT_FALSE ( rs.Match ( "`" ) );
EXPECT_FALSE ( rs.Match ( "d" ) );
EXPECT_FALSE ( rs.Match ( "aa" ) );
}
TEST ( Regex, CharacterRange4 )
{
Regex re ( "[^a-c]" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "`" ) );
EXPECT_TRUE ( rs.Match ( "d" ) );
EXPECT_FALSE ( rs.Match ( "a" ) );
EXPECT_FALSE ( rs.Match ( "b" ) );
EXPECT_FALSE ( rs.Match ( "c" ) );
EXPECT_FALSE ( rs.Match ( "" ) );
EXPECT_FALSE ( rs.Match ( "aa" ) );
}
TEST ( Regex, CharacterRange5 )
{
Regex re ( "[-]" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "-" ) );
EXPECT_FALSE ( rs.Match ( "" ) );
EXPECT_FALSE ( rs.Match ( "a" ) );
}
TEST ( Regex, CharacterRange6 )
{
Regex re ( "[a-]" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "a" ) );
EXPECT_TRUE ( rs.Match ( "-" ) );
EXPECT_FALSE ( rs.Match ( "" ) );
EXPECT_FALSE ( rs.Match ( "`" ) );
EXPECT_FALSE ( rs.Match ( "b" ) );
}
TEST ( Regex, CharacterRange7 )
{
Regex re ( "[-a]" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "a" ) );
EXPECT_TRUE ( rs.Match ( "-" ) );
EXPECT_FALSE ( rs.Match ( "" ) );
EXPECT_FALSE ( rs.Match ( "`" ) );
EXPECT_FALSE ( rs.Match ( "b" ) );
}
TEST ( Regex, CharacterRange8 )
{
Regex re ( "[a-zA-Z0-9]*" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "Milo" ) );
EXPECT_TRUE ( rs.Match ( "MT19937" ) );
EXPECT_TRUE ( rs.Match ( "43" ) );
EXPECT_FALSE ( rs.Match ( "a_b" ) );
EXPECT_FALSE ( rs.Match ( "!" ) );
}
TEST ( Regex, Search )
{
Regex re ( "abc" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Search ( "abc" ) );
EXPECT_TRUE ( rs.Search ( "_abc" ) );
EXPECT_TRUE ( rs.Search ( "abc_" ) );
EXPECT_TRUE ( rs.Search ( "_abc_" ) );
EXPECT_TRUE ( rs.Search ( "__abc__" ) );
EXPECT_TRUE ( rs.Search ( "abcabc" ) );
EXPECT_FALSE ( rs.Search ( "a" ) );
EXPECT_FALSE ( rs.Search ( "ab" ) );
EXPECT_FALSE ( rs.Search ( "bc" ) );
EXPECT_FALSE ( rs.Search ( "cba" ) );
}
TEST ( Regex, Search_BeginAnchor )
{
Regex re ( "^abc" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Search ( "abc" ) );
EXPECT_TRUE ( rs.Search ( "abc_" ) );
EXPECT_TRUE ( rs.Search ( "abcabc" ) );
EXPECT_FALSE ( rs.Search ( "_abc" ) );
EXPECT_FALSE ( rs.Search ( "_abc_" ) );
EXPECT_FALSE ( rs.Search ( "a" ) );
EXPECT_FALSE ( rs.Search ( "ab" ) );
EXPECT_FALSE ( rs.Search ( "bc" ) );
EXPECT_FALSE ( rs.Search ( "cba" ) );
}
TEST ( Regex, Search_EndAnchor )
{
Regex re ( "abc$" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Search ( "abc" ) );
EXPECT_TRUE ( rs.Search ( "_abc" ) );
EXPECT_TRUE ( rs.Search ( "abcabc" ) );
EXPECT_FALSE ( rs.Search ( "abc_" ) );
EXPECT_FALSE ( rs.Search ( "_abc_" ) );
EXPECT_FALSE ( rs.Search ( "a" ) );
EXPECT_FALSE ( rs.Search ( "ab" ) );
EXPECT_FALSE ( rs.Search ( "bc" ) );
EXPECT_FALSE ( rs.Search ( "cba" ) );
}
TEST ( Regex, Search_BothAnchor )
{
Regex re ( "^abc$" );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Search ( "abc" ) );
EXPECT_FALSE ( rs.Search ( "" ) );
EXPECT_FALSE ( rs.Search ( "a" ) );
EXPECT_FALSE ( rs.Search ( "b" ) );
EXPECT_FALSE ( rs.Search ( "ab" ) );
EXPECT_FALSE ( rs.Search ( "abcd" ) );
}
TEST ( Regex, Escape )
{
const char* s = "\\^\\$\\|\\(\\)\\?\\*\\+\\.\\[\\]\\{\\}\\\\\\f\\n\\r\\t\\v[\\b][\\[][\\]]";
Regex re ( s );
ASSERT_TRUE ( re.IsValid() );
RegexSearch rs ( re );
EXPECT_TRUE ( rs.Match ( "^$|()?*+.[]{}\\\x0C\n\r\t\x0B\b[]" ) );
EXPECT_FALSE ( rs.Match ( s ) ); // Not escaping
}
TEST ( Regex, Invalid )
{
#define TEST_INVALID(s) \
{\
Regex re(s);\
EXPECT_FALSE(re.IsValid());\
}
TEST_INVALID ( "" );
TEST_INVALID ( "a|" );
TEST_INVALID ( "()" );
TEST_INVALID ( "(" );
TEST_INVALID ( ")" );
TEST_INVALID ( "(a))" );
TEST_INVALID ( "(a|)" );
TEST_INVALID ( "(a||b)" );
TEST_INVALID ( "(|b)" );
TEST_INVALID ( "?" );
TEST_INVALID ( "*" );
TEST_INVALID ( "+" );
TEST_INVALID ( "{" );
TEST_INVALID ( "{}" );
TEST_INVALID ( "a{a}" );
TEST_INVALID ( "a{0}" );
TEST_INVALID ( "a{-1}" );
TEST_INVALID ( "a{}" );
// TEST_INVALID("a{0,}"); // Support now
TEST_INVALID ( "a{,0}" );
TEST_INVALID ( "a{1,0}" );
TEST_INVALID ( "a{-1,0}" );
TEST_INVALID ( "a{-1,1}" );
TEST_INVALID ( "a{4294967296}" ); // overflow of unsigned
TEST_INVALID ( "a{1a}" );
TEST_INVALID ( "[" );
TEST_INVALID ( "[]" );
TEST_INVALID ( "[^]" );
TEST_INVALID ( "[\\a]" );
TEST_INVALID ( "\\a" );
#undef TEST_INVALID
}
TEST ( Regex, Issue538 )
{
Regex re ( "^[0-9]+(\\\\.[0-9]+){0,2}" );
EXPECT_TRUE ( re.IsValid() );
}
TEST ( Regex, Issue583 )
{
Regex re ( "[0-9]{99999}" );
ASSERT_TRUE ( re.IsValid() );
}
#undef EURO
| 27.182874
| 94
| 0.567729
|
lktrgl
|
e9a2baf6896da4c6ee2705cc615b91f091062f2f
| 295
|
hpp
|
C++
|
include/sge/initializers/sdl-image.hpp
|
smaudet/sdl-game-engine
|
e49a001541c6e30c0cc0ee6aa04ee6ba2b5f4af7
|
[
"MIT"
] | 75
|
2017-07-19T14:00:55.000Z
|
2022-01-10T21:50:44.000Z
|
include/sge/initializers/sdl-image.hpp
|
smaudet/sdl-game-engine
|
e49a001541c6e30c0cc0ee6aa04ee6ba2b5f4af7
|
[
"MIT"
] | 3
|
2017-04-05T00:57:33.000Z
|
2018-11-14T07:48:40.000Z
|
include/sge/initializers/sdl-image.hpp
|
smaudet/sdl-game-engine
|
e49a001541c6e30c0cc0ee6aa04ee6ba2b5f4af7
|
[
"MIT"
] | 12
|
2017-09-19T09:51:48.000Z
|
2021-12-05T18:11:53.000Z
|
#ifndef __SGE_SDL_IMAGE_INIT_HPP
#define __SGE_SDL_IMAGE_INIT_HPP
#include <sge/init.hpp>
namespace sge
{
class SDLImageInitializer : public Initializer
{
public:
void do_initialize();
void do_shutdown();
};
}
#endif /* __SGE_SDL_IMAGE_INIT_HPP */
| 17.352941
| 50
| 0.667797
|
smaudet
|
e9a7332b6220e9db2bf28f1d62a71dbe5f91d530
| 3,711
|
hpp
|
C++
|
include/ccbase/platform/bswap.hpp
|
adityaramesh/ccbase
|
595e1416aab3cc8bc976aad9bb3e262c7d11e3b2
|
[
"BSD-3-Clause-Clear"
] | 8
|
2015-01-08T05:44:43.000Z
|
2021-05-11T15:54:17.000Z
|
include/ccbase/platform/bswap.hpp
|
adityaramesh/ccbase
|
595e1416aab3cc8bc976aad9bb3e262c7d11e3b2
|
[
"BSD-3-Clause-Clear"
] | 1
|
2016-01-31T08:48:53.000Z
|
2016-01-31T08:54:28.000Z
|
include/ccbase/platform/bswap.hpp
|
adityaramesh/ccbase
|
595e1416aab3cc8bc976aad9bb3e262c7d11e3b2
|
[
"BSD-3-Clause-Clear"
] | 2
|
2015-03-26T11:08:18.000Z
|
2016-01-30T03:28:06.000Z
|
/*
** File Name: bswap.hpp
** Author: Aditya Ramesh
** Date: 04/14/2014
** Contact: _@adityaramesh.com
*/
#ifndef Z2C1D91E3_6CC1_415A_A95D_65604B557F77
#define Z2C1D91E3_6CC1_415A_A95D_65604B557F77
#include <algorithm>
#include <cstdint>
#include <type_traits>
#include <ccbase/platform/attributes.hpp>
#include <ccbase/platform/identification.hpp>
#if !(PLATFORM_COMPILER == PLATFORM_COMPILER_CLANG || \
PLATFORM_COMPILER == PLATFORM_COMPILER_GCC || \
PLATFORM_COMPILER == PLATFORM_COMPILER_ICC)
#warning "Unsupported compiler for cc::bswap."
#warning "The operation will not use intrinsics."
#endif
namespace cc {
CC_ALWAYS_INLINE constexpr
int8_t bswap(int8_t x) noexcept
{ return x; }
CC_ALWAYS_INLINE constexpr
int16_t bswap(int16_t x) noexcept
{
#if PLATFORM_COMPILER == PLATFORM_COMPILER_CLANG || \
PLATFORM_COMPILER == PLATFORM_COMPILER_GCC || \
PLATFORM_COMPILER == PLATFORM_COMPILER_ICC
return __builtin_bswap16(x);
#else
return ((x & 0xFF) << 8) | ((x & 0xFF00) >> 8);
#endif
}
CC_ALWAYS_INLINE constexpr
int32_t bswap(int32_t x) noexcept
{
#if PLATFORM_COMPILER == PLATFORM_COMPILER_CLANG || \
PLATFORM_COMPILER == PLATFORM_COMPILER_GCC || \
PLATFORM_COMPILER == PLATFORM_COMPILER_ICC
return __builtin_bswap32(x);
#else
return ((x & 0xFF) << 24) |
((x & 0xFF00) << 8) |
((x & 0xFF0000) >> 8) |
((x & 0xFF0000000) >> 24);
#endif
}
CC_ALWAYS_INLINE constexpr
int64_t bswap(int64_t x) noexcept
{
#if PLATFORM_COMPILER == PLATFORM_COMPILER_CLANG || \
PLATFORM_COMPILER == PLATFORM_COMPILER_GCC || \
PLATFORM_COMPILER == PLATFORM_COMPILER_ICC
return __builtin_bswap64(x);
#else
return ((x & 0xFF) << 56) |
((x & 0xFF00) << 40) |
((x & 0xFF0000) << 24) |
((x & 0xFF000000) << 8) |
((x & 0xFF00000000) >> 8) |
((x & 0xFF0000000000) >> 24) |
((x & 0xFF000000000000) >> 40) |
((x & 0xFF00000000000000) >> 56);
#endif
}
CC_ALWAYS_INLINE constexpr
uint8_t bswap(uint8_t x) noexcept
{ return x; }
CC_ALWAYS_INLINE constexpr
uint16_t bswap(uint16_t x) noexcept
{
#if PLATFORM_COMPILER == PLATFORM_COMPILER_CLANG || \
PLATFORM_COMPILER == PLATFORM_COMPILER_GCC || \
PLATFORM_COMPILER == PLATFORM_COMPILER_ICC
return __builtin_bswap16(x);
#else
return ((x & 0xFF) << 8) | ((x & 0xFF00) >> 8);
#endif
}
CC_ALWAYS_INLINE constexpr
uint32_t bswap(uint32_t x) noexcept
{
#if PLATFORM_COMPILER == PLATFORM_COMPILER_CLANG || \
PLATFORM_COMPILER == PLATFORM_COMPILER_GCC || \
PLATFORM_COMPILER == PLATFORM_COMPILER_ICC
return __builtin_bswap32(x);
#else
return ((x & 0xFF) << 24) |
((x & 0xFF00) << 8) |
((x & 0xFF0000) >> 8) |
((x & 0xFF0000000) >> 24);
#endif
}
CC_ALWAYS_INLINE constexpr
uint64_t bswap(uint64_t x) noexcept
{
#if PLATFORM_COMPILER == PLATFORM_COMPILER_CLANG || \
PLATFORM_COMPILER == PLATFORM_COMPILER_GCC || \
PLATFORM_COMPILER == PLATFORM_COMPILER_ICC
return __builtin_bswap64(x);
#else
return ((x & 0xFF) << 56) |
((x & 0xFF00) << 40) |
((x & 0xFF0000) << 24) |
((x & 0xFF000000) << 8) |
((x & 0xFF00000000) >> 8) |
((x & 0xFF0000000000) >> 24) |
((x & 0xFF000000000000) >> 40) |
((x & 0xFF00000000000000) >> 56);
#endif
}
CC_ALWAYS_INLINE
auto bswap(float x) noexcept ->
std::enable_if<sizeof(float) == 4, float>::type
{
auto buf = uint32_t{};
std::copy_n((char*)&x, sizeof(float), (char*)&buf);
return bswap(buf);
}
CC_ALWAYS_INLINE
auto bswap(double x) noexcept ->
std::enable_if<sizeof(double) == 8, double>::type
{
auto buf = uint64_t{};
std::copy_n((char*)&x, sizeof(double), (char*)&buf);
return bswap(buf);
}
}
#endif
| 25.244898
| 55
| 0.665319
|
adityaramesh
|
e9a9db49b0ab476f52bff58296aa37f1b8e47a89
| 5,313
|
hpp
|
C++
|
libs/boost_1_72_0/boost/spirit/home/support/char_encoding/standard_wide.hpp
|
henrywarhurst/matrix
|
317a2a7c35c1c7e3730986668ad2270dc19809ef
|
[
"BSD-3-Clause"
] | null | null | null |
libs/boost_1_72_0/boost/spirit/home/support/char_encoding/standard_wide.hpp
|
henrywarhurst/matrix
|
317a2a7c35c1c7e3730986668ad2270dc19809ef
|
[
"BSD-3-Clause"
] | null | null | null |
libs/boost_1_72_0/boost/spirit/home/support/char_encoding/standard_wide.hpp
|
henrywarhurst/matrix
|
317a2a7c35c1c7e3730986668ad2270dc19809ef
|
[
"BSD-3-Clause"
] | null | null | null |
/*=============================================================================
Copyright (c) 2001-2011 Hartmut Kaiser
Copyright (c) 2001-2011 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/
#if !defined(BOOST_SPIRIT_STANDARD_WIDE_NOVEMBER_10_2006_0913AM)
#define BOOST_SPIRIT_STANDARD_WIDE_NOVEMBER_10_2006_0913AM
#if defined(_MSC_VER)
#pragma once
#endif
#include <cwctype>
#include <string>
#include <boost/assert.hpp>
#include <boost/cstdint.hpp>
#include <boost/spirit/home/support/assert_msg.hpp>
namespace boost {
namespace spirit {
namespace traits {
template <std::size_t N> struct wchar_t_size {
BOOST_SPIRIT_ASSERT_MSG(N == 1 || N == 2 || N == 4,
not_supported_size_of_wchar_t, ());
};
template <> struct wchar_t_size<1> {
enum { mask = 0xff };
};
template <> struct wchar_t_size<2> {
enum { mask = 0xffff };
};
template <> struct wchar_t_size<4> {
enum { mask = 0xffffffff };
};
} // namespace traits
} // namespace spirit
} // namespace boost
namespace boost {
namespace spirit {
namespace char_encoding {
///////////////////////////////////////////////////////////////////////////
// Test characters for specified conditions (using std wchar_t functions)
///////////////////////////////////////////////////////////////////////////
struct standard_wide {
typedef wchar_t char_type;
typedef wchar_t classify_type;
template <typename Char>
static typename std::char_traits<Char>::int_type to_int_type(Char ch) {
return std::char_traits<Char>::to_int_type(ch);
}
template <typename Char>
static Char to_char_type(typename std::char_traits<Char>::int_type ch) {
return std::char_traits<Char>::to_char_type(ch);
}
static bool ischar(int ch) {
// we have to watch out for sign extensions (casting is there to
// silence certain compilers complaining about signed/unsigned
// mismatch)
return (std::size_t(0) ==
std::size_t(ch &
~traits::wchar_t_size<sizeof(wchar_t)>::mask) ||
std::size_t(~0) ==
std::size_t(ch |
traits::wchar_t_size<sizeof(wchar_t)>::mask)) !=
0; // any wchar_t, but no other bits set
}
// *** Note on assertions: The precondition is that the calls to
// these functions do not violate the required range of ch (type int)
// which is that strict_ischar(ch) should be true. It is the
// responsibility of the caller to make sure this precondition is not
// violated.
static bool strict_ischar(int ch) {
// ch should be representable as a wchar_t
return ch >= WCHAR_MIN && ch <= WCHAR_MAX;
}
static bool isalnum(wchar_t ch) {
using namespace std;
BOOST_ASSERT(strict_ischar(ch));
return iswalnum(to_int_type(ch)) != 0;
}
static bool isalpha(wchar_t ch) {
using namespace std;
BOOST_ASSERT(strict_ischar(ch));
return iswalpha(to_int_type(ch)) != 0;
}
static bool iscntrl(wchar_t ch) {
using namespace std;
BOOST_ASSERT(strict_ischar(ch));
return iswcntrl(to_int_type(ch)) != 0;
}
static bool isdigit(wchar_t ch) {
using namespace std;
BOOST_ASSERT(strict_ischar(ch));
return iswdigit(to_int_type(ch)) != 0;
}
static bool isgraph(wchar_t ch) {
using namespace std;
BOOST_ASSERT(strict_ischar(ch));
return iswgraph(to_int_type(ch)) != 0;
}
static bool islower(wchar_t ch) {
using namespace std;
BOOST_ASSERT(strict_ischar(ch));
return iswlower(to_int_type(ch)) != 0;
}
static bool isprint(wchar_t ch) {
using namespace std;
return iswprint(to_int_type(ch)) != 0;
}
static bool ispunct(wchar_t ch) {
using namespace std;
BOOST_ASSERT(strict_ischar(ch));
return iswpunct(to_int_type(ch)) != 0;
}
static bool isspace(wchar_t ch) {
using namespace std;
BOOST_ASSERT(strict_ischar(ch));
return iswspace(to_int_type(ch)) != 0;
}
static bool isupper(wchar_t ch) {
using namespace std;
BOOST_ASSERT(strict_ischar(ch));
return iswupper(to_int_type(ch)) != 0;
}
static bool isxdigit(wchar_t ch) {
using namespace std;
BOOST_ASSERT(strict_ischar(ch));
return iswxdigit(to_int_type(ch)) != 0;
}
static bool isblank BOOST_PREVENT_MACRO_SUBSTITUTION(wchar_t ch) {
BOOST_ASSERT(strict_ischar(ch));
return (ch == L' ' || ch == L'\t');
}
///////////////////////////////////////////////////////////////////////
// Simple character conversions
///////////////////////////////////////////////////////////////////////
static wchar_t tolower(wchar_t ch) {
using namespace std;
BOOST_ASSERT(strict_ischar(ch));
return isupper(ch) ? to_char_type<wchar_t>(towlower(to_int_type(ch))) : ch;
}
static wchar_t toupper(wchar_t ch) {
using namespace std;
BOOST_ASSERT(strict_ischar(ch));
return islower(ch) ? to_char_type<wchar_t>(towupper(to_int_type(ch))) : ch;
}
static ::boost::uint32_t toucs4(int ch) {
BOOST_ASSERT(strict_ischar(ch));
return ch;
}
};
} // namespace char_encoding
} // namespace spirit
} // namespace boost
#endif
| 28.718919
| 80
| 0.618859
|
henrywarhurst
|
e9acc2eb1780b01d5820b99d173334f3e07e58d2
| 4,731
|
cpp
|
C++
|
src/mapmaker/Util.cpp
|
gshaw/closecombat
|
8c0f8a9ee29a109784a465aadda063922543ac72
|
[
"Zlib"
] | 5
|
2015-02-03T04:04:20.000Z
|
2020-03-19T01:07:47.000Z
|
src/mapmaker/Util.cpp
|
gshaw/closecombat
|
8c0f8a9ee29a109784a465aadda063922543ac72
|
[
"Zlib"
] | null | null | null |
src/mapmaker/Util.cpp
|
gshaw/closecombat
|
8c0f8a9ee29a109784a465aadda063922543ac72
|
[
"Zlib"
] | null | null | null |
#include "StdAfx.h"
#include "Util.h"
bool CC2_IsDataFolderValid(const CString& FolderPath)
{
// return true if FolderPath is a valid folder path to the close combat 2 game folder
bool ok = false;
// look for data\base\elements
CString PathName(FolderPath);
PathName += _T("\\data\\base\\elements");
CFileStatus Status;
if (CFile::GetStatus(PathName, Status))
{
ok = true;
}
return ok;
}
char* ReadFile(const CString& PathName)
{
char* pBuffer = NULL;
try
{
CFile File(PathName, CFile::modeRead);
int BufferLen = File.GetLength();
pBuffer = new char[BufferLen+1];
ZeroMemory(pBuffer, BufferLen+1);
File.Read(pBuffer, BufferLen);
}
catch (...)
{
if (pBuffer)
{
delete pBuffer;
pBuffer = NULL;
}
}
return pBuffer;
}
int GetColumnInt(const char* p, int col)
{
// find the int at the col'th tab stop
// if not a valid int throw an exception
ASSERT(p != NULL);
while (col > 0)
{
p++;
// check for column out of range
if ((*p == '\0') || (*p == '\r') || (*p == '\n'))
{
TRACE("could not find column %d. Found new line instead.\n", col);
throw;
}
// check for start of comment
if (*p == '\\')
{
if (*(p+1) == '\\')
{
TRACE("could not find column %d. Found start of comment instead.\n", col);
throw;
}
}
// check for tab stop
if (*p == '\t')
col--;
}
// p should now point to an int
int i = 0;
if (sscanf(p, "%d", &i) != 1)
{
TRACE("could not parse an int. sscanf return bad value.\n");
throw;
}
return i;
}
CString GetColumnStr(const char* p, int col)
{
// find the int at the col'th tab stop
// if not a valid int throw an exception
ASSERT(p != NULL);
while (col > 0)
{
p++;
// check for column out of range
if ((*p == '\0') || (*p == '\r') || (*p == '\n'))
{
TRACE("could not find column %d. Found new line instead.\n", col);
throw;
}
// check for start of comment
if (*p == '\\')
{
if (*(p+1) == '\\')
{
TRACE("could not find column %d. Found start of comment instead.\n", col);
throw;
}
}
// check for tab stop
if (*p == '\t')
col--;
}
// p should now point to an int
char str[128];
char* s = str;
while ((*p != '\r') && (*p != '\n') && (*p != '\t'))
*s++ = *p++;
*s = NULL;
return CString(str);
}
const char* NextLine(const char* p)
{
ASSERT(p != NULL);
while ((*p != '\0') && (*p != '\r') && (*p != '\n'))
p++;
ASSERT(*p != '\0');
while ((*p == '\r') || (*p == '\n'))
p++;
return p;
}
const char* FindChar(const char* p, char ch)
{
ASSERT(p != NULL);
while ((*p != '\0') && (*p != ch))
p++;
return p;
}
int CountRowsTo(const char* p, char ch)
{
int NumRows = 0;
while (*p != ch)
{
p = NextLine(p);
NumRows++;
}
return NumRows;
}
void TgaWrite(const CString& PathName, CDIB* pImage)
{
TGAINFO info;
ZeroMemory(&info, sizeof(TGAINFO));
info.width = pImage->GetWidth();
info.height = pImage->GetHeight();
if (pImage->GetBpp() > 8)
{
info.bpp = 32;
}
else
{
info.bpp = 8;
info.startcolor = 0;
info.numcolors = 256;
RGBQUAD* pRGB = pImage->GetColorTable();
for (int i = 0; i < 256; i++)
{
info.palette[i].a = 255;
info.palette[i].r = pRGB[i].rgbRed;
info.palette[i].g = pRGB[i].rgbGreen;
info.palette[i].b = pRGB[i].rgbBlue;
}
}
char* pathname = (char*)((const char*)PathName);
// TODO: write TGA to pathname
}
CDIB* TgaRead(const CString& PathName)
{
CDIB* pImage = NULL;
char* pathname = (char*)((const char*)PathName);
// TODO: read TGA image into CDIB
return pImage;
}
unsigned int GetBigEndian(void* pBuffer, int count)
{
unsigned char* p = (unsigned char*) pBuffer;
unsigned int value;
value = 0;
while (count--)
{
value = (value<<8) + ((*p++));
}
return value;
}
| 21.120536
| 92
| 0.452124
|
gshaw
|
e9ba8ae7ee0dc7b184cda9f5193bce46908d91e3
| 4,414
|
cpp
|
C++
|
src/guo_hall_thinning.cpp
|
ericdanz/rgb_line_follower
|
89e534301e1c4dd83649b0fa750d5f808caa2df8
|
[
"BSD-3-Clause"
] | null | null | null |
src/guo_hall_thinning.cpp
|
ericdanz/rgb_line_follower
|
89e534301e1c4dd83649b0fa750d5f808caa2df8
|
[
"BSD-3-Clause"
] | null | null | null |
src/guo_hall_thinning.cpp
|
ericdanz/rgb_line_follower
|
89e534301e1c4dd83649b0fa750d5f808caa2df8
|
[
"BSD-3-Clause"
] | null | null | null |
/*
* \guo_hall_thinning.cpp
* \takes a image and converts it to a trajectory for the robot to follow
*
* \author Chris Dunkers, CMU - cmdunkers@cmu.edu
* \date October 31, 2014
*/
#include "rgb_line_follower/guo_hall_thinning.h"
convert_to_line::convert_to_line(){
//the main node handle
ros::NodeHandle nh;
//grab the parameters
ros::NodeHandle private_node_handle_("~");
private_node_handle_.param<std::string>("image_topic_thinning", image_topic, "/image_hsv");
//initialize the publishers and subscribers
image_pub = nh.advertise<sensor_msgs::Image>("image_thin", 1000);
image_sub = nh.subscribe(image_topic, 1000, &convert_to_line::update_image, this);
// min and max hsv values values
cv::namedWindow(OPENCV_WINDOW);
}
convert_to_line::~convert_to_line(){
cv::destroyWindow(OPENCV_WINDOW);
}
void convert_to_line::update_image(const sensor_msgs::Image::ConstPtr& img_msg){
cv_bridge::CvImagePtr cv_ptr;
try
{
cv_ptr = cv_bridge::toCvCopy(img_msg, sensor_msgs::image_encodings::BGR8);
}
catch (cv_bridge::Exception& e)
{
ROS_ERROR("cv_bridge exception: %s", e.what());
return;
}
cv_ptr->image.copyTo(thin_image);
frame = img_msg->header.frame_id;
//run the thinning algorithm
//cv::Mat ThinImage;
//cv::cvtColor(cv_ptr->image, ThinImage, CV_BGR2GRAY);
//thinningGuoHall(ThinImage);
//make the cv image to a ros message
//cv_bridge::CvImage out_msg;
//out_msg.header.frame_id = img_msg->header.frame_id; // Same tf frame as input image
//out_msg.header.stamp = ros::Time::now();
//out_msg.encoding = sensor_msgs::image_encodings::MONO8; // black and white
//out_msg.image = ThinImage; //cv::Mat image
//image_pub.publish(out_msg.toImageMsg());
}
void convert_to_line::make_thin_image(){
if (!thin_image.empty()) {
cv::Mat ThinImage;
cv::cvtColor(thin_image, ThinImage, CV_BGR2GRAY);
thinningGuoHall(ThinImage);
//make the cv image to a ros message
cv_bridge::CvImage out_msg;
out_msg.header.frame_id = frame; // Same tf frame as input image
out_msg.header.stamp = ros::Time::now();
out_msg.encoding = sensor_msgs::image_encodings::MONO8; // black and white
out_msg.image = ThinImage; //cv::Mat image
image_pub.publish(out_msg.toImageMsg());
}
}
/**
* Perform one thinning iteration.
* Normally you wouldn't call this function directly from your code.
*
* @param im Binary image with range = 0-1
* @param iter 0=even, 1=odd
*/
void thinningGuoHallIteration(cv::Mat& im, int iter)
{
cv::Mat marker = cv::Mat::zeros(im.size(), CV_8UC1);
for (int i = 1; i < im.rows; i++)
{
for (int j = 1; j < im.cols; j++)
{
uchar p2 = im.at<uchar>(i-1, j);
uchar p3 = im.at<uchar>(i-1, j+1);
uchar p4 = im.at<uchar>(i, j+1);
uchar p5 = im.at<uchar>(i+1, j+1);
uchar p6 = im.at<uchar>(i+1, j);
uchar p7 = im.at<uchar>(i+1, j-1);
uchar p8 = im.at<uchar>(i, j-1);
uchar p9 = im.at<uchar>(i-1, j-1);
int C = (!p2 & (p3 | p4)) + (!p4 & (p5 | p6)) +
(!p6 & (p7 | p8)) + (!p8 & (p9 | p2));
int N1 = (p9 | p2) + (p3 | p4) + (p5 | p6) + (p7 | p8);
int N2 = (p2 | p3) + (p4 | p5) + (p6 | p7) + (p8 | p9);
int N = N1 < N2 ? N1 : N2;
int m = iter == 0 ? ((p6 | p7 | !p9) & p8) : ((p2 | p3 | !p5) & p4);
if (C == 1 && (N >= 2 && N <= 3) & m == 0)
marker.at<uchar>(i,j) = 1;
}
}
im &= ~marker;
}
/**
* Function for thinning the given binary image
*
* @param im Binary image with range = 0-255
*/
void thinningGuoHall(cv::Mat& im)
{
im /= 255;
cv::Mat prev = cv::Mat::zeros(im.size(), CV_8UC1);
cv::Mat diff;
do {
thinningGuoHallIteration(im, 0);
thinningGuoHallIteration(im, 1);
cv::absdiff(im, prev, diff);
im.copyTo(prev);
}
while (cv::countNonZero(diff) > 0);
im *= 255;
}
int main(int argc, char **argv)
{
ros::init(argc, argv, "guo_hall_thining_algorithm");
convert_to_line img_to_line = convert_to_line();
ROS_INFO("guo hall thinning node started!");
ros::Rate loop_rate(10);
while (ros::ok())
{
img_to_line.make_thin_image();
ros::spinOnce();
loop_rate.sleep();
}
return 0;
}
| 27.416149
| 93
| 0.600362
|
ericdanz
|
e9bb3e6703c393cce61ebb3097f41be8c021c38c
| 585
|
cpp
|
C++
|
src/main.cpp
|
philong6297/tetravex-solver
|
3d427f00a697c22c2231c57445140c7f1bb76572
|
[
"MIT"
] | null | null | null |
src/main.cpp
|
philong6297/tetravex-solver
|
3d427f00a697c22c2231c57445140c7f1bb76572
|
[
"MIT"
] | null | null | null |
src/main.cpp
|
philong6297/tetravex-solver
|
3d427f00a697c22c2231c57445140c7f1bb76572
|
[
"MIT"
] | null | null | null |
#include <iostream>
#include "engine/game_generator.h"
#include "solver/solver.h"
int main() {
std::ios::sync_with_stdio(false);
// absolute dir = full name of the path
Game game = GameGenerator::ReadFromFile("D:/cpp-projects/tetravex-solver/data/6x6.txt");
// {
// Solver solver;
// std::cout << "sequential:\n";
// solver.SequentialBacktracking(game);
// }
{
ThreadPool pool(std::thread::hardware_concurrency());
std::cout << "parallel:\n";
Solver solver;
solver.ParallelBacktracking(game, pool);
}
return 0;
}
| 23.4
| 91
| 0.62735
|
philong6297
|
e9bca392665c427444ae656aca0eecf95dfb1c26
| 379
|
cpp
|
C++
|
src/core/core_render.cpp
|
RichardMarks/allegro-5-project-template
|
cdeb83a5eecf70d43e89f31ed7f56d87b00745c8
|
[
"MIT"
] | null | null | null |
src/core/core_render.cpp
|
RichardMarks/allegro-5-project-template
|
cdeb83a5eecf70d43e89f31ed7f56d87b00745c8
|
[
"MIT"
] | null | null | null |
src/core/core_render.cpp
|
RichardMarks/allegro-5-project-template
|
cdeb83a5eecf70d43e89f31ed7f56d87b00745c8
|
[
"MIT"
] | null | null | null |
#include "core.h"
bool core_render() {
// printf("core_render()\n");
if (__CoreGlobals__.Redraw && al_is_event_queue_empty(__CoreGlobals__.Queue)) {
__CoreGlobals__.Redraw = false;
al_set_target_bitmap(__CoreGlobals__.DisplayBuffer);
al_clear_to_color(al_map_rgb(0, 0, 0)); // FIXME: should use a global background color
return true;
}
return false;
}
| 25.266667
| 90
| 0.717678
|
RichardMarks
|
e9be9d0ab7adf2d26b5fd92d101e2fd841f88d42
| 1,354
|
cpp
|
C++
|
Algorithms/Warmup/TimeConversion.cpp
|
latimercaleb/hacker-rank-results
|
2cb5e0eca306835eb7607c157f8ee8ee166d3630
|
[
"MIT"
] | null | null | null |
Algorithms/Warmup/TimeConversion.cpp
|
latimercaleb/hacker-rank-results
|
2cb5e0eca306835eb7607c157f8ee8ee166d3630
|
[
"MIT"
] | null | null | null |
Algorithms/Warmup/TimeConversion.cpp
|
latimercaleb/hacker-rank-results
|
2cb5e0eca306835eb7607c157f8ee8ee166d3630
|
[
"MIT"
] | null | null | null |
// https://www.hackerrank.com/challenges/time-conversion/problem
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <sstream>
#include<iomanip>
using namespace std;
int main(){
string time;
cin >> time;
char delim = ':';
stringstream newTime;
newTime << time;
int hours,minutes,seconds;
string ampm;
newTime >> hours;
newTime >> delim;
newTime>> minutes;
newTime >> delim;
newTime>> seconds;
newTime>> ampm;
if(ampm == "PM"){
switch(hours){
case 1:hours = 13;
break;
case 2:hours = 14;
break;
case 3:hours = 15;
break;
case 4:hours = 16;
break;
case 5:hours = 17;
break;
case 6:hours = 18;
break;
case 7:hours = 19;
break;
case 8:hours = 20;
break;
case 9:hours = 21;
break;
case 10:hours = 22;
break;
case 11:hours = 23;
break;
}
}
else if(ampm == "AM" && hours == 12 ){
hours = 0;
}
cout << setw(2)<< setfill('0') << hours << ":" << setw(2)<< setfill('0') << minutes << ":" << setw(2)<< setfill('0') << seconds << endl;
return 0;
}
| 23.344828
| 141
| 0.474151
|
latimercaleb
|
e9cc92831ba96d53b71b6a3c19769aa3eec198d4
| 1,317
|
hpp
|
C++
|
src/osm_node_wrap.hpp
|
simonpoole/node-osmium
|
379bc61c2584e6fb441ee37f37af34aea97213dd
|
[
"BSL-1.0"
] | 104
|
2015-02-02T19:05:38.000Z
|
2021-04-25T19:54:46.000Z
|
src/osm_node_wrap.hpp
|
simonpoole/node-osmium
|
379bc61c2584e6fb441ee37f37af34aea97213dd
|
[
"BSL-1.0"
] | 75
|
2015-01-10T02:04:18.000Z
|
2021-08-16T07:15:36.000Z
|
src/osm_node_wrap.hpp
|
simonpoole/node-osmium
|
379bc61c2584e6fb441ee37f37af34aea97213dd
|
[
"BSL-1.0"
] | 29
|
2015-01-21T19:32:58.000Z
|
2022-03-28T16:08:28.000Z
|
#ifndef OSM_NODE_WRAP_HPP
#define OSM_NODE_WRAP_HPP
#include "include_nan.hpp"
// osmium
#include <osmium/osm/node.hpp>
namespace osmium {
class OSMEntity;
}
// node-osmium
#include "node_osmium.hpp"
#include "osm_entity_wrap.hpp"
#include "osm_object_wrap.hpp"
#include "utils.hpp"
namespace node_osmium {
class OSMNodeWrap : public OSMWrappedObject {
static NAN_GETTER(get_type) {
info.GetReturnValue().Set(Nan::New(symbol_node));
}
static NAN_GETTER(get_coordinates);
static NAN_GETTER(get_lon);
static NAN_GETTER(get_lat);
static NAN_METHOD(wkb);
static NAN_METHOD(wkt);
public:
static Nan::Persistent<v8::FunctionTemplate> constructor;
static void Initialize(v8::Local<v8::Object> target);
static NAN_METHOD(New);
static const osmium::Node& wrapped(const v8::Local<v8::Object>& object) {
return static_cast<const osmium::Node&>(unwrap<OSMEntityWrap>(object));
}
OSMNodeWrap() :
OSMWrappedObject() {
}
OSMNodeWrap(const osmium::OSMEntity& entity) :
OSMWrappedObject(entity) {
}
private:
~OSMNodeWrap() = default;
}; // class OSMNodeWrap
} // namespace node_osmium
#endif // OSM_NODE_WRAP_HPP
| 22.322034
| 83
| 0.645406
|
simonpoole
|
8399c01ccfa2859713571d9b22bf725093207988
| 4,794
|
cpp
|
C++
|
src/debugger/breakpoint_break.cpp
|
sar/netcoredbg
|
c9b95f74452d3ac58ebe6642f64143fbe225df83
|
[
"MIT"
] | 402
|
2017-12-12T13:12:39.000Z
|
2022-03-28T01:43:25.000Z
|
src/debugger/breakpoint_break.cpp
|
sar/netcoredbg
|
c9b95f74452d3ac58ebe6642f64143fbe225df83
|
[
"MIT"
] | 83
|
2018-01-10T16:23:43.000Z
|
2022-03-22T07:25:42.000Z
|
src/debugger/breakpoint_break.cpp
|
sar/netcoredbg
|
c9b95f74452d3ac58ebe6642f64143fbe225df83
|
[
"MIT"
] | 66
|
2018-01-10T10:39:59.000Z
|
2022-03-27T15:55:10.000Z
|
// Copyright (c) 2021 Samsung Electronics Co., LTD
// Distributed under the MIT License.
// See the LICENSE file in the project root for more information.
#include "debugger/breakpoint_break.h"
#include "debugger/threads.h"
#include "metadata/modules.h"
#include "utils/torelease.h"
namespace netcoredbg
{
HRESULT BreakBreakpoint::GetFullyQualifiedIlOffset(ICorDebugThread *pThread, FullyQualifiedIlOffset_t &fullyQualifiedIlOffset)
{
HRESULT Status;
ToRelease<ICorDebugFrame> pFrame;
IfFailRet(pThread->GetActiveFrame(&pFrame));
if (pFrame == nullptr)
return E_FAIL;
mdMethodDef methodToken;
IfFailRet(pFrame->GetFunctionToken(&methodToken));
ToRelease<ICorDebugFunction> pFunc;
IfFailRet(pFrame->GetFunction(&pFunc));
ToRelease<ICorDebugModule> pModule;
IfFailRet(pFunc->GetModule(&pModule));
CORDB_ADDRESS modAddress;
IfFailRet(pModule->GetBaseAddress(&modAddress));
ToRelease<ICorDebugILFrame> pILFrame;
IfFailRet(pFrame->QueryInterface(IID_ICorDebugILFrame, (LPVOID*) &pILFrame));
ULONG32 ilOffset;
CorDebugMappingResult mappingResult;
IfFailRet(pILFrame->GetIP(&ilOffset, &mappingResult));
fullyQualifiedIlOffset.modAddress = modAddress;
fullyQualifiedIlOffset.methodToken = methodToken;
fullyQualifiedIlOffset.ilOffset = ilOffset;
return S_OK;
}
void BreakBreakpoint::SetLastStoppedIlOffset(ICorDebugProcess *pProcess, const ThreadId &lastStoppedThreadId)
{
std::lock_guard<std::mutex> lock(m_breakMutex);
m_lastStoppedIlOffset.Reset();
if (lastStoppedThreadId == ThreadId::AllThreads)
return;
ToRelease<ICorDebugThread> pThread;
if (SUCCEEDED(pProcess->GetThread(int(lastStoppedThreadId), &pThread)))
GetFullyQualifiedIlOffset(pThread, m_lastStoppedIlOffset);
}
HRESULT BreakBreakpoint::ManagedCallbackBreak(ICorDebugThread *pThread, const ThreadId &lastStoppedThreadId)
{
HRESULT Status;
ToRelease<ICorDebugFrame> iCorFrame;
IfFailRet(pThread->GetActiveFrame(&iCorFrame));
// Ignore break on Break() outside of code with loaded PDB (see JMC setup during module load).
if (iCorFrame != nullptr)
{
ToRelease<ICorDebugFunction> iCorFunction;
IfFailRet(iCorFrame->GetFunction(&iCorFunction));
ToRelease<ICorDebugFunction2> iCorFunction2;
IfFailRet(iCorFunction->QueryInterface(IID_ICorDebugFunction2, (LPVOID*) &iCorFunction2));
BOOL JMCStatus;
IfFailRet(iCorFunction2->GetJMCStatus(&JMCStatus));
if (JMCStatus == FALSE)
return S_OK;
}
ThreadId threadId(getThreadId(pThread));
// Prevent stop event duplicate, if previous stop event was for same thread and same code point.
// The idea is - store "fully qualified IL offset" (data for module + method + IL) on any stop event
// and only at Break() callback check the real sequence point (required delegate call).
// Note, that step/breakpoint/etc stop event at "Debugger.Break()" source line and stop event
// generated by CoreCLR during Debugger.Break() execution in managed code have different IL offsets,
// but same sequence point.
std::lock_guard<std::mutex> lock(m_breakMutex);
if (threadId != lastStoppedThreadId ||
m_lastStoppedIlOffset.modAddress == 0 ||
m_lastStoppedIlOffset.methodToken == 0)
return S_FALSE;
FullyQualifiedIlOffset_t fullyQualifiedIlOffset;
IfFailRet(GetFullyQualifiedIlOffset(pThread, fullyQualifiedIlOffset));
if (fullyQualifiedIlOffset.modAddress == 0 ||
fullyQualifiedIlOffset.methodToken == 0 ||
fullyQualifiedIlOffset.modAddress != m_lastStoppedIlOffset.modAddress ||
fullyQualifiedIlOffset.methodToken != m_lastStoppedIlOffset.methodToken)
return S_FALSE;
Modules::SequencePoint lastSP;
IfFailRet(m_sharedModules->GetSequencePointByILOffset(m_lastStoppedIlOffset.modAddress, m_lastStoppedIlOffset.methodToken,
m_lastStoppedIlOffset.ilOffset, lastSP));
Modules::SequencePoint curSP;
IfFailRet(m_sharedModules->GetSequencePointByILOffset(fullyQualifiedIlOffset.modAddress, fullyQualifiedIlOffset.methodToken,
fullyQualifiedIlOffset.ilOffset, curSP));
if (lastSP.startLine != curSP.startLine ||
lastSP.startColumn != curSP.startColumn ||
lastSP.endLine != curSP.endLine ||
lastSP.endColumn != curSP.endColumn ||
lastSP.offset != curSP.offset ||
lastSP.document != curSP.document)
return S_FALSE;
return S_OK;
}
} // namespace netcoredbg
| 38.047619
| 129
| 0.701293
|
sar
|
839aa948208c5719d99ba773ed28827aa0875089
| 1,315
|
cpp
|
C++
|
src/Core/Models/ShortId.cpp
|
Fookdies301/GrinPlusPlus
|
981a99af0ae04633afbd02666894b5c199e06339
|
[
"MIT"
] | 135
|
2018-12-17T15:38:16.000Z
|
2022-03-01T05:38:29.000Z
|
src/Core/Models/ShortId.cpp
|
Fookdies301/GrinPlusPlus
|
981a99af0ae04633afbd02666894b5c199e06339
|
[
"MIT"
] | 185
|
2018-12-21T13:56:29.000Z
|
2022-03-23T14:41:46.000Z
|
src/Core/Models/ShortId.cpp
|
Fookdies301/GrinPlusPlus
|
981a99af0ae04633afbd02666894b5c199e06339
|
[
"MIT"
] | 49
|
2018-12-23T12:05:51.000Z
|
2022-03-26T14:24:49.000Z
|
#include <Core/Models/ShortId.h>
#include <Crypto/Hasher.h>
ShortId::ShortId(CBigInteger<6>&& id)
: m_id(id)
{
}
ShortId ShortId::Create(const CBigInteger<32>& hash, const CBigInteger<32>& blockHash, const uint64_t nonce)
{
// take the block hash and the nonce and hash them together
Serializer serializer;
serializer.AppendBigInteger<32>(blockHash);
serializer.Append<uint64_t>(nonce);
const CBigInteger<32> hashWithNonce = Hasher::Blake2b(serializer.GetBytes());
// extract k0/k1 from the block_hash
ByteBuffer byteBuffer(hashWithNonce.GetData());
const uint64_t k0 = byteBuffer.ReadU64_LE();
const uint64_t k1 = byteBuffer.ReadU64_LE();
// SipHash24 our hash using the k0 and k1 keys
const uint64_t sipHash = Hasher::SipHash24(k0, k1, hash.GetData());
// construct a short_id from the resulting bytes (dropping the 2 most significant bytes)
Serializer serializer2;
serializer2.AppendLittleEndian<uint64_t>(sipHash);
return ShortId(CBigInteger<6>(&serializer2.GetBytes()[0]));
}
void ShortId::Serialize(Serializer& serializer) const
{
serializer.AppendBigInteger<6>(m_id);
}
ShortId ShortId::Deserialize(ByteBuffer& byteBuffer)
{
CBigInteger<6> id = byteBuffer.ReadVector(6);
return ShortId(std::move(id));
}
Hash ShortId::GetHash() const
{
return Hasher::Blake2b(m_id.GetData());
}
| 27.395833
| 108
| 0.756654
|
Fookdies301
|
839ab305106ca145ed99a3a1a51b61938e5042db
| 356
|
cpp
|
C++
|
800-1000/1626A-Equidistant Letters.cpp
|
Ozzey/Codeforces
|
36626f19382a08f54e66ade28431d7d440664e67
|
[
"MIT"
] | 1
|
2022-02-11T16:38:52.000Z
|
2022-02-11T16:38:52.000Z
|
800-1000/1626A-Equidistant Letters.cpp
|
Ozzey/Codeforces
|
36626f19382a08f54e66ade28431d7d440664e67
|
[
"MIT"
] | null | null | null |
800-1000/1626A-Equidistant Letters.cpp
|
Ozzey/Codeforces
|
36626f19382a08f54e66ade28431d7d440664e67
|
[
"MIT"
] | null | null | null |
// https://codeforces.com/problemset/problem/1626/A
#include <bits/stdc++.h>
using namespace std;
int fn(string str){
sort(str.begin(),str.end());
cout<<str<<endl;
return 0;
}
int main(){
int tc;
string s;
cin >> tc;
int count=0;
while(count<tc) {
cin>>s;
fn(s);
count++;
}
return 0;
}
| 13.185185
| 51
| 0.525281
|
Ozzey
|
83a17c4201313c1fea5af8dfe92af3133d1a8fd8
| 1,284
|
hpp
|
C++
|
include/brynet/net/wrapper/HttpServiceBuilder.hpp
|
mr-cn/brynet
|
93ddf823ccc451b336cc5d78d636c75fd712ae59
|
[
"MIT"
] | null | null | null |
include/brynet/net/wrapper/HttpServiceBuilder.hpp
|
mr-cn/brynet
|
93ddf823ccc451b336cc5d78d636c75fd712ae59
|
[
"MIT"
] | null | null | null |
include/brynet/net/wrapper/HttpServiceBuilder.hpp
|
mr-cn/brynet
|
93ddf823ccc451b336cc5d78d636c75fd712ae59
|
[
"MIT"
] | null | null | null |
#pragma once
#include <brynet/net/http/HttpService.hpp>
#include <brynet/net/wrapper/ServiceBuilder.hpp>
namespace brynet { namespace net { namespace wrapper {
class HttpListenerBuilder : public BaseListenerBuilder<HttpListenerBuilder>
{
public:
HttpListenerBuilder& configureEnterCallback(http::HttpSession::EnterCallback&& callback)
{
mHttpEnterCallback = std::forward<http::HttpSession::EnterCallback>(callback);
return *this;
}
void asyncRun()
{
if (mHttpEnterCallback == nullptr)
{
throw BrynetCommonException("not setting http enter callback");
}
auto connectionOptions =
BaseListenerBuilder<HttpListenerBuilder>::getConnectionOptions();
auto callback = mHttpEnterCallback;
connectionOptions.push_back(
AddSocketOption::AddEnterCallback(
[callback](const TcpConnection::Ptr& session) {
http::HttpService::setup(session, callback);
}));
BaseListenerBuilder<HttpListenerBuilder>::asyncRun(connectionOptions);
}
private:
http::HttpSession::EnterCallback mHttpEnterCallback;
};
} } }
| 32.923077
| 96
| 0.620717
|
mr-cn
|
83a80d6a3de3738253f89231fa5ed65d803f222c
| 1,273
|
cpp
|
C++
|
cpp/problem067.cpp
|
curtislb/ProjectEuler
|
7baf8d7b7ac0e8697d4dec03458b473095a45da4
|
[
"MIT"
] | null | null | null |
cpp/problem067.cpp
|
curtislb/ProjectEuler
|
7baf8d7b7ac0e8697d4dec03458b473095a45da4
|
[
"MIT"
] | null | null | null |
cpp/problem067.cpp
|
curtislb/ProjectEuler
|
7baf8d7b7ac0e8697d4dec03458b473095a45da4
|
[
"MIT"
] | null | null | null |
/*
* problem067.cpp
*
* Problem 67: Maximum path sum II
*
* By starting at the top of the triangle below and moving to adjacent numbers
* on the row below, the maximum total from top to bottom is 23.
*
* 3
* 7 4
* 2 4 6
* 8 5 9 3
*
* That is, 3 + 7 + 4 + 9 = 23.
*
* Find the maximum total from top to bottom in the triangle contained in the
* file INPUT_FILE.
*
* NOTE: This is a much more difficult version of Problem 18. It is not
* possible to try every route to solve this problem, as there are 2^99
* altogether! If you could check one trillion (10^12) routes every second it
* would take over twenty billion years to check them all. There is an
* efficient algorithm to solve it.
*
* Author: Curtis Belmonte
* Created: Aug 29, 2014
*/
#include <iostream>
#include <vector>
#include "common.h"
using namespace std;
/* PARAMETERS ****************************************************************/
static const char *IN_FILE = "../input/067.txt"; // default: "../input/067.txt"
/* SOLUTION ******************************************************************/
int main() {
vector<vector<long> > triangle = common::numbersFromFile(IN_FILE);
cout << common::maxTrianglePath(triangle) << endl;
return 0;
}
| 27.085106
| 79
| 0.595444
|
curtislb
|
83a862224907608ff44f9777f127ed24abdaa333
| 583
|
cpp
|
C++
|
project3D/main.cpp
|
deadglow/AIE-bootstrap-pathfinding
|
158ee426f896413d47293f3803a1a7aae687da21
|
[
"MIT"
] | 1
|
2022-02-16T20:45:04.000Z
|
2022-02-16T20:45:04.000Z
|
project3D/main.cpp
|
deadglow/AIE-bootstrap-pathfinding
|
158ee426f896413d47293f3803a1a7aae687da21
|
[
"MIT"
] | null | null | null |
project3D/main.cpp
|
deadglow/AIE-bootstrap-pathfinding
|
158ee426f896413d47293f3803a1a7aae687da21
|
[
"MIT"
] | null | null | null |
//----------------------------------------------------------------------------
// This is the entry-point for your game.
// Creates and runs the Application3D class which contains the game loop.
//----------------------------------------------------------------------------
#include <crtdbg.h>
#include "Game3D.h"
int main()
{
// Check for memeory leaks.
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
// Create the Application.
Game3D* game = new Game3D("AIE", 1280, 720, false);
// Run the game loop.
game->Run();
// Clean up.
delete game;
return 0;
}
| 25.347826
| 78
| 0.511149
|
deadglow
|
83afa5c4e1a850e5b60637ab9a5ca4b88f9e1e75
| 367
|
cpp
|
C++
|
src/main/cpp/miscar/Log.cpp
|
MisCar/libmiscar
|
b7da8ea84f1183ce4a8c5b51bcb29bea7052f7b2
|
[
"BSD-3-Clause"
] | null | null | null |
src/main/cpp/miscar/Log.cpp
|
MisCar/libmiscar
|
b7da8ea84f1183ce4a8c5b51bcb29bea7052f7b2
|
[
"BSD-3-Clause"
] | null | null | null |
src/main/cpp/miscar/Log.cpp
|
MisCar/libmiscar
|
b7da8ea84f1183ce4a8c5b51bcb29bea7052f7b2
|
[
"BSD-3-Clause"
] | null | null | null |
// Copyright (c) MisCar 1574
#include "miscar/Log.h"
#include <networktables/NetworkTableInstance.h>
#include <frc/Errors.h>
void miscar::log::Warning(const std::string& message) {
FRC_ReportError(frc::err::Error, "[MisCar] {}", message);
}
void miscar::log::Error(const std::string& message) {
FRC_ReportError(frc::warn::Warning, "[MisCar] {}", message);
}
| 22.9375
| 62
| 0.697548
|
MisCar
|
83b0c94bfd73bc3ee43ccde95f849830e4779402
| 1,246
|
hpp
|
C++
|
libs/core/include/fcppt/container/map_values_ref.hpp
|
pmiddend/fcppt
|
9f437acbb10258e6df6982a550213a05815eb2be
|
[
"BSL-1.0"
] | null | null | null |
libs/core/include/fcppt/container/map_values_ref.hpp
|
pmiddend/fcppt
|
9f437acbb10258e6df6982a550213a05815eb2be
|
[
"BSL-1.0"
] | null | null | null |
libs/core/include/fcppt/container/map_values_ref.hpp
|
pmiddend/fcppt
|
9f437acbb10258e6df6982a550213a05815eb2be
|
[
"BSL-1.0"
] | null | null | null |
// Copyright Carl Philipp Reh 2009 - 2018.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef FCPPT_CONTAINER_MAP_VALUES_REF_HPP_INCLUDED
#define FCPPT_CONTAINER_MAP_VALUES_REF_HPP_INCLUDED
#include <fcppt/is_reference.hpp>
#include <fcppt/algorithm/map.hpp>
#include <fcppt/type_traits/value_type.hpp>
namespace fcppt
{
namespace container
{
/**
\brief Maps the mapped values of an associative container to a container of references.
\ingroup fcpptcontainer
\tparam Result A sequence container of <code>fcppt::reference<Map::mapped_type></code> or <code>fcppt::reference<Map::mapped_type const></code>.
\tparam Map An associative container.
*/
template<
typename Result,
typename Map
>
Result
map_values_ref(
Map &_map
)
{
static_assert(
fcppt::is_reference<
fcppt::type_traits::value_type<
Result
>
>::value,
"Result::value_type must be an fcppt::reference"
);
return
fcppt::algorithm::map<
Result
>(
_map,
[](
auto &&_element
)
{
return
fcppt::type_traits::value_type<
Result
>{
_element.second
};
}
);
}
}
}
#endif
| 17.8
| 144
| 0.699037
|
pmiddend
|
83b6f1b38fb302d7e00efb4714bb7c74ce46d811
| 86,312
|
inl
|
C++
|
src/fonts/stb_font_consolas_bold_22_latin_ext.inl
|
stetre/moonfonts
|
5c8010c02ea62edcf42902e09478b0cd14af56ea
|
[
"MIT"
] | 3
|
2018-03-13T12:51:57.000Z
|
2021-10-11T11:32:17.000Z
|
src/fonts/stb_font_consolas_bold_22_latin_ext.inl
|
stetre/moonfonts
|
5c8010c02ea62edcf42902e09478b0cd14af56ea
|
[
"MIT"
] | null | null | null |
src/fonts/stb_font_consolas_bold_22_latin_ext.inl
|
stetre/moonfonts
|
5c8010c02ea62edcf42902e09478b0cd14af56ea
|
[
"MIT"
] | null | null | null |
// Font generated by stb_font_inl_generator.c (4/1 bpp)
//
// Following instructions show how to use the only included font, whatever it is, in
// a generic way so you can replace it with any other font by changing the include.
// To use multiple fonts, replace STB_SOMEFONT_* below with STB_FONT_consolas_bold_22_latin_ext_*,
// and separately install each font. Note that the CREATE function call has a
// totally different name; it's just 'stb_font_consolas_bold_22_latin_ext'.
//
/* // Example usage:
static stb_fontchar fontdata[STB_SOMEFONT_NUM_CHARS];
static void init(void)
{
// optionally replace both STB_SOMEFONT_BITMAP_HEIGHT with STB_SOMEFONT_BITMAP_HEIGHT_POW2
static unsigned char fontpixels[STB_SOMEFONT_BITMAP_HEIGHT][STB_SOMEFONT_BITMAP_WIDTH];
STB_SOMEFONT_CREATE(fontdata, fontpixels, STB_SOMEFONT_BITMAP_HEIGHT);
... create texture ...
// for best results rendering 1:1 pixels texels, use nearest-neighbor sampling
// if allowed to scale up, use bilerp
}
// This function positions characters on integer coordinates, and assumes 1:1 texels to pixels
// Appropriate if nearest-neighbor sampling is used
static void draw_string_integer(int x, int y, char *str) // draw with top-left point x,y
{
... use texture ...
... turn on alpha blending and gamma-correct alpha blending ...
glBegin(GL_QUADS);
while (*str) {
int char_codepoint = *str++;
stb_fontchar *cd = &fontdata[char_codepoint - STB_SOMEFONT_FIRST_CHAR];
glTexCoord2f(cd->s0, cd->t0); glVertex2i(x + cd->x0, y + cd->y0);
glTexCoord2f(cd->s1, cd->t0); glVertex2i(x + cd->x1, y + cd->y0);
glTexCoord2f(cd->s1, cd->t1); glVertex2i(x + cd->x1, y + cd->y1);
glTexCoord2f(cd->s0, cd->t1); glVertex2i(x + cd->x0, y + cd->y1);
// if bilerping, in D3D9 you'll need a half-pixel offset here for 1:1 to behave correct
x += cd->advance_int;
}
glEnd();
}
// This function positions characters on float coordinates, and doesn't require 1:1 texels to pixels
// Appropriate if bilinear filtering is used
static void draw_string_float(float x, float y, char *str) // draw with top-left point x,y
{
... use texture ...
... turn on alpha blending and gamma-correct alpha blending ...
glBegin(GL_QUADS);
while (*str) {
int char_codepoint = *str++;
stb_fontchar *cd = &fontdata[char_codepoint - STB_SOMEFONT_FIRST_CHAR];
glTexCoord2f(cd->s0f, cd->t0f); glVertex2f(x + cd->x0f, y + cd->y0f);
glTexCoord2f(cd->s1f, cd->t0f); glVertex2f(x + cd->x1f, y + cd->y0f);
glTexCoord2f(cd->s1f, cd->t1f); glVertex2f(x + cd->x1f, y + cd->y1f);
glTexCoord2f(cd->s0f, cd->t1f); glVertex2f(x + cd->x0f, y + cd->y1f);
// if bilerping, in D3D9 you'll need a half-pixel offset here for 1:1 to behave correct
x += cd->advance;
}
glEnd();
}
*/
#ifndef STB_FONTCHAR__TYPEDEF
#define STB_FONTCHAR__TYPEDEF
typedef struct
{
// coordinates if using integer positioning
float s0,t0,s1,t1;
signed short x0,y0,x1,y1;
int advance_int;
// coordinates if using floating positioning
float s0f,t0f,s1f,t1f;
float x0f,y0f,x1f,y1f;
float advance;
} stb_fontchar;
#endif
#define STB_FONT_consolas_bold_22_latin_ext_BITMAP_WIDTH 256
#define STB_FONT_consolas_bold_22_latin_ext_BITMAP_HEIGHT 286
#define STB_FONT_consolas_bold_22_latin_ext_BITMAP_HEIGHT_POW2 512
#define STB_FONT_consolas_bold_22_latin_ext_FIRST_CHAR 32
#define STB_FONT_consolas_bold_22_latin_ext_NUM_CHARS 560
#define STB_FONT_consolas_bold_22_latin_ext_LINE_SPACING 14
static unsigned int stb__consolas_bold_22_latin_ext_pixels[]={
0x33221991,0x20000000,0x3000dffb,0x99910003,0x0dffa801,0xca801880,
0x26666600,0xb982b880,0x004d4400,0x40028826,0x41301998,0x00198818,
0xbca80660,0x33332a01,0x9880ea04,0x41331001,0x3ff11ff8,0x00ae2d40,
0x154ffee0,0x8017fee0,0x5401efe8,0xff5002ff,0x02ffd40d,0xb0bfffff,
0x37fcc5ff,0x09ffff90,0x27fc3fee,0x01eff980,0x70ff33ff,0xf70001ff,
0x3fff20bf,0xfffffb03,0x5413fee0,0xffb801ff,0x7c47fe23,0x27ff501f,
0x22001ffa,0x40bf51aa,0x004fddfb,0xc88019d9,0x9df5000c,0x1bfea0bf,
0x85ffeee8,0x3fe62ffd,0xf99dfd06,0x11ff909f,0xff3009ff,0x7ffdc01b,
0x00ffb84f,0x27eefdc0,0x40fff54c,0x702aaefd,0x3fea09ff,0x23ffa801,
0x3ff11ff8,0xfd8dff30,0xd988000f,0x2199103f,0x664401cb,0x7fffcc01,
0x970cc800,0x40077205,0x84d985ff,0x0efc81db,0x8ae03fe6,0x3cb800b9,
0x207bb500,0x22000ffb,0x403970cc,0x05fd83ff,0x3ea01990,0x3ffa801f,
0x7fc47fe2,0x440ffe81,0x3f2006ff,0x8801ffff,0xffff1000,0x7c47dc03,
0x00000003,0x00005ff8,0x7f901ff3,0x00000000,0x07fdc011,0x36000001,
0x005fd84f,0x0ffd4011,0xf11ffd40,0x907fe23f,0x3fe605ff,0xffffe805,
0x3fee06ff,0xb82fffff,0x2603f88f,0x2a01fedf,0x3fffffff,0x017ffffe,
0x7fdc2ffc,0x3f227fc0,0xcafdc463,0x5ff882ff,0xff105ff9,0xfffff70b,
0x23fee5ff,0x7e42effd,0x85ff882f,0x05fd84fd,0x7fffffdc,0x543ff52f,
0x5ff30eff,0xff88ffc4,0x2e027fc1,0x3fee00ff,0x85fffc8c,0xffffeffd,
0xfbbfa82f,0x00ddcc03,0x3fffffea,0x3ffffe3f,0x70bff005,0x24ff81ff,
0xfffa8ff8,0xbff16faf,0x3e25ff70,0x42ffb85f,0xffffeffd,0xffdff72f,
0x7fc43fff,0xd82ffb85,0x205fd84f,0xffffeffd,0x223ff52f,0x3fe60eff,
0x7c47fe22,0x00bfea1f,0x7fc05ff3,0x83ff7fa5,0x1bf22ff9,0xf00bffb0,
0x99880fff,0x263ffa99,0xf005ff99,0x81ff70bf,0x23be64ff,0x6f9ffeff,
0xdfd03ff6,0x7f40ffd8,0xf917fcc6,0x9cfffb8d,0x7fec5ffa,0xfb837f40,
0xf305fd86,0x2a37e45f,0x1ffe89ff,0xff117fcc,0xfd87fe23,0x04ff800f,
0x3be65ff3,0x1fea1ff9,0x19801ff3,0x2ffff980,0x81ffc400,0xbff005ff,
0xff81ff70,0x37ef3ee4,0x2a7f8ff9,0x0ffe22ff,0x7fc45ff5,0x3e63fd43,
0xb13fee0f,0x17fd41ff,0x3e607ff1,0x0bfb09cf,0x1ff31fea,0x7fecffd4,
0x221ff981,0xe82aa1ff,0x0dfb006f,0x67dc7fea,0x3fea3ff8,0x75c1fea1,
0x700dffff,0x8009ffff,0xbff03ff8,0x2e17fe00,0xb27fc0ff,0xdf35fb5f,
0x25ff8df1,0x5ff80ffb,0xff503fee,0x3ee3fd43,0x20ffdc0f,0x03fee5ff,
0xfb3ffe98,0xa87fea0b,0x7effd47f,0x43ff102f,0x7fc01ff8,0x20ff7004,
0x23fd0ffb,0x5f7f44ff,0xfff05ffc,0xd01dfffd,0x800ffb9f,0xbff03ff8,
0x2e17fe00,0xb27fc0ff,0xbf53fd5f,0x0ffc8df3,0x3ff20bfd,0x3fa0bfd0,
0x5c5ffcbe,0x0ffdc0ff,0x2ff43ff2,0x25dffb10,0x3bfa05fd,0x7d45ffcb,
0xf101ffff,0x00ffc43f,0x7d4013fe,0x88ffb80f,0xfd13fe7f,0x201bffff,
0x217fdc0b,0x1ffbaff8,0x40ffe200,0xbff005ff,0xff81ff70,0x27fe7fa4,
0x4c5fadfb,0x02ff9bff,0x5ff37ff3,0x3fffffa0,0x207fdc0d,0x7fcc0ffc,
0x2e02ff9b,0x02fec0ff,0x1bfffffd,0xfffaffa8,0x7c419900,0x037ec01f,
0xff507fc8,0x3fe29f73,0x26a37ee3,0x3ff88000,0x7fcc7fd4,0x0ffe2003,
0xff802ffc,0x7c0ffb85,0x3fe7fa4f,0x83fbcfc9,0x407fcefe,0x707fcefe,
0x201351bf,0x3ff40ffb,0x07fcefe8,0x2fec2fe4,0x09a8dfb8,0xff53ff50,
0x8ffc400d,0x1ff21ee8,0xf983ff40,0xff32fdaf,0x004f7e45,0xff999710,
0x3fe6fd89,0x0ffe2006,0xff802ffc,0x7c0ffb85,0x3fabf64f,0x81ffeffd,
0x404ffffa,0x904ffffa,0xfb8013df,0x40fff20f,0x404ffffa,0x05fd84fd,
0xa8013df9,0x89ff91ff,0x3fe21ff9,0x7d43ff11,0x05ff801f,0xfc9ffbfe,
0x3fffe60f,0xfc80ceff,0x44ffffff,0x03ff24ff,0xfb9ffc40,0x6fffffff,
0x3fffffee,0x81ff76ff,0x2ebf24ff,0x04ffedff,0x2007fffe,0xf301ffff,
0x19dfffff,0x7ff7ffdc,0x7fffc06f,0x6c27ec01,0xffff305f,0x7d419dff,
0xc8fffa1f,0x47fe24ff,0x3fe21ff8,0x017fcc03,0xf71bfff9,0xeefe887f,
0x7dc6ffff,0x4ff999df,0xffa87fe6,0x27ff3002,0xfffffffb,0x3fffee6f,
0xff76ffff,0x3f24ff81,0x006a2554,0x3200bff9,0x3fa205ff,0x26ffffee,
0x3ffffffb,0x805ffc80,0x05fd84fd,0xfffddfd1,0x10ffd4df,0x3fe63fff,
0x7c47fe22,0x007ff41f,0xffb00ffb,0xe81dffff,0x21ffc86f,0x27fc47fd,
0xfffffff9,0x3fea00bf,0x002fe802,0x31ffc400,0x7e4000ff,0x3ff9001f,
0x7e437f40,0x031ff71f,0x801ffc80,0x05fd84fe,0x3ff90dfd,0x22044000,
0x83ff11ff,0xff906ff9,0xffff1005,0x09ff109f,0x7fec1ff7,0x749ffd31,
0xffffffff,0x0ffd8187,0x3202fdc0,0x3fea003e,0x04427f42,0x200bff50,
0x3e205ffa,0x70ffb84f,0xfa8001ff,0x2ff9805f,0xff885fd8,0x880ffb84,
0x7c4000ee,0x503ff11f,0x5ffa89ff,0x013bf500,0xcaacfff8,0x7ffdc5ff,
0xf14feffe,0xf933337f,0xfcdfd83f,0xefd804ff,0x805fd00a,0x40fffdcd,
0xfcabdffa,0x77ff6d42,0x3ffb6a00,0x67ffc00e,0x2e5ffcaa,0xeda800ff,
0x3ae00eff,0xdffb07ff,0x567ffcbd,0xf505ffca,0x3ff1000f,0x7dc07fe2,
0x01dff12f,0x4c00bf60,0x4ffffffe,0xb3dfff90,0x203fee9f,0x7fec4ff9,
0xa800cfff,0xff881fff,0x7ffff400,0xfffff501,0xdfffa83d,0x6fffd400,
0xfffe9800,0x7fdc4fff,0xdfffa800,0x0f7fe400,0x27ffffd8,0xffffffe9,
0x0013f204,0x7fc47fe2,0x7447f601,0x02aa000e,0x15575300,0x7ec01300,
0x2a1bfe06,0x44000aba,0x0055101a,0x88015753,0x57101ab9,0x06ae2003,
0x2aaea600,0x10019880,0x26200357,0x4cccc400,0x0aaba981,0x400054c0,
0x3ff11ff8,0x00044080,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x80000000,0x002aa0aa,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x17a20000,0x913cb880,0xb8039999,0x2000c403,0x00001cc9,
0x01300000,0x10026620,0x00000000,0x22000620,0x00980099,0x19880000,
0x00000000,0x005fb800,0x3e2bfff7,0x3203ffff,0xfffb83ff,0x77c400df,
0xafd401fd,0x23fe05fa,0xfc800fe8,0xfff9100f,0xfff30dff,0x9ff07939,
0xe801ff70,0x000fe807,0xa807bfe6,0xfff101ff,0x3fffffff,0xfffffb10,
0x03fffc0d,0xfff88ff9,0xe800bfd0,0xeff8803f,0xff55511a,0x227fe407,
0xfffffffd,0x3e27ea01,0xffffe802,0x3ffff202,0x03ffd004,0xffffffd1,
0xfffbfb0f,0x709ff0bf,0x06f801ff,0x3e6007f8,0x1ffb804f,0xffffff10,
0xfa83ffff,0x07ffffff,0x205ffff3,0x17fec7fc,0xaa800bfd,0x00ffa800,
0xbb101ffc,0x4ceffdc1,0x3e205ffc,0xb8800fee,0xcca801cc,0x413aa002,
0x0a60cffb,0x81e5c462,0x0ffb84ff,0x6dc17e20,0x8805efff,0x2e009889,
0x266601ff,0x4199bffb,0x989cfff8,0xffff705b,0xfa9ff209,0x002ff44f,
0x37dc0022,0x4001ffc0,0x1ffd86ff,0x00073220,0x00000331,0xffd81988,
0xff000000,0x101ff709,0x7443bf95,0x07ffffff,0x3ea1fe40,0xffffffff,
0x405ff303,0x74002ffd,0xf907fdcf,0xd03bfe2f,0x3fee00bf,0xc82fffff,
0x53ff806f,0x7fffffff,0x3ea0ffe6,0x5c27fc2f,0xffd880ff,0x27fc6fff,
0x6c407fdc,0x326fffff,0x4ff804ff,0x3fe0ffb8,0x5c0ffb84,0x326fffff,
0x4acfccff,0x507fa600,0xffffffff,0x0bfe607f,0x20037fc4,0x1ffbaff8,
0x3ffb7fc8,0xfb00bfd0,0x5fffffdf,0xff00df90,0x3ffffea7,0x03ff53ff,
0x4ff87ff3,0x7d40ffb8,0x47ffffff,0x0ffb84ff,0x7fffffd4,0x3fffea7f,
0x709ff00b,0x427fc1ff,0x3ff20ffb,0x3fe6efef,0x2e005f96,0x440ffffe,
0x99affb99,0x05ff3009,0x9988ffe6,0x98ffa819,0xaffc83ff,0x0bfd03ff,
0x3f22ff98,0x2017f206,0x333313ff,0x3fee7ff5,0x7c4ff881,0x20ffb84f,
0x989cfff8,0x5c27fc5b,0x3ffe20ff,0x645b989c,0x40dfffff,0x0ffb84ff,
0x3fee13fe,0xfb1bff30,0x6d7ff411,0xfffd800f,0x3ee06fff,0x5ff3001f,
0xfe8bfea0,0x37ec0fff,0xfff90dff,0x02ff40df,0x1ff31fea,0x01ffd4c4,
0xff101ffc,0x2207ff27,0x427fc4ff,0x3ff60ffb,0x709ff002,0x17fec1ff,
0xffffb300,0x5c27fc1f,0x213fe0ff,0x5ff70ffb,0x3fff21fa,0x7fd400ff,
0x04ffff8c,0x26003ff7,0x5ff702ff,0x207ffff4,0x03ff24ff,0x03ffbff9,
0xff5017fa,0x3ea3fd43,0x7ff003ff,0xfb9ffc40,0x43ff981f,0x0ffb84ff,
0x7c00dff1,0x10ffb84f,0x22000dff,0x3fe4fffb,0x3e0ffb84,0xb0ffb84f,
0x6c1be1ff,0x00cfffff,0x33be6dfd,0x03ff707f,0x540bfe60,0x0ffb83ff,
0xffa87fe6,0x7fcffe42,0xd00bfd06,0x8bff97df,0x800cffe9,0x3fe203ff,
0xf507ff53,0xb84ff85f,0x47ff30ff,0x7fc19998,0xf30ffb84,0x0cccc47f,
0xff37fcc0,0x7c1ff709,0x367fb84f,0x205f88ff,0x1fffffd9,0x57f93ff8,
0x3ff701ff,0x40bfe600,0xffb85ff8,0x3fffff20,0xbfe45fff,0x5fe84ffb,
0xfffffe80,0x07ff300d,0x7c407ff0,0xb0dff13f,0x84ff81ff,0x5ff50ffb,
0xf07ffff4,0x21ff709f,0x3ffa2ffa,0x5ff800ff,0x3fee13fe,0x3f617fe0,
0x3e6bff25,0x7f6fcc04,0xf97fc46f,0xa81ff98f,0xff3002ff,0x20fff405,
0x3ffa0ffb,0x47ffffff,0x07ffa7fc,0xdfb80bfd,0xfd8009a8,0x203ff804,
0x3ff63ff8,0x84ffc99d,0x0ffb84ff,0x7ff45ff7,0x213fe0ff,0x5ff70ffb,
0xd87ffff4,0xffd9899b,0x3ee13fe4,0xa8fff60f,0x3ffe63ff,0xf7038bfc,
0x3fe1ffe7,0x1ff55fab,0x041bff30,0x2a02ff98,0xfc99bfff,0x337ff10f,
0x643ff933,0x83bfe67f,0x99999efe,0x0013df90,0x7fc037e4,0x88ffe203,
0x5ffffffe,0xff709ff0,0x2e0ffea1,0x213fe0ff,0x7ff50ffb,0x3fe1ff70,
0x46ffffff,0x0ffb84ff,0x3fffffe6,0x7ffe40df,0x3f906fff,0x37fa1bfa,
0x40ff93fc,0x03fefffe,0xfc805ff3,0x0fffffff,0xff301ff7,0x3f23fe49,
0x3ffffa4f,0xfff35fff,0x2019dfff,0x3ff806fc,0x910ffe20,0x7c09ffff,
0x227fb84f,0x0ffb85ff,0x9fee13fe,0xffb85ff8,0xffffffb0,0xb84ff817,
0xfffd987f,0x3ff6603f,0x3ab3a5ff,0xc84ffdbf,0xffa8ffff,0x3fffa604,
0x05ff303f,0xdffffd50,0xff037ec9,0x3e23fe4d,0xffffd2ff,0x3fa2bfff,
0x06ffffee,0x7ff00df7,0x981ffcc0,0x2ff402ff,0x3ffa37ec,0xfd07fdc1,
0xfe8dfb0b,0x207fdc1f,0x3fa00999,0x2206fd85,0x3fb002ff,0xffffff81,
0xffd105ff,0x001dffff,0x00001331,0x20002660,0x00000efa,0xfc86fe80,
0x806fb81f,0x3fea03ff,0x267bfe02,0x51ffec1c,0xfffa89ff,0x20ffc99b,
0x3fea3ffd,0x4dfffd44,0xe880ffc9,0x47ffb00e,0x3f204ffa,0x641fa005,
0x02deffed,0x27ffff44,0x40077440,0xd1000ee8,0x3fe0001d,0x003ba201,
0x9ff10fb2,0xf501ff70,0x33ff805f,0x5c01ffb0,0x446fffff,0xffffffff,
0xfffffc80,0x3fe20fff,0x80ffffff,0xfffffffc,0x207fa80f,0xfffffff8,
0x2bbf600f,0x4406f800,0x3fe2005f,0x1fea0009,0x5003fd40,0x3e2000ff,
0x0ff502cf,0x3fe0bfa0,0x5ffcaacf,0x453bffa0,0xfb3ffeee,0x009fff9b,
0x303bffd5,0x01bffffd,0x77ffff54,0xffffe984,0x3ffaa00d,0x9f904eff,
0xffffe980,0x7ffd400d,0x202fc401,0x3ea004fa,0x04fc8005,0x64009f90,
0x3fa0004f,0x009f906f,0xfd301ff1,0x809fffff,0xff15ffd8,0x3ff67fff,
0x0000cfff,0x30001300,0x00260013,0x53002660,0x0004c001,0x322006a2,
0x000e4c02,0x53000353,0x002a6001,0x40000a98,0x015300a9,0xa9805510,
0x22000aab,0x26666609,0x002aeaa0,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x04c00000,
0x00000000,0x01000200,0x40400001,0x00000000,0x40405500,0x10331000,
0x20005ffd,0x2601effa,0x999001cc,0x3e601999,0x801ff9af,0x3101effa,
0xfc800013,0x7fffd40f,0xfff3ffff,0xff0ff987,0x40ff985f,0x3c9cfff9,
0x27ecdf70,0x7ffffffc,0xfb37dc2f,0xfffffc89,0x447fc03d,0x3ea000fe,
0x7ecdf705,0x3fffb204,0x02ffb84f,0x2027fd40,0x801fdef8,0x00ffffff,
0x007fffa2,0x32213fea,0x266fffff,0xffe802ff,0x7ffffd41,0xdfff3fff,
0xfff0ff98,0x6c0ff98d,0x05ffffdf,0x1bfe1ffb,0x3ffffffe,0xf87fec2f,
0x7fffe46f,0x3f205fff,0x31004fff,0x3ff607fb,0xfd10dff0,0x20bfffff,
0x554002a9,0xf89fa801,0x99999802,0x00aa8801,0xfd103550,0x64ffffff,
0x4ea804ff,0xbffb9988,0x5ffff099,0xfff87fcc,0x103fe62f,0x980f2e23,
0x3e076a3d,0x099999df,0x83b51ecc,0xfeb99ffc,0x0b32a01f,0x3fffff20,
0x6d47b301,0x9adffe81,0x006204b9,0x3e200310,0x00000fee,0x4004cc40,
0x7fdc0998,0xff98a60c,0x40331002,0xfff82ff9,0x7c3fe66f,0x3fe66fff,
0x10006200,0x004ff803,0x5c7fc800,0x00c403ff,0x7ffffff4,0xffa80006,
0x3fff2005,0x3ff200df,0x64400dff,0x427fc01c,0x7e440ffb,0xc886ffff,
0x366fffff,0x008800ff,0x4ffffec8,0xff82ff98,0x1ff32ffd,0x4cbff3fe,
0xfffc80ff,0x3ff200df,0x4ff80dff,0xfb84ff80,0xf98ff90f,0xffff903f,
0x19ff701b,0xff0bfff9,0x45ffffff,0xfd001ffd,0x03ffffff,0xfffffffd,
0x03fffc03,0x3fee13fe,0x3ffffa20,0x7ff447ff,0x3f27ffff,0x00cc804f,
0xffffffd1,0xf05ff30b,0x3e6bfd5f,0xdfb5ff0f,0xffd03fe6,0xd03fffff,
0x3fffffff,0xaaaadff8,0x2e13fe0a,0x44ff90ff,0xffe80ffe,0x7c1fffff,
0x3ff7fa5f,0x7fffffc0,0x01ffa2ff,0x64ceffdc,0x6ffdc5ff,0x305ffc99,
0x7c05ffff,0x20ffb84f,0x0a60cffb,0x14c19ff7,0x017ffff5,0x3fa03ff1,
0x84b99adf,0xaff82ff9,0x0ff99ffa,0x35ff35ff,0x6ffdc1ff,0x5c5ffc99,
0xffc99dff,0x7fffffc5,0x213fe0ff,0xdff90ffb,0xf705ffff,0xbff933bf,
0xef997fcc,0x6ffc1ff9,0x3e099999,0x6ff8806f,0xff10ffd8,0x701ffb0d,
0x7c09ffff,0x20ffb84f,0xfd800ffd,0xfffc800f,0x3fe20dff,0x005ffa81,
0x3fe0bfe6,0x1ff39ff2,0x4f7ecbfe,0x0dff10ff,0x3fe21ffb,0x3e0ffd86,
0x0eeeeeff,0x3fee13fe,0xdfffff90,0xb0dff101,0x47fea1ff,0x43ff8cfb,
0x7fc404ff,0x83ff9806,0x7ff32ffa,0xfd05ff50,0x7fc0ffb9,0x320ffb84,
0xffc804ff,0xfffb3004,0x07fe21ff,0x98007ff6,0x72ff82ff,0x3e1ff5ff,
0xff9ff32f,0x2a0ffe61,0x07ff32ff,0x27fc5ff5,0x7dc27fc0,0xf73ff90f,
0x07ff30df,0x3fee5ff5,0x13fe3fd0,0xfff009ff,0x303ff500,0x07fea7ff,
0xff10ffe6,0x3e03ff75,0x20ffb84f,0x00bffffa,0x017ffff5,0x29fff710,
0x7fe81ff9,0x417fcc00,0xfbff12ff,0xfd8bfe1f,0x3ff50fff,0x3ea7ff30,
0x23ff981f,0x4ff804ff,0xff90ffb8,0x3ea17fdc,0x73ff981f,0x7cff11ff,
0x556ffc4f,0x3ffa0aaa,0x40ffdc01,0x3ff74ff8,0xfa89ff10,0xf03ff98f,
0x81ff709f,0x0dfffffc,0xdfffffc8,0x36ff9800,0x0dff05ff,0xf82ff980,
0x3ffff22f,0x7fcc5ff0,0x03ff70ff,0x3fee9ff1,0x3e4ff881,0x84ff804f,
0x4ff90ffb,0x7fdc6ff8,0xf54ff881,0x3e29f73f,0x7ffffc3f,0x3fee0fff,
0x40ffdc05,0x3ff74ff8,0xfd89ff10,0x7fc1bfe6,0x980ffb84,0x80fffffd,
0x0fffffd9,0xff36ff80,0x806ff885,0x9bffb998,0x7cc5ff09,0x85ff0fff,
0xff70fffd,0x2e9ff103,0x4ff881ff,0x266677fe,0x2e13fe09,0xc8ff90ff,
0x07fee2ff,0x7fcd3fe2,0x5ff32fda,0xeeeefff8,0x37ffe20e,0xff75b99a,
0x2e7ff303,0x3ff981ff,0x1ff927fc,0xff709ff0,0x7ffdc401,0x3ffee204,
0xb31337b4,0x0bfe69ff,0x3ea01ffe,0x3fffffff,0xfffd85ff,0xff985ff0,
0x303ff70f,0x07fee7ff,0xfff8ffe6,0x3e2fffff,0x90ffb84f,0x26ff98ff,
0xff981ffb,0xc9ffbfe3,0x027fc0ff,0xffffffa8,0x507ff55f,0x0ffea5ff,
0xff98bfea,0x3e0bfea1,0x007fb84f,0xf300dff3,0x3ffffedf,0xff50efff,
0x803ffd07,0xfffffffa,0xf985ff3f,0xb05ff0ff,0x0ffea1ff,0x7fd4bfea,
0x3e2ffa83,0x2fffffff,0x9fee13fe,0x2ffd87fc,0xff507ff5,0x46fffe45,
0x4ff83ffb,0x3fff6600,0x0dff13ef,0x3fe21ffb,0x320ffd86,0xffffffff,
0xfd85fe85,0x017fe006,0xfffdaffc,0x3ea0cfff,0x05ffb83f,0x001df300,
0x21ff9000,0xffd86ff8,0xfb0dff10,0x0efa801f,0x1bf617fa,0x86ff8800,
0x7fec0ffd,0xf80effff,0x4fd8004f,0x933bff90,0xdffc89ff,0x744ffc99,
0xffffffff,0x2a3ffd87,0x4cdec4ff,0x364ffd98,0xffd9899b,0xa83fdcc4,
0xfff883ff,0x405b99ad,0x1dd102fe,0xc8dff000,0xffc99dff,0x4ceffe44,
0xff804ffc,0xf51ffec2,0x03ba209f,0xc99dffc8,0xfff884ff,0x37fe04ff,
0x20099999,0xffd101ff,0x881dffff,0xeffffffe,0x266ffe20,0x441ffc99,
0xffffffff,0x7fffffc0,0x7fffc6ff,0xf906ffff,0x40266209,0xfffffffa,
0x4167fc05,0x7e4007fa,0x7ff443ff,0x440effff,0xeffffffe,0x167fc400,
0xfffffff1,0x01fea01f,0xffffffd1,0x13bf501d,0xffffff00,0x1be205ff,
0x9ffffb10,0x7fffec40,0x980ffb84,0xffe984ff,0xffd80dff,0x6c0bffff,
0x0bffffff,0x80003fb0,0x3effffd8,0x6437fec0,0x7ff4004f,0xffffb104,
0x7ffec409,0x3ff6004f,0x7ffff4c6,0x013f200d,0x13ffff62,0x3e002fd8,
0x2fffffff,0x08800260,0xfb004400,0x2037fc0d,0x13330009,0x00133300,
0x88000031,0x40d4c001,0x554000a9,0x80011000,0x15300008,0xa98004c0,
0x40044000,0x000000aa,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x26aa6000,0x04000400,0x17ff4404,0x017fec00,0x403dff50,
0xeff9bffa,0x009ff701,0x3fe6ffea,0x0001311e,0x02200101,0x31000000,
0x013fee01,0x903bdb10,0x80199999,0x44004ffb,0x300401a9,0x03fffffd,
0x7939fff3,0x9fb37dc0,0x400bfee0,0x02ffdfe8,0x5404ffa8,0x04ff9aff,
0x013f7bee,0x9ff35ff5,0x2000ffa8,0x013f66fb,0xff805ff3,0x8000fe88,
0xdefb83ff,0xdfd1004f,0x3ffffe01,0x37bee00f,0xfff7004f,0x07fee01f,
0xfb9bfff1,0xfffbfb03,0x87fec0bf,0x0aa606ff,0x2a88d4c0,0xa801aa80,
0x4403550a,0xa802aa2a,0x3e03550a,0x3ff6003f,0xfb80dff0,0x7ffe404f,
0xffb8004f,0x15515440,0x9809db00,0x22019999,0x7002aa2a,0x201ddfff,
0x7fdc3ffe,0x2e231002,0x51ecc03c,0x2000003b,0x00000198,0x10000000,
0x00ff9003,0x03b51ecc,0xa801ed88,0xfd0002cc,0x9801880b,0x10009999,
0x09988003,0x800ffe80,0x7fdc1ffc,0x00000004,0x3ee13fe0,0xfffd880f,
0x427fc6ff,0x13fe0ffb,0x9ff03fee,0xf901ff70,0x2201bfff,0x000002ff,
0x80000000,0xff901ff9,0x3fe01bff,0x7e405fff,0x9100dfff,0x40dfffff,
0x22004ff8,0x1efff980,0x80ffff00,0xfffffffa,0x2e13fe3f,0x7ffd40ff,
0x7fc7ffff,0x3e0ffb84,0x40ffb84f,0x0ffb84ff,0x7ffffff4,0x80dfb01f,
0xff881ffc,0x3fffff25,0xfff06fff,0x0dfb000f,0x3ffffffa,0xffeee81f,
0x3ffffa05,0x7f441fff,0x207fffff,0x91002ff9,0xfffff889,0x3fe600cf,
0x3fea02ff,0x23ffffff,0x0ffb84ff,0x2273ffe2,0x427fc5b9,0x13fe0ffb,
0x9ff03fee,0x7dc1ff70,0x5ffc99df,0x4403ff30,0x0ffc85ff,0x3ffffff2,
0xfff986ff,0x3fe2002f,0x99dffb82,0x7fc05ffc,0x33bff705,0xffb8bff9,
0xfa80a60c,0x8ff3001f,0xfffc9ffd,0xffff700e,0x7dccc409,0x3fe099bf,
0x360ffb84,0x9ff002ff,0x7fc1ff70,0x7c0ffb84,0x10ffb84f,0x1ffb0dff,
0xf9013fa0,0x227fc43f,0xfeaaaaa9,0xffffb84f,0x21ff2004,0xffd86ff8,
0x2217fe00,0x0ffd86ff,0x2a003ff6,0xcccffdcc,0x41ff9302,0x3ffa66ff,
0xffb9fd05,0x40bfe600,0x0ffb84ff,0x7c00dff1,0x20ffb84f,0x0ffb84ff,
0x7fdc27fc,0xf507ff30,0x03fee05f,0x3f25ff88,0x6ff9800f,0x0ffb9fd0,
0x7cc27fc0,0x02ffa83f,0x3fe617fe,0x322ffa83,0xffc804ff,0x44ffffff,
0x20ffffd8,0x3fa21ffe,0x5d7fc40f,0xff9801ff,0xf709ff02,0x88ffe61f,
0x27fc1999,0x9ff07fdc,0xff81ff70,0xf50ffb84,0x07ff303f,0xf900ffe2,
0x009ff11f,0x3e207ffa,0x801ffbaf,0xffa80ffa,0x203ff981,0x1ffa85ff,
0x3ea3ff98,0x5300bfff,0x3555ffd5,0x0abdffd8,0xfc8bffee,0x4c7fd41f,
0xff9803ff,0xf709ff02,0xe8bfea1f,0x3fe0ffff,0x3e0ffb84,0x40ffb84f,
0x0ffb84ff,0xff103ff7,0x2037e409,0x0ffbcff8,0x504ffb80,0x07ff31ff,
0x3ee0bfd0,0x04ff881f,0x3fee17fe,0x644ff881,0x00dfffff,0xff8817fa,
0x77ffec06,0x6fd87fe9,0x3e601bfe,0x709ff02f,0x8bfee1ff,0x3e0ffffe,
0x20ffb84f,0x0ffb84ff,0x7fdc27fc,0xf103ff70,0x17fc409f,0x13ffff20,
0xd81bfe60,0x301bfe6f,0x3fee03ff,0x204ff881,0x1ffb85ff,0xd984ff88,
0xf00fffff,0x27fcc09f,0x7ffffdc0,0x324ff83f,0x7fcc00ff,0xf709ff02,
0x20ffea1f,0x13fe0ffb,0x4ff83fee,0x7fc0ffb8,0xf70ffb84,0x07ff303f,
0x7c405fd8,0xfe800fff,0xc93fe01f,0x1bf600ff,0xf981ffb8,0x217fe03f,
0xff981ffb,0x3ffee203,0x403ff884,0xd8800fff,0xff984fff,0x300bfea1,
0x13fe05ff,0x5ff89fee,0x3fe0ffb8,0x7fc7fb84,0xff87fb84,0x3ea7fb84,
0x02ffa83f,0x3200ffd4,0xffb804ff,0xa87fe604,0x7ff102ff,0x541ffd40,
0x17fe02ff,0x3ea0ffea,0x6ff9802f,0x6c02ff98,0x4019beff,0xffc85ffb,
0x05ffffff,0xfe817fcc,0x7f46fd85,0xd07fdc1f,0xe8dfb0bf,0xe86fd85f,
0x226fd85f,0x0ffd86ff,0x5404fe80,0x7fcc02ff,0x7fffe406,0xf705ffff,
0x86ff880f,0x3fe00ffd,0xd86ff885,0xbff000ff,0xd003ff50,0x021fffff,
0x3fa17fe2,0x7fffffff,0xd817fcc0,0x13fea3ff,0x9337fff5,0x1ffec1ff,
0xffd89ff5,0x3613fea3,0x13fea3ff,0xf933bff9,0x3fee009f,0x00bfea00,
0xfe803ffd,0x7fffffff,0xf9009ff0,0x9ff933bf,0xf905ff80,0x9ff933bf,
0xd9899bd8,0x07fd84ff,0x43fffaa0,0xffecbcee,0x4cdffc42,0x441ffc99,
0x99bffb99,0x3ffffe20,0xffc80fff,0x20ffffff,0xfffffff8,0x7fffc40f,
0xf880ffff,0x0fffffff,0x7fffff44,0xff1000ef,0x017fd407,0x5555bff7,
0x26ffe255,0x41ffc999,0xe8800ffa,0x0effffff,0xe882ffc0,0x0effffff,
0x7ffffffc,0x3ffb326f,0x74310004,0x83ffffff,0xff980ffb,0x7ffffd44,
0x7f4c3fff,0x2a00dfff,0x84effffe,0x0dffffe9,0xbffffd30,0x7fff4c01,
0xffb100df,0xf90009ff,0x017fd40d,0xfffffffd,0x203feeff,0x2ff44ff9,
0xffffb100,0x3fffee09,0x6c46ffff,0xfb04ffff,0x417fffff,0x0005fffe,
0x2aeeaa20,0x7c0dfb00,0x7fffd46f,0x2603ffff,0x00998000,0x09800130,
0x40009800,0x2a200008,0x05ff500a,0x7ffffff4,0x40dfb7ff,0x005546ff,
0x7dc00880,0x6fffffff,0x4cc00220,0x00575009,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00101000,0x20199988,0x00404ffb,0x07ffd100,0x8802ffd8,0x40022000,
0x00802ee9,0x20000000,0x0efb8efb,0x204ffd80,0x00cccccc,0xb81effa8,
0x205fc8df,0x1ff9aff9,0x2027fdc0,0x1ff9aff9,0x3f66fb80,0x7fff5404,
0xefb81fff,0xfff984fd,0xe8803c9c,0x3fa201ef,0x3e602ffd,0x2ff9802f,
0x1ffffd40,0xc9cfff98,0xfd11ff03,0x3a23fe01,0x3ffea00f,0x05ffb005,
0x0ffffff8,0x2027fd40,0x8805fffb,0x5c01fffe,0x4404fdef,0xb001fffe,
0x81bfe1ff,0xfeeffffe,0x5515441f,0xfffdfd81,0x02a9805f,0x05511a98,
0x5c027fdc,0x376604ff,0xfd81ed88,0x905ffffd,0x6409ffff,0x9804ffff,
0x1551002a,0x33333300,0x20035500,0x2a2002a9,0x5154400a,0x0aa88015,
0xda8f6600,0xfffff901,0x0003ff53,0x03cb88c4,0x88006620,0x0f6c4019,
0x880f6c40,0x44620019,0x665403cb,0x02cca802,0x00006620,0x00000000,
0x00000000,0x00000000,0x27fffffe,0x7ffc1ffa,0x0005ffff,0x3ffffb20,
0x3fffb204,0x0000004f,0x00003fee,0x00000000,0x89ffffd9,0x3dfffffc,
0xffffff50,0x05fe87ff,0xbfffff90,0x30fffe07,0x427fc1ff,0x3ffe27fc,
0x1fffffff,0x207fff80,0x9ffffff8,0x7ffc1ffa,0x3fe5ffff,0x207fcc3f,
0xffffffe8,0xffffe885,0x3ffea5ff,0x7c3fffff,0x2fffffff,0x2a003fee,
0xffffffff,0x7fffffc3,0x3ffea2ff,0x443fffff,0x5ffffffe,0x7fffffe4,
0xffffa85f,0x7f43ffff,0xffff9005,0xfff0bfff,0x3e0ff98d,0x227fc84f,
0xffffffff,0x7fcc01ff,0x3ffe02ff,0x1ffa9fff,0x7fcccccc,0xf31bffe5,
0xadffe81f,0xffe84b99,0x2a4b99ad,0xffffffff,0x7fffffc3,0x03fee2ff,
0x3ffffea0,0x7ffc3fff,0x2a2fffff,0xffffffff,0x4d6fff43,0x4ffe44b9,
0x441ffeb9,0x99bffb99,0xc802ff40,0xffeb99ff,0x317fffc1,0x427fc1ff,
0x5cccc7fc,0x80199bff,0x204ffffb,0xa9fffffe,0x5ff801ff,0xf98bfffe,
0x017fea0f,0x4402ffd4,0x99bffb99,0x4cceffc0,0x83fee099,0xff733100,
0xdff81337,0x22099999,0x99bffb99,0x4017fea0,0x1ffdc7fc,0x7405ff30,
0x8ff9005f,0x7ffc3ffb,0xf83fe66f,0x207fc84f,0x74002ff9,0x2607fdcf,
0xfa9fffff,0x25ff801f,0x3e66ffff,0x007ff60f,0x2000ffec,0x3fe02ff9,
0xd8ffb804,0x3e601eff,0x013fe02f,0x3605ff30,0xff9001ff,0x2603ff98,
0x17fa02ff,0x3e63fe40,0x7feffc3f,0x7fc1ff32,0x2607fc84,0x3e2002ff,
0x201ffbaf,0xfa9fffe9,0x25ff801f,0xf32ffdff,0x003ff41f,0xf3000ffd,
0x027fc05f,0x7fff7fdc,0x5ff300ff,0x20027fc0,0xffd02ff9,0xd13fe400,
0x7fcc01ff,0x4017fa02,0x3ffa27fc,0xaff57fc0,0x37fe0ff9,0x07fdaaaa,
0xa800bfe6,0x03ff98ff,0xffa8aa88,0x3e5ff801,0xff35feaf,0xf0037fc1,
0xff3000df,0x556ffc05,0x3fee0aaa,0x03ffc9cf,0x7fc05ff3,0x00aaaaad,
0x3fe05ff3,0x3bff2006,0x4c02ffff,0x17fa02ff,0x7ff7fe40,0xaaff82ff,
0x20ff99ff,0xffffffff,0x0bfe607f,0x3fe6fd80,0x1ffa8006,0x3fe5ff80,
0xff99ffaa,0x200dff10,0x98006ff8,0x3ffe02ff,0x2e0fffff,0x13fe24ff,
0xff017fcc,0x01ffffff,0x3e20bfe6,0x3ff2006f,0x9800efff,0x17fa02ff,
0x7ffffe40,0x3e5ff00e,0x3e0ff9cf,0xfeeeeeff,0x00bfe607,0x3ff24ff8,
0x0ffd4000,0x5ff2ffc0,0x83fe73fe,0x3fe007ff,0x2ff98007,0x3bbbffe0,
0x03fee0ee,0x3fe609ff,0x3bbffe02,0xff300eee,0x801ffe05,0x6ffb9ffc,
0x202ff980,0xff9005fe,0x3e0dff73,0xff5ff72f,0x7e427fc1,0x00bfe607,
0xff50ffcc,0x1ffa8005,0x3fe5ff80,0x1ff5ff72,0xe800fff4,0x7cc001ff,
0x013fe02f,0x9ff03fee,0xf80bfe60,0x7fcc004f,0x003ffd02,0x2ffb9ff2,
0xd017fcc0,0x9ff200bf,0x2ff82ffb,0x41ffbff1,0x07fc84ff,0x6400bfe6,
0xffffffff,0x07fe4005,0xff93fe20,0x1ffbff12,0xb802ffdc,0x7cc005ff,
0x013fe02f,0x9ff03fee,0xf80bfe60,0x7fcc004f,0x00bff702,0x6ff89ff2,
0xd017fcc0,0x9ff200bf,0x2ff86ff8,0xf83ffff2,0x207fc84f,0xfd002ff9,
0xffffffff,0xdfd104c0,0xffb11c88,0xff917fc5,0x7ffc41ff,0x445b99ad,
0xb99adfff,0x405ff305,0xffb804ff,0xf9827fc0,0x013fe02f,0x2205ff30,
0xb99adfff,0x3f23fe45,0x7dccc42f,0x7f4099bf,0x4099999e,0x17fe47fc,
0xfff98bfe,0x3213fe0f,0x0bfe607f,0x266ffe20,0x881ffc99,0x2fffddff,
0x7fffffc4,0xff317fc6,0xfffa81ff,0xfa85ffff,0x25ffffff,0x9bffb998,
0x4ceffc09,0x3fee0999,0x33127fc0,0x81337ff7,0x99999dff,0x3fee6620,
0x7fd4099b,0x645fffff,0x237fcc7f,0xfffffffa,0x7ffff43f,0x3fe45fff,
0x5ff1bfe6,0x3e0fffd8,0x207fc84f,0xfb802ff9,0x84ff980f,0x3fffffe9,
0xcffffd88,0x3f617fc0,0xffd880ff,0xfb103eff,0x7d47dfff,0x3fffffff,
0x7ffffffc,0xf03fee2f,0x7fffd49f,0x7fc3ffff,0x22ffffff,0xfffffffa,
0xfffd883f,0x43fe43ef,0x3fea2ffd,0x43ffffff,0xfffffffe,0x7ec3fe45,
0xf30bfe2f,0x427fc1ff,0x3fe607fc,0x206fd802,0x2ea606ff,0x2009800a,
0x7ffcc2ff,0x2000c400,0xffff5018,0xff87ffff,0x22ffffff,0x27fc0ffb,
0xfffffff5,0xfffff87f,0x3fea2fff,0x03ffffff,0x000000c4,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x0e644000,0x8027fdc0,0x54004ffb,
0x7fcc1eff,0x1001ff9a,0xf5007ffd,0x664403df,0x26bfe601,0x1bf701ff,
0x3fa20bf9,0x6664002f,0x2a000ccc,0xf5001eff,0x7fdc03df,0x17ff4404,
0xcccccc80,0x013fee00,0x101effa8,0xffff8801,0x3f7bee01,0x7ef7dc04,
0x09ff5004,0x00ffff44,0x801efe88,0x7c404ffa,0x3a201fff,0x7dc01fff,
0xffb805ff,0x3fffe002,0xff5000ff,0x27fd4009,0x13f7bee0,0x200bfee0,
0x00ffffff,0x009fbdf7,0xfd709ff5,0xf701bfff,0x2a207f11,0x54402aa2,
0x2a002aa2,0x0aa8801a,0x800aa600,0x8fb801aa,0x554403f8,0x00553000,
0x3300154c,0x54003333,0x0d54001a,0x0aa8aa20,0x9802a980,0x51019999,
0x2a005545,0xfdfff01a,0xbfa81dff,0x000003fb,0x00000000,0x40000000,
0x003fbbfa,0x00000000,0x00000000,0x00000000,0x00000000,0x3ee05c00,
0x85ffd82f,0x57ee05fc,0xff881ffc,0x3fffff25,0x3ff26fff,0x06ffffff,
0x3fffffe6,0xf30fffe3,0x17ff601f,0xfffffff8,0x7ffffc2f,0xfff801de,
0x1fffe007,0x207fff80,0xff881ffc,0x00ffff05,0xffffffff,0xffffff85,
0x7fffc2ff,0x7fc2ffff,0x02ffffff,0x0881ffc4,0x7dc0bf90,0xf90bff14,
0x7fffe41f,0x3f26ffff,0x6fffffff,0x3fffff20,0x31bffe3f,0x00cc01ff,
0x3ffffffe,0x7ffffc2f,0x3e604fff,0xf9802fff,0xf9802fff,0xff102fff,
0x301ff90b,0xf805ffff,0x2fffffff,0x7ffffffc,0x7ffffc2f,0x7ffc2fff,
0x442fffff,0x74ffcccb,0x74ff81ff,0x927e40bf,0x27fc43ff,0x3aaaaaa6,
0x2aaa64ff,0x204ffeaa,0xff04feff,0x07fcc5ff,0x37ffffae,0x999dff80,
0x4e7fc099,0x702fffb9,0x7009ffff,0x7009ffff,0x6409ffff,0x13fe21ff,
0x027fffdc,0x266677fe,0x4ceffc09,0x6ffc0999,0x7c099999,0x099999df,
0x3ffffff2,0xf81ff74f,0x640df74f,0xc97fe24f,0xff9800ff,0x06ff9806,
0x413f3bea,0x3e66ffff,0x7f7ffc0f,0x27fc0eff,0x7c44ff80,0xfb9fd07f,
0xfb9fd00f,0xfb9fd00f,0x92ffc40f,0x33fa01ff,0x27fc07fd,0xf004ff80,
0x13fe009f,0x333bff70,0x03fee9ff,0xc9bea9ff,0xff90ff26,0x2009ff11,
0xfe801ffe,0x32ff601f,0xffbff04f,0x1703fe65,0x7fc2ffb8,0xb09ff004,
0xaff883ff,0x3e201ffb,0x201ffbaf,0x1ffbaff8,0x3e23ff20,0x75ff104f,
0x27fc03ff,0xf004ff80,0x13fe009f,0xff88ffb0,0xff81ff74,0x3fe2df54,
0xff887fb2,0xb800ffbc,0xffb804ff,0x323fe204,0x3fe099df,0x1ff35fea,
0xf87ff100,0x0aaaaadf,0x7fdc27fc,0x7cc7fd42,0x23fea03f,0x3ea03ff9,
0x203ff98f,0x0ffbcff8,0xff31ff50,0x556ffc07,0x6ffc0aaa,0x7c0aaaaa,
0x0aaaaadf,0x55556ffc,0x263ffb0a,0x1ff74ffe,0x2df34ff8,0x05fb4ffa,
0x009ffff9,0xf300dff3,0x95fc80df,0x7fc5ffff,0xff99ffaa,0xfcccb880,
0x7ffffc4f,0x27fc0fff,0x3f61ffd4,0xfd81bfe6,0xfd81bfe6,0xf901bfe6,
0x7ec09fff,0xff81bfe6,0x40ffffff,0xffffffff,0x7fffffc0,0x7fffc0ff,
0xff70ffff,0x29fdffdf,0xa7fc0ffb,0x2fffb7f9,0xfff882fd,0x1ffe800f,
0x401ffe80,0xddff92ff,0xcff97fc3,0x7fe40ff9,0x7c4fffff,0x0eeeeeff,
0x7fd427fc,0xff927fc2,0xfc93fe01,0x649ff00f,0x3fe200ff,0x93fe00ff,
0xfff00ffc,0xf81ddddd,0x0eeeeeff,0x77777ffc,0x777ffc0e,0x3ff20eee,
0xf74fd9ef,0xf14ff81f,0x367fbbef,0x09ff901f,0x7009ff70,0x7fa809ff,
0x97fc13f2,0x20ffaffb,0xf999dffb,0x8027fc4f,0x1ffb84ff,0xffa87fe6,
0x2a1ff982,0x1ff982ff,0xf900bfea,0x0ffcc09f,0x3fe05ff5,0x009ff004,
0x7fc013fe,0x7cc26004,0x5c1ff70f,0xf5ff14ff,0x03fd9f97,0xf300bfea,
0xdff300df,0xfddffb00,0x44bfe09f,0x360ffdff,0x227fc47f,0x9ff004ff,
0x7e41ffb0,0x5fffffff,0xffffffc8,0xfffc85ff,0x405fffff,0x3f202ffa,
0x5fffffff,0x3e009ff0,0x09ff004f,0x40013fe0,0x33fea3fe,0xf14fffb8,
0xddf33fbf,0x0bfea01f,0xd003ffd0,0xff8803ff,0xf04fffff,0x7fffe45f,
0x74c7ff60,0x027fc4ff,0x7fd44ff8,0x7fffff45,0xffe87fff,0x87ffffff,
0xfffffffe,0x17fd407f,0xffffffd0,0x13fe0fff,0xf8027fc0,0x09ff004f,
0x44b7fe00,0xfeffffff,0xff9bffe4,0x5ff500ff,0x556ffdc0,0x3fee2aaa,
0x22aaaaad,0xfd999efb,0x8bfe099d,0x2e0ffff9,0xfeffefff,0x4cceffc4,
0x4e7fc099,0x220fffca,0xc9999bff,0x2ffe21ff,0x1ffc9999,0x2666ffe2,
0x2a01ffc9,0x7ff102ff,0x3ff93333,0x3333bff0,0x99dff813,0x6ffc0999,
0x7c099999,0x099999df,0xf53ffe40,0x49fb3dff,0x3ff24fff,0x05ff500f,
0x7ffffff4,0x3fffa7ff,0x3a7fffff,0x7fffe43f,0xffb0bfe4,0xefffc81f,
0x7ffc4fd9,0x7c2fffff,0x1effffff,0x7cc07fdc,0x203fee4f,0x3fee4ff9,
0x204ff980,0xff702ffa,0xf09ff301,0x5fffffff,0xfffffff8,0x7ffffc2f,
0x7ffc2fff,0x802fffff,0x401981a8,0x3fea1ffe,0x80bfea07,0xfffffffe,
0x3ffffa7f,0xff37ffff,0x4ffffc81,0xfff30bfe,0x3e002601,0x2fffffff,
0x1ef7fffc,0x3fe06fd8,0xff81bf66,0xff81bf66,0x40bfea06,0x1bfe06fd,
0x3ffffffe,0x7ffffc2f,0x7ffc2fff,0x7c2fffff,0x2fffffff,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x0bffa200,0x07bfea00,0xa8027fdc,0x06209803,0x10006e60,
0x4013fa33,0x33000999,0x40098801,0x02006209,0x00330660,0x44266001,
0x104c4099,0x28826013,0x88001980,0x04cc4199,0x7dc00260,0x3fea002f,
0x3f7bee04,0x027fdc04,0x01fe67fe,0xf7001ffe,0xb003ff1f,0x3e2009ff,
0x3ffe203f,0x3e67fe01,0x9fffb307,0x7ec77dc0,0x3f637ee3,0x3ff601ef,
0x440dff99,0x80ef9afe,0x09ff0ffb,0x3002ffdc,0xfe983dff,0x37ffe01f,
0x00154c02,0x15440355,0x7fdc0155,0x7fffdc04,0x07ffc404,0xdf5ff700,
0x005ff900,0x0fffffff,0x01ff9fd1,0x213fffee,0x6ffefffa,0x70ffff20,
0xfffffddf,0xf13ff701,0x7ff4409f,0x11ff900f,0x37ee09ff,0xff9804fd,
0x3ffb100d,0x1bffffe0,0x00000000,0x50019900,0x36a007bb,0x57fdc002,
0x0664c02c,0xeffeee80,0x7951cb85,0x441eed40,0x7ff50cff,0x7dc1e5c0,
0x3ffc9cff,0x05971cc8,0xb8039910,0x32202e62,0xb803970c,0x0997003c,
0x97ffeea6,0xfffffffa,0x3fffea3f,0x3ea3ffff,0x3fffffff,0x00200040,
0x1fee0000,0x7c400000,0x4400003f,0xd81ff700,0xff70006f,0x0027fc49,
0x00000800,0x00000000,0x21ffd100,0xfffffffa,0x3fffea3f,0x3ea3ffff,
0x3fffffff,0x04fffd98,0x013fff66,0x83dfffd7,0x7ffffec8,0xdfffd700,
0x3fff6a03,0x3fae03ff,0x7f5c1eff,0x3f60dfff,0x7feccccf,0x3dfffd70,
0x9ff03fee,0x3fe07fdc,0x3fff6604,0x7c0ffb84,0xf03fee4f,0x207fdc9f,
0x07fdc4ff,0x7fe413fe,0x7ff73312,0x5ccc4133,0x22099bff,0x99bffb99,
0x7f7ffd40,0xefffa86f,0xffe886ff,0x3e61ffff,0x07ffffff,0x7fffff44,
0xffffc81f,0xfe883fff,0x7c1fffff,0x0efffeff,0xfffffffd,0xfffe88ff,
0x1ff71fff,0x3fee4ff8,0xfa827fc0,0x5c6ffeff,0x727fc0ff,0x24ff81ff,
0x27fc0ffb,0x9ff03fee,0x2607ff60,0xff9802ff,0x02ff9802,0x3ea19ff1,
0x433fe23f,0x7fe43ffa,0x3a1c99ad,0x01ff22ff,0x9335bff9,0x10dffa83,
0xbff907ff,0x0b839335,0xefd97fdc,0x41999999,0xc99adffc,0xff81ff71,
0xff03fee4,0x219ff109,0x3fee3ffa,0xff727fc0,0x3ee4ff81,0x2e27fc0f,
0x527fc0ff,0x260dffb5,0xff9802ff,0x02ff9802,0x6fd81ff7,0xdfb03fee,
0x2a037fc4,0x03fdc3ff,0x3a00dff1,0x0ffe20ff,0x4000dff1,0x1ff93ff8,
0x80dff100,0x27fc0ffb,0x4ff81ff7,0x7ec0ffb8,0xff03fee6,0x3e07fdc9,
0xf03fee4f,0x40ffb89f,0x3fffe4ff,0x05ff300e,0x3005ff30,0x3ff605ff,
0x27fecccc,0xeccccffd,0x00bfea7f,0x7fb81ff7,0x400bfea0,0x1ffc45ff,
0x8800bfea,0x54ffcccb,0x20881bff,0x7dc02ffa,0xf727fc0f,0xd84ff81f,
0xfeccccff,0xff03fee7,0x3e07fdc9,0xf03fee4f,0x40ffb89f,0x0b7fe4ff,
0x3005ff30,0xff3005ff,0x3ffffa05,0x3fa7ffff,0x7fffffff,0xfb007fee,
0x5c0ff70f,0xff8801ff,0x2e1ffc44,0xff9001ff,0x6c9fffff,0x2ffeefff,
0xf7007fee,0x2e4ff81f,0x427fc0ff,0xfffffffe,0xf03fee7f,0x207fdc9f,
0x03fee4ff,0x0ffb89ff,0x05ff27fc,0x3005ff30,0xff3005ff,0x267bf605,
0x3f619999,0x1999999e,0xf900bfee,0x207fb81f,0xf8802ffb,0x21ffc45f,
0xfb802ffb,0x4ff999df,0x77ffffdc,0x700bfee2,0x24ff81ff,0x27fc0ffb,
0x4cccf7ec,0x03fee199,0x07fdc9ff,0x0ffb93fe,0x3fee27fc,0x39727fc0,
0x005ff300,0xf3005ff3,0x03ff205f,0x2003ff20,0x7dc05ff9,0x81ffa21f,
0xff005ff9,0x4c3ffb8d,0x7fd805ff,0xe8827fc4,0x05ff984f,0x07fdc000,
0xff909ff7,0x41ff7001,0x3fee4ffb,0xfb93fee0,0x713fee0f,0x27fdc1ff,
0x17fcc002,0x4017fcc0,0xff502ff9,0x3ea0881b,0x3a0440df,0x1b989dff,
0xfd31bff3,0xdffe80ff,0x7ec1b989,0x3fffb8bf,0x989dffe8,0x4c7ff61b,
0xff304ffe,0x44efff40,0x0ee881b9,0xf719ff50,0xbff509ff,0x3fea0881,
0x24fffb8c,0xffb8cffa,0x233fea4f,0x7d44fffb,0x4fffb8cf,0xf3009ff1,
0x5ff3005f,0x405ff300,0xffeefffd,0x777ffec2,0x7ffcc2ff,0x3f62ffff,
0x07feffff,0x7fffffcc,0x7fffcc2f,0xf983feff,0x22ffffff,0xeffefffb,
0x35ff704f,0xffffff30,0x40ff505f,0xeffffff8,0xdfffb04f,0x7fc45ffd,
0x24feffff,0xeffffff8,0x3fffe24f,0x7c44feff,0x4fefffff,0x2620fff7,
0x099bffb9,0x2ffee662,0x2e662099,0xb8099bff,0x82ffffff,0x2ffffffb,
0xeffffd88,0x2ffff621,0xfd8807f9,0xfa81efff,0x03fd8eff,0x3dffffb1,
0xd9efffc8,0x7fff104f,0x3ffff620,0x404fc81e,0xfd9efffa,0x3fffee04,
0x7ffd42ff,0x7d44fd9e,0x44fd9eff,0xfd9efffa,0x9efffa84,0x09ff14fd,
0x3fffffea,0x3ffea3ff,0x2a3fffff,0xffffffff,0x00266203,0x44002662,
0x0004c401,0x04400620,0x98018800,0x054c4000,0x2a600c40,0x00033000,
0x33002662,0x3000cc00,0x40198003,0x3ffea018,0x2a3fffff,0xffffffff,
0x3ffffea3,0x00003fff,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00988000,0x44028826,
0x0198000a,0x88333100,0x98000099,0x00999809,0x100006e4,0x033014c0,
0x804c4131,0x2600a209,0x19988001,0x00004cc4,0x0cc0bfb0,0x41300300,
0x7f900028,0x7fc3fee0,0x3bfff504,0x5ffb809b,0x0f7fcc00,0x0007ffa6,
0xff709ff0,0x7cc1fb9d,0x8dfb804f,0x7ec1effd,0x427dc2ff,0x0ef9afe8,
0x9ff0ffb8,0x002ffdc0,0xe983dff3,0x130001ff,0xffb817fc,0x3fffee05,
0xf0ffb84f,0xfe98009f,0xf11ff901,0x3b3b609f,0x3ee04fff,0xf3004fdd,
0x3f6201bf,0x3fe0001f,0x7fffed44,0x02ff40ff,0x7fff77dc,0xf5bf50ff,
0x8807fc4b,0xf900fffe,0x209ff11f,0x804fddfb,0xb100dff9,0x7d4003ff,
0x2e0ff11f,0xfd84fddf,0xc84feeff,0x04ff88ff,0x0ffffeb8,0x00b98ae0,
0x2203cb82,0x003970cc,0x32e00797,0x13fe0004,0x09fffffb,0x3ee00ff2,
0x3ffc9cff,0x6c3f65f9,0x0e64402f,0x80b98ae0,0x03970cc8,0x97003cb8,
0x8ffdc009,0x0cc883c9,0x2ffc4397,0x2e62b804,0x7fffec00,0x001006ff,
0x00100010,0x00100010,0x46a27fc0,0x7f40fff8,0x49ff7005,0x25f74ff8,
0x005fb8fe,0x80010006,0x40004000,0x07fee000,0x7fcc0600,0x0044000d,
0xff8cffa8,0xffd704ff,0x7f5c019f,0x3ae00cff,0x2e00cfff,0x200cfffe,
0x00cfffeb,0x3fffff6a,0xffffea84,0xb80815c4,0x8a7fc0ff,0xff8efcef,
0x7fffdc00,0xfffb304f,0x7ffecc09,0x3fff6604,0x7ffecc04,0xfffff504,
0x2e07ffff,0x7c4fffff,0x2e02dfff,0x00dffffe,0x677cdbfa,0xffffd87f,
0xffd80fff,0xd80fffff,0x0fffffff,0xffffffd8,0xffffd80f,0xffc80fff,
0x6c4fffff,0x0fffffff,0xfffcbfcc,0xff03fee3,0x6c77f5c9,0x7ffec02f,
0xffa84fee,0xfa86ffef,0xa86ffeff,0x06ffefff,0xdffdfff5,0xffffff50,
0xffb07fff,0xe989fddf,0xf82fffff,0x0efffeff,0x2ff27ff0,0x3fea0ffa,
0x44ffda9d,0xfda9dffa,0x4effd44f,0x7d44ffda,0x4ffda9df,0x6d4effd4,
0x6ffd44ff,0x7d49ff10,0x87ff50df,0xffffdff9,0xf81ff71f,0x0bf5084f,
0x4085ff88,0xff50cff8,0xa867fc47,0x33fe23ff,0xf887ff50,0x87ff50cf,
0x9affb998,0x2ffc4099,0xffec9804,0x3ee05c1f,0xf2ff882f,0x743ff31f,
0x747fe86f,0x747fe86f,0x747fe86f,0x747fe86f,0x747fe86f,0xd27fc0ff,
0x37fc41ff,0x2a77ffe6,0x81ff74ff,0x1ff104ff,0x00dff980,0x3f607fdc,
0xfb03fee6,0x3607fdcd,0x207fdc6f,0x3fee06fd,0x06ffcc01,0x01ffe400,
0xff81ffc4,0x1ff55fab,0x7fe427fc,0x3f213fe0,0x3213fe0f,0x213fe0ff,
0x13fe0ffc,0x5ff83ff2,0x17fe4ff8,0xdff31ffa,0x1ff76fe8,0x5fb04ff8,
0x7ffc0131,0x9ffb02df,0x6cffd999,0xfeccccff,0x3333ff67,0x7fec7fec,
0x07fecccc,0x3e007fee,0x1882dfff,0xb881ffc8,0xd04ffccc,0x3f27f9bf,
0x2e0ffe27,0x07ff11ff,0x3fe23ff7,0xf11ffb83,0x23ff707f,0xffb83ff8,
0xff09ff11,0x3613fe29,0x217fcc7f,0x81ff76fd,0x9dfa84ff,0xfd305fff,
0xfe85ffff,0x7fffffff,0x3ffffffa,0x3fffa7ff,0x747fffff,0xffffffff,
0x007fee07,0x3fffffa6,0x3fbbfea2,0xfffc86ff,0xf904ffff,0x9ff51fff,
0x7dc2ffc4,0x70bff10f,0x17fe21ff,0x7fc43fee,0xf10ffb85,0x21ff70bf,
0x4ff84ff8,0xffd0bff1,0x7ec2ff98,0xff81ff76,0x7f47fc44,0x32602fdb,
0x3f61fffe,0x1999999e,0x26667bf6,0x27bf6199,0x6c199999,0x999999ef,
0x007fee01,0x1fffec98,0x9ffffff3,0x99dffb81,0xfd104ff9,0x81dfffff,
0x47fe87ff,0x47fe87ff,0x47fe87ff,0x47fe87ff,0x47fe87ff,0x27fdc6ff,
0x5ff88fff,0x3f617fcc,0x21ffcc06,0x3e6df3fc,0x47ff9004,0xfc800ffc,
0x0ffc800f,0x001ff900,0x0005ff50,0x3310fff2,0x223fec03,0x3fa204ff,
0xff904fff,0x89ff913b,0xfc89dffc,0x4effe44f,0x7e44ffc8,0x4ffc89df,
0x644effe4,0x97fec4ff,0x3f64fffb,0x3ffd89cf,0x3f617fcc,0x517fe406,
0x4f9bfcbf,0x0ffe40c4,0x0881bff5,0x11037fea,0x2206ffd4,0x206ffd40,
0x37fe6008,0xf9031020,0x01dd103f,0x7f4c7ff6,0x27fe204f,0x7fffc400,
0x7c40efff,0x0effffff,0x7fffffc4,0x7ffc40ef,0x440effff,0xefffffff,
0x7ffffcc0,0x3fe24fef,0x986fffff,0x837ec2ff,0x3a26fff9,0x3fb3f20f,
0x7f77fd42,0xfffd86ff,0x7ec2ffee,0x42ffeeff,0xffeefffd,0xeefffd82,
0x7ff402ff,0x7fd43fef,0x506fffee,0x7ffdc0ff,0x204feffe,0x362005fa,
0x2204ffff,0x204ffffd,0x04ffffd8,0x13ffff62,0x4ffffd88,0x27bffea0,
0x7ff444fc,0xff980cff,0xfa837ec2,0x10ff20df,0xff309ffb,0x2019ffff,
0x2ffffffb,0xffffffb8,0xfffffb82,0xffff702f,0xfe9805ff,0x7fcc3fff,
0x900cffff,0xfffc809f,0x2604fd9e,0x0130001a,0x4c000980,0x0004c000,
0x01880026,0x3e600cc0,0x8837ec2f,0x8008001a,0x22001998,0x99880099,
0x00998800,0x80013310,0x26200998,0x00a98019,0x00000130,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x54400000,0x000cc000,0x2620ccc4,0x2a620009,0x00033101,0x4cc40000,
0x9884cc01,0x40022009,0x008000a8,0x00040000,0x0980ccc4,0x22098062,
0x44033001,0x00019999,0xff500662,0x5c09b3bf,0x3e6005ff,0x7ff4c1ef,
0x7ffe4401,0x07fdc1ef,0x33fff200,0x77fcc000,0x267ff601,0xffb80dff,
0x542fffff,0x44d9dfff,0x4fffbaff,0x3bfff6a0,0xfb1bf74e,0x3e6005df,
0x33ff01ef,0x4cffc0ff,0x5ffb807f,0x0fffffb0,0xffffd900,0x3fb3b609,
0xbbf704ff,0xbff3009f,0x07ff6201,0xffdeffd8,0x003fee0f,0x5fffffe8,
0x037fe600,0xff89ffb8,0xffdffb04,0xced85fff,0x7fc4fffe,0x84fffffe,
0xfffffffc,0xfffddf74,0xff9803ff,0x3ffee00d,0x3ffee04f,0x6efdc04f,
0xffeec84f,0x3ffa2007,0x8205ffff,0x199103cb,0x7970072e,0x4c132e00,
0x8bfea4ff,0xf5000ffb,0x007fee3f,0x66401e5c,0x3e605971,0x081bf22f,
0x3ffe0f2e,0x547fe8ae,0x9ff10dff,0x2a73ffee,0x1e5c05ff,0x803dda80,
0x64403dda,0x6403970c,0x3ffa007f,0x804b99ad,0x00220008,0x04400088,
0x3ea1ffa8,0x083fee1f,0xff89bf20,0x00040402,0x98ff5001,0x7c0000ff,
0xd1fee0ff,0x74ff81ff,0x0ffd89ff,0x000000c0,0x90000004,0x3fea00ff,
0x7ff5c005,0xfeb80dff,0xeb80dfff,0x700dffff,0x41bffffd,0xdff10ffb,
0xffd8ffb8,0x70ffb82e,0x3ff601ff,0x02ffeacf,0x019fffd7,0x7fa87fea,
0x7fc0ffb8,0x55313fe4,0x4ff85ff8,0xffb81ff7,0xfffffb81,0x7c0ffb84,
0xfffeb84f,0xfffff00c,0x00ff900b,0xf0007ff6,0x1dfffdff,0xfffefff8,
0x7f7ffc0e,0xfff80eff,0xf70efffe,0x81dfd11f,0xffffeffb,0x5effc41f,
0xddf103ff,0x3ffdffff,0xffffffd8,0x97dfd00f,0x1ff70bff,0x13fe4ff8,
0x3e13fe20,0xb81ff74f,0x7ffec1ff,0xffb84fee,0x3f627fc0,0x80ffffff,
0x805fffff,0xffd007fc,0xfb817000,0x3ee05c2f,0x3ee05c2f,0x7dc0b82f,
0xf71ff72f,0x9fff703f,0xf90bff53,0x14407fff,0x93f69ff3,0xfda9dffa,
0xffffd04f,0x1ff701bf,0x13fe4ff8,0x3e13fe20,0xc81ff74f,0x17fe20ff,
0xf03fee02,0x4effd49f,0x9984ffda,0xfc805ff9,0xff066cc7,0x3e20000d,
0x3ff8803f,0x003ff880,0x3fee7ff1,0xfb82ffb8,0x207fec4f,0x5512fffc,
0xf51ff801,0x7f437f4b,0x9a8dfb87,0xf03fee00,0x8027fc9f,0xa7fdc6ff,
0x3ff40ffb,0x20037fe6,0x27fc0ffb,0x0ffd0dfd,0xfc805ff8,0x453ffe27,
0x710006ff,0x109ff999,0x09ff9997,0x9ff99971,0x3f332e20,0xf31ff74f,
0x0ffb85ff,0xffb0ffdc,0x1ff31ffd,0x99ff9530,0x427fcdfb,0x77e40ffc,
0x0ffb8009,0x09ff27fc,0x7dcbff60,0x41ff74ff,0xfff83ffc,0x3fee02df,
0x9ff27fc0,0x7c01ff90,0x27fc805f,0x3fe6fff9,0xfffc8007,0x7e44ffff,
0x44ffffff,0xfffffffc,0xfffffc84,0x21ff74ff,0x3ee3fffb,0x98ffdc0f,
0xaeff9aff,0xffffd87f,0xf16fffff,0x83ff707f,0xeffffff9,0x207fdc0c,
0x013fe4ff,0x7fffffcc,0xdfff74ff,0x3a60dfff,0xb82fffff,0x8a7fc0ff,
0x1ffb83ff,0x32017fe0,0xd17ff47f,0x7dc003ff,0x4ff999df,0x26677fee,
0x37fee4ff,0x5c4ff999,0xff999dff,0x7d41ff74,0x81ff71ff,0x4ff90ffc,
0x5c6ffffa,0x99ff99ef,0x0bff1099,0xfe881ff7,0x46ffffee,0x27fc0ffb,
0x7d4009ff,0x74ff9eff,0x07ffffff,0x3fffd930,0x7fc0ffb8,0xf70bff14,
0x02ffc01f,0x20d43fe4,0x36005ffb,0xb27fc47f,0x24ff88ff,0x27fc47fd,
0x9ff11ff6,0xff703fee,0xfd03fee7,0x3f23fe4f,0xf1fec2ff,0x43ffc03f,
0x86fe87fe,0x3fee1ffc,0x0013fee0,0x29ff0c40,0x00018ffb,0xff70fff2,
0xff27fdc1,0xf80ffd0f,0x07fc805f,0x35bfff10,0x3ffb0b73,0xfd93ffa6,
0x49ffd31f,0xffd31ffd,0xd31ffd89,0x03fee9ff,0x3fee5ff5,0xfa8fff20,
0x0bffe64f,0x13fee9f9,0x44effe41,0x7fc44ffc,0x2a0ffb84,0xfffb8cff,
0x000ee884,0x3fee9ff0,0xf9031000,0x8cffa83f,0x3f24fffb,0x4ffc89df,
0x6402ffc0,0x3fea007f,0xb85fffff,0xfeffefff,0x3fbffee4,0x3fee4fef,
0x44feffef,0xeffefffb,0xf91ff74f,0x3ee1dffd,0x86fffeff,0xfffffffe,
0x3bfea1ff,0x2fdeffef,0x3fffffe2,0xcfff80ef,0x445ffcaa,0xfeffffff,
0x0007fa84,0x07fdd3fe,0xfeeffa80,0xfff886ff,0x224fefff,0xefffffff,
0x7ffffdc0,0xfff16fff,0x03ffffff,0xeffffd88,0x3dfff903,0xfffc89fb,
0x7e44fd9e,0x84fd9eff,0xfd9efffc,0xff91ff74,0x7fecc1bf,0xf9103fff,
0xdff39fff,0xfbaffec1,0x7ec42fff,0x3a604fff,0x04ffffff,0xfb3dfff5,
0x0009f909,0x0ffba7fc,0xfffff300,0x3fea019f,0x444fd9ef,0x704ffffd,
0xffffffff,0x3ffffe2d,0x2001ffff,0x00260018,0x02600098,0x88001300,
0x40018801,0x10220019,0x00130033,0x00555d4c,0x0a9800cc,0x44266000,
0x99880019,0x00066001,0x00000013,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x10000bf9,0x88004c43,0x26660199,0x80ff7099,0xdddb0019,0x4cc400dd,
0x8004cc41,0x00262098,0x00a0cc00,0x01988035,0x80ccc400,0x0cc000a8,
0x19804c40,0x03300988,0x80004cc4,0x909ff2fe,0x15fb01ff,0xff3003fd,
0x7fffc03d,0xb109fb5f,0xdfffffff,0x0ffffff0,0x107bfe60,0xd1005ffb,
0x401df35f,0x41efffeb,0x0bfb1ff9,0xb75dfff1,0x0001ffa8,0xf505ffd1,
0x409b3bff,0xf9105ffb,0x449f707f,0x4fb83ffc,0x7ffffe44,0xf897fa06,
0xf909ff0f,0xffff301f,0x1bff300b,0x5ffeee80,0xfff983ff,0x06ffffff,
0x37fe6000,0x00bfee00,0x403fffa2,0xffffffe8,0xfe97fd41,0xffecfb86,
0x3ffffe6f,0xfd1000ff,0x3b3b603d,0xbf704fff,0xfdf309fb,0x260ff887,
0x7fc43fef,0x3ffffa20,0x97fa07ff,0x213fe3c8,0xb9300ffc,0x00f2e007,
0x13237fe0,0x2fecbff6,0x65c00100,0x01993003,0x64039910,0x1c99adff,
0x407223b8,0xff82f2a1,0x000fffff,0x5c100795,0x2199103c,0x3fc881cb,
0x7e4417ec,0x3ee17ec3,0xe80a60cf,0x427fc05f,0x00000ffc,0x5ff80008,
0xfd8ffe20,0x7ffecc05,0x00002004,0x7fc40200,0x00000006,0x0001ffa8,
0x00004000,0x5fb8ff20,0x5fb8ff20,0x4000ffd8,0x27fc05fe,0x3fe07fe4,
0x3fe05fff,0x004fffba,0xffa817fe,0xfa817f61,0x5c6ffeff,0x1effd8df,
0x0bfffff0,0x7ffdd7fc,0x8017fd44,0x205fffff,0x505fffff,0x059733ff,
0x817ffffe,0xeffd8dfb,0xfa813fa1,0xff89fe47,0x7c4ff200,0x04ffc80f,
0x3e02ff40,0x40ffc84f,0x205fffff,0xfffffeff,0x40bff004,0x4efec7fb,
0x433fe209,0x3bee3ffa,0x80fffffe,0x205fffff,0xfffffeff,0x4007fee4,
0x205fffff,0x505fffff,0xbffff7ff,0x0bfffff0,0x7fff77dc,0x40bfb0ff,
0xd9fe45fb,0xd9fe402f,0xffff502f,0x0bfd0017,0xffc84ff8,0x2ffcccc0,
0xd15dfff0,0x17fe00ff,0x7fec7fc8,0x03fee4ff,0x7ffdcdfb,0x983ffc9c,
0x3e05ff99,0x7fe8aeff,0x4c00bfea,0x2605ff99,0xf505ff99,0x3fff9fff,
0x05ff9998,0x3273ffee,0x40df93ff,0x17ea04fc,0xc80bf500,0x00dfffff,
0x9ff017fa,0x7c01ff90,0x83ffe05f,0xbff007fb,0x3f63fe40,0x3ff63eef,
0x27fecccc,0x3fe24ffb,0xf02ffc04,0x13fdc1ff,0xff000bff,0x417fe00b,
0xff30fffa,0x702ffc05,0xa7fc49ff,0x23dd17fa,0x1ff103fd,0x007fc400,
0x7ffffecc,0xf80bfd00,0x00ffc84f,0x4ff817fe,0xff80154c,0xfb1ff205,
0x3ffffa0b,0x3ee7ffff,0x2027fc0f,0x13fe05ff,0xdffd8553,0x3e01b989,
0x0bff005f,0xff88bfea,0xb817fe03,0x9a7fc0ff,0xd4ffa8ff,0x22bf605f,
0x32fd8019,0xffb88013,0x80bfd04f,0x0ffc84ff,0xff817fe0,0x2ffc0004,
0x7ec3ff70,0x333dfb05,0x7fdc3333,0x3e027fc0,0x013fe05f,0x7fffff4c,
0x017fe02f,0xffa82ffc,0xf80ffe21,0x03fee05f,0x27fe29ff,0x03ff6ffd,
0xffff3bf5,0x7d57ea01,0xdff3005f,0xff017fa0,0xf80ff909,0x013fe05f,
0x4c0bff00,0x417f63ff,0xfb800ffc,0x2027fc0f,0x13fe05ff,0xdffff700,
0x802ffc03,0x3ff505ff,0xff01ffc4,0x207fdc0b,0x3ebfe4ff,0x40ffafff,
0xfb370ff8,0xf11ff105,0x7fc00bfb,0xf80bfd05,0xdfd1134f,0x3e05ff80,
0x7fc0004f,0x457ff405,0x2a099dfe,0x70440dff,0x04ff81ff,0x9ff02ffc,
0x009fd000,0x7fc017fe,0x443ff505,0x17fe03ff,0x7fc0ffb8,0x337fbfa4,
0x3fc87fdf,0x7e40ff44,0xd8bf3f93,0xffd9899b,0x333dfd04,0x753fe133,
0x7c03ffff,0x013fe05f,0xa80bff00,0xffffffff,0x77ffec6f,0x3fee2ffe,
0x3e027fc0,0x013fe05f,0x2001ff10,0xbff005ff,0xf887fea0,0x817fe03f,
0x27fc0ffb,0xff35fffb,0x445fa8df,0x35fa83fe,0x7c5df9df,0x6fffffff,
0x3fffffa0,0x369ff5ff,0xffb83fff,0x46ffffff,0x7dc004ff,0x6fffffff,
0xfffffd30,0xfff70dff,0x7fdc5fff,0x3ee27fc0,0x6fffffff,0x260027fc,
0x3ffee05f,0x2e6fffff,0xffffffff,0xf887fea6,0x3fffee3f,0x7dc6ffff,
0xf927fc0f,0x97ffe1ff,0x3fe60fe8,0x43fa22ce,0x24fffffa,0xbffffffd,
0x3ffffa00,0x02205fff,0xffffffb8,0x027fc6ff,0x3ffffee0,0x09806fff,
0x404cc400,0x27fc0ffb,0x3fffffee,0x027fc6ff,0xfb802620,0x6fffffff,
0x3fffffee,0x87fea6ff,0x3fee3ff8,0x46ffffff,0x27fc0ffb,0x7fe4bff7,
0xff50ff24,0x81fe4bff,0x133305f8,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x1bbbbb60,
0x004ccccc,0x440d54c4,0x30026209,0xff11ff20,0x88018807,0x98826209,
0x6c06601a,0x3106eeee,0x54000033,0x80000003,0x27fc0ffb,0x44000220,
0x00c40199,0x98000331,0xfff001aa,0x3ffe0fff,0x3fa205ff,0x7441ffff,
0xb80ef9af,0x324fffff,0x81ffc47f,0x00dffffb,0x1df35fd1,0x5c37ffd4,
0xfffff04f,0xffffe88f,0x05fd304f,0xff827fdc,0x307fffff,0x5c1fffd9,
0x827fc0ff,0x004fffec,0x6407bfe6,0x5c0dffff,0xfa8000ff,0xfd31ffff,
0x77740005,0xfff105ff,0xd103fdbd,0xffb01fff,0x7e49fddf,0x6c1ffc47,
0x0effffff,0x81fffd10,0x220fe898,0x220000ff,0x4fffffff,0x2e06ffd8,
0xffff04ff,0xff90ffff,0x7dc1ffff,0x6c27fc0f,0x0efdbbef,0x806ffcc0,
0xfffffffe,0x0003fee1,0x3ddbfff3,0x0081bff6,0x7ec17fe0,0x3322001f,
0x085ff881,0x7ff11ff2,0x3ee4ffa8,0x0732204f,0x3f627fe4,0x2a008802,
0x361ffe60,0x066406ff,0xaaaacff8,0x4d77fe42,0x207fdc19,0x427e44ff,
0x1e5c04fb,0x933bff70,0x07fdcbff,0x403ff600,0x7f5c6ffd,0x7fc00cff,
0x004ff865,0x06ffcc00,0xff88ff90,0x7ec37f43,0x9500800f,0x817ee5fd,
0x0dffffeb,0x440ffc80,0x7c0001dd,0x2ffc402f,0x3e07fdc0,0xdb9be24f,
0x0000fd8d,0x3f61bfe2,0x041ff70f,0xb102ff40,0x7fffec3b,0x3fe00fff,
0x7ff13fbd,0xfffff300,0x7ffc5fff,0x47fc82df,0x3fe23ff8,0x70fffd43,
0x3dffb1bf,0x45fecd4c,0x3ffe00ff,0x400efffe,0x7cc006fd,0x2fffffff,
0xff700bfe,0x81ff7003,0x6cbee4ff,0x24fa8fff,0xfffffff9,0x20ffe62f,
0x1ff72ffa,0x7c03dffb,0x7fd4004f,0x04ffda9d,0x44fffffe,0xff9803ff,
0x22ffffff,0x2fffffe9,0x7ff11ff2,0xff917fcc,0x777dc5ff,0xf70fffff,
0x00bf6bdf,0x42ffb817,0x02ffca98,0x7ffffcc0,0x3bfe2fff,0x7fec0bcd,
0xfb83cdca,0xf927fc0f,0x2213ff31,0x3fffe65f,0x3ea2ffff,0x73ff981f,
0xfffffdff,0x77fd5541,0x7f402aaa,0xf707fe86,0x7fc45dff,0xaaaa8803,
0xc980effc,0xff91fffe,0xf51ffe41,0xf9ffd13f,0x67ffdc7f,0x8263ffc9,
0xf10005fa,0xffffe87f,0xaaa88003,0x3e0effca,0x23ffffff,0xfffffffe,
0xb83fee0e,0x7ddf64ff,0x2aa26f85,0x20effcaa,0xff881ffb,0x939fff74,
0x3ffe27ff,0x07ffffff,0x7fe427fc,0x17fffee0,0x2000ffe2,0xc801ffe8,
0x17ff93ff,0x7d49fff9,0xf89effcf,0x893fee3f,0x1ff104ff,0x3332e200,
0x7f7644ff,0x774c0eff,0x0fff4401,0x3ffb2aaa,0x77dffd1f,0x7fd4dffb,
0x24fffb8c,0xdf0bf77d,0x20fff440,0xff881ffb,0x7c49ff74,0xff99914f,
0xbb89999d,0xfb83ff88,0x3ffbfa1f,0x003ff885,0x0c42ffd8,0xffc97fe4,
0x4ffeefff,0x21bffff3,0x3fee2ff9,0xfd827fc0,0x3f201332,0x04ffffff,
0x3f62ffdc,0x17fec06f,0xfd4ffb80,0x221ffb0d,0xfeffffff,0x3fea3f24,
0x6c0bf11a,0x1ffb82ff,0xff73ff98,0xff04ff81,0x46ffe409,0x0ffb85ff,
0x442ffcb2,0x7dc003ff,0xeeffa84f,0x3ff26fff,0x4ffa8eff,0xfa85fff1,
0xf03fee1f,0x2abf509f,0xdffb85ff,0x804ff999,0x7ffe46fe,0x009ff700,
0x7fdaffc4,0x3ea1ffb8,0x24fd9eff,0x1fffd2fb,0x3fee07f3,0x507ff504,
0x03fee5ff,0x13fe09ff,0xfff7ffe8,0x7fc0ffd0,0x003ff885,0x7cc1bfe6,
0x20cfffff,0x0c408ffc,0x1bf61bfa,0x4ff81ff7,0x6fc47fc4,0x447fd85f,
0x5ff804ff,0xf980ffe8,0x7fd4006f,0xfc83ff94,0xff31980f,0x9b737c43,
0xff301fb1,0x437fc40d,0x1ff70ffd,0x9ff04ff8,0xfc9ffd40,0x4ffc89df,
0x3e217fe0,0xfff1003f,0x1ff98801,0x2e007fc8,0x7ff90cff,0x7fc0ffb8,
0x9fc9fe44,0x31ffd85f,0x30229ffd,0xff907ffb,0x201fff10,0x3ffae618,
0x2a1bff31,0x3fd806ff,0x4fb84fc8,0x400fff88,0xfc99dffc,0xf03fee4f,
0x013fe09f,0x7fffc411,0x3e00efff,0x03ff885f,0x555bffd0,0x20df5035,
0x7f4007fc,0xb85fffff,0x527fc0ff,0x3f3be6bf,0x77ffdc2e,0xff74feff,
0x50bfffff,0xbffd05ff,0x3ea35555,0x43ffffff,0xfffffffd,0x42dff800,
0xfebcefe8,0xadffe80d,0x7f441aaa,0x20efffff,0x27fc0ffb,0x88004ff8,
0xb84ffffd,0xffffffff,0x5007ff16,0xffffffff,0x3207f707,0xffc8007f,
0x1ff704ff,0x1fd14ff8,0x13ffffea,0x367bfff2,0xfffff74f,0x3fffc85d,
0xffffffa8,0xffff53ff,0x3fee03bf,0xf9000dff,0x3fff20ff,0xffff504e,
0xb107ffff,0xf709ffff,0xf04ff81f,0x0980009f,0x3ffffee0,0x7ff16fff,
0xfffff500,0x03107fff,0x10000cc4,0x40ffb801,0x207f94ff,0x004c05f8,
0xcb802662,0xffff500b,0x9987ffff,0x00062000,0x02200d44,0xffffff50,
0x008807ff,0x9ff03fee,0x00013fe0,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x10331000,
0x32a00033,0x882ffc80,0x013305ff,0x00000260,0x3bb60026,0x999986ee,
0x00330009,0x00000000,0x0cc00000,0x77640000,0x00001eee,0x5c27fc00,
0xffd880ff,0x3fea6fff,0x2ffd4001,0x7dc2ffc4,0x3fff622f,0x3ff502ef,
0x7fffffc0,0x01ffa85f,0x87fffff8,0x205fffff,0x44ffffd8,0xfffffff8,
0x3ffa1fff,0x3001deff,0x47ffffff,0xffffffff,0xbffff701,0x3e23fe41,
0xfffd80ff,0x25f901ff,0x02ff47f8,0xffb84ff8,0x7ffffd40,0x07fea7ff,
0x20dff500,0x37f40ffd,0xffddffd1,0x03ff703f,0x7ffffffc,0x001ffb85,
0x3ffbba00,0xfffff105,0x567c4bff,0x1fcaaaaa,0x3ffffffa,0xfffc804f,
0x3ffe3fff,0xc81fffff,0x25ffefff,0x17fec7fc,0x12fd8000,0x005fe8df,
0x1ff709ff,0x44e7ffc4,0x07fea5b9,0x54077200,0x8ffe22ff,0x3fe22ffa,
0x201ffb84,0x5ff99999,0x0001ffb8,0x360bff00,0x3ffb12ff,0x33beabe2,
0x77f43f31,0x02fffb99,0xf827f7fc,0x819999df,0x1910dff8,0x9ff53fe4,
0x8ff40000,0x02ff46f9,0xffb84ff8,0x200bff60,0x00001ffa,0x7fdcbff0,
0x3fa1ff20,0xffffff54,0xff807fff,0xffffff55,0x7fdc7fff,0xff827fc0,
0xf889ff05,0xb935f14f,0x743f33ff,0x03ffc45f,0x209f9df5,0xff5004ff,
0xf17fc805,0x3ffe01df,0xff9905ff,0x259dfb99,0x9ff005fe,0x3e21ff70,
0x3ff5006f,0xff077fd4,0x7e40bfff,0xfa8bfd0f,0x54bfea4f,0xffffffff,
0xaaffc03f,0xffffffff,0xf03fee3f,0x217fe09f,0x5ff84ff8,0x9dfa85f1,
0x3617fa1f,0x97fb01ff,0x013fe09f,0x32007fdc,0x403ffb7f,0xf05fffff,
0xffffffff,0x4017fa9f,0x0ffb84ff,0x4cc47ff3,0x447fea19,0x7ffc0eff,
0x3fe605ff,0xfe82ff9b,0x224ffcef,0x99affb99,0x8affc009,0x99affb99,
0xf03fee09,0x417fe09f,0x16fe86ff,0xf9df885f,0x155dfd51,0x3e20bfee,
0x099dfc8f,0x7dc013fe,0x57fe400f,0x4ccc03ff,0xff5305ff,0x2139fb33,
0x9ff005fe,0x3ea1ff70,0x3ffffa2f,0xfd13ff50,0xff33303f,0xfcefe80b,
0xffffb107,0x00ffdc0b,0x3ee17fe0,0x03fee01f,0x17fe09ff,0x75df7fec,
0x2e5f17ff,0xf1f9afec,0x2a3fffff,0x95fc83ff,0x7fc5ffff,0x227fffff,
0xffffffff,0x37fffe43,0x9817fe00,0xfd0bf66f,0x213fe00b,0x5ff70ffb,
0xa87ffff4,0x01ffd9ff,0x7d405ff8,0xfd304fff,0xcc89ffff,0x03ccdffd,
0xffb85ff8,0xf03fee01,0x417fe09f,0xfffffff8,0x3fa5f16f,0x3fa3f31c,
0xff51eeff,0x3f25ff05,0x3ffe1eef,0x3e27ffff,0x3fffffff,0x0ffeffe4,
0x540bff00,0xfd07f65f,0x213fe00b,0x7ff50ffb,0x3ea1ff70,0xf002ffdf,
0xffff00bf,0x51bff103,0x7ffc7ffd,0x806fffff,0x1ffb85ff,0xff03fee0,
0x7017fe09,0x2bff5999,0xf98bb2f8,0x3ee17fa1,0xf93fd41f,0x2677fe09,
0x0ffb8199,0x7fcffe40,0x217fe006,0xfccefdca,0x017fa4df,0x3fdc27fc,
0xff70bff1,0x3ffffea1,0x00bff001,0x3f20bff9,0xa9bfe20f,0x2aabffca,
0xfb85ff80,0x03fee01f,0x17fe09ff,0x227ff100,0x1f98332f,0x3ff617fa,
0x7f77fec0,0x009ff04f,0xf9003fee,0x4013feef,0xfffc85ff,0x27ffffff,
0xbfd005fe,0xffe8dfb0,0xfa87fdc1,0x800fffaf,0xffc805ff,0xfb0dfd01,
0x005ff50f,0x7d427fc4,0x83fee02f,0xbff04ffb,0x10ffd800,0xf983fe5f,
0xff517fa1,0xfffff88b,0x09ff04ff,0x9003fee0,0x00fff4ff,0x754c2ffc,
0x2affbacf,0x7ec017fa,0x513fea3f,0xf9337fff,0x2a7fea1f,0x5ff806ff,
0xb02ffd40,0x2ffcc5ff,0x2106ffcc,0x5ffb11c8,0x041bff30,0xff719ff5,
0x417fe09f,0xffeba998,0x2374be24,0x27bfa1f9,0x5c0fffca,0xdfd999ef,
0x013fe099,0x2667ff26,0x99ff2099,0x7fc00eff,0x7cc7f605,0x999efe86,
0x7ffc4099,0xc80fffff,0xffffffff,0x3f23ff50,0x42ffc04f,0x00effeda,
0x3fbfffe6,0xfffd01ff,0x3ffe27fd,0x3fa06fff,0x3e23feff,0x4fefffff,
0x3ea0bff0,0x444fffff,0xaaaaaacf,0x3fffa1fc,0xfe81efff,0x27fffe43,
0xff8809ff,0x6fffffff,0x9ff91ff2,0xffffffb8,0x98ff46ff,0xffffe85f,
0xfe985fff,0x2a00dfff,0x24effffe,0x3ffa1ffa,0x3ffffee3,0xfff56fff,
0xffd5001b,0x74c03bff,0xfb13ffff,0x4c019fff,0x543ffffe,0x4fd9efff,
0xfffffff7,0x77ffd4df,0xffff881c,0x21ffffff,0x03defffe,0xffc81ff3,
0x013fe4ff,0xfffffff1,0x23fe4dff,0x3ee2fff8,0x6fffffff,0x85fa87fc,
0xfffffffe,0x40004c05,0x1ffa8099,0x7dc7ffe2,0x6fffffff,0x20003571,
0x4cc40019,0x88001300,0x80660099,0xfffffffb,0x0000006f,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x22000000,0x00000009,0x00000000,0x33000000,0x00000000,
0xe8199800,0x9ffe62ff,0x7fcc3fff,0xffffff10,0x3e03ffff,0x7ffc07ff,
0xf981deff,0x22ffa84f,0x46fd86fd,0x1deffffe,0xffffffe8,0x6ffb86ff,
0xf901ff60,0x907dffff,0x2a0001ff,0x7fe43fff,0xfc83dfff,0x80ceffff,
0x44ffffd9,0xff002ff9,0x7d4ff909,0x3fffffff,0xe8bffffe,0x9fff24ff,
0x7fcc6fff,0xffffff10,0xf303ffff,0x7fc05fff,0x84ffffff,0x37f41ffd,
0x1bf61bf6,0xfffffffd,0xfffffe89,0x3fee6fff,0x1ff606ff,0xffffff90,
0x4ffe41df,0x7ffc4000,0x7fffe43f,0x7fe45fff,0x20ffffff,0xfffffffa,
0x400bfe64,0x27fc84ff,0xfffffffa,0x3eeab63f,0xfe9fffe7,0x8bfffe7f,
0x26660ff9,0x0199bffb,0x409ffff7,0xffb99cff,0x72ffc42f,0x7ffec3ff,
0x6fffffff,0x3ee67bfa,0x2aaaa2ff,0xf95ffbaa,0x6c0dffff,0x3ff20c7f,
0x25ffd999,0xcefffffc,0x7ff7e400,0x5ccffe43,0x9ff21ffe,0x3a23ffd9,
0x0fffa8ad,0x3e005ff3,0x227fc84f,0x99bffb99,0xf0ff9880,0xfbf33fdf,
0x9bfffe1f,0xff300ff9,0xfb9fd005,0x2227fc0f,0x9ffb87ff,0x7fec4ff8,
0xffffffff,0xff117fa6,0x23ff900f,0x06fd8cf9,0x22f55ff6,0x3ff40ffc,
0xfffffff9,0x2bfe601f,0x23fe43ff,0x1ff23ffb,0xb8089ff1,0x05ff32ff,
0x3f213fe0,0x205ff307,0xf0fffffc,0xf7f77f7f,0x3ff7fe1f,0x2601ff32,
0x7fc402ff,0xff01ffba,0xd03ffb09,0x881ff7bf,0xe9999efd,0x217fa0ef,
0x3e201ffd,0x0dfb046f,0x2fff7fec,0xff903ff2,0x2a23ff21,0xbfd05ffd,
0x8ff90ffe,0x1ff23ff9,0xf7007ff3,0x00bfe65f,0x3fe427fc,0xfb82ff98,
0xff11ff1e,0xff1fdbf3,0x57fabfe1,0xff300ff9,0x98ffa805,0x09ff03ff,
0xff505ff7,0x1bf607ff,0xefea9bf6,0x05ff70aa,0xfb017fe4,0x77ffec0d,
0x6c0ffc82,0xf03ff27f,0x21ff70ff,0x13fe43ff,0x7fe41ffd,0x00efea99,
0xff30ffd8,0x3e0dd885,0xfdaaaadf,0x905ff307,0x11ff93bf,0x7d7ffeff,
0xff55ff1f,0xfe81ff33,0xb07fffff,0xf837fcdf,0x03ffa84f,0x7ec0dffd,
0x6fffffff,0x47fffffe,0xff103ffa,0x986fd80d,0x3203fffd,0x97fea0ff,
0x7fe40ffc,0xff8ffe20,0x7ff7fe43,0x7ffe42ff,0xa801ffff,0x0bfe64ff,
0x7ffcdffd,0x07ffffff,0xff305ff3,0xdf31fddf,0x8ffcfff2,0xf39ff2ff,
0xffffe81f,0x49ff07ff,0x4ff80ffc,0x2622ffa8,0x099bffb9,0x7fffffec,
0x3fffa6ff,0x05ff51ee,0xfb00bfee,0x0ffff90d,0xfeeeffc8,0x03ff20ff,
0x46fd8ffb,0x7ffe43ff,0xffc80eff,0x02ffffee,0xf983bfe6,0xf3fffc2f,
0xfdddddff,0x40bfe60f,0x3e6311a8,0x3fa1ff56,0x3fee5ff2,0x5cc40ffa,
0xf9819bff,0x20bfea1f,0x1ffb84ff,0x3fffffea,0x4f7ec3ff,0x746fe999,
0x81ffb85f,0xfd806ff8,0x07fdbc86,0x7fffffe4,0x707fe41d,0x57fd4bff,
0x09cff999,0xdff73ff9,0xff98ff90,0x83ffd107,0x7fe42ff9,0x3f213fe4,
0x305ff307,0x33555555,0xfe97a2df,0x3fe25ff2,0xff300ffd,0x7fffe405,
0xff85ffff,0x220ffd84,0xaacffbaa,0x7ec37ec1,0x7ec2ff46,0x02ffb80f,
0x3f606fd8,0x55ffe407,0xddff901a,0x7e41ffff,0xffffffff,0x7dcff94f,
0x6c3fe42f,0x7ff441ff,0x982ff981,0x7e427fc1,0x905ff307,0x5bffffff,
0xf97f40df,0x3ffff22f,0x405ff300,0xfffffffe,0x544ff87f,0x54cc45ff,
0x6c099bff,0x746fd86f,0x82ffd45f,0xdfb006ff,0x3203fec0,0xffc800ff,
0x640dffff,0xffffffff,0x44ff94ff,0x43fe46ff,0x3fa20ffd,0x05ff301f,
0x3f213fe0,0x305ff307,0x53555555,0xf9ff40df,0x3fffe62f,0x205ff300,
0x9999bff8,0x67fc1ffc,0x40fffca9,0xfffffffa,0x6c37ec3f,0x54f7f46f,
0xfb80fffc,0xd555103f,0xfd8555ff,0x9199999f,0xff9001ff,0x26201357,
0xcff99999,0xfc8ff909,0x267ff22f,0x3a26ffc9,0x2aaaacff,0x33337ff3,
0xf909ff03,0x7fdccc4f,0xf700099b,0xff9fec0b,0x807ffec2,0xff702ff9,
0xf89ff301,0x1effffff,0xdffdcc98,0x437ec1cc,0x7fff46fd,0xff01efff,
0x7fffd40f,0x7ec7ffff,0x97ffffff,0xff9001ff,0x3ff80001,0x3fe63fe4,
0x3fffff26,0x3ff21fff,0x36ffffff,0xffffffff,0xfc84ff83,0x3ffffea7,
0xf7003fff,0xffa7ec0b,0x807ffcc2,0xdfb02ff9,0x3fe37fc0,0x3003deff,
0x37ec05ff,0x3ffa37ec,0x3ee03def,0x3ffea03f,0x6c7fffff,0x7fffffff,
0xf9001ff9,0xff80001f,0x7ec3fe43,0xdffff92f,0xfffc817d,0xf36fffff,
0x3fffffff,0x7fc84ff8,0x3fffffea,0x000003ff,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x640b3000,0x44006602,0x01000000,0x166000c0,
0x08080040,0x2c804040,0x31001000,0x4cc40400,0xffffff90,0x07ff2dff,
0x7fd57fe2,0x321ffe85,0x757ee05f,0x8ffd00ff,0xffffffff,0xffffff12,
0x3e63ffff,0x82ffb84f,0xfd701ff8,0x2e01bfff,0x4c1efffe,0xf704fffd,
0xa809ffff,0xffd705ff,0xffb1019f,0xd85ffd15,0xffeacfff,0xf00fff22,
0x09fff75f,0x5c9ffff5,0x1effd8df,0x7fe4ffea,0x16ffffff,0x1ff90bff,
0xff30ffec,0x2e05fc8b,0x105ff74f,0xffff89ff,0xff12ffff,0xffffffff,
0x6ee7fe43,0xff105ffc,0x3fbffe03,0x3fa20eff,0x2a1fffff,0x46ffefff,
0x4feefffd,0x207bfee0,0xfffffffd,0x77ff7f40,0xdf10ffef,0xffdffffd,
0x813ffa23,0xfffffeff,0x3f77fe64,0xffddf73f,0x3fe61fff,0xd5555532,
0x0ffe49ff,0xff989ff1,0xf703ffa5,0xf9a7e40b,0x42ffb85f,0x99999dff,
0x3fee6660,0xffe8199b,0x100effff,0x702e03ff,0x6ffe45ff,0xff11c99a,
0x44ffea19,0xfb0085ff,0xbff501bf,0x4c9ffb53,0x329ff56f,0x7fcc513f,
0x7ec49fb4,0xefff80df,0x3f27fe8a,0x7fdd7ee4,0x33ffc9cf,0x7fcc05ff,
0xf92ffc46,0x53ffb01f,0x0df709ff,0x0fff27e4,0x09ff0ffb,0x402ff980,
0x6ffbbffc,0x5ffdd554,0x7fc402aa,0xb80dff13,0x9b7ec0ff,0x74400dff,
0x1bfa04ff,0x14fb9ffa,0x813ee5ff,0x90bf51ff,0xfff81dff,0x2fd9fee0,
0x27fddbe6,0x3fe29ff1,0x207ffa01,0x4ff88ffc,0xffddff10,0x364df501,
0x0ffe47f9,0x13fe17fe,0x805ff300,0x83fea2fe,0xfffffffe,0x6665c47f,
0x05ff54ff,0xccccffd8,0x3fffe7fe,0x3ffe982d,0x7e427fc0,0x7fc7f90f,
0x54c5fdcd,0x6fdccffc,0x7c3fff50,0xfb154c4f,0xffbafdc9,0xff8a7fc0,
0x209ff701,0x0ffbcff8,0x0fffff20,0x2ff8b7d4,0x1ffd47fb,0xbff05ff3,
0x20155555,0x3e202ff9,0xb87fe21f,0xccdffccc,0x3fffff24,0x03ff74ff,
0xffffffe8,0x3ffa67ff,0x3fee2fff,0x0ffe201f,0x17e47fee,0x4bffffff,
0xfffffffd,0xffd106ff,0x5c027fc7,0x72ffccff,0x24ff81ff,0x0dff3019,
0x04ffffc8,0x303fffc4,0x6d3feadf,0xf937fc2f,0xfffff01f,0x3e601fff,
0x8bfe202f,0xff100ff8,0x33bff703,0x3fee9ff3,0x4cf7ec02,0xc9819999,
0x3ea1fffe,0xbff102ff,0x3f21ff70,0x2666bfe3,0xff33df70,0xf3013333,
0x04ff85ff,0x47ffffb0,0x27fc0ffb,0x401ffe80,0x400ffff8,0x301ffff9,
0x6dfff6ff,0xe87fec2f,0xddfff06f,0x3e601ddd,0x727f402f,0x0ffc40df,
0x3fe23fec,0xc80bff34,0xf90000ff,0x3ffe987f,0xffd0fff0,0x2ff89fdc,
0x0ffc7fb0,0x207ffea0,0x2a2004ff,0x207fdc0a,0x70bfa4ff,0x3f2009ff,
0xfffe804f,0x3eff105f,0x41fd9fee,0x3ff8affa,0x98009ff0,0x7fe402ff,
0x2204ffce,0x1ffd81ff,0x7f49ffd3,0x51b989df,0x10881bff,0x103ff903,
0xff90bffd,0x49ff913b,0x0bff55fa,0x27fdd3f2,0x00effc82,0x553009ff,
0x3ee35555,0xf8a7fc0f,0x01bfe60f,0x5402ffa8,0x82ffdcff,0xfcbfaff8,
0x7fc41fec,0xff01ffac,0x2ff98009,0x3ffffa20,0x2aa00fff,0xfefffb80,
0x3fe64fef,0x362fffff,0x2ffeefff,0xfffddff5,0x45ffd80d,0xfffffff8,
0x3f7fe20e,0x52ecefef,0xdffdfdff,0x37ff25fb,0x2013fe00,0x5ffffffc,
0x4ff81ff7,0x1ffe89f5,0x00bfea00,0xdff31ffd,0x33fbff10,0xfd01fddf,
0x7fc0dfbf,0x17fcc004,0x5775ffb0,0x64000dff,0x4fd9efff,0x77fffec4,
0x7ffffdc1,0xfffff32f,0x1d70019f,0x9ffffb10,0x26bffea0,0x3f62ffff,
0x5ffff75f,0x3fe013a2,0xaaaa9804,0x81ff71aa,0x5c1314ff,0xaaaaadff,
0x405ff502,0x3ff24ffb,0x3e6fff83,0xffb80fff,0x37fe04ff,0x30099999,
0x3fe605ff,0xf92ffa83,0x9fffffff,0x18800130,0x10099880,0x01000333,
0x02600130,0x31022033,0x00000103,0x3a000000,0xffffffff,0x205ff507,
0x3e20fff8,0x27ffc0ff,0xf301fff9,0x7fc03fff,0x02ffffff,0x1c405ff3,
0x7ffe4170,0x004fffff,0x00000000,0x00000000,0x00000000,0x00000000,
0x3fffffa0,0xff507fff,0x20fff205,0x7ff45ffc,0xe81ffea1,0x7ffc07ff,
0x302fffff,0x000005ff,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0xff701dc0,0x5104ff81,0xf8000015,
0xf985ffff,0x2fffffff,0xff105ff9,0xfa813fab,0xc81fff17,0x203301ff,
0x3fe60ffa,0x0055440e,0x4c004008,0x554c2880,0x8804c401,0x000000aa,
0x9f500000,0x7ff53df7,0xb81ffdc0,0x227fc0ff,0x0dffffd8,0xf00ffc40,
0xf30bffff,0x5fffffff,0x3ee17fe2,0x5c0bfb2f,0xa97fea5f,0x03fe04ff,
0x7fc43fea,0x3fffa20e,0xfb97663f,0x7649f503,0x7441df31,0xfffff32f,
0x84ffea85,0x505ffffc,0x7ffe41df,0x504fffff,0x7d4003ff,0xfffefffe,
0x07ff700f,0x9ff03fee,0xea99bfe8,0x07fe200f,0x85ff9998,0xffcaaaa8,
0xd03ff60e,0x9037e4df,0x8affd89f,0xff0b86fe,0x88ffa8e2,0x77c41ffe,
0xff10fffd,0xf107fee7,0x4c7fea9f,0xffe88eff,0xdff77911,0x227fffd4,
0x4ffccffb,0x3f25ffe8,0x4fffffff,0x400dffd0,0xeff8cffa,0x0ee01fe8,
0x7fc0ffb8,0x3ffe3f24,0x3e205e8e,0x0bff001f,0xa83ffd10,0x8ffe22ff,
0x23dd17fa,0x7ff443fd,0x7fcc1ffd,0x51ffafea,0x03ffb3ff,0x2a0ffc82,
0xc8dfb0ff,0x987ff16f,0x01ffeeff,0xff3b17fa,0x3ee3fd89,0x007ffd86,
0x3fdcfb80,0xf11ff500,0x000ffa5f,0x7fc0ffb8,0x7cdfcfe4,0xff100fa9,
0x017fe003,0x7fc0bff6,0xf983fee5,0xfd4ffa8f,0x7ffff305,0xfffff910,
0x37fea19f,0xff9802ff,0xff16fd86,0x7ec7fe67,0x3ffff306,0x01dffd30,
0x45fd13fe,0x7ff887f9,0x47fc4000,0xfa800ff8,0x9ff43fe6,0xfffffff8,
0x1ff71fff,0x23f14ff8,0x23f35edf,0xfffffff8,0xbff01fff,0x204ffb80,
0x8bfd0ffc,0x6ffd9ff8,0x3ff603ff,0x7fff4407,0x7ffffd41,0x077fcc01,
0x4fe87fdc,0x13fa1ff7,0x4077ff44,0x80effee9,0x92fec4ff,0xb97f60df,
0xeeeeeeee,0xbf91fec3,0x7fcdf500,0x3fe27fd0,0xffffffff,0xff81ff71,
0x3b3e5f14,0x3fe23f33,0xffffffff,0x4c0bff01,0x7fcc06ff,0xff82ff9b,
0xffaffffa,0x3ffff980,0xfffffc88,0xf5ff51df,0x3fea01df,0x92ff980d,
0x9a7f41df,0x7ff441ff,0x3ea00eff,0x544ff82f,0x82ffefff,0x3ff21ffa,
0x24ffffff,0x17fc46f9,0x0ff9bea0,0x4cccc7fd,0x2e199999,0x93fee0ff,
0x71f77f4f,0xffa9998f,0x3fe0199a,0x01fff105,0x0ff9dfd0,0x3f37fbfa,
0xeff887fd,0x7fc41ffe,0x51fe9fe9,0x0dff51ff,0x5dddfff3,0x2ff9a7f4,
0xefc97fcc,0xf33ffd10,0x2eb261df,0x3fba67fd,0x3fea2eff,0x7ffec2ef,
0x4ccccc42,0x0bb20999,0xdf5017aa,0x03fe87fc,0xcffa8022,0x2e4fffb8,
0xfac89c9f,0x007fe204,0xffe82ffc,0xa81aaaad,0xfb04ffff,0xdfff35ff,
0xff33ffb0,0x4fd0a81d,0x7e43fea3,0x7fffd44f,0x6cdf53ff,0x74df904f,
0x4c3ff72f,0xffff73ff,0x7fffcc5d,0x65c003ff,0x0000000b,0x7fcdf500,
0x3ea07fd0,0xffff102f,0xfd89fdff,0x406fb99b,0xff701ff8,0x2dffffff,
0xfffffffa,0x3ffff03f,0x7c3fff20,0x1ffdc5ff,0x7fc0bff7,0x3a0ffa80,
0x266623ff,0x50620999,0x8130a201,0x2a24981c,0x2666601a,0x00000099,
0xa8000000,0x7f43fe6f,0x409ff903,0xfd9efffa,0x3ffffb84,0x701ff880,
0xffffffff,0x3ffffead,0xff903fff,0x92ffdc0d,0x37fcc9ff,0x19817ff4,
0x7c41ff50,0x000001ff,0x00000000,0x00000000,0xfa800000,0x1ff43fe6,
0x9800ee88,0x00044001,0x000002aa,0x00000000,0x00000000,0x001ee980,
0x66666664,0x0004cccc,0x00000000,0x00000000,0x00000000,0x00000000,
0x00998662,0xffffffe8,0x00cc44ff,0x4c009988,0x4c400620,0xddddb019,
0x267ffe8d,0xf2ffffff,0xffffffff,0x00000fff,0x00000000,0x00000000,
0x00000000,0x5c000000,0x24ff89ff,0x3ffa3ffa,0x24ffffff,0x2a0efffa,
0x07ffa62c,0x3ff87fdc,0x80f7fcc0,0x7c7fffff,0x3ffe67ff,0x55552fff,
0x55555555,0x00000000,0x00000000,0x00000000,0x00000000,0x87fdc000,
0x9fffa3ff,0xd9999998,0x3ffffe4f,0xd887fb0e,0x8ffb81ff,0x3e604ff8,
0x222200df,0x1ffdc088,0x15555551,0x00000000,0x00000000,0x00000000,
0x00000000,0xa8000000,0x747ff0ff,0x9f9007ff,0x3fe63fea,0x9700ffef,
0x0b98ae09,0x0000f320,0x00000088,0x00000000,0x00000000,0x00000000,
0x00000000,0x9fea0000,0x0bfe62ff,0x4eaa7e40,0x013fffa2,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x9fe60000,
0x440002fe,0x01ba8009,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x86600000,0x00000018,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
};
static signed short stb__consolas_bold_22_latin_ext_x[560]={ 0,4,2,0,0,0,0,4,2,2,1,0,2,2,
3,0,0,1,1,1,0,1,1,1,1,0,4,2,1,1,2,3,0,0,1,0,0,1,1,0,1,1,1,1,
2,0,1,0,1,0,1,1,0,0,0,0,0,0,1,3,1,2,0,0,0,1,1,1,0,1,0,0,1,1,
1,1,1,0,1,0,1,0,1,1,0,1,0,0,0,0,1,1,4,2,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,0,0,0,
4,0,0,0,2,1,1,2,0,0,2,1,2,2,0,1,0,3,4,2,2,1,0,0,0,1,0,0,0,0,
0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,0,0,
0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
0,0,0,0,0,1,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,0,0,1,1,1,0,0,2,
1,-3,-2,1,0,0,1,0,0,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,-1,0,1,1,-1,0,
0,0,0,0,1,1,0,0,0,0,0,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,
0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-3,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0, };
static signed short stb__consolas_bold_22_latin_ext_y[560]={ 16,0,0,1,-1,0,0,0,-1,-1,0,4,11,8,
12,0,1,1,1,1,1,1,1,1,1,1,4,4,4,6,4,0,0,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,18,0,4,0,4,0,4,0,4,0,0,
0,0,0,4,4,4,4,4,4,4,1,5,5,5,5,5,5,0,-2,0,7,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,16,4,-1,1,2,1,
-2,0,0,1,1,5,9,8,0,1,0,2,0,0,0,5,0,7,16,0,1,5,0,0,0,4,-2,-2,-2,-3,
-3,-3,1,1,-2,-2,-2,-3,-2,-2,-2,-3,1,-3,-2,-2,-2,-3,-3,5,-1,-2,-2,-2,-3,-2,1,0,0,0,
0,0,0,-1,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,2,0,0,0,0,0,0,0,
-2,1,-3,0,1,4,-2,0,-2,0,-3,0,-2,0,-2,0,1,0,-2,1,-3,0,-3,0,1,4,-2,0,-2,0,
-3,0,-3,0,1,0,-2,-3,1,0,-3,0,-2,1,-3,0,1,0,-3,5,1,0,-2,0,1,0,5,-2,-3,1,
0,0,0,1,0,1,0,-2,0,1,4,-2,0,-1,1,4,-2,1,-3,0,-2,0,1,4,-2,0,1,4,-2,0,
-2,0,-2,0,1,4,-2,0,1,1,-2,0,1,1,-3,0,-2,1,-3,0,-3,-1,-2,0,1,5,-2,0,-2,0,
-3,-2,0,-3,0,-2,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,-5,-4,-2,0,-2,-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1, };
static unsigned short stb__consolas_bold_22_latin_ext_w[560]={ 0,4,8,12,12,13,13,4,8,8,10,12,7,8,
6,11,12,10,10,10,12,10,11,10,10,11,4,7,10,10,9,8,12,13,11,11,12,10,10,12,11,10,9,11,
9,12,11,12,11,13,11,10,12,12,13,12,13,12,10,6,11,7,12,13,8,10,11,10,11,10,12,12,10,10,
9,11,10,12,10,12,11,11,11,10,11,10,12,12,12,12,10,9,4,9,12,12,12,12,12,12,12,12,12,12,
12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0,4,9,12,12,12,
4,12,10,12,8,10,10,8,12,10,9,10,8,8,12,11,12,6,4,8,8,10,13,13,13,9,13,13,13,13,
13,13,13,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,10,12,12,12,12,12,12,11,11,11,12,
11,11,11,11,12,10,11,12,11,11,11,12,11,11,12,11,12,12,12,12,12,12,12,11,12,11,11,12,11,12,
13,11,13,11,13,10,12,12,11,11,11,11,11,11,13,14,12,12,11,11,11,11,11,11,10,10,11,11,12,12,
12,12,12,12,12,12,12,11,12,11,11,11,11,11,11,11,10,11,11,10,11,11,10,10,11,11,11,11,11,9,
10,14,15,12,14,11,10,12,12,11,10,12,11,11,11,10,12,12,12,12,13,13,12,12,13,12,11,11,13,12,
11,12,11,11,10,10,11,11,12,11,12,14,12,11,12,11,12,11,12,11,12,11,13,13,12,11,12,12,12,12,
12,11,12,11,11,11,11,10,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
12,12,12,12,12,12,12,12,12,12,13,11,13,12,15,13,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
12,12,12,12,12,12,12,12,12,12,10,10,12,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
12,12,12,12,12,12, };
static unsigned short stb__consolas_bold_22_latin_ext_h[560]={ 0,17,7,15,20,17,17,7,22,22,11,12,9,4,
5,19,16,15,15,16,15,16,16,15,16,15,13,16,13,8,13,17,21,15,15,16,15,15,15,16,15,15,16,15,
15,15,15,16,15,20,15,16,15,16,15,15,15,15,15,21,19,21,8,3,6,13,17,13,17,13,16,17,16,16,
21,16,16,12,12,13,17,17,12,13,16,12,11,11,11,16,11,21,23,21,6,15,15,15,15,15,15,15,15,15,
15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,17,20,15,14,15,
23,19,6,16,12,10,6,4,12,5,9,14,10,10,6,16,19,6,4,10,12,10,16,16,16,17,18,18,18,19,
19,19,15,19,18,18,18,19,18,18,18,19,15,19,19,19,19,20,20,10,20,19,19,19,20,18,15,17,17,17,
17,17,17,18,13,16,17,17,17,17,16,16,16,16,17,16,17,17,17,17,17,12,17,17,17,17,17,21,21,21,
18,16,19,17,20,17,19,17,19,17,20,17,19,17,18,17,15,17,18,16,19,17,19,17,20,17,18,17,19,21,
20,21,20,21,20,21,18,19,15,16,19,16,18,15,19,16,20,21,19,11,16,21,19,21,20,21,11,18,19,20,
21,16,16,15,16,15,16,18,16,20,17,18,16,17,20,17,19,16,20,17,19,17,16,13,18,16,20,17,18,16,
19,17,19,17,19,16,19,17,20,20,18,17,15,16,20,17,19,16,20,17,20,18,19,17,20,16,18,16,18,21,
19,18,16,19,16,18,16,16,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,19,15,15,15,
15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,
15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,
15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,
15,15,15,15,15,15,15,15,15,15,21,21,18,17,21,20,15,15,15,15,15,15,15,15,15,15,15,15,15,15,
15,15,15,15,15,15,15,15,15,15,20,17,20,20,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,
15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,
15,15,15,15,15,15, };
static unsigned short stb__consolas_bold_22_latin_ext_s[560]={ 254,249,64,231,155,127,74,250,11,20,125,
51,218,155,148,171,71,116,200,122,163,153,164,105,63,131,251,133,158,226,208,
247,130,39,188,241,53,66,183,14,224,236,86,207,244,1,14,214,139,42,176,
245,77,1,52,39,25,12,1,217,120,24,237,164,104,114,62,125,79,136,238,
115,227,39,32,27,120,1,239,169,164,152,218,147,96,27,86,99,112,50,75,
14,1,207,91,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,254,248,145,
194,90,66,6,1,113,188,247,168,80,155,38,137,208,103,148,190,124,59,15,
73,250,199,230,157,231,217,96,246,128,156,183,14,1,186,169,148,197,233,221,
136,1,13,25,28,92,39,160,173,183,48,61,179,123,40,66,93,85,170,151,
50,38,25,13,1,240,90,195,132,190,177,165,153,107,179,214,143,91,192,66,
53,40,27,14,14,1,235,222,210,198,156,182,143,142,110,157,126,220,245,52,
88,65,114,1,61,149,149,114,73,156,101,209,82,125,49,89,37,74,138,102,
186,53,45,69,169,95,224,207,1,226,101,79,167,113,155,175,219,137,28,13,
95,77,64,16,118,28,84,234,237,136,187,196,246,107,1,53,211,226,127,14,
77,94,24,161,213,84,104,36,116,208,1,110,201,106,101,69,182,161,40,98,
140,199,119,225,176,221,217,237,48,213,141,194,182,239,202,26,74,119,128,200,
108,82,189,56,1,79,172,132,176,13,204,26,194,132,39,201,145,141,51,36,
25,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,233,
143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
143,143,143,70,58,63,88,29,168,143,143,143,143,143,143,143,143,143,143,143,
143,143,143,143,143,143,143,143,143,143,143,143,143,108,229,194,182,143,143,143,
143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
143,143,143,143,143,143,143,143,143, };
static unsigned short stb__consolas_bold_22_latin_ext_t[560]={ 1,1,277,216,25,146,164,249,1,1,265,
265,265,276,276,68,199,233,233,199,233,199,199,233,216,216,199,199,249,265,249,
127,1,233,233,164,233,249,216,216,233,233,216,216,216,233,233,199,233,25,233,
182,249,216,249,249,249,249,249,1,68,25,265,276,277,249,164,249,146,249,199,
164,199,216,25,216,216,265,249,249,164,164,249,249,216,265,265,265,265,216,265,
25,1,1,277,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,1,47,25,
216,249,233,1,68,277,199,233,265,277,276,265,277,265,249,265,265,277,199,88,
277,257,265,249,265,182,182,199,68,108,108,108,68,88,47,216,47,108,108,108,
47,127,127,127,68,233,88,47,47,68,47,47,265,47,68,68,68,47,108,233,
164,164,164,164,164,146,108,249,182,146,146,146,146,182,182,164,182,146,182,146,
146,146,146,146,265,146,127,127,127,127,1,1,1,108,199,68,127,25,108,88,
127,88,127,47,127,88,127,108,127,216,127,108,182,88,127,88,127,47,127,108,
127,68,1,25,1,25,1,25,25,88,88,233,182,88,182,88,216,88,182,47,
1,88,265,182,1,88,1,25,1,265,88,68,25,1,182,182,233,164,233,199,
108,182,47,127,88,199,146,47,146,68,199,47,164,68,164,182,249,88,182,47,
164,88,182,47,164,68,146,47,199,47,146,25,25,88,146,233,216,25,164,47,
216,25,164,25,108,68,127,25,199,108,182,108,1,68,108,199,68,199,108,199,
199,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,68,
216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
216,216,216,1,1,108,164,1,25,216,216,216,216,216,216,216,216,216,216,216,
216,216,216,216,216,216,216,216,216,216,216,216,216,25,146,25,25,216,216,216,
216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
216,216,216,216,216,216,216,216,216, };
static unsigned short stb__consolas_bold_22_latin_ext_a[560]={ 194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,
194,194,194,194,194,194,194,194, };
// Call this function with
// font: NULL or array length
// data: NULL or specified size
// height: STB_FONT_consolas_bold_22_latin_ext_BITMAP_HEIGHT or STB_FONT_consolas_bold_22_latin_ext_BITMAP_HEIGHT_POW2
// return value: spacing between lines
static void stb_font_consolas_bold_22_latin_ext(stb_fontchar font[STB_FONT_consolas_bold_22_latin_ext_NUM_CHARS],
unsigned char data[STB_FONT_consolas_bold_22_latin_ext_BITMAP_HEIGHT][STB_FONT_consolas_bold_22_latin_ext_BITMAP_WIDTH],
int height)
{
int i,j;
if (data != 0) {
unsigned int *bits = stb__consolas_bold_22_latin_ext_pixels;
unsigned int bitpack = *bits++, numbits = 32;
for (i=0; i < STB_FONT_consolas_bold_22_latin_ext_BITMAP_WIDTH*height; ++i)
data[0][i] = 0; // zero entire bitmap
for (j=1; j < STB_FONT_consolas_bold_22_latin_ext_BITMAP_HEIGHT-1; ++j) {
for (i=1; i < STB_FONT_consolas_bold_22_latin_ext_BITMAP_WIDTH-1; ++i) {
unsigned int value;
if (numbits==0) bitpack = *bits++, numbits=32;
value = bitpack & 1;
bitpack >>= 1, --numbits;
if (value) {
if (numbits < 3) bitpack = *bits++, numbits = 32;
data[j][i] = (bitpack & 7) * 0x20 + 0x1f;
bitpack >>= 3, numbits -= 3;
} else {
data[j][i] = 0;
}
}
}
}
// build font description
if (font != 0) {
float recip_width = 1.0f / STB_FONT_consolas_bold_22_latin_ext_BITMAP_WIDTH;
float recip_height = 1.0f / height;
for (i=0; i < STB_FONT_consolas_bold_22_latin_ext_NUM_CHARS; ++i) {
// pad characters so they bilerp from empty space around each character
font[i].s0 = (stb__consolas_bold_22_latin_ext_s[i]) * recip_width;
font[i].t0 = (stb__consolas_bold_22_latin_ext_t[i]) * recip_height;
font[i].s1 = (stb__consolas_bold_22_latin_ext_s[i] + stb__consolas_bold_22_latin_ext_w[i]) * recip_width;
font[i].t1 = (stb__consolas_bold_22_latin_ext_t[i] + stb__consolas_bold_22_latin_ext_h[i]) * recip_height;
font[i].x0 = stb__consolas_bold_22_latin_ext_x[i];
font[i].y0 = stb__consolas_bold_22_latin_ext_y[i];
font[i].x1 = stb__consolas_bold_22_latin_ext_x[i] + stb__consolas_bold_22_latin_ext_w[i];
font[i].y1 = stb__consolas_bold_22_latin_ext_y[i] + stb__consolas_bold_22_latin_ext_h[i];
font[i].advance_int = (stb__consolas_bold_22_latin_ext_a[i]+8)>>4;
font[i].s0f = (stb__consolas_bold_22_latin_ext_s[i] - 0.5f) * recip_width;
font[i].t0f = (stb__consolas_bold_22_latin_ext_t[i] - 0.5f) * recip_height;
font[i].s1f = (stb__consolas_bold_22_latin_ext_s[i] + stb__consolas_bold_22_latin_ext_w[i] + 0.5f) * recip_width;
font[i].t1f = (stb__consolas_bold_22_latin_ext_t[i] + stb__consolas_bold_22_latin_ext_h[i] + 0.5f) * recip_height;
font[i].x0f = stb__consolas_bold_22_latin_ext_x[i] - 0.5f;
font[i].y0f = stb__consolas_bold_22_latin_ext_y[i] - 0.5f;
font[i].x1f = stb__consolas_bold_22_latin_ext_x[i] + stb__consolas_bold_22_latin_ext_w[i] + 0.5f;
font[i].y1f = stb__consolas_bold_22_latin_ext_y[i] + stb__consolas_bold_22_latin_ext_h[i] + 0.5f;
font[i].advance = stb__consolas_bold_22_latin_ext_a[i]/16.0f;
}
}
}
#ifndef STB_SOMEFONT_CREATE
#define STB_SOMEFONT_CREATE stb_font_consolas_bold_22_latin_ext
#define STB_SOMEFONT_BITMAP_WIDTH STB_FONT_consolas_bold_22_latin_ext_BITMAP_WIDTH
#define STB_SOMEFONT_BITMAP_HEIGHT STB_FONT_consolas_bold_22_latin_ext_BITMAP_HEIGHT
#define STB_SOMEFONT_BITMAP_HEIGHT_POW2 STB_FONT_consolas_bold_22_latin_ext_BITMAP_HEIGHT_POW2
#define STB_SOMEFONT_FIRST_CHAR STB_FONT_consolas_bold_22_latin_ext_FIRST_CHAR
#define STB_SOMEFONT_NUM_CHARS STB_FONT_consolas_bold_22_latin_ext_NUM_CHARS
#define STB_SOMEFONT_LINE_SPACING STB_FONT_consolas_bold_22_latin_ext_LINE_SPACING
#endif
| 69.382637
| 137
| 0.792207
|
stetre
|
83b83caebab3394ba74f0376bb93f29a34852ef6
| 2,502
|
cpp
|
C++
|
common/WhirlyGlobeLib/src/Lighting.cpp
|
uCiC-app/WhirlyGlobe-3
|
399fa89a7c00db3f7fed08968e1c3692bba25d7c
|
[
"Apache-2.0"
] | 11
|
2020-01-03T09:17:59.000Z
|
2020-10-12T21:42:42.000Z
|
common/WhirlyGlobeLib/src/Lighting.cpp
|
uCiC-app/WhirlyGlobe-3
|
399fa89a7c00db3f7fed08968e1c3692bba25d7c
|
[
"Apache-2.0"
] | 36
|
2020-01-08T07:52:20.000Z
|
2020-11-16T23:49:39.000Z
|
common/WhirlyGlobeLib/src/Lighting.cpp
|
uCiC-app/WhirlyGlobe-3
|
399fa89a7c00db3f7fed08968e1c3692bba25d7c
|
[
"Apache-2.0"
] | 9
|
2020-01-08T06:04:48.000Z
|
2021-07-21T13:14:27.000Z
|
/*
* Lighting.cpp
* WhirlyGlobeLib
*
* Created by jmnavarro
* Copyright 2011-2019 mousebird consulting.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#import "Lighting.h"
#import "Program.h"
#import "ProgramGLES.h"
using namespace Eigen;
namespace WhirlyKit
{
DirectionalLight::DirectionalLight()
{
viewDependent = true;
pos = Eigen::Vector3f(0,0,0);
ambient = Eigen::Vector4f(1,1,1,1);
diffuse = Eigen::Vector4f(1,1,1,1);
specular = Eigen::Vector4f(0,0,0,0);
}
DirectionalLight::~DirectionalLight()
{
}
bool DirectionalLight::bindToProgram(Program *program, int index, Eigen::Matrix4f modelMat) const
{
Eigen::Vector3f dir = pos.normalized();
Eigen::Vector3f halfPlane = (dir + Eigen::Vector3f(0,0,1)).normalized();
ProgramGLES *programGLES = dynamic_cast<ProgramGLES *>(program);
if (programGLES) {
programGLES->setUniform(lightViewDependNameIDs[index], (viewDependent ? 0.0f : 1.0f));
programGLES->setUniform(lightDirectionNameIDs[index], dir);
programGLES->setUniform(lightHalfplaneNameIDs[index], halfPlane);
programGLES->setUniform(lightAmbientNameIDs[index], ambient);
programGLES->setUniform(lightDiffuseNameIDs[index], diffuse);
programGLES->setUniform(lightSpecularNameIDs[index], specular);
}
return true;
}
Material::Material() :
ambient(Eigen::Vector4f(1,1,1,1)),
diffuse(Eigen::Vector4f(1,1,1,1)),
specular(Eigen::Vector4f(1,1,1,1)),
specularExponent(1)
{
}
Material::~Material()
{
}
bool Material::bindToProgram(Program *program)
{
ProgramGLES *programGLES = dynamic_cast<ProgramGLES *>(program);
if (programGLES) {
programGLES->setUniform(materialAmbientNameID, ambient);
programGLES->setUniform(materialDiffuseNameID, diffuse);
programGLES->setUniform(materialSpecularNameID, specular);
programGLES->setUniform(materialSpecularExponentNameID, specularExponent);
}
return true;
}
}
| 28.431818
| 97
| 0.707834
|
uCiC-app
|
83bee7b50861ab838211689007ad8ca46649910e
| 326
|
cpp
|
C++
|
Dumping.cpp
|
pOri0n/Astrix3
|
49cf86b3af0fd0116b5cc9f64d8ae9886fcbcecf
|
[
"MIT"
] | 8
|
2017-06-07T09:55:37.000Z
|
2019-01-15T18:59:06.000Z
|
Dumping.cpp
|
pOri0n/Astrix3
|
49cf86b3af0fd0116b5cc9f64d8ae9886fcbcecf
|
[
"MIT"
] | null | null | null |
Dumping.cpp
|
pOri0n/Astrix3
|
49cf86b3af0fd0116b5cc9f64d8ae9886fcbcecf
|
[
"MIT"
] | 2
|
2017-06-08T22:23:08.000Z
|
2019-12-25T00:13:05.000Z
|
#include "Dumping.h"
#define DUMPIDTOFILE
void Dump::DumpClassIds()
{
#ifdef DUMPIDTOFILE
Utilities::EnableLogFile("ClassID.txt");
#endif
ClientClass* cClass = Interfaces::Client->GetAllClasses();
while (cClass)
{
Utilities::Log("%s = %d,", cClass->m_pNetworkName, cClass->m_ClassID);
cClass = cClass->m_pNext;
}
}
| 19.176471
| 72
| 0.711656
|
pOri0n
|
83c0ad87bdb0d12683a67e4df21dbaba578e230b
| 6,333
|
cpp
|
C++
|
src/platform/vulkan/image.cpp
|
PedroSFreire/LiftPR.Version
|
61e8e135335e3c4def80f345548620db95f1662d
|
[
"BSD-3-Clause"
] | 30
|
2019-07-24T09:58:22.000Z
|
2021-09-03T08:20:22.000Z
|
src/platform/vulkan/image.cpp
|
PedroSFreire/LiftPR.Version
|
61e8e135335e3c4def80f345548620db95f1662d
|
[
"BSD-3-Clause"
] | 15
|
2020-06-20T13:20:50.000Z
|
2021-04-26T16:05:33.000Z
|
src/platform/vulkan/image.cpp
|
PedroSFreire/LiftPR.Version
|
61e8e135335e3c4def80f345548620db95f1662d
|
[
"BSD-3-Clause"
] | 5
|
2020-06-17T08:38:34.000Z
|
2021-09-08T22:14:02.000Z
|
#include "image.h"
#include "buffer.h"
#include "depth_buffer.h"
#include "device.h"
#include "single_time_commands.h"
#include "vulkan/vulkan.hpp"
namespace vulkan {
Image::Image(const class Device& device, const VkExtent2D extent, const VkFormat format) :
Image(device,
extent,
format,
VK_IMAGE_TILING_OPTIMAL,
VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT) {
}
Image::Image(const class Device& device,
const VkExtent2D extent,
const VkFormat format,
const VkImageTiling tiling,
const VkImageUsageFlags usage) :
device_(device),
extent_(extent), format_(format), image_layout_(vk::ImageLayout::eUndefined) {
VkImageCreateInfo image_info = {};
image_info.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
image_info.imageType = VK_IMAGE_TYPE_2D;
image_info.extent.width = extent.width;
image_info.extent.height = extent.height;
image_info.extent.depth = 1;
image_info.mipLevels = 1;
image_info.arrayLayers = 1;
image_info.format = format;
image_info.tiling = tiling;
image_info.initialLayout = static_cast<VkImageLayout>(image_layout_);
image_info.usage = usage;
image_info.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
image_info.samples = VK_SAMPLE_COUNT_1_BIT;
image_info.flags = 0; // Optional
vulkanCheck(vkCreateImage(device.handle(), &image_info, nullptr, &image_), "create image");
}
Image::Image(Image&& other) noexcept :
device_(other.device_), extent_(other.extent_), format_(other.format_), image_layout_(other.image_layout_),
image_(other.image_) {
other.image_ = nullptr;
}
Image::~Image() {
if (image_ != nullptr) {
vkDestroyImage(device_.handle(), image_, nullptr);
image_ = nullptr;
}
}
DeviceMemory Image::allocateMemory(const VkMemoryPropertyFlags properties) const {
const auto requirements = getMemoryRequirements();
DeviceMemory memory(device_, requirements.size, requirements.memoryTypeBits, 0, properties);
vulkanCheck(vkBindImageMemory(device_.handle(), image_, memory.handle(), 0), "bind image memory");
return memory;
}
VkMemoryRequirements Image::getMemoryRequirements() const {
VkMemoryRequirements requirements;
vkGetImageMemoryRequirements(device_.handle(), image_, &requirements);
return requirements;
}
void Image::transitionImageLayout(CommandPool& command_pool, vk::ImageLayout new_layout) {
SingleTimeCommands::submit(command_pool, [&](VkCommandBuffer command_buffer) {
vk::ImageMemoryBarrier barrier;
barrier.oldLayout = image_layout_;
barrier.newLayout = new_layout;
barrier.image = image_;
barrier.setSubresourceRange({vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1});
if (new_layout == vk::ImageLayout::eDepthStencilAttachmentOptimal)
barrier.subresourceRange.aspectMask = vk::ImageAspectFlagBits::eDepth;
barrier.srcAccessMask = accessFlagsForLayout(image_layout_);
barrier.dstAccessMask = accessFlagsForLayout(new_layout);
vk::PipelineStageFlags src_stage_flags = pipelineStageForLayout(image_layout_);
vk::PipelineStageFlags dst_stage_flags = pipelineStageForLayout(new_layout);
vk::CommandBuffer vkCmdBuffer {command_buffer};
vkCmdBuffer.pipelineBarrier(src_stage_flags, dst_stage_flags, vk::DependencyFlags(), nullptr, nullptr, barrier);
});
image_layout_ = new_layout;
}
void Image::copyFromBuffer(CommandPool& command_pool, const vk::Buffer& buffer) {
SingleTimeCommands::submit(command_pool, [&](VkCommandBuffer command_buffer) {
vk::BufferImageCopy region;
region.setImageSubresource({vk::ImageAspectFlagBits::eColor, 0, 0, 1});
region.setImageOffset({0, 0, 0});
region.setImageExtent(vk::Extent3D(extent_, 1));
vk::CommandBuffer cmdBuf {command_buffer};
cmdBuf.copyBufferToImage(buffer, image_, vk::ImageLayout::eTransferDstOptimal, {region});
});
}
void Image::copyToBuffer(CommandPool& command_pool, const vk::Buffer& buffer) {
SingleTimeCommands::submit(command_pool, [&](VkCommandBuffer command_buffer) {
vk::BufferImageCopy region;
region.setImageSubresource({vk::ImageAspectFlagBits::eColor, 0, 0, 1});
region.setImageOffset({0, 0, 0});
region.setImageExtent(vk::Extent3D(extent_, 1));
vk::CommandBuffer cmdBuf {command_buffer};
cmdBuf.copyImageToBuffer(image_, vk::ImageLayout::eTransferSrcOptimal, buffer, {region});
});
}
vk::AccessFlags Image::accessFlagsForLayout(vk::ImageLayout layout) {
switch (layout) {
case vk::ImageLayout::ePreinitialized:
return vk::AccessFlagBits::eHostWrite;
case vk::ImageLayout::eTransferDstOptimal:
return vk::AccessFlagBits::eTransferWrite;
case vk::ImageLayout::eTransferSrcOptimal:
return vk::AccessFlagBits::eTransferRead;
case vk::ImageLayout::eColorAttachmentOptimal:
return vk::AccessFlagBits::eColorAttachmentWrite;
case vk::ImageLayout::eDepthStencilAttachmentOptimal:
return vk::AccessFlagBits::eDepthStencilAttachmentWrite;
case vk::ImageLayout::eShaderReadOnlyOptimal:
return vk::AccessFlagBits::eShaderRead;
default:
return vk::AccessFlags();
}
}
vk::PipelineStageFlags Image::pipelineStageForLayout(vk::ImageLayout layout) {
switch (layout) {
case vk::ImageLayout::eTransferDstOptimal:
case vk::ImageLayout::eTransferSrcOptimal:
return vk::PipelineStageFlagBits::eTransfer;
case vk::ImageLayout::eColorAttachmentOptimal:
return vk::PipelineStageFlagBits::eColorAttachmentOutput;
case vk::ImageLayout::eDepthStencilAttachmentOptimal:
return vk::PipelineStageFlagBits::eEarlyFragmentTests;
case vk::ImageLayout::eShaderReadOnlyOptimal:
return vk::PipelineStageFlagBits::eFragmentShader;
case vk::ImageLayout::ePreinitialized:
return vk::PipelineStageFlagBits::eHost;
case vk::ImageLayout::eUndefined:
return vk::PipelineStageFlagBits::eTopOfPipe;
default:
return vk::PipelineStageFlagBits::eBottomOfPipe;
}
}
} // namespace vulkan
| 38.852761
| 120
| 0.707406
|
PedroSFreire
|
83cabcb8793c45be6e820790d905f9b5aa7e5339
| 11,520
|
cpp
|
C++
|
FlowchartEditor/FlowchartLinkableLineSegment.cpp
|
pmachapman/Tulip
|
54f7bc3e8d5bb452ed8de6e6622e23d5e9be650a
|
[
"Unlicense"
] | null | null | null |
FlowchartEditor/FlowchartLinkableLineSegment.cpp
|
pmachapman/Tulip
|
54f7bc3e8d5bb452ed8de6e6622e23d5e9be650a
|
[
"Unlicense"
] | 33
|
2018-09-14T21:58:20.000Z
|
2022-01-12T21:39:22.000Z
|
FlowchartEditor/FlowchartLinkableLineSegment.cpp
|
pmachapman/Tulip
|
54f7bc3e8d5bb452ed8de6e6622e23d5e9be650a
|
[
"Unlicense"
] | null | null | null |
/* ==========================================================================
CFlowchartLinkableLineSegment
Author : Johan Rosengren, Abstrakt Mekanik AB
Date : 2004-04-29
Purpose : CFlowchartLinkableLineSegment is a CFlowchartEntity-
derived class, representing a line that can be linked
to other CFlowchartEntity-derived objects.
Description : The implementation is based on CDiagramLine, even though
not derived from it. The class allows two link point,
LINK_START and LINK_END - the top-left and bottom-right
corners.
Usage : Create with CFlowchartControlFactory::CreateFromString
========================================================================*/
#include "stdafx.h"
#include "FlowchartLinkableLineSegment.h"
#include "../DiagramEditor/DiagramLine.h"
//////////////////////////////////////////
// LineDDA callbacks from CDiagramLine
//
VOID CALLBACK HitTest(int X, int Y, LPARAM data);
VOID CALLBACK HitTestRect(int X, int Y, LPARAM data);
CFlowchartLinkableLineSegment::CFlowchartLinkableLineSegment()
/* ============================================================
Function : CFlowchartLinkableLineSegment::CFlowchartLinkableLineSegment
Description : constructor
Return : void
Parameters : none
Usage :
============================================================*/
{
SetMinimumSize(CSize(-1, -1));
SetMaximumSize(CSize(-1, -1));
SetType(_T("flowchart_arrow"));
SetTitle(_T(""));
}
CFlowchartLinkableLineSegment::~CFlowchartLinkableLineSegment()
/* ============================================================
Function : CFlowchartLinkableLineSegment::~CFlowchartLinkableLineSegment
Description : destructor
Return : void
Parameters : none
Usage :
============================================================*/
{
}
CDiagramEntity* CFlowchartLinkableLineSegment::Clone()
/* ============================================================
Function : CFlowchartLinkableLineSegment::Clone
Description : Clone this object to a new object.
Return : CDiagramEntity* - The new object.
Parameters : none
Usage : Call to create a clone of the object. The
caller will have to delete the object.
============================================================*/
{
CFlowchartLinkableLineSegment* obj = new CFlowchartLinkableLineSegment;
obj->Copy(this);
return obj;
}
void CFlowchartLinkableLineSegment::Draw(CDC* dc, CRect rect)
/* ============================================================
Function : CFlowchartLinkableLineSegment::Draw
Description : Draws the object.
Return : void
Parameters : CDC* dc - The CDC to draw to.
CRect rect - The real rectangle of the
object.
Usage : The function should clean up all selected
objects. Note that the CDC is a memory CDC,
so creating a memory CDC in this function
will probably not speed up the function.
============================================================*/
{
dc->SelectStockObject(BLACK_PEN);
dc->SelectStockObject(BLACK_BRUSH);
// Draw line
dc->MoveTo(rect.TopLeft());
dc->LineTo(rect.BottomRight());
// Draw title
CString str = GetTitle();
if (str.GetLength())
{
CFont font;
font.CreateFont(-round(12.0 * GetZoom()), 0, 0, 0, FW_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0, _T("Courier New"));
dc->SelectObject(&font);
int mode = dc->SetBkMode(TRANSPARENT);
CRect rectTemp(rect);
rectTemp.NormalizeRect();
int cy = round(14.0 * GetZoom());
int cut = round((double)GetMarkerSize().cx * GetZoom() / 2);
CRect r(rect.right - cut, rect.top, rect.right - (rectTemp.Width() + cut), rect.bottom);
if (rect.top == rect.bottom)
{
CRect r(rect.left, rect.top - (cy + cut), rect.right, rect.bottom);
r.NormalizeRect();
dc->DrawText(str, r, DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER | DT_CENTER);
}
else
{
CRect r(rect.right - cut, rect.top, rect.right - (cy * str.GetLength() + cut), rect.bottom);
r.NormalizeRect();
dc->DrawText(str, r, DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER | DT_RIGHT);
}
dc->SelectStockObject(DEFAULT_GUI_FONT);
dc->SetBkMode(mode);
}
}
CDiagramEntity* CFlowchartLinkableLineSegment::CreateFromString(const CString& str)
/* ============================================================
Function : CFlowchartLinkableLineSegment::CreateFromString
Description : Static factory function that creates and
returns an instance of this class if str
is a valid representation.
Return : CDiagramEntity* - The object, or NULL
if str is not a
representation of
this type.
Parameters : const CString& str - The string to create
from.
Usage : Can be used as a factory for text file loads.
Each object type should have its own
version - the default one is a model
implementation.
============================================================*/
{
CFlowchartLinkableLineSegment* obj = new CFlowchartLinkableLineSegment;
if (!obj->FromString(str))
{
delete obj;
obj = NULL;
}
return obj;
}
int CFlowchartLinkableLineSegment::GetHitCode(CPoint point) const
/* ============================================================
Function : CFlowchartLinkableLineSegment::GetHitCode
Description : Returns the hit point constant for point.
Return : int - The hit point,
DEHT_NONE if none.
Parameters : CPoint point - The point to check
Usage : Call to see in what part of the object point
lies.
============================================================*/
{
int result = DEHT_NONE;
CRect rect = GetRect();
hitParams hit;
hit.hit = FALSE;
hit.x = point.x;
hit.y = point.y;
LineDDA((int)GetLeft(),
(int)GetTop(),
(int)GetRight(),
(int)GetBottom(),
HitTest,
(LPARAM)&hit);
if (hit.hit)
result = DEHT_BODY;
CRect rectTest;
rectTest = GetSelectionMarkerRect(DEHT_TOPLEFT, rect);
if (rectTest.PtInRect(point))
result = DEHT_TOPLEFT;
rectTest = GetSelectionMarkerRect(DEHT_BOTTOMRIGHT, rect);
if (rectTest.PtInRect(point))
result = DEHT_BOTTOMRIGHT;
return result;
}
HCURSOR CFlowchartLinkableLineSegment::GetCursor(int hit) const
/* ============================================================
Function : CFlowchartLinkableLineSegment::GetCursor
Description : Returns the cursor for the given hit point.
Return : HCURSOR - The cursor to show
Parameters : int hit - The hit point constant (DEHT_)
to get the cursor for.
Usage : Call to get the cursor for a specific hit
point constant.
============================================================*/
{
HCURSOR cursor = NULL;
switch (hit)
{
case DEHT_BODY:
cursor = LoadCursor(NULL, IDC_SIZEALL);
break;
case DEHT_TOPLEFT:
cursor = LoadCursor(NULL, IDC_SIZEALL);
break;
case DEHT_BOTTOMRIGHT:
cursor = LoadCursor(NULL, IDC_SIZEALL);
break;
}
return cursor;
}
void CFlowchartLinkableLineSegment::DrawSelectionMarkers(CDC* dc, CRect rect) const
/* ============================================================
Function : CFlowchartLinkableLineSegment::DrawSelectionMarkers
Description : Draws the selection markers for the
object.
Return : void
Parameters : CDC* dc - The CDC to draw to
CRect rect - The real object rectangle.
Usage : rect is the true rectangle (zoomed) of the
object.
============================================================*/
{
CRect rectSelect;
dc->SelectStockObject(BLACK_PEN);
CBrush greenBrush;
greenBrush.CreateSolidBrush(RGB(0, 255, 0));
dc->SelectObject(&greenBrush);
rectSelect = GetSelectionMarkerRect(DEHT_TOPLEFT, rect);
dc->Rectangle(rectSelect);
rectSelect = GetSelectionMarkerRect(DEHT_BOTTOMRIGHT, rect);
dc->Rectangle(rectSelect);
dc->SelectStockObject(BLACK_BRUSH);
}
void CFlowchartLinkableLineSegment::SetRect(CRect rect)
/* ============================================================
Function : CFlowchartLinkableLineSegment::SetRect
Description : Sets the rect of the object.
Return : void
Parameters : CRect rect -
Usage : Overriden to avoid normalization.
============================================================*/
{
SetLeft(rect.left);
SetTop(rect.top);
SetRight(rect.right);
SetBottom(rect.bottom);
}
BOOL CFlowchartLinkableLineSegment::BodyInRect(CRect rect) const
/* ============================================================
Function : CFlowchartLinkableLineSegment::BodyInRect
Description : Used to see if any part of the object lies
in rect.
Return : BOOL - TRUE if any part of the
object lies inside rect.
Parameters : CRect rect - The rect to check.
Usage : Call to see if the object overlaps - for
example - a selection rubberband.
============================================================*/
{
BOOL result = FALSE;
hitParamsRect hit;
hit.rect = rect;
hit.hit = FALSE;
LineDDA((int)GetLeft(),
(int)GetTop(),
(int)GetRight(),
(int)GetBottom(),
HitTestRect,
(LPARAM)&hit);
if (hit.hit)
result = TRUE;
return result;
}
CPoint CFlowchartLinkableLineSegment::GetLinkPosition(int type)
/* ============================================================
Function : CFlowchartLinkableLineSegment::GetLinkPosition
Description : Returns the position of a link.
Return : CPoint - The position of the link,
-1, -1 if the link is not
allowed.
Parameters : int type - The type of the link.
Usage : The possible link types are:
LINK_TOP Links are allowed to the
top of the object.
LINK_BOTTOM Links are allowed to the
bottom.
LINK_LEFT Links are allowed to the
left.
LINK_RIGHT Links are allowed to the
right.
LINK_START Links are allowed to the
start of a line (normally
the top-left corner of
the non-normalized bounding
rect).
LINK_END Links are allowed to the
end of a line (normally the
bottom-right corner of the
non-normalized bounding
rect).
============================================================*/
{
CPoint point(-1, -1);
CRect rect = GetRect();
switch (type)
{
case LINK_START:
point.x = rect.left;
point.y = rect.top;
break;
case LINK_END:
point.x = rect.right;
point.y = rect.bottom;
break;
}
return point;
}
int CFlowchartLinkableLineSegment::AllowLink()
/* ============================================================
Function : CFlowchartLinkableLineSegment::AllowLink
Description : Returns the allowed link types for this
object.
Return : int - The allowed link types
Parameters : none
Usage : Call this function to get the link types
allowed for this object. Several link-types
can be ORed together. The possible link
types are:
LINK_TOP Links are allowed to the
top of the object.
LINK_BOTTOM Links are allowed to the
bottom.
LINK_LEFT Links are allowed to the
left.
LINK_RIGHT Links are allowed to the
right.
LINK_ALL Links are allowed to all
of the above.
LINK_START Links are allowed to the
start of a line (normally
the top-left corner of
the non-normalized bounding
rect).
LINK_END Links are allowed to the
end of a line (normally the
bottom-right corner of the
non-normalized bounding
rect).
============================================================*/
{
return LINK_START | LINK_END;
}
| 26.241458
| 107
| 0.59375
|
pmachapman
|
83cba6e15b084962e05c5549797891c18e752cf0
| 1,075
|
hpp
|
C++
|
Hypothesis-checker/argument_handler.hpp
|
novotnyt94/Hypothesis-checker
|
6c539ad748cf8771b9b73943363d6e32232f2df8
|
[
"MIT"
] | null | null | null |
Hypothesis-checker/argument_handler.hpp
|
novotnyt94/Hypothesis-checker
|
6c539ad748cf8771b9b73943363d6e32232f2df8
|
[
"MIT"
] | null | null | null |
Hypothesis-checker/argument_handler.hpp
|
novotnyt94/Hypothesis-checker
|
6c539ad748cf8771b9b73943363d6e32232f2df8
|
[
"MIT"
] | null | null | null |
#ifndef ARGUMENT_HANDLER_
#define ARGUMENT_HANDLER_
#include "errors.hpp"
#include <string>
namespace cube {
/* Parses arguments passed to the program. */
class argument_handler {
public:
/* Parses the arguments. */
static void parse_args(int argc, char ** argv);
//Whether input file was selected
static bool is_input;
//Whether compressed input file was selected
static bool is_comp_input;
//Whether output file for matchings was selected
static bool is_output;
//Whether output file for compressed matchings was selected
static bool is_comp_output;
//Whether output file for paths was selected
static bool is_path_output;
//Input file name
static std::string input_file;
//Compressed input file name
static std::string comp_input_file;
//Matching output file name
static std::string output_file;
//Compressed matching output file name
static std::string comp_output_file;
//Path output file name
static std::string path_output_file;
};
}
#endif //ARGUMENT_HANDLER
| 22.87234
| 62
| 0.717209
|
novotnyt94
|
83d1cbe8f1dc8cbdcf2d16d341aa538468ac8594
| 2,045
|
cpp
|
C++
|
Game/Source/GDKTestGyms/Private/AsyncPlayerController.cpp
|
sang-tian/UnrealGDKTestGyms
|
f68f71c99d35dc2a442845b1bcb84501342d482a
|
[
"MIT"
] | 9
|
2019-12-06T16:52:16.000Z
|
2021-01-04T22:25:46.000Z
|
Game/Source/GDKTestGyms/Private/AsyncPlayerController.cpp
|
sang-tian/UnrealGDKTestGyms
|
f68f71c99d35dc2a442845b1bcb84501342d482a
|
[
"MIT"
] | 250
|
2019-10-23T13:56:54.000Z
|
2021-12-14T17:01:23.000Z
|
Game/Source/GDKTestGyms/Private/AsyncPlayerController.cpp
|
sang-tian/UnrealGDKTestGyms
|
f68f71c99d35dc2a442845b1bcb84501342d482a
|
[
"MIT"
] | 9
|
2020-01-13T10:54:15.000Z
|
2021-12-20T07:28:09.000Z
|
// Copyright (c) Improbable Worlds Ltd, All Rights Reserved
#include "AsyncPlayerController.h"
#include "EngineUtils.h"
#include "SpatialGDKSettings.h"
#include "AsyncActorSpawner.h"
AAsyncPlayerController::AAsyncPlayerController()
{
}
void AAsyncPlayerController::BeginPlay()
{
Super::BeginPlay();
if (GetWorld()->GetNetMode() == NM_Client)
{
GetWorld()->GetTimerManager().SetTimer(TestCheckTimer, this, &AAsyncPlayerController::CheckTestPassed, 1.0f, false);
}
}
void AAsyncPlayerController::CheckTestPassed()
{
// Check for three statuses on client before reporting successful test;
// 1. AsyncActorSpawner indicates that test setup was correct
// 2. SpatialGDKSettings::bAsyncLoadNewClassesOnEntityCheckout is true
// 3. An instance of AsyncActor exists in the world
bool bAsyncTestCorrectlySetup = false;
bool bAsyncLoad = GetDefault<USpatialGDKSettings>()->bAsyncLoadNewClassesOnEntityCheckout;
bool bAsyncActorExists = false;
for (TActorIterator<AAsyncActorSpawner> It(GetWorld()); It; ++It)
{
AAsyncActorSpawner* AsyncActorSpawner = *It;
bAsyncTestCorrectlySetup = AsyncActorSpawner->bClientTestCorrectSetup;
}
for (TActorIterator<AActor> It(GetWorld()); It; ++It)
{
AActor* Actor = *It;
if (Actor->GetName().Contains(TEXT("AsyncActor_C")))
{
bAsyncActorExists = true;
break;
}
}
if (bAsyncTestCorrectlySetup && bAsyncLoad)
{
if (bAsyncActorExists)
{
UE_LOG(LogTemp, Log, TEXT("Async Test: Test passed."));
UpdateTestPassed(true);
}
else
{
UE_LOG(LogTemp, Log, TEXT("Async Test: Test valid but actor not spawned yet, checking again in 1 second."));
GetWorld()->GetTimerManager().SetTimer(TestCheckTimer, this, &AAsyncPlayerController::CheckTestPassed, 1.0f, false);
}
}
else
{
UE_LOG(LogTemp, Log, TEXT("Async Test: Test invalid on this client - client correctly setup %d, async load on: %d"), bAsyncTestCorrectlySetup, bAsyncLoad);
}
}
void AAsyncPlayerController::UpdateTestPassed_Implementation(bool bInTestPassed)
{
bTestPassed = bInTestPassed;
}
| 27.266667
| 157
| 0.74621
|
sang-tian
|
83d2cfac3c21be8b58da35c6640d34085576ebff
| 503
|
cpp
|
C++
|
2-Structural/11.Flyweight/src/Flyweight/Player.cpp
|
gfa99/gof_design_patterns
|
a33ee7f344f8e382bb9fc676b77b22a5a123bca0
|
[
"Apache-2.0"
] | 21
|
2017-11-08T11:32:48.000Z
|
2021-03-29T08:58:04.000Z
|
2-Structural/11.Flyweight/src/Flyweight/Player.cpp
|
gfa99/gof_design_patterns
|
a33ee7f344f8e382bb9fc676b77b22a5a123bca0
|
[
"Apache-2.0"
] | null | null | null |
2-Structural/11.Flyweight/src/Flyweight/Player.cpp
|
gfa99/gof_design_patterns
|
a33ee7f344f8e382bb9fc676b77b22a5a123bca0
|
[
"Apache-2.0"
] | 8
|
2017-11-26T13:57:50.000Z
|
2021-08-23T06:52:57.000Z
|
#include <iostream>
#include "Flyweight/Player.h"
namespace GoF {
namespace Flyweight {
Player::Player()
: AbstractItem('$')
{
std::cout << "\nCreating a Player .." << std::endl;
}
void Player::display(const Point & point)
{
std::cout << "displaying Player (" << symbol << ") at "
"Y = " << point.getVerticalAxis() <<
" X = " << point.getVerticalAxis() << std::endl;
}
}
}
| 20.958333
| 67
| 0.465209
|
gfa99
|
83d5880633fca24815d45aebe820075d1a91666b
| 3,217
|
cpp
|
C++
|
src/number_conversion_utils.cpp
|
william01110111/wmwwStatusline
|
658ae739e45694bfad201aa33eb2aceecef10195
|
[
"WTFPL"
] | 1
|
2021-11-11T03:43:32.000Z
|
2021-11-11T03:43:32.000Z
|
src/number_conversion_utils.cpp
|
william01110111/wmwwStatusline
|
658ae739e45694bfad201aa33eb2aceecef10195
|
[
"WTFPL"
] | null | null | null |
src/number_conversion_utils.cpp
|
william01110111/wmwwStatusline
|
658ae739e45694bfad201aa33eb2aceecef10195
|
[
"WTFPL"
] | null | null | null |
#include "number_conversion_utils.h"
#include <math.h>
using std::min;
using std::max;
// const string fixedWidthSpace = "\xe3\x80\x80"; // Full width space
const string fixedWidthSpace = "\x20"; // ASCII space
// const string fixedWidthSpace = "\x20\x20"; // 2 ASCII spaces
string intToString(int in)
{
string out;
bool negative = false;
if (in < 0)
{
negative = true;
in *= -1;
}
do
{
out = (char)((in % 10) + '0') + out;
in /= 10;
}
while (in > 0);
if (negative)
out = "-" + out;
return out;
}
string doubleToString(double in)
{
long long a=in;
long long b=(in-a)*10000000000;
if (b<0)
b*=-1;
if (b%10==9)
b+=1;
while (b>0 && !(b%10))
b/=10;
return intToString(a)+(b ? "."+intToString(b) : "");
}
int stringToInt(string in)
{
int out = 0;
for (int i = 0; i < (int)in.size(); i++)
{
if (in[i] >= '0' && in[i] <= '9')
{
out = out * 10 + in[i] - '0';
}
else if (in[i] == '.')
break;
}
if (in.size() > 0 && in[0] == '-')
out *= -1;
return out;
}
unsigned long long stringToUnsignedLongLong(string in)
{
unsigned long long out = 0;
for (int i = 0; i < (int)in.size(); i++)
{
if (in[i] >= '0' && in[i] <= '9')
{
out = out * 10 + in[i] - '0';
}
else if (in[i] == '.')
break;
}
return out;
}
double stringToDouble(string in)
{
double out = 0;
int divider = 1;
for (int i = 0; i < (int)in.size(); i++)
{
if (divider == 1)
{
if (in[i] >= '0' && in[i] <= '9')
out = out * 10 + in[i] - '0';
else if (in[i] == '.')
divider = 10;
}
else
{
if (in[i] >= '0' && in[i] <= '9')
{
out += (double)(in[i] - '0') / divider;
divider *= 10;
}
}
}
if (in.size() > 0 && in[0] == '-')
out *= -1;
return out;
}
const vector<string> verticalBarStrs = {fixedWidthSpace, "▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"};
const vector<string> horizontalBarStrs = {fixedWidthSpace, "▏", "▎", "▍", "▌", "▋", "▊", "▉", "█"};
const vector<string> pieChartStrs = {fixedWidthSpace, "◜", "◠", "◠", "○", "○", "◔", "◑", "◕", "●"};
const vector<string> dotStrs = {fixedWidthSpace, "◌", "○", "◎", "◉", "●"};
const vector<string> circleSpinnerStrs = {"◜", "◝", "◞", " ◟"};
string verticalBar(double val)
{
int i=min(floor(val * verticalBarStrs.size()), (double)verticalBarStrs.size()-1);
return verticalBarStrs[i];
}
string doubleAsPercent(double val)
{
return
(val >= 1 ? intToString(val) : " ") +
(val * 10 >= 1 ? intToString((int)(val*10) % 10) : " ") +
intToString((int)(val*100) % 10) +
"%";
}
string horizontalBar(double val, int charWidth)
{
string out;
int before, after, index;
before = (int)floor(charWidth * val);
index = min(((charWidth * val) - before) * horizontalBarStrs.size(), (double)verticalBarStrs.size()-1);
after = charWidth - before - 1;
for (int i = 0; i < before; i++)
{
out += "█";
}
out += horizontalBarStrs[index];
for (int i = 0; i < after; i++)
{
out += fixedWidthSpace;
}
return out;
}
string pieChart(double val)
{
int i=min(floor(val * pieChartStrs.size()), (double)pieChartStrs.size()-1);
return pieChartStrs[i];
}
string dot(double val)
{
int i=min(floor(val * dotStrs.size()), (double)dotStrs.size()-1);
return dotStrs[i];
}
| 18.703488
| 104
| 0.539633
|
william01110111
|
83d8a1e4e797244b84ad7fff3fea86eca617b199
| 339
|
hpp
|
C++
|
y2018/filters/mergeFinalWindows.hpp
|
valkyrierobotics/vision2018
|
aa82e936c5481b7cc43a46ff5f6e68702c2166c2
|
[
"BSD-2-Clause"
] | 2
|
2016-08-06T06:21:02.000Z
|
2017-01-10T05:45:13.000Z
|
y2018/filters/mergeFinalWindows.hpp
|
valkyrierobotics/vision2018
|
aa82e936c5481b7cc43a46ff5f6e68702c2166c2
|
[
"BSD-2-Clause"
] | 1
|
2017-04-15T20:54:59.000Z
|
2017-04-15T20:54:59.000Z
|
y2018/filters/mergeFinalWindows.hpp
|
valkyrierobotics/vision2018
|
aa82e936c5481b7cc43a46ff5f6e68702c2166c2
|
[
"BSD-2-Clause"
] | 3
|
2016-07-30T06:19:55.000Z
|
2017-02-07T01:55:05.000Z
|
#ifndef MERGE_FINAL_WINDOWS_HPP
#define MERGE_FINAL_WINDOWS_HPP
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include "mergeFinal.hpp"
void mergeFinalWindows(cv::Mat& img1, cv::Mat& img2, int& weight1, int& weight2, int& apply, bool visible, const bool isStreaming);
#endif // MERGE_FINAL_WINDOWS_HPP
| 28.25
| 131
| 0.784661
|
valkyrierobotics
|
83e148a164441ac3f8147d90b99d9abf2f5de0be
| 4,624
|
cxx
|
C++
|
Modules/Core/Common/test/otbRGBAPixelConverter.cxx
|
lfyater/Orfeo
|
eb3d4d56089065b99641d8ae7338d2ed0358d28a
|
[
"Apache-2.0"
] | 2
|
2019-02-13T14:48:19.000Z
|
2019-12-03T02:54:28.000Z
|
Modules/Core/Common/test/otbRGBAPixelConverter.cxx
|
lfyater/Orfeo
|
eb3d4d56089065b99641d8ae7338d2ed0358d28a
|
[
"Apache-2.0"
] | 3
|
2015-10-14T10:11:38.000Z
|
2015-10-15T08:26:23.000Z
|
Modules/Core/Common/test/otbRGBAPixelConverter.cxx
|
CS-SI/OTB
|
5926aca233ff8a0fb11af1a342a6f5539cd5e376
|
[
"Apache-2.0"
] | 2
|
2015-10-08T12:04:06.000Z
|
2018-06-19T08:00:47.000Z
|
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "itkMacro.h"
#include <cstdlib>
#include <cmath>
#include "otbRGBAPixelConverter.h"
int otbRGBAPixelConverterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
{
typedef unsigned char PixelType0;
typedef double PixelType1;
typedef itk::RGBAPixel<unsigned char> PixelType2;
typedef itk::RGBPixel<double> PixelType3;
typedef otb::RGBAPixelConverter<PixelType0, PixelType0> ConverterType0;
typedef otb::RGBAPixelConverter<PixelType1, PixelType1> ConverterType1;
typedef otb::RGBAPixelConverter<PixelType0, PixelType2> ConverterType2;
typedef otb::RGBAPixelConverter<PixelType0, PixelType3> ConverterType3;
// Instantiating object
ConverterType0::Pointer converter0 = ConverterType0::New();
ConverterType1::Pointer converter1 = ConverterType1::New();
ConverterType2::Pointer converter2 = ConverterType2::New();
ConverterType3::Pointer converter3 = ConverterType3::New();
std::cout << converter0 << std::endl;
std::cout << converter1 << std::endl;
std::cout << converter2 << std::endl;
std::cout << converter3 << std::endl;
return EXIT_SUCCESS;
}
int otbRGBAPixelConverter(int itkNotUsed(argc), char * itkNotUsed(argv) [])
{
typedef unsigned int PixelType0;
typedef double PixelType1;
typedef itk::RGBAPixel<unsigned int> PixelType2;
typedef itk::RGBAPixel<double> PixelType3;
typedef itk::RGBPixel<double> PixelType4;
typedef otb::RGBAPixelConverter<PixelType0, PixelType0> ConverterType0;
typedef otb::RGBAPixelConverter<PixelType1, PixelType0> ConverterType1;
typedef otb::RGBAPixelConverter<PixelType0, PixelType3> ConverterType2;
typedef otb::RGBAPixelConverter<PixelType0, PixelType4> ConverterType3;
// Instantiating object
ConverterType0::Pointer converter0 = ConverterType0::New();
ConverterType1::Pointer converter1 = ConverterType1::New();
ConverterType2::Pointer converter2 = ConverterType2::New();
ConverterType3::Pointer converter3 = ConverterType3::New();
PixelType2 pixel0;
pixel0[0] = 125;
pixel0[1] = 105;
pixel0[2] = 145;
pixel0[3] = 0;
ConverterType0::OutputPixelType outputPixel0 = converter0->Convert(pixel0);
std::cout << "outputPixel0: " << outputPixel0 << std::endl;
if(outputPixel0 != 112)
{
itkGenericExceptionMacro(<< "RGBA<unsigned int> 2 unsigned int Failed");
}
PixelType3 pixel1;
pixel1[0] = 125.0;
pixel1[1] = 105.0;
pixel1[2] = 145.0;
pixel1[3] = 191.0;
ConverterType1::OutputPixelType outputPixel1 = converter1->Convert(pixel1);
std::cout << "outputPixel1: " << outputPixel1 << std::endl;
if(outputPixel1 != 112)
{
itkGenericExceptionMacro(<< "RGBA<double> 2 unsigned int Failed");
}
PixelType2 pixel2;
pixel2[0] = 125;
pixel2[1] = 105;
pixel2[2] = 145;
pixel2[3] = 0;
ConverterType2::OutputPixelType outputPixel2 = converter2->Convert(pixel2);
std::cout << "outputPixel2: " << outputPixel2 << std::endl;
if(outputPixel2[0] != 125 || outputPixel2[1] != 105 || outputPixel2[2] != 145 || outputPixel2[3] != 0 )
{
itkGenericExceptionMacro(<< "RGBA<unsigned int> 2 RGBA<double> Failed");
}
PixelType2 pixel3;
pixel3[0] = 125;
pixel3[1] = 105;
pixel3[2] = 145;
pixel3[3] = 0;
ConverterType3::OutputPixelType outputPixel3 = converter3->Convert(pixel3);
std::cout << "outputPixel3: " << outputPixel3 << std::endl;
if(outputPixel3[0] != 125 || outputPixel3[1] != 105 || outputPixel3[2] != 145)
{
itkGenericExceptionMacro(<< "RGBA<unsigned int> 2 RGB<double> Failed");
}
return EXIT_SUCCESS;
}
| 37.593496
| 105
| 0.658737
|
lfyater
|
83e4c4f670cddc19f5905c689f507838288a762f
| 6,366
|
cc
|
C++
|
src/optimizer.cc
|
RobertBendun/stacky
|
f61622e35c8bd07533cb198573e355e556cd8057
|
[
"BSL-1.0"
] | 3
|
2021-09-14T14:22:00.000Z
|
2021-09-29T20:04:40.000Z
|
src/optimizer.cc
|
RobertBendun/stacky
|
f61622e35c8bd07533cb198573e355e556cd8057
|
[
"BSL-1.0"
] | 58
|
2021-09-14T22:20:28.000Z
|
2021-11-24T17:37:42.000Z
|
src/optimizer.cc
|
RobertBendun/stacky
|
f61622e35c8bd07533cb198573e355e556cd8057
|
[
"BSL-1.0"
] | null | null | null |
#include "stacky.hh"
#include "utilities.cc"
namespace optimizer
{
auto for_all_functions(Generation_Info &geninfo, auto &&iteration)
{
bool result = callv(iteration, false, geninfo, geninfo.main);
for (auto &[name, word] : geninfo.words)
if (word.kind == Word::Kind::Function)
result |= callv(iteration, false, geninfo, word.function_body);
return result;
}
void remove_unused_words_and_strings(
Generation_Info &geninfo,
std::vector<Operation> const& function_body,
std::unordered_set<std::uint64_t> &used_words,
std::unordered_set<std::uint64_t> &used_strings)
{
for (auto const& op : function_body) {
if (op.kind != Operation::Kind::Push_Symbol && op.kind != Operation::Kind::Call_Symbol)
continue;
if (op.token.kind == Token::Kind::String) {
used_strings.insert(op.token.ival);
} else {
if (used_words.contains(op.ival))
continue;
used_words.insert(op.ival);
auto const word = std::find_if(std::cbegin(geninfo.words), std::cend(geninfo.words), [word_id = op.ival](auto const &entry)
{
return entry.second.id == word_id;
});
assert(word != std::cend(geninfo.words));
if (word->second.kind != Word::Kind::Function)
continue;
remove_unused_words_and_strings(geninfo, word->second.function_body, used_words, used_strings);
}
}
}
auto remove_unused_words_and_strings(Generation_Info &geninfo) -> bool
{
std::unordered_set<std::uint64_t> used_words;
std::unordered_set<std::uint64_t> used_strings;
remove_unused_words_and_strings(geninfo, geninfo.main, used_words, used_strings);
auto const removed_words = std::erase_if(geninfo.words, [&](auto const& entry) {
return (entry.second.kind == Word::Kind::Function || entry.second.kind == Word::Kind::Array) && !used_words.contains(entry.second.id);
});
auto const removed_strings = std::erase_if(geninfo.strings, [&](auto const& entry) {
return !used_strings.contains(entry.second);
});
if (removed_words > 0) verbose("Removed {} functions and arrays"_format(removed_words));
if (removed_strings > 0) verbose("Removed {} strings"_format(removed_strings));
return removed_words + removed_strings;
}
auto optimize_comptime_known_conditions([[maybe_unused]] Generation_Info &geninfo, std::vector<Operation> &function_body) -> bool
{
bool done_something = false;
auto const remap = [&function_body](unsigned start, unsigned end, unsigned amount, auto const& ...msg)
{
for (auto& op : function_body)
if (op.jump >= start && op.jump <= end) {
// (std::cout << ... << msg) << ((sizeof...(msg)==0)+" ") << op.jump << " -> " << (op.jump - amount) << '\n';
op.jump -= amount;
}
};
for (auto branch_op = 1u; branch_op < function_body.size(); ++branch_op) {
auto const condition_op = branch_op - 1;
auto const& condition = function_body[condition_op];
auto const& branch = function_body[branch_op];
if (condition.kind != Operation::Kind::Push_Int || branch.kind != Operation::Kind::Do && branch.kind != Operation::Kind::If)
continue;
done_something = true;
switch (branch.kind) {
case Operation::Kind::Do:
{
auto const condition_ival = condition.ival;
auto const end_op = branch.jump-1;
if (condition.ival != 0) {
assert(function_body[branch.jump-1].kind == Operation::Kind::End);
if (std::cbegin(function_body) + branch.jump + 1 != std::cend(function_body)) {
warning(function_body[branch.jump].location, "Dead code: Loop is infinite");
info(function_body[condition_op-1].location, "Infinite loop introduced here.");
}
function_body.erase(std::cbegin(function_body) + branch.jump, std::end(function_body));
function_body.erase(std::cbegin(function_body) + condition_op, std::cbegin(function_body) + branch_op + 1);
remap(branch_op+1, end_op, 3);
verbose(branch.token, "Optimizing infinite loop (condition is always true)");
} else {
function_body.erase(std::cbegin(function_body) + condition_op, std::cbegin(function_body) + branch.jump);
remap(end_op, -1, end_op - branch_op + 3);
verbose(branch.token, "Optimizing never executing loop (condition is always false)");
}
// find and remove `while`
auto while_op = unsigned(condition_op-1);
while (while_op < function_body.size() &&
function_body[while_op].kind != Operation::Kind::While && function_body[while_op].jump != branch_op)
--while_op;
function_body.erase(std::cbegin(function_body) + while_op);
if (condition_ival == 0)
remap(while_op, branch_op, 1);
}
break;
case Operation::Kind::If:
{
auto const end_or_else = branch.jump-1;
auto const else_op = end_or_else;
auto const end = function_body[end_or_else].kind == Operation::Kind::Else ? function_body[end_or_else].jump-1 : end_or_else;
if (condition.ival != 0) {
// Do `if` has else branch? If yes, remove it. Otherwise remove unnesesary end operation
if (end != else_op) {
function_body.erase(std::cbegin(function_body) + else_op, std::cbegin(function_body) + end + 2);
remap(end, -1, end - else_op + 1);
} else {
function_body.erase(std::cbegin(function_body) + else_op);
remap(end, -1, 1);
}
remap(branch_op, end_or_else, 2); // `if` and condition
function_body.erase(std::cbegin(function_body) + condition_op, std::cbegin(function_body) + branch_op + 1);
verbose(branch.token, "Optimizing always then `if` (conditions is always true)");
} else {
// Do `if` has else branch? If yes, remove `end` operation from it
if (end != else_op) {
function_body.erase(std::cbegin(function_body) + end + 1);
}
// remove then branch and condition
function_body.erase(std::cbegin(function_body) + condition_op, std::cbegin(function_body) + else_op + 1);
remap(end_or_else, -1, 3 + (end_or_else != end));
verbose(branch.token, "Optimizing always else `if` (condition is always false)");
}
}
break;
default:
unreachable("We check earlier for possible values");
}
branch_op -= 1;
}
return done_something;
}
void optimize(Generation_Info &geninfo)
{
while (remove_unused_words_and_strings(geninfo)
|| for_all_functions(geninfo, optimize_comptime_known_conditions))
{
}
}
}
| 37.447059
| 137
| 0.672636
|
RobertBendun
|
83e79f66ac0b12fe1bae71bf032824027513d05e
| 7,371
|
cpp
|
C++
|
src/openms/source/ANALYSIS/MAPMATCHING/TransformationModel.cpp
|
liangoaix/OpenMS
|
cccbc5d872320f197091596db275f35b4d0458cd
|
[
"Zlib",
"Apache-2.0"
] | null | null | null |
src/openms/source/ANALYSIS/MAPMATCHING/TransformationModel.cpp
|
liangoaix/OpenMS
|
cccbc5d872320f197091596db275f35b4d0458cd
|
[
"Zlib",
"Apache-2.0"
] | null | null | null |
src/openms/source/ANALYSIS/MAPMATCHING/TransformationModel.cpp
|
liangoaix/OpenMS
|
cccbc5d872320f197091596db275f35b4d0458cd
|
[
"Zlib",
"Apache-2.0"
] | null | null | null |
// --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
// ETH Zurich, and Freie Universitaet Berlin 2002-2013.
//
// This software is released under a three-clause BSD license:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of any author or any participating institution
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
// For a full list of authors, refer to the file AUTHORS.
// --------------------------------------------------------------------------
// 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 ANY OF THE AUTHORS OR THE CONTRIBUTING
// INSTITUTIONS 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.
//
// --------------------------------------------------------------------------
// $Maintainer: $
// $Authors: Hendrik Weisser $
// --------------------------------------------------------------------------
#include <OpenMS/ANALYSIS/MAPMATCHING/TransformationModel.h>
#include <OpenMS/MATH/STATISTICS/StatisticFunctions.h>
#include <OpenMS/CONCEPT/LogStream.h>
#include <OpenMS/DATASTRUCTURES/ListUtils.h>
#include "Wm5Vector2.h"
#include "Wm5ApprLineFit2.h"
#include <algorithm>
#include <numeric>
#include <iterator>
using namespace std;
namespace OpenMS
{
TransformationModelLinear::TransformationModelLinear(
const TransformationModel::DataPoints& data, const Param& params)
{
params_ = params;
data_given_ = !data.empty();
if (!data_given_ && params.exists("slope") && (params.exists("intercept")))
{
// don't estimate parameters, use given values
slope_ = params.getValue("slope");
intercept_ = params.getValue("intercept");
}
else // estimate parameters from data
{
Param defaults;
getDefaultParameters(defaults);
params_.setDefaults(defaults);
symmetric_ = params_.getValue("symmetric_regression") == "true";
size_t size = data.size();
std::vector<Wm5::Vector2d> points;
if (size == 0) // no data
{
throw Exception::IllegalArgument(__FILE__, __LINE__, __PRETTY_FUNCTION__,
"no data points for 'linear' model");
}
else if (size == 1) // degenerate case, but we can still do something
{
slope_ = 1.0;
intercept_ = data[0].second - data[0].first;
}
else // compute least-squares fit
{
for (size_t i = 0; i < size; ++i)
{
points.push_back(Wm5::Vector2d(data.at(i).first, data.at(i).second));
}
if (!Wm5::HeightLineFit2<double>(size, &points.front(), slope_, intercept_))
throw std::runtime_error("could not fit");
}
}
}
TransformationModelLinear::~TransformationModelLinear()
{
}
double TransformationModelLinear::evaluate(const double value) const
{
return slope_ * value + intercept_;
}
void TransformationModelLinear::invert()
{
if (slope_ == 0)
throw Exception::DivisionByZero(__FILE__, __LINE__,
__PRETTY_FUNCTION__);
intercept_ = -intercept_ / slope_;
slope_ = 1.0 / slope_;
// update parameters:
if (params_.exists("slope") && (params_.exists("intercept")))
{
params_.setValue("slope", slope_, params_.getDescription("slope"));
params_.setValue("intercept", intercept_,
params_.getDescription("intercept"));
}
}
void TransformationModelLinear::getParameters(double& slope,
double& intercept) const
{
slope = slope_;
intercept = intercept_;
}
void TransformationModelLinear::getDefaultParameters(Param& params)
{
params.clear();
params.setValue("symmetric_regression", "false", "Perform linear regression"
" on 'y - x' vs. 'y + x', instead of on 'y' vs. 'x'.");
params.setValidStrings("symmetric_regression",
ListUtils::create<String>("true,false"));
}
TransformationModelInterpolated::TransformationModelInterpolated(
const TransformationModel::DataPoints& data, const Param& params)
{
params_ = params;
Param defaults;
getDefaultParameters(defaults);
params_.setDefaults(defaults);
// need monotonically increasing x values (can't have the same value twice):
map<double, vector<double> > mapping;
for (TransformationModel::DataPoints::const_iterator it = data.begin();
it != data.end(); ++it)
{
mapping[it->first].push_back(it->second);
}
x_.resize(mapping.size());
y_.resize(mapping.size());
size_t i = 0;
for (map<double, vector<double> >::const_iterator it =
mapping.begin(); it != mapping.end(); ++it, ++i)
{
x_[i] = it->first;
// use average y value:
y_[i] = accumulate(it->second.begin(), it->second.end(), 0.0) /
it->second.size();
}
if (x_.size() < 3)
{
throw Exception::IllegalArgument(__FILE__, __LINE__, __PRETTY_FUNCTION__, "Cubic spline model needs at least 3 data points (with unique x values)");
}
interp_ = new Spline2d<double>(3, x_, y_);
// linear model for extrapolation:
TransformationModel::DataPoints lm_data(2);
lm_data[0] = make_pair(x_.front(), y_.front());
lm_data[1] = make_pair(x_.back(), y_.back());
lm_ = new TransformationModelLinear(lm_data, Param());
}
TransformationModelInterpolated::~TransformationModelInterpolated()
{
delete interp_;
delete lm_;
}
double TransformationModelInterpolated::evaluate(const double value)
const
{
if ((value < x_.front()) || (value > x_.back())) // extrapolate
{
return lm_->evaluate(value);
}
// interpolate:
return interp_->eval(value);
}
void TransformationModelInterpolated::getDefaultParameters(Param& params)
{
params.clear();
params.setValue("interpolation_type", "cspline",
"Type of interpolation to apply.");
StringList types = ListUtils::create<String>("linear,polynomial,cspline,akima");
params.setValidStrings("interpolation_type", types);
}
}
| 36.671642
| 154
| 0.625017
|
liangoaix
|
83e942a3070b9a42cce922527ab8e45882cc245a
| 774
|
hpp
|
C++
|
libs/fnd/units/include/bksge/fnd/units/luminance.hpp
|
myoukaku/bksge
|
0f8b60e475a3f1709723906e4796b5e60decf06e
|
[
"MIT"
] | 4
|
2018-06-10T13:35:32.000Z
|
2021-06-03T14:27:41.000Z
|
libs/fnd/units/include/bksge/fnd/units/luminance.hpp
|
myoukaku/bksge
|
0f8b60e475a3f1709723906e4796b5e60decf06e
|
[
"MIT"
] | 566
|
2017-01-31T05:36:09.000Z
|
2022-02-09T05:04:37.000Z
|
libs/fnd/units/include/bksge/fnd/units/luminance.hpp
|
myoukaku/bksge
|
0f8b60e475a3f1709723906e4796b5e60decf06e
|
[
"MIT"
] | 1
|
2018-07-05T04:40:53.000Z
|
2018-07-05T04:40:53.000Z
|
/**
* @file luminance.hpp
*
* @brief luminance の定義
*
* @author myoukaku
*/
#ifndef BKSGE_FND_UNITS_LUMINANCE_HPP
#define BKSGE_FND_UNITS_LUMINANCE_HPP
#include <bksge/fnd/units/candela.hpp>
#include <bksge/fnd/units/metre.hpp>
namespace bksge
{
namespace units
{
// カンデラ毎平方メートル(輝度の単位)
template <typename T> using candela_per_square_metre = decltype(candela<T>() / metre<T>() / metre<T>());
template <typename T> using candelas_per_square_metre = candela_per_square_metre<T>;
template <typename T> using candela_per_square_meter = candela_per_square_metre<T>;
template <typename T> using candelas_per_square_meter = candela_per_square_metre<T>;
} // namespace units
} // namespace bksge
#endif // BKSGE_FND_UNITS_LUMINANCE_HPP
| 24.1875
| 106
| 0.736434
|
myoukaku
|
83ea7200763af9ed99e49f10e502767a9429f83e
| 562
|
tpp
|
C++
|
src/algorithms/rem_factorial.tpp
|
adienes/remainder-tree
|
0aa76214ab6f2a4389ec45a239ea660749989a90
|
[
"MIT"
] | null | null | null |
src/algorithms/rem_factorial.tpp
|
adienes/remainder-tree
|
0aa76214ab6f2a4389ec45a239ea660749989a90
|
[
"MIT"
] | null | null | null |
src/algorithms/rem_factorial.tpp
|
adienes/remainder-tree
|
0aa76214ab6f2a4389ec45a239ea660749989a90
|
[
"MIT"
] | null | null | null |
#include "intermediate_computation.hpp"
#include "utils.hpp"
#include <NTL/ZZ_pX.h>
#include <NTL/matrix.h>
#include "../elements/element.hpp"
template <typename T, typename U>
T calculate_factorial(long n, const U& m, const std::function<std::vector<T> (long, long)>& get_A, const PolyMatrix& formula) {
// return compute_product_node<T, U>(get_A(0, n), m, 1);
if (n == 0) {
return T(1)%m;
}
(void)formula; //just to silence unused variable warning
return compute_product_node<T,U>(get_A(0,n), m, 1);
}
//#include "rem_factorial_custom.tpp"
| 24.434783
| 127
| 0.690391
|
adienes
|
83ef47cb67d5d2858e9270db4657e948d7c23a43
| 4,676
|
cpp
|
C++
|
applications/RANSApplication/tests/cpp/test_incompressible_potential_flow_elements.cpp
|
Rodrigo-Flo/Kratos
|
f718cae5d1618e9c0e7ed1da9e95b7a853e62b1b
|
[
"BSD-4-Clause"
] | null | null | null |
applications/RANSApplication/tests/cpp/test_incompressible_potential_flow_elements.cpp
|
Rodrigo-Flo/Kratos
|
f718cae5d1618e9c0e7ed1da9e95b7a853e62b1b
|
[
"BSD-4-Clause"
] | null | null | null |
applications/RANSApplication/tests/cpp/test_incompressible_potential_flow_elements.cpp
|
Rodrigo-Flo/Kratos
|
f718cae5d1618e9c0e7ed1da9e95b7a853e62b1b
|
[
"BSD-4-Clause"
] | null | null | null |
// | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Suneth Warnakulasuriya
//
// System includes
// External includes
// Project includes
#include "containers/model.h"
#include "testing/testing.h"
// Application includes
#include "custom_utilities/test_utilities.h"
#include "includes/cfd_variables.h"
#include "rans_application_variables.h"
namespace Kratos
{
namespace Testing
{
namespace
{
ModelPart& RansIncompressiblePotentialFlowVelocity2D3NSetUp(
Model& rModel)
{
const auto add_variables_function = [](ModelPart& rModelPart) {
rModelPart.AddNodalSolutionStepVariable(VELOCITY_POTENTIAL);
};
using namespace RansApplicationTestUtilities;
auto& r_model_part = CreateScalarVariableTestModelPart(
rModel, "RansIncompressiblePotentialFlowVelocity2D3N",
"LineCondition2D2N", add_variables_function, VELOCITY_POTENTIAL, 1);
// set nodal historical variables
RandomFillNodalHistoricalVariable(r_model_part, VELOCITY_POTENTIAL, -10.0, 10.0);
return r_model_part;
}
} // namespace
KRATOS_TEST_CASE_IN_SUITE(RansIncompressiblePotentialFlowVelocity2D3N_EquationIdVector, KratosRansFastSuite)
{
// Setup:
Model model;
auto& r_model_part = RansIncompressiblePotentialFlowVelocity2D3NSetUp(model);
// Test:
RansApplicationTestUtilities::TestEquationIdVector<ModelPart::ElementsContainerType>(r_model_part);
}
KRATOS_TEST_CASE_IN_SUITE(RansIncompressiblePotentialFlowVelocity2D3N_GetDofList, KratosRansFastSuite)
{
// Setup:
Model model;
auto& r_model_part = RansIncompressiblePotentialFlowVelocity2D3NSetUp(model);
// Test:
RansApplicationTestUtilities::TestGetDofList<ModelPart::ElementsContainerType>(
r_model_part, VELOCITY_POTENTIAL);
}
KRATOS_TEST_CASE_IN_SUITE(RansIncompressiblePotentialFlowVelocity2D3N_CalculateLocalSystem,
KratosRansFastSuite)
{
// Setup:
Model model;
auto& r_model_part = RansIncompressiblePotentialFlowVelocity2D3NSetUp(model);
// Test:
Matrix LHS, ref_LHS(3, 3, 0.0);
Vector RHS, ref_RHS(3);
auto& r_element = r_model_part.Elements().front();
r_element.CalculateLocalSystem(
LHS, RHS, static_cast<const ProcessInfo&>(r_model_part.GetProcessInfo()));
// setting reference values
ref_RHS[0] = -5.1041666666666670e+00;
ref_RHS[1] = 1.2165570175438596e+01;
ref_RHS[2] = -7.0614035087719298e+00;
ref_LHS(0, 0) = 5.0000000000000000e-01;
ref_LHS(0, 1) = -5.0000000000000000e-01;
ref_LHS(1, 0) = -5.0000000000000000e-01;
ref_LHS(1, 1) = 1.0000000000000000e+00;
ref_LHS(1, 2) = -5.0000000000000000e-01;
ref_LHS(2, 1) = -5.0000000000000000e-01;
ref_LHS(2, 2) = 5.0000000000000000e-01;
KRATOS_CHECK_VECTOR_NEAR(RHS, ref_RHS, 1e-12);
KRATOS_CHECK_MATRIX_NEAR(LHS, ref_LHS, 1e-12);
}
KRATOS_TEST_CASE_IN_SUITE(RansIncompressiblePotentialFlowVelocity2D3N_CalculateLeftHandSide,
KratosRansFastSuite)
{
// Setup:
Model model;
auto& r_model_part = RansIncompressiblePotentialFlowVelocity2D3NSetUp(model);
// Test:
Matrix LHS, ref_LHS(3, 3, 0.0);
auto& r_element = r_model_part.Elements().front();
r_element.CalculateLeftHandSide(
LHS, static_cast<const ProcessInfo&>(r_model_part.GetProcessInfo()));
// setting reference values
ref_LHS(0, 0) = 5.0000000000000000e-01;
ref_LHS(0, 1) = -5.0000000000000000e-01;
ref_LHS(1, 0) = -5.0000000000000000e-01;
ref_LHS(1, 1) = 1.0000000000000000e+00;
ref_LHS(1, 2) = -5.0000000000000000e-01;
ref_LHS(2, 1) = -5.0000000000000000e-01;
ref_LHS(2, 2) = 5.0000000000000000e-01;
KRATOS_CHECK_MATRIX_NEAR(LHS, ref_LHS, 1e-12);
}
KRATOS_TEST_CASE_IN_SUITE(RansIncompressiblePotentialFlowVelocity2D3N_CalculateRightHandSide,
KratosRansFastSuite)
{
// Setup:
Model model;
auto& r_model_part = RansIncompressiblePotentialFlowVelocity2D3NSetUp(model);
// Test:
Vector RHS, ref_RHS(3);
auto& r_element = r_model_part.Elements().front();
r_element.CalculateRightHandSide(
RHS, static_cast<const ProcessInfo&>(r_model_part.GetProcessInfo()));
// setting reference values
ref_RHS[0] = -5.1041666666666670e+00;
ref_RHS[1] = 1.2165570175438596e+01;
ref_RHS[2] = -7.0614035087719298e+00;
KRATOS_CHECK_VECTOR_NEAR(RHS, ref_RHS, 1e-12);
}
} // namespace Testing
} // namespace Kratos.
| 30.763158
| 108
| 0.705731
|
Rodrigo-Flo
|
83f0d45d0ba843ab8068a5b4a75942ed18d3f1d4
| 979
|
cpp
|
C++
|
lib/IR/Compute/Constant.cpp
|
LiuLeif/onnc
|
3f69e46172a9c33cc04541ff7fd78d5d7b6bdbba
|
[
"BSD-3-Clause"
] | 450
|
2018-08-03T08:17:03.000Z
|
2022-03-17T17:21:06.000Z
|
lib/IR/Compute/Constant.cpp
|
LiuLeif/onnc
|
3f69e46172a9c33cc04541ff7fd78d5d7b6bdbba
|
[
"BSD-3-Clause"
] | 104
|
2018-08-13T07:31:50.000Z
|
2021-08-24T11:24:40.000Z
|
lib/IR/Compute/Constant.cpp
|
LiuLeif/onnc
|
3f69e46172a9c33cc04541ff7fd78d5d7b6bdbba
|
[
"BSD-3-Clause"
] | 100
|
2018-08-12T04:27:39.000Z
|
2022-03-11T04:17:42.000Z
|
//===- Constant.cpp -------------------------------------------------------===//
//
// The ONNC Project
//
// See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include <onnc/IR/Compute/Constant.h>
using namespace onnc;
char Constant::ID = 0;
//===----------------------------------------------------------------------===//
// Constant
//===----------------------------------------------------------------------===//
Constant::Constant(const TensorAttr& pValue)
: ComputeOperator("Constant", ID),
m_Value(pValue) {
}
Constant::Constant(const Constant& pCopy)
: ComputeOperator(pCopy) /* shallow copy */,
m_Value(pCopy.getValue()) {
}
void Constant::printAttributes(std::ostream& pOS) const
{
pOS << '<' << "value: " << getValue()<< '>';
}
bool Constant::classof(const ComputeOperator* pOp)
{
if (nullptr == pOp)
return false;
return (pOp->getID() == &ID);
}
| 24.475
| 80
| 0.429009
|
LiuLeif
|
83f847fa7fe4024bdecfb4935a3d5009c54a99bd
| 2,398
|
cpp
|
C++
|
code/source/visual/model.cpp
|
crafn/clover
|
586acdbcdb34c3550858af125e9bb4a6300343fe
|
[
"MIT"
] | 12
|
2015-01-12T00:19:20.000Z
|
2021-08-05T10:47:20.000Z
|
code/source/visual/model.cpp
|
crafn/clover
|
586acdbcdb34c3550858af125e9bb4a6300343fe
|
[
"MIT"
] | null | null | null |
code/source/visual/model.cpp
|
crafn/clover
|
586acdbcdb34c3550858af125e9bb4a6300343fe
|
[
"MIT"
] | null | null | null |
#include "global/env.hpp"
#include "model.hpp"
#include "resources/cache.hpp"
#include "visual/material.hpp"
#include "visual/mesh.hpp"
namespace clover {
namespace visual {
Model::Model():
material(0),
mesh(0),
INIT_RESOURCE_ATTRIBUTE(nameAttribute, "name", ""),
INIT_RESOURCE_ATTRIBUTE(materialAttribute, "material", ""),
INIT_RESOURCE_ATTRIBUTE(meshAttribute, "mesh", ""){
materialAttribute.setOnChangeCallback([=] (){
if (materialAttribute.get().empty())
material= 0;
else
material= &global::g_env.resCache->getResource<visual::Material>(materialAttribute.get());
});
meshAttribute.setOnChangeCallback([=] (){
if (meshAttribute.get().empty())
mesh= 0;
else
mesh= &global::g_env.resCache->getResource<visual::TriMesh>(meshAttribute.get());
});
}
void Model::setMaterial(const util::Str8& name){
material= &global::g_env.resCache->getResource<visual::Material>(name);
}
void Model::setMesh(const BaseMesh& m){
mesh= &m;
}
void Model::setMesh(const util::Str8& name){
mesh= &global::g_env.resCache->getResource<visual::TriMesh>(name);
}
util::BoundingBox<util::Vec3f> Model::getBoundingBox() const {
if(!mesh)
return util::BoundingBox<util::Vec3f>();
return mesh->getBoundingBox();
}
void Model::resourceUpdate(bool load, bool force){
materialChangeListener.clear();
meshChangeListener.clear();
if (load || getResourceState() == State::Uninit){
material= &global::g_env.resCache->getResource<Material>(materialAttribute.get());
mesh= &global::g_env.resCache->getResource<TriMesh>(meshAttribute.get());
materialChangeListener.listen(*material, [=] (){ util::OnChangeCb::trigger(); });
const visual::TriMesh* trimesh= dynamic_cast<const visual::TriMesh*>(mesh);
if (trimesh)
meshChangeListener.listen(*trimesh, [=] (){ util::OnChangeCb::trigger(); });
setResourceState(State::Loaded);
}
else {
setResourceState(State::Unloaded);
}
}
void Model::createErrorResource(){
setResourceState(State::Error);
material= &global::g_env.resCache->getErrorResource<Material>();
mesh= &global::g_env.resCache->getErrorResource<TriMesh>();
}
uint32 Model::getContentHash() const {
if (!mesh || !material)
return 0;
else
return getBatchCompatibilityHash() + mesh->getContentHash();
}
uint32 Model::getBatchCompatibilityHash() const {
return material ? material->getContentHash() : 0;
}
} // visual
} // clover
| 26.065217
| 93
| 0.711843
|
crafn
|
83fcd2d527818526288762d92bd540fac0a5db71
| 2,116
|
cpp
|
C++
|
src/asynclock/asynclock.cpp
|
Damdoshi/LibLapin
|
800e0f17ed8f3c47797c48feea4c280bb0e4bdc9
|
[
"BSD-3-Clause"
] | 38
|
2016-07-30T09:35:19.000Z
|
2022-03-04T10:13:48.000Z
|
src/asynclock/asynclock.cpp
|
Elania-Marvers/LibLapin
|
800e0f17ed8f3c47797c48feea4c280bb0e4bdc9
|
[
"BSD-3-Clause"
] | 15
|
2017-02-12T19:20:52.000Z
|
2021-06-09T09:30:52.000Z
|
src/asynclock/asynclock.cpp
|
Elania-Marvers/LibLapin
|
800e0f17ed8f3c47797c48feea4c280bb0e4bdc9
|
[
"BSD-3-Clause"
] | 12
|
2016-10-06T09:06:59.000Z
|
2022-03-04T10:14:00.000Z
|
// Jason Brillante "Damdoshi"
// Hanged Bunny Studio 2014-2018
//
// Lapin library
#include "lapin_private.h"
static int remove_dead_trap(struct bunny_trap **trap,
t_bunny_call_order order)
{
struct bunny_trap *lst;
struct bunny_trap *nxt;
int cnt;
cnt = 0;
for (lst = *trap; lst != NULL; )
if (lst->remove_it)
{
nxt = lst->next;
__bunny_delete_trap(lst, order);
lst = nxt;
}
else
{
cnt += 1;
lst = lst->next;
}
return (cnt);
}
static void asyncall(double elapsed,
struct bunny_trap *lst,
double now)
{
// Call the function between time A and B
if (lst->duration > 0.001)
{
if (lst->start_time < now && lst->start_time + lst->duration > now)
lst->func(elapsed, (t_bunny_trap*)lst, lst->param);
else if (lst->start_time + lst->duration < now)
lst->remove_it = true;
}
// Call the function every duration -seconds
else if (lst->duration < -0.001)
{
if (lst->start_time < now && lst->start_time - lst->duration > now)
{
lst->func(elapsed, (t_bunny_trap*)lst, lst->param);
lst->start_time -= lst->duration;
}
else if (lst->start_time - lst->duration < now)
lst->start_time -= lst->duration;
}
// Call the function one single time at start_time
else
{
if (lst->start_time > now - elapsed &&
lst->start_time <= now)
{
lst->func(elapsed, (t_bunny_trap*)lst, lst->param);
lst->remove_it = true;
}
}
}
static int asynclock(double elapsed,
struct bunny_trap **trap,
t_bunny_call_order order)
{
struct bunny_trap *lst;
double now;
now = bunny_get_current_time();
for (lst = *trap; lst != NULL; lst = lst->next)
if (lst->start_time > 0)
asyncall(elapsed, lst, now);
else if (lst == *trap)
asyncall(elapsed, lst, now);
return (remove_dead_trap(trap, order));
}
int bunny_asynclock(double elapsed,
t_bunny_call_order order)
{
if (order == BCO_BEFORE_LOOP_MAIN_FUNCTION)
return (asynclock(elapsed, &gl_bunny_trap_head[0], order));
return (asynclock(elapsed, &gl_bunny_trap_head[2], order));
}
| 23.511111
| 73
| 0.628544
|
Damdoshi
|
860e1cc06467099493d564854fe7a31e7945a20d
| 20,277
|
cpp
|
C++
|
src/idocr.cpp
|
najlepsiwebdesigner/opencv-lab
|
397711129c675958c3d612a8213b53b74e909702
|
[
"Unlicense"
] | null | null | null |
src/idocr.cpp
|
najlepsiwebdesigner/opencv-lab
|
397711129c675958c3d612a8213b53b74e909702
|
[
"Unlicense"
] | null | null | null |
src/idocr.cpp
|
najlepsiwebdesigner/opencv-lab
|
397711129c675958c3d612a8213b53b74e909702
|
[
"Unlicense"
] | null | null | null |
#include "idocr.h"
using namespace cv;
using namespace std;
string idOCR::cutoutPath = "";
idOCR::idOCR()
{
tesseract::TessBaseAPI *api = new tesseract::TessBaseAPI();
}
idOCR::~idOCR()
{
}
void idOCR::saveImage(string fileName, const Mat & image){
if (fileName.length() < 1) return;
imwrite(fileName, image);
cout << "File saved!" << endl;
}
void idOCR::fitImage(const Mat& src,Mat& dst, float destWidth, float destHeight) {
int srcWidth = src.cols;
int srcHeight = src.rows;
float srcRatio = (float) srcWidth / (float) srcHeight;
float widthRatio = destWidth / srcWidth;
float heightRatio = destHeight / srcHeight;
float newWidth = 0;
float newHeight = 0;
if (srcWidth > srcHeight) {
destHeight = destWidth / srcRatio;
} else {
destWidth = destHeight * srcRatio;
}
cv::resize(src, dst,Size((int)round(destWidth), (int)round(destHeight)),0,0);
}
void idOCR::process(Mat & image) {
// for id filtering, we need only small version of image
Mat image_vga(Size(640,480),CV_8UC3,Scalar(0));
fitImage(image, image_vga, 640, 480);
Mat image_big(Size(1920,1440),CV_8UC3,Scalar(0));
fitImage(image, image_big, 1920, 1440);
Mat image_vga_backup = image_vga.clone();
// filtering
cv::GaussianBlur(image_vga, image_vga, Size( 7, 7) ,7,7);
Mat small;
cv::resize(image_vga, small,Size(320,240),0,0);
cv::medianBlur(small, small, 9);
cv::resize(small, image_vga, Size(image_vga.cols,image_vga.rows));
cv::resize(image_vga, small,Size(320,240),0,0);
cv::medianBlur(small, small, 9);
cv::resize(small, image_vga, Size(image_vga.cols,image_vga.rows));
cv::Mat const shape = cv::getStructuringElement(cv::MORPH_RECT, cv::Size(5, 5));
cv::dilate(image_vga, image_vga, Mat(), Point(-1, -1), 3, 1, 1);
cv::erode(image_vga, image_vga, shape, Point(-1,-1), 1);
cv::dilate(image_vga, image_vga, Mat(), Point(-1, -1), 1, 1, 1);
cv::erode(image_vga, image_vga, shape, Point(-1,-1), 1);
cv::dilate(image_vga, image_vga, Mat(), Point(-1, -1), 1, 1, 1);
cv::erode(image_vga, image_vga, shape, Point(-1,-1), 1);
cv::GaussianBlur( image_vga, image_vga, Size(3,3), 0, 0, BORDER_DEFAULT );
// sobel
Mat grad, src_gray;
int scale = 1;
int delta = 0;
int ddepth = CV_16S;
/// Convert it to gray
cvtColor( image_vga, src_gray, COLOR_RGB2GRAY );
/// Generate grad_x and grad_y
Mat grad_x, grad_y;
Mat abs_grad_x, abs_grad_y;
/// Gradient X
//Scharr( src_gray, grad_x, ddepth, 1, 0, scale, delta, BORDER_DEFAULT );
Sobel( src_gray, grad_x, ddepth, 1, 0, 3, scale, delta, BORDER_DEFAULT );
convertScaleAbs( grad_x, abs_grad_x );
/// Gradient Y
//Scharr( src_gray, grad_y, ddepth, 0, 1, scale, delta, BORDER_DEFAULT );
Sobel( src_gray, grad_y, ddepth, 0, 1, 3, scale, delta, BORDER_DEFAULT );
convertScaleAbs( grad_y, abs_grad_y );
/// Total Gradient (approximate)
addWeighted( abs_grad_x, 0.5, abs_grad_y, 0.5, 0, grad );
cvtColor( grad, image_vga, COLOR_GRAY2RGB );
// now threshold
cv::cvtColor(image_vga,image_vga, CV_RGB2GRAY);
cv::threshold(image_vga,image_vga,0,255,THRESH_BINARY + CV_THRESH_OTSU);
cv::dilate(image_vga, image_vga, Mat(), Point(-1, -1), 3, 1, 1);
cv::erode(image_vga, image_vga, shape, Point(-1,-1), 1);
cv::dilate(image_vga, image_vga, Mat(), Point(-1, -1), 1, 1, 1);
cv::erode(image_vga, image_vga, shape, Point(-1,-1), 1);
cv::dilate(image_vga, image_vga, Mat(), Point(-1, -1), 1, 1, 1);
cv::erode(image_vga, image_vga, shape, Point(-1,-1), 1);
// keep only filled biggest contour in the image to get rid of rest of structures inside
int largest_area=0;
int largest_contour_index=0;
vector<vector<Point>> contours;
vector<Vec4i> hierarchy;
findContours( image_vga, contours, hierarchy,CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE ); // Find the contours in the image
for( int i = 0; i< contours.size(); i++ )
{
double a=contourArea( contours[i],false);
if(a>largest_area){
largest_area=a;
largest_contour_index=i;
}
}
Mat temp(Size(image_vga.cols,image_vga.rows),CV_8UC3,Scalar(0));
drawContours( temp, contours,largest_contour_index, Scalar(255,0,0), -1, 8, hierarchy, 0);
image_vga = temp;
cv::Canny(image_vga, image_vga, 30, 90);
cv::dilate(image_vga, image_vga, Mat(), Point(1,-1));
// detect lines in this binary image
std::vector<cv::Vec4i> lines;
cv::HoughLinesP(image_vga, lines, 1, CV_PI/360,50,50, 10);
cvtColor( image_vga, image_vga, COLOR_GRAY2RGB);
// clusterize lines
// define lines around image
std::vector<cv::Vec4i> myLines;
cv::Vec4i leftLine;leftLine[0] = 0;leftLine[1] = 0;leftLine[2] = 0;leftLine[3] = image_vga.rows;
myLines.push_back(leftLine);
cv::Vec4i rightLine;
rightLine[0] = image_vga.cols;rightLine[1] = 0;rightLine[2] = image_vga.cols;rightLine[3] = image_vga.rows;
myLines.push_back(rightLine);
cv::Vec4i topLine;
topLine[0] = image_vga.cols;topLine[1] = 0;topLine[2] = 0;topLine[3] = 0;
myLines.push_back(topLine);
cv::Vec4i bottomLine;
bottomLine[0] = image_vga.cols;bottomLine[1] = image_vga.rows;bottomLine[2] = 0;bottomLine[3] = image_vga.rows;
myLines.push_back(bottomLine);
// expand lines to borders of the image - we will get intersections with image borders easily
for (int i = 0; i < lines.size(); i++)
{
std::vector<cv::Point2f> lineIntersections;
for (int j = 0; j < myLines.size(); j++)
{
cv::Vec4i v = lines[i];
Point2f intersection;
bool has_intersection = idOCR::getIntersectionPoint(
Point(lines[i][0],lines[i][1]),
Point(lines[i][2], lines[i][3]),
Point(myLines[j][0],myLines[j][1]),
Point(myLines[j][2], myLines[j][3]),
intersection);
if (has_intersection
&& intersection.x >= 0
&& intersection.y >= 0
&& intersection.x <= image_vga.cols
&& intersection.y <= image_vga.rows){
lineIntersections.push_back(intersection);
}
}
if (lineIntersections.size() > 0) {
lines[i][0] = lineIntersections[0].x;
lines[i][1] = lineIntersections[0].y;
lines[i][2] = lineIntersections[1].x;
lines[i][3] = lineIntersections[1].y;
}
}
if (lines.size() > 3){
// clusterization params
int distanceThreshold = round(image.cols/15);
double angleThreshold = 0.50;
struct LineCluster {
int sumX1;
int sumY1;
int sumX2;
int sumY2;
int count;
};
vector<LineCluster> clusters;
// create first group
LineCluster cluster;
cluster.sumX1 = lines[0][0];
cluster.sumY1 = lines[0][1];
cluster.sumX2 = lines[0][2];
cluster.sumY2 = lines[0][3];
cluster.count = 1;
clusters.push_back(cluster);
// loop through rest of groups
for (int i = 1; i < lines.size(); i++) {
bool in_some_cluster = false;
for (int j = 0; j < clusters.size(); j++) {
int cluster_x1 = clusters[j].sumX1/clusters[j].count;
int cluster_y1 = clusters[j].sumY1/clusters[j].count;
int cluster_x2 = clusters[j].sumX2/clusters[j].count;
int cluster_y2 = clusters[j].sumY2/clusters[j].count;
double angle1 = atan2((double)lines[i][3] - lines[i][1], (double)lines[i][2] - lines[i][0]);
double angle2 = atan2((double)cluster_y2 - cluster_y1, (double)cluster_x2 - cluster_x1);
float distance_cluster1_to_line1 = sqrt(((cluster_x1 - lines[i][0])*(cluster_x1 - lines[i][0])) + (cluster_y1 - lines[i][1])*(cluster_y1 - lines[i][1]));
float distance_cluster1_to_line2 = sqrt(((cluster_x1 - lines[i][2])*(cluster_x1 - lines[i][2])) + (cluster_y1 - lines[i][3])*(cluster_y1 - lines[i][3]));
float distance_cluster2_to_line1 = sqrt(((cluster_x2 - lines[i][0])*(cluster_x2 - lines[i][0])) + (cluster_y2 - lines[i][1])*(cluster_y2 - lines[i][1]));
float distance_cluster2_to_line2 = sqrt(((cluster_x2 - lines[i][2])*(cluster_x2 - lines[i][2])) + (cluster_y2 - lines[i][3])*(cluster_y2 - lines[i][3]));
if (((distance_cluster1_to_line1 < distanceThreshold) &&
(distance_cluster2_to_line2 < distanceThreshold || abs(angle1 - angle2) < angleThreshold)) ||
((distance_cluster1_to_line2 < distanceThreshold) &&
(distance_cluster2_to_line1 < distanceThreshold || abs(angle1 - angle2) < angleThreshold))){
clusters[j].sumX1 += lines[i][0];
clusters[j].sumY1 += lines[i][1];
clusters[j].sumX2 += lines[i][2];
clusters[j].sumY2 += lines[i][3];
clusters[j].count += 1;
in_some_cluster = true;
}
}
// if point doesnt fit, create new group for it
if (in_some_cluster == false){
LineCluster cluster;
cluster.sumX1 = lines[i][0];
cluster.sumY1 = lines[i][1];
cluster.sumX2 = lines[i][2];
cluster.sumY2 = lines[i][3];
cluster.count = 1;
clusters.push_back(cluster);
}
}
if (clusters.size() == 4) {
std::vector<cv::Vec4i> clusteredLines;
// approx clusters and define clustered lines
for (int i = 0; i < clusters.size(); i++){
circle(image_vga, Point(clusters[i].sumX1/clusters[i].count, clusters[i].sumY1/clusters[i].count), 5, Scalar(0,0,255),-1);
circle(image_vga, Point(clusters[i].sumX2/clusters[i].count, clusters[i].sumY2/clusters[i].count), 5, Scalar(0,0,255),-1);
cv::line(image_vga, Point(clusters[i].sumX1/clusters[i].count, clusters[i].sumY1/clusters[i].count), Point(clusters[i].sumX2/clusters[i].count, clusters[i].sumY2/clusters[i].count), CV_RGB(255,0,0), 1);
cv::Vec4i line;
line[0] = clusters[i].sumX1/clusters[i].count;
line[1] = clusters[i].sumY1/clusters[i].count;
line[2] = clusters[i].sumX2/clusters[i].count;
line[3] = clusters[i].sumY2/clusters[i].count;
clusteredLines.push_back(line);
}
// compute intersections between approximated lines
std::vector<cv::Point2f> corners;
for (int i = 0; i < clusteredLines.size(); i++)
{
for (int j = i+1; j < clusteredLines.size(); j++)
{
cv::Vec4i v = clusteredLines[i];
Point2f intersection;
bool has_intersection = idOCR::getIntersectionPoint(
Point(clusteredLines[i][0],clusteredLines[i][1]),
Point(clusteredLines[i][2], clusteredLines[i][3]),
Point(clusteredLines[j][0],clusteredLines[j][1]),
Point(clusteredLines[j][2], clusteredLines[j][3]),
intersection);
if (has_intersection
&& intersection.x > 0
&& intersection.y > 0
&& intersection.x < image_vga.cols
&& intersection.y < image_vga.rows){
corners.push_back(intersection);
cv::circle(image_vga, intersection, 3, CV_RGB(0,0,255), 2);
}
}
}
if (corners.size() == 4) {
cv::Point2f center(0,0);
for (int i = 0; i < corners.size(); i++) {
center.x += corners[i].x;
center.y += corners[i].y;
}
center *= (1. / corners.size());
for (int i = 0; i < corners.size(); i++) {
cv::circle(image_vga, corners[i], 3, CV_RGB(0,0,255), 2);
}
idOCR::sortCorners(corners, center);
// Define the destination image
cv::Mat quad = cv::Mat::zeros(510, 800, CV_8UC3);
// Corners of the destination image
std::vector<cv::Point2f> quad_pts;
quad_pts.push_back(cv::Point2f(0, 0));
quad_pts.push_back(cv::Point2f(quad.cols, 0));
quad_pts.push_back(cv::Point2f(quad.cols, quad.rows));
quad_pts.push_back(cv::Point2f(0, quad.rows));
double ratio_x = round(static_cast<double>(image_big.cols) / image_vga_backup.cols);
double ratio_y = round(static_cast<double>(image_big.rows) / image_vga_backup.rows);
for (int i = 0; i < corners.size(); i++) {
corners[i].x *= ratio_x;
corners[i].y *= ratio_y;
}
try {
// Get transformation matrix
cv::Mat transmtx = cv::getPerspectiveTransform(corners, quad_pts);
// Apply perspective transformation
cv::warpPerspective(image_big, quad, transmtx, quad.size(),INTER_LINEAR,BORDER_TRANSPARENT);
}
catch (cv::Exception e) {
// qDebug << "error in warp" << endl;
}
cv::Mat newImage = cv::Mat::zeros(600, 800, CV_8UC3);
cv::Mat tempImage = cv::Mat::zeros(600, 800, CV_8UC3);
quad.copyTo(newImage.rowRange(0,quad.rows).colRange(0,quad.cols));
cv::GaussianBlur(newImage, tempImage, cv::Size(0, 0),5);
cv::addWeighted(newImage, 1.5, tempImage, -0.5, 0, newImage);
image = newImage.clone();
return;
}
}
}
double alpha = 0.5; double beta;
beta = ( 1.0 - alpha );
addWeighted(image_vga_backup , alpha, image_vga, beta, 0.0, image_vga);
image = image_vga.clone();
}
bool idOCR::getIntersectionPoint(cv::Point a1, cv::Point a2, cv::Point b1, cv::Point b2, cv::Point2f & intPnt){
Point p = a1;
Point q = b1;
Point r(a2-a1);
Point s(b2-b1);
if(cross(r,s) == 0) {return false;}
double t = cross(q-p,s)/cross(r,s);
intPnt = p + t*r;
return true;
}
double idOCR::cross(Point v1,Point v2){
return v1.x*v2.y - v1.y*v2.x;
}
void idOCR::sortCorners(std::vector<cv::Point2f>& corners,
cv::Point2f center)
{
std::vector<cv::Point2f> top, bot;
for (int i = 0; i < corners.size(); i++)
{
if (corners[i].y < center.y)
top.push_back(corners[i]);
else
bot.push_back(corners[i]);
}
corners.clear();
if (top.size() == 2 && bot.size() == 2){
cv::Point2f tl = top[0].x > top[1].x ? top[1] : top[0];
cv::Point2f tr = top[0].x > top[1].x ? top[0] : top[1];
cv::Point2f bl = bot[0].x > bot[1].x ? bot[1] : bot[0];
cv::Point2f br = bot[0].x > bot[1].x ? bot[0] : bot[1];
corners.push_back(tl);
corners.push_back(tr);
corners.push_back(br);
corners.push_back(bl);
}
}
vector<Rect> idOCR::getRectanglesFromMask(Mat & mask) {
Mat canny;
Mat image_gray;
vector<vector<Point> > contours;
vector<Vec4i> hierarchy;
cvtColor( mask, image_gray, CV_RGB2GRAY );
Canny( image_gray, canny, 30, 90);
findContours( canny, contours, hierarchy, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_SIMPLE, Point(0, 0) );
vector<Rect> boundRect( contours.size() );
for( int i = 0; i< contours.size(); i++ )
{
boundRect[i] = boundingRect( Mat(contours[i]) );
}
return boundRect;
}
void idOCR::maskCutOut(Mat & image, string maskFilename) {
if ( !boost::filesystem::exists( maskFilename ) )
{
std::cout << "Can't find mask file!" << std::endl;
boost::filesystem::path full_path( boost::filesystem::current_path() );
std::cout << "Current path is : " << full_path << std::endl;
return;
}
Mat mask = imread(maskFilename);
fitImage(image, image, 800, 600);
vector<Rect> rectangles = getRectanglesFromMask(mask);
for( int i = 0; i< rectangles.size(); i++ )
{
Mat roi(image, rectangles[i]);
cv::cvtColor(roi,roi, CV_RGB2GRAY);
cv::threshold(roi,roi,0,255,THRESH_BINARY + CV_THRESH_OTSU);
cv::cvtColor(roi,roi, CV_GRAY2RGB);
string path = getCutoutPath();
if (path.length() > 0) {
path = path + "/";
}
processField(roi);
saveImage(path + to_string(i) + ".jpg", roi);
}
double alpha = 0.5; double beta;
beta = ( 1.0 - alpha );
addWeighted(image , alpha, mask, beta, 0.0, image);
}
void idOCR::processField(Mat & image) {
Mat original = image.clone();
cv::Mat const shape = cv::getStructuringElement(
cv::MORPH_RECT, cv::Size(3, 1));
cvtColor(image, image, CV_RGB2GRAY);
cv::erode(image, image, shape);
cv::GaussianBlur(image, image, Size( 5, 5) ,5,5);
Size ksize(200,1);
blur(image, image, ksize,Point(-1,-1) );
// blur(image, image, ksize,Point(-1,-1) );
// blur(image, image, ksize,Point(-1,-1) );
// cv::erode(image, image, shape);
// cv::dilate(image,image,shape);
cv::threshold(image,image,250,255,THRESH_BINARY);
//return;
int largest_area=0;
int largest_contour_index=0;
vector<vector<Point>> contours;
vector<Vec4i> hierarchy;
// invert image
bitwise_not ( image, image );
findContours( image, contours, hierarchy,CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE ); // Find the contours in the image
cvtColor(image, image, CV_GRAY2RGB);
for( int i = 0; i< contours.size(); i++ )
{
double a=contourArea( contours[i],false);
if(a>largest_area){
largest_area=a;
largest_contour_index=i;
}
}
for( int i = 0; i< contours.size(); i++ )
{
if (i == largest_contour_index){
cv::Rect r;
r = boundingRect(contours[i]);
r.width = image.cols;
if (((image.rows - r.y) - r.height) > round(image.rows/2)) {
r.height = image.rows - r.y;
}
if (r.y + r.height > round(image.rows/2)) {
r.y = 0;
r.height = r.height + 2;
}
Mat mask(image.rows, image.cols, CV_8UC1);
mask.setTo(0);
rectangle(mask, r, Scalar(255, 255, 255), -1);
image.setTo(255);
original.copyTo(image, mask);
return;
// imshow("", mask);
}
}
image = original.clone();
}
void idOCR::setCutoutPath(string path) {
cutoutPath = path;
}
string idOCR::getCutoutPath() {
return cutoutPath;
}
| 33.132353
| 218
| 0.532179
|
najlepsiwebdesigner
|
86137e5b7b498285a0bd2b289263849584c247b2
| 1,545
|
hpp
|
C++
|
Source/ImGui DirectX 11 Kiero Hook/cfg.hpp
|
1hAck-0/UE4-Cheat-Source-Code
|
7686193399158a0daab8ae07332451cc674a33c6
|
[
"CC0-1.0"
] | 17
|
2022-01-08T20:26:30.000Z
|
2022-03-21T14:09:42.000Z
|
Source/ImGui DirectX 11 Kiero Hook/cfg.hpp
|
1hAck-0/UE4-Cheat-Source-Code
|
7686193399158a0daab8ae07332451cc674a33c6
|
[
"CC0-1.0"
] | 1
|
2022-01-11T21:53:16.000Z
|
2022-02-15T16:33:37.000Z
|
Source/ImGui DirectX 11 Kiero Hook/cfg.hpp
|
1hAck-0/UE4-Cheat-Source-Code
|
7686193399158a0daab8ae07332451cc674a33c6
|
[
"CC0-1.0"
] | 2
|
2022-01-09T11:12:07.000Z
|
2022-01-14T17:27:45.000Z
|
#include <Windows.h>
struct cfg_Exploits_t
{
bool bInfiniteHealth = false;
bool bInfiniteAmmo = false;
bool bNoSpread = false;
bool bNoClip = false;
USHORT noClipKey = 0;
bool bFlyHack = false;
USHORT flyKey = 0;
bool bSpeedHack = false;
float speed = 3000.f;
bool bSuperJump = false;
float jumpHeight = 500.f;
bool bModGravity = false;
float modGravity = 1.f;
__forceinline cfg_Exploits_t* operator->() { return this; }
};
struct cfg_Triggerbot_t
{
bool bEnabled = false;
USHORT key = 'F';
bool bDelay = false;
int delayMode = 0;
int customDelay = 100; // in ms
int minRanDelay = 100; // in ms
int maxRanDelay = 300; // in ms
__forceinline cfg_Triggerbot_t* operator->() { return this; }
};
struct cfg_Aimbot_t
{
bool bEnabled = false;
float smoothness = 1.f;
bool bVisibleOnly = true;
bool bFOV = true;
int FOV = 150;
bool bFOVCircle = true;
USHORT aimKey = 'J';
bool bSilentAim = false;
__forceinline cfg_Aimbot_t* operator->() { return this; }
};
struct cfg_ESP_t
{
bool bBoxes = false;
int boxType = 0;
bool bSnaplines = false;
bool bSkeleton = false;
__forceinline cfg_ESP_t* operator->() { return this; }
};
struct cfg_Menu_t
{
bool bInit = false;
bool bShowMenu = true;
bool bShutdown = false;
USHORT ToggleKey = VK_F1;
__forceinline cfg_Menu_t* operator->() { return this; }
};
struct cfg_t
{
cfg_Menu_t menu;
cfg_ESP_t esp;
cfg_Aimbot_t aimbot;
cfg_Triggerbot_t trg;
cfg_Exploits_t exploit;
__forceinline cfg_t* operator->() { return this; }
};
inline cfg_t cfg;
| 16.612903
| 62
| 0.697087
|
1hAck-0
|
861c0afd7637ac2c073fea8bbd099c9490acb861
| 878
|
cc
|
C++
|
stage2/tareeq/control/test/unicycle_driver_test.cc
|
aboarya/unicyle-kinematics
|
dfbb1090bf112079d0a1b5c629718999681515bb
|
[
"MIT"
] | null | null | null |
stage2/tareeq/control/test/unicycle_driver_test.cc
|
aboarya/unicyle-kinematics
|
dfbb1090bf112079d0a1b5c629718999681515bb
|
[
"MIT"
] | null | null | null |
stage2/tareeq/control/test/unicycle_driver_test.cc
|
aboarya/unicyle-kinematics
|
dfbb1090bf112079d0a1b5c629718999681515bb
|
[
"MIT"
] | null | null | null |
#include <string>
#include <unordered_map>
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include "../unicycle_driver.h"
#include "tareeq/mocks/motor.h"
#include "tareeq/mocks/sensor.h"
#include "tareeq/mocks/state.h"
namespace tareeq {
namespace control {
using namespace tareeq::mocks;
class UniCDriverTest : public testing::Test
{
public:
void SetUp() override {
//m["w_r"] = 1.5;
//m["w_l"] = 1.5;
//s = MockState(m);
}
MockSensor s;
MockState st;
MockMotor r;
MockMotor l;
UniCycleDriver driver{r, l};
std::unordered_map<std::string, double> m;
};
TEST_F(UniCDriverTest, CheckValidConstruction) {
EXPECT_EQ(true, driver.Start());
EXPECT_EQ(true, driver.Apply(st));
EXPECT_EQ(true, driver.Stop());
}
} // end namespace control
} // end namespace tareeq
| 19.086957
| 52
| 0.627563
|
aboarya
|
8629734fcfd04b2f01c228d0e80973ce1f4cf90d
| 323
|
cpp
|
C++
|
Codeforces/A/Fox And Snake.cpp
|
AkibHossainOmi/Solving-Online-Judge-Problem
|
ae2f7685f7a0df3438607498c38de01742fe7240
|
[
"MIT"
] | 1
|
2022-01-30T05:20:36.000Z
|
2022-01-30T05:20:36.000Z
|
Codeforces/A/Fox And Snake.cpp
|
AkibHossainOmi/Solving-Online-Judge-Problem
|
ae2f7685f7a0df3438607498c38de01742fe7240
|
[
"MIT"
] | null | null | null |
Codeforces/A/Fox And Snake.cpp
|
AkibHossainOmi/Solving-Online-Judge-Problem
|
ae2f7685f7a0df3438607498c38de01742fe7240
|
[
"MIT"
] | null | null | null |
#include<stdio.h>
int main()
{
int m,n,i,j,r;
scanf("%d %d",&m,&n);
for(i=1;i<=m;i++)
{
for(j=1;j<=n;j++)
{
if(i%2==0&&i%4!=0&&j!=n) printf(".");
else if(i%4==0&&j!=1) printf(".");
else printf("#");
}
printf("\n");
}
}
| 19
| 50
| 0.318885
|
AkibHossainOmi
|
862c334e725df615f51db8ed8870724ea5982cb3
| 551
|
hpp
|
C++
|
Axis/Renderer/Include/Axis/RendererExport.hpp
|
SimmyPeet/Axis
|
a58c073d13f74d0224fbfca34a4dcd4b9d0c6726
|
[
"Apache-2.0"
] | 1
|
2022-01-23T14:51:51.000Z
|
2022-01-23T14:51:51.000Z
|
Axis/Renderer/Include/Axis/RendererExport.hpp
|
SimmyPeet/Axis
|
a58c073d13f74d0224fbfca34a4dcd4b9d0c6726
|
[
"Apache-2.0"
] | null | null | null |
Axis/Renderer/Include/Axis/RendererExport.hpp
|
SimmyPeet/Axis
|
a58c073d13f74d0224fbfca34a4dcd4b9d0c6726
|
[
"Apache-2.0"
] | 1
|
2022-01-10T21:01:54.000Z
|
2022-01-10T21:01:54.000Z
|
/// \copyright Simmypeet - Copyright (C)
/// This file is subject to the terms and conditions defined in
/// file `LICENSE`, which is part of this source code package.
#ifndef AXIS_RENDERER_RENDEREREXPORT_HPP
#define AXIS_RENDERER_RENDEREREXPORT_HPP
#pragma once
#include "../../../System/Include/Axis/Config.hpp"
/// Portable import / export macro
#if defined(BUILD_AXIS_RENDERER)
# define AXIS_RENDERER_API AXIS_EXPORT
#else
# define AXIS_RENDERER_API AXIS_IMPORT
#endif
#endif // AXIS_RENDERER_RENDEREREXPORT_HPP
| 25.045455
| 74
| 0.740472
|
SimmyPeet
|
862c896fcc9f082a8175468d51ee681e60687869
| 8,521
|
cc
|
C++
|
src/compiler/table_gen.cc
|
chzchzchz/fsl
|
2df9e4422995f58e719e730c8974ea77c5196bc6
|
[
"MIT"
] | 1
|
2019-01-02T18:38:28.000Z
|
2019-01-02T18:38:28.000Z
|
src/compiler/table_gen.cc
|
chzchzchz/fsl
|
2df9e4422995f58e719e730c8974ea77c5196bc6
|
[
"MIT"
] | 1
|
2015-04-21T21:38:57.000Z
|
2015-10-27T01:26:29.000Z
|
src/compiler/table_gen.cc
|
chzchzchz/fsl
|
2df9e4422995f58e719e730c8974ea77c5196bc6
|
[
"MIT"
] | null | null | null |
/* generates tables that tools will use to work with data. */
#include <iostream>
#include <string>
#include <map>
#include <typeinfo>
#include "util.h"
#include "struct_writer.h"
#include "AST.h"
#include "type.h"
#include "func.h"
#include "symtab.h"
#include "eval.h"
#include "points.h"
#include "asserts.h"
#include "stat.h"
#include "virt.h"
#include "reloc.h"
#include "repair.h"
#include "writepkt.h"
#include "table_gen.h"
#include "thunk_fieldoffset_cond.h"
#include "memotab.h"
#include <stdint.h>
extern type_list types_list;
extern type_map types_map;
extern func_list funcs_list;
extern const_map constants;
extern pointing_list points_list;
extern pointing_map points_map;
extern assert_map asserts_map;
extern assert_list asserts_list;
extern stat_map stats_map;
extern stat_list stats_list;
extern typevirt_map typevirts_map;
extern typevirt_list typevirts_list;
extern writepkt_list writepkts_list;
extern typereloc_map typerelocs_map;
extern typereloc_list typerelocs_list;
extern repair_list repairs_list;
extern repair_map repairs_map;
extern MemoTab memotab;
using namespace std;
void TableGen::genThunksTableBySymtab(
const string& table_name,
const SymbolTable& st)
{
StructWriter sw(out, "fsl_rtt_field", table_name + "[]", true);
for ( sym_list::const_iterator it = st.begin();
it != st.end();
it++)
{
const SymbolTableEnt *st_ent;
st_ent = *it;
sw.beginWrite();
st_ent->getFieldThunk()->genFieldEntry(this);
}
}
void TableGen::genUserFieldsByType(const Type *t)
{
SymbolTable *st;
SymbolTable *st_all;
SymbolTable *st_types;
SymbolTable *st_complete;
st = t->getSymsByUserTypeStrong();
genThunksTableBySymtab(
string("__rt_tab_thunks_") + t->getName(),
*st);
delete st;
st_all = t->getSymsStrongOrConditional();
genThunksTableBySymtab(
string("__rt_tab_thunksall_") + t->getName(),
*st_all);
delete st_all;
st_types = t->getSymsByUserTypeStrongOrConditional();
genThunksTableBySymtab(
string("__rt_tab_thunkstypes_") + t->getName(),
*st_types);
delete st_types;
st_complete = t->getSyms();
genThunksTableBySymtab(
string("__rt_tab_thunkcomplete_") + t->getName(),
*st_complete);
delete st_complete;
}
void TableGen::genUserFieldTables(void)
{
for ( type_list::const_iterator it = types_list.begin();
it != types_list.end();
it++)
genUserFieldsByType(*it);
}
void TableGen::genInstanceType(const Type *t)
{
StructWriter sw(out);
SymbolTable *st, *st_all, *st_types, *st_complete;
FCall *size_fc;
const string tname(t->getName());
st = t->getSymsByUserTypeStrong();
st_all = t->getSymsStrongOrConditional();
st_types = t->getSymsByUserTypeStrongOrConditional();
st_complete = t->getSyms();
assert (st != NULL);
size_fc = st->getThunkType()->getSize()->copyFCall();
sw.writeStr("tt_name", tname);
sw.write("tt_param_c", t->getParamBufEntryCount());
sw.write("tt_arg_c", t->getNumArgs());
sw.write("tt_size", size_fc->getName());
sw.write("tt_fieldstrong_c", st->size());
sw.write("tt_fieldstrong", "__rt_tab_thunks_" + tname);
sw.write("tt_pointsto_c", points_map[tname]->getNumPointing());
sw.write("tt_pointsto", "__rt_tab_pointsto_" + tname);
sw.write("tt_assert_c", asserts_map[tname]->getNumAsserts());
sw.write("tt_assert", "__rt_tab_asserts_" + tname);
sw.write("tt_stat_c", stats_map[tname]->getNumStat());
sw.write("tt_stat", "__rt_tab_stats_"+tname);
sw.write("tt_reloc_c", typerelocs_map[tname]->getNumRelocs());
sw.write("tt_reloc", "__rt_tab_reloc_" + tname);
sw.write("tt_fieldall_c", st_all->size());
sw.write("tt_fieldall_thunkoff", "__rt_tab_thunksall_" + tname);
sw.write("tt_fieldtypes_c", st_types->size());
sw.write("tt_fieldtypes_thunkoff","__rt_tab_thunkstypes_"+tname);
sw.write("tt_virt_c", typevirts_map[tname]->getNumVirts());
sw.write("tt_virt", "__rt_tab_virt_" + tname);
sw.write("tt_field_c", st_complete->size());
sw.write("tt_field_table", "__rt_tab_thunkcomplete_" + tname);
sw.write("tt_repair_c", repairs_map[tname]->getNumRepairs());
sw.write("tt_repair", "__rt_tab_repair_" + tname);
delete size_fc;
delete st_complete;
delete st_types;
delete st_all;
delete st;
}
void TableGen::printExternFunc(
const string& fname,
const char* return_type,
const vector<string>& args)
{
vector<string>::const_iterator it = args.begin();
out << "extern " << return_type << ' ' << fname << '(' << (*it);
for (it++; it != args.end(); it++) out << ", " << (*it);
out << ");\n";
}
void TableGen::printExternFuncThunk(
const std::string& funcname,
const char* return_type)
{
const string args[] = {"const struct fsl_rt_closure*"};
printExternFunc(
funcname,
return_type,
vector<string>(args, args+1));
}
void TableGen::printExternFuncThunkParams(const ThunkParams* tp)
{
const string args[] = {
"const struct fsl_rt_closure*", /* parent pointer */
"uint64_t", /* idx */
"uint64_t*",
};
FCall *fc;
fc = tp->copyFCall();
printExternFunc(fc->getName(), "void", vector<string>(args, args+3));
delete fc;
}
void TableGen::genExternsFieldsByType(const Type *t)
{
SymbolTable *st;
FCall *fc_type_size;
st = t->getSyms();
assert (st != NULL);
for ( sym_list::const_iterator it = st->begin();
it != st->end();
it++)
{
const SymbolTableEnt *st_ent;
st_ent = *it;
st_ent->getFieldThunk()->genFieldExtern(this);
}
fc_type_size = st->getThunkType()->getSize()->copyFCall();
printExternFuncThunk(fc_type_size->getName());
delete fc_type_size;
}
void TableGen::genExternsFields(void)
{
for ( type_list::const_iterator it = types_list.begin();
it != types_list.end();
it++)
genExternsFieldsByType(*it);
}
void TableGen::genExternsUserFuncs(void)
{
for ( func_list::const_iterator it = funcs_list.begin();
it != funcs_list.end();
it++)
{
const Func *f = *it;
if (!memotab.canMemoize(f)) continue;
out << "extern ";
if (f->getRetType() == NULL)
out << "uint64_t " << f->getName() << "(void)";
else
out << "void " << f->getName()
<< "(struct fsl_rt_closure*)";
out << ';' << endl;
}
}
void TableGen::genTable_fsl_rt_table(void)
{
StructWriter sw(out, "fsl_rtt_type", "fsl_rt_table[]");
for ( type_list::iterator it = types_list.begin();
it != types_list.end();
it++)
{
sw.beginWrite();
genInstanceType(*it);
}
}
void TableGen::genTableHeaders(void)
{
out << "#include <stdint.h>" << endl;
out << "#include \"runtime/runtime.h\"" << endl;
}
template<class T>
void TableGen::genTableWriters(const PtrList<T>& tw_list)
{
for (auto &t : tw_list) {
t->genExterns(this);
t->genTables(this);
}
}
template<class T>
void TableGen::genTableWriters(const std::list<T*>& tw_list)
{
for (auto &t : tw_list) {
t->genExterns(this);
t->genTables(this);
}
}
void TableGen::genScalarConstants(void)
{
const Type *origin_type;
origin_type = types_map["disk"];
assert (origin_type != NULL
&& "No origin type 'disk' declared");
assert (origin_type->getNumArgs() == 0
&& "Type 'disk' should not take parameters");
out << "unsigned int fsl_rtt_entries = "<<types_list.size()<<";\n";
out << "unsigned int fsl_rt_origin_typenum = ";
out << origin_type->getTypeNum() << ';' << endl;
out << "char fsl_rt_fsname[] = \"";
if (constants.count("__FSL_FSNAME") == 0)
out << "__FSL_FSNAME";
else {
const Id* id;
id = dynamic_cast<const Id*>(constants["__FSL_FSNAME"]);
out << ((id != NULL) ? id->getName() : "__FSL_FSNAME");
}
out << "\";" << endl;
out << "int __fsl_mode = ";
if (constants.count("__FSL_MODE") == 0)
out << "0"; /* mode little endian */
else {
const Number* num;
num = dynamic_cast<const Number*>(constants["__FSL_MODE"]);
out << ((num != NULL) ? num->getValue() : 0);
}
out << ";" << endl;
}
void TableGen::genWritePktTables(void)
{
writepkt_list::const_iterator it;
for (it = writepkts_list.begin(); it != writepkts_list.end(); it++)
(*it)->genExterns(this);
for (it = writepkts_list.begin(); it != writepkts_list.end(); it++)
(*it)->genTables(this);
}
void TableGen::gen(const string& fname)
{
out.open(fname.c_str());
genTableHeaders();
genScalarConstants();
genExternsFields();
genExternsUserFuncs();
genUserFieldTables();
genTableWriters<Points>(points_list);
genTableWriters<Asserts>(asserts_list);
genTableWriters<VirtualTypes>(typevirts_list);
genTableWriters<Stat>(stats_list);
genWritePktTables();
genTableWriters<RelocTypes>(typerelocs_list);
genTableWriters<Repairs>(repairs_list);
memotab.genTables(this);
genTable_fsl_rt_table();
out.close();
}
| 23.868347
| 70
| 0.69405
|
chzchzchz
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.