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
1cdf396d7c14e193c5f365f1ecd84dcb0fba5914
2,733
cpp
C++
src/jsonrpc_client/asyncrpcclient.cpp
ondra-novak/jsonrpc_client
89ead3bd50bb86b85aa5d488bb45e768cdb3fc69
[ "MIT" ]
null
null
null
src/jsonrpc_client/asyncrpcclient.cpp
ondra-novak/jsonrpc_client
89ead3bd50bb86b85aa5d488bb45e768cdb3fc69
[ "MIT" ]
null
null
null
src/jsonrpc_client/asyncrpcclient.cpp
ondra-novak/jsonrpc_client
89ead3bd50bb86b85aa5d488bb45e768cdb3fc69
[ "MIT" ]
null
null
null
/* * asyncrpcclient.cpp * * Created on: 23. 7. 2017 * Author: ondra */ #include "asyncrpcclient.h" #include "netio.h" #include <imtjson/parser.h> #include <imtjson/serializer.h> #include <cerrno> namespace jsonrpc_client { using namespace jsonrpc_client; RpcClient::RpcClient():AbstractRpcClient(RpcVersion::ver2),connected(false) { } void RpcClient::disconnect(bool sync) { Sync _(lock); if (connected) { conn->close(); } if (sync) { _.unlock(); if (workerThr.joinable()) { workerThr.join(); } } } bool RpcClient::connect(StrViewA addr) { Sync _(lock); connectLk( addr); return connected; } void RpcClient::connectLk(StrViewA addr) { if (!connected) { this->addr = addr; PNetworkConection nconn = NetworkConnection::connect(addr,1024); if (nconn != nullptr) { if (workerThr.joinable()) workerThr.join(); workerThr = std::thread([=]{ worker(nconn); }); conn = nconn; connected = true; } else { int err = errno; logError({"Failed to connect", addr, err}); conn = nullptr; rejectAllPendingCalls(); return; } onInit(); } } void RpcClient::sendJSON(const Value& v) { logTrafic(false,v); OutputStream out(conn); v.serialize<OutputStream>(out); out('\n'); out.flush(); if (conn->getLastSendError()) { logError( { "RpcClient", "Failed to send message", addr, conn->getLastSendError() }); conn->close(); } else if (conn->isTimeout()) { logError( { "RpcClient", "Timeout while writting message", addr }); conn->close(); } } void RpcClient::sendRequest(Value request) { if (!connected) { rejectAllPendingCalls(); } else { Value v = request; sendJSON(v); } } RpcClient::~RpcClient() { disconnect(true); } void RpcClient::worker(PNetworkConection conn) { while (conn->waitRead(rcvtimeout)) { try { InputStream in(conn); BinaryView b = in(0); if (b.length == 0) { //connection closed break; } if (isspace(b[0])) { //skip whitespace in(1); continue; } Value resp = Value::parse<InputStream>(in); logTrafic(true,resp); ReceiveStatus st = processResponse(resp); if (st == notification) { onNotify(json::Notify(resp)); } else if (st == request) { RpcRequest req = RpcRequest::create(resp, [&](Value v){ Sync _(lock); sendJSON(v); }); req.setError(RpcServer::errorMethodNotFound, "RPCServer mode is not supported"); } } catch (std::exception &e) { logError({"Error reading response", addr, e.what()}); break; } } Sync _(lock); logTrafic(true,Value()); connected = false; rejectAllPendingCalls(); this->conn = nullptr; } void RpcClient::setRecvTimeout(int timeoutms) { rcvtimeout = timeoutms; } }
17.08125
84
0.637029
ondra-novak
1cdfa4bf90d2d3fe0c0b1d35aecb1836343266d3
7,673
cpp
C++
glSandbox/source/PostProcessingStep.cpp
alex-tdrn/glSandbox
4f55e6980382672e53cb0406ee4ddc7cf240dc65
[ "MIT" ]
null
null
null
glSandbox/source/PostProcessingStep.cpp
alex-tdrn/glSandbox
4f55e6980382672e53cb0406ee4ddc7cf240dc65
[ "MIT" ]
null
null
null
glSandbox/source/PostProcessingStep.cpp
alex-tdrn/glSandbox
4f55e6980382672e53cb0406ee4ddc7cf240dc65
[ "MIT" ]
null
null
null
#include "Util.h" #include "PostProcessingStep.h" #include "Globals.h" #include "MeshManager.h" void PostProcessingStep::initFramebuffer() { initialized = true; glGenFramebuffers(1, &framebuffer); glBindFramebuffer(GL_FRAMEBUFFER, framebuffer); glActiveTexture(GL_TEXTURE0); glGenTextures(1, &colorbuffer); glBindTexture(GL_TEXTURE_2D, colorbuffer); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB16F, info::windowWidth, info::windowHeight, 0, GL_RGB, GL_FLOAT, NULL); glGenerateMipmap(GL_TEXTURE_2D); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glBindTexture(GL_TEXTURE_2D, 0); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, colorbuffer, 0); if(glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) throw "ERROR::FRAMEBUFFER:: Framebuffer is not complete!"; glBindFramebuffer(GL_FRAMEBUFFER, 0); } void PostProcessingStep::updateFramebuffer() { glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, colorbuffer); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB16F, info::windowWidth, info::windowHeight, 0, GL_RGB, GL_FLOAT, NULL); glGenerateMipmap(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, 0); } void PostProcessingStep::draw(unsigned int sourceColorbuffer, unsigned int targetFramebuffer) { if(!initialized) initFramebuffer(); inputColorbuffer = sourceColorbuffer; bool doGammaHDR = false; /*if(targetFramebuffer == 0 && (settings::rendering::gammaCorrection || settings::rendering::tonemapping)) { doGammaHDR = true; targetFramebuffer = framebuffer; }*/ glBindFramebuffer(GL_FRAMEBUFFER, targetFramebuffer); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); glDisable(GL_DEPTH_TEST); glDisable(GL_CULL_FACE); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); currentShader->use(); currentShader->set("screenTexture", 0); if(currentShader == ShaderManager::convolution()) { currentShader->set("offset", convolutionOffset); currentShader->set("divisor", convolutionDivisor); for(int i = 0; i < 9; i++) currentShader->set("kernel[" + std::to_string(i) + "]", convolutionKernel[i]); } else if(currentShader == ShaderManager::chromaticAberration()) { currentShader->set("intensity", chromaticAberrationIntensity); currentShader->set("offsetR", chromaticAberrationOffsetR); currentShader->set("offsetG", chromaticAberrationOffsetG); currentShader->set("offsetB", chromaticAberrationOffsetB); } glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, sourceColorbuffer); glGenerateMipmap(GL_TEXTURE_2D); MeshManager::quad()->use(); if(doGammaHDR) { glBindFramebuffer(GL_FRAMEBUFFER, 0); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); glDisable(GL_DEPTH_TEST); glDisable(GL_CULL_FACE); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); ShaderManager::gammaHDR()->use(); ShaderManager::gammaHDR()->set("screenTexture", 0); /*if(settings::rendering::gammaCorrection) resources::shaders::gammaHDR.set("gamma", settings::rendering::gammaExponent); else resources::shaders::gammaHDR.set("gamma", 1.0f); if(settings::rendering::tonemapping) { resources::shaders::gammaHDR.set("tonemapping", settings::rendering::tonemapping); resources::shaders::gammaHDR.set("exposure", settings::rendering::exposure); } else resources::shaders::gammaHDR.set("tonemapping", 0);*/ glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, colorbuffer); glGenerateMipmap(GL_TEXTURE_2D); MeshManager::quad()->use(); } } void PostProcessingStep::draw(unsigned int sourceColorbuffer) { if(!initialized) initFramebuffer(); draw(sourceColorbuffer, framebuffer); } unsigned int PostProcessingStep::getColorbuffer() { return colorbuffer; } void PostProcessingStep::drawUI() { //TODO //ImGui::Checkbox("Gamma Correction", &gammaCorrection); //if(gammaCorrection) //{ // ImGui::DragFloat("Gamma Exponent", &gammaExponent, 0.01f); //} //if(ImGui::CollapsingHeader("Tone Mapping")) //{ // ImGui::Indent(); // // ImGui::RadioButton("None", &tonemapping, tonemappingType::none); // ImGui::SameLine(); // ImGui::RadioButton("Reinhard", &tonemapping, tonemappingType::reinhard); // ImGui::SameLine(); // ImGui::RadioButton("Uncharted 2", &tonemapping, tonemappingType::uncharted2); // ImGui::SameLine(); // ImGui::RadioButton("Hejl Burgess-Dawson", &tonemapping, tonemappingType::hejl_burgess_dawson); // if(tonemapping) // { // ImGui::DragFloat("Exposure", &exposure, 0.1f); // } // ImGui::Unindent(); //} /* IDGuard idGuard{this}; if(!floatImage) { float size = 256; if(ImGui::ImageButton(ImTextureID(inputColorbuffer), ImVec2(size, size / info::aspectRatio), ImVec2(0, 1), ImVec2(1, 0))) floatImage = true; } else { ImGui::Begin("buff", &floatImage, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse); const float titlebarHeight = ImGui::GetFontSize() + ImGui::GetStyle().FramePadding.y * 2; ImGui::SetWindowSize({ImGui::GetWindowSize().x, ImGui::GetWindowSize().x / info::aspectRatio + titlebarHeight + ImGui::GetStyle().WindowPadding.y}); float size = ImGui::GetWindowContentRegionWidth(); ImGui::Image(ImTextureID(inputColorbuffer), ImVec2(size, size / info::aspectRatio), ImVec2(0, 1), ImVec2(1, 0)); ImGui::End(); } ImGui::RadioButton("Passthrough", &active, type::passthrough); ImGui::SameLine(); ImGui::RadioButton("Grayscale", &active, type::grayscale); ImGui::SameLine(); ImGui::RadioButton("Chromatic Aberration", &active, type::chromaticAberration); ImGui::RadioButton("Invert", &active, type::invert); ImGui::SameLine(); ImGui::RadioButton("Convolution", &active, type::convolution); switch(active) { case type::passthrough: break; case type::grayscale: break; case type::chromaticAberration: ImGui::DragFloat("Intensity", &chromaticAberrationIntensity, 0.01f); ImGui::DragFloat2("Offset R", &chromaticAberrationOffsetR.x, 0.0001f); ImGui::DragFloat2("Offset G", &chromaticAberrationOffsetG.x, 0.0001f); ImGui::DragFloat2("Offset B", &chromaticAberrationOffsetB.x, 0.0001f); break; case type::invert: break; case type::convolution: if(ImGui::Button("Sharpen")) { float kernel[9] = { 0, -1, 0, -1, 5, -1, 0, -1, 0 }; for(int i = 0; i < 9; i++) convolutionKernel[i] = kernel[i]; convolutionDivisor = 1.0f; } ImGui::SameLine(); if(ImGui::Button("Blur")) { float kernel[9] = { 1, 2, 1, 2, 4, 2, 1, 2, 1 }; for(int i = 0; i < 9; i++) convolutionKernel[i] = kernel[i]; convolutionDivisor = 16.0f; } ImGui::SameLine(); if(ImGui::Button("Edge")) { float kernel[9] = { 1, 1, 1, 1, -8, 1, 1, 1, 1 }; for(int i = 0; i < 9; i++) convolutionKernel[i] = kernel[i]; convolutionDivisor = 1.0f; } ImGui::SameLine(); if(ImGui::Button("Random")) { convolutionDivisor = 1.0f; for(int i = 0; i < 9; i++) { convolutionKernel[i] = (rand() % 100 - 50) / 10.0f; convolutionDivisor += convolutionKernel[i]; } if(std::abs(convolutionDivisor) <= 0.01f) convolutionDivisor = 1.0f; } ImGui::DragFloat("Offset", &convolutionOffset, 0.0001f); ImGui::DragFloat("Divisor", &convolutionDivisor, 0.01f); ImGui::DragFloat3("##1", &convolutionKernel[0], 0.01f); ImGui::DragFloat3("##2", &convolutionKernel[3], 0.01f); ImGui::DragFloat3("##3", &convolutionKernel[6], 0.01f); break; }*/ }
32.375527
150
0.712629
alex-tdrn
1ce36afc1b352b629368df9bbd3f63e22f3b8ca0
10,044
hpp
C++
ufora/core/containers/TwoWaySetMap.hpp
ufora/ufora
04db96ab049b8499d6d6526445f4f9857f1b6c7e
[ "Apache-2.0", "CC0-1.0", "MIT", "BSL-1.0", "BSD-3-Clause" ]
571
2015-11-05T20:07:07.000Z
2022-01-24T22:31:09.000Z
ufora/core/containers/TwoWaySetMap.hpp
timgates42/ufora
04db96ab049b8499d6d6526445f4f9857f1b6c7e
[ "Apache-2.0", "CC0-1.0", "MIT", "BSL-1.0", "BSD-3-Clause" ]
218
2015-11-05T20:37:55.000Z
2021-05-30T03:53:50.000Z
ufora/core/containers/TwoWaySetMap.hpp
timgates42/ufora
04db96ab049b8499d6d6526445f4f9857f1b6c7e
[ "Apache-2.0", "CC0-1.0", "MIT", "BSL-1.0", "BSD-3-Clause" ]
40
2015-11-07T21:42:19.000Z
2021-05-23T03:48:19.000Z
/*************************************************************************** Copyright 2015 Ufora Inc. 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. ****************************************************************************/ #pragma once #include <map> #include <set> #include <stdint.h> #include "../lassert.hpp" template<class key_type, class value_type, class key_compare = std::less<key_type>, class value_compare = std::less<value_type> > class TwoWaySetMap { public: typedef std::map<key_type, std::set<value_type, value_compare>, key_compare> key_valueset_map; typedef std::map<value_type, std::set<key_type, key_compare>, value_compare> value_keyset_map; TwoWaySetMap() {} TwoWaySetMap(const TwoWaySetMap& in) : mValuesToKeys(in.mValuesToKeys), mKeysToValues(in.mKeysToValues) {} TwoWaySetMap& operator=(const TwoWaySetMap& in) { mValuesToKeys = in.mValuesToKeys; mKeysToValues = in.mKeysToValues; return *this; } uint32_t keyCount(void) const { return mKeysToValues.size(); } uint32_t valueCount(void) const { return mValuesToKeys.size(); } bool contains(const key_type& key, const value_type& value) const { return getValues(key).find(value) != getValues(key).end(); } const std::set<value_type, value_compare>& getValues(const key_type& inKey) const { if (mKeysToValues.find(inKey) == mKeysToValues.end()) return mEmptyValues; return mKeysToValues.find(inKey)->second; } const std::set<key_type, key_compare>& getKeys(const value_type& inValue) const { if (mValuesToKeys.find(inValue) == mValuesToKeys.end()) return mEmptyKeys; return mValuesToKeys.find(inValue)->second; } void insert(const std::set<key_type, key_compare>& inKey, const value_type& inValue) { for (typename std::set<key_type, key_compare>::const_iterator it = inKey.begin(); it != inKey.end();++it) insert(*it, inValue); } void drop(const std::set<key_type, key_compare>& inKey, const value_type& inValue) { for (typename std::set<key_type, key_compare>::const_iterator it = inKey.begin(); it != inKey.end();++it) drop(*it, inValue); } void update(const key_type& inKey, const std::set<value_type, value_compare>& inValues) { { std::set<value_type, value_compare> curValues(getValues(inKey)); for (typename std::set<value_type, value_compare>::const_iterator it = curValues.begin(); it != curValues.end(); ++it) if (inValues.find(*it) == inValues.end()) drop(inKey, *it); } insert(inKey, inValues); } void insert(const key_type& inKey, const std::set<value_type, value_compare>& inValue) { for (typename std::set<value_type, value_compare>::const_iterator it = inValue.begin(); it != inValue.end();++it) insert(inKey, *it); } void insert(const std::set<key_type, key_compare>& inKeys, const std::set<value_type, value_compare>& inValues) { for (typename std::set<value_type, value_compare>::const_iterator it = inValues.begin(); it != inValues.end();++it) insert(inKeys, *it); } template<class iterator_type> void insert(const key_type& inKey, iterator_type first, iterator_type second) { while(first != second) insert(inKey, *first++); } void drop(const key_type& inKey, const std::set<value_type, value_compare>& inValue) { for (typename std::set<value_type, value_compare>::const_iterator it = inValue.begin(); it != inValue.end();++it) drop(inKey, *it); } void dropKey(const key_type& inKey) { std::set<value_type, value_compare> vals(getValues(inKey)); for (typename std::set<value_type, value_compare>::iterator it = vals.begin(); it != vals.end();++it) drop(inKey, *it); } void dropValue(const value_type& inVal) { std::set<key_type, key_compare> keys(getKeys(inVal)); for (typename std::set<key_type, key_compare>::iterator it = keys.begin(); it != keys.end(); ++it) drop(*it, inVal); } void insert(const key_type& inKey, const value_type& inValue) { mKeysToValues[inKey].insert(inValue); mValuesToKeys[inValue].insert(inKey); } void drop(const key_type& inKey, const value_type& inValue) { if (!hasKey(inKey)) return; auto& values = mKeysToValues[inKey]; if (values.find(inValue) == values.end()) return; values.erase(inValue); mValuesToKeys[inValue].erase(inKey); if (values.size() == 0) mKeysToValues.erase(inKey); if (mValuesToKeys[inValue].size() == 0) mValuesToKeys.erase(inValue); } const key_valueset_map& getKeysToValues(void) const { return mKeysToValues; } const value_keyset_map& getValuesToKeys(void) const { return mValuesToKeys; } const key_type& lowestKey(void) const { lassert(keyCount()); return mKeysToValues.begin()->first; } const value_type& lowestValue(void) const { lassert(keyCount()); return mValuesToKeys.begin()->first; } const key_type& highestKey(void) const { lassert(keyCount()); return mKeysToValues.rbegin()->first; } const value_type& highestValue(void) const { lassert(keyCount()); return mValuesToKeys.rbegin()->first; } bool hasKey(const key_type& inKey) const { return mKeysToValues.find(inKey) != mKeysToValues.end(); } bool hasValue(const value_type& inVal) const { return mValuesToKeys.find(inVal) != mValuesToKeys.end(); } template<class storage_type> void serialize(storage_type& s) const { s.serialize(mKeysToValues); s.serialize(mValuesToKeys); } template<class storage_type> void deserialize(storage_type& s) { s.deserialize(mKeysToValues); s.deserialize(mValuesToKeys); } private: std::set<value_type, value_compare> mEmptyValues; std::set<key_type, key_compare> mEmptyKeys; key_valueset_map mKeysToValues; value_keyset_map mValuesToKeys; }; template<class T, class storage_type> class Serializer; template<class T, class storage_type> class Deserializer; template<class key_type, class value_type, class key_compare_type, class value_compare_type, class storage_type> class Serializer< TwoWaySetMap<key_type, value_type, key_compare_type, value_compare_type>, storage_type > { public: static void serialize( storage_type& s, const TwoWaySetMap<key_type, value_type, key_compare_type, value_compare_type>& in ) { in.serialize(s); } }; template<class key_type, class value_type, class key_compare_type, class value_compare_type, class storage_type> class Deserializer< TwoWaySetMap<key_type, value_type, key_compare_type, value_compare_type>, storage_type > { public: static void deserialize( storage_type& s, TwoWaySetMap<key_type, value_type, key_compare_type, value_compare_type>& out ) { out.deserialize(s); } }; //given a graph, compute the minimum set of nodes such that all possible loops through the graph pass through at least one node //pruneRootNodes determines whether nodes with no entrypoints should be left in (false) template<class T, class compare> void minimumGraphCovering(TwoWaySetMap<T, T, compare, compare> tree, std::set<T, compare>& out, const std::set<T,compare>& required, bool pruneRootNodes) { using namespace std; typedef TwoWaySetMap<T, T, compare, compare> map_type; typename map_type::key_valueset_map keys = tree.getKeysToValues(); out = required; for (typename map_type::key_valueset_map::iterator it = keys.begin(), it_end = keys.end(); it != it_end; ++it) { T t = it->first; if (required.find(t) == required.end()) { if (tree.getValues(t).find(t) == tree.getValues(t).end() && (pruneRootNodes || tree.getKeys(t).size())) { set<T, compare> down = tree.getValues(t); set<T, compare> up = tree.getKeys(t); tree.drop(up, t); tree.drop(t, down); for (auto t2: up) tree.insert(t2, down); } else out.insert(t); } } } template<class T, class compare> void minimumGraphCovering(TwoWaySetMap<T, T, compare, compare> tree, std::set<T, compare>& out, const std::set<T,compare>& required, bool pruneRootNodes, const std::vector<T>& removalOrder) { using namespace std; typedef TwoWaySetMap<T, T, compare, compare> map_type; typename map_type::key_valueset_map keys = tree.getKeysToValues(); out = required; for (auto t: removalOrder) { if (required.find(t) == required.end()) { if (tree.getValues(t).find(t) == tree.getValues(t).end() && (pruneRootNodes || tree.getKeys(t).size())) { set<T, compare> down = tree.getValues(t); set<T, compare> up = tree.getKeys(t); tree.drop(up, t); tree.drop(t, down); for (typename set<T>::iterator it2 = up.begin(), it_end2 = up.end(); it2 != it_end2; ++it2) tree.insert(*it2, down); } else out.insert(t); } } } template<class T, class compare> void minimumGraphCovering(const TwoWaySetMap<T, T, compare, compare>& tree, std::set<T, compare>& out, bool pruneRootNodes) { minimumGraphCovering(tree, out, std::set<T, compare>(), pruneRootNodes); } //given a graph, compute the implied transitive closure if we remove a bunch of nodes. //that is, if A->B and B->C and we remove "B", write A->C instead. template<class T, class compare> void graphRestriction(TwoWaySetMap<T, T, compare, compare> &tree, const std::set<T, compare>& toRemove) { using namespace std; for (auto t: toRemove) { set<T> down = tree.getValues(t); set<T> up = tree.getKeys(t); tree.drop(up, t); tree.drop(t, down); for (auto t2: up) tree.insert(t2, down); } }
31.987261
189
0.684588
ufora
1ce473203eb8b6f0c385adfb22ed3f866347e443
116,544
cpp
C++
src/QtPhonemes/Phonemes/PhonemeIndex.cpp
Vladimir-Lin/QtPhonemes
1c1b4f4aa99bbadab5ca25dce1fc64c8ee70202d
[ "MIT" ]
null
null
null
src/QtPhonemes/Phonemes/PhonemeIndex.cpp
Vladimir-Lin/QtPhonemes
1c1b4f4aa99bbadab5ca25dce1fc64c8ee70202d
[ "MIT" ]
null
null
null
src/QtPhonemes/Phonemes/PhonemeIndex.cpp
Vladimir-Lin/QtPhonemes
1c1b4f4aa99bbadab5ca25dce1fc64c8ee70202d
[ "MIT" ]
null
null
null
// Data source from S:/Sakra/Development/CIOS/3rdparty/builds/espeak-1.47.11-source/espeak-data/phonindex int PhonemeIndexSize = 22960 ; unsigned char PhonemeIndex [ 22960 ] = { 0x09,0x47,0x01,0x00,0x00,0xA1,0xD5,0x83,0x00,0x00,0x00,0x00,0x00,0xA2,0x12,0x82, 0x00,0x00,0x00,0x00,0x00,0xC0,0x02,0x00,0x00,0xB0,0x56,0x00,0x02,0x0D,0x99,0xC9, 0x10,0x34,0x22,0x24,0x01,0x0D,0x00,0x20,0x19,0x0A,0x00,0xB0,0x87,0x00,0x00,0xB0, 0xB8,0x00,0x00,0xB0,0xF9,0x00,0x26,0x05,0x00,0xB0,0x3A,0x01,0x00,0xB0,0x7B,0x01, 0x00,0xB0,0xBC,0x01,0x03,0x0D,0xCC,0x6D,0x00,0xA9,0x86,0x28,0x5F,0x0A,0x02,0x2F, 0x00,0xB0,0xFD,0x01,0x00,0xB0,0x5E,0x02,0x03,0x0D,0xCC,0x6E,0x00,0xA9,0x86,0x28, 0x5F,0x0A,0x02,0x2F,0x00,0xB0,0xBF,0x02,0x00,0xB0,0x10,0x03,0x04,0x0D,0x8B,0xC5, 0xA9,0xCC,0x00,0xB0,0x61,0x03,0xC0,0xC3,0xB2,0x03,0x03,0x0D,0xCC,0x72,0x00,0xA9, 0x00,0xB0,0x35,0x04,0x03,0x0D,0xCC,0x6C,0x00,0xA9,0x00,0xB0,0x86,0x04,0x02,0x0D, 0xB9,0xC9,0x8A,0x29,0x2E,0x01,0x06,0x6A,0x10,0xDF,0xC7,0x04,0x10,0xDF,0xF8,0x04, 0x10,0xDF,0x29,0x05,0x10,0xDF,0x5A,0x05,0x10,0xDF,0x8B,0x05,0x10,0xDF,0xBC,0x05, 0x02,0x27,0xE0,0xEC,0xED,0x05,0x00,0x27,0x00,0xB0,0x0E,0x06,0x2F,0x30,0x30,0x30, 0x31,0x20,0x00,0xB0,0x3F,0x06,0x00,0xB0,0x60,0x06,0x32,0x22,0x05,0x68,0x00,0xB0, 0x91,0x06,0x00,0xF0,0xB2,0x06,0x2F,0x30,0x30,0x30,0x31,0x20,0x00,0xB0,0x88,0x0B, 0x8A,0x27,0x00,0xB0,0xB9,0x0B,0x00,0xB0,0xEA,0x0B,0x00,0xF0,0xB2,0x06,0x01,0x0D, 0x00,0x72,0x34,0x24,0x01,0x0D,0x00,0x20,0x00,0xA1,0x19,0x03,0x4B,0x01,0x60,0xAA, 0x00,0xA2,0x12,0x22,0x4B,0x09,0x60,0xAA,0x00,0xB0,0x0B,0x0C,0x10,0xF4,0x3C,0x0C, 0x01,0x0D,0x00,0x72,0x00,0xA1,0x19,0x03,0x49,0x01,0x62,0xAA,0x00,0xA2,0x12,0x22, 0x49,0x09,0x62,0xAA,0x00,0xB0,0xFF,0x0D,0x20,0xF3,0x40,0x0E,0x01,0x0D,0x00,0x72, 0x00,0xA1,0x19,0x03,0x40,0x09,0x76,0x5A,0x00,0xA2,0x12,0x02,0x40,0x09,0x62,0x5A, 0x06,0x6A,0x10,0xDF,0xC7,0x04,0x10,0xDF,0xF8,0x04,0x10,0xDF,0x29,0x05,0x10,0xDF, 0x5A,0x05,0x10,0xDF,0x8B,0x05,0x10,0xDF,0xBC,0x05,0x02,0x27,0xE0,0xEC,0xED,0x05, 0x00,0xB0,0xFF,0x0D,0x00,0xF0,0xDB,0x10,0x02,0x0D,0x80,0xCA,0x8A,0x29,0x05,0x68, 0x00,0xB0,0xEC,0x11,0x20,0xF3,0x2D,0x12,0x00,0xB0,0xEC,0x11,0xB0,0xF4,0x2D,0x12, 0x06,0x6A,0x00,0xD0,0xEF,0x15,0x00,0xD0,0x20,0x16,0x00,0xD0,0x41,0x16,0x60,0xDF, 0x62,0x16,0x00,0xD0,0x93,0x16,0x00,0xD0,0xD4,0x16,0x01,0x00,0x8A,0x29,0x38,0x01, 0x8A,0x29,0x11,0x68,0x06,0x6C,0x40,0xEC,0x05,0x17,0x80,0xED,0x46,0x17,0x20,0xEE, 0x87,0x17,0x20,0xEE,0xB8,0x17,0x80,0xED,0xF9,0x17,0x80,0xED,0x4A,0x18,0x00,0xB0, 0x8B,0x18,0x01,0x00,0x00,0x91,0xC0,0x00,0x1C,0x20,0xE0,0xEC,0xAC,0x18,0x04,0x60, 0x02,0x27,0x80,0xED,0xAC,0x18,0x00,0x27,0x00,0xB0,0xCD,0x18,0x2F,0x20,0x00,0xB0, 0xFE,0x18,0x38,0x20,0x00,0xB0,0x1F,0x19,0x00,0xB0,0x40,0x19,0x02,0x29,0x37,0x01, 0x06,0x6C,0x40,0xEC,0x05,0x17,0x80,0xED,0x46,0x17,0x20,0xEE,0x87,0x17,0x20,0xEE, 0xB8,0x17,0x80,0xED,0xF9,0x17,0x80,0xED,0x4A,0x18,0x39,0x25,0x00,0xB0,0x87,0x17, 0x3A,0x25,0x00,0xB0,0x87,0x17,0x00,0xB0,0x8B,0x18,0x02,0x29,0x37,0x01,0x00,0x91, 0xC0,0x00,0x39,0x25,0x00,0xB0,0x61,0x19,0x3A,0x25,0x00,0xB0,0x92,0x19,0x06,0x6C, 0x40,0xEC,0xD3,0x19,0xE0,0xEC,0x14,0x1A,0x80,0xED,0x61,0x19,0x20,0xEE,0x55,0x1A, 0xE0,0xEC,0x96,0x1A,0x80,0xED,0x92,0x19,0x01,0x00,0x02,0x29,0x37,0x01,0x06,0x6C, 0x00,0xE0,0xE7,0x1A,0x00,0xE0,0x08,0x1B,0x00,0xE0,0x29,0x1B,0x00,0xE0,0x4A,0x1B, 0x00,0xE0,0x7B,0x1B,0xC0,0xEE,0xAC,0x1B,0x00,0xB0,0x8B,0x18,0x02,0x0D,0x8E,0xCA, 0x01,0xA2,0x1E,0x52,0x00,0x00,0x00,0x00,0x06,0x6A,0x00,0xD0,0xCD,0x1B,0x00,0xD0, 0xFE,0x1B,0x00,0xD0,0x2F,0x1C,0x00,0xD0,0x60,0x1C,0x00,0xD0,0x91,0x1C,0x00,0xD0, 0xD2,0x1C,0x00,0x27,0x00,0xB0,0x13,0x1D,0x00,0xB0,0x54,0x1D,0x02,0x0D,0xAD,0xC9, 0x00,0xB0,0x95,0x1D,0x8A,0x29,0x3F,0x01,0x80,0xED,0xC6,0x1D,0x00,0x27,0x00,0xB0, 0xF7,0x1D,0x00,0xB0,0x38,0x1E,0x02,0x29,0x17,0x68,0x06,0x6A,0x00,0xD0,0x69,0x1E, 0x00,0xD0,0x9A,0x1E,0x00,0xD0,0xCB,0x1E,0x00,0xD0,0xFC,0x1E,0x00,0xD0,0x2D,0x1F, 0x00,0xD0,0x5E,0x1F,0x20,0xEE,0x8F,0x1F,0x08,0x2C,0x03,0x68,0x00,0xB0,0xB0,0x1F, 0x00,0xB0,0xD1,0x1F,0x0B,0x60,0x00,0xA2,0x19,0x12,0x00,0x00,0x00,0x00,0x1F,0x20, 0x03,0x68,0x00,0xB0,0x02,0x20,0x00,0xB0,0x43,0x20,0x01,0x00,0x02,0x2B,0x15,0x68, 0x06,0x6A,0x00,0xD0,0x74,0x20,0x00,0xD0,0xB5,0x20,0x00,0xD0,0xF6,0x20,0x00,0xD0, 0x37,0x21,0x00,0xD0,0x68,0x21,0x00,0xD0,0xB9,0x21,0x20,0xEE,0xEA,0x21,0x00,0x27, 0x03,0x68,0x00,0xB0,0x0B,0x22,0x07,0x60,0x00,0xA2,0x23,0x12,0x00,0x00,0x00,0x00, 0x00,0xB0,0x2C,0x22,0x01,0x00,0x1F,0x20,0x01,0x0D,0x00,0x20,0x8A,0x29,0x01,0x01, 0x06,0x6A,0x00,0xD0,0x5D,0x22,0x00,0xD0,0x8E,0x22,0x00,0xD0,0xBF,0x22,0x00,0xD0, 0xF0,0x22,0x00,0xD0,0x21,0x23,0x00,0xD0,0x62,0x23,0x1F,0x20,0x80,0xED,0x93,0x23, 0x00,0x27,0x00,0xB0,0xB4,0x23,0x01,0x00,0x00,0xA2,0x12,0x22,0x4B,0x09,0x54,0x41, 0x02,0x2F,0x0B,0x68,0x00,0xA1,0x19,0x03,0x4B,0x01,0xD4,0x72,0x85,0x29,0x03,0x68, 0x00,0xB0,0xD5,0x23,0x00,0xB0,0x16,0x24,0x06,0x6A,0x00,0xD0,0x57,0x24,0x00,0xD0, 0x98,0x24,0x00,0xD0,0xD9,0x24,0x00,0xD0,0x1A,0x25,0x00,0xD0,0x6B,0x25,0x00,0xD0, 0xAC,0x25,0x8A,0x27,0x03,0x2B,0x00,0xB0,0xED,0x25,0x00,0x27,0x00,0xB0,0x1E,0x26, 0x8A,0x29,0x00,0xB0,0x3F,0x26,0x01,0x00,0x00,0xA2,0x92,0x32,0x4D,0x09,0x5E,0xA2, 0x02,0x2F,0x07,0x68,0x00,0xA1,0x19,0x03,0x4F,0x01,0xDE,0x9A,0x00,0xB0,0x70,0x26, 0x06,0x6A,0x00,0xD0,0xB1,0x26,0x00,0xD0,0xF2,0x26,0x00,0xD0,0x33,0x27,0x00,0xD0, 0x74,0x27,0x00,0xD0,0xB5,0x27,0x00,0xD0,0xF6,0x27,0x8A,0x27,0x03,0x2B,0x00,0xB0, 0x37,0x28,0x00,0x37,0x32,0x20,0x00,0xB0,0x68,0x28,0x8A,0x29,0x00,0xB0,0x89,0x28, 0x01,0x00,0x02,0x0D,0xB3,0xC9,0x00,0xA1,0x99,0x12,0x45,0x49,0x62,0xAA,0x00,0xA2, 0x92,0x32,0x45,0x49,0x62,0xAA,0x02,0x2F,0x00,0xB0,0xBA,0x28,0x06,0x6A,0x00,0xD0, 0xFB,0x28,0x00,0xD0,0x3C,0x29,0x00,0xD0,0x7D,0x29,0x00,0xD0,0xBE,0x29,0x00,0xD0, 0xFF,0x29,0x00,0xD0,0x40,0x2A,0x8A,0x27,0x03,0x2B,0x00,0xB0,0x37,0x28,0x00,0x37, 0x42,0x20,0x00,0xB0,0x81,0x2A,0x8A,0x29,0x00,0xB0,0xA2,0x2A,0x01,0x00,0x02,0x0D, 0xB2,0xC9,0x00,0xA2,0x17,0x72,0x51,0x0D,0x72,0xCD,0x02,0x2F,0x05,0x68,0x00,0xD0, 0xD3,0x2A,0x00,0xB0,0xF4,0x2A,0x06,0x6A,0x00,0xD0,0x35,0x2B,0x00,0xD0,0x96,0x2B, 0x00,0xD0,0xE7,0x2B,0x00,0xD0,0x48,0x2C,0x00,0xD0,0xA9,0x2C,0x00,0xD0,0x1A,0x2D, 0x00,0x27,0x00,0xB0,0x7B,0x2D,0x8A,0x29,0x0A,0x68,0x43,0x24,0x03,0x68,0x25,0x0A, 0x04,0x60,0x43,0x25,0x02,0x68,0x32,0x0A,0x00,0xB0,0x9C,0x2D,0x01,0x00,0x00,0xA2, 0x94,0x32,0x4B,0x0D,0x6E,0xBD,0x02,0x2F,0x0B,0x68,0x00,0xA1,0x19,0x03,0x4F,0x01, 0x2A,0xAC,0x85,0x29,0x03,0x68,0x00,0xB0,0xED,0x2D,0x00,0xB0,0x2E,0x2E,0x06,0x6A, 0x00,0xD0,0x6F,0x2E,0x00,0xD0,0xA0,0x2E,0x00,0xD0,0xD1,0x2E,0x00,0xD0,0x02,0x2F, 0x00,0xD0,0x33,0x2F,0x00,0xD0,0x64,0x2F,0x1F,0x20,0x80,0xED,0x95,0x2F,0x8A,0x27, 0x03,0x2B,0x00,0xB0,0xC6,0x2F,0x00,0x27,0x00,0xB0,0xE7,0x2F,0x8A,0x29,0x00,0xB0, 0x08,0x30,0x01,0x00,0x02,0x0D,0xBE,0xC9,0x00,0xA2,0x88,0x14,0x49,0x0D,0x60,0xAA, 0x00,0xA1,0x0A,0x13,0x4D,0x09,0x60,0xAA,0x1F,0x30,0x1E,0x20,0x00,0xB0,0x39,0x30, 0x00,0xB0,0x8A,0x30,0x02,0x0D,0xBE,0xC9,0x0E,0x25,0x01,0x0D,0x00,0x72,0x1E,0x32, 0x1F,0x22,0x0D,0x68,0x00,0xA1,0x19,0x03,0x4B,0x01,0x5E,0xAA,0x00,0xB0,0xDB,0x30, 0x60,0xF9,0xB2,0x06,0x00,0xB0,0xDB,0x30,0x60,0xF9,0xB2,0x06,0x00,0xA1,0x19,0x03, 0x4B,0x09,0x5E,0xAA,0x1D,0x22,0x05,0x68,0x00,0xB0,0x0C,0x31,0x80,0xFC,0xB2,0x06, 0x22,0x22,0x00,0xB0,0x4D,0x31,0x00,0xA2,0x99,0x14,0x4B,0x0D,0xDE,0xA9,0x00,0xA1, 0x19,0x03,0x4B,0x01,0x5E,0xAA,0x00,0xB0,0x0C,0x31,0x80,0xFC,0xB2,0x06,0x00,0xA2, 0x88,0x14,0x47,0x4D,0xDC,0xA9,0x00,0xA1,0x0A,0x13,0x47,0x09,0xDC,0xA9,0x8A,0x29, 0x00,0xB0,0x6E,0x31,0x00,0xB0,0xBF,0x31,0x00,0xA2,0x12,0x22,0x49,0x09,0x54,0x49, 0x01,0x2F,0x00,0xB0,0x10,0x32,0x02,0x2F,0x0F,0x68,0x00,0xA1,0xD5,0x03,0x49,0x05, 0x54,0x49,0x85,0x29,0x05,0x68,0x00,0xB0,0x41,0x32,0x00,0xF0,0x72,0x32,0x00,0xB0, 0x41,0x32,0x00,0xF0,0x78,0x33,0x85,0x29,0x05,0x68,0x00,0xB0,0xD1,0x33,0x00,0xF0, 0x72,0x32,0x0E,0x22,0x05,0x68,0x00,0xB0,0x02,0x34,0x00,0xF0,0x78,0x33,0x1C,0x22, 0x05,0x68,0x00,0xB0,0x43,0x34,0x00,0xF0,0x78,0x33,0x1D,0x22,0x05,0x68,0x00,0xB0, 0x84,0x34,0x00,0xF0,0x78,0x33,0x1E,0x22,0x05,0x68,0x00,0xB0,0xC5,0x34,0x00,0xF0, 0x78,0x33,0x1F,0x22,0x05,0x68,0x00,0xB0,0x06,0x35,0x00,0xF0,0x78,0x33,0x20,0x22, 0x05,0x68,0x00,0xB0,0x47,0x35,0x00,0xF0,0x78,0x33,0x21,0x22,0x05,0x68,0x00,0xB0, 0x88,0x35,0x00,0xF0,0x78,0x33,0x00,0xB0,0xC9,0x35,0x00,0xF0,0x78,0x33,0x00,0xA1, 0xD5,0x03,0x4D,0x05,0x62,0xAA,0x00,0xA2,0x12,0x22,0x4D,0x09,0x62,0xAA,0x01,0x2F, 0x00,0xB0,0x0A,0x36,0x85,0x29,0x05,0x68,0x00,0xB0,0x3B,0x36,0x00,0xF0,0x6C,0x36, 0x00,0xB0,0x76,0x37,0x00,0xF0,0xA7,0x37,0x00,0xA1,0xD5,0x03,0x4C,0x09,0x5E,0xAA, 0x00,0xA2,0x12,0x02,0x4C,0x09,0x5E,0xAA,0x01,0x2F,0x00,0xB0,0x0A,0x36,0x85,0x29, 0x05,0x68,0x00,0xB0,0x3B,0x36,0x00,0xF0,0x6C,0x36,0x22,0x22,0x05,0x68,0x00,0xB0, 0x4D,0x31,0x40,0xF6,0x2E,0x38,0x00,0xB0,0x76,0x37,0x40,0xF6,0x2E,0x38,0x00,0xA1, 0xD5,0x03,0x51,0x09,0xEE,0xBC,0x00,0xA2,0x12,0x22,0x51,0x09,0x2E,0xAD,0x01,0x2F, 0x00,0xB0,0xE7,0x38,0x85,0x29,0x05,0x68,0x00,0xB0,0x18,0x39,0x00,0xF0,0x49,0x39, 0x00,0xB0,0xD7,0x3B,0x00,0xF0,0x08,0x3C,0x03,0x0D,0xCA,0x64,0x00,0x91,0x00,0xA1, 0xE3,0x53,0x55,0x09,0xF6,0xDD,0x00,0xA2,0x12,0x02,0x55,0x09,0xF6,0xDD,0x01,0x2F, 0x00,0xB0,0xE7,0x38,0x02,0x2F,0x0B,0x68,0x85,0x29,0x05,0x68,0x00,0xB0,0x18,0x39, 0x00,0xF0,0x49,0x39,0x00,0xB0,0xD7,0x3B,0x00,0xF0,0x0B,0x3D,0x85,0x29,0x05,0x68, 0x00,0xB0,0x18,0x39,0x00,0xF0,0x49,0x39,0x00,0xB0,0xD7,0x3B,0x00,0xF0,0x0B,0x3D, 0x00,0xA1,0xE3,0x53,0x55,0x09,0xF6,0xDD,0x00,0xA2,0x12,0x02,0x55,0x29,0xF6,0xDD, 0x01,0x2F,0x00,0xB0,0x23,0x3E,0x02,0x2F,0x0B,0x68,0x85,0x29,0x05,0x68,0x00,0xB0, 0x54,0x3E,0x30,0xF2,0x08,0x3C,0x00,0xB0,0x85,0x3E,0xD0,0xF2,0x08,0x3C,0x85,0x29, 0x05,0x68,0x00,0xB0,0xB6,0x3E,0x30,0xF2,0x08,0x3C,0x00,0xB0,0xE7,0x3E,0xD0,0xF2, 0x08,0x3C,0x00,0xA1,0xD5,0x03,0x49,0x09,0xEE,0xAC,0x00,0xA2,0x12,0x22,0x49,0x09, 0x2E,0xAD,0x01,0x2F,0x00,0xB0,0x18,0x3F,0x85,0x29,0x05,0x68,0x00,0xB0,0x49,0x3F, 0x00,0xF0,0x7A,0x3F,0x00,0xB0,0x6A,0x40,0x60,0xF9,0x9B,0x40,0x00,0xA1,0x19,0x03, 0xAD,0x09,0x54,0x5A,0x00,0xA2,0x19,0x12,0x0D,0x09,0x54,0x49,0x02,0x2F,0x0B,0x68, 0x85,0x29,0x05,0x68,0x00,0xB0,0x3D,0x41,0x00,0xF0,0x6E,0x41,0x00,0xB0,0xAE,0x43, 0x00,0xF0,0x6E,0x41,0x85,0x29,0x05,0x68,0x00,0xB0,0xDF,0x43,0x00,0xF0,0x6E,0x41, 0x00,0xB0,0x10,0x44,0x00,0xF0,0x6E,0x41,0x00,0xA1,0x19,0x03,0xA9,0x01,0x54,0x5A, 0x00,0xA2,0x19,0x12,0x09,0x01,0x54,0x49,0x02,0x2F,0x0F,0x68,0x00,0xA2,0x19,0x32, 0x09,0x05,0x54,0x49,0x85,0x29,0x05,0x68,0x00,0xB0,0x3D,0x41,0x00,0xF0,0x6E,0x41, 0x00,0xB0,0x41,0x44,0x60,0xF9,0x6E,0x41,0x85,0x29,0x05,0x68,0x00,0xB0,0xDF,0x43, 0x00,0xF0,0x6E,0x41,0x86,0x28,0x03,0x2B,0x23,0x0A,0x00,0xB0,0x72,0x44,0x00,0xF0, 0x6E,0x41,0x02,0x0D,0x8B,0xCA,0x00,0xA1,0x19,0x03,0xA9,0x01,0x54,0x5A,0x00,0xA2, 0x19,0x12,0x09,0x01,0x54,0x49,0x85,0x29,0x00,0xB0,0xB3,0x44,0x00,0xB0,0xE4,0x44, 0x00,0xA2,0x19,0x12,0x0D,0x01,0x62,0xAA,0x02,0x2F,0x00,0xA1,0x19,0x03,0x0F,0x00, 0x5A,0xAA,0x85,0x29,0x05,0x68,0x00,0xB0,0x25,0x45,0x00,0xF0,0x56,0x45,0x00,0xB0, 0x98,0x47,0x00,0xF0,0x56,0x45,0x00,0xA2,0x19,0x12,0x0D,0x01,0x62,0xAA,0x02,0x2F, 0x09,0x68,0x00,0xA1,0x19,0x03,0x0F,0x00,0x5C,0xAA,0x00,0xA2,0x19,0x32,0x0D,0x05, 0x5C,0xAA,0x85,0x29,0x05,0x68,0x00,0xB0,0xC9,0x47,0x60,0xF4,0xFA,0x47,0x00,0xB0, 0xA7,0x4A,0x50,0xF5,0xFA,0x47,0x00,0xA1,0x19,0x03,0x4B,0x01,0xE8,0xAB,0x00,0xA2, 0x12,0x22,0x4B,0x09,0xE8,0xAB,0x02,0x2F,0x0B,0x68,0x85,0x29,0x05,0x68,0x00,0xB0, 0xD8,0x4A,0x00,0xF0,0x09,0x4B,0x00,0xB0,0x63,0x4D,0x20,0xF8,0x09,0x4B,0x85,0x29, 0x05,0x68,0x00,0xB0,0x94,0x4D,0x00,0xF0,0x09,0x4B,0x00,0xB0,0xC5,0x4D,0x20,0xF8, 0x09,0x4B,0x02,0x0D,0x90,0xCA,0x00,0xA1,0x19,0x03,0x49,0x01,0x64,0xAB,0x00,0xA2, 0x12,0x22,0x49,0x09,0x64,0xAB,0x02,0x2F,0x0B,0x68,0x85,0x29,0x05,0x68,0x00,0xB0, 0xD8,0x4A,0x00,0xF0,0xF6,0x4D,0x00,0xB0,0x63,0x4D,0x00,0xF0,0xF6,0x4D,0x85,0x29, 0x05,0x68,0x00,0xB0,0x94,0x4D,0x00,0xF0,0xF6,0x4D,0x00,0xB0,0xC5,0x4D,0x00,0xF0, 0xF6,0x4D,0x02,0x0D,0x91,0xCA,0x00,0xA1,0x23,0x53,0x55,0x09,0xF6,0xDD,0x00,0xA2, 0x12,0x22,0x49,0x09,0x2E,0xAD,0x85,0x29,0x05,0x68,0x00,0xB0,0x1A,0x50,0x00,0xF5, 0x4B,0x50,0x00,0xB0,0x0C,0x53,0x00,0xF5,0x3D,0x53,0x02,0x0D,0x91,0xCA,0x00,0xA1, 0x23,0x53,0x55,0x09,0xF6,0xDD,0x00,0xA2,0x12,0x22,0x49,0x09,0x2E,0xAD,0x85,0x29, 0x05,0x68,0x00,0xB0,0x1A,0x50,0x00,0xF0,0x8B,0x55,0x00,0xB0,0x0C,0x53,0x00,0xF5, 0x3D,0x58,0x02,0x0D,0x9D,0xCA,0x00,0xA1,0x19,0x03,0x33,0x05,0xF6,0xDD,0x00,0xA2, 0x32,0x12,0x33,0x05,0xF6,0xDD,0x00,0xB0,0x8A,0x5A,0x90,0xF1,0xCB,0x5A,0x00,0xA1, 0x19,0x03,0x4D,0x09,0xEE,0xBC,0x00,0xA2,0x12,0x22,0x49,0x09,0x2E,0xAD,0x02,0x2F, 0x0B,0x68,0x85,0x29,0x05,0x68,0x00,0xB0,0x91,0x5C,0x00,0xF0,0xC2,0x5C,0x00,0xB0, 0xC5,0x5E,0x00,0xF0,0xF6,0x5E,0x85,0x29,0x05,0x68,0x00,0xB0,0xF9,0x60,0x00,0xF0, 0xC2,0x5C,0x00,0xB0,0x2A,0x61,0x00,0xF0,0xF6,0x5E,0x00,0xA1,0x19,0x03,0x53,0x09, 0xF6,0xDD,0x00,0xA2,0x12,0x22,0x53,0x09,0x36,0xDC,0x85,0x29,0x05,0x68,0x00,0xB0, 0xF9,0x60,0x00,0xF0,0xC2,0x5C,0x00,0xB0,0x2A,0x61,0x00,0xF0,0xF6,0x5E,0x02,0x0D, 0x81,0xCA,0x85,0x29,0x05,0x68,0x00,0xB0,0x5B,0x61,0xC0,0xF3,0x9C,0x61,0x00,0xB0, 0x5B,0x61,0x00,0xF5,0x9C,0x61,0x00,0xA1,0xD5,0x1A,0x4B,0x01,0x54,0x73,0x00,0xA2, 0xD2,0x12,0x49,0x01,0x54,0x41,0x85,0x29,0x00,0xC0,0x5B,0x64,0x22,0x22,0x60,0xC4, 0x5F,0x66,0x33,0x32,0x34,0x22,0x00,0xC0,0x5F,0x66,0x0E,0x22,0x00,0xC0,0x71,0x67, 0x37,0x22,0x00,0xC0,0x3C,0x68,0x00,0xC0,0x3A,0x69,0x00,0xA1,0xD5,0x03,0x4D,0x01, 0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x62,0xA2,0x85,0x29,0x00,0xC0,0x16,0x6A, 0x22,0x32,0x33,0x32,0x34,0x22,0x00,0xC0,0x46,0x6B,0x0E,0x22,0x20,0xC3,0x1E,0x6D, 0xA0,0xC5,0x22,0x6E,0x00,0xA1,0x15,0x1C,0x4D,0x05,0x9E,0xA2,0x00,0xA2,0x92,0x12, 0x4D,0x01,0x5E,0xA2,0x85,0x29,0x30,0xC2,0x1E,0x6D,0x60,0xC4,0x2F,0x6F,0x00,0xA1, 0xD5,0x03,0x4D,0x01,0xEE,0xBC,0x85,0x29,0x00,0xC0,0xE2,0x6F,0x00,0xC0,0x32,0x72, 0x03,0x0D,0xC9,0x74,0x00,0x95,0x00,0xA1,0xE3,0x53,0x55,0x01,0xF6,0xDD,0x85,0x29, 0x00,0xC0,0xC2,0x73,0x00,0xC0,0xC2,0x73,0x00,0xA1,0xE3,0x53,0x55,0x01,0xF6,0xDD, 0x00,0xA2,0x19,0x12,0x33,0x25,0xF6,0xDD,0x85,0x29,0xE0,0xC1,0x83,0x75,0x60,0xC9, 0x96,0x76,0x00,0xA1,0xD5,0x03,0x4B,0x01,0xEE,0xAC,0x00,0xA2,0x92,0x12,0x4B,0x01, 0x6E,0xBD,0x02,0x2F,0x00,0xA2,0x92,0x12,0x4B,0x01,0xEE,0xAC,0x85,0x29,0x00,0xC0, 0x42,0x77,0x22,0x32,0x33,0x32,0x34,0x22,0x00,0xC0,0x71,0x78,0x1F,0x32,0x26,0x22, 0x00,0xC0,0x01,0x7A,0x37,0x22,0x00,0xC0,0x73,0x7B,0x0E,0x22,0x60,0xC4,0xFF,0x7C, 0x00,0xC0,0x34,0x7E,0x06,0xA1,0xD5,0x13,0x49,0x05,0xE2,0x9B,0x02,0xA2,0x92,0x14, 0x49,0x05,0x62,0x9B,0x85,0x29,0x80,0xC2,0x69,0x7F,0x21,0x22,0x00,0xC5,0xC4,0x7F, 0x00,0xC3,0x69,0x7F,0x00,0xA2,0x12,0x02,0x4B,0x01,0x54,0x41,0x00,0x29,0x00,0xC0, 0x0C,0x80,0x00,0xC0,0xC0,0x82,0x00,0xA1,0x19,0x03,0x4D,0x01,0x62,0xAA,0x00,0xA2, 0x92,0x12,0x4D,0x01,0x62,0xA2,0x00,0x29,0x00,0xC0,0xBC,0x84,0x00,0xC0,0xDC,0x86, 0x00,0xA1,0x19,0x03,0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x62,0xA2, 0x00,0x29,0x00,0xC0,0xFA,0x47,0x30,0x32,0x2F,0x32,0x31,0x22,0x00,0xC0,0x02,0x89, 0x00,0xC0,0x2E,0x8B,0x00,0xA1,0x19,0x03,0x4D,0x01,0x6A,0xAC,0x00,0xA2,0x12,0x02, 0x4D,0x01,0x6A,0xAC,0x00,0x29,0x00,0xC0,0x16,0x8D,0x00,0xC0,0xC2,0x8F,0x02,0x0D, 0x82,0xCA,0x00,0xA1,0x19,0x03,0x49,0x01,0x64,0xAB,0x00,0xA2,0x12,0x02,0x49,0x01, 0x64,0xAB,0x00,0x29,0xC0,0xC3,0x2E,0x92,0xA0,0xC5,0x2E,0x92,0x02,0x0D,0x82,0xCA, 0x00,0xA1,0x23,0x53,0x33,0x05,0xF6,0xDD,0x00,0xA2,0x23,0x52,0x33,0x05,0xF6,0xDD, 0x00,0x29,0x00,0xC0,0x4B,0x50,0x00,0xC0,0x3D,0x53,0x02,0x0D,0x95,0xC9,0x00,0xA1, 0x23,0x53,0x33,0x05,0xF6,0xDD,0x00,0xA2,0x12,0x42,0x33,0x05,0xF6,0xDD,0x00,0x29, 0x00,0xC0,0x8B,0x55,0x00,0xC0,0x3D,0x58,0x02,0x0D,0xAC,0xC9,0x06,0x6A,0x00,0xD0, 0xEF,0x15,0x00,0xD0,0x20,0x16,0x00,0xD0,0x41,0x16,0x60,0xDF,0x62,0x16,0x00,0xD0, 0x93,0x16,0x00,0xD0,0xD4,0x16,0x02,0x27,0x80,0xED,0xAC,0x18,0xC0,0xC3,0x95,0x94, 0x00,0xA1,0x19,0x03,0x33,0x01,0xF6,0xDD,0x00,0xA2,0x92,0x12,0x33,0x01,0xF6,0xDD, 0x00,0x29,0x00,0xC0,0x26,0x97,0x00,0xC0,0xCB,0x5A,0x00,0xA1,0x19,0x03,0x4D,0x01, 0xEE,0xBC,0x00,0xA2,0x92,0x12,0x4D,0x01,0x6E,0xBD,0x00,0x29,0xC0,0xC3,0x70,0x99, 0x40,0xC1,0x47,0x9C,0x00,0x29,0x60,0xC4,0x9C,0x61,0x00,0xC5,0x9C,0x61,0x01,0x0D, 0x00,0x68,0x1C,0x22,0x00,0xC0,0x8C,0x9E,0x1D,0x22,0x00,0xC0,0xE1,0x9F,0x1E,0x22, 0x00,0xC0,0x80,0xA1,0x1F,0x22,0x00,0xC0,0x25,0xA3,0x20,0x22,0x00,0xC0,0x8B,0xA4, 0x21,0x22,0x00,0xC0,0x3A,0xA6,0x60,0xC4,0x03,0xA8,0x00,0xA1,0xD5,0x03,0x4D,0x01, 0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x62,0xA2,0x85,0x29,0x00,0xC0,0xAE,0xA9, 0x00,0xC0,0x06,0xAC,0x00,0xA1,0xD9,0x13,0x4D,0x05,0x62,0xAA,0x00,0xA2,0x12,0x02, 0x4D,0x09,0x62,0xAA,0x01,0x2F,0x00,0xB0,0x0A,0x36,0x85,0x29,0x05,0x68,0x00,0xB0, 0xC9,0x47,0xC0,0xF3,0xAE,0xA9,0x00,0xB0,0x9D,0xAE,0xC0,0xF8,0x06,0xAC,0x00,0xA1, 0xD5,0x03,0x4B,0x01,0x54,0x73,0x00,0xA2,0xD2,0x13,0x49,0x01,0x54,0x41,0x37,0x22, 0x00,0xC0,0x3C,0x68,0x57,0x29,0x00,0xC0,0x5F,0x66,0x85,0x29,0x00,0xC5,0xCE,0xAE, 0x00,0xC0,0x71,0x67,0x00,0xA1,0xD5,0x03,0x4B,0x01,0x54,0x73,0x00,0xA2,0xD2,0x13, 0x49,0x01,0x54,0x41,0x85,0x29,0x00,0xC0,0x5B,0x64,0x37,0x22,0x00,0xC0,0x3C,0x68, 0x00,0xC0,0x1D,0xAF,0x00,0xA1,0xD5,0x03,0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12, 0x4D,0x01,0x62,0xA2,0x85,0x29,0x00,0xC0,0x16,0x6A,0x00,0xC0,0x5E,0xB0,0x00,0xA1, 0xE3,0x53,0x55,0x01,0xF6,0xDD,0x00,0xA2,0x12,0x02,0x55,0x21,0xF6,0xDD,0x85,0x29, 0x00,0xC0,0xEF,0xB0,0xA0,0xC5,0x20,0xB2,0x00,0xA1,0xD5,0x03,0x4C,0x01,0xEE,0xAC, 0x00,0xA2,0x92,0x12,0x4C,0x01,0x6E,0xBD,0x85,0x29,0x20,0xC3,0xFF,0x7C,0xC0,0xC3, 0xFF,0x7C,0x00,0xA1,0xD5,0x03,0x4C,0x01,0xEE,0xAC,0x00,0xA2,0x92,0x12,0x4C,0x01, 0x6E,0xBD,0x85,0x29,0x20,0xC3,0xED,0xB2,0x37,0x22,0x00,0xC0,0x73,0x7B,0xA0,0xC5, 0xED,0xB2,0x00,0xA1,0xD5,0x03,0x4C,0x05,0x5C,0x8B,0x00,0xA2,0x92,0x12,0x4C,0x01, 0x6E,0xBD,0x85,0x29,0x80,0xC2,0xED,0xB2,0x1E,0x34,0x1F,0x24,0x80,0xC2,0xAE,0xB4, 0x20,0x34,0x21,0x24,0x90,0xC1,0x88,0xB6,0xE0,0xC1,0x88,0xB6,0x01,0x00,0x00,0xA1, 0x19,0x03,0x4D,0x01,0x62,0xAA,0x85,0x29,0x00,0xC0,0xFA,0x47,0x00,0xC0,0xA9,0xB8, 0x80,0x28,0x04,0x68,0x6C,0x01,0x00,0xB0,0x95,0xBA,0x00,0xB0,0xD6,0xBA,0x00,0xB0, 0x95,0xBA,0x00,0xB0,0xF9,0x00,0x00,0xB0,0x17,0xBB,0x26,0x05,0x00,0xB0,0x3A,0x01, 0x00,0xB0,0x68,0xBB,0x00,0xB0,0xB9,0xBB,0x00,0xB0,0xFA,0xBB,0x00,0xB0,0x3B,0xBC, 0x00,0xB0,0x7C,0xBC,0x00,0xB0,0xCD,0xBC,0x00,0xB0,0x0E,0xBD,0x00,0xB0,0x6F,0xBD, 0x00,0xB0,0xC0,0xBD,0x00,0xB0,0x21,0xBE,0x00,0xB0,0x72,0xBE,0x00,0xB0,0xC3,0xBE, 0x00,0xB0,0x24,0xBF,0x00,0xB0,0x95,0xBF,0x00,0x91,0x5B,0x01,0x02,0x29,0x00,0xB0, 0xE6,0xBF,0x01,0x00,0x00,0xA1,0xD5,0x03,0x4B,0x01,0x54,0x73,0x00,0xA2,0xD2,0x13, 0x49,0x01,0x54,0x41,0x85,0x29,0x00,0xC5,0xCE,0xAE,0x57,0x29,0x00,0xC0,0x5F,0x66, 0x37,0x22,0x00,0xC0,0x3C,0x68,0x00,0xC0,0x71,0x67,0x00,0xA1,0xD5,0x03,0x4D,0x01, 0x60,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x60,0xA2,0x85,0x29,0xE0,0xC1,0x1E,0x6D, 0xC0,0xC3,0x17,0xC0,0x00,0xA1,0xD5,0x03,0x4C,0x09,0x5E,0xAA,0x00,0xA2,0x12,0x02, 0x4C,0x09,0x5E,0xAA,0x01,0x2F,0x00,0xB0,0x0A,0x36,0x85,0x29,0x05,0x68,0x00,0xB0, 0x3B,0x36,0x00,0xF0,0x6C,0x36,0x57,0x29,0x05,0x68,0x00,0xB0,0x4D,0x31,0xE0,0xF6, 0x2E,0x38,0x00,0xB0,0x76,0x37,0xE0,0xF6,0x2E,0x38,0x00,0xA1,0xD5,0x03,0x4D,0x01, 0xEE,0xBC,0x00,0xA2,0x92,0x12,0x4D,0x01,0x6E,0xBD,0x85,0x29,0x00,0xC0,0x42,0x77, 0x57,0x29,0x00,0xC0,0x71,0x78,0x1F,0x32,0x26,0x22,0x00,0xC0,0x01,0x7A,0x37,0x22, 0x00,0xC0,0x73,0x7B,0x60,0xC4,0xFF,0x7C,0x2F,0x01,0x01,0x00,0x02,0x0D,0xBE,0xC9, 0x00,0xA1,0xD5,0x03,0x4D,0x05,0x62,0xAA,0x00,0xA2,0x12,0x02,0x4D,0x09,0x62,0xAA, 0x02,0x2F,0x09,0x68,0x01,0x2F,0x03,0x68,0x00,0xB0,0xAD,0xC0,0x00,0xB0,0xDE,0xC0, 0x60,0xF4,0xA7,0x37,0x01,0x2F,0x00,0xB0,0x0F,0xC1,0x00,0xB0,0x40,0xC1,0x60,0xF4, 0xA7,0x37,0x8C,0x27,0x48,0x01,0x02,0x60,0x2F,0x01,0x01,0x00,0x8C,0x27,0x58,0x01, 0x02,0x60,0x59,0x01,0x01,0x00,0x02,0x2B,0x03,0x00,0x08,0x68,0x02,0x37,0x39,0x30, 0x3A,0x20,0x03,0x68,0x3B,0x01,0x02,0x60,0x38,0x01,0x00,0x91,0xCE,0x00,0x01,0x00, 0x00,0xA1,0xD5,0x03,0x49,0x09,0xEE,0xAC,0x00,0xA2,0x12,0x22,0x49,0x09,0x2E,0xAD, 0x01,0x2F,0x00,0xB0,0x18,0x3F,0x85,0x29,0x05,0x68,0x00,0xB0,0x49,0x3F,0x00,0xF0, 0x71,0xC1,0x00,0xB0,0x6A,0x40,0x00,0xF0,0x71,0xC1,0x02,0x0D,0xB9,0xC9,0x06,0x6A, 0x00,0xD0,0x61,0xC2,0x00,0xD0,0x92,0xC2,0x00,0xD0,0xC3,0xC2,0x00,0xD0,0x04,0xC3, 0x00,0xD0,0x35,0xC3,0x00,0xD0,0x66,0xC3,0x02,0x27,0x40,0xEC,0xED,0x05,0x00,0xB0, 0x60,0x06,0x45,0x27,0x71,0x03,0x8C,0x27,0x03,0x00,0x59,0x01,0x58,0x01,0x01,0x00, 0x2C,0x05,0x88,0x28,0x00,0xB0,0x97,0xC3,0x00,0xB0,0x56,0x00,0x00,0x91,0x98,0x07, 0x02,0x0D,0x99,0xC9,0x01,0x00,0x02,0x29,0x71,0x01,0x0D,0x01,0x01,0x00,0x02,0x39, 0x00,0x29,0x75,0x01,0x0D,0x01,0x01,0x00,0x04,0x0D,0xC9,0x01,0x6C,0x99,0x00,0x91, 0xC0,0x00,0x00,0xB0,0xD8,0xC3,0x77,0x10,0x81,0x28,0x00,0xB0,0x09,0xC4,0x00,0xB0, 0xB8,0x00,0x02,0x0D,0x90,0xC9,0x00,0xB0,0x4A,0xC4,0x01,0x0D,0x00,0x61,0x03,0x2F, 0x79,0x01,0x2C,0x05,0x00,0xB0,0xB8,0x00,0x71,0x10,0x00,0xB0,0x8B,0xC4,0x26,0x05, 0x00,0xB0,0xCC,0xC4,0x03,0x2F,0x7B,0x01,0x26,0x05,0x00,0xB0,0x0D,0xC5,0x03,0x2F, 0x7B,0x01,0x26,0x05,0x71,0x01,0x01,0x00,0x02,0x0D,0xAA,0xC9,0x26,0x05,0x00,0xB0, 0x4E,0xC5,0x0D,0x10,0x00,0xB0,0x8F,0xC5,0x81,0x28,0x02,0x2D,0x07,0x00,0x81,0x2D, 0x07,0x00,0x03,0x00,0x0D,0x01,0x7D,0x01,0x01,0x00,0x0D,0x10,0x00,0xB0,0xD0,0xC5, 0x00,0xB0,0x11,0xC6,0x2C,0x05,0x00,0xB0,0x52,0xC6,0x04,0x0D,0x91,0xC9,0x90,0xCB, 0x2C,0x05,0x00,0xB0,0x52,0xC6,0x2C,0x05,0x0D,0x10,0x00,0xB0,0xB3,0xC6,0x26,0x05, 0x3A,0x20,0x00,0xD0,0x04,0xC7,0x00,0xB0,0x45,0xC7,0x0D,0x10,0x00,0xB0,0x96,0xC7, 0x0D,0x10,0x00,0xB0,0x96,0xC7,0x04,0x0D,0x94,0xC9,0x90,0xCB,0x2C,0x05,0x00,0xB0, 0x96,0xC7,0x04,0x0D,0x94,0xC9,0x90,0xCB,0x03,0x2F,0x85,0x01,0x2C,0x05,0x00,0xB0, 0x96,0xC7,0x3B,0x22,0x00,0xB0,0xE7,0xC7,0x39,0x25,0x5A,0x0A,0x00,0xB0,0x38,0xC8, 0x00,0xB0,0x89,0xC8,0x04,0x0D,0x99,0xC9,0x8A,0xCA,0x00,0xB0,0xEA,0xC8,0x1D,0x22, 0x26,0x04,0x00,0xB0,0x4B,0xC9,0x00,0xB0,0xC3,0xBE,0x00,0xB0,0xBC,0xC9,0x2C,0x05, 0x00,0xB0,0x17,0xBB,0x2C,0x05,0x00,0xB0,0x2D,0xCA,0x03,0x2F,0x8E,0x01,0x2C,0x05, 0x00,0xB0,0x2D,0xCA,0x2C,0x05,0x81,0x28,0x00,0xB0,0x8E,0xCA,0x00,0xB0,0xDF,0xCA, 0x2C,0x05,0x00,0xB0,0x40,0xCB,0x91,0x01,0x01,0x00,0x2C,0x05,0x00,0xB0,0xB1,0xCB, 0x04,0x0D,0x99,0xC9,0xB9,0xC9,0x2C,0x24,0x02,0x0D,0x99,0xC9,0x2C,0x05,0x00,0xB0, 0x12,0xCC,0x04,0x0D,0x8C,0xCA,0xB9,0xC9,0x2C,0x24,0x02,0x0D,0x8C,0xCA,0x2C,0x05, 0x00,0xB0,0x63,0xCC,0x00,0xB0,0x68,0xBB,0x00,0xB0,0xB4,0xCC,0x00,0xB0,0x05,0xCD, 0x00,0xB0,0xF9,0x00,0x00,0xB0,0x56,0xCD,0x6F,0x05,0x00,0x91,0x4F,0x02,0x01,0x00, 0x02,0x0D,0x99,0xC9,0x2C,0x05,0x00,0xB0,0x87,0xCD,0x77,0x10,0x00,0xB0,0xB8,0x00, 0x71,0x10,0x00,0xB0,0xB8,0xCD,0x26,0x05,0x00,0xB0,0xF9,0xCD,0x26,0x05,0x00,0xB0, 0xF9,0xCD,0x00,0xB0,0x3A,0xCE,0x0D,0x10,0x00,0xB0,0x7B,0xCE,0x02,0x0D,0x8A,0xCA, 0x0D,0x10,0x00,0xB0,0xBC,0xCE,0x00,0xB0,0x11,0xC6,0x02,0x0D,0x90,0xC9,0x2C,0x05, 0x00,0xB0,0x4A,0xC4,0x2C,0x05,0x00,0xB0,0xFD,0xCE,0x04,0x0D,0x91,0xC9,0x90,0xCB, 0x2C,0x05,0x00,0xB0,0xFD,0xCE,0x01,0x0D,0x00,0x61,0x00,0xB0,0xB8,0x00,0x2C,0x05, 0x0D,0x10,0x00,0xB0,0x4E,0xCF,0x26,0x05,0x3A,0x20,0x00,0xD0,0x04,0xC7,0x00,0xB0, 0x3A,0x01,0x2C,0x05,0x0D,0x10,0x00,0xB0,0x9F,0xCF,0x04,0x0D,0x94,0xC9,0x90,0xCB, 0x2C,0x05,0x00,0xB0,0xF0,0xCF,0x04,0x0D,0x94,0xC9,0x90,0xCB,0x2C,0x05,0x00,0xB0, 0xF0,0xCF,0x0D,0x10,0x00,0xB0,0x96,0xC7,0x00,0xB0,0x31,0xD0,0x04,0x0D,0xA6,0xC3, 0x8A,0xCA,0x00,0xB0,0x82,0xD0,0x03,0x0D,0xCB,0x6F,0x00,0x90,0x00,0xB0,0x68,0xBB, 0x00,0xB0,0xD3,0xD0,0x03,0x0D,0xCB,0x65,0x00,0x90,0x00,0xB0,0xF9,0x00,0x00,0xB0, 0xBC,0xC9,0x2C,0x05,0x00,0xB0,0x34,0xD1,0x2C,0x05,0x00,0xB0,0x85,0xD1,0x2C,0x05, 0x00,0xB0,0xDF,0xCA,0x2C,0x05,0x00,0xB0,0x40,0xCB,0x91,0x01,0x01,0x00,0x2C,0x05, 0x00,0xB0,0xB1,0xCB,0x02,0x0D,0x9A,0xC9,0x2C,0x05,0x00,0xB0,0xF6,0xD1,0x57,0x29, 0x72,0x01,0x88,0x28,0x00,0xB0,0x97,0xC3,0x00,0xB0,0x37,0xD2,0x02,0x29,0x71,0x01, 0x00,0xB0,0x68,0xD2,0x02,0x0D,0xA6,0xC3,0x77,0x10,0x08,0x29,0x00,0xB0,0x99,0xD2, 0x00,0xB0,0xEA,0xD2,0x02,0x0D,0x90,0xC9,0x00,0xB0,0x4A,0xC4,0x71,0x10,0x00,0xB0, 0x2B,0xD3,0x26,0x05,0x71,0x10,0x00,0xB0,0x0D,0xC5,0x26,0x05,0x00,0xB0,0x6C,0xD3, 0x03,0x0D,0xB5,0xE1,0x00,0xBB,0x00,0xB0,0xAD,0xD3,0x26,0x05,0x00,0xB0,0xEE,0xD3, 0x04,0x0D,0x91,0xC9,0x90,0xCB,0x0D,0x10,0x22,0x22,0x83,0x01,0x00,0xB0,0x2F,0xD4, 0x0D,0x10,0x00,0xB0,0x70,0xD4,0x00,0xB0,0xB1,0xD4,0x22,0x22,0x00,0xB0,0xF2,0xD4, 0x00,0xB0,0x2F,0xD4,0x07,0x0D,0xC9,0x02,0xCB,0x91,0xC9,0x90,0x00,0xB9,0x2C,0x22, 0x04,0x0D,0x91,0xC9,0x90,0xCB,0x82,0x0A,0x2C,0x05,0x00,0xB0,0xF2,0xD4,0x2C,0x05, 0x72,0x10,0x00,0xB0,0x53,0xD5,0x26,0x05,0x00,0xB0,0x45,0xC7,0x0D,0x10,0x22,0x22, 0x00,0xB0,0xA4,0xD5,0x00,0xB0,0x05,0xD6,0x07,0x0D,0xC9,0x02,0xCB,0x94,0xC9,0x90, 0x00,0xB9,0x22,0x24,0x04,0x0D,0x94,0xC9,0x90,0xCB,0x22,0x05,0x00,0xB0,0xA4,0xD5, 0x06,0x0D,0x6F,0x02,0x90,0xCB,0xB9,0xC9,0x22,0x24,0x03,0x0D,0xCB,0x6F,0x00,0x90, 0x22,0x05,0x00,0xB0,0x46,0xD6,0x0D,0x10,0x00,0xB0,0x97,0xD6,0x00,0xB0,0xD8,0xD6, 0x00,0xB0,0x29,0xD7,0x00,0xB0,0x7A,0xD7,0x1D,0x32,0x20,0x22,0x26,0x04,0x00,0xB0, 0xCB,0xD7,0x00,0xB0,0x2C,0xD8,0x00,0xB0,0x7D,0xD8,0x05,0x0D,0xC9,0x01,0xC9,0x9B, 0x00,0xB9,0x22,0x24,0x02,0x0D,0x9B,0xC9,0x22,0x05,0x00,0xB0,0xDE,0xD8,0x00,0xB0, 0x2D,0xCA,0x05,0x0D,0xC9,0x01,0xC9,0xAA,0x00,0xB9,0x22,0x24,0x02,0x0D,0xAA,0xC9, 0x22,0x05,0x00,0xB0,0x3F,0xD9,0x05,0x0D,0xCA,0x01,0xC9,0x8A,0x00,0xB9,0x2C,0x24, 0x02,0x0D,0x8A,0xCA,0x2C,0x05,0x00,0xB0,0xA0,0xD9,0x05,0x0D,0xC9,0x61,0xC9,0xAA, 0x00,0x99,0x2C,0x05,0x00,0xB0,0xF1,0xD9,0x05,0x0D,0xC9,0x61,0xC9,0xAA,0x00,0x9A, 0x2C,0x05,0x00,0xB0,0x52,0xDA,0x07,0x0D,0xC9,0x61,0xCA,0xAA,0xC9,0x8A,0x00,0xB9, 0x22,0x24,0x05,0x0D,0xC9,0x61,0xCA,0xAA,0x00,0x8A,0x22,0x05,0x00,0xB0,0xC3,0xDA, 0x00,0xA1,0xD5,0x03,0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x62,0xA2, 0x02,0x2B,0x81,0x29,0x32,0x26,0x06,0x00,0x03,0x00,0x09,0x68,0x02,0x2C,0x03,0x68, 0x19,0x01,0x05,0x60,0x32,0x25,0x03,0x68,0xC0,0xC3,0x22,0x6E,0x85,0x29,0x00,0xC0, 0x16,0x6A,0x22,0x32,0x33,0x32,0x34,0x22,0x00,0xC0,0x46,0x6B,0x0E,0x22,0x20,0xC3, 0x1E,0x6D,0xA0,0xC5,0x22,0x6E,0x2C,0x05,0x00,0xB0,0x56,0xCD,0x02,0x29,0x0D,0x01, 0x2C,0x05,0x00,0x29,0x00,0xB0,0x63,0xCC,0x00,0xB0,0x34,0xDB,0x02,0x29,0x71,0x01, 0x0D,0x01,0x01,0x00,0x02,0x39,0x00,0x29,0x75,0x01,0x0D,0x01,0x01,0x00,0x77,0x10, 0x9B,0x12,0x00,0xB0,0x75,0xDB,0x77,0x10,0x00,0xB0,0x75,0xDB,0x02,0x0D,0x90,0xC9, 0x2C,0x05,0x00,0xB0,0x95,0xBA,0x02,0x0D,0x3A,0x61,0x2C,0x05,0x00,0xB0,0x75,0xDB, 0x71,0x10,0x00,0xB0,0xB6,0xDB,0x3B,0x22,0x05,0x68,0x20,0xEE,0xD3,0x19,0x00,0xB0, 0x56,0xCD,0x00,0xB0,0xF7,0xDB,0x00,0x91,0xDB,0x09,0x01,0x00,0x71,0x01,0x01,0x00, 0x01,0x0D,0x00,0x65,0x26,0x05,0x00,0xB0,0x38,0xDC,0x0D,0x10,0x00,0xB0,0x79,0xDC, 0x0D,0x10,0x00,0xB0,0xBA,0xDC,0x02,0x0D,0x89,0xCA,0x00,0xB0,0xFB,0xDC,0x02,0x0D, 0x3A,0x61,0x2C,0x05,0x22,0x22,0x04,0x68,0x7D,0x0A,0x00,0xB0,0x3C,0xDD,0x00,0xB0, 0x75,0xDB,0x03,0x0D,0xCB,0x61,0x00,0x90,0x22,0x24,0x03,0x00,0x22,0x04,0x00,0xB0, 0x3C,0xDD,0x95,0x12,0x01,0x0D,0x00,0x65,0x00,0xB0,0xAD,0xDD,0x26,0x05,0x3A,0x20, 0x00,0xD0,0x04,0xC7,0x07,0x39,0x00,0x29,0x5A,0x0A,0x00,0xB0,0x0E,0xDE,0x0D,0x10, 0x22,0x22,0x00,0xB0,0x46,0xD6,0x00,0xB0,0x7B,0x01,0x02,0x0D,0x94,0xC9,0x22,0x24, 0x03,0x00,0x22,0x04,0x00,0xB0,0x4F,0xDE,0x01,0x0D,0x00,0x6F,0x22,0x24,0x03,0x00, 0x22,0x04,0x00,0xB0,0x4F,0xDE,0x0D,0x10,0x00,0xB0,0x05,0xD6,0x04,0x0D,0x89,0xCA, 0x90,0xCB,0x07,0x29,0x64,0x0A,0x00,0x29,0x04,0x68,0x64,0x0A,0x00,0xB0,0xFB,0xDC, 0x00,0xB0,0x90,0xDE,0x04,0x0D,0x8C,0xCA,0x89,0xCA,0x00,0xB0,0xD1,0xDE,0x03,0x0D, 0xCB,0x6F,0x00,0x90,0x00,0xB0,0x22,0xDF,0x02,0x39,0x07,0x29,0x9C,0x01,0x3B,0x22, 0x00,0xB0,0x73,0xDF,0x00,0xB0,0xD4,0xDF,0x00,0xB0,0xD4,0xDF,0x03,0x0D,0xCB,0x65, 0x00,0x90,0x00,0xB0,0x3A,0xCE,0x00,0xB0,0x35,0xE0,0x01,0x0D,0x00,0x65,0x22,0x24, 0x03,0x00,0x22,0x04,0x00,0xB0,0x96,0xE0,0x02,0x0D,0xAA,0xC9,0x22,0x24,0x03,0x00, 0x22,0x04,0x00,0xB0,0xE7,0xE0,0x04,0x0D,0x89,0xCA,0xB9,0xC9,0x2C,0x22,0x02,0x0D, 0x89,0xCA,0x78,0x0A,0x2C,0x05,0x00,0xB0,0x38,0xE1,0x2C,0x05,0x00,0xB0,0xB1,0xCB, 0x2C,0x05,0x00,0xB0,0x73,0xDF,0x91,0x01,0x01,0x00,0x03,0x0D,0x99,0xC9,0x00,0x6C, 0x00,0x91,0xC0,0x00,0x00,0xB0,0x89,0xE1,0x00,0xB0,0x00,0x00,0x8A,0x29,0x2E,0x01, 0x00,0x91,0x47,0x00,0x01,0x0D,0x00,0x72,0x01,0x00,0x2C,0x05,0x88,0x28,0x00,0xB0, 0xCA,0xE1,0x00,0xB0,0x56,0x00,0x00,0x91,0x85,0x0A,0x02,0x0D,0x99,0xC9,0x01,0x00, 0x02,0x29,0x71,0x01,0x00,0xB0,0xCA,0xE1,0x02,0x39,0x00,0x29,0x75,0x01,0x00,0xB0, 0xCA,0xE1,0x02,0x0D,0xA6,0xC3,0x77,0x10,0x00,0xB0,0xFB,0xE1,0x71,0x10,0x00,0xB0, 0x3C,0xE2,0x26,0x05,0x00,0xB0,0xF9,0xCD,0x26,0x05,0x00,0xB0,0xF9,0xCD,0x26,0x05, 0x00,0xB0,0xEE,0xD3,0x0D,0x10,0x00,0xB0,0x05,0xD6,0x0D,0x10,0x00,0xB0,0x7D,0xE2, 0x00,0xB0,0xBE,0xE2,0x02,0x0D,0x90,0xC9,0x2C,0x05,0x00,0xB0,0xCA,0xE1,0x2C,0x05, 0x00,0xB0,0xFF,0xE2,0x04,0x0D,0x91,0xC9,0x90,0xCB,0x2C,0x05,0x00,0xB0,0xFF,0xE2, 0x04,0x0D,0x91,0xC9,0x90,0xCB,0x00,0xB0,0xFF,0xE2,0x0D,0x10,0x2C,0x05,0x00,0xB0, 0x50,0xE3,0x26,0x05,0x3A,0x20,0x00,0xD0,0x04,0xC7,0x00,0xB0,0x3A,0x01,0x0D,0x10, 0x2C,0x05,0x00,0xB0,0x9F,0xCF,0x04,0x0D,0x94,0xC9,0x90,0xCB,0x2C,0x05,0x00,0xB0, 0x9F,0xCF,0x0D,0x10,0x00,0xB0,0x96,0xC7,0x00,0xB0,0xA1,0xE3,0x00,0xB0,0xE2,0xE3, 0x04,0x0D,0x99,0xC9,0x8A,0xCA,0x00,0xB0,0x43,0xE4,0x1D,0x32,0x20,0x22,0x26,0x04, 0x00,0xB0,0x94,0xE4,0x00,0xB0,0x05,0xE5,0x00,0xB0,0x7D,0xD8,0x2C,0x05,0x00,0xB0, 0x56,0xE5,0x2C,0x05,0x00,0xB0,0xA7,0xE5,0x04,0x0D,0x94,0xC9,0x90,0xCB,0x2C,0x05, 0x00,0xB0,0x08,0xE6,0x2C,0x05,0x00,0xB0,0x40,0xCB,0x91,0x01,0x01,0x00,0x2C,0x05, 0x00,0xB0,0x49,0xE6,0x6F,0x05,0x00,0x91,0x4F,0x02,0x01,0x00,0x77,0x10,0x00,0xB0, 0xB8,0x00,0x71,0x10,0x00,0xB0,0xF9,0x00,0x26,0x05,0x37,0x32,0x3B,0x22,0x00,0xB0, 0xF9,0xCD,0x00,0xB0,0xAA,0xE6,0x26,0x05,0x00,0xB0,0x3A,0x01,0x0D,0x10,0x00,0xB0, 0xB9,0xBB,0x02,0x0D,0x8A,0xCA,0x0D,0x10,0x00,0xB0,0xBC,0xCE,0x17,0x05,0x00,0xB0, 0x11,0xC6,0x02,0x0D,0x90,0xC9,0x00,0xB0,0x4A,0xC4,0x2C,0x05,0x00,0xB0,0xFD,0xCE, 0x04,0x0D,0x91,0xC9,0x90,0xCB,0x2C,0x05,0x00,0xB0,0xFD,0xCE,0x01,0x0D,0x00,0x61, 0x00,0xB0,0xB8,0x00,0x0D,0x10,0x2C,0x05,0x00,0xB0,0xCD,0xBC,0x02,0x0D,0x69,0x65, 0x26,0x05,0x00,0xB0,0xDB,0xE6,0x0D,0x10,0x2C,0x05,0x00,0xB0,0x9F,0xCF,0x04,0x0D, 0x94,0xC9,0x90,0xCB,0x2C,0x05,0x00,0xB0,0x9F,0xCF,0x0D,0x10,0x00,0xB0,0x9F,0xCF, 0x03,0x0D,0x99,0xC9,0x00,0x75,0x00,0xB0,0x2C,0xE7,0x04,0x0D,0xA6,0xC3,0x8A,0xCA, 0x00,0xB0,0x82,0xD0,0x04,0x0D,0x8C,0xCA,0x8A,0xCA,0x00,0xB0,0x7D,0xE7,0x04,0x0D, 0x94,0xC9,0xAA,0xC9,0x00,0xB0,0x7D,0xD8,0x03,0x0D,0xCB,0x65,0x00,0x90,0x00,0xB0, 0xDE,0xE7,0x03,0x0D,0xC9,0x6F,0x00,0xAA,0x00,0xB0,0x24,0xBF,0x04,0x0D,0x9C,0xC9, 0x90,0xCB,0x2C,0x05,0x00,0xB0,0xB3,0xC6,0x2C,0x05,0x00,0xB0,0x2F,0xE8,0x2C,0x05, 0x00,0xB0,0xDF,0xCA,0x2C,0x05,0x00,0xB0,0x90,0xE8,0x91,0x01,0x01,0x00,0x2C,0x05, 0x00,0xB0,0xB1,0xCB,0x2C,0x05,0x00,0xB0,0x01,0xE9,0x02,0x29,0x71,0x01,0x00,0xB0, 0x01,0xE9,0x00,0xB0,0xD6,0xBA,0x71,0x10,0x00,0xB0,0xF9,0x00,0x26,0x05,0x00,0xB0, 0xAA,0xE6,0x26,0x05,0x00,0xB0,0xAA,0xE6,0x26,0x05,0x00,0xB0,0x3A,0x01,0x00,0xB0, 0x97,0xD6,0x00,0xB0,0xB9,0xBB,0x00,0xB0,0x42,0xE9,0x00,0xB0,0x95,0xBA,0x00,0xB0, 0xD6,0xBA,0x2C,0x05,0x00,0xB0,0xD6,0xBA,0x00,0xB0,0xD6,0xBA,0x2C,0x05,0x00,0xB0, 0xB9,0xBB,0x26,0x05,0x00,0xB0,0x83,0xE9,0x00,0xB0,0x7B,0x01,0x2C,0x05,0x00,0xB0, 0x7B,0x01,0x2C,0x05,0x00,0xB0,0xC4,0xE9,0x00,0xB0,0x7B,0x01,0x00,0xB0,0xBC,0x01, 0x00,0xB0,0x15,0xEA,0x00,0xB0,0x68,0xBB,0x00,0xB0,0x21,0xBE,0x00,0xB0,0xF9,0x00, 0x00,0xB0,0x35,0xE0,0x2C,0x05,0x00,0xB0,0x96,0xE0,0x2C,0x05,0x00,0xB0,0x66,0xEA, 0x2E,0x22,0x04,0x68,0x5F,0x0A,0x00,0xB0,0xB7,0xEA,0x00,0xB0,0xE8,0xEA,0x02,0x0D, 0x90,0xC9,0x00,0xB0,0xD0,0xC5,0x00,0xB0,0x19,0xEB,0x02,0x0D,0x99,0xC9,0x2E,0x22, 0x04,0x68,0x5F,0x0A,0x00,0xB0,0xB7,0xEA,0x00,0xB0,0x5A,0xEB,0x00,0xB0,0x8B,0xEB, 0x00,0xB0,0xBC,0xEB,0x00,0xB0,0xFD,0xEB,0x3B,0x22,0x20,0xEE,0x2E,0xEC,0x00,0xB0, 0x5F,0xEC,0x3B,0x22,0x20,0xEE,0x2E,0xEC,0x00,0xB0,0x5F,0xEC,0x03,0x0D,0x99,0xC9, 0x00,0x6C,0x00,0xB0,0xD8,0xC3,0x00,0xB0,0x90,0xEC,0x03,0x0D,0xC9,0x69,0x00,0x99, 0x00,0xB0,0xD1,0xEC,0x26,0x05,0x00,0xB0,0x32,0xED,0x04,0x0D,0x8A,0xCA,0x99,0xC9, 0x00,0xB0,0x73,0xED,0x00,0xB0,0xD4,0xED,0x00,0xB0,0x15,0xEE,0x00,0xB0,0x86,0xEE, 0x26,0x05,0x00,0xB0,0xE7,0xEE,0x26,0x05,0x00,0xB0,0x48,0xEF,0x04,0x0D,0x9B,0xC9, 0xAA,0xC9,0x26,0x05,0x00,0xB0,0xB9,0xEF,0x26,0x05,0x00,0xB0,0x0A,0xF0,0x04,0x0D, 0x8A,0xCA,0xAA,0xC9,0x26,0x05,0x00,0xB0,0x7B,0xF0,0x26,0x05,0x00,0xB0,0xEC,0xF0, 0x26,0x05,0x00,0xB0,0x4D,0xF1,0x00,0xB0,0xAE,0xF1,0x00,0xB0,0x89,0xC8,0x00,0xB0, 0xF9,0x00,0x00,0xB0,0x9F,0xCF,0x00,0xB0,0xB3,0xC6,0x00,0xB0,0xFF,0xF1,0x00,0xB0, 0x50,0xF2,0x00,0xB0,0x91,0xF2,0x00,0xA1,0x19,0x03,0xAD,0x01,0xEE,0xBC,0x00,0xA2, 0x92,0x12,0xAD,0x01,0x6E,0xBD,0xC0,0xC3,0xE2,0xF2,0x00,0xA1,0x19,0x03,0x40,0x09, 0x76,0x5A,0x00,0xA2,0x12,0x02,0x40,0x09,0x62,0x5A,0x06,0x6A,0x10,0xDF,0xC7,0x04, 0x10,0xDF,0xF8,0x04,0x10,0xDF,0x29,0x05,0x10,0xDF,0x5A,0x05,0x10,0xDF,0x8B,0x05, 0x10,0xDF,0xBC,0x05,0x02,0x27,0xE0,0xEC,0xED,0x05,0x00,0xB0,0xFF,0x0D,0x40,0xF6, 0xDB,0x10,0x0D,0x30,0x6D,0x20,0x02,0x68,0x05,0x60,0x00,0xB0,0xEA,0x0B,0x00,0xF0, 0xB2,0x06,0x01,0x00,0x00,0xA1,0xD5,0x03,0x53,0x01,0xF6,0xDD,0x00,0xA2,0x92,0x12, 0x53,0x01,0xF6,0xDD,0x00,0xC0,0x01,0x7A,0x00,0xB0,0xB8,0x00,0x00,0xB0,0x38,0xF5, 0x02,0x0D,0xA8,0xC9,0x00,0xB0,0x79,0xF5,0x00,0xB0,0xAD,0xD3,0x00,0xB0,0x79,0xDC, 0x00,0xB0,0xFA,0xBB,0x00,0xB0,0x56,0x00,0x6D,0x12,0x00,0xB0,0x3A,0x01,0x04,0x0D, 0xA8,0xC9,0x90,0xCB,0x6E,0x12,0x00,0xB0,0xBA,0xF5,0x70,0x12,0x00,0xB0,0xBC,0x01, 0x6C,0x12,0x00,0xB0,0xF9,0x00,0x6F,0x12,0x00,0xB0,0xFB,0xF5,0x23,0x12,0x00,0xB0, 0x52,0xC6,0x04,0x0D,0x91,0xC9,0xA8,0xC9,0x00,0xB0,0x48,0xEF,0x00,0xB0,0x4B,0xC9, 0x03,0x0D,0xC9,0x61,0x00,0xA8,0x00,0xB0,0x4B,0xC9,0x00,0xB0,0x0E,0xBD,0x00,0xB0, 0xB9,0xEF,0x04,0x0D,0x99,0xC9,0xA8,0xC9,0x00,0xB0,0xB9,0xEF,0x00,0xB0,0x6F,0xBD, 0x00,0xB0,0x4C,0xF6,0x03,0x0D,0xA8,0xC9,0x00,0x75,0x00,0xB0,0x4C,0xF6,0x00,0xB0, 0xBC,0xC9,0x04,0x0D,0x94,0xC9,0xA8,0xC9,0x00,0xB0,0xBC,0xC9,0x00,0xB0,0x9D,0xF6, 0x03,0x0D,0xC9,0x75,0x00,0xA8,0x00,0xB0,0x9D,0xF6,0x00,0xA1,0x19,0x03,0x4B,0x01, 0x60,0xAA,0x00,0xA2,0x12,0x22,0x4B,0x09,0x60,0xAA,0x00,0xB0,0x0B,0x0C,0x10,0xF4, 0x3C,0x0C,0x00,0xA1,0xD5,0x03,0x49,0x09,0xEE,0xAC,0x00,0xA2,0x12,0x22,0x49,0x09, 0x2E,0xAD,0x01,0x2F,0x00,0xB0,0x18,0x3F,0x85,0x29,0x05,0x68,0x00,0xB0,0x49,0x3F, 0xC0,0xF8,0x7A,0x3F,0x00,0xB0,0x6A,0x40,0x60,0xF9,0x9B,0x40,0x6C,0x22,0x04,0x68, 0x28,0x0A,0x00,0xB0,0xB7,0xEA,0x6D,0x22,0x04,0x68,0x28,0x0A,0x00,0xB0,0xB7,0xEA, 0x6E,0x22,0x04,0x68,0x28,0x0A,0x00,0xB0,0xB7,0xEA,0x00,0xB0,0xE8,0xEA,0x00,0xB0, 0x56,0x00,0x00,0xB0,0xFE,0xF6,0x02,0x0D,0x90,0xC9,0x23,0x13,0x00,0xB0,0x4A,0xC4, 0x00,0xB0,0x3C,0xE2,0x71,0x13,0x6F,0x01,0x01,0x00,0x00,0xB0,0xCC,0xC4,0x03,0x0D, 0xCC,0x69,0x00,0xAF,0x00,0xB0,0x4E,0xC5,0x00,0xB0,0xBA,0xDC,0x73,0x13,0x70,0x01, 0x01,0x00,0x00,0xB0,0x11,0xC6,0x75,0x13,0x6F,0x01,0x01,0x00,0x03,0x0D,0xCC,0x75, 0x00,0x86,0x00,0xB0,0xBC,0x01,0x01,0x0D,0x00,0x41,0x00,0xB0,0x2F,0xD4,0x78,0x13, 0x70,0x01,0x01,0x00,0x00,0xB0,0x68,0xBB,0x00,0xB0,0x52,0xC6,0x00,0xB0,0xF9,0x00, 0x00,0xB0,0x3A,0x01,0x00,0xB0,0xFA,0xBB,0x00,0xB0,0x3F,0xF7,0x00,0xB0,0x85,0xD1, 0x00,0xB0,0xA0,0xF7,0x00,0xB0,0x21,0xBE,0x80,0x13,0x70,0x01,0x01,0x00,0x00,0xB0, 0x0E,0xBD,0x82,0x13,0x00,0xB0,0x0E,0xBD,0x1F,0x20,0x01,0x0D,0x00,0x20,0x06,0x6A, 0x00,0xD0,0x5D,0x22,0x00,0xD0,0x8E,0x22,0x00,0xD0,0xBF,0x22,0x00,0xD0,0xF0,0x22, 0x00,0xD0,0x21,0x23,0x00,0xD0,0x62,0x23,0x1F,0x20,0x80,0xED,0x93,0x23,0x00,0x27, 0x00,0xB0,0xB4,0x23,0x01,0x00,0x22,0x22,0x05,0x68,0x02,0x2A,0x02,0x68,0x02,0x60, 0x6C,0x01,0x00,0xB0,0x37,0xD2,0x8B,0x28,0x69,0x0A,0x00,0xB0,0x4A,0xC4,0x57,0x29, 0x3E,0x0A,0x00,0xB0,0xB8,0x00,0x10,0x22,0x43,0x0A,0x00,0xB0,0x19,0xEB,0x0D,0x10, 0x10,0x22,0x43,0x0A,0x00,0xB0,0x19,0xEB,0x10,0x22,0x43,0x0A,0x26,0x05,0x00,0xB0, 0xF9,0xCD,0x00,0xB0,0xF9,0xCD,0x10,0x22,0x43,0x0A,0x00,0xB0,0x7B,0x01,0x10,0x22, 0x43,0x0A,0x22,0x22,0x8A,0x2A,0x73,0x01,0x00,0xB0,0x3B,0xBC,0x00,0xB0,0x01,0xF8, 0x23,0x11,0x00,0xB0,0x01,0xF8,0x3A,0x20,0x00,0xD0,0x04,0xC7,0x00,0xB0,0x52,0xF8, 0x6F,0x12,0x3A,0x20,0x00,0xD0,0x04,0xC7,0x00,0xB0,0x52,0xF8,0x00,0xB0,0xBC,0x01, 0x00,0xB0,0x93,0xF8,0x00,0xB0,0xF4,0xF8,0x00,0xB0,0xC3,0xBE,0x00,0xB0,0x24,0xBF, 0x00,0xB0,0x45,0xF9,0x00,0xB0,0x3A,0xCE,0x00,0xB0,0x68,0xBB,0x00,0xB0,0x7C,0xBC, 0x02,0x0D,0x8F,0xCA,0x10,0x22,0x39,0x0A,0x00,0xB0,0x86,0xF9,0x00,0xB0,0xCD,0xBC, 0x10,0x22,0x50,0x0A,0x00,0xB0,0xBC,0xEB,0x02,0x0D,0x66,0x70,0x00,0xA2,0x12,0x02, 0x4B,0x01,0x54,0x41,0x00,0xC0,0xC0,0x82,0x8C,0x2B,0x51,0x01,0x02,0x60,0x63,0x01, 0x01,0x00,0x02,0x29,0x37,0x01,0x06,0x6C,0x40,0xEC,0x05,0x17,0x80,0xED,0x46,0x17, 0x20,0xEE,0x87,0x17,0x20,0xEE,0xB8,0x17,0x80,0xED,0xF9,0x17,0x80,0xED,0x4A,0x18, 0x00,0xB0,0xC7,0xF9,0x02,0x29,0x15,0x68,0x06,0x6A,0x00,0xD0,0x74,0x20,0x00,0xD0, 0xB5,0x20,0x00,0xD0,0xF6,0x20,0x00,0xD0,0x37,0x21,0x00,0xD0,0x68,0x21,0x00,0xD0, 0xB9,0x21,0x20,0xEE,0xEA,0x21,0x00,0x27,0x03,0x68,0x00,0xB0,0xE8,0xF9,0x07,0x60, 0x00,0xA2,0x23,0x12,0x00,0x00,0x00,0x00,0x00,0xB0,0x2C,0x22,0x01,0x00,0x0E,0x25, 0x02,0x68,0x0B,0x60,0x02,0x2B,0x09,0x68,0x02,0x2C,0x03,0x68,0x33,0x01,0x05,0x60, 0x2F,0x25,0x02,0x68,0x02,0x60,0x0E,0x03,0x5C,0x27,0x01,0x01,0x00,0x91,0x8A,0x02, 0x01,0x00,0x03,0x0D,0xC9,0x69,0x00,0x90,0x00,0xB0,0x09,0xFA,0x04,0x0D,0x8A,0xCA, 0x90,0xC9,0x00,0xB0,0x6A,0xFA,0x00,0xB0,0xBB,0xFA,0x37,0x01,0x01,0x00,0x8A,0x22, 0x30,0x01,0x00,0x91,0xC4,0x02,0x01,0x00,0x8A,0x22,0x2F,0x01,0x00,0x91,0x0F,0x03, 0x01,0x00,0x8A,0x22,0x31,0x01,0x00,0x91,0x99,0x03,0x01,0x00,0x00,0xB0,0xD6,0xBA, 0x00,0xB0,0x19,0xEB,0x26,0x05,0x00,0xB0,0x3A,0x01,0x88,0x28,0x00,0xB0,0x68,0xBB, 0x00,0xB0,0x9F,0xCF,0x00,0xB0,0xBC,0x01,0x00,0xB0,0x0E,0xBD,0x00,0xB0,0x6F,0xBD, 0x00,0xB0,0x21,0xBE,0x00,0xB0,0x10,0xFB,0x00,0xB0,0x0A,0xF0,0x00,0xB0,0x95,0xBF, 0x00,0xB0,0x19,0xEB,0x00,0xB0,0x19,0xEB,0x26,0x05,0x6C,0x11,0x00,0xB0,0x61,0xFB, 0x26,0x05,0x00,0xB0,0x79,0xF5,0x00,0xB0,0x19,0xEB,0x00,0xB0,0xFB,0xE1,0x00,0xB0, 0xA2,0xFB,0x00,0xB0,0x97,0xD6,0x00,0xB0,0x9F,0xCF,0x00,0xB0,0xCD,0xBC,0x00,0xB0, 0xFA,0xBB,0x00,0xB0,0xE3,0xFB,0x00,0xB0,0x24,0xFC,0x00,0xB0,0x7C,0xBC,0x00,0xB0, 0x65,0xFC,0x00,0xB0,0xC6,0xFC,0x00,0xB0,0xBC,0xC9,0x00,0xB0,0x10,0xFB,0x00,0xB0, 0x17,0xFD,0x00,0xB0,0x68,0xFD,0x00,0xB0,0xB9,0xFD,0x00,0xB0,0x0A,0xFE,0x00,0xB0, 0x6B,0xFE,0x00,0xB0,0xBC,0xFE,0x00,0xB0,0x0D,0xFF,0x00,0xB0,0x6E,0xFF,0x00,0xB0, 0xBF,0xFF,0x01,0xB0,0x10,0x00,0x01,0xB0,0x61,0x00,0x01,0xB0,0xB2,0x00,0x00,0xB0, 0x66,0xEA,0x01,0xB0,0x03,0x01,0x01,0x0D,0x00,0x72,0x00,0xA1,0x19,0x03,0x49,0x01, 0x62,0xAA,0x00,0xA2,0x12,0x22,0x49,0x09,0x62,0xAA,0x01,0xB0,0x54,0x01,0x20,0xF3, 0x40,0x0E,0x00,0xA1,0x19,0x03,0xA9,0x01,0x54,0x5A,0x00,0xA2,0x19,0x12,0x09,0x01, 0x54,0x49,0x85,0x29,0x00,0xB0,0xDF,0x43,0x00,0xB0,0x72,0x44,0x00,0xA1,0xD5,0x03, 0x4F,0x09,0x62,0x9B,0x00,0xA2,0x92,0x12,0x4F,0x09,0x62,0x9B,0x01,0x2F,0x00,0xB0, 0x0A,0x36,0x85,0x29,0x05,0x68,0x00,0xB0,0x3B,0x36,0x00,0xF0,0x6C,0x36,0x22,0x22, 0x05,0x68,0x00,0xB0,0x4D,0x31,0xC0,0xF3,0x2E,0x38,0x00,0xB0,0x76,0x37,0xC0,0xF3, 0x2E,0x38,0x1C,0x22,0x00,0xC0,0x8C,0x9E,0x1D,0x22,0x00,0xC0,0xE1,0x9F,0x1E,0x22, 0x00,0xC0,0x80,0xA1,0x1F,0x22,0x00,0xC0,0x25,0xA3,0x20,0x22,0x61,0xC4,0x95,0x01, 0x21,0x22,0x01,0xC5,0x95,0x01,0x60,0xC4,0x03,0xA8,0x00,0xB0,0xA2,0xFB,0x01,0xB0, 0xD1,0x03,0x00,0xB0,0x2F,0xD4,0x00,0xB0,0xF7,0xDB,0x01,0xB0,0x12,0x04,0x01,0xB0, 0x53,0x04,0x01,0xB0,0x94,0x04,0x01,0xB0,0xD5,0x04,0x00,0xB0,0x79,0xF5,0x01,0xB0, 0x16,0x05,0x00,0xB0,0x08,0xE6,0x00,0xB0,0x68,0xBB,0x00,0xB0,0xB9,0xBB,0x01,0xB0, 0x57,0x05,0x01,0xB0,0x98,0x05,0x01,0xB0,0xD9,0x05,0x01,0xB0,0x1A,0x06,0x01,0xB0, 0x5B,0x06,0x00,0xB0,0xFB,0xE1,0x00,0xB0,0xFB,0xE1,0x00,0xB0,0xCD,0xBC,0x00,0xB0, 0xCD,0xBC,0x00,0xB0,0x7C,0xBC,0x00,0xB0,0x7C,0xBC,0x00,0xB0,0xC6,0xFC,0x01,0xB0, 0x9C,0x06,0x00,0xB0,0xB9,0xFD,0x00,0xA1,0x19,0x03,0xA9,0x01,0x54,0x5A,0x00,0xA2, 0x19,0x12,0x09,0x01,0x54,0x49,0x85,0x29,0x00,0xB0,0xDF,0x43,0x00,0xB0,0x72,0x44, 0x00,0xA1,0x15,0x1D,0x4D,0x05,0x9E,0xA2,0x00,0xA2,0x92,0x12,0x4D,0x01,0x5E,0xA2, 0x85,0x29,0xC0,0xC3,0x1E,0x6D,0x00,0xC5,0x2F,0x6F,0x00,0xA1,0xD5,0x03,0x4F,0x09, 0x62,0x9B,0x00,0xA2,0x92,0x12,0x4F,0x09,0x62,0x9B,0x01,0x2F,0x00,0xB0,0x0A,0x36, 0x85,0x29,0x05,0x68,0x00,0xB0,0x3B,0x36,0x00,0xF0,0x6C,0x36,0x22,0x22,0x05,0x68, 0x00,0xB0,0x4D,0x31,0xC0,0xF3,0x2E,0x38,0x00,0xB0,0x76,0x37,0xC0,0xF3,0x2E,0x38, 0x32,0x22,0x05,0x68,0x00,0xB0,0x91,0x06,0x00,0xF0,0xB2,0x06,0x00,0xB0,0xEA,0x0B, 0x00,0xF0,0xB2,0x06,0x00,0xA1,0xD5,0x03,0x4D,0x01,0xEE,0xBC,0x00,0xA2,0x92,0x12, 0x4D,0x01,0x6E,0xBD,0x00,0x29,0x00,0xC0,0xFF,0x7C,0x1F,0x32,0x3D,0x22,0x80,0xC2, 0x01,0x7A,0x37,0x22,0x80,0xC2,0x73,0x7B,0x22,0x22,0x80,0xC2,0x71,0x78,0x31,0x22, 0xA0,0xC0,0xFF,0x7C,0x40,0xC1,0xFF,0x7C,0x1C,0x22,0x00,0xC0,0x8C,0x9E,0x1D,0x22, 0x00,0xC0,0xE1,0x9F,0x1E,0x22,0x00,0xC0,0x80,0xA1,0x1F,0x22,0x00,0xC0,0x25,0xA3, 0x20,0x22,0x00,0xC0,0x8B,0xA4,0x21,0x22,0x00,0xC0,0x3A,0xA6,0x60,0xC4,0x03,0xA8, 0x00,0xA1,0x19,0x03,0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x62,0xA2, 0x01,0xC0,0xED,0x06,0x00,0xA1,0xE3,0x53,0x55,0x01,0xF6,0xDD,0x00,0xA2,0x19,0x12, 0x33,0x25,0xF6,0xDD,0x85,0x29,0xC0,0xC3,0x83,0x75,0x00,0xC5,0x2F,0x6F,0x00,0xA1, 0xE8,0x53,0x53,0x09,0xF6,0xDD,0x00,0xA2,0x32,0x52,0x53,0x29,0xF6,0xDD,0x01,0x2F, 0x01,0xB0,0x1A,0x09,0x85,0x29,0x05,0x68,0x00,0xB0,0x3B,0x36,0x81,0xF2,0x4B,0x09, 0x57,0x29,0x05,0x68,0x00,0xB0,0x4D,0x31,0x01,0xF5,0x4B,0x09,0x00,0xB0,0x76,0x37, 0x01,0xF5,0x4B,0x09,0x6F,0x20,0x01,0xE0,0x50,0x0A,0x21,0x60,0x70,0x20,0x01,0xE0, 0x71,0x0A,0x1D,0x60,0x71,0x20,0x01,0xE0,0x92,0x0A,0x19,0x60,0x72,0x30,0x73,0x20, 0x01,0xE0,0xB3,0x0A,0x14,0x60,0x74,0x20,0x01,0xE0,0xE4,0x0A,0x10,0x60,0x02,0x27, 0x0E,0x68,0x06,0x6C,0x01,0xE0,0x15,0x0B,0x01,0xE0,0x36,0x0B,0x01,0xE0,0x57,0x0B, 0x01,0xE0,0x78,0x0B,0x01,0xE0,0x99,0x0B,0x01,0xE0,0xBA,0x0B,0x01,0x00,0x70,0x22, 0x01,0xD0,0xDB,0x0B,0x2E,0x60,0x75,0x22,0x01,0xD0,0xFC,0x0B,0x2A,0x60,0x71,0x22, 0x01,0xD0,0x1D,0x0C,0x26,0x60,0x72,0x32,0x73,0x22,0x01,0xD0,0x3E,0x0C,0x21,0x60, 0x6F,0x22,0x01,0xD0,0x5F,0x0C,0x1D,0x60,0x3A,0x22,0x01,0xD0,0x80,0x0C,0x19,0x60, 0x74,0x22,0x01,0xD0,0xA1,0x0C,0x15,0x60,0x39,0x32,0x76,0x22,0x01,0xD0,0xC2,0x0C, 0x10,0x60,0x02,0x29,0x0E,0x68,0x06,0x6A,0x01,0xD0,0xE3,0x0C,0x01,0xD0,0x04,0x0D, 0x01,0xD0,0x25,0x0D,0x01,0xD0,0x46,0x0D,0x01,0xD0,0x67,0x0D,0x01,0xD0,0x88,0x0D, 0x01,0x00,0x00,0xA1,0x19,0x03,0x47,0x01,0xDE,0xB9,0x02,0x0D,0x81,0xCA,0x8A,0x29, 0x2E,0x01,0x04,0x60,0x8A,0x37,0x00,0x27,0x77,0x01,0x00,0x91,0x82,0x0F,0x00,0x91, 0xA7,0x0F,0x01,0xB0,0xA9,0x0D,0x02,0x0D,0x81,0xCA,0x8A,0x29,0x01,0x01,0x02,0x60, 0x22,0x01,0x01,0x00,0x02,0x0D,0x81,0xCA,0x2F,0x35,0x30,0x35,0x31,0x25,0x05,0x68, 0x01,0xB0,0xCA,0x0D,0xF0,0xF0,0xB2,0x06,0x8A,0x27,0x05,0x68,0x01,0xB0,0xFB,0x0D, 0xF0,0xF0,0xB2,0x06,0x06,0x6C,0x01,0xE0,0x1C,0x0E,0x01,0xE0,0x3D,0x0E,0x01,0xE0, 0x5E,0x0E,0x01,0xE0,0x7F,0x0E,0x01,0xE0,0xA0,0x0E,0x01,0xE0,0xC1,0x0E,0x6F,0x20, 0x01,0xE0,0xE2,0x0E,0x08,0x29,0x05,0x68,0x01,0xB0,0x03,0x0F,0x40,0xF1,0xB2,0x06, 0x6D,0x22,0x0F,0x0A,0x01,0xB0,0x34,0x0F,0x40,0xF1,0xB2,0x06,0x00,0xA1,0x19,0x03, 0x47,0x01,0xDE,0xB9,0x02,0x0D,0x81,0xCA,0x00,0x91,0xA7,0x0F,0x53,0x35,0x31,0x35, 0x30,0x35,0x59,0x35,0x2F,0x35,0x5B,0x25,0x01,0xB0,0x55,0x0F,0x6E,0x25,0x01,0xB0, 0x96,0x0F,0x28,0x0A,0x01,0xB0,0xA9,0x0D,0x01,0x00,0x8A,0x29,0x38,0x01,0x03,0x60, 0x6E,0x25,0x3B,0x01,0x06,0x6A,0x00,0xD0,0xEF,0x15,0x60,0xDF,0x20,0x16,0x10,0xDF, 0x41,0x16,0x10,0xDF,0x62,0x16,0x61,0xDF,0xD7,0x0F,0xC0,0xDE,0xD4,0x16,0x1C,0x20, 0xE0,0xEC,0xAC,0x18,0x04,0x60,0x02,0x27,0x80,0xED,0xAC,0x18,0x00,0x37,0x86,0x28, 0x00,0xB0,0xCD,0x18,0x57,0x37,0x08,0x27,0x00,0xB0,0xCD,0x18,0x2F,0x20,0x00,0xB0, 0xFE,0x18,0x38,0x20,0x00,0xB0,0x1F,0x19,0x00,0xB0,0x40,0x19,0x02,0x29,0x37,0x01, 0x6F,0x25,0x01,0xE0,0xF8,0x0F,0x10,0x60,0x02,0x2C,0x0E,0x68,0x06,0x6C,0x00,0xE0, 0xE7,0x1A,0x00,0xE0,0x08,0x1B,0x00,0xE0,0x29,0x1B,0x00,0xE0,0x4A,0x1B,0x00,0xE0, 0x7B,0x1B,0x00,0xE0,0xAC,0x1B,0x6D,0x20,0x00,0xB0,0xCD,0x18,0x00,0xB0,0x8B,0x18, 0x8A,0x29,0x38,0x01,0x06,0x6A,0x00,0xD0,0xEF,0x15,0x60,0xDF,0x20,0x16,0x10,0xDF, 0x41,0x16,0x10,0xDF,0x62,0x16,0x60,0xDF,0x93,0x16,0xC0,0xDE,0xD4,0x16,0x2F,0x20, 0x00,0xB0,0xFE,0x18,0x00,0xB0,0x40,0x19,0x01,0xB0,0x19,0x10,0x01,0xB0,0x19,0x10, 0x02,0x2B,0x6E,0x0A,0x02,0x60,0x55,0x0A,0x01,0xB0,0x4A,0x10,0x51,0xB5,0x4A,0x10, 0x38,0x22,0xC0,0xEE,0xAC,0x18,0x05,0x60,0x02,0x29,0x64,0x0A,0x02,0x60,0x55,0x0A, 0x00,0xB0,0x45,0xF9,0x00,0xB0,0x45,0xF9,0x39,0x24,0x5F,0x0A,0x02,0x60,0x55,0x0A, 0x00,0xB0,0x3C,0xE2,0x00,0xB0,0x3C,0xE2,0x77,0x35,0x3B,0x25,0x05,0x68,0x02,0x2B, 0x02,0x68,0x78,0x0A,0x10,0x60,0x6D,0x25,0x02,0x2B,0x08,0x68,0x1F,0x24,0x04,0x68, 0x6E,0x0A,0x26,0x05,0x02,0x60,0x76,0x01,0x06,0x60,0x02,0x2B,0x39,0x01,0x03,0x60, 0x4B,0x0A,0x26,0x05,0x01,0xB0,0x94,0x04,0x06,0x6A,0x00,0xD0,0x74,0x20,0x00,0xD0, 0xB5,0x20,0x00,0xD0,0xF6,0x20,0x00,0xD0,0x37,0x21,0x00,0xD0,0x68,0x21,0x00,0xD0, 0xB9,0x21,0x01,0xB0,0x8B,0x10,0x02,0x29,0x6E,0x0A,0x02,0x60,0x55,0x0A,0x8B,0x28, 0x01,0xB0,0xCC,0x10,0x00,0xB0,0x68,0xBB,0x01,0x00,0x8B,0x28,0x01,0xB0,0x1D,0x11, 0x6C,0x24,0x8A,0x2A,0x01,0xB0,0x1D,0x11,0x6D,0x24,0x8A,0x2A,0x01,0xB0,0x1D,0x11, 0x00,0xB0,0x08,0xE6,0x02,0x39,0x39,0x22,0x6E,0x0A,0x02,0x60,0x5A,0x0A,0x01,0xB0, 0x57,0x05,0x01,0xB0,0x57,0x05,0x72,0x34,0x1F,0x24,0x04,0x68,0x37,0x0A,0x00,0xB5, 0x7C,0xBC,0x5A,0x0A,0x00,0xB0,0x7C,0xBC,0x00,0xB0,0x7C,0xBC,0x00,0xB0,0x97,0xC3, 0x00,0xB0,0x97,0xC3,0x00,0xB0,0xCD,0xBC,0x6D,0x30,0x6C,0x25,0x0F,0x68,0x06,0x6A, 0x00,0xD0,0x69,0x1E,0x01,0xD0,0x5E,0x11,0x00,0xD0,0xCB,0x1E,0x00,0xD0,0xFC,0x1E, 0x00,0xD0,0x2D,0x1F,0x00,0xD0,0x5E,0x1F,0x02,0x60,0x85,0x01,0x01,0x00,0x02,0x29, 0x17,0x68,0x06,0x6A,0x00,0xD0,0x69,0x1E,0x01,0xD0,0x5E,0x11,0x00,0xD0,0xCB,0x1E, 0x00,0xD0,0xFC,0x1E,0x00,0xD0,0x2D,0x1F,0x00,0xD0,0x5E,0x1F,0x20,0xEE,0x8F,0x1F, 0x00,0x27,0x03,0x68,0x00,0xB0,0xD1,0x1F,0x00,0xB0,0xD1,0x1F,0x0B,0x60,0x00,0xA2, 0x19,0x12,0x00,0x00,0x00,0x00,0x1F,0x20,0x03,0x68,0x00,0xB0,0x02,0x20,0x00,0xB0, 0x43,0x20,0x01,0x00,0x00,0xB0,0xBB,0xFA,0x86,0x22,0x00,0xB0,0x3C,0xE2,0x01,0xB0, 0x8F,0x11,0x01,0xB0,0xE0,0x11,0x01,0xB0,0x8F,0x11,0x00,0xA1,0xD5,0x03,0xAD,0x09, 0x54,0x5A,0x00,0xA2,0x12,0x22,0x49,0x09,0x54,0x49,0x02,0x2F,0x0F,0x68,0x00,0xA1, 0xD5,0x03,0x49,0x05,0x54,0x49,0x85,0x29,0x05,0x68,0x00,0xB0,0x41,0x32,0x00,0xF0, 0x72,0x32,0x00,0xB0,0x41,0x32,0x00,0xF0,0x78,0x33,0x01,0x2F,0x07,0x68,0x6D,0x24, 0x03,0x68,0x01,0xB0,0x31,0x12,0x00,0xB0,0x10,0x32,0x85,0x39,0x37,0x22,0x05,0x68, 0x00,0xB0,0xD1,0x33,0x00,0xF0,0x72,0x32,0x38,0x22,0x00,0xB0,0xC9,0x35,0x6D,0x22, 0x05,0x68,0x01,0xB0,0x62,0x12,0x20,0xF3,0x78,0x33,0x00,0xB0,0xC9,0x35,0x60,0xF4, 0x78,0x33,0x00,0xA1,0x15,0x1D,0x4D,0x05,0x62,0xAA,0x00,0xA2,0x12,0x02,0x4D,0x09, 0x62,0xAA,0x01,0x2F,0x07,0x68,0x6D,0x24,0x03,0x68,0x01,0xB0,0x83,0x12,0x00,0xB0, 0x0A,0x36,0x85,0x29,0x05,0x68,0x00,0xB0,0x3B,0x36,0x20,0xF3,0x6C,0x36,0x6D,0x24, 0x05,0x68,0x00,0xB0,0x4D,0x31,0x20,0xF3,0x6C,0x36,0x00,0xB0,0x76,0x37,0x80,0xF2, 0xA7,0x37,0x00,0xA2,0x12,0x02,0xAB,0x01,0x54,0x41,0x00,0x29,0x00,0xC0,0x0C,0x80, 0x00,0xC5,0xC0,0x82,0x00,0xA1,0xD5,0x03,0x49,0x09,0xEE,0xAC,0x00,0xA2,0x12,0x22, 0x49,0x05,0x2E,0xAD,0x01,0x2F,0x07,0x68,0x6D,0x24,0x03,0x68,0x01,0xB0,0xB4,0x12, 0x00,0xB0,0x18,0x3F,0x85,0x29,0x05,0x68,0x00,0xB0,0x49,0x3F,0x00,0xF0,0x7A,0x3F, 0x6D,0x24,0x05,0x68,0x01,0xB0,0xE5,0x12,0x41,0xF1,0x16,0x13,0x00,0xB0,0x6A,0x40, 0x41,0xF1,0x16,0x13,0x00,0xA1,0xD5,0x03,0x4D,0x01,0xEE,0xBC,0x00,0xA2,0x92,0x12, 0x4D,0x01,0x6E,0xBD,0x85,0x29,0x00,0xC0,0x42,0x77,0x1F,0x32,0x26,0x22,0xD0,0xC2, 0x01,0x7A,0x6C,0x22,0x80,0xC2,0x73,0x7B,0x6D,0x22,0x04,0x68,0x16,0x0A,0x20,0xC3, 0x34,0x7E,0x80,0xC2,0x34,0x7E,0x00,0xA2,0x92,0x32,0x4D,0x09,0x62,0xA2,0x02,0x2F, 0x07,0x68,0x00,0xA1,0x19,0x03,0x4F,0x01,0xDE,0x9A,0x00,0xB0,0x70,0x26,0x06,0x6A, 0x00,0xD0,0xB1,0x26,0x00,0xD0,0xF2,0x26,0x00,0xD0,0x33,0x27,0x00,0xD0,0x74,0x27, 0x00,0xD0,0xB5,0x27,0x00,0xD0,0xF6,0x27,0x8A,0x27,0x03,0x2B,0x00,0xB0,0x37,0x28, 0x00,0x37,0x32,0x20,0x00,0xB0,0x68,0x28,0x8A,0x29,0x04,0x68,0x3C,0x0A,0x01,0xB0, 0xC6,0x13,0x01,0x00,0x3A,0x32,0x02,0x29,0x32,0x01,0x02,0x60,0x01,0x01,0x01,0x00, 0x00,0xA1,0xD5,0x1A,0x4B,0x01,0x54,0x73,0x00,0xA2,0xD2,0x12,0x49,0x01,0x54,0x41, 0x85,0x29,0x00,0xC5,0x5B,0x64,0x0E,0x22,0x60,0xC4,0x71,0x67,0x6C,0x22,0x20,0xC3, 0x3C,0x68,0x6D,0x22,0x04,0x68,0x14,0x0A,0x00,0xC5,0x5B,0x64,0xA0,0xC5,0xCE,0xAE, 0x00,0xA1,0xD5,0x1A,0x4B,0x01,0x54,0x73,0x00,0xA2,0xD2,0x12,0x49,0x01,0x54,0x41, 0x8A,0x29,0x01,0x01,0xD0,0xC2,0x3A,0x69,0x00,0xA1,0x19,0x03,0x4D,0x01,0x62,0xAA, 0x00,0xA2,0x92,0x12,0x4D,0x01,0x62,0xA2,0x00,0x29,0xD0,0xC2,0xFA,0x47,0x30,0x32, 0x2F,0x32,0x31,0x22,0xD0,0xC2,0x02,0x89,0xD0,0xC2,0x2E,0x8B,0x00,0xA1,0x19,0x03, 0x4D,0x01,0x66,0xAC,0x00,0xA2,0x12,0x02,0x4D,0x01,0x66,0xAC,0x2F,0x25,0x1E,0x0A, 0x00,0x29,0xD0,0xC2,0x16,0x8D,0xD0,0xC2,0xC2,0x8F,0x00,0xA1,0xD5,0x03,0x4D,0x01, 0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x62,0xA2,0x85,0x29,0x80,0xC2,0x16,0x6A, 0x6D,0x22,0x04,0x68,0x14,0x0A,0x21,0xC3,0xF7,0x13,0x80,0xC2,0x5E,0xB0,0x00,0xA1, 0xD5,0x03,0x4D,0x01,0x60,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x60,0xA2,0x02,0x39, 0x3A,0x32,0x39,0x22,0xE0,0xC1,0x5E,0xB0,0x01,0x01,0x01,0x00,0x00,0x29,0x2F,0x01, 0x05,0x60,0x8A,0x29,0x01,0x01,0x02,0x60,0x8C,0x01,0x01,0x00,0x00,0xA1,0x19,0x03, 0xA9,0x01,0x54,0x5A,0x00,0xA2,0x12,0x02,0xA9,0x01,0x54,0x49,0x02,0x2F,0x04,0x68, 0x00,0x91,0xCC,0x03,0x01,0x00,0x85,0x29,0x05,0x68,0x00,0xB0,0xDF,0x43,0x00,0xF0, 0x6E,0x41,0x86,0x28,0x03,0x2B,0x23,0x0A,0x04,0x60,0x85,0x34,0x6D,0x24,0x1E,0x0A, 0x00,0xB0,0x72,0x44,0xC0,0xF3,0x6E,0x41,0x0D,0x10,0x00,0xB0,0xD0,0xC5,0x00,0xA2, 0x19,0x12,0x0D,0x01,0x62,0xAA,0x58,0x24,0x00,0xB0,0x0A,0x36,0x85,0x39,0x00,0x29, 0x05,0x68,0x00,0xB0,0xC9,0x47,0xD0,0xF2,0xFA,0x47,0x2F,0x25,0x1E,0x0A,0x00,0xB0, 0xA7,0x4A,0xD0,0xF2,0xFA,0x47,0x02,0x39,0x85,0x32,0x39,0x22,0x06,0x68,0x23,0x0A, 0x00,0xB0,0xA7,0x4A,0x80,0xF2,0x2E,0x8B,0x01,0x01,0x01,0x00,0x00,0x29,0x59,0x01, 0x06,0x60,0x02,0x39,0x85,0x22,0x58,0x01,0x02,0x60,0x01,0x01,0x01,0x00,0x00,0xB0, 0x3C,0xE2,0x00,0xB0,0xFA,0xBB,0x01,0xB0,0xC7,0x14,0x26,0x05,0x00,0xB0,0xF9,0xCD, 0x00,0xB0,0x42,0xE9,0x01,0xB0,0x18,0x15,0x01,0xB0,0x59,0x15,0x01,0xB0,0xD1,0x03, 0x00,0xA1,0x19,0x03,0x47,0x01,0xDE,0xB9,0x8A,0x29,0x2E,0x01,0x01,0xB0,0xAA,0x15, 0x80,0xF7,0xB2,0x06,0x00,0xB0,0x37,0xD2,0x00,0xB0,0x52,0xF8,0x00,0xB0,0xF9,0xCD, 0x00,0xB0,0x7C,0xBC,0x00,0xB0,0xCD,0xBC,0x00,0xB0,0xFA,0xBB,0x00,0xB0,0x19,0xEB, 0x0D,0x10,0x00,0xB0,0x38,0xF5,0x01,0xB0,0xEB,0x15,0x01,0xB0,0xEB,0x15,0x81,0x28, 0x07,0x68,0x88,0x28,0x03,0x68,0x01,0xB0,0x2C,0x16,0x01,0xB0,0x6D,0x16,0x00,0xB0, 0xB8,0x00,0x00,0xB0,0xD6,0xBA,0x81,0x28,0x01,0xB0,0x2C,0x16,0x00,0xB0,0x2F,0xD4, 0x00,0xB0,0x05,0xCD,0x00,0xB0,0x72,0xBE,0x0D,0x11,0x77,0x01,0x01,0x00,0x01,0xB0, 0xAE,0x16,0x01,0xB0,0xEF,0x16,0x00,0xB0,0xC3,0xBE,0x00,0xB0,0x6E,0xFF,0x00,0xB0, 0x15,0xEA,0x00,0xB0,0x6F,0xBD,0x01,0xB0,0x40,0x17,0x00,0xA1,0x19,0x03,0x49,0x09, 0xEE,0xAC,0x00,0xA2,0x12,0x22,0x49,0x09,0x2E,0xAD,0x65,0x25,0x01,0x01,0x8C,0x2B, 0x02,0x68,0x02,0x60,0x65,0x01,0x85,0x29,0x05,0x68,0x00,0xB0,0xF9,0x60,0x00,0xF0, 0xC2,0x5C,0x01,0xB0,0xA1,0x17,0xC1,0xF8,0xD2,0x17,0x01,0x0D,0x00,0x20,0x01,0x00, 0x88,0x28,0x05,0x68,0x2F,0x32,0x48,0x22,0x02,0x68,0x80,0x01,0x00,0x91,0x5A,0x06, 0x01,0x00,0x88,0x28,0x05,0x68,0x2F,0x32,0x48,0x22,0x02,0x68,0x80,0x01,0x80,0x20, 0x2F,0x01,0x00,0x91,0x0F,0x03,0x01,0x00,0x88,0x28,0x05,0x68,0x30,0x32,0x47,0x22, 0x02,0x68,0x80,0x01,0x00,0x91,0x37,0x06,0x01,0x00,0x88,0x28,0x05,0x68,0x30,0x32, 0x47,0x22,0x02,0x68,0x80,0x01,0x80,0x20,0x30,0x01,0x00,0x91,0xC4,0x02,0x01,0x00, 0x88,0x28,0x05,0x68,0x59,0x32,0x58,0x22,0x02,0x68,0x80,0x01,0x00,0x91,0x80,0x05, 0x01,0x00,0x88,0x28,0x05,0x68,0x59,0x32,0x58,0x22,0x02,0x68,0x80,0x01,0x80,0x20, 0x59,0x01,0x00,0x91,0x13,0x04,0x01,0x00,0x0E,0x10,0x6C,0x32,0x6C,0x20,0x00,0xB0, 0xCA,0xE1,0x39,0x22,0x00,0xB0,0x7D,0xE2,0x01,0xB0,0x05,0x1A,0x86,0x28,0x04,0x68, 0x00,0xB0,0x7D,0xE2,0x01,0x00,0x82,0x28,0x20,0x68,0x41,0x0A,0x88,0x28,0x8D,0x28, 0x03,0x00,0x02,0x68,0x01,0x01,0x6C,0x20,0x02,0x68,0x0D,0x01,0x02,0x2D,0x0A,0x00, 0x5C,0x2D,0x07,0x00,0x03,0x00,0x06,0x68,0x8A,0x2B,0x88,0x29,0x02,0x68,0x02,0x60, 0x01,0x01,0x49,0x27,0x6C,0x22,0x03,0x00,0x03,0x68,0x6E,0x01,0x06,0x60,0x22,0x20, 0x03,0x68,0x6F,0x01,0x02,0x60,0x0D,0x01,0x6C,0x32,0x6C,0x20,0x00,0xB0,0xCA,0xE1, 0x3A,0x20,0x00,0xB0,0xBA,0xDC,0x00,0xB0,0x7D,0xE2,0x00,0xB0,0xCA,0xE1,0x0E,0x10, 0x00,0xB0,0x56,0xCD,0x81,0x28,0x25,0x01,0x26,0x05,0x00,0xB0,0x83,0xE9,0x26,0x05, 0x00,0xB0,0xAA,0xE6,0x26,0x05,0x00,0xB0,0x79,0xF5,0x00,0xB0,0x3A,0xCE,0x00,0xB0, 0x3A,0xCE,0x01,0xB0,0x46,0x1A,0x00,0xB0,0x3C,0xE2,0x00,0xB0,0xFB,0xE1,0x39,0x24, 0x01,0xB0,0x97,0x1A,0x00,0xB0,0xA2,0xFB,0x00,0xB0,0x4A,0xC4,0x00,0xB0,0xFB,0xF5, 0x00,0xB0,0x68,0xBB,0x00,0xB0,0xB9,0xBB,0x00,0xB0,0x8F,0xC5,0x00,0xB0,0x42,0xE9, 0x00,0xB0,0xFA,0xBB,0x01,0xB0,0xD8,0x1A,0x01,0xB0,0x19,0x1B,0x00,0xB0,0x50,0xF2, 0x00,0xB0,0x99,0xD2,0x01,0xB0,0x5A,0x1B,0x01,0xB0,0x9B,0x1B,0x00,0xB0,0x05,0xCD, 0x01,0xB0,0xDC,0x1B,0x01,0xB0,0x2D,0x1C,0x01,0xB0,0x2D,0x1C,0x00,0xB0,0xC6,0xFC, 0x01,0xB0,0x6E,0x1C,0x00,0xA1,0xD5,0x03,0x4B,0x01,0x54,0x73,0x00,0xA2,0xD2,0x13, 0x49,0x01,0x54,0x41,0x01,0x2F,0x00,0xB0,0x10,0x32,0x00,0xB0,0x02,0x34,0x60,0xF4, 0x1D,0xAF,0x00,0xA1,0x15,0x1C,0x4D,0x01,0x5E,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01, 0x5E,0xA2,0x85,0x29,0x30,0xC2,0x1E,0x6D,0x20,0xC3,0x1E,0x6D,0x00,0xA1,0xD5,0x03, 0x4D,0x01,0x5E,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x5E,0xA2,0x01,0x2F,0x00,0xB0, 0x0A,0x36,0x01,0xB0,0xCF,0x1C,0x80,0xF2,0x1E,0x6D,0x02,0x0D,0x88,0xCA,0x00,0xA1, 0xD5,0x03,0x47,0x01,0x64,0xAA,0x00,0xA2,0x92,0x12,0x47,0x41,0x64,0xA2,0x00,0xC0, 0x5E,0xB0,0x04,0x0D,0x88,0xCA,0xB0,0xCA,0x00,0xA1,0xD5,0x03,0x4B,0x01,0x64,0xAA, 0x00,0xA2,0x92,0x12,0x47,0x41,0x64,0xA2,0x8D,0x24,0x8B,0x01,0x01,0xC5,0x00,0x1D, 0x02,0x0D,0x96,0xC9,0x00,0xA1,0xD5,0x03,0x47,0x05,0x64,0xAA,0x00,0xA2,0x12,0x02, 0x47,0x45,0x64,0xAA,0x01,0x2F,0x01,0xB0,0x83,0x12,0x85,0x29,0x05,0x68,0x00,0xB0, 0x3B,0x36,0x00,0xF0,0x6C,0x36,0x00,0xB0,0x4D,0x31,0x00,0xF0,0xA7,0x37,0x04,0x0D, 0x96,0xC9,0xB0,0xCA,0x00,0xA1,0xD5,0x03,0x47,0x05,0x64,0xAA,0x00,0xA2,0x12,0x02, 0x47,0x45,0x64,0xAA,0x01,0x2F,0x01,0xB0,0x83,0x12,0x00,0xB0,0x4D,0x31,0x00,0xF0, 0x22,0x6E,0x00,0xA1,0xD5,0x03,0x4D,0x01,0xEE,0xBC,0x85,0x29,0x00,0xC0,0xE2,0x6F, 0x01,0xC0,0x81,0x1E,0x00,0x91,0x20,0x05,0x03,0x0D,0xCA,0x63,0x00,0xB0,0x01,0x00, 0x00,0xA1,0xE3,0x53,0x55,0x01,0xF6,0xDD,0x00,0xA2,0x12,0x02,0x55,0x21,0xF6,0xDD, 0x01,0x2F,0x00,0xB0,0x23,0x3E,0x00,0xB0,0x23,0x3E,0x00,0xF0,0xC2,0x73,0x00,0xA1, 0x95,0x12,0x4C,0x05,0xEE,0xAC,0x00,0xA2,0x92,0x12,0x4C,0x01,0x6E,0xBD,0x01,0x2F, 0x01,0xB0,0xB1,0x1F,0x85,0x29,0x05,0x68,0x01,0xB0,0xB1,0x1F,0x30,0xF2,0xED,0xB2, 0x01,0xB0,0xB1,0x1F,0x20,0xF3,0xED,0xB2,0xC1,0xC3,0xE2,0x1F,0x88,0x28,0x00,0x91, 0x65,0x00,0x09,0x60,0x02,0x2C,0x05,0x68,0x8A,0x3B,0x6D,0x24,0x02,0x68,0x10,0x01, 0x00,0x91,0x47,0x00,0x02,0x0D,0xBE,0xC9,0x01,0x00,0x88,0x28,0x8A,0x2C,0x02,0x2D, 0x0A,0x00,0x01,0x01,0x8D,0x28,0x12,0x68,0x25,0x36,0x07,0x00,0x28,0x26,0x07,0x00, 0x02,0x68,0x27,0x01,0x22,0x25,0x02,0x2D,0x07,0x00,0x08,0x68,0x88,0x2D,0x07,0x00, 0x6D,0x26,0x07,0x00,0x02,0x68,0x02,0x60,0x27,0x01,0x79,0x01,0x01,0x00,0x88,0x28, 0x81,0x28,0x01,0xB0,0x2C,0x16,0x00,0xB0,0x75,0xDB,0x01,0xB0,0xAE,0x20,0x00,0xB0, 0xBC,0x01,0x00,0xB0,0xF9,0x00,0x01,0xB0,0xEF,0x20,0x3A,0x24,0x55,0x0A,0x00,0xB0, 0x68,0xBB,0x01,0xB0,0x30,0x21,0x00,0xA1,0xD5,0x03,0x4D,0x01,0xEE,0xBC,0x85,0x29, 0x00,0xC0,0xE2,0x6F,0x01,0xC0,0x81,0x1E,0x00,0xA1,0xD5,0x03,0x4D,0x01,0xEE,0xBC, 0x85,0x29,0x00,0xC0,0xE2,0x6F,0x00,0xC0,0x32,0x72,0x0D,0x12,0x6C,0x22,0x00,0xB0, 0xCA,0xE1,0x01,0xB0,0x05,0x1A,0x00,0xB0,0x56,0xCD,0x6C,0x22,0x00,0xB0,0xCA,0xE1, 0x01,0xB0,0x05,0x1A,0x26,0x05,0x00,0xB0,0x3A,0x01,0x00,0xB0,0xF9,0x00,0x00,0xB0, 0xA2,0xFB,0x00,0xB0,0x08,0xE6,0x00,0xB0,0xFA,0xBB,0x01,0xB0,0x71,0x21,0x01,0xB0, 0x6E,0x1C,0x00,0xB0,0xC3,0xBE,0x00,0xB0,0x6F,0xBD,0x01,0xB0,0xD2,0x21,0x00,0xB0, 0x86,0xEE,0x00,0xB0,0x24,0xBF,0x00,0xB0,0x6B,0xFE,0x00,0xB0,0x95,0xBF,0x0E,0x10, 0x6C,0x22,0x00,0xB0,0xCA,0xE1,0x01,0xB0,0x05,0x1A,0x00,0x91,0x76,0x13,0x01,0x00, 0x00,0xB0,0xCA,0xE1,0x0E,0x10,0x00,0xB0,0x56,0xCD,0x04,0x92,0xCC,0x88,0x01,0x00, 0x6C,0x22,0x00,0xB0,0xCA,0xE1,0x01,0xB0,0x05,0x1A,0x0D,0x12,0x6C,0x22,0x00,0xB0, 0xCA,0xE1,0x00,0xB0,0x7D,0xE2,0x26,0x05,0x00,0xB0,0x83,0xE9,0x26,0x05,0x00,0xB0, 0x79,0xF5,0x00,0xB0,0x3A,0xCE,0x00,0xB0,0x38,0xF5,0x00,0xB0,0xA2,0xFB,0x00,0xB0, 0xB9,0xBB,0x00,0xB0,0x68,0xBB,0x00,0xB0,0x42,0xE9,0x00,0xB0,0xFA,0xBB,0x00,0xB0, 0xD0,0xC5,0x6D,0x12,0x00,0xB0,0xB8,0x00,0x02,0x0D,0x8C,0xCA,0x88,0x29,0x41,0x22, 0x0D,0x01,0x00,0xB0,0x7D,0xE2,0x02,0x3B,0x95,0x24,0x01,0x01,0x6D,0x01,0x01,0x00, 0x01,0xB0,0x97,0x1A,0x00,0xB0,0xF9,0x00,0x00,0xB0,0xF9,0x00,0x88,0x28,0x82,0x28, 0x01,0xB0,0x53,0x22,0x01,0xB0,0xAE,0x20,0x00,0xB0,0x3A,0x01,0x00,0xB0,0x68,0xBB, 0x00,0xB0,0x68,0xBB,0x7A,0x12,0x01,0xB0,0x94,0x22,0x01,0xB0,0x94,0x22,0x02,0x0D, 0x89,0xCA,0x01,0xB0,0xD5,0x22,0x28,0x2C,0x02,0x68,0x02,0x60,0x97,0x12,0x01,0xB0, 0x94,0x22,0x02,0x0D,0x89,0xCA,0x01,0xB0,0xD5,0x22,0x01,0xB0,0x16,0x23,0x00,0xB0, 0x89,0xC8,0x01,0x01,0x01,0x00,0x00,0x91,0x49,0x04,0x02,0x0D,0xBB,0xC9,0x01,0x00, 0x00,0xB0,0x56,0x00,0x02,0x0D,0x90,0xC9,0x01,0xB0,0x2C,0x16,0x00,0xB0,0x75,0xDB, 0x00,0xB0,0xF9,0x00,0x00,0xB0,0xF9,0x00,0x01,0xB0,0xAE,0x20,0x00,0xB0,0x3A,0x01, 0x00,0xB0,0x68,0xBB,0x00,0xB0,0x68,0xBB,0x00,0xB0,0x42,0xE9,0x00,0xB0,0x42,0xE9, 0x00,0xB0,0x21,0xBE,0x01,0xB0,0x6E,0x1C,0x00,0xA1,0xD5,0x03,0x4C,0x09,0x5E,0xAA, 0x00,0xA2,0x12,0x02,0x4C,0x09,0x5E,0xAA,0x01,0x2F,0x00,0xB0,0x0A,0x36,0x85,0x29, 0x05,0x68,0x00,0xB0,0x3B,0x36,0x00,0xF0,0x6C,0x36,0x22,0x22,0x05,0x68,0x00,0xB0, 0x4D,0x31,0x40,0xF6,0x2E,0x38,0x20,0xB3,0x76,0x37,0xC0,0xF3,0x17,0xC0,0x00,0xB0, 0xCA,0xE1,0x02,0x0D,0xA8,0xC9,0x00,0xB5,0xFB,0xDC,0x02,0x0D,0x90,0xC9,0x83,0x38, 0x8D,0x38,0x88,0x28,0x01,0xB0,0x6D,0x16,0x0D,0x11,0x41,0x22,0x88,0x29,0x02,0x68, 0x0D,0x01,0x00,0xB0,0x4A,0xC4,0x01,0x00,0x23,0x01,0x01,0x00,0x01,0xB0,0x97,0x1A, 0x00,0xB0,0xF9,0x00,0x00,0xB0,0xF9,0x00,0x01,0xB0,0xAE,0x20,0x00,0xB0,0xF9,0xCD, 0x00,0xB0,0x3A,0x01,0x00,0xB0,0x68,0xBB,0x00,0xB0,0x68,0xBB,0x00,0xB0,0xBC,0x01, 0x00,0xB0,0xBC,0x01,0x00,0xB0,0x21,0xBE,0x01,0xB0,0x6E,0x1C,0x00,0xA1,0xD5,0x03, 0x4B,0x01,0x54,0x73,0x00,0xA2,0xD2,0x13,0x49,0x01,0x54,0x41,0x01,0x2F,0x07,0x68, 0x02,0x2C,0x03,0x68,0x00,0xB0,0x10,0x32,0x01,0xB0,0x77,0x23,0x85,0x29,0x00,0xC0, 0x5B,0x64,0x37,0x22,0x00,0xC0,0x3C,0x68,0x00,0xC0,0x1D,0xAF,0x00,0xA1,0x15,0x1C, 0x4D,0x01,0x5E,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x5E,0xA2,0x01,0x2F,0x07,0x68, 0x02,0x2C,0x03,0x68,0x00,0xB0,0x0A,0x36,0x01,0xB0,0x77,0x23,0x85,0x29,0x30,0xC2, 0x1E,0x6D,0x20,0xC3,0x1E,0x6D,0x04,0x0D,0x88,0xCA,0xB0,0xCA,0x00,0xA1,0xD5,0x03, 0x4B,0x01,0x64,0xAA,0x00,0xA2,0x92,0x12,0x47,0x41,0x64,0xA2,0x8D,0x24,0x8B,0x01, 0x01,0xC5,0x00,0x1D,0x04,0x0D,0x88,0xCA,0xB0,0xCA,0x00,0xA1,0xD5,0x03,0x4B,0x01, 0x64,0xAA,0x00,0xA2,0x92,0x12,0x47,0x41,0x64,0xA2,0x01,0x2F,0x07,0x68,0x02,0x2C, 0x03,0x68,0x01,0xB0,0x83,0x12,0x01,0xB0,0x77,0x23,0x01,0xC5,0x00,0x1D,0x00,0xA1, 0xE3,0x53,0x55,0x01,0xF6,0xDD,0x01,0x2F,0x07,0x68,0x02,0x2C,0x03,0x68,0x00,0xB0, 0x23,0x3E,0x01,0xB0,0x77,0x23,0x85,0x29,0x00,0xC0,0xC2,0x73,0x00,0xC0,0xC2,0x73, 0x00,0xA1,0xD5,0x03,0x4C,0x05,0x5C,0x8B,0x00,0xA2,0x92,0x12,0x4C,0x01,0x6E,0xBD, 0x01,0x2F,0x07,0x68,0x02,0x2C,0x03,0x68,0x00,0xB0,0x18,0x3F,0x01,0xB0,0x77,0x23, 0x85,0x29,0x80,0xC2,0xED,0xB2,0x1E,0x34,0x1F,0x24,0x80,0xC2,0xAE,0xB4,0x20,0x34, 0x21,0x24,0x90,0xC1,0x88,0xB6,0xE0,0xC1,0x88,0xB6,0x01,0x00,0x00,0xB0,0x05,0xD6, 0x00,0xB0,0x3C,0xE2,0x26,0x05,0x00,0xB0,0x61,0xFB,0x00,0xB0,0x08,0xE6,0x00,0xB0, 0x42,0xE9,0x01,0xB0,0xC8,0x23,0x00,0xB0,0x86,0xF9,0x00,0xB0,0x3A,0x01,0x01,0xB0, 0x09,0x24,0x00,0xB0,0xB8,0x00,0x00,0xB0,0xFB,0xF5,0x00,0xB0,0xFA,0xBB,0x00,0xB0, 0x7C,0xBC,0x00,0xB0,0xCD,0xBC,0x00,0xA1,0xD5,0x03,0x4D,0x01,0x62,0xAA,0x00,0xA2, 0x92,0x12,0x4D,0x01,0x62,0xA2,0x00,0xC0,0x06,0xAC,0x00,0xA1,0xD5,0x03,0x4D,0x01, 0x60,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x60,0xA2,0x85,0x29,0xD0,0xC2,0x1E,0x6D, 0x20,0xC3,0x1E,0x6D,0x2F,0x22,0x00,0xC0,0x02,0x00,0x2F,0x01,0x01,0x00,0x00,0xA1, 0xD5,0x03,0x4C,0x09,0x5E,0xAA,0x00,0xA2,0x12,0x02,0x4C,0x09,0x5E,0xAA,0x01,0x2F, 0x00,0xB0,0x0A,0x36,0x85,0x29,0x05,0x68,0x00,0xB0,0x3B,0x36,0x00,0xF0,0x2E,0x38, 0x22,0x22,0x05,0x68,0x00,0xB0,0x4D,0x31,0xE0,0xF6,0x2E,0x38,0x00,0xB0,0x76,0x37, 0xE0,0xF6,0x2E,0x38,0x8A,0x29,0x38,0x01,0x00,0x91,0xC0,0x00,0x1C,0x20,0xE0,0xEC, 0xAC,0x18,0x04,0x60,0x02,0x27,0x80,0xED,0xAC,0x18,0x00,0x27,0x00,0xB0,0xCD,0x18, 0x2F,0x20,0x00,0xB0,0xFE,0x18,0x00,0xB0,0x40,0x19,0x01,0xB0,0x1A,0x06,0x00,0xB0, 0x75,0xDB,0x00,0xB0,0x75,0xDB,0x00,0xB0,0x75,0xDB,0x00,0x29,0x00,0xB0,0x17,0xBB, 0x00,0xB0,0x3C,0xE2,0x00,0x29,0x00,0xB0,0x17,0xBB,0x00,0xB0,0x3C,0xE2,0x00,0xB0, 0x3C,0xE2,0x01,0xB0,0x4A,0x24,0x01,0xB0,0x9B,0x24,0x72,0x13,0x00,0xB0,0x32,0xED, 0x00,0xB0,0x32,0xED,0x01,0xB0,0xAE,0x20,0x00,0xB0,0x9F,0xCF,0x00,0xB0,0x9F,0xCF, 0x00,0xB0,0x9F,0xCF,0x00,0xB0,0xBC,0x01,0x00,0xB0,0xBC,0x01,0x00,0xB0,0xFA,0xBB, 0x00,0xB0,0xBC,0x01,0x00,0xB0,0xBC,0x01,0x01,0xB0,0x71,0x21,0x00,0xB0,0x10,0xFB, 0x00,0xB0,0x0A,0xFE,0x01,0xB0,0xEC,0x24,0x00,0xB0,0xBC,0xC9,0x00,0xB0,0x95,0xBF, 0x01,0xB0,0x4D,0x25,0x00,0xB0,0x0E,0xBD,0x00,0xB0,0x6F,0xBD,0x01,0xB0,0x9E,0x25, 0x00,0xB0,0x21,0xBE,0x01,0xB0,0xEF,0x25,0x02,0x2C,0x02,0x68,0x02,0x60,0x0E,0x03, 0x00,0xB5,0xFF,0x0D,0x20,0xF3,0x40,0x0E,0x00,0xA1,0xE3,0x53,0x55,0x09,0xF6,0xDD, 0x01,0x2F,0x00,0xB0,0xE7,0x38,0x85,0x29,0x05,0x68,0x00,0xB0,0x18,0x39,0x00,0xF0, 0x49,0x39,0x01,0x00,0x00,0xA1,0xE3,0x53,0x55,0x01,0xF6,0xDD,0x00,0xC0,0xC2,0x73, 0x00,0xA1,0xD5,0x03,0x4D,0x01,0x60,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x60,0xA2, 0x85,0x29,0x30,0xC2,0x1E,0x6D,0xC0,0xC3,0x1E,0x6D,0x00,0xA1,0xE3,0x53,0x55,0x01, 0xF6,0xDD,0x00,0xA2,0x19,0x12,0x33,0x25,0xF6,0xDD,0x85,0x29,0xE0,0xC1,0x83,0x75, 0xC0,0xC3,0x83,0x75,0x00,0xA1,0xD5,0x03,0x4C,0x09,0x5E,0xAA,0x00,0xA2,0x12,0x02, 0x4C,0x09,0x5E,0xAA,0x01,0x2F,0x00,0xB0,0x0A,0x36,0x85,0x29,0x05,0x68,0x00,0xB0, 0x3B,0x36,0x00,0xF0,0x6C,0x36,0x57,0x29,0x05,0x68,0x00,0xB0,0x4D,0x31,0xE0,0xF6, 0x2E,0x38,0x00,0xB0,0x76,0x37,0xE0,0xF6,0x2E,0x38,0x00,0xA1,0xE8,0x53,0x53,0x09, 0xF6,0xDD,0x00,0xA2,0x32,0x52,0x53,0x29,0xF6,0xDD,0x01,0x2F,0x01,0xB0,0x1A,0x09, 0x85,0x29,0x05,0x68,0x00,0xB0,0x3B,0x36,0x81,0xF2,0x4B,0x09,0x57,0x29,0x05,0x68, 0x00,0xB0,0x4D,0x31,0x01,0xF5,0x4B,0x09,0x00,0xB0,0x76,0x37,0x01,0xF5,0x4B,0x09, 0x06,0x6A,0x00,0xD0,0x35,0x2B,0x00,0xD0,0x96,0x2B,0x00,0xD0,0xE7,0x2B,0x00,0xD0, 0x48,0x2C,0x00,0xD0,0xA9,0x2C,0x00,0xD0,0x1A,0x2D,0x00,0x27,0x00,0xB0,0x7B,0x2D, 0x8A,0x29,0x0A,0x68,0x43,0x24,0x03,0x68,0x25,0x0A,0x04,0x60,0x43,0x25,0x02,0x68, 0x32,0x0A,0x00,0xB0,0x9C,0x2D,0x01,0x00,0x02,0x0D,0xAD,0xC9,0x00,0xB0,0x95,0x1D, 0x03,0x0D,0xCC,0x6C,0x00,0xA9,0x00,0xB0,0x86,0x04,0x01,0xB0,0x1A,0x06,0x26,0x05, 0x01,0xB0,0xAE,0x20,0x26,0x05,0x01,0xB0,0xAE,0x20,0x00,0xB0,0x3C,0xE2,0x00,0xB0, 0x3C,0xE2,0x00,0xB0,0xFB,0xE1,0x00,0xB0,0xFB,0xE1,0x70,0x10,0x00,0xB0,0x75,0xDB, 0x00,0xB0,0x75,0xDB,0x02,0x0D,0x90,0xC9,0x00,0xB0,0x70,0xD4,0x00,0xB0,0x9F,0xCF, 0x00,0xB0,0x9F,0xCF,0x00,0xB0,0xBC,0x01,0x00,0xB0,0xBC,0x01,0x01,0xB0,0x71,0x21, 0x00,0xB0,0x10,0xFB,0x00,0xB0,0x0A,0xFE,0x01,0xB0,0xEC,0x24,0x00,0xB0,0xBC,0xC9, 0x00,0xB0,0x95,0xBF,0x01,0xB0,0x4D,0x25,0x00,0xB0,0x0D,0xFF,0x00,0xA1,0x19,0x03, 0x49,0x01,0x62,0xAA,0x00,0xA2,0x12,0x22,0x49,0x09,0x62,0xAA,0x00,0xB0,0xFF,0x0D, 0x20,0xF3,0x40,0x0E,0x00,0xA1,0xD5,0x03,0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12, 0x4D,0x01,0x62,0xA2,0x85,0x29,0x00,0xC0,0xAE,0xA9,0xA1,0xC5,0x40,0x26,0x00,0xA1, 0xD5,0x03,0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x62,0xA2,0x85,0x29, 0x00,0xC0,0x16,0x6A,0x30,0xC7,0x5E,0xB0,0x00,0xA1,0xD5,0x03,0x4B,0x01,0x54,0x73, 0x00,0xA2,0xD2,0x13,0x49,0x01,0x54,0x41,0x85,0x29,0x00,0xC5,0xCE,0xAE,0x37,0x22, 0x00,0xC0,0x3C,0x68,0x80,0xC7,0x71,0x67,0x00,0xA1,0xD5,0x03,0x4D,0x01,0xEE,0xBC, 0x00,0xA2,0x92,0x12,0x4D,0x01,0x6E,0xBD,0x85,0x29,0x00,0xC0,0x42,0x77,0x1F,0x32, 0x3D,0x22,0x00,0xC0,0x01,0x7A,0x37,0x22,0x00,0xC0,0x73,0x7B,0xC0,0xC3,0xFF,0x7C, 0x00,0xA1,0x19,0x03,0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x62,0xA2, 0x00,0xC0,0xA9,0xB8,0x6C,0x10,0x00,0xB0,0xB8,0x00,0x02,0x0D,0x90,0xC9,0x01,0xB0, 0x2C,0x16,0x00,0x29,0x00,0xB0,0x17,0xBB,0x00,0xB0,0x3C,0xE2,0x01,0xB0,0x74,0x27, 0x26,0x05,0x01,0xB0,0xD5,0x04,0x01,0xB0,0x30,0x21,0x00,0xB0,0xFA,0xBB,0x02,0x0D, 0xA8,0xC9,0x01,0xB0,0xB5,0x27,0x01,0xB0,0xF6,0x27,0x01,0xB0,0x57,0x28,0x01,0x0D, 0x00,0x72,0x00,0xA1,0x19,0x03,0x49,0x01,0x62,0xAA,0x00,0xA2,0x12,0x22,0x49,0x09, 0x62,0xAA,0x00,0xB0,0xFF,0x0D,0x20,0xF3,0x40,0x0E,0x00,0xA1,0xD5,0x03,0x4D,0x01, 0x60,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x60,0xA2,0x85,0x29,0x30,0xC2,0x1E,0x6D, 0xC0,0xC3,0x1E,0x6D,0x00,0xA1,0xE3,0x53,0x55,0x01,0xF6,0xDD,0x00,0xA2,0x19,0x12, 0x33,0x25,0xF6,0xDD,0x85,0x29,0xE0,0xC1,0x83,0x75,0xC0,0xC3,0x83,0x75,0x00,0xA1, 0xD5,0x03,0x4C,0x09,0x5E,0xAA,0x00,0xA2,0x12,0x02,0x4C,0x09,0x5E,0xAA,0x01,0x2F, 0x00,0xB0,0x0A,0x36,0x85,0x29,0x05,0x68,0x00,0xB0,0x3B,0x36,0x00,0xF0,0x6C,0x36, 0x57,0x29,0x05,0x68,0x00,0xB0,0x4D,0x31,0xE0,0xF6,0x2E,0x38,0x00,0xB0,0x76,0x37, 0xE0,0xF6,0x2E,0x38,0x00,0xA1,0xE8,0x53,0x53,0x09,0xF6,0xDD,0x00,0xA2,0x32,0x52, 0x53,0x29,0xF6,0xDD,0x01,0x2F,0x01,0xB0,0x1A,0x09,0x85,0x29,0x05,0x68,0x00,0xB0, 0x3B,0x36,0x81,0xF2,0x4B,0x09,0x57,0x29,0x05,0x68,0x00,0xB0,0x4D,0x31,0x01,0xF5, 0x4B,0x09,0x00,0xB0,0x76,0x37,0x01,0xF5,0x4B,0x09,0x00,0x91,0x22,0x06,0x03,0x0D, 0xCA,0x64,0x00,0x91,0x01,0x00,0x00,0x91,0x20,0x05,0x03,0x0D,0xC9,0x74,0x00,0x95, 0x01,0x00,0x00,0x91,0x5B,0x01,0x02,0x29,0x00,0xB0,0xE6,0xBF,0x01,0x00,0x00,0xA2, 0x12,0x02,0x4B,0x01,0x54,0x41,0x85,0x29,0x00,0xC0,0x0C,0x80,0x59,0x22,0x00,0xCA, 0xC0,0x82,0xC0,0xC8,0xC0,0x82,0x26,0x05,0x00,0xB0,0x79,0xF5,0x26,0x05,0x00,0xB0, 0x32,0xED,0x01,0xB0,0xB8,0x28,0x00,0xB0,0x19,0xEB,0x00,0xB0,0x3C,0xE2,0x88,0x28, 0x81,0x28,0x00,0xB0,0x09,0xC4,0x00,0xB0,0xB8,0x00,0x00,0xB0,0xB8,0x00,0x00,0xB0, 0x9F,0xCF,0x00,0xB0,0x9F,0xCF,0x00,0xB0,0xE3,0xFB,0x00,0xB0,0xFA,0xBB,0x00,0xB0, 0x0E,0xBD,0x00,0xB0,0x6F,0xBD,0x01,0xB0,0x9E,0x25,0x00,0xB0,0x21,0xBE,0x01,0xB0, 0xEF,0x25,0x03,0x0D,0xCC,0x72,0x00,0xA9,0x00,0xB0,0x35,0x04,0x05,0x0D,0xCC,0x72, 0xCB,0xA9,0x00,0x90,0x00,0xB0,0x35,0x04,0x03,0x0D,0xCC,0x72,0x00,0x9D,0x00,0xA1, 0x19,0x03,0x49,0x01,0x62,0xAA,0x00,0xA2,0x12,0x22,0x49,0x09,0x62,0xAA,0x00,0xB0, 0xC5,0x4D,0x21,0xF3,0xE9,0x28,0x05,0x0D,0xCC,0x72,0xCC,0x9D,0x00,0x8A,0x00,0xA1, 0x19,0x03,0x49,0x01,0x62,0xAA,0x00,0xA2,0x12,0x22,0x49,0x09,0x62,0xAA,0x01,0xB0, 0x94,0x2B,0x91,0xF1,0xE9,0x28,0x03,0x0D,0xCC,0x6C,0x00,0xA9,0x00,0xB0,0x86,0x04, 0x05,0x0D,0xCC,0x6C,0xCB,0xA9,0x00,0x90,0x00,0xB0,0x86,0x04,0x00,0xA1,0xD5,0x03, 0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x62,0xA2,0x85,0x29,0x00,0xC0, 0x16,0x6A,0x00,0xC0,0x5E,0xB0,0x00,0xA1,0xD5,0x03,0x4B,0x01,0x54,0x73,0x00,0xA2, 0xD2,0x13,0x49,0x01,0x54,0x41,0x85,0x29,0x00,0xC5,0x71,0x67,0x37,0x22,0x00,0xC0, 0x3C,0x68,0x80,0xC7,0x71,0x67,0x00,0xB0,0x3C,0xE2,0x00,0xB0,0x75,0xDB,0x00,0xB0, 0x79,0xDC,0x00,0xB0,0xBC,0x01,0x01,0xB0,0xC5,0x2B,0x03,0x0D,0xCC,0x72,0x00,0xA9, 0x00,0xB0,0x35,0x04,0x00,0xA1,0x19,0x03,0x4D,0x01,0x6A,0xAC,0x00,0xA2,0x12,0x02, 0x4D,0x01,0x6A,0xAC,0x85,0x29,0xA1,0xC5,0x16,0x2C,0xE1,0xC6,0x16,0x2C,0x00,0xA1, 0xD5,0x03,0x4D,0x01,0x66,0x9C,0x85,0x29,0x81,0xC2,0x7B,0x2E,0x21,0xC3,0x7B,0x2E, 0x03,0x0D,0xC9,0x74,0x00,0x95,0x00,0xA1,0xE3,0x53,0x55,0x01,0x72,0xCD,0x85,0x29, 0x21,0xC3,0x3E,0x30,0x21,0xC3,0x3E,0x30,0x00,0xA1,0x19,0x03,0x4B,0x01,0xE8,0xAB, 0x00,0xA2,0x12,0x22,0x4B,0x09,0xE8,0xAB,0x85,0x29,0x05,0x68,0x00,0xB0,0x94,0x4D, 0x01,0xF5,0x16,0x2C,0x00,0xB0,0xC5,0x4D,0x61,0xF9,0x16,0x2C,0x00,0xA1,0xD5,0x03, 0x51,0x09,0x66,0xAC,0x00,0xA2,0x12,0x22,0x51,0x09,0x66,0xAC,0x01,0x2F,0x00,0xB0, 0xE7,0x38,0x85,0x29,0x05,0x68,0x00,0xB0,0x18,0x39,0x21,0xF3,0x7B,0x2E,0x01,0xB0, 0xDE,0x31,0x01,0xF5,0x7B,0x2E,0x03,0x0D,0xCA,0x64,0x00,0x91,0x00,0xA1,0xE3,0x53, 0x55,0x09,0x72,0xCD,0x01,0x2F,0x00,0xB0,0xE7,0x38,0x85,0x29,0x05,0x68,0x00,0xB0, 0x18,0x39,0x21,0xF3,0x3E,0x30,0x01,0xB0,0xDE,0x31,0x01,0xF5,0x3E,0x30,0x01,0xB0, 0x19,0x10,0x00,0xB0,0x01,0xE9,0x7A,0x12,0x00,0xB0,0xB8,0x00,0x00,0xB0,0xB8,0x00, 0x01,0xB0,0x2C,0x16,0x00,0xB0,0x3C,0xE2,0x00,0xB0,0xF9,0x00,0x8A,0x12,0x26,0x05, 0x01,0xB0,0xAE,0x20,0x26,0x05,0x00,0xB0,0x79,0xF5,0x00,0xB0,0x9F,0xCF,0x8B,0x12, 0x00,0xB0,0xFA,0xBB,0x00,0xB0,0xE3,0xFB,0x00,0xB0,0x21,0xBE,0x00,0xA1,0xD5,0x03, 0x4D,0x01,0x60,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x60,0xA2,0x85,0x29,0x30,0xC2, 0x1E,0x6D,0x20,0xC3,0x1E,0x6D,0x00,0xA1,0x15,0x1C,0x4D,0x09,0x62,0xAA,0x00,0xA2, 0x12,0x02,0x4D,0x09,0x62,0xAA,0x01,0x2F,0x00,0xB0,0x0A,0x36,0x85,0x29,0x05,0x68, 0x00,0xB0,0x3B,0x36,0x00,0xF0,0x6C,0x36,0x22,0x22,0x05,0x68,0x00,0xB0,0x4D,0x31, 0x00,0xF0,0xA7,0x37,0x00,0xB0,0x76,0x37,0x20,0xF3,0xA7,0x37,0x00,0xA1,0x19,0x03, 0x4D,0x01,0xEE,0xBC,0x00,0xA2,0x92,0x12,0x4D,0x01,0x6E,0xBD,0xD0,0xC2,0x47,0x9C, 0x01,0x0D,0x00,0x20,0x10,0x04,0x00,0xB0,0x87,0x00,0x00,0xA1,0xD5,0x03,0x57,0x01, 0xF6,0xDD,0x00,0xA2,0x92,0x12,0x57,0x01,0xF6,0xDD,0x00,0xC0,0x01,0x7A,0x03,0x0D, 0xCA,0x64,0x00,0x91,0x00,0xA1,0xE3,0x53,0x55,0x09,0xF6,0xDD,0x01,0x2F,0x00,0xB0, 0xE7,0x38,0x85,0x29,0x05,0x68,0x00,0xB0,0x18,0x39,0x00,0xF0,0x49,0x39,0x00,0xB0, 0xD7,0x3B,0x00,0xF0,0x0B,0x3D,0x26,0x05,0x00,0xB0,0xAA,0xE6,0x02,0x0D,0x90,0xC9, 0x00,0xB0,0x95,0xBA,0x01,0x0D,0x00,0x72,0x00,0xA1,0x19,0x03,0x49,0x01,0x62,0xAA, 0x00,0xA2,0x12,0x22,0x49,0x09,0x62,0xAA,0x00,0xB0,0xFF,0x0D,0x20,0xF3,0x40,0x0E, 0x00,0xA1,0xD5,0x03,0x4D,0x01,0x60,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x60,0xA2, 0x85,0x29,0x31,0xC2,0x0F,0x32,0x21,0xC3,0x0F,0x32,0x00,0xA1,0x15,0x1C,0x4D,0x09, 0x62,0xAA,0x00,0xA2,0x12,0x02,0x4D,0x09,0x62,0xAA,0x01,0x2F,0x00,0xB0,0x0A,0x36, 0x85,0x29,0x05,0x68,0x01,0xB0,0xDD,0x32,0x01,0xF0,0x0F,0x32,0x01,0xB0,0xDD,0x32, 0x21,0xF3,0x0F,0x32,0x1F,0x32,0x1E,0x22,0x01,0xC0,0x0E,0x33,0x02,0x29,0x01,0xC0, 0x06,0x36,0x61,0xC4,0x06,0x36,0x1C,0x22,0x00,0xC0,0x8C,0x9E,0x1F,0x32,0x1E,0x22, 0x01,0xC0,0x0E,0x33,0x02,0x29,0x01,0xC0,0x06,0x36,0x61,0xC4,0x06,0x36,0x00,0xA1, 0xD5,0x03,0x51,0x09,0xEE,0xBC,0x00,0xA2,0x12,0x22,0x51,0x09,0x2E,0xAD,0x01,0x2F, 0x00,0xB0,0xE7,0x38,0x00,0xB0,0xD7,0x3B,0x01,0xF0,0x26,0x38,0x03,0x0D,0xCA,0x64, 0x00,0x91,0x00,0xA1,0xE3,0x53,0x55,0x09,0xF6,0xDD,0x01,0x2F,0x00,0xB0,0xE7,0x38, 0x00,0xB0,0xD7,0x3B,0x01,0xF0,0xFA,0x3A,0x00,0xA1,0xD5,0x03,0x4D,0x01,0xEE,0xBC, 0x21,0xC3,0xE9,0x3C,0x03,0x0D,0xC9,0x74,0x00,0x95,0x00,0xA1,0xE3,0x53,0x55,0x01, 0xF6,0xDD,0x01,0xC0,0xFA,0x3A,0x00,0xA1,0x19,0x03,0x4B,0x01,0xE8,0xAB,0x00,0xA2, 0x12,0x22,0x4B,0x09,0xE8,0xAB,0x85,0x29,0x05,0x68,0x00,0xB0,0xC5,0x4D,0x21,0xF3, 0x26,0x38,0x00,0xB0,0xC5,0x4D,0xC1,0xF3,0x26,0x38,0x00,0xA1,0x19,0x03,0x4D,0x01, 0x6A,0xAC,0x00,0xA2,0x12,0x02,0x4D,0x01,0x6A,0xAC,0x85,0x29,0xC1,0xC3,0x26,0x38, 0x61,0xC4,0x26,0x38,0x00,0xA1,0xD5,0x03,0x49,0x09,0xEE,0xAC,0x00,0xA2,0x12,0x22, 0x49,0x09,0x2E,0xAD,0x01,0x2F,0x00,0xB0,0x18,0x3F,0x85,0x29,0x05,0x68,0x00,0xB0, 0x49,0x3F,0x00,0xF0,0x7A,0x3F,0x00,0xB0,0x6A,0x40,0xA1,0xF5,0x2F,0x3F,0x00,0xA1, 0x19,0x03,0x4D,0x01,0xEE,0xBC,0x00,0xA2,0x92,0x12,0x4D,0x01,0x6E,0xBD,0xE0,0xC1, 0x47,0x9C,0x02,0x0D,0xAD,0xC9,0x00,0xB0,0x95,0x1D,0x02,0x0D,0xAD,0xC9,0x00,0xB0, 0x95,0x1D,0x00,0xA1,0x19,0x03,0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01, 0x62,0xA2,0x00,0xC0,0x2E,0x8B,0x02,0x0D,0xB2,0xC9,0x00,0xA2,0x17,0x72,0x51,0x0D, 0x72,0xCD,0x02,0x2F,0x05,0x68,0x00,0xD0,0xD3,0x2A,0x00,0xB0,0xF4,0x2A,0x06,0x6A, 0x00,0xD0,0x35,0x2B,0x00,0xD0,0x96,0x2B,0x00,0xD0,0xE7,0x2B,0x00,0xD0,0x48,0x2C, 0x00,0xD0,0xA9,0x2C,0x00,0xD0,0x1A,0x2D,0x00,0x27,0x00,0xB0,0x7B,0x2D,0x8A,0x29, 0x0A,0x68,0x43,0x24,0x03,0x68,0x25,0x0A,0x04,0x60,0x43,0x25,0x02,0x68,0x32,0x0A, 0x00,0xB0,0x9C,0x2D,0x01,0x00,0x02,0x2C,0x02,0x68,0x02,0x60,0x0E,0x03,0x00,0xB5, 0xFF,0x0D,0x20,0xF3,0x40,0x0E,0x00,0xA1,0xE3,0x53,0x55,0x09,0xF6,0xDD,0x01,0x2F, 0x00,0xB0,0xE7,0x38,0x85,0x29,0x05,0x68,0x00,0xB0,0x18,0x39,0x00,0xF0,0x49,0x39, 0x01,0x00,0x00,0xA1,0xE3,0x53,0x55,0x01,0xF6,0xDD,0x00,0xC0,0xC2,0x73,0x00,0xA2, 0x12,0x22,0x4B,0x09,0x54,0x41,0x02,0x2F,0x0B,0x68,0x00,0xA1,0x19,0x03,0x4B,0x01, 0xD4,0x72,0x85,0x29,0x03,0x68,0x00,0xB0,0xD5,0x23,0x00,0xB0,0x16,0x24,0x00,0xD0, 0x1A,0x25,0x00,0xB0,0xED,0x25,0x02,0x29,0x26,0x01,0x71,0x20,0x01,0xB0,0xA9,0x3F, 0x01,0xB0,0xFA,0x3F,0x5A,0x20,0x73,0x01,0x19,0x0A,0x01,0xB0,0x2B,0x40,0x84,0x2D, 0x07,0x00,0x75,0x01,0x84,0x28,0x25,0x01,0x01,0xB0,0x6C,0x40,0x01,0xB0,0x9D,0x40, 0x84,0x28,0x06,0x68,0x39,0x25,0x03,0x68,0x23,0x01,0x02,0x60,0x25,0x01,0x01,0xB0, 0x2B,0x40,0x84,0x28,0x24,0x01,0x49,0x2C,0x75,0x01,0x01,0xB0,0x2B,0x40,0x84,0x28, 0x06,0x68,0x39,0x25,0x03,0x68,0x24,0x01,0x02,0x60,0x78,0x01,0x49,0x2C,0x75,0x01, 0x01,0xB0,0x2B,0x40,0x01,0xB0,0xDE,0x40,0x84,0x28,0x06,0x68,0x39,0x25,0x03,0x68, 0x24,0x01,0x02,0x60,0x79,0x01,0x01,0xB0,0x1F,0x41,0x84,0x2D,0x07,0x00,0x06,0x68, 0x39,0x20,0x03,0x68,0x77,0x01,0x02,0x60,0x7A,0x01,0x84,0x28,0x06,0x68,0x39,0x25, 0x03,0x68,0x24,0x01,0x02,0x60,0x79,0x01,0x01,0xB0,0x60,0x41,0x84,0x2D,0x07,0x00, 0x75,0x01,0x84,0x28,0x24,0x01,0x49,0x2C,0x7B,0x01,0x01,0xB0,0x60,0x41,0x7A,0x01, 0x01,0x00,0x7E,0x12,0x01,0xB0,0xA1,0x41,0x49,0x2C,0x80,0x01,0x84,0x28,0x27,0x01, 0x01,0xB0,0xE2,0x41,0x01,0xB0,0x13,0x42,0x01,0xB0,0x54,0x42,0x01,0xB0,0xA5,0x42, 0x7E,0x12,0x01,0xB0,0xF6,0x42,0x5A,0x20,0x03,0x68,0x73,0x12,0x79,0x01,0x5B,0x20, 0x03,0x68,0x73,0x12,0x79,0x01,0x6E,0x20,0x03,0x68,0x73,0x12,0x79,0x01,0x25,0x12, 0x01,0xB0,0x4A,0x24,0x01,0xB0,0x27,0x43,0x84,0x28,0x04,0x68,0x64,0x0A,0x01,0xB0, 0x68,0x43,0x00,0xB0,0x2D,0xCA,0x01,0x00,0x84,0x28,0x00,0xB0,0xFB,0xE1,0x49,0x2C, 0x02,0x68,0x75,0x01,0x01,0x00,0x84,0x28,0x06,0x68,0x39,0x25,0x03,0x68,0x86,0x01, 0x02,0x60,0x78,0x01,0x49,0x2C,0x7E,0x01,0x00,0xB0,0xD0,0xC5,0x00,0xB0,0xAD,0xD3, 0x01,0xB0,0xC9,0x43,0x39,0x25,0x02,0x68,0x0C,0x60,0x84,0x28,0x07,0x68,0x49,0x2C, 0x03,0x68,0x78,0x01,0x02,0x60,0x86,0x01,0x04,0x60,0x49,0x2C,0x02,0x68,0x75,0x01, 0x88,0x28,0x00,0xB0,0x4A,0xC4,0x01,0xB0,0x0A,0x44,0x84,0x2D,0x07,0x00,0x23,0x01, 0x84,0x28,0x06,0x68,0x39,0x25,0x03,0x68,0x23,0x01,0x02,0x60,0x86,0x01,0x00,0xB0, 0xD0,0xC5,0x00,0xB0,0x4A,0xC4,0x00,0xA1,0x99,0x37,0x4B,0x01,0x5E,0xAA,0x00,0xA2, 0x12,0x02,0x4B,0x09,0x5E,0xAA,0x01,0xB0,0x4B,0x44,0x21,0xF3,0x8C,0x44,0x26,0x05, 0x82,0x28,0x01,0xB0,0x53,0x22,0x01,0xB0,0xAE,0x20,0x82,0x28,0x00,0xB0,0x19,0xEB, 0x00,0xB0,0x3C,0xE2,0x82,0x28,0x00,0xB0,0x34,0xDB,0x01,0xB0,0x05,0x1A,0x82,0x28, 0x0A,0x68,0x83,0x2D,0x07,0x00,0x03,0x68,0x01,0xB0,0x6D,0x16,0x02,0x0D,0x90,0xC9, 0x00,0xB0,0x7D,0xE2,0x00,0xB0,0xB8,0x00,0x82,0x28,0x00,0xB0,0x08,0xE6,0x00,0xB0, 0x7B,0x01,0x82,0x28,0x00,0xB0,0xE3,0xFB,0x00,0xB0,0xFA,0xBB,0x00,0xA1,0xD5,0x03, 0x55,0x05,0x6E,0xAD,0x00,0xA2,0x12,0x22,0x55,0x25,0x6E,0xAD,0x01,0x2F,0x00,0xB0, 0x18,0x3F,0x85,0x29,0x05,0x68,0x00,0xB0,0x49,0x3F,0x00,0xF0,0x7A,0x3F,0x00,0xB0, 0x6A,0x40,0x60,0xF9,0x9B,0x40,0x6C,0x12,0x00,0xB0,0xB8,0x00,0x88,0x28,0x01,0xB0, 0x6D,0x16,0x01,0xB0,0x97,0x1A,0x7C,0x12,0x00,0xB0,0x3A,0xCE,0x08,0x3B,0x03,0x2B, 0x00,0xB0,0x19,0xEB,0x00,0xB0,0xF9,0x00,0x01,0x00,0x7C,0x11,0x00,0xB0,0x3C,0xE2, 0x26,0x05,0x00,0xB0,0x3A,0x01,0x01,0x12,0x25,0x01,0x01,0x00,0x26,0x05,0x00,0xB0, 0x61,0xFB,0x7F,0x12,0x00,0xB0,0x68,0xBB,0x08,0x3B,0x03,0x2B,0x00,0xB0,0x9F,0xCF, 0x00,0xB0,0x68,0xBB,0x01,0x00,0x7F,0x11,0x00,0xB0,0xB9,0xBB,0x6F,0x12,0x00,0xB0, 0xFA,0xBB,0x00,0xB0,0xFA,0xBB,0x00,0xB0,0x29,0xD7,0x00,0xB0,0x21,0xBE,0x00,0xB0, 0x24,0xBF,0x01,0xB0,0x97,0x1A,0x00,0xB0,0x17,0xBB,0x26,0x05,0x01,0xB0,0x53,0x22, 0x00,0xB0,0x68,0xBB,0x00,0xB0,0xBC,0x01,0x00,0xB0,0x75,0xDB,0x00,0xB0,0xF9,0x00, 0x00,0xB0,0x52,0xF8,0x00,0xB0,0xFB,0xF5,0x01,0xB0,0x57,0x05,0x00,0xB0,0x7C,0xBC, 0x01,0xB0,0x4D,0x45,0x00,0xB0,0x15,0xEA,0x01,0xB0,0x59,0x15,0x00,0xB0,0x72,0xBE, 0x01,0xB0,0x9E,0x45,0x00,0xB0,0x24,0xBF,0x02,0x0D,0xB0,0xCA,0x1C,0x22,0x00,0xC0, 0x8C,0x9E,0x1D,0x22,0x00,0xC0,0xE1,0x9F,0x1E,0x22,0x00,0xC0,0x80,0xA1,0x1F,0x22, 0x00,0xC0,0x25,0xA3,0x20,0x22,0x00,0xC0,0x8B,0xA4,0x21,0x22,0x00,0xC0,0x3A,0xA6, 0x60,0xC4,0x03,0xA8,0x00,0xB0,0xFE,0xF6,0x00,0xB0,0x19,0xEB,0x00,0xB0,0x19,0xEB, 0x26,0x05,0x00,0xB0,0x3A,0x01,0x00,0xB0,0x7B,0x01,0x00,0xB0,0x7B,0x01,0x01,0xB0, 0x57,0x05,0x00,0xA1,0xD5,0x03,0x49,0x09,0xEE,0xAC,0x00,0xA2,0x12,0x22,0x49,0x09, 0x2E,0xAD,0x02,0x39,0x57,0x39,0x03,0x29,0x06,0x68,0x00,0x37,0x08,0x27,0x02,0x68, 0x02,0x60,0x64,0x01,0x01,0x2F,0x00,0xB0,0x18,0x3F,0x85,0x29,0x05,0x68,0x00,0xB0, 0x49,0x3F,0x00,0xF0,0x7A,0x3F,0x00,0xB0,0x6A,0x40,0x00,0xF0,0x9B,0x40,0x02,0x39, 0x57,0x39,0x39,0x22,0x07,0x68,0x00,0x37,0x08,0x37,0x37,0x20,0x02,0x68,0x02,0x60, 0x56,0x01,0x00,0x91,0x02,0x07,0x01,0x00,0x02,0x39,0x57,0x39,0x03,0x29,0x06,0x68, 0x00,0x37,0x08,0x27,0x02,0x68,0x02,0x60,0x52,0x01,0x00,0x91,0xC4,0x02,0x01,0x00, 0x00,0x91,0x00,0x04,0x85,0x29,0x05,0x68,0x00,0xB0,0x25,0x45,0x30,0xF2,0x56,0x45, 0x01,0x00,0x00,0xA1,0x19,0x03,0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01, 0x62,0xA2,0x00,0x29,0xC0,0xC3,0xFA,0x47,0x30,0x32,0x2F,0x32,0x31,0x22,0x00,0xC0, 0x02,0x89,0x00,0xC5,0x2E,0x8B,0x02,0x0D,0x8B,0xCA,0x00,0xA1,0x19,0x03,0xA9,0x05, 0x54,0x5A,0x00,0xA2,0x05,0x12,0x09,0x01,0x54,0x49,0x85,0x29,0x05,0x68,0x00,0xB0, 0xDF,0x43,0x00,0xF5,0x6E,0x41,0x01,0xB0,0xEF,0x45,0x00,0xF5,0x6E,0x41,0x02,0x0D, 0xBE,0xC9,0x02,0x2B,0x45,0x01,0x00,0x91,0x8A,0x02,0x01,0x00,0x7C,0x11,0x01,0xB0, 0x20,0x46,0x02,0x0D,0x90,0xC9,0x00,0xB0,0x4A,0xC4,0x0D,0x11,0x00,0xB0,0xF9,0x00, 0x0D,0x11,0x00,0xB0,0x3C,0xE2,0x00,0xB0,0x3C,0xE2,0x6F,0x11,0x00,0xB0,0x7B,0x01, 0x6F,0x11,0x00,0xB0,0x68,0xBB,0x00,0xB0,0x3B,0xBC,0x6F,0x11,0x00,0xB0,0xFA,0xBB, 0x83,0x2D,0x08,0x00,0x03,0x00,0x2F,0x01,0x01,0x00,0x00,0xB0,0x17,0xBB,0x00,0xB0, 0xB9,0xBB,0x00,0xB0,0xAA,0xE6,0x00,0xB0,0x50,0xF2,0x26,0x05,0x01,0xB0,0x61,0x46, 0x01,0xB0,0xDC,0x1B,0x01,0xB0,0x2D,0x1C,0x04,0x0D,0x90,0xC9,0x83,0xCC,0x8B,0x28, 0x01,0xB0,0xA2,0x46,0x01,0xB0,0xE3,0x46,0x01,0x00,0x08,0x0D,0x90,0xC9,0x83,0xCC, 0x8A,0xCA,0x83,0xCC,0x01,0xB0,0x24,0x47,0x07,0x0D,0xCC,0x6F,0xC9,0x83,0xCC,0xAA, 0x00,0x83,0x01,0xB0,0x75,0x47,0x00,0xB0,0x4A,0xC4,0x02,0x29,0x01,0x01,0x00,0xB0, 0x4A,0xC4,0x00,0xB0,0xD6,0xBA,0x00,0xB0,0x5F,0xEC,0x00,0xB0,0xF9,0x00,0x26,0x05, 0x00,0xB0,0xAA,0xE6,0x02,0x29,0x39,0x01,0x26,0x05,0x00,0xB0,0xAA,0xE6,0x00,0xB0, 0x8F,0xC5,0x00,0xB0,0xFA,0xBB,0x88,0x28,0x89,0x28,0x02,0x29,0x3A,0x01,0x00,0xB0, 0x42,0xE9,0x26,0x05,0x00,0xB0,0x21,0xBE,0x26,0x05,0x00,0xB0,0x72,0xBE,0x26,0x05, 0x01,0xB0,0xE6,0x47,0x00,0xB0,0x6F,0xBD,0x01,0xB0,0x57,0x48,0x00,0x91,0xFF,0x05, 0x01,0x0D,0x00,0x78,0x01,0x00,0x00,0x91,0x80,0x05,0x01,0x0D,0x00,0x73,0x01,0x00, 0x02,0x0D,0xBE,0xC9,0x00,0xA1,0xD5,0x03,0x4F,0x05,0x62,0xAA,0x00,0xA2,0x12,0x02, 0x4F,0x09,0x62,0xAA,0x01,0x2F,0x00,0xB0,0x0F,0xC1,0x00,0xB0,0x40,0xC1,0x80,0xF2, 0xA7,0x37,0x02,0x0D,0x90,0xC9,0x00,0xB0,0x4A,0xC4,0x02,0x0D,0x90,0xC9,0x02,0x29, 0x01,0x01,0x00,0xB0,0x4A,0xC4,0x84,0x12,0x00,0xB0,0xD6,0xBA,0x04,0x0D,0x90,0xC9, 0x83,0xCC,0x00,0xB0,0x99,0xD2,0x08,0x0D,0x90,0xC9,0x83,0xCC,0x8A,0xCA,0x83,0xCC, 0x01,0xB0,0x24,0x47,0x70,0x11,0x00,0xB0,0x3C,0xE2,0x70,0x11,0x00,0xB0,0xF9,0x00, 0x02,0x0D,0xA8,0xC9,0x01,0xB0,0xA8,0x48,0x26,0x05,0x00,0xB0,0x3A,0x01,0x02,0x0D, 0xA8,0xC9,0x02,0x29,0x01,0x01,0x26,0x05,0x01,0xB0,0xA8,0x48,0x00,0xB0,0x7B,0xCE, 0x28,0x12,0x00,0xB0,0x68,0xBB,0x01,0xB0,0x94,0x22,0x88,0x28,0x89,0x28,0x02,0x29, 0x3A,0x01,0x01,0xB0,0x94,0x22,0x01,0xB0,0x9E,0x45,0x02,0x0D,0x81,0xCA,0x00,0xA1, 0x19,0x03,0x47,0x01,0xDE,0xB9,0x8A,0x29,0x2E,0x01,0x01,0xB0,0xE9,0x48,0x80,0xF7, 0xB2,0x06,0x00,0x91,0x92,0x05,0x02,0x0D,0x83,0xCA,0x01,0x00,0x02,0x0D,0xB2,0xCA, 0x02,0x29,0x26,0x01,0x7D,0x20,0x04,0x68,0x1E,0x0A,0x01,0xB0,0x2A,0x49,0x7E,0x20, 0x01,0xB0,0xA9,0x3F,0x7F,0x20,0x01,0xB0,0x6B,0x49,0x01,0xB0,0xAC,0x49,0x7C,0x12, 0x26,0x05,0x00,0xB0,0x3A,0x01,0x00,0xB0,0x19,0xEB,0x02,0x0D,0xA8,0xC9,0x01,0xB0, 0xA8,0x48,0x00,0xB0,0xD6,0xBA,0x00,0xB0,0xCA,0xE1,0x01,0xB0,0xDD,0x49,0x00,0xB0, 0xE3,0xFB,0x00,0xB0,0xCD,0xBC,0x00,0xB0,0xDE,0xE7,0x00,0xB0,0x3F,0xF7,0x01,0xB0, 0x9E,0x25,0x01,0xB0,0x1E,0x4A,0x01,0xB0,0x8F,0x4A,0x01,0xB0,0xE0,0x4A,0x01,0xB0, 0x9B,0x24,0x01,0xB0,0x31,0x4B,0x01,0xB0,0x92,0x4B,0x01,0xB0,0xE3,0x4B,0x8A,0x29, 0x2E,0x01,0x06,0x6A,0x10,0xDF,0xC7,0x04,0x10,0xDF,0xF8,0x04,0x10,0xDF,0x29,0x05, 0x10,0xDF,0x5A,0x05,0x10,0xDF,0x8B,0x05,0x10,0xDF,0xBC,0x05,0x02,0x27,0xE0,0xEC, 0xED,0x05,0x2F,0x30,0x30,0x30,0x31,0x20,0x00,0xB0,0x88,0x0B,0x00,0xB0,0xB9,0x0B, 0x00,0x91,0xCE,0x00,0x00,0xA2,0x12,0x02,0x00,0x20,0x00,0x00,0x01,0x00,0x00,0x91, 0xB4,0x01,0x00,0xA2,0x12,0x22,0x53,0x29,0x54,0x41,0x01,0x00,0x00,0x91,0xDC,0x01, 0x00,0xA2,0x92,0x32,0x53,0x29,0x62,0xA2,0x01,0x00,0x00,0x91,0xE2,0x06,0x00,0xA2, 0xD2,0x13,0x49,0x21,0x54,0x41,0x01,0x00,0x00,0x91,0xF5,0x06,0x00,0xA2,0x92,0x12, 0x4F,0x21,0x62,0xA4,0x01,0x00,0x00,0x91,0x15,0x06,0x00,0xA2,0x92,0x12,0x4D,0x21, 0x62,0xA2,0x01,0x00,0x00,0x91,0x6A,0x05,0x00,0xA2,0x12,0x02,0x4B,0x21,0x54,0x41, 0x01,0x00,0x00,0xA1,0x19,0x03,0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x21, 0x62,0xA2,0x20,0xC3,0x3D,0x53,0x00,0xA1,0x19,0x03,0x4D,0x01,0x6A,0xAC,0x00,0xA2, 0x12,0x02,0x4D,0x21,0x6A,0xAC,0x00,0xC0,0x3D,0x58,0x00,0xA2,0x12,0x22,0x49,0x29, 0x54,0x49,0x1F,0x22,0x05,0x68,0x00,0xB0,0x06,0x35,0x00,0xF0,0x78,0x33,0x00,0xB0, 0xC9,0x35,0x00,0xF0,0x78,0x33,0x00,0x91,0x02,0x07,0x00,0xA1,0xD5,0x03,0x4F,0x09, 0x62,0xAC,0x00,0xA2,0x12,0x02,0x4F,0x29,0x62,0xAC,0x01,0x00,0x00,0xA2,0x88,0x14, 0x49,0x2D,0x62,0xAA,0x1F,0x22,0x09,0x68,0x00,0xA1,0x19,0x03,0x47,0x01,0x62,0xAA, 0x01,0xB0,0x34,0x4C,0x00,0xF0,0xB2,0x06,0x01,0xB0,0x65,0x4C,0x00,0xF0,0xB2,0x06, 0x00,0xA1,0x19,0x03,0xA9,0x01,0x54,0x5A,0x00,0xA2,0x19,0x12,0x09,0x21,0x54,0x49, 0x85,0x29,0x05,0x68,0x00,0xB0,0xDF,0x43,0x00,0xF0,0x6E,0x41,0x00,0xB0,0x72,0x44, 0x00,0xF0,0x6E,0x41,0x00,0xA2,0x19,0x12,0x0D,0x21,0x62,0xAA,0x85,0x29,0x05,0x68, 0x00,0xB0,0xC9,0x47,0x00,0xF0,0xFA,0x47,0x00,0xB0,0xA7,0x4A,0x00,0xF0,0xFA,0x47, 0x00,0xA1,0x19,0x03,0x4B,0x21,0xE8,0xAB,0x00,0xA2,0x12,0x22,0x4B,0x09,0xE8,0xAB, 0x85,0x29,0x05,0x68,0x00,0xB0,0x94,0x4D,0x00,0xF0,0x09,0x4B,0x00,0xB0,0xC5,0x4D, 0x00,0xF0,0x09,0x4B,0x88,0x28,0x82,0x28,0x23,0x22,0x01,0x01,0x80,0x28,0x00,0xB0, 0xFE,0xF6,0x00,0xB0,0xD6,0xBA,0x00,0xB0,0x19,0xEB,0x26,0x05,0x00,0xB0,0x3A,0x01, 0x00,0xB0,0x7B,0x01,0x00,0xB0,0xFA,0xBB,0x00,0xA1,0xD5,0x1A,0x4D,0x05,0x60,0xAA, 0x00,0xA2,0x92,0x12,0x4D,0x01,0x60,0xA2,0x85,0x29,0x01,0xC0,0x96,0x4C,0x01,0xC0, 0x96,0x4C,0x00,0xA1,0xD5,0x03,0x4D,0x01,0xEE,0xBC,0x00,0xA2,0x92,0x12,0x4D,0x01, 0x6E,0xBD,0x85,0x29,0x00,0xC0,0x42,0x77,0x57,0x29,0x00,0xC0,0x71,0x78,0x37,0x22, 0x00,0xC0,0x73,0x7B,0x60,0xC4,0xFF,0x7C,0x00,0xB0,0x86,0xF9,0x00,0xB0,0xF9,0x00, 0x00,0xB0,0x17,0xBB,0x00,0xB0,0x68,0xBB,0x00,0xB0,0x8F,0xC5,0x01,0xB0,0x57,0x48, 0x01,0xB0,0xE6,0x47,0x01,0xB0,0xC5,0x2B,0x00,0xB0,0xB9,0xFD,0x00,0xA2,0x12,0x02, 0x4B,0x01,0x54,0x41,0x00,0xC0,0xC0,0x82,0x26,0x05,0x3A,0x20,0x00,0xD0,0x04,0xC7, 0x00,0xB0,0x52,0xF8,0x26,0x05,0x00,0xB0,0x79,0xF5,0x00,0xB0,0x3A,0xCE,0x70,0x11, 0x00,0xB0,0xB8,0xCD,0x00,0xB0,0x17,0xBB,0x0D,0x10,0x01,0xB0,0xB8,0x28,0x02,0x0D, 0x99,0xC9,0x01,0xB0,0x53,0x04,0x01,0xB0,0xD9,0x4C,0x01,0xB0,0x2A,0x4D,0x02,0x0D, 0x89,0xCA,0x01,0xB0,0x6B,0x4D,0x01,0xB0,0xC8,0x23,0x01,0xB0,0xAC,0x4D,0x00,0xB0, 0xB1,0xD4,0x82,0x28,0x88,0x28,0x01,0xB0,0x2C,0x16,0x01,0xB0,0x97,0x1A,0x00,0xB0, 0xFB,0xE1,0x01,0xB0,0xDD,0x4D,0x00,0xB0,0x7B,0x01,0x00,0xB0,0x68,0xBB,0x00,0xB0, 0x24,0xFC,0x00,0xB0,0xFA,0xBB,0x00,0xA1,0x19,0x03,0xB3,0x01,0x6E,0xBD,0x00,0xA2, 0x92,0x12,0xB3,0x01,0x6E,0xBD,0xC1,0xC3,0x1E,0x4E,0x00,0xB0,0x37,0xD2,0x00,0xB0, 0xCA,0xE1,0x26,0x05,0x00,0xB0,0x79,0xF5,0x26,0x05,0x3A,0x20,0x00,0xD0,0x04,0xC7, 0x00,0xB0,0x3A,0x01,0x01,0xB0,0x18,0x15,0x01,0xB0,0x30,0x50,0x01,0xB0,0x71,0x50, 0x01,0xB0,0xB2,0x50,0x0D,0x10,0x00,0xB0,0x3C,0xE2,0x00,0xB0,0x17,0xBB,0x00,0xB0, 0x3A,0xCE,0x01,0xB0,0xF3,0x50,0x01,0xB0,0xF3,0x50,0x01,0xB0,0xD1,0x03,0x01,0xB0, 0xD1,0x03,0x00,0xB0,0x7B,0x01,0x00,0xB0,0xFB,0xF5,0x00,0xB0,0x42,0xE9,0x00,0xB0, 0xFA,0xBB,0x02,0x0D,0x89,0xCA,0x01,0xB0,0x34,0x51,0x04,0x0D,0x89,0xCA,0x90,0xCB, 0x01,0xB0,0x75,0x51,0x26,0x05,0x00,0xB0,0x35,0xE0,0x26,0x05,0x01,0xB0,0xC6,0x51, 0x26,0x05,0x00,0xB0,0xBC,0xC9,0x04,0x0D,0x89,0xCA,0xAA,0xC9,0x26,0x05,0x00,0xB0, 0xB9,0xFD,0x01,0xB0,0x17,0x52,0x01,0xB0,0x68,0x52,0x26,0x05,0x00,0xB0,0xAA,0xE6, 0x26,0x05,0x25,0x12,0x00,0xB0,0x61,0xFB,0x26,0x05,0x00,0xB0,0xF9,0xCD,0x26,0x05, 0x6D,0x12,0x00,0xB0,0xF9,0xCD,0x00,0xB0,0x3C,0xE2,0x00,0xB0,0xB6,0xDB,0x01,0xB0, 0x2C,0x16,0x23,0x12,0x00,0xB0,0x2F,0xD4,0x01,0xB0,0x30,0x21,0x72,0x12,0x00,0xB0, 0xC4,0xE9,0x00,0xB0,0xE3,0xFB,0x28,0x12,0x00,0xB0,0xFA,0xBB,0x01,0xB0,0xD9,0x52, 0x75,0x12,0x00,0xB0,0x86,0xF9,0x01,0xB0,0x1A,0x53,0x77,0x12,0x01,0xB0,0x1A,0x53, 0x00,0xB0,0xD4,0xDF,0x79,0x12,0x00,0xB0,0xD4,0xDF,0x00,0xB0,0x72,0xBE,0x7B,0x12, 0x00,0xB0,0x72,0xBE,0x00,0xB0,0x0A,0xFE,0x7D,0x12,0x00,0xB0,0x0A,0xFE,0x01,0xB0, 0x5B,0x53,0x7F,0x12,0x01,0xB0,0x5B,0x53,0x01,0xB0,0x9C,0x53,0x81,0x12,0x01,0xB0, 0x9C,0x53,0x00,0xB0,0x24,0xBF,0x00,0xB0,0x86,0xF9,0x02,0x0D,0x23,0x6D,0x00,0xA2, 0x12,0x22,0x4B,0x09,0x54,0x41,0x01,0xB0,0xED,0x53,0x02,0x0D,0x23,0x6E,0x00,0xA2, 0x92,0x32,0x4D,0x09,0x62,0xA2,0x06,0x6A,0x00,0xD0,0xB1,0x26,0x00,0xD0,0xF2,0x26, 0x00,0xD0,0x33,0x27,0x00,0xD0,0x74,0x27,0x00,0xD0,0xB5,0x27,0x00,0xD0,0xF6,0x27, 0x01,0xB0,0x2E,0x54,0x03,0x0D,0xB2,0xC9,0x00,0x23,0x00,0xA2,0x12,0x62,0x51,0x0D, 0x6E,0xBD,0x01,0xB0,0x6F,0x54,0x03,0x0D,0x8B,0xC5,0x00,0x23,0x00,0xA2,0x94,0x32, 0x4B,0x0D,0x6E,0xBD,0x06,0x6A,0x00,0xD0,0x6F,0x2E,0x00,0xD0,0xA0,0x2E,0x00,0xD0, 0xD1,0x2E,0x00,0xD0,0x02,0x2F,0x00,0xD0,0x33,0x2F,0x00,0xD0,0x64,0x2F,0x01,0xB0, 0xB0,0x54,0x02,0x0D,0x23,0x6C,0x90,0xC1,0x95,0x94,0x03,0x0D,0x6C,0x74,0x00,0x23, 0x00,0xA1,0xD5,0x03,0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x62,0xA2, 0x21,0xC3,0xF1,0x54,0x02,0x0D,0x23,0x72,0x01,0xB0,0x4B,0x57,0x00,0xF0,0xB2,0x06, 0x00,0xA1,0xD5,0x1A,0x4B,0x05,0x54,0x5A,0x00,0xA2,0x12,0x22,0x49,0x09,0x54,0x4A, 0x00,0xC0,0x78,0x33,0x00,0xA1,0xD5,0x03,0x4D,0x09,0x62,0xAA,0x00,0xA2,0x12,0x02, 0x4D,0x09,0x62,0xAA,0x85,0x29,0x00,0xC0,0x6C,0x36,0x00,0xC5,0xA7,0x37,0x00,0xA1, 0xD5,0x03,0x49,0x09,0xEE,0xAC,0x00,0xA2,0x12,0x22,0x49,0x09,0x2E,0xAD,0x85,0x29, 0x00,0xC0,0x7A,0x3F,0x60,0xC9,0x9B,0x40,0x05,0x92,0xB0,0x5D,0x01,0x00,0x05,0x92, 0x30,0x5E,0x01,0x00,0x05,0x92,0xB0,0x5E,0x01,0x00,0x05,0x92,0x30,0x5F,0x01,0x00, 0x05,0x92,0xB0,0x5F,0x05,0x93,0x30,0x60,0x01,0x00,0x04,0x92,0xCC,0x88,0x05,0x93, 0xB0,0x60,0x01,0x00,0x05,0x92,0x30,0x5E,0x01,0x00,0x01,0xB0,0x20,0x46,0x00,0xB0, 0x09,0xC4,0x00,0xB0,0x5F,0xEC,0x00,0xB0,0xF9,0x00,0x26,0x05,0x3A,0x25,0x00,0xD0, 0xFC,0x1E,0x43,0x32,0x50,0x22,0x01,0xB0,0x19,0x1B,0x00,0xB0,0x61,0xFB,0x01,0x00, 0x75,0x32,0x44,0x22,0x37,0x0A,0x02,0x60,0x64,0x0A,0x00,0xB0,0x7B,0xCE,0x75,0x32, 0x44,0x22,0x37,0x0A,0x02,0x60,0x64,0x0A,0x00,0xB0,0x68,0xBB,0x75,0x32,0x44,0x22, 0x3C,0x0A,0x02,0x60,0x78,0x0A,0x01,0xB0,0xD9,0x05,0x75,0x32,0x44,0x22,0x3C,0x0A, 0x02,0x60,0x5A,0x0A,0x01,0xB0,0x4C,0x58,0x75,0x32,0x44,0x32,0x43,0x32,0x50,0x22, 0x3C,0x0A,0x02,0x60,0x64,0x0A,0x00,0xB0,0x34,0xDB,0x01,0xB0,0x8D,0x58,0x01,0xB0, 0xCE,0x58,0x00,0xB0,0x21,0xBE,0x01,0xB0,0x9C,0x06,0x01,0xB0,0x9C,0x06,0x00,0xB0, 0x72,0xBE,0x00,0xB0,0xC3,0xBE,0x00,0xB0,0x7D,0xD8,0x00,0xB0,0x24,0xBF,0x00,0xB0, 0x95,0xBF,0x01,0xB0,0x1F,0x59,0x01,0xB0,0x70,0x59,0x00,0xB0,0x89,0xC8,0x00,0xB0, 0x6F,0xBD,0x01,0xB0,0x57,0x48,0x00,0xB0,0xC0,0xBD,0x00,0xB0,0x3F,0xF7,0x00,0xB0, 0x2C,0xE7,0x01,0xB0,0xD1,0x59,0x01,0xB0,0x03,0x01,0x00,0xB0,0xDF,0xCA,0x01,0xB0, 0x24,0x47,0x01,0xB0,0x32,0x5A,0x01,0xB0,0xE3,0x4B,0x01,0xB0,0x83,0x5A,0x01,0xB0, 0xD4,0x5A,0x00,0xB0,0x7D,0xD8,0x01,0xB0,0x75,0x47,0x00,0xB0,0xDE,0xE7,0x61,0xB4, 0x25,0x5B,0x00,0xA1,0x0F,0x13,0x53,0x01,0xEE,0xBC,0x00,0xA2,0x92,0x12,0x53,0x01, 0x6E,0xBD,0x51,0xC0,0x66,0x5B,0x00,0xA1,0x0F,0x13,0x4D,0x01,0x62,0xAA,0x01,0xB0, 0xD9,0x5B,0x00,0xA1,0xCF,0x13,0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01, 0x62,0xA2,0x21,0xC3,0x1A,0x5C,0x00,0xA1,0xCF,0x13,0x4D,0x01,0xEE,0xBC,0xA1,0xC0, 0x96,0x5D,0x00,0xA1,0xCF,0x13,0x4D,0x05,0x62,0xAA,0x00,0xA2,0x0F,0x32,0x4D,0x09, 0x62,0xAA,0x01,0xC0,0x52,0x5E,0x00,0xA1,0xCF,0x33,0x55,0x01,0xF6,0xDD,0x00,0xA2, 0x0F,0x12,0x33,0x25,0xF6,0xDD,0x51,0xC0,0xBB,0x5F,0x00,0xA1,0xD5,0x1A,0x4B,0x01, 0x54,0x73,0x00,0xA2,0xD2,0x12,0x49,0x01,0x54,0x41,0xA0,0xC0,0xCE,0xAE,0x00,0xA1, 0xCF,0x3A,0x4B,0x01,0x54,0x73,0x00,0xA2,0x8F,0x32,0x4D,0x09,0x62,0xA2,0x00,0xB0, 0xA2,0x2A,0x00,0xA1,0x0F,0x1C,0x4D,0x05,0x9E,0xA2,0x00,0xA2,0x8F,0x12,0x4D,0x01, 0x5E,0xA2,0x85,0x29,0x51,0xC0,0x96,0x4C,0x60,0xC4,0x2F,0x6F,0x05,0x92,0xB0,0x5D, 0x01,0x00,0x05,0x92,0x30,0x5E,0x05,0x93,0xB0,0x60,0x01,0x00,0x05,0x92,0x30,0x5F, 0x01,0x00,0x04,0x92,0xCC,0x88,0x01,0x00,0x04,0x92,0xCC,0x88,0x05,0x93,0xB0,0x60, 0x01,0x00,0x04,0x92,0xCC,0x88,0x05,0x93,0xB0,0x60,0x01,0x00,0x05,0x92,0xB0,0x5D, 0x01,0x00,0x00,0x91,0x9D,0x20,0x01,0x00,0x00,0x91,0x99,0x20,0x01,0x00,0x00,0x91, 0x97,0x20,0x01,0x00,0x00,0x91,0xC4,0x20,0x01,0x00,0x00,0x91,0xCD,0x20,0x01,0x00, 0x00,0x91,0xA8,0x20,0x00,0xB0,0x8F,0xC5,0x00,0x91,0x01,0x21,0x00,0xB0,0x0A,0xF0, 0x05,0x92,0xB0,0x5D,0x01,0x00,0x05,0x92,0x30,0x5E,0x01,0x00,0x05,0x92,0xB0,0x5E, 0x01,0x00,0x05,0x92,0xB0,0x5E,0x01,0x00,0x05,0x92,0xB0,0x5E,0x01,0x00,0x04,0x92, 0xCC,0x88,0x01,0x00,0x05,0x92,0x30,0x5E,0x01,0x00,0x00,0x91,0x9D,0x20,0x01,0x00, 0x00,0x91,0x99,0x20,0x01,0x00,0x00,0x91,0x97,0x20,0x01,0xB0,0x12,0x61,0x00,0x91, 0xC4,0x20,0x01,0x00,0x00,0x91,0xCD,0x20,0x01,0x00,0x00,0x91,0xA8,0x20,0x00,0xB0, 0x8F,0xC5,0x00,0x91,0x01,0x21,0x00,0xB0,0x0A,0xF0,0x00,0x91,0xBD,0x20,0x00,0xB0, 0xFB,0xDC,0x00,0x91,0xAF,0x20,0x01,0xB0,0x63,0x61,0x05,0x92,0xB0,0x5D,0x01,0x00, 0x05,0x92,0xB0,0x5E,0x01,0x00,0x05,0x92,0xB0,0x5D,0x01,0x00,0x05,0x92,0x30,0x5E, 0x01,0x00,0x05,0x92,0xB0,0x5E,0x01,0x00,0x05,0x92,0xB0,0x5D,0x01,0x00,0x05,0x92, 0x30,0x5E,0x01,0x00,0x00,0xA1,0xD5,0x03,0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12, 0x4D,0x01,0x62,0xA2,0x00,0xC0,0x06,0xAC,0x00,0xA1,0xD5,0x03,0x4D,0x01,0xEE,0xBC, 0x85,0x29,0x00,0xC0,0xE2,0x6F,0x00,0xC0,0x32,0x72,0x00,0xA1,0xD5,0x03,0x4B,0x01, 0xEE,0xAC,0x00,0xA2,0x92,0x12,0x4B,0x05,0x6E,0xBD,0x85,0x29,0x00,0xC0,0x00,0x00, 0x1F,0x22,0x00,0xC0,0x01,0x7A,0x22,0x32,0x33,0x22,0x00,0xC0,0x71,0x78,0x37,0x22, 0x00,0xC0,0x73,0x7B,0x0E,0x22,0x60,0xC4,0xFF,0x7C,0x00,0xC0,0x34,0x7E,0x00,0xA1, 0xD5,0x13,0x4B,0x01,0x54,0x73,0x00,0xA2,0xD2,0x12,0x49,0x05,0x54,0x41,0x85,0x29, 0x00,0xC0,0x00,0x00,0x00,0xC0,0x3A,0x69,0x00,0xA1,0xD5,0x03,0x51,0x01,0x62,0xAA, 0x00,0xA2,0x92,0x12,0x4D,0x05,0x62,0xA2,0x85,0x29,0x00,0xC0,0x00,0x00,0x00,0xC0, 0x22,0x6E,0x01,0xB0,0xD1,0x03,0x01,0xB0,0x71,0x21,0x00,0xB0,0x15,0xEA,0x01,0xB0, 0xA4,0x61,0x01,0xB0,0x25,0x62,0x00,0xB0,0x4A,0xC4,0x00,0xB0,0xDE,0xE7,0x01,0xB0, 0xB6,0x62,0x00,0xB0,0x17,0xBB,0x00,0xB0,0x72,0xBE,0x01,0xB0,0x17,0x63,0x01,0xB0, 0x57,0x48,0x26,0x05,0x31,0x34,0x44,0x24,0x04,0x68,0x4B,0x0A,0x00,0xB0,0xF9,0xCD, 0x00,0xB0,0x3A,0x01,0x01,0xB0,0x98,0x63,0x00,0xB0,0xC0,0xBD,0x02,0x29,0x44,0x01, 0x01,0xB0,0x29,0x64,0x00,0xB0,0x7B,0x01,0x01,0xB0,0x7A,0x64,0x00,0xB0,0xBC,0xC9, 0x00,0xB0,0x6B,0xFE,0x01,0xB0,0xEB,0x64,0x31,0x34,0x44,0x24,0x00,0xB0,0x42,0xE9, 0x00,0xB0,0xFA,0xBB,0x01,0xB0,0x4C,0x65,0x00,0xB0,0x95,0xBF,0x00,0xB0,0xCD,0xBC, 0x01,0xB0,0xAD,0x65,0x00,0xB0,0x4D,0xF1,0x00,0xB0,0x7C,0xBC,0x05,0x92,0xB8,0x97, 0x01,0x00,0x05,0x92,0x30,0x5E,0x01,0x00,0x05,0x92,0xB0,0x5F,0x01,0x00,0x05,0x92, 0x30,0x5E,0x01,0x00,0x05,0x92,0x30,0x5E,0x01,0x00,0x05,0x92,0xB0,0x5E,0x01,0x00, 0x05,0x92,0xB0,0x5E,0x01,0x00,0x05,0x92,0x30,0x5E,0x01,0x00,0x05,0x92,0x30,0x5E, 0x01,0x00,0x05,0x92,0xB0,0x5D,0x01,0x00,0x00,0xA2,0x92,0x32,0x4D,0x09,0x62,0xA2, 0x06,0x6A,0x00,0xD0,0xB1,0x26,0x00,0xD0,0xF2,0x26,0x00,0xD0,0x33,0x27,0x00,0xD0, 0x74,0x27,0x00,0xD0,0xB5,0x27,0x00,0xD0,0xF6,0x27,0x8A,0x29,0x01,0xB0,0xC6,0x13, 0x00,0xB0,0x68,0x28,0x00,0xA2,0x19,0x32,0x57,0x09,0xE6,0xAB,0x06,0x6A,0x00,0xD0, 0x6F,0x2E,0x00,0xD0,0xA0,0x2E,0x00,0xD0,0xD1,0x2E,0x00,0xD0,0x02,0x2F,0x00,0xD0, 0x33,0x2F,0x00,0xD0,0x64,0x2F,0x00,0x27,0x00,0xB0,0xE7,0x2F,0x8A,0x29,0x01,0xB0, 0x0E,0x66,0x01,0x00,0x00,0x91,0xC0,0x00,0x1F,0x24,0x00,0xD0,0x62,0x16,0x00,0xB0, 0xCD,0x18,0x02,0x29,0x12,0x68,0x06,0x6A,0x00,0xD0,0x74,0x20,0x00,0xD0,0xB5,0x20, 0x00,0xD0,0xF6,0x20,0x00,0xD0,0x37,0x21,0x00,0xD0,0x68,0x21,0x00,0xD0,0xB9,0x21, 0x20,0xEE,0xEA,0x21,0x00,0xB0,0x0B,0x22,0x00,0xA2,0x23,0x12,0x00,0x00,0x00,0x00, 0x00,0xB0,0x2C,0x22,0x01,0x00,0x00,0xA1,0xD5,0x1A,0x4B,0x01,0x54,0x73,0x00,0xA2, 0xD2,0x12,0x49,0x01,0x54,0x41,0x00,0xC0,0x71,0x67,0x00,0xA1,0xD5,0x1A,0x4B,0x01, 0x54,0x73,0x00,0xA2,0xD2,0x12,0x49,0x01,0x54,0x41,0x00,0xC0,0x1D,0xAF,0x00,0xA2, 0x12,0x02,0x4B,0x01,0x54,0x41,0x00,0xC0,0xC0,0x82,0x00,0xA1,0x15,0x15,0x4D,0x01, 0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x62,0xA2,0x81,0xC2,0x96,0x4C,0x00,0xA1, 0xD5,0x03,0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x62,0xA2,0x00,0xC0, 0x16,0x6A,0x02,0xA1,0xD5,0x03,0x49,0x05,0xE2,0x9B,0x02,0xA2,0xD2,0x13,0x49,0x05, 0xE2,0x9B,0xB1,0xC4,0x3F,0x66,0x02,0xA1,0xD5,0x03,0x49,0x05,0xE2,0x9B,0x02,0xA2, 0xD2,0x13,0x49,0x05,0xE2,0x9B,0x00,0xC5,0xED,0xB2,0x03,0x0D,0xC9,0x74,0x00,0x95, 0x00,0xA1,0xD5,0x03,0x55,0x01,0xF6,0xDD,0x01,0xC0,0xEE,0x66,0x04,0x0D,0xC9,0x74, 0x68,0x95,0x00,0xA1,0xD5,0x03,0x55,0x01,0xF6,0xDD,0x01,0xC5,0x02,0x69,0x02,0x0D, 0x95,0xC9,0x00,0xA1,0x19,0x03,0x55,0x01,0xF6,0xDD,0x41,0xC1,0x26,0x38,0x00,0xA1, 0x19,0x03,0x49,0x01,0x64,0xAB,0x00,0xA2,0x12,0x02,0x49,0x01,0x64,0xAB,0x85,0x29, 0x20,0xC3,0x2E,0x92,0x20,0xC3,0x2E,0x92,0x00,0xA1,0xD5,0x03,0x4D,0x01,0x62,0xAA, 0x00,0xA2,0x92,0x12,0x4D,0x01,0x62,0xA2,0x61,0xC4,0xD2,0x6B,0x00,0xA1,0xD5,0x03, 0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x62,0xA2,0xC0,0xC3,0x06,0xAC, 0x00,0xA1,0x19,0x03,0x49,0x01,0x64,0xAB,0x00,0xA2,0x12,0x02,0x49,0x01,0x64,0xAB, 0x01,0xC0,0xF0,0x6D,0x00,0xA1,0x19,0x03,0x49,0x01,0x64,0xAB,0x00,0xA2,0x12,0x02, 0x49,0x01,0x64,0xAB,0x01,0xC0,0xEB,0x70,0x01,0xB0,0x0E,0x66,0x44,0x22,0x01,0xB0, 0x23,0x74,0x00,0xB0,0xB8,0x00,0x44,0x22,0x00,0xB0,0x52,0xC6,0x00,0xB0,0x75,0xDB, 0x00,0xB0,0x94,0xE4,0x01,0xB0,0x64,0x74,0x44,0x22,0x01,0xB0,0x05,0x1A,0x00,0xB0, 0x4E,0xCF,0x00,0xB0,0x63,0xCC,0x00,0xB0,0x38,0xF5,0x00,0xB0,0x2C,0xD8,0x44,0x22, 0x00,0xB0,0xCC,0xC4,0x32,0x22,0x01,0xB0,0x53,0x22,0x00,0xB0,0x3A,0x01,0x01,0xB0, 0x16,0x05,0x01,0xB0,0xB5,0x74,0x01,0xB0,0xF6,0x74,0x01,0xB0,0x47,0x75,0x01,0xB0, 0xA8,0x75,0x01,0xB0,0xF9,0x75,0x01,0xB0,0x4A,0x76,0x44,0x22,0x00,0xB0,0x05,0xCD, 0x00,0xB0,0xC4,0xE9,0x01,0xB0,0xAB,0x76,0x00,0xB0,0x7A,0xD7,0x01,0xB0,0xEB,0x64, 0x44,0x22,0x01,0xB0,0x2D,0x1C,0x00,0xB0,0xFA,0xBB,0x01,0xB0,0xEC,0x76,0x01,0xB0, 0xE3,0x4B,0x01,0xB0,0x3D,0x77,0x00,0xB0,0x73,0xED,0x01,0xB0,0x9E,0x77,0x01,0xB0, 0xFF,0x77,0x44,0x22,0x00,0xB0,0xFD,0xEB,0x01,0xB0,0x4D,0x45,0x01,0xB0,0x40,0x17, 0x01,0xB0,0x60,0x78,0x01,0xB0,0xB1,0x78,0x01,0xB0,0x02,0x79,0x00,0xB0,0xB9,0xFD, 0x00,0xB0,0x3A,0x01,0x00,0xB0,0x19,0xEB,0x01,0xB0,0x2C,0x16,0x6C,0x11,0x01,0xB0, 0x97,0x1A,0x00,0xB0,0x7B,0xCE,0x01,0xB0,0xD9,0x05,0x90,0x28,0x02,0x68,0x08,0x60, 0x8B,0x28,0x02,0x68,0x7C,0x01,0x8A,0x29,0x8A,0x2A,0x02,0x68,0x7C,0x01,0x01,0xB0, 0xAE,0x20,0x01,0xB0,0x53,0x22,0x90,0x28,0x02,0x68,0x08,0x60,0x8B,0x28,0x02,0x68, 0x71,0x01,0x8A,0x29,0x8A,0x2A,0x02,0x68,0x71,0x01,0x01,0xB0,0xD9,0x4C,0x00,0xB0, 0x90,0xDE,0x90,0x28,0x02,0x68,0x12,0x60,0x88,0x39,0x8A,0x2D,0x06,0x00,0x07,0x68, 0x57,0x39,0x08,0x39,0x37,0x32,0x40,0x22,0x02,0x68,0x7D,0x01,0x8B,0x28,0x02,0x68, 0x6D,0x01,0x8A,0x29,0x8A,0x2A,0x02,0x68,0x6D,0x01,0x00,0xB0,0x19,0xEB,0x00,0xB0, 0x3C,0xE2,0x01,0xB0,0xB8,0x28,0x00,0xB0,0xCD,0xBC,0x81,0x28,0x88,0x28,0x01,0xB0, 0x2C,0x16,0x00,0xB0,0x01,0xF8,0x90,0x28,0x02,0x68,0x08,0x60,0x8B,0x28,0x02,0x68, 0x6F,0x01,0x8A,0x29,0x8A,0x2A,0x02,0x68,0x6F,0x01,0x00,0xB0,0xE3,0xFB,0x00,0xB0, 0x3B,0xBC,0x02,0x0D,0xAF,0xC9,0x01,0xB0,0x53,0x79,0x90,0x28,0x02,0x68,0x08,0x60, 0x8B,0x28,0x02,0x68,0x6E,0x01,0x8A,0x29,0x8A,0x2A,0x02,0x68,0x6E,0x01,0x00,0xB0, 0x08,0xE6,0x00,0xB0,0x7B,0x01,0x00,0xA1,0xDE,0x13,0x57,0x01,0xF6,0xCC,0x00,0xA2, 0x12,0x02,0x55,0x01,0x76,0xCD,0x85,0x29,0x00,0xC5,0x01,0x7A,0x00,0xC0,0x01,0x7A, 0x01,0x2F,0x00,0xB0,0x23,0x3E,0x00,0xA1,0xD5,0x03,0x55,0x09,0xF6,0xDD,0x00,0xA2, 0x12,0x02,0x55,0x29,0xF6,0xDD,0x02,0x2F,0x05,0x68,0x00,0xB0,0x85,0x3E,0xC0,0xF3, 0x01,0x7A,0x00,0xB0,0xE7,0x3E,0xC0,0xF3,0x01,0x7A,0x02,0x2C,0x02,0x2B,0x10,0x01, 0x00,0x91,0x77,0x00,0x01,0x00,0x01,0xB0,0xAE,0x20,0x39,0x22,0x00,0xB0,0xF9,0xCD, 0x00,0xB0,0xAD,0xD3,0x01,0xB0,0x09,0x24,0x01,0xB0,0xB8,0x28,0x00,0xB0,0x38,0xF5, 0x00,0xB0,0x97,0xD6,0x01,0xB0,0x94,0x79,0x01,0xB0,0xD5,0x79,0x01,0xB0,0x16,0x7A, 0x01,0xB0,0x94,0x22,0x01,0xB0,0xD9,0x4C,0x01,0xB0,0xEF,0x25,0x00,0xB0,0x82,0xD0, 0x00,0xB0,0xD0,0xC5,0x00,0xA1,0x19,0x03,0xAD,0x01,0xEE,0xBC,0x00,0xA2,0x92,0x12, 0xAD,0x01,0x6E,0xBD,0xC0,0xC3,0xE2,0xF2,0x00,0xA1,0xDE,0x13,0x57,0x01,0xF6,0xCC, 0x00,0xA2,0x12,0x02,0x55,0x01,0x76,0xCD,0x85,0x29,0x00,0xC5,0x01,0x7A,0x00,0xC0, 0x01,0x7A,0x00,0xA1,0xD5,0x03,0x55,0x09,0xF6,0xDD,0x00,0xA2,0x12,0x02,0x55,0x29, 0xF6,0xDD,0x01,0x2F,0x00,0xB0,0x23,0x3E,0x00,0xB0,0xE7,0x3E,0xC0,0xF3,0x01,0x7A, 0x0D,0x20,0x17,0x03,0x00,0xB0,0xCA,0xE1,0x23,0x20,0x17,0x03,0x6C,0x11,0x00,0xB0, 0xB8,0x00,0x1E,0x20,0x17,0x03,0x0D,0x11,0x00,0xB0,0x3C,0xE2,0x1E,0x20,0x17,0x03, 0x00,0xB0,0x3C,0xE2,0x1E,0x20,0x17,0x03,0x00,0xB0,0xF9,0x00,0x25,0x20,0x17,0x03, 0x01,0xB0,0xAE,0x20,0x20,0x20,0x17,0x03,0x00,0xB0,0x7B,0x01,0x20,0x20,0x17,0x03, 0x00,0xB0,0x68,0xBB,0x28,0x20,0x17,0x03,0x00,0xB0,0xBC,0x01,0x02,0x27,0x17,0x03, 0x02,0x29,0x17,0x04,0x00,0xB0,0x21,0xBE,0x00,0xB0,0x10,0xFB,0x02,0x27,0x17,0x03, 0x02,0x29,0x17,0x04,0x00,0xB0,0xBC,0xC9,0x02,0x27,0x17,0x03,0x02,0x29,0x17,0x04, 0x00,0xB0,0x0E,0xBD,0x00,0xB0,0xEA,0xC8,0x01,0xB0,0x8D,0x58,0x01,0xB0,0x8D,0x58, 0x0D,0x11,0x6B,0x22,0x01,0xB0,0x57,0x7A,0x01,0xB0,0x8D,0x58,0x0D,0x11,0x00,0xB0, 0xF9,0xCD,0x80,0x28,0x00,0xB0,0x4A,0xC4,0x00,0xB0,0x75,0xDB,0x00,0xB0,0x4A,0xC4, 0x80,0x28,0x00,0xB0,0x4A,0xC4,0x00,0xB0,0x90,0xEC,0x01,0xB0,0x98,0x7A,0x01,0xB0, 0x53,0x04,0x82,0x28,0x00,0xB0,0x19,0xEB,0x00,0xB0,0xF9,0x00,0x3B,0x22,0x05,0x68, 0xE0,0xEC,0x55,0x1A,0x00,0xB0,0xAD,0xD3,0x3C,0x22,0x05,0x68,0x20,0xEE,0x4A,0x1B, 0x00,0xB0,0x4E,0xC5,0x01,0xB0,0xD5,0x04,0x00,0xB0,0xAA,0xE6,0x00,0xB0,0x7C,0xBC, 0x82,0x28,0x00,0xB0,0x9F,0xCF,0x01,0xB0,0x30,0x21,0x00,0xB0,0xFA,0xBB,0x01,0xB0, 0x71,0x21,0x00,0xB0,0x2C,0xD8,0x01,0xB0,0xD9,0x7A,0x01,0xB0,0x2A,0x7B,0x02,0x29, 0x37,0x01,0x01,0xB0,0x7B,0x7B,0x8A,0x29,0x7A,0x01,0x06,0x6A,0x00,0xD0,0xCD,0x1B, 0x00,0xD0,0xFE,0x1B,0x00,0xD0,0x2F,0x1C,0x00,0xD0,0x60,0x1C,0x00,0xD0,0x91,0x1C, 0x00,0xD0,0xD2,0x1C,0x00,0x27,0x00,0xB0,0x13,0x1D,0x01,0xB0,0xCC,0x7B,0x8A,0x29, 0x3B,0x01,0x00,0x91,0xC0,0x00,0x1C,0x20,0xE0,0xEC,0xAC,0x18,0x04,0x60,0x02,0x27, 0x80,0xED,0xAC,0x18,0x01,0xB0,0x0D,0x7C,0x00,0x91,0x5B,0x01,0x00,0xB0,0xE6,0xBF, 0x00,0xA1,0xD5,0x03,0x4B,0x01,0x54,0x73,0x00,0xA2,0xD2,0x13,0x49,0x01,0x54,0x41, 0x85,0x29,0x00,0xC5,0xCE,0xAE,0x37,0x22,0x00,0xC0,0x3C,0x68,0x80,0xC7,0x71,0x67, 0x00,0xA1,0x15,0x1C,0x4B,0x09,0x62,0xAA,0x00,0xA2,0x12,0x02,0x4D,0x09,0x62,0xAA, 0x01,0x2F,0x00,0xB0,0x0A,0x36,0x85,0x29,0x05,0x68,0x00,0xB0,0x3B,0x36,0x00,0xF0, 0x6C,0x36,0x22,0x22,0x05,0x68,0x00,0xB0,0x4D,0x31,0x20,0xF3,0xA7,0x37,0x00,0xB0, 0x76,0x37,0x20,0xF3,0xA7,0x37,0x00,0xA2,0x19,0x12,0x0D,0x01,0x62,0xAA,0x85,0x29, 0x05,0x68,0x00,0xB0,0xC9,0x47,0x00,0xF0,0xFA,0x47,0x00,0xB0,0xA7,0x4A,0x00,0xF0, 0x2E,0x8B,0x03,0x0D,0xCA,0x64,0x00,0x91,0x00,0xA1,0xE3,0x53,0x55,0x09,0xF6,0xDD, 0x01,0x2F,0x00,0xB0,0xE7,0x38,0x85,0x29,0x05,0x68,0x00,0xB0,0x18,0x39,0x00,0xF0, 0xC2,0x73,0x00,0xB0,0xD7,0x3B,0x60,0xF9,0xC2,0x73,0x00,0xA1,0xD5,0x03,0x4D,0x01, 0xEE,0xBC,0x00,0xA2,0x92,0x12,0x4D,0x01,0x6E,0xBD,0x85,0x29,0x00,0xC0,0x42,0x77, 0x00,0xC0,0xFF,0x7C,0x00,0xB0,0x56,0x00,0x00,0xB0,0x3A,0x01,0x00,0xB0,0x86,0xF9, 0x00,0xB0,0x3C,0xE2,0x01,0xB0,0xD1,0x03,0x00,0xB0,0x68,0xBB,0x00,0xB0,0xFA,0xBB, 0x00,0xB0,0xBC,0xEB,0x00,0xB0,0x21,0xBE,0x00,0xB0,0xC3,0xBE,0x00,0xB0,0x85,0xD1, 0x00,0xA1,0xD5,0x03,0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x62,0xA2, 0x01,0xC0,0x40,0x26,0x00,0xA1,0xD5,0x03,0x4D,0x01,0xEE,0xBC,0x85,0x29,0xC1,0xC3, 0x81,0x1E,0x01,0xC0,0x81,0x1E,0x86,0x28,0x32,0x24,0x08,0x68,0x0E,0x36,0x06,0x00, 0x6C,0x26,0x06,0x00,0x03,0x68,0x50,0x0A,0x01,0x00,0x0E,0x36,0x06,0x00,0x6C,0x26, 0x06,0x00,0x06,0x68,0x2F,0x34,0x48,0x24,0x03,0x68,0xEA,0x0C,0x01,0x00,0x0E,0x26, 0x06,0x00,0x0F,0x68,0x2F,0x36,0x09,0x00,0x48,0x36,0x09,0x00,0x56,0x26,0x09,0x00, 0x08,0x68,0x8D,0x28,0x06,0x68,0x6D,0x21,0x03,0x00,0x03,0x68,0xEC,0x0C,0x01,0x00, 0x8A,0x2B,0x6C,0x26,0x06,0x00,0x05,0x68,0x86,0x28,0x03,0x00,0x02,0x68,0x01,0x00, 0x33,0x35,0x6E,0x35,0x22,0x25,0x03,0x68,0xEC,0x0C,0x01,0x00,0x08,0x2B,0x03,0x68, 0xF1,0x0C,0x01,0x00,0x8A,0x2B,0x2F,0x36,0x06,0x00,0x48,0x26,0x06,0x00,0x09,0x68, 0x0E,0x36,0x09,0x00,0x6C,0x26,0x09,0x00,0x04,0x68,0x8D,0x28,0x02,0x68,0xF1,0x0C, 0x08,0x2B,0x0E,0x26,0x06,0x00,0x06,0x68,0x8D,0x28,0x03,0x00,0x83,0x28,0x02,0x68, 0x32,0x0A,0x8A,0x2B,0x3C,0x26,0x06,0x00,0x0E,0x36,0x09,0x00,0x6C,0x26,0x09,0x00, 0x32,0x0A,0x3C,0x20,0x8A,0x2B,0x6C,0x26,0x09,0x00,0x3C,0x0A,0x31,0x24,0x0E,0x26, 0x06,0x00,0x32,0x26,0x09,0x00,0x32,0x0A,0x8A,0x2B,0x39,0x26,0x06,0x00,0x46,0x0A, 0x01,0x00,0x28,0x26,0x08,0x00,0x3C,0x26,0x0A,0x00,0x03,0x68,0xAF,0x0A,0x01,0x00, 0x28,0x26,0x08,0x00,0x3C,0x25,0x06,0x68,0x88,0x28,0x03,0x00,0x03,0x68,0xA2,0x0A, 0x01,0x00,0x86,0x28,0x0E,0x68,0x50,0x0A,0x8A,0x2B,0x8A,0x2D,0x06,0x00,0x8A,0x2D, 0x09,0x00,0x02,0x68,0x46,0x0A,0x6C,0x24,0x8B,0x2B,0x02,0x68,0x78,0x0A,0x01,0x00, 0x6B,0x25,0x8A,0x2B,0x8A,0x2D,0x06,0x00,0x0E,0x26,0x09,0x00,0x03,0x68,0x37,0x0A, 0x01,0x00,0x0E,0x34,0x6C,0x24,0x70,0x0A,0x8A,0x2B,0x25,0x26,0x06,0x00,0x70,0x0A, 0x8A,0x2B,0x0E,0x36,0x06,0x00,0x6F,0x36,0x06,0x00,0x0E,0x26,0x09,0x00,0x70,0x0A, 0x8A,0x2B,0x6C,0x26,0x06,0x00,0x70,0x0A,0x8A,0x2B,0x0E,0x26,0x06,0x00,0x32,0x26, 0x09,0x00,0x50,0x0A,0x8A,0x2B,0x8A,0x2D,0x06,0x00,0x06,0x68,0x0B,0x26,0x06,0x00, 0x03,0x00,0x02,0x68,0x46,0x0A,0x33,0x35,0x6E,0x35,0x22,0x25,0x09,0x68,0x6C,0x21, 0x03,0x00,0x0E,0x36,0x06,0x00,0x6C,0x26,0x06,0x00,0x02,0x68,0x46,0x0A,0x56,0x24, 0x0E,0x26,0x06,0x00,0x32,0x26,0x09,0x00,0x5A,0x0A,0x51,0x26,0x0A,0x00,0x3C,0x25, 0x8A,0x2B,0x8A,0x2D,0x06,0x00,0x03,0x68,0x37,0x0A,0x01,0x00,0x3C,0x25,0x8C,0x2B, 0x0B,0x68,0x0E,0x26,0x06,0x00,0x03,0x00,0x6C,0x26,0x06,0x00,0x03,0x00,0x03,0x68, 0x32,0x0A,0x02,0x60,0x50,0x0A,0x08,0x2B,0x0F,0x68,0x33,0x25,0x03,0x00,0x22,0x25, 0x03,0x00,0x6E,0x25,0x03,0x00,0x03,0x68,0x46,0x0A,0x06,0x60,0x33,0x35,0x22,0x35, 0x6E,0x25,0x02,0x68,0x37,0x0A,0x8A,0x2B,0x8A,0x2D,0x06,0x00,0x0C,0x68,0x3C,0x24, 0x03,0x00,0x09,0x68,0x22,0x24,0x03,0x00,0x33,0x25,0x03,0x00,0x6E,0x25,0x03,0x00, 0x02,0x68,0x37,0x0A,0x8A,0x2B,0x0E,0x26,0x06,0x00,0x56,0x26,0x09,0x00,0x50,0x0A, 0x33,0x35,0x22,0x35,0x6E,0x25,0x05,0x68,0x8A,0x2B,0x88,0x2B,0x02,0x68,0x37,0x0A, 0x01,0x00,0x00,0xB0,0x56,0xCD,0x02,0x0D,0x99,0xC9,0x10,0x34,0x22,0x24,0x01,0x0D, 0x00,0x20,0x19,0x0A,0x32,0x24,0x07,0x0A,0x8A,0x2C,0x88,0x28,0x07,0x0A,0x25,0x25, 0x88,0x28,0x07,0x0A,0x00,0xB0,0x87,0x00,0x00,0xB0,0x4A,0xC4,0x04,0x0D,0x90,0xC9, 0xAF,0xCC,0x01,0xB0,0x3E,0x7C,0x00,0x91,0x29,0x26,0x00,0xB0,0x61,0xFB,0x00,0x91, 0xC3,0x25,0x26,0x05,0x00,0xB0,0x61,0xFB,0x26,0x05,0x00,0xB0,0xCC,0xC4,0x00,0x91, 0x29,0x26,0x00,0xB0,0xF9,0x00,0x00,0x91,0xC3,0x25,0x00,0xB0,0xF9,0x00,0x88,0x28, 0x0B,0x05,0x6C,0x24,0x70,0x0A,0x33,0x35,0x22,0x35,0x6E,0x25,0x6C,0x26,0x06,0x00, 0x70,0x0A,0x00,0x91,0x29,0x26,0x6E,0x24,0x6C,0x26,0x06,0x00,0x32,0x0A,0x00,0xB0, 0x19,0xEB,0x02,0x0D,0xB5,0xCE,0x00,0x91,0xC3,0x25,0x00,0xB0,0x19,0xEB,0x01,0x0D, 0x00,0x61,0x8A,0x2B,0x0E,0x36,0x06,0x00,0x0D,0x26,0x06,0x00,0x06,0x68,0x32,0x26, 0x09,0x00,0x03,0x00,0x02,0x68,0x70,0x0A,0x0E,0x34,0x6C,0x24,0x82,0x0A,0x00,0x91, 0x29,0x26,0x00,0xB0,0x38,0xF5,0x01,0x0D,0x00,0x61,0x00,0x91,0xC3,0x25,0x00,0xB0, 0x38,0xF5,0x01,0x0D,0x00,0x61,0x00,0x91,0x29,0x26,0x00,0xB0,0xFB,0xE1,0x02,0x0D, 0x61,0x3F,0x00,0x91,0xC3,0x25,0x00,0xB0,0xFB,0xE1,0x00,0x91,0x29,0x26,0x79,0x24, 0x70,0x0A,0x00,0xB0,0x09,0xC4,0x00,0x91,0xC3,0x25,0x00,0xB0,0x09,0xC4,0x0E,0x34, 0x6C,0x34,0x0E,0x36,0x06,0x00,0x6C,0x26,0x06,0x00,0x70,0x0A,0x00,0x91,0x29,0x26, 0x00,0xB0,0xFA,0xBB,0x00,0x91,0xC3,0x25,0x00,0xB0,0xFA,0xBB,0x6C,0x34,0x0E,0x24, 0x70,0x0A,0x6C,0x36,0x06,0x00,0x0E,0x26,0x06,0x00,0x70,0x0A,0x00,0x91,0x29,0x26, 0x00,0xB0,0xFB,0xF5,0x00,0xB0,0xFB,0xF5,0x02,0x0D,0x92,0xC9,0x0E,0x36,0x06,0x00, 0x6C,0x26,0x06,0x00,0x01,0x68,0x6C,0x34,0x0E,0x24,0x01,0x68,0x7D,0x34,0x7E,0x24, 0x70,0x0A,0x00,0x91,0x29,0x26,0x01,0xB0,0x63,0x61,0x00,0x91,0xC3,0x25,0x01,0xB0, 0x63,0x61,0x00,0x91,0x29,0x26,0x00,0xB0,0xBA,0xDC,0x00,0x91,0xC3,0x25,0x00,0xB0, 0xBA,0xDC,0x02,0x0D,0x94,0xC9,0x00,0xB0,0x79,0xDC,0x02,0x0D,0x94,0xC9,0x00,0x91, 0xC3,0x25,0x00,0xB0,0x79,0xDC,0x00,0x91,0x29,0x26,0x00,0xB0,0x7C,0xBC,0x00,0x91, 0xC3,0x25,0x00,0xB0,0x7C,0xBC,0x6C,0x34,0x0E,0x24,0x70,0x0A,0x01,0xB0,0x18,0x15, 0x00,0x91,0x29,0x26,0x00,0xB0,0xBC,0xEB,0x00,0x91,0xC3,0x25,0x00,0xB0,0xBC,0xEB, 0x00,0x91,0x29,0x26,0x00,0xB0,0x34,0xDB,0x00,0x91,0xC3,0x25,0x00,0xB0,0x34,0xDB, 0x6F,0x23,0x03,0x00,0x6C,0x23,0x03,0x00,0x0E,0x23,0x03,0x00,0x8A,0x2B,0x70,0x0A, 0x6F,0x34,0x6C,0x34,0x0D,0x34,0x0E,0x24,0x8C,0x0A,0x88,0x28,0x46,0x0A,0x8A,0x2B, 0x0E,0x36,0x06,0x00,0x6C,0x26,0x06,0x00,0x5F,0x0A,0x00,0xB0,0x21,0xBE,0x37,0x24, 0x01,0x68,0x3C,0x01,0x01,0x00,0x00,0xB0,0x8B,0x18,0x04,0x0D,0x90,0xC9,0xAF,0xCC, 0x02,0x2B,0x6D,0x24,0x03,0x00,0x6C,0x24,0x03,0x00,0x0E,0x24,0x03,0x00,0x33,0x01, 0x6C,0x25,0x88,0x28,0x01,0x01,0x01,0xB0,0x3E,0x7C,0x02,0x0D,0x81,0xCA,0x01,0xB0, 0x6F,0x7C,0x00,0xA1,0x19,0x03,0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01, 0x62,0xA2,0x30,0x32,0x2F,0x32,0x31,0x22,0x00,0xC0,0x02,0x89,0x00,0xC0,0x2E,0x8B, 0x00,0xA1,0xD5,0x1A,0x4B,0x01,0x54,0x73,0x00,0xA2,0xD2,0x12,0x49,0x01,0x54,0x41, 0x85,0x29,0x00,0xC0,0x71,0x67,0x22,0x22,0x60,0xC4,0x5F,0x66,0x33,0x32,0x34,0x22, 0x00,0xC0,0x5F,0x66,0x0E,0x22,0x00,0xC0,0x71,0x67,0x37,0x22,0x00,0xC0,0x3C,0x68, 0x00,0xC0,0x3A,0x69,0x00,0xA1,0xD5,0x03,0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12, 0x4D,0x01,0x62,0xA2,0x22,0x32,0x33,0x32,0x34,0x22,0x00,0xC0,0x46,0x6B,0x88,0x28, 0x01,0x68,0xA0,0xC5,0x22,0x6E,0x88,0x28,0x0B,0x05,0x02,0x2B,0x19,0x68,0x06,0x6A, 0x30,0xDD,0x74,0x20,0x00,0xD0,0xB5,0x20,0xD0,0xDD,0xF6,0x20,0x00,0xD0,0x37,0x21, 0xF0,0xDB,0x68,0x21,0x00,0xD0,0xB9,0x21,0x00,0xA2,0x23,0x12,0x00,0x00,0x00,0x00, 0x20,0xEE,0xEA,0x21,0x00,0x27,0x03,0x68,0x00,0xB0,0x0B,0x22,0x07,0x60,0x00,0xA2, 0x23,0x12,0x00,0x00,0x00,0x00,0x00,0xB0,0x2C,0x22,0x01,0x00,0x00,0xB0,0x56,0x00, 0x00,0xB0,0x3A,0x01,0x88,0x28,0x00,0xB0,0x3C,0xE2,0x00,0xB0,0xB8,0xCD,0x81,0x28, 0x01,0xB0,0x2C,0x16,0x00,0xB0,0x75,0xDB,0x00,0xB0,0x9F,0xCF,0x00,0xB0,0xFA,0xBB, 0x00,0xA1,0xD5,0x03,0x4C,0x05,0x5C,0x8B,0x00,0xA2,0x92,0x12,0x4C,0x01,0x6E,0xBD, 0x85,0x29,0x80,0xC2,0xED,0xB2,0x1E,0x34,0x1F,0x24,0x80,0xC2,0xAE,0xB4,0x20,0x34, 0x21,0x24,0xE1,0xC1,0xB0,0x7C,0x30,0xC2,0x88,0xB6,0x01,0x00,0x00,0xA1,0xD5,0x03, 0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x62,0xA2,0x01,0xC0,0x40,0x26, 0x00,0xA1,0x19,0x03,0x4D,0x09,0xEE,0xBC,0x00,0xA2,0x12,0x22,0x49,0x09,0x2E,0xAD, 0x00,0xB0,0x2A,0x61,0x40,0xF6,0x9C,0x61,0x00,0xA1,0x19,0x03,0x4D,0x09,0xEE,0xBC, 0x00,0xA2,0x12,0x22,0x49,0x09,0x2E,0xAD,0x00,0xB0,0x2A,0x61,0x20,0xF3,0xE2,0xF2, 0x00,0xB0,0x05,0xD6,0x00,0xB0,0x3A,0x01,0x01,0xB0,0x57,0x05,0x00,0xB0,0xFB,0xE1, 0x00,0xB0,0x19,0xEB,0x00,0xB0,0x08,0xE6,0x00,0xB0,0x10,0xFB,0x01,0xB0,0x9E,0x25, 0x02,0x29,0x01,0x01,0x00,0x29,0x7C,0x01,0x6C,0x12,0x00,0xB0,0xD6,0xBA,0x02,0x29, 0x01,0x01,0x00,0x29,0x7C,0x01,0x00,0xB0,0x95,0xBA,0x02,0x29,0x01,0x01,0x00,0x29, 0x7D,0x01,0x00,0xB0,0xF9,0x00,0x02,0x29,0x01,0x01,0x00,0x29,0x7E,0x01,0x00,0xB0, 0x3A,0x01,0x02,0x29,0x01,0x01,0x00,0x29,0x7F,0x01,0x00,0xB0,0x68,0xBB,0x02,0x29, 0x01,0x01,0x00,0x29,0x80,0x01,0x00,0xB0,0xFA,0xBB,0x02,0x29,0x01,0x01,0x00,0xB0, 0x95,0xBA,0x02,0x29,0x01,0x01,0x00,0xB0,0xF9,0x00,0x02,0x29,0x01,0x01,0x00,0xB0, 0x3A,0x01,0x02,0x29,0x01,0x01,0x00,0xB0,0x68,0xBB,0x02,0x29,0x01,0x01,0x00,0xB0, 0xFA,0xBB,0x05,0x92,0x30,0x5E,0x01,0x00,0x05,0x92,0xF0,0xFA,0x01,0x00,0x26,0x05, 0x00,0xB0,0x3A,0x01,0x00,0xB0,0x3C,0xE2,0x00,0xB0,0x90,0xEC,0x00,0xB0,0x7B,0x01, 0x00,0xB0,0xBC,0x01,0x00,0xB0,0xC3,0xBE,0x00,0xB0,0x89,0xC8,0x00,0xB0,0x56,0x00, 0x00,0xB0,0x79,0xF5,0x00,0xB0,0xE3,0xFB,0x81,0x28,0x00,0xB0,0x09,0xC4,0x00,0xB0, 0xB8,0x00,0x6D,0x11,0x00,0xB0,0x3A,0xCE,0x24,0x01,0x01,0x00,0x00,0xB0,0x3C,0xE2, 0x82,0x28,0x0D,0x01,0x00,0xB0,0x3C,0xE2,0x6F,0x11,0x01,0xB0,0xCC,0x10,0x27,0x01, 0x01,0x00,0x00,0xB0,0x7B,0xCE,0x00,0xB0,0x7C,0xBC,0x00,0xB0,0x3A,0x01,0x00,0xB0, 0x19,0xEB,0x01,0xB0,0x2C,0x16,0x00,0xB0,0x7B,0xCE,0x01,0xB0,0xD9,0x05,0x06,0x6A, 0x00,0xD0,0xEF,0x15,0x00,0xD0,0x20,0x16,0x00,0xD0,0x41,0x16,0x60,0xDF,0x62,0x16, 0x00,0xD0,0x93,0x16,0x00,0xD0,0xD4,0x16,0x02,0x27,0x80,0xED,0xAC,0x18,0x01,0xC5, 0xDC,0x7E,0x51,0xB5,0x4A,0x10,0x01,0xB0,0x23,0x84,0x00,0xB0,0x3C,0xE2,0x26,0x05, 0x01,0xB0,0x94,0x04,0x01,0xB0,0xCC,0x10,0x01,0xB0,0x1D,0x11,0x01,0xB0,0x57,0x05, 0x00,0xB0,0xBB,0xFA,0x01,0xB0,0x8F,0x11,0x01,0xB0,0xDC,0x1B,0x01,0xB0,0x53,0x22, 0x00,0xB0,0x19,0xEB,0x88,0x28,0x01,0xB0,0x64,0x84,0x00,0xB0,0xFB,0xE1,0x00,0xB0, 0x7C,0xBC,0x01,0xB0,0xC8,0x23,0x00,0xB0,0xE3,0xFB,0x01,0xB0,0x1D,0x11,0x88,0x28, 0x00,0xB0,0x95,0xBA,0x00,0xB0,0xA2,0xFB,0x02,0x0D,0xAF,0xC9,0x01,0xB0,0x53,0x79, 0x00,0xB0,0x3A,0x01,0x01,0xB0,0x23,0x84,0x00,0xB0,0x8B,0xC4,0x00,0xB0,0xA2,0xFB, 0x00,0xB0,0x79,0xDC,0x00,0xB0,0x68,0xBB,0x00,0xB0,0xBC,0x01,0x26,0x05,0x01,0xB0, 0x53,0x22,0x00,0xB0,0x19,0xEB,0x02,0x0D,0xA8,0xC9,0x01,0xB0,0xB5,0x27,0x49,0x2B, 0x00,0xB0,0xF4,0xF8,0x01,0xB0,0x20,0x46,0x49,0x2B,0x00,0xB0,0xB9,0xEF,0x00,0xB0, 0x56,0xCD,0x01,0xB0,0xDD,0x49,0x00,0xB0,0xE3,0xFB,0x04,0xA1,0xD5,0x03,0x4B,0x01, 0x54,0x73,0x00,0xA2,0xD2,0x13,0x49,0x01,0x54,0x41,0x00,0xC0,0x71,0x67,0x02,0x2C, 0x02,0x2B,0x52,0x01,0x00,0x91,0xC4,0x02,0x01,0x00,0x04,0xA1,0xD5,0x03,0x4D,0x01, 0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x62,0xA2,0x85,0x29,0x00,0xC0,0x16,0x6A, 0x60,0xC4,0x2F,0x6F,0x04,0xA1,0xD5,0x03,0x4D,0x01,0xE4,0x9A,0x85,0x29,0x01,0xC5, 0x81,0x1E,0x01,0xC5,0x81,0x1E,0x06,0xA1,0xD5,0x03,0x4B,0x01,0xA2,0xA2,0x00,0xA2, 0x92,0x12,0x4B,0x01,0x6E,0xBD,0xC1,0xC3,0xA5,0x84,0x1F,0x25,0x63,0x01,0x03,0x60, 0x00,0x91,0xED,0x05,0x01,0x00,0x00,0xB0,0x56,0x00,0x00,0xB0,0x56,0x00,0x26,0x05, 0x00,0xB0,0xAA,0xE6,0x26,0x05,0x00,0xB0,0x3A,0x01,0x00,0xB0,0xF9,0x00,0x00,0xB0, 0xF9,0x00,0x00,0xB0,0x8B,0xC4,0x00,0xB0,0x8B,0xC4,0x00,0xB0,0x95,0xBA,0x01,0xB0, 0x20,0x46,0x00,0xB0,0x7B,0x01,0x00,0xB0,0x7B,0x01,0x00,0xB0,0x68,0xBB,0x00,0xB0, 0x68,0xBB,0x00,0xB0,0xE3,0xFB,0x00,0xB0,0xBC,0x01,0x6D,0x10,0x00,0xB0,0x95,0xBA, 0x00,0xB0,0x95,0xBA,0x00,0xB0,0xF9,0x00,0x00,0xB0,0xF9,0x00,0x01,0xB0,0xAE,0x20, 0x00,0xB0,0x3A,0x01,0x00,0xB0,0x08,0xE6,0x00,0xB0,0x08,0xE6,0x01,0xB0,0x94,0x22, 0x01,0xB0,0x94,0x22,0x01,0xB0,0x16,0x23,0x00,0xB0,0x56,0x00,0x01,0xB0,0x2C,0x16, 0x01,0xB0,0x97,0x1A,0x00,0xB0,0x19,0xEB,0x00,0xB0,0xF9,0x00,0x01,0xB0,0xAE,0x20, 0x00,0xB0,0x3A,0x01,0x00,0xB0,0x68,0xBB,0x00,0xB0,0x68,0xBB,0x01,0xB0,0x94,0x22, 0x01,0xB0,0x94,0x22,0x00,0xB0,0x21,0xBE,0x01,0xB0,0x6E,0x1C,0x04,0x0D,0x88,0xCA, 0xB0,0xCA,0x00,0xA1,0xD5,0x03,0x4B,0x01,0x64,0xAA,0x00,0xA2,0x92,0x12,0x47,0x41, 0x64,0xA2,0x8D,0x24,0x8B,0x01,0x01,0xC5,0x00,0x1D,0x04,0x0D,0x96,0xC9,0xB0,0xCA, 0x00,0xA1,0xD5,0x03,0x4C,0x05,0x64,0xAA,0x00,0xA2,0x12,0x02,0x47,0x45,0x64,0xAA, 0x01,0x2F,0x01,0xB0,0x83,0x12,0x21,0xB3,0x91,0x86,0x01,0xF5,0x00,0x1D,0x00,0xB0, 0xCA,0xE1,0x02,0x0D,0x90,0xC9,0x0D,0x12,0x01,0xB0,0x2C,0x16,0x00,0xB0,0x75,0xDB, 0x01,0xB0,0xB8,0x28,0x01,0xB0,0xB8,0x28,0x00,0xB0,0x3C,0xE2,0x00,0xB0,0x19,0xEB, 0x01,0xB0,0xAE,0x20,0x00,0xB0,0x3A,0x01,0x00,0xB0,0x9F,0xCF,0x00,0xB0,0x9F,0xCF, 0x01,0xB0,0x94,0x22,0x01,0xB0,0x94,0x22,0x01,0xB0,0x16,0x23,0x01,0xB0,0x6E,0x1C, 0x03,0x0D,0xB5,0xE1,0x00,0x90,0x00,0x91,0xB4,0x01,0x01,0x00,0x03,0x0D,0x81,0xE2, 0x00,0xBF,0x00,0x91,0xDC,0x01,0x01,0x00,0x03,0x0D,0xB6,0xE1,0x00,0xAF,0x00,0x91, 0x01,0x02,0x01,0x00,0x03,0x0D,0xB6,0xE1,0x00,0xAE,0x00,0x91,0x27,0x02,0x01,0x00, 0x03,0x0D,0xB5,0xE1,0x00,0x91,0x00,0x91,0x4F,0x02,0x01,0x00,0x02,0x2B,0x02,0x68, 0x06,0x60,0x8A,0x27,0x03,0x68,0x38,0x01,0x02,0x60,0x3B,0x01,0x00,0x91,0xCE,0x00, 0x01,0x00,0x02,0x0D,0xB9,0xC9,0x06,0x6A,0x00,0xD0,0x61,0xC2,0x00,0xD0,0x92,0xC2, 0x00,0xD0,0xC3,0xC2,0x00,0xD0,0x04,0xC3,0x00,0xD0,0x35,0xC3,0x00,0xD0,0x66,0xC3, 0x02,0x27,0x40,0xEC,0xED,0x05,0x00,0xB0,0x60,0x06,0x2E,0x22,0x04,0x68,0x5F,0x0A, 0x01,0xB0,0xC2,0x86,0x01,0xB0,0xF3,0x86,0x00,0xB0,0xF9,0xCD,0x26,0x05,0x01,0xB0, 0x24,0x87,0x26,0x05,0x00,0xB0,0x0D,0xC5,0x37,0x11,0x01,0xB0,0x53,0x04,0x03,0x0D, 0xC9,0x69,0x00,0x99,0x2C,0x05,0x00,0xB0,0xD1,0xEC,0x6D,0x10,0x00,0xB0,0x8B,0xC4, 0x01,0x0D,0x00,0x61,0x01,0xB0,0x97,0x1A,0x04,0x0D,0x91,0xC9,0x90,0xCB,0x2C,0x05, 0x00,0xB0,0x52,0xC6,0x00,0xB0,0x9F,0xCF,0x72,0x11,0x00,0xB0,0x7B,0xCE,0x01,0xB0, 0xD9,0x05,0x00,0xB0,0x11,0xC6,0x00,0xA1,0xD5,0x03,0x4D,0x01,0x62,0xAA,0x00,0xA2, 0x92,0x12,0x4D,0x01,0x62,0xA2,0x85,0x29,0x00,0xC0,0xAE,0xA9,0x00,0xC0,0x06,0xAC, 0x00,0xA1,0xD5,0x03,0x4C,0x01,0xEE,0xAC,0x00,0xA2,0x92,0x12,0x4C,0x01,0x6E,0xBD, 0x85,0x29,0x20,0xC3,0xED,0xB2,0x37,0x22,0x00,0xC0,0x73,0x7B,0xA0,0xC5,0xED,0xB2, 0x00,0xA1,0xD5,0x03,0x4C,0x01,0xEE,0xAC,0x00,0xA2,0x92,0x12,0x4C,0x01,0x6E,0xBD, 0x85,0x29,0x20,0xC3,0xFF,0x7C,0xC0,0xC3,0xFF,0x7C,0x06,0x6A,0x00,0xD0,0xEF,0x15, 0x00,0xD0,0x20,0x16,0x00,0xD0,0x41,0x16,0x60,0xDF,0x62,0x16,0x00,0xD0,0x93,0x16, 0x00,0xD0,0xD4,0x16,0x02,0x27,0x80,0xED,0xAC,0x18,0x01,0xC5,0xDC,0x7E,0x00,0xA1, 0xD5,0x03,0x4B,0x01,0x54,0x73,0x00,0xA2,0xD2,0x13,0x49,0x01,0x54,0x41,0x85,0x29, 0x00,0xC0,0x5B,0x64,0x22,0x22,0x00,0xC0,0x5F,0x66,0x37,0x22,0x00,0xC0,0x3C,0x68, 0x00,0xC0,0x1D,0xAF,0x00,0xA1,0x19,0x03,0x40,0x09,0x76,0x5A,0x00,0xA2,0x12,0x02, 0x40,0x09,0x62,0x5A,0x06,0x6A,0x10,0xDF,0xC7,0x04,0x10,0xDF,0xF8,0x04,0x10,0xDF, 0x29,0x05,0x10,0xDF,0x5A,0x05,0x10,0xDF,0x8B,0x05,0x10,0xDF,0xBC,0x05,0x02,0x27, 0xE0,0xEC,0xED,0x05,0x00,0xB0,0xFF,0x0D,0x40,0xF6,0xDB,0x10,0x0D,0x30,0x6C,0x20, 0x02,0x68,0x05,0x60,0x00,0xB0,0xEA,0x0B,0x00,0xF0,0xB2,0x06,0x01,0x00,0x00,0xA1, 0xD5,0x03,0x4D,0x01,0xEE,0xBC,0x85,0x29,0x00,0xC0,0xE2,0x6F,0x00,0xC0,0x32,0x72, 0x03,0x0D,0xC9,0x74,0x00,0x95,0x00,0xA1,0xE3,0x53,0x55,0x01,0xF6,0xDD,0x85,0x29, 0x00,0xC0,0xC2,0x73,0x00,0xC0,0xC2,0x73,0x26,0x05,0x6C,0x11,0x00,0xB0,0x61,0xFB, 0x26,0x05,0x00,0xB0,0xCC,0xC4,0x00,0xB0,0x19,0xEB,0x00,0xB0,0xA2,0xFB,0x00,0xB0, 0x9F,0xCF,0x00,0xB0,0xCD,0xBC,0x00,0xB0,0xFA,0xBB,0x00,0xB0,0x24,0xFC,0x00,0xB0, 0x7C,0xBC,0x00,0xB0,0x65,0xFC,0x00,0xB0,0xC6,0xFC,0x00,0xB0,0xBC,0xC9,0x00,0xB0, 0x10,0xFB,0x00,0xB0,0x17,0xFD,0x00,0xB0,0x68,0xFD,0x00,0xB0,0xB9,0xFD,0x00,0xB0, 0x0A,0xFE,0x00,0xB0,0x6B,0xFE,0x00,0xB0,0xBC,0xFE,0x00,0xB0,0x0D,0xFF,0x00,0xB0, 0xBF,0xFF,0x01,0xB0,0x10,0x00,0x01,0xB0,0x61,0x00,0x01,0xB0,0xB2,0x00,0x00,0xB0, 0x66,0xEA,0x01,0xB0,0x03,0x01,0x00,0xA1,0x19,0x03,0xA9,0x01,0x54,0x5A,0x00,0xA2, 0x19,0x12,0x09,0x01,0x54,0x49,0x85,0x29,0x00,0xB0,0xDF,0x43,0x00,0xB0,0x72,0x44, 0x00,0xA1,0xD5,0x03,0x4F,0x09,0x62,0x9B,0x00,0xA2,0x92,0x12,0x4F,0x09,0x62,0x9B, 0x01,0x2F,0x00,0xB0,0x0A,0x36,0x85,0x29,0x05,0x68,0x00,0xB0,0x3B,0x36,0x00,0xF0, 0x6C,0x36,0x22,0x22,0x05,0x68,0x00,0xB0,0x4D,0x31,0xC0,0xF3,0x2E,0x38,0x00,0xB0, 0x76,0x37,0xC0,0xF3,0x2E,0x38,0x1C,0x22,0x00,0xC0,0x8C,0x9E,0x1D,0x22,0x00,0xC0, 0xE1,0x9F,0x1E,0x22,0x00,0xC0,0x80,0xA1,0x1F,0x22,0x00,0xC0,0x25,0xA3,0x20,0x22, 0x61,0xC4,0x95,0x01,0x21,0x22,0x01,0xC5,0x95,0x01,0x60,0xC4,0x03,0xA8,0x00,0xB0, 0xB8,0x00,0x00,0xB0,0x19,0xEB,0x00,0xB0,0x3A,0x01,0x00,0xB0,0x68,0xBB,0x00,0xB0, 0xBC,0x01,0x00,0xA1,0xD5,0x03,0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01, 0x62,0xA2,0x85,0x29,0x01,0xC0,0x40,0x26,0x01,0xC0,0x40,0x26,0x00,0xA1,0xD9,0x13, 0x4D,0x05,0x62,0xAA,0x00,0xA2,0x12,0x02,0x4D,0x09,0x62,0xAA,0x01,0x2F,0x00,0xB0, 0x0A,0x36,0x85,0x29,0x05,0x68,0x00,0xB0,0xC9,0x47,0xC1,0xF3,0x40,0x26,0x00,0xB0, 0x9D,0xAE,0xC1,0xF8,0x40,0x26,0x00,0xA1,0xD5,0x03,0x4D,0x01,0x62,0xAA,0x00,0xA2, 0x92,0x12,0x4D,0x01,0x62,0xA2,0x85,0x29,0x00,0xC0,0xAE,0xA9,0x00,0xC0,0x06,0xAC, 0x00,0xA1,0xD9,0x13,0x4D,0x05,0x62,0xAA,0x00,0xA2,0x12,0x02,0x4D,0x09,0x62,0xAA, 0x01,0x2F,0x00,0xB0,0x0A,0x36,0x85,0x29,0x05,0x68,0x00,0xB0,0xC9,0x47,0xC0,0xF3, 0xAE,0xA9,0x00,0xB0,0x9D,0xAE,0xC0,0xF8,0x06,0xAC,0x88,0x28,0x46,0x0A,0x00,0xB0, 0xAD,0xD3,0x88,0x28,0x46,0x0A,0x01,0xB0,0xAB,0x76,0x88,0x28,0x46,0x0A,0x00,0xB0, 0xD8,0xD6,0x88,0x28,0x46,0x0A,0x00,0xB0,0x3B,0xBC,0x00,0xB0,0xA2,0xFB,0x01,0xB0, 0x97,0x1A,0x00,0xB0,0x38,0xF5,0x01,0xB0,0x55,0x87,0x00,0xB0,0x01,0xE9,0x01,0xB0, 0xB6,0x87,0x00,0xB0,0x22,0xDF,0x01,0xB0,0xF7,0x87,0x01,0xB0,0x98,0x05,0x00,0xA1, 0x19,0x03,0xAD,0x01,0xEE,0xBC,0x00,0xA2,0x92,0x12,0xAD,0x01,0x6E,0xBD,0xC0,0xC3, 0xE2,0xF2,0x5C,0x2B,0x02,0x68,0x02,0x60,0x40,0x01,0x00,0x91,0xCE,0x00,0x01,0x00, 0x00,0xB0,0x3A,0x01,0x00,0xB0,0x7C,0xBC,0x00,0xB0,0xBC,0x01,0x00,0xB0,0xAD,0xD3, 0x00,0xB0,0xBC,0xEB,0x00,0xB0,0x08,0xE6,0x02,0x0D,0xAF,0xC9,0x01,0xB0,0x8D,0x58, 0x00,0xB0,0xB8,0xCD,0x3A,0x24,0x03,0x00,0x90,0x28,0x03,0x00,0x09,0x68,0x8D,0x28, 0x02,0x68,0x71,0x01,0x71,0x26,0x08,0x00,0x8E,0x28,0x02,0x68,0x71,0x01,0x00,0xB0, 0x2F,0xD4,0x00,0xB0,0x05,0xD6,0x01,0xB0,0x23,0x84,0x00,0xB0,0xF9,0xCD,0x5C,0x3D, 0x08,0x00,0x5C,0x2D,0x07,0x00,0x6F,0x01,0x70,0x01,0x01,0x00,0x5C,0x3D,0x08,0x00, 0x5C,0x2D,0x07,0x00,0x6C,0x01,0x02,0x60,0x28,0x01,0x01,0x00,0x5D,0x2D,0x07,0x00, 0x6E,0x01,0x02,0x60,0x24,0x01,0x01,0x00,0x5D,0x3D,0x08,0x00,0x5D,0x2D,0x07,0x00, 0x68,0x01,0x00,0x91,0x39,0x05,0x01,0x00,0x5D,0x3D,0x08,0x00,0x5D,0x2D,0x07,0x00, 0x76,0x01,0x02,0x60,0x64,0x01,0x01,0x00,0x5D,0x3D,0x08,0x00,0x5D,0x2D,0x07,0x00, 0x40,0x01,0x00,0x91,0xCE,0x00,0x01,0x00,0x02,0x0D,0x90,0xC9,0x00,0xB0,0x2F,0xD4, 0x02,0x0D,0x9B,0xC9,0x00,0xB0,0x8B,0xC4,0x02,0x0D,0x8C,0xCA,0x00,0xB0,0x79,0xDC, 0x01,0x0D,0x00,0x6F,0x01,0xB0,0xCC,0x10,0x01,0x0D,0x00,0x75,0x00,0xB0,0xFA,0xBB, 0x02,0x0D,0xAF,0xC9,0x01,0xB0,0x16,0x05,0x02,0xA1,0xD5,0x03,0x49,0x05,0xE2,0x9B, 0x02,0xA2,0xD2,0x13,0x49,0x05,0xE2,0x9B,0xB1,0xC4,0x3F,0x66,0x00,0xA1,0x15,0x15, 0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x62,0xA2,0x81,0xC2,0x38,0x88, 0x03,0x0D,0xC9,0x74,0x00,0x95,0x00,0xA1,0xD5,0x03,0x55,0x01,0xF6,0xDD,0x01,0xC0, 0x3E,0x30,0x03,0x0D,0xCA,0x64,0x00,0x91,0x00,0xA1,0xD5,0x03,0x55,0x01,0xF6,0xDD, 0x00,0xB0,0xD7,0x3B,0x00,0xF0,0x0B,0x3D,0x02,0x0D,0xBE,0xC9,0x00,0xA2,0x88,0x14, 0x49,0x0D,0x60,0xAA,0x00,0xA1,0x0A,0x13,0x4D,0x09,0x60,0xAA,0x1F,0x30,0x1E,0x20, 0x00,0xB0,0x39,0x30,0x00,0xB0,0x8A,0x30,0x00,0xB0,0xB8,0x00,0x88,0x28,0x00,0xB0, 0xF7,0xDB,0x00,0xB0,0xF9,0x00,0x00,0xB0,0x3A,0x01,0x00,0xB0,0x68,0xBB,0x01,0xB0, 0x57,0x05,0x00,0xB0,0x21,0xBE,0x03,0x0D,0x6C,0x74,0x00,0x23,0x00,0xA1,0xD5,0x03, 0x4D,0x01,0x62,0xAA,0x00,0xA2,0x92,0x12,0x4D,0x01,0x62,0xA2,0x21,0xC3,0xF1,0x54, } ;
80.933333
105
0.789213
Vladimir-Lin
1ce7b75365e3e4b99c8652be80d82573844775a3
1,831
cpp
C++
test/src/WorldTest.cpp
Konijnendijk/Meadows-ECS
5ee2619481086edaabcfa235e2455686cb854901
[ "BSL-1.0", "MIT" ]
1
2017-11-22T11:39:25.000Z
2017-11-22T11:39:25.000Z
test/src/WorldTest.cpp
Konijnendijk/Meadows-ECS
5ee2619481086edaabcfa235e2455686cb854901
[ "BSL-1.0", "MIT" ]
null
null
null
test/src/WorldTest.cpp
Konijnendijk/Meadows-ECS
5ee2619481086edaabcfa235e2455686cb854901
[ "BSL-1.0", "MIT" ]
null
null
null
#include "catch.hpp" #include "TestCommons.h" #include "World.h" using namespace Meadows; TEST_CASE("Creating entities", "[World][integration]") { World world; auto entity = world.createEntity<TestEntity>(); SECTION("Entity is not initialised") { REQUIRE_FALSE(entity->isInitialized); } SECTION("Entity is initialised after first tick") { world.tick(1.0); REQUIRE(entity->isInitialized); REQUIRE(entity->lastTick == 1.0); } } TEST_CASE("Removing entities", "[World][integration]") { World world; auto dummyEntity1 = world.createEntity<Entity>(); auto dummyEntity2 = world.createEntity<Entity>(); auto isRemoveEntityDestructed = new bool(false); auto removeEntity = world.createEntity<TestEntity>(isRemoveEntityDestructed); auto checkEntity = world.createEntity<TestEntity>(); world.tick(1.0); SECTION("Entity has been ticked") { REQUIRE(removeEntity->lastTick == 1.0); REQUIRE_FALSE(*isRemoveEntityDestructed); REQUIRE(checkEntity->lastTick == 1.0); } SECTION("Entity can be removed") { world.removeEntity(removeEntity); world.tick(2.0); REQUIRE(*isRemoveEntityDestructed); REQUIRE(checkEntity->lastTick == 2.0); } SECTION("Entity can be removed during the same tick") { auto isTickRemoveEntityDestructed = new bool(false); auto tickRemoveEntity = world.createEntity<TestEntity>(isTickRemoveEntityDestructed); REQUIRE(tickRemoveEntity->lastTick == -1.0); REQUIRE_FALSE(*isTickRemoveEntityDestructed); REQUIRE(checkEntity->lastTick == 1.0); world.removeEntity(tickRemoveEntity); world.tick(2.0); REQUIRE(*isTickRemoveEntityDestructed); REQUIRE(checkEntity->lastTick == 2.0); } }
28.169231
93
0.666303
Konijnendijk
1cee59d540ce935b4109ab6bea4f450c6135fa65
5,148
cpp
C++
eqgame_dll/MQ2CleanUI.cpp
Natedog2012/dll
5fb9414a5ebddf9c37809517eaf378a26b422d61
[ "MIT" ]
3
2021-06-25T00:03:25.000Z
2021-11-30T19:45:27.000Z
eqgame_dll/MQ2CleanUI.cpp
Natedog2012/dll
5fb9414a5ebddf9c37809517eaf378a26b422d61
[ "MIT" ]
null
null
null
eqgame_dll/MQ2CleanUI.cpp
Natedog2012/dll
5fb9414a5ebddf9c37809517eaf378a26b422d61
[ "MIT" ]
3
2021-09-21T23:33:31.000Z
2022-02-18T08:13:20.000Z
/***************************************************************************** MQ2Main.dll: MacroQuest2's extension DLL for EverQuest Copyright (C) 2002-2003 Plazmic, 2003-2005 Lax This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ******************************************************************************/ #if !defined(CINTERFACE) //#error /DCINTERFACE #endif #define DBG_SPEW //#define DEBUG_TRY 1 #include "MQ2Main.h" char *OurCaption = "Edge is loading..."; class CDisplayHook { public: VOID CleanUI_Trampoline(VOID); VOID CleanUI_Detour(VOID) { #ifdef DPSPLUGIN OnDPSCleanUI(); #endif DebugTry(CleanUI_Trampoline()); } VOID ReloadUI_Trampoline(BOOL); VOID ReloadUI_Detour(BOOL UseINI) { #ifdef DPSPLUGIN OnDPSReloadUI(); #endif DebugTry(ReloadUI_Trampoline(UseINI)); } /* This function is still in the client; however, it was phased out as of the Omens of War Expansion bool GetWorldFilePath_Trampoline(char *, char *); bool GetWorldFilePath_Detour(char *Filename, char *FullPath) { if (!stricmp(FullPath,"bmpwad8.s3d")) { sprintf(Filename,"%s\\bmpwad8.s3d",gszINIPath); if (_access(Filename,0)!=-1) { return 1; } } bool Ret=GetWorldFilePath_Trampoline(Filename,FullPath); return Ret; } */ }; #ifndef ISXEQ DWORD __cdecl DrawHUD_Trampoline(DWORD,DWORD,DWORD,DWORD); DWORD __cdecl DrawHUD_Detour(DWORD a,DWORD b,DWORD c,DWORD d) { DrawHUDParams[0]=a; DrawHUDParams[1]=b; DrawHUDParams[2]=c; DrawHUDParams[3]=d; if (gbHUDUnderUI || gbAlwaysDrawMQHUD) return 0; int Ret= DrawHUD_Trampoline(a,b,c,d); //PluginsDrawHUD(); if (HMODULE hmEQPlayNice=GetModuleHandle("EQPlayNice.dll")) { if (fMQPulse pEQPlayNicePulse=(fMQPulse)GetProcAddress(hmEQPlayNice,"Compat_DrawIndicator")) pEQPlayNicePulse(); } return Ret; } void DrawHUD() { if (gbAlwaysDrawMQHUD || (gGameState==GAMESTATE_INGAME && gbHUDUnderUI && gbShowNetStatus)) { if (DrawHUDParams[0] && gGameState==GAMESTATE_INGAME && gbShowNetStatus) { DrawHUD_Trampoline(DrawHUDParams[0],DrawHUDParams[1],DrawHUDParams[2],DrawHUDParams[3]); DrawHUDParams[0]=0; } if (HMODULE hmEQPlayNice=GetModuleHandle("EQPlayNice.dll")) { if (fMQPulse pEQPlayNicePulse=(fMQPulse)GetProcAddress(hmEQPlayNice,"Compat_DrawIndicator")) pEQPlayNicePulse(); } } else DrawHUDParams[0]=0; } VOID DrawHUDText(PCHAR Text, DWORD X, DWORD Y, DWORD Argb, DWORD Size) { DWORD sX=((PCXWNDMGR)pWndMgr)->ScreenExtentX; DWORD sY=((PCXWNDMGR)pWndMgr)->ScreenExtentY; CTextureFont* pFont=0; DWORD* ppDWord=(DWORD*)((PCXWNDMGR)pWndMgr)->font_list_ptr; if (ppDWord[1]<=2) { pFont=(CTextureFont*)ppDWord[0]; } else { pFont=(CTextureFont*)ppDWord[2]; } if(Size!=2 && Size<12) pFont->Size=Size; pFont->DrawWrappedText(&CXStr((char*)Text),X,Y,sX-X,&CXRect(X,Y,sX,sY),Argb,1,0); pFont->Size=2; // reset back to 2 or it screws up other HUD sizes } #endif class EQ_LoadingSHook { public: VOID SetProgressBar_Trampoline(int,char const *); VOID SetProgressBar_Detour(int A,char const *B) { SetProgressBar_Trampoline(A,B); } }; //DETOUR_TRAMPOLINE_EMPTY(bool CDisplayHook::GetWorldFilePath_Trampoline(char *, char *)); DETOUR_TRAMPOLINE_EMPTY(VOID EQ_LoadingSHook::SetProgressBar_Trampoline(int, char const *)); DETOUR_TRAMPOLINE_EMPTY(DWORD DrawHUD_Trampoline(DWORD,DWORD,DWORD,DWORD)); DETOUR_TRAMPOLINE_EMPTY(VOID CDisplayHook::CleanUI_Trampoline(VOID)); DETOUR_TRAMPOLINE_EMPTY(VOID CDisplayHook::ReloadUI_Trampoline(BOOL)); VOID InitializeDisplayHook() { DebugSpew("Initializing Display Hooks"); EzDetour(CDisplay__CleanGameUI,&CDisplayHook::CleanUI_Detour,&CDisplayHook::CleanUI_Trampoline); EzDetour(CDisplay__ReloadUI,&CDisplayHook::ReloadUI_Detour,&CDisplayHook::ReloadUI_Trampoline); //EzDetour(CDisplay__GetWorldFilePath,&CDisplayHook::GetWorldFilePath_Detour,&CDisplayHook::GetWorldFilePath_Trampoline); #ifndef ISXEQ // EzDetour(DrawNetStatus,DrawHUD_Detour,DrawHUD_Trampoline); #endif EzDetour(EQ_LoadingS__SetProgressBar,&EQ_LoadingSHook::SetProgressBar_Detour,&EQ_LoadingSHook::SetProgressBar_Trampoline); } VOID ShutdownDisplayHook() { DebugSpew("Shutting down Display Hooks"); RemoveDetour(CDisplay__CleanGameUI); RemoveDetour(CDisplay__ReloadUI); #ifndef ISXEQ RemoveDetour(DrawNetStatus); #endif RemoveDetour(EQ_LoadingS__SetProgressBar); //RemoveDetour(CDisplay__GetWorldFilePath); }
29.586207
126
0.68143
Natedog2012
1cee6d4bcf6fdbd08865fdd724d76f8d43da3742
3,034
cpp
C++
src/controller/Mopidy_mpd_connector.cpp
BFH-AudioStreamer/Streamer-UI
9447826ab293a0a0a6086ddce4117c0735879ede
[ "MIT" ]
null
null
null
src/controller/Mopidy_mpd_connector.cpp
BFH-AudioStreamer/Streamer-UI
9447826ab293a0a0a6086ddce4117c0735879ede
[ "MIT" ]
null
null
null
src/controller/Mopidy_mpd_connector.cpp
BFH-AudioStreamer/Streamer-UI
9447826ab293a0a0a6086ddce4117c0735879ede
[ "MIT" ]
1
2020-05-15T07:54:35.000Z
2020-05-15T07:54:35.000Z
/** ******************************************************************************* * @addtogroup Mopidy_mpd_connector * @{ * @brief Backend connector combining the MPD and Mopidy connector * * @authors Rafael Klossner * @authors Stefan Lüthi ****************************************************************************//* * Copyright (C) 2019 Audio-Streamer Project Group * * 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 <utility> #include "Mopidy_mpd_connector.h" #include "data/Data_player_state.h" /** * @brief Instantiate mpd and mopidy connector * @param app_config Application configuration */ Mopidy_mpd_connector::Mopidy_mpd_connector(const json& app_config) { mpd_connector = new Mpd_connector(app_config); mopidy_connector = new Mopidy_connector(app_config); } /** * @brief Change to next song */ void Mopidy_mpd_connector::play_next() { mpd_connector->play_control(Data_player_state::NEXT); } /** * @brief Change to previous song */ void Mopidy_mpd_connector::play_previous() { mpd_connector->play_control(Data_player_state::PREVIOUS); } /** * @brief Stop playing */ void Mopidy_mpd_connector::play_stop() { mpd_connector->play_control(Data_player_state::STOP); } /** * @brief Pause currently played song */ void Mopidy_mpd_connector::play_toggle_pause() { mpd_connector->play_control(Data_player_state::TOGGLE_PAUSE); } /** * @brief Get player state * @return Player state packet in Data_player_state */ Data_player_state Mopidy_mpd_connector::player_state() { return mpd_connector->player_state(); } /** * @brief Get track info * @return Track information packet in Data_track_info */ Data_track_info Mopidy_mpd_connector::track_info() { Data_track_info data_track_info = mpd_connector->track_info(); data_track_info.album_art_uri = mopidy_connector->album_art_uri(data_track_info.track_uri); return data_track_info; } /** @} */
33.340659
95
0.696111
BFH-AudioStreamer
1cf38a54e01590ebf72ff7eed4790ff0dc36bd83
1,382
cpp
C++
src/util/TimeUtils.cpp
serserar/ModelConverter
23e6237a347dc959de191d4cc378defb0a9d044b
[ "MIT" ]
null
null
null
src/util/TimeUtils.cpp
serserar/ModelConverter
23e6237a347dc959de191d4cc378defb0a9d044b
[ "MIT" ]
null
null
null
src/util/TimeUtils.cpp
serserar/ModelConverter
23e6237a347dc959de191d4cc378defb0a9d044b
[ "MIT" ]
null
null
null
/* * <one line to give the program's name and a brief idea of what it does.> * Copyright (C) 2015 <copyright holder> <email> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * */ #include "TimeUtils.h" using namespace std::chrono; TimeUtils::TimeUtils() { } TimeUtils::~TimeUtils() { } std::uint64_t TimeUtils::currentTimeMillis() { auto ms = duration_cast< milliseconds >( std::chrono::system_clock::now().time_since_epoch() ).count(); return ms; } std::uint64_t TimeUtils::currentTimeSeconds() { auto secs = duration_cast< seconds >( std::chrono::system_clock::now().time_since_epoch() ).count(); return secs; }
27.64
74
0.685962
serserar
1cf75d1381da7d943503fa6f711853a2222dbaf5
693
cpp
C++
alica_tests/autogenerated/src/Plans/constraints/Defend1402488893641Constraints.cpp
hendrik-skubch/alica
fe82928edf3a36df5f07a2258ff21d17ca8fa6d9
[ "MIT" ]
12
2015-06-09T07:19:50.000Z
2018-11-20T10:40:08.000Z
alica_tests/autogenerated/src/Plans/constraints/Defend1402488893641Constraints.cpp
hendrik-skubch/alica
fe82928edf3a36df5f07a2258ff21d17ca8fa6d9
[ "MIT" ]
4
2015-09-10T10:23:33.000Z
2018-04-20T12:07:34.000Z
alica_tests/autogenerated/src/Plans/constraints/Defend1402488893641Constraints.cpp
hendrik-skubch/alica
fe82928edf3a36df5f07a2258ff21d17ca8fa6d9
[ "MIT" ]
4
2016-06-13T12:04:57.000Z
2018-07-04T08:11:35.000Z
#include "Plans/constraints/Defend1402488893641Constraints.h" using namespace std; using namespace alica; /*PROTECTED REGION ID(ch1402488893641) ENABLED START*/ // Add additional using directives here /*PROTECTED REGION END*/ namespace alicaAutogenerated { // Plan:Defend /* * Tasks: * - EP:1402488903550 : DefaultTask (1225112227903) * * States: * - Tackle (1402488903549) * - GetGoal (1402488910751) * - GetBall (1402488959965) * - TryToDefendGoal (1402489037735) * * Vars: */ // State: Tackle // State: Tackle // State: GetGoal // State: GetGoal // State: GetBall // State: GetBall // State: TryToDefendGoal // State: TryToDefendGoal } // namespace alicaAutogenerated
16.5
61
0.720058
hendrik-skubch
1cf79379c223a06d256819031de5b5ad2ff7a08d
1,602
cpp
C++
game/shared/cstrike15/cs_gamerules.cpp
Ochii/source-sdk-csgo
c95b57ce390dcc36d078efc680a3963b27de2f41
[ "Unlicense" ]
4
2018-11-27T23:11:55.000Z
2019-07-23T14:27:08.000Z
game/shared/cstrike15/cs_gamerules.cpp
Ochii/source-sdk-csco
c95b57ce390dcc36d078efc680a3963b27de2f41
[ "Unlicense" ]
null
null
null
game/shared/cstrike15/cs_gamerules.cpp
Ochii/source-sdk-csco
c95b57ce390dcc36d078efc680a3963b27de2f41
[ "Unlicense" ]
2
2019-06-01T15:24:29.000Z
2019-07-23T14:27:09.000Z
#include "stdafx.h" #ifdef CLIENT_DLL #else #include "cs_player.h" #include "cs_gamerules.h" #endif CViewVectors* GetCSViewVectors() { return (CViewVectors*)Addresses::CSViewVectors; } CCSGameRules* CSGameRules() { return (CCSGameRules*) *g_pGameRules; } float CCSGameRules::GetRoundElapsedTime() { return gpGlobals->curtime - m_fRoundStartTime; } bool CCSGameRules::IsFreezePeriod() { return m_bFreezePeriod; } bool CCSGameRules::IsVIPMap() const { //MIKETODO: VIP mode return false; } bool CCSGameRules::IsBombDefuseMap() const { return m_bMapHasBombTarget; } bool CCSGameRules::IsHostageRescueMap() const { return m_bMapHasRescueZone; } bool CCSGameRules::IsLogoMap() const { return m_bLogoMap; } float CCSGameRules::GetBuyTimeLength() const { return (mp_buytime->GetFloat() * 60); } bool CCSGameRules::IsBuyTimeElapsed() { return (GetRoundElapsedTime() > GetBuyTimeLength()); } bool CCSGameRules::CheckWinConditions() { using fn_t = bool(__thiscall*)( CCSGameRules* ); return ((fn_t)Addresses::CheckWinConditions)( this ); } // To implement it myself I would need the entity list to work and it would need more stuff to be reversed and used, fuck it bool CCSGameRules::IsThereABomber() { using fn_t = bool( __thiscall* )(CCSGameRules*); return ((fn_t) Addresses::IsThereABomber)(this); } // Same thing here bool CCSGameRules::IsThereABomb() { using fn_t = bool(__thiscall*)( CCSGameRules* ); return ((fn_t)Addresses::IsThereABomb)( this ); } void CCSGameRules::GiveC4() { using fn_t = void( __thiscall* )(CCSGameRules*); ((fn_t) Addresses::GiveC4)(this); }
18.627907
124
0.739076
Ochii
1cf7a3f1fdd74f7d1020237ae95b9cdc76f36fc5
530
hpp
C++
boost/decode.hpp
isadchenko/brig
3e65a44fa4b8690cdfa8bdaca08d560591afcc38
[ "MIT" ]
null
null
null
boost/decode.hpp
isadchenko/brig
3e65a44fa4b8690cdfa8bdaca08d560591afcc38
[ "MIT" ]
null
null
null
boost/decode.hpp
isadchenko/brig
3e65a44fa4b8690cdfa8bdaca08d560591afcc38
[ "MIT" ]
null
null
null
// Andrew Naplavkov #ifndef BRIG_BOOST_DECODE_HPP #define BRIG_BOOST_DECODE_HPP #include <brig/blob_t.hpp> #include <brig/boost/detail/decode_geometry.hpp> #include <locale> #include <sstream> #include <string> namespace brig { namespace boost { inline std::string decode(const blob_t& wkb) { auto ptr(wkb.data()); std::ostringstream stream; stream.imbue(std::locale::classic()); detail::decode_geometry(ptr, stream); return stream.str(); } } } // brig::boost #endif // BRIG_BOOST_DECODE_HPP
21.2
67
0.70566
isadchenko
1cf84cd204fcc6969a7ea2f9224386ce4ef084a6
14,421
cpp
C++
verilator-4.016/src/V3TraceDecl.cpp
tcovert2015/fpga_competition
26b7a72959afbf8315eb962ec597ba14b4a73dbd
[ "BSD-3-Clause" ]
null
null
null
verilator-4.016/src/V3TraceDecl.cpp
tcovert2015/fpga_competition
26b7a72959afbf8315eb962ec597ba14b4a73dbd
[ "BSD-3-Clause" ]
null
null
null
verilator-4.016/src/V3TraceDecl.cpp
tcovert2015/fpga_competition
26b7a72959afbf8315eb962ec597ba14b4a73dbd
[ "BSD-3-Clause" ]
null
null
null
// -*- mode: C++; c-file-style: "cc-mode" -*- //************************************************************************* // DESCRIPTION: Verilator: Waves tracing // // Code available from: http://www.veripool.org/verilator // //************************************************************************* // // Copyright 2003-2019 by Wilson Snyder. This program is free software; you can // redistribute it and/or modify it under the terms of either the GNU // Lesser General Public License Version 3 or the Perl Artistic License // Version 2.0. // // Verilator is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // //************************************************************************* // V3TraceDecl's Transformations: // Create trace CFUNCs // For each VARSCOPE // If appropriate type of signal, create a TRACE // //************************************************************************* #include "config_build.h" #include "verilatedos.h" #include "V3Global.h" #include "V3TraceDecl.h" #include "V3EmitCBase.h" #include "V3Stats.h" #include <cstdarg> //###################################################################### // TraceDecl state, as a visitor of each AstNode class TraceDeclVisitor : public EmitCBaseVisitor { private: // NODE STATE // STATE AstScope* m_scopetopp; // Current top scope AstCFunc* m_initFuncp; // Trace function being built AstCFunc* m_initSubFuncp; // Trace function being built (under m_init) int m_initSubStmts; // Number of statements in function AstCFunc* m_fullFuncp; // Trace function being built AstCFunc* m_chgFuncp; // Trace function being built int m_funcNum; // Function number being built AstVarScope* m_traVscp; // Signal being trace constructed AstNode* m_traValuep; // Signal being traced's value to trace in it string m_traShowname; // Signal being traced's component name V3Double0 m_statSigs; // Statistic tracking V3Double0 m_statIgnSigs; // Statistic tracking // METHODS VL_DEBUG_FUNC; // Declare debug() const char* vscIgnoreTrace(AstVarScope* nodep) { // Return true if this shouldn't be traced // See also similar rule in V3Coverage::varIgnoreToggle AstVar* varp = nodep->varp(); if (!varp->isTrace()) { return "Verilator trace_off"; } else if (!nodep->isTrace()) { return "Verilator cell trace_off"; } else if (!v3Global.opt.traceUnderscore()) { string prettyName = varp->prettyName(); if (!prettyName.empty() && prettyName[0] == '_') return "Leading underscore"; if (prettyName.find("._") != string::npos) return "Inlined leading underscore"; } return NULL; } AstCFunc* newCFunc(AstCFuncType type, const string& name, bool slow) { AstCFunc* funcp = new AstCFunc(m_scopetopp->fileline(), name, m_scopetopp); funcp->slow(slow); funcp->argTypes(EmitCBaseVisitor::symClassVar()+", "+v3Global.opt.traceClassBase()+"* vcdp, uint32_t code"); funcp->funcType(type); funcp->symProlog(true); m_scopetopp->addActivep(funcp); UINFO(5," Newfunc "<<funcp<<endl); return funcp; } AstCFunc* newCFuncSub(AstCFunc* basep) { string name = basep->name()+"__"+cvtToStr(++m_funcNum); AstCFunc* funcp = NULL; if (basep->funcType()==AstCFuncType::TRACE_INIT) { funcp = newCFunc(AstCFuncType::TRACE_INIT_SUB, name, basep->slow()); } else { basep->v3fatalSrc("Strange base function type"); } // cppcheck-suppress nullPointer // above fatal prevents it AstCCall* callp = new AstCCall(funcp->fileline(), funcp); callp->argTypes("vlSymsp, vcdp, code"); basep->addStmtsp(callp); return funcp; } void addTraceDecl(const VNumRange& arrayRange, int widthOverride) { // If !=0, is packed struct/array where basicp size misreflects one element VNumRange bitRange; AstBasicDType* bdtypep = m_traValuep->dtypep()->basicp(); if (widthOverride) bitRange = VNumRange(widthOverride-1, 0, false); else if (bdtypep) bitRange = bdtypep->nrange(); AstTraceDecl* declp = new AstTraceDecl(m_traVscp->fileline(), m_traShowname, m_traVscp->varp(), m_traValuep, bitRange, arrayRange); UINFO(9,"Decl "<<declp<<endl); if (m_initSubStmts && v3Global.opt.outputSplitCTrace() && m_initSubStmts > v3Global.opt.outputSplitCTrace()) { m_initSubFuncp = newCFuncSub(m_initFuncp); m_initSubStmts = 0; } m_initSubFuncp->addStmtsp(declp); m_initSubStmts += EmitCBaseCounterVisitor(declp).count(); m_chgFuncp->addStmtsp(new AstTraceInc(m_traVscp->fileline(), declp, m_traValuep->cloneTree(true))); // The full version will get constructed in V3Trace } void addIgnore(const char* why) { ++m_statIgnSigs; m_initSubFuncp->addStmtsp( new AstComment(m_traVscp->fileline(), "Tracing: "+m_traShowname+" // Ignored: "+why)); } // VISITORS virtual void visit(AstTopScope* nodep) { m_scopetopp = nodep->scopep(); // Make containers for TRACEDECLs first m_initFuncp = newCFunc(AstCFuncType::TRACE_INIT, "traceInitThis", true); m_fullFuncp = newCFunc(AstCFuncType::TRACE_FULL, "traceFullThis", true); m_chgFuncp = newCFunc(AstCFuncType::TRACE_CHANGE, "traceChgThis", false); // m_initSubFuncp = newCFuncSub(m_initFuncp); // And find variables iterateChildren(nodep); } virtual void visit(AstVarScope* nodep) { iterateChildren(nodep); // Avoid updating this if (), instead see varp->isTrace() if (!nodep->varp()->isTemp() && !nodep->varp()->isFuncLocal()) { UINFO(5, " vsc "<<nodep<<endl); AstVar* varp = nodep->varp(); AstScope* scopep = nodep->scopep(); // Compute show name // This code assumes SPTRACEVCDC_VERSION >= 1330; // it uses spaces to separate hierarchy components. m_traShowname = AstNode::vcdName(scopep->name() + " " + varp->name()); if (m_traShowname.substr(0, 4) == "TOP ") m_traShowname.replace(0, 4, ""); if (!m_initSubFuncp) nodep->v3fatalSrc("NULL"); m_traVscp = nodep; m_traValuep = NULL; if (vscIgnoreTrace(nodep)) { addIgnore(vscIgnoreTrace(nodep)); } else { ++m_statSigs; if (nodep->valuep()) m_traValuep = nodep->valuep()->cloneTree(true); else m_traValuep = new AstVarRef(nodep->fileline(), nodep, false); { // Recurse into data type of the signal; the visitors will call addTraceDecl() iterate(varp->dtypeSkipRefp()); } // Cleanup if (m_traValuep) { m_traValuep->deleteTree(); m_traValuep = NULL; } } m_traVscp = NULL; m_traValuep = NULL; m_traShowname = ""; } } // VISITORS - Data types when tracing virtual void visit(AstConstDType* nodep) { if (m_traVscp) { iterate(nodep->subDTypep()->skipRefp()); } } virtual void visit(AstRefDType* nodep) { if (m_traVscp) { iterate(nodep->subDTypep()->skipRefp()); } } virtual void visit(AstUnpackArrayDType* nodep) { // Note more specific dtypes above if (m_traVscp) { if (static_cast<int>(nodep->arrayUnpackedElements()) > v3Global.opt.traceMaxArray()) { addIgnore("Wide memory > --trace-max-array ents"); } else if (VN_IS(nodep->subDTypep()->skipRefp(), BasicDType) // Nothing lower than this array && m_traVscp->dtypep()->skipRefp() == nodep) { // Nothing above this array // Simple 1-D array, use exising V3EmitC runtime loop rather than unrolling // This will put "(index)" at end of signal name for us if (m_traVscp->dtypep()->skipRefp()->isString()) { addIgnore("Unsupported: strings"); } else { addTraceDecl(nodep->declRange(), 0); } } else { // Unroll now, as have no other method to get right signal names AstNodeDType* subtypep = nodep->subDTypep()->skipRefp(); for (int i=nodep->lsb(); i<=nodep->msb(); ++i) { string oldShowname = m_traShowname; AstNode* oldValuep = m_traValuep; { m_traShowname += string("(")+cvtToStr(i)+string(")"); m_traValuep = new AstArraySel(nodep->fileline(), m_traValuep->cloneTree(true), i - nodep->lsb()); iterate(subtypep); m_traValuep->deleteTree(); m_traValuep = NULL; } m_traShowname = oldShowname; m_traValuep = oldValuep; } } } } virtual void visit(AstPackArrayDType* nodep) { if (m_traVscp) { if (!v3Global.opt.traceStructs()) { // Everything downstream is packed, so deal with as one trace unit. // This may not be the nicest for user presentation, but is // a much faster way to trace addTraceDecl(VNumRange(), nodep->width()); } else { AstNodeDType* subtypep = nodep->subDTypep()->skipRefp(); for (int i=nodep->lsb(); i<=nodep->msb(); ++i) { string oldShowname = m_traShowname; AstNode* oldValuep = m_traValuep; { m_traShowname += string("(")+cvtToStr(i)+string(")"); m_traValuep = new AstSel(nodep->fileline(), m_traValuep->cloneTree(true), (i - nodep->lsb())*subtypep->width(), subtypep->width()); iterate(subtypep); m_traValuep->deleteTree(); m_traValuep = NULL; } m_traShowname = oldShowname; m_traValuep = oldValuep; } } } } virtual void visit(AstNodeClassDType* nodep) { if (m_traVscp) { if (nodep->packed() && !v3Global.opt.traceStructs()) { // Everything downstream is packed, so deal with as one trace unit // This may not be the nicest for user presentation, but is // a much faster way to trace addTraceDecl(VNumRange(), nodep->width()); } else { if (!nodep->packed()) { addIgnore("Unsupported: Unpacked struct/union"); } else { for (AstMemberDType* itemp = nodep->membersp(); itemp; itemp=VN_CAST(itemp->nextp(), MemberDType)) { AstNodeDType* subtypep = itemp->subDTypep()->skipRefp(); string oldShowname = m_traShowname; AstNode* oldValuep = m_traValuep; { m_traShowname += string(" ")+itemp->prettyName(); if (VN_IS(nodep, StructDType)) { m_traValuep = new AstSel(nodep->fileline(), m_traValuep->cloneTree(true), itemp->lsb(), subtypep->width()); iterate(subtypep); m_traValuep->deleteTree(); m_traValuep = NULL; } else { // Else union, replicate fields iterate(subtypep); } } m_traShowname = oldShowname; m_traValuep = oldValuep; } } } } } virtual void visit(AstBasicDType* nodep) { if (m_traVscp) { if (nodep->isString()) { addIgnore("Unsupported: strings"); } else { addTraceDecl(VNumRange(), 0); } } } virtual void visit(AstNodeDType* nodep) { // Note more specific dtypes above if (!m_traVscp) return; addIgnore("Unsupported: data type"); } //-------------------- virtual void visit(AstNode* nodep) { iterateChildren(nodep); } public: // CONSTUCTORS explicit TraceDeclVisitor(AstNetlist* nodep) { m_scopetopp = NULL; m_initFuncp = NULL; m_initSubFuncp = NULL; m_initSubStmts = 0; m_fullFuncp = NULL; m_chgFuncp = NULL; m_funcNum = 0; m_traVscp = NULL; m_traValuep = NULL; iterate(nodep); } virtual ~TraceDeclVisitor() { V3Stats::addStat("Tracing, Traced signals", m_statSigs); V3Stats::addStat("Tracing, Ignored signals", m_statIgnSigs); } }; //###################################################################### // Trace class functions void V3TraceDecl::traceDeclAll(AstNetlist* nodep) { UINFO(2,__FUNCTION__<<": "<<endl); { TraceDeclVisitor visitor (nodep); } // Destruct before checking V3Global::dumpCheckGlobalTree("tracedecl", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3); }
42.539823
119
0.519867
tcovert2015
7f32aad5921807e7f693684769dd47749c7f92fe
5,686
hpp
C++
src/floaxie/static_pow.hpp
enerc/zsearch
60cdcd245b66d14fe4e2be1d26eb2b1877d4b098
[ "Apache-2.0" ]
null
null
null
src/floaxie/static_pow.hpp
enerc/zsearch
60cdcd245b66d14fe4e2be1d26eb2b1877d4b098
[ "Apache-2.0" ]
null
null
null
src/floaxie/static_pow.hpp
enerc/zsearch
60cdcd245b66d14fe4e2be1d26eb2b1877d4b098
[ "Apache-2.0" ]
null
null
null
/* * Copyright 2015-2019 Alexey Chernov <4ernov@gmail.com> * * 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. * */ #pragma once #include <array> #include <utility> namespace floaxie { /** \brief Helper class template to calculate integer positive power in * compile time. * * Unspecialized template contains intermediate steps implementation. * * \tparam base base of the power. * \tparam pow exponent to power base. */ template<unsigned int base, unsigned int pow> struct static_pow_helper { /** \brief Result of power calculation (in compile time). * * Is calculated recursively in intermediate steps. */ static const unsigned int value = base * static_pow_helper<base, pow - 1>::value; }; /** \brief Terminal specialization of `static_pow_helper` template. */ template<unsigned int base> struct static_pow_helper<base, 0> { /** \brief Any value in zero power is `1`. */ static const unsigned int value = 1; }; /** \brief Handy wrapper function to calculate positive power in compile * time. * * \tparam base base of the power. * \tparam pow exponent to power base. * * \return Result of power calculation (in compile time). */ template<unsigned int base, unsigned int pow> constexpr unsigned long static_pow() { static_assert(base > 0, "Base should be positive"); return static_pow_helper<base, pow>::value; } /** \brief Helper structure template to append value to * `std::integer_sequence`. * * \tparam T type of elements of `std::integer_sequence`. * \tparam Add element to add to the specified sequence. * \tparam Seq original `std::integer_sequence` expressed by parameter pack * of its elements in template parameters. */ template<typename T, T Add, typename Seq> struct concat_sequence; /** \brief Implements the concatenation itself. * * Steals parameters (read: contents) of passed `std::integer_sequence`-like * type and creates another `std::integer_sequence`-like type with the * specified value appended at the end. */ template<typename T, T Add, T... Seq> struct concat_sequence<T, Add, std::integer_sequence<T, Seq...>> { /** \brief New `std::integer_sequence`-like type with the specified * element added to the end. */ using type = std::integer_sequence<T, Seq..., Add>; }; /** \brief Helper structure template to convert `std::integer_sequence` * to `std::array`. * * \tparam Seq sequence to convert. */ template<typename Seq> struct make_integer_array; /** \brief Main specialization of `make_integer_array` with the specified * input `std::integer_sequence`. * * \tparam T type of elements of `std::integer_sequence`. * \tparam Ints elements of the `std::integer_sequence` to convert. */ template<typename T, T... Ints> struct make_integer_array<std::integer_sequence<T, Ints...>> { /** \brief Type of the resulting `std::array` (specialized with * element type and length). */ using type = std::array<T, sizeof...(Ints)>; /** \brief Instance of the resulting `std::array` filled in with * elements from the specified `std::integer_sequence` in compile time. */ static constexpr type value = type{{Ints...}}; }; /** \brief Creates `std::integer_sequence` with sequence of powers of * \p **base** up to the exponent value, defined by \p **current_pow**. * * For example, if \p base is `10` and \p current_pow is `3`, the result * will contain values `1000`, `100`, `10`, `1`. * * \tparam T type of elements. * \tparam base base of powers to calculate. * \tparam current_pow the maximum exponent value to calculate power for. */ template<typename T, T base, std::size_t current_pow> struct pow_sequencer { /** \brief Value of power on the current step (in recursion). */ static const T value = pow_sequencer<T, base, current_pow - 1>::value * base; /** \brief `std::integer_sequence`-like type containing all the * calculated powers at the moment. */ typedef typename concat_sequence<T, value, typename pow_sequencer<T, base, current_pow - 1>::sequence_type>::type sequence_type; }; /** \brief Terminal step specialization for `pow_sequencer` template. */ template<typename T, T base> struct pow_sequencer<T, base, 0> { /** \brief Zero power of base. */ static constexpr T value = 1; /** \brief `std::integer_sequence` with zero power only yet. */ typedef std::integer_sequence<T, 1> sequence_type; }; /** \brief Handy wrapper function to calculate a sequence of powers. * * \tparam T type of elements. * \tparam base base for powers to calculate. * \tparam max_pow maximum exponent, up to which the calculation will be * performed. * * \return `std::array` filled with powers of the specified arguments in * reverse order. I.e. for \p **T** of `unsigned int`, \p **base** of 10 * and \p **max_pow** 3 this would be: * `std::array<unsigned int>({{1000, 100, 10, 1}})`. */ template<typename T, T base, std::size_t max_pow> constexpr T seq_pow(std::size_t pow) { typedef make_integer_array<typename pow_sequencer<T, base, max_pow>::sequence_type> maker; constexpr typename maker::type arr(maker::value); return arr[pow]; } }
35.31677
130
0.701724
enerc
7f3c74b05374fc5a86fd6c5b170702548acaa2fd
790
hpp
C++
tests/util/macros.hpp
ken-matsui/poac
e4503027f3993be493824f48dc31818029784238
[ "Apache-2.0" ]
496
2018-07-03T06:57:13.000Z
2022-03-28T23:20:01.000Z
tests/util/macros.hpp
ken-matsui/poac
e4503027f3993be493824f48dc31818029784238
[ "Apache-2.0" ]
331
2018-03-29T05:15:51.000Z
2022-03-12T16:57:06.000Z
tests/util/macros.hpp
ken-matsui/poac
e4503027f3993be493824f48dc31818029784238
[ "Apache-2.0" ]
58
2018-11-11T03:12:00.000Z
2022-03-25T06:32:58.000Z
#ifndef POAC_TESTS_SUPPORT_MACROS_HPP #define POAC_TESTS_SUPPORT_MACROS_HPP #include <boost/test/tools/old/interface.hpp> // In macros below following argument abbreviations are used: // M - message // S - statement // E - exception #define BOOST_CHECK_THROW_MSG( S, E, M ) \ do { \ BOOST_CHECK_THROW( S, E ); \ try { \ S; \ } catch (const E& e) { \ BOOST_CHECK( std::string(e.what()) == M ); \ } \ } while ( boost::test_tools::tt_detail::dummy_cond() ) \ #endif // !POAC_TESTS_SUPPORT_MACROS_HPP
37.619048
61
0.443038
ken-matsui
7f3e47e6e7353f6e91167f8483fe1c4fcfb01421
467
cpp
C++
INFO6044/BasicClasses/BasicClasses/cSuperBoss.cpp
LordMichaelmort/GDP2021_22
0498a1b7a16a35e8d4e79591163937ebffc15f47
[ "MIT" ]
2
2021-09-10T17:43:58.000Z
2021-09-14T21:52:47.000Z
INFO6044/BasicClasses/BasicClasses/cSuperBoss.cpp
LordMichaelmort/GDP2021_22
0498a1b7a16a35e8d4e79591163937ebffc15f47
[ "MIT" ]
null
null
null
INFO6044/BasicClasses/BasicClasses/cSuperBoss.cpp
LordMichaelmort/GDP2021_22
0498a1b7a16a35e8d4e79591163937ebffc15f47
[ "MIT" ]
1
2021-09-14T18:07:06.000Z
2021-09-14T18:07:06.000Z
#include "cSuperBoss.h" #include <iostream> cSuperBoss::cSuperBoss() { std::cout << "cSuperBoss::cSuperBoss() is created" << std::endl; } cSuperBoss::~cSuperBoss() { std::cout << "cSuperBoss::~cSuperBoss() is destroyed" << std::endl; } void cSuperBoss::Attack(void) { std::cout << "cSuperBoss::Attack() SUPER smash!!" << std::endl; } void cSuperBoss::Jump(float howHigh) { std::cout << "cSuperBoss::Jump() " << howHigh << " meters." << std::endl; return; }
18.68
74
0.646681
LordMichaelmort
7f41ed9902596a344bca8e55d27052e40a9fd1dc
3,872
hh
C++
AbstractPhysPtr64.hh
cndolo/smart_pointers
3586e06e609ddbea6faf3208e09ad40d7f554183
[ "MIT" ]
null
null
null
AbstractPhysPtr64.hh
cndolo/smart_pointers
3586e06e609ddbea6faf3208e09ad40d7f554183
[ "MIT" ]
null
null
null
AbstractPhysPtr64.hh
cndolo/smart_pointers
3586e06e609ddbea6faf3208e09ad40d7f554183
[ "MIT" ]
null
null
null
#pragma once #include <cassert> template<typename CFG, typename T> class AbstractPhysPtr64 { public: typedef T valuetype; AbstractPhysPtr64() : ptr(0) {} explicit AbstractPhysPtr64(uint64_t ptr) : ptr(ptr) {} static bool isValidPhysAddress(uintptr_t ptr) { return (ptr >= CFG::physBase()) && (ptr < CFG::physBase() + CFG::size()); } static bool isValidVirtAddress(uintptr_t ptr) { return (ptr >= CFG::virtBase()) && (ptr < CFG::virtBase() + CFG::size()); } static AbstractPhysPtr64 fromPhys(T* ptr) { return AbstractPhysPtr64(reinterpret_cast<uintptr_t>(ptr)); } // Image -> phys static AbstractPhysPtr64 fromVirt(T* vp) { //ASSERT(isImageAddress(vp)); return AbstractPhysPtr64(reinterpret_cast<uintptr_t>(vp) - CFG::virtBase()); } // Kernel -> phys static AbstractPhysPtr64 fromPhys(uintptr_t ptr) { //ASSERT(isKernelAddress(vp)); return AbstractPhysPtr64(ptr); } /* //phys -> image static AbstractPhysPtr64 toImage(AbstractPhysPtr64* ptr) { return reinterpret_cast<AbstractPhysPtr64*>(reinterpret_cast<uintptr_t>(ptr) + T::getVirt()); } AbstractPhysPtr64* phys2kernel (AbstractPhysPtr64* phys) { //ASSERT(isValidAddress(reinterpret_cast<const void*>(phys))); return reinterpret_cast<AbstractPhysPtr64*>(reinterpret_cast<uintptr_t>(phys) + T::getPhys()); } uint64_t kernel2phys(AbstractPhysPtr64* vp) { //ASSERT(isKernelAddress(vp)); return uint64_t(reinterpret_cast<uintptr_t>(vp) - T::getPhys()); } AbstractPhysPtr64* image2kernel(AbstractPhysPtr64* vp) { //ASSERT(isImageAddress(vp)); return reinterpret_cast<AbstractPhysPtr64**>(reinterpret_cast<uintptr_t>(vp) - T::getVirt() + T::getPhys()); } AbstractPhysPtr64* kernel2image(AbstractPhysPtr64* kp) { //ASSERT(isKernelAddress(kp)); return reinterpret_cast<AbstractPhysPtr64*>(reinterpret_cast<uintptr_t>(kp) + T::getVirt - T::getPhys()); } */ explicit operator bool() const { return ptr != 0; } bool operator==(AbstractPhysPtr64 rhs) const { return ptr == rhs.ptr; } bool operator!=(AbstractPhysPtr64 rhs) const { return ptr != rhs.ptr; } bool operator<(AbstractPhysPtr64 rhs) const { return ptr < rhs.ptr; } bool operator<=(AbstractPhysPtr64 rhs) const { return ptr <= rhs.ptr; } bool operator>=(AbstractPhysPtr64 rhs) const { return ptr >= rhs.ptr; } bool operator>(AbstractPhysPtr64 rhs) const { return ptr > rhs.ptr; } AbstractPhysPtr64& operator+=(size_t inc) { ptr += sizeof(T)*inc; return *this; } AbstractPhysPtr64 operator+(size_t inc) const { return AbstractPhysPtr64(ptr+sizeof(T)*inc); } AbstractPhysPtr64& incbytes(size_t inc) { ptr += inc; return *this; } AbstractPhysPtr64 plusbytes(size_t inc) const { return AbstractPhysPtr64(ptr+inc); } AbstractPhysPtr64& operator-=(size_t inc) { ptr -= sizeof(T)*inc; return *this; } AbstractPhysPtr64 operator-(size_t inc) const { return AbstractPhysPtr64(ptr-sizeof(T)*inc); } size_t operator-(AbstractPhysPtr64 rhs) const { return (ptr-rhs)/sizeof(T); } AbstractPhysPtr64& operator=(AbstractPhysPtr64 rhs) { ptr = rhs.ptr; return *this; } uintptr_t phys() const { return ptr + CFG::virtBase() - CFG::physBase(); } uintptr_t physint() const { return ptr; } uintptr_t logint() const { assert(mem()); return phys(); } uintptr_t getPtr() const { return ptr; } bool mem() const { return ptr < CFG::size(); } bool canonical() const { static constexpr uintptr_t CANONICAL_MASK = ((1ull << (64 - 48))-1) << 48; return (ptr & CANONICAL_MASK) == 0 || (ptr & CANONICAL_MASK) == CANONICAL_MASK; } T* log() const { return reinterpret_cast<T*>(logint()); } T* operator->() const { return log(); } protected: uint64_t ptr; //g++ //const char KERN_END = ("KERN_END"); //clang++ const char* KERN_END = "KERN_END"; };
32.537815
113
0.68311
cndolo
7f48f68a1f33e5bc67815a75b2fd971eee77357a
663
cpp
C++
aula-02/funcao-pt01-ex02-menu.cpp
adolfobcruz/estacio-estrutura-de-dados-1
8f5214f62b0e5a9c9d6cdc680cbd83e8a8ab6e14
[ "MIT" ]
1
2022-03-15T13:42:50.000Z
2022-03-15T13:42:50.000Z
aula-02/funcao-pt01-ex02-menu.cpp
adolfobcruz/estacio-estrutura-de-dados-1
8f5214f62b0e5a9c9d6cdc680cbd83e8a8ab6e14
[ "MIT" ]
null
null
null
aula-02/funcao-pt01-ex02-menu.cpp
adolfobcruz/estacio-estrutura-de-dados-1
8f5214f62b0e5a9c9d6cdc680cbd83e8a8ab6e14
[ "MIT" ]
null
null
null
#include <iostream> using namespace std; void menu() { cout << "\nMenu:\n"; cout << "\n1-Pilha"; cout << "\n2-Fila"; cout << "\n3-Lista"; cout << "\n4-Arvore"; cout << "\n5-Grafo"; cout << "\n6-Sair\n"; cout << "\nOpcao: \n"; } int main() { int op; cout << "Escolha a opção desejada.\n"; menu(); cin >> op; switch(op) { case 1: cout << "Vamos estudar Pilha!\n"; break; case 2: cout << "Vamos estudar Fila!\n"; break; case 3: cout << "Vamos estudar Lista!\n"; break; case 4: cout << "Vamos estudar Arvore!\n"; break; case 5: cout << "Vamos estudar Grafo!\n"; break; case 6: cout << "Sair\n"; break; } }
14.106383
40
0.544495
adolfobcruz
7f50bbce7766a86560b045f21ef354351a4959c4
10,389
cpp
C++
src/Parser.cpp
Igor-Krzywda/ib-pseudocode-interpreter
d83e05a1ab230771dc465dd899691519e56b4dea
[ "MIT" ]
2
2020-11-30T20:29:29.000Z
2020-12-11T18:04:47.000Z
src/Parser.cpp
Igor-Krzywda/ib-pseudocode-interpreter
d83e05a1ab230771dc465dd899691519e56b4dea
[ "MIT" ]
null
null
null
src/Parser.cpp
Igor-Krzywda/ib-pseudocode-interpreter
d83e05a1ab230771dc465dd899691519e56b4dea
[ "MIT" ]
null
null
null
#include "include/Parser.hpp" namespace prs{ Parser::Parser(std::string &&buffer){ lex = lxr::Lexer(std::move(buffer)); token = lex.get_next_token(); } void Parser::eat(int token_id){ if(token.id == token_id){ token = lex.get_next_token(); }else error(token_id); } void Parser::error(int token_id){ std::cout << "SYNTAX ERROR at line " << lex.line_num << ":unexpected token: " << tk::id_to_str(token.id); if(token_id >= 0) std::cout << ", expected token: " << tk::id_to_str(token_id); std::cout << std::endl; exit(1); } ast::AST *Parser::parse(){ ast::AST *root = new ast::AST(ast::START); while(token.id != tk::END_FILE){ root->push_child(stmt()); } return root; } ast::AST *Parser::stmt(){ switch(token.id){ case tk::ID_VAR: return assign(); case tk::ID_METHOD: return method_call(); case tk::METHOD: return method(); case tk::IF: return if_stmt(); case tk::RETURN: return ret(); case tk::LOOP: eat(tk::LOOP); if(token.id == tk::WHILE) return loop_whl(); else if(token.id == tk::ID_VAR || token.id == tk::ID_METHOD) return loop_for(); case tk::INPUT: return in_out(); case tk::OUTPUT: return in_out(); default: error(-1); } return NULL; } ast::AST *Parser::block(){ ast::AST *root = new ast::AST(ast::BLOCK); while(token.id != tk::END){ root->push_child(stmt()); } eat(tk::END); return root; } ast::AST *Parser::if_block(){ ast::AST *root = new ast::AST(ast::BLOCK); while(token.id != tk::END){ if(token.id == tk::ELSE){ return root; }else{ root->push_child(stmt()); } } return root; } ast::AST *Parser::method(){ eat(tk::METHOD); ast::AST *params = nullptr; ast::AST *root = new ast::AST(token, ast::METHOD); eat(tk::ID_METHOD); eat(tk::LPAREN); if(token.id == tk::ID_VAR){ params = new ast::AST(ast::PARAM); params->push_child(factor()); while(token.id != tk::RPAREN){ eat(tk::COMMA); params->push_child(factor()); } } eat(tk::RPAREN); if(params != nullptr) root->push_child(params); root->push_child(block()); eat(tk::METHOD); return root; } ast::AST *Parser::ret(){ ast::AST *root = new ast::AST(token, ast::RETURN); eat(tk::RETURN); root->push_child(expr()); return root; } ast::AST *Parser::loop_whl(){ ast::AST *root = new ast::AST(ast::WHILE); eat(tk::WHILE); root->push_child(cond()); root->push_child(block()); eat(tk::LOOP); return root; } ast::AST *Parser::loop_for(){ ast::AST *root = new ast::AST(ast::FOR); ast::AST *loop_range = new ast::AST(ast::RANGE); loop_range->push_child(factor()); eat(tk::FROM); loop_range->push_child(expr()); eat(tk::TO); loop_range->push_child(expr()); root->push_child(loop_range); root->push_child(block()); eat(tk::LOOP); return root; } ast::AST *Parser::if_stmt(){ ast::AST *root = new ast::AST(token, ast::IF); eat(tk::IF); root->push_child(cond()); eat(tk::THEN); root->push_child(if_block()); while(token.id == tk::ELSE){ root->push_child(else_stmt()); } eat(tk::END); eat(tk::IF); return root; } ast::AST *Parser::else_stmt(){ ast::AST *root; eat(tk::ELSE); if(token.id == tk::IF){ root = elif_stmt(); return root; }else{ root = new ast::AST(ast::ELSE); root->push_child(if_block()); } return root; } ast::AST *Parser::elif_stmt(){ eat(tk::IF); ast::AST *root = new ast::AST(ast::ELIF); root->push_child(cond()); eat(tk::THEN); root->push_child(if_block()); return root; } ast::AST *Parser::cond(){ ast::AST *root, *new_node; root = cmp(); while(token.id == tk::AND || token.id == tk::OR){ new_node = new ast::AST(token, ast::COND); new_node->push_child(root); root = new_node; eat(token.id); new_node->push_child(cmp()); } return root; } ast::AST *Parser::cmp(){ ast::AST *root, *new_node; root = factor(); if(token.id == tk::IS || token.id == tk::LT || token.id == tk::GT || token.id == tk::DNEQ || token.id == tk::GEQ || token.id == tk::LEQ){ new_node = new ast::AST(token, ast::CMP); new_node->push_child(root); root = new_node; eat(token.id); new_node->push_child(expr()); } return root; } ast::AST *Parser::assign(){ ast::AST *root = new ast::AST(ast::ASSIGN); root->push_child(factor()); if(root->children[0]->id == ast::STD_VOID){ root->id = ast::STD_VOID; return root; }else{ eat(tk::EQ); root->push_child(expr()); } return root; } ast::AST *Parser::method_call(){ ast::AST *root = new ast::AST(token, ast::METHOD_CALL); ast::AST *params = nullptr; eat(tk::ID_METHOD); eat(tk::LPAREN); if(token.id != tk::RPAREN){ params = new ast::AST(ast::PARAM); params->push_child(expr()); while(token.id != tk::RPAREN){ eat(tk::COMMA); params->push_child(expr()); } } eat(tk::RPAREN); if(params != nullptr) root->push_child(params); return root; } ast::AST *Parser::expr(){ ast::AST *root, *new_node; root = term(); while(token.id == tk::PLUS || token.id == tk::MINUS){ new_node = new ast::AST(token, ast::BINOP); new_node->push_child(root); root = new_node; eat(token.id); new_node->push_child(term()); } return root; } ast::AST *Parser::term(){ ast::AST *subroot, *new_node; subroot = factor(); while(token.id == tk::MULT || token.id == tk::DIV_WQ || token.id == tk::DIV_WOQ || token.id == tk::MOD){ new_node = new ast::AST(token, ast::BINOP); new_node->push_child(subroot); subroot = new_node; eat(token.id); new_node->push_child(factor()); } return subroot; } ast::AST *Parser::factor(){ ast::AST *new_node; switch(token.id){ case tk::NUM: new_node = new ast::AST(token, ast::NUM); eat(tk::NUM); return new_node; case tk::MINUS: new_node = new ast::AST(token, ast::UN_MIN); eat(tk::MINUS); if(token.id == tk::LPAREN){ eat(tk::LPAREN); new_node->push_child(expr()); eat(tk::RPAREN); }else new_node->push_child(factor()); return new_node; case tk::STRING: new_node = new ast::AST(token, ast::STRING); eat(tk::STRING); return new_node; case tk::ID_VAR: new_node = new ast::AST(token, ast::ID); eat(tk::ID_VAR); if(token.id == tk::LSQBR){ while(token.id == tk::LSQBR){ eat(tk::LSQBR); new_node->push_child(expr()); eat(tk::RSQBR); } if(!new_node->children.empty()) new_node->id = ast::ARR_ACC; } if(token.id == tk::DOT){ new_node->push_child(std_method()); new_node->id = new_node->children[0]->id; return new_node; } return new_node; case tk::ID_METHOD: return method_call(); case tk::LPAREN: eat(tk::LPAREN); new_node = expr(); eat(tk::RPAREN); return new_node; case tk::LSQBR: return arr(); case tk::NEW_ARR: return arr_dyn(); case tk::NEW_STACK: eat(tk::NEW_STACK); eat(tk::LPAREN); eat(tk::RPAREN); new_node = new ast::AST(token, ast::STACK); return new_node; case tk::NEW_QUEUE: eat(tk::NEW_QUEUE); eat(tk::LPAREN); eat(tk::RPAREN); new_node = new ast::AST(token, ast::QUEUE); return new_node; case tk::INPUT: return in_out(); case tk::OUTPUT: return in_out(); case tk::END_FILE: std::cout << "END"; default: error(-1); } return 0; } ast::AST *Parser::arr(){ ast::AST *root = new ast::AST(token, ast::ARR); eat(tk::LSQBR); if(token.id == tk::NUM || token.id == tk::STRING || token.id == tk::LSQBR){ root->push_child(factor()); while(token.id != tk::RSQBR){ eat(tk::COMMA); root->push_child(factor()); } } eat(tk::RSQBR); return root; } ast::AST *Parser::arr_dyn(){ eat(tk::NEW_ARR); ast::AST *root = new ast::AST(token, ast::ARR_DYN); eat(tk::LPAREN); root->push_child(expr()); while(token.id != tk::RPAREN){ eat(tk::COMMA); root->push_child(expr()); } eat(tk::RPAREN); return root; } ast::AST *Parser::std_method(){ eat(tk::DOT); ast::AST *root; if(token.id == tk::LENGTH || token.id == tk::GET_NEXT || token.id == tk::HAS_NEXT || token.id == tk::POP || token.id == tk::DEQUEUE || token.id == tk::IS_EMPTY || token.id == tk::INPUT){ root = new ast::AST(token, ast::STD_RETURN); eat(token.id); }else if(token.id == tk::GET_NEXT || token.id == tk::PUSH || token.id == tk::ENQUEUE){ root = new ast::AST(token, ast::STD_VOID); eat(token.id); } eat(tk::LPAREN); if(token.id != tk::RPAREN){ root->push_child(expr()); while(token.id != tk::RPAREN){ eat(tk::COMMA); root->push_child(expr()); } } eat(tk::RPAREN); return root; } ast::AST *Parser::in_out(){ ast::AST *root; if(token.id == tk::INPUT) root = new ast::AST(token, ast::INPUT); else if(token.id == tk::OUTPUT) root = new ast::AST(token, ast::OUTPUT); eat(token.id); eat(tk::LPAREN); root->push_child(expr()); while(token.id != tk::RPAREN){ eat(tk::COMMA); root->push_child(expr()); } eat(tk::RPAREN); return root; } }
26.706941
76
0.515545
Igor-Krzywda
7f525512c0b586b07155173f2137c08792ffd0eb
3,302
hpp
C++
enhance/box3d.hpp
simonraschke/enhance
c1925e57ad7387f94ae8c59abaf207c2349316aa
[ "Apache-2.0" ]
null
null
null
enhance/box3d.hpp
simonraschke/enhance
c1925e57ad7387f94ae8c59abaf207c2349316aa
[ "Apache-2.0" ]
null
null
null
enhance/box3d.hpp
simonraschke/enhance
c1925e57ad7387f94ae8c59abaf207c2349316aa
[ "Apache-2.0" ]
null
null
null
/* * Copyright 2019 Simon Raschke * * 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. */ #pragma once #include "enabler.hpp" #include "vector3d.hpp" #include <cmath> #include <array> #include <algorithm> #include <numeric> namespace enhance { template<typename T = float> struct Box3d : public __internal::ArithmeticEnabler<T> { enum class Corner { FrontBottomLeft, FrontBottomRight, FrontTopLeft, FrontTopRight, BackBottomLeft, BackBottomRight, BackTopLeft, BackTopRight, Center } enum class Face { Front, Back, Left, Right, Top, Bottom } Box3d(); Box3d(const Vector3d<T>&, const Vector3d<T>&); Box3d(const Box3d<T>& other) = default; Box3d(Box3d<T>&& other) = default; template<Corner C> get(C c); constexpr void swap( Box3d<T>& other ) noexcept(std::is_nothrow_swappable_v<T>); protected: std::vector<Vector3d<T>> corners; }; template<typename T> Box3d<T>::Box3d() { corners.emplace_back(Vector3d(0,0,0)); corners.emplace_back(Vector3d(1,0,0)); corners.emplace_back(Vector3d(0,1,0)); corners.emplace_back(Vector3d(0,0,1)); corners.emplace_back(Vector3d(1,1,0)); corners.emplace_back(Vector3d(1,0,1)); corners.emplace_back(Vector3d(0,1,1)); corners.emplace_back(Vector3d(1,1,1)); } template<typename T> Box3d<T>::Box3d(const Vector3d<T>& bottomLeft, const Vector3d<T>& upperRight) { corners.emplace_back(bottomLeft); corners.emplace_back(upperRight(0), bottomLeft(1), bottomLeft(2)); corners.emplace_back(bottomLeft(0), upperRight(1), bottomLeft(2)); corners.emplace_back(bottomLeft(0), bottomLeft(1), upperRight(2)); corners.emplace_back(upperRight(0), upperRight(1), bottomLeft(2)); corners.emplace_back(upperRight(0), upperRight(1), bottomLeft(2)); corners.emplace_back(bottomLeft(0), upperRight(1), upperRight(2)); corners.emplace_back(upperRight); } template<typename T> constexpr void Box3d<T>::swap( Box3d<T>& other ) noexcept(std::is_nothrow_swappable_v<T>) { corners.swap(other.corners); } } // namespace enhance namespace std { template<class T> constexpr void swap( enhance::Box3d<T>& lhs, enhance::Box3d<T>& rhs ) noexcept(noexcept(lhs.swap(rhs))) { lhs.swap(rhs); } } // namespace std
27.289256
108
0.592974
simonraschke
7f52a0f3e6b8ca0903fdc8a4d9e1e337cebc3eb2
150
cpp
C++
AtCoder/abc096/a/main.cpp
H-Tatsuhiro/Com_Pro-Cpp
fd79f7821a76b11f4a6f83bbb26a034db577a877
[ "MIT" ]
null
null
null
AtCoder/abc096/a/main.cpp
H-Tatsuhiro/Com_Pro-Cpp
fd79f7821a76b11f4a6f83bbb26a034db577a877
[ "MIT" ]
1
2021-10-19T08:47:23.000Z
2022-03-07T05:23:56.000Z
AtCoder/abc096/a/main.cpp
H-Tatsuhiro/Com_Pro-Cpp
fd79f7821a76b11f4a6f83bbb26a034db577a877
[ "MIT" ]
null
null
null
#include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; if (b < a) printf("%d\n", a - 1); else printf("%d\n", a); }
21.428571
37
0.506667
H-Tatsuhiro
7f53aa8541b4dcfc0e2bac1903eb85a5f68fd391
1,345
cpp
C++
tests/src/Light/Directional.cpp
DorianBDev/Raytracing
53268ebf621d09773826b2e6948b8e4000b9ef7c
[ "MIT" ]
6
2021-02-18T16:43:20.000Z
2022-03-11T15:14:09.000Z
tests/src/Light/Directional.cpp
SMBDFather/Raytracing
53268ebf621d09773826b2e6948b8e4000b9ef7c
[ "MIT" ]
null
null
null
tests/src/Light/Directional.cpp
SMBDFather/Raytracing
53268ebf621d09773826b2e6948b8e4000b9ef7c
[ "MIT" ]
null
null
null
#include <Light/Directional.h> #include <doctest.h> TEST_CASE("Testing directional light") { Vector3 originA({{0.5, 0, 0}}); Vector3 originB({{0, 0.5, 0}}); Vector3 direction({{0.75, 0.75, 1}}); Directional directional({10, Colors::white(), originA, originB, direction}); Vector3 a1({{1, 1, 1}}); Vector3 a2({{1, 1, 1.5}}); Vector3 a3({{1.5, 0.5, 1}}); Vector3 a4({{1.25, 0.75, 1}}); Vector3 a5({{0.75, 1.25, 1}}); // Check if the device if in the light CHECK(directional.isEnLight(a1) == true); CHECK(directional.isEnLight(a2) == false); CHECK(directional.isEnLight(a3) == false); CHECK(directional.isEnLight(a4) == true); CHECK(directional.isEnLight(a5) == true); Vector3 o1({{0.25, 0.25, 0}}); Vector3 o4({{0.5, 0, 0}}); Vector3 o5({{0, 0.5, 0}}); // Check if the origin point found is correct CHECK(directional.getOrigin(a1) == o1); CHECK(directional.getOrigin(a2) == std::nullopt); CHECK(directional.getOrigin(a3) == std::nullopt); CHECK(directional.getOrigin(a4) == o4); CHECK(directional.getOrigin(a5) == o5); // Check if the direction is correct CHECK(directional.getDirection(a1) == (direction - a1)); CHECK(directional.getDirection(a4) == (direction - a4)); CHECK(directional.getDirection(a5) == (direction - a5)); }
33.625
80
0.619331
DorianBDev
7f5ba6ce9af07b4782351f6b36a14a0dca0ee42d
440
hpp
C++
include/pastel/particle/get.hpp
naoki-yoshioka/pastel
b443dcc6ae86ff3e94ec9c2e7085b5d6521214e8
[ "MIT" ]
null
null
null
include/pastel/particle/get.hpp
naoki-yoshioka/pastel
b443dcc6ae86ff3e94ec9c2e7085b5d6521214e8
[ "MIT" ]
24
2017-12-23T07:39:58.000Z
2019-09-20T10:16:37.000Z
include/pastel/particle/get.hpp
naoki-yoshioka/pastel
b443dcc6ae86ff3e94ec9c2e7085b5d6521214e8
[ "MIT" ]
null
null
null
#ifndef PASTEL_PARTICLE_GET_HPP # define PASTEL_PARTICLE_GET_HPP # include <utility> namespace pastel { namespace particle { template <typename Tag, typename Particle> inline auto get(Particle&& particle) -> decltype(std::forward<Particle>(particle).template get<Tag>()) { return std::forward<Particle>(particle).template get<Tag>(); } } // namespace particle } // namespace pastel #endif // PASTEL_PARTICLE_GET_HPP
22
106
0.731818
naoki-yoshioka
7f5f4b0255bd54ec0c4f417cbec189a40886cc9e
653
cpp
C++
Problemset/reverse-words-in-a-string-iii/reverse-words-in-a-string-iii.cpp
Singularity0909/LeetCode
d46fb1c8ed9b16339d46d5c37f69d44e5c178954
[ "MIT" ]
1
2020-10-06T01:06:45.000Z
2020-10-06T01:06:45.000Z
Problemset/reverse-words-in-a-string-iii/reverse-words-in-a-string-iii.cpp
Singularity0909/LeetCode
d46fb1c8ed9b16339d46d5c37f69d44e5c178954
[ "MIT" ]
null
null
null
Problemset/reverse-words-in-a-string-iii/reverse-words-in-a-string-iii.cpp
Singularity0909/LeetCode
d46fb1c8ed9b16339d46d5c37f69d44e5c178954
[ "MIT" ]
1
2021-11-17T13:52:51.000Z
2021-11-17T13:52:51.000Z
// @Title: 反转字符串中的单词 III (Reverse Words in a String III) // @Author: Singularity0909 // @Date: 2020-08-30 14:31:28 // @Runtime: 24 ms // @Memory: 9.4 MB class Solution { public: string reverseWords(string s) { vector<int> space({ -1 }); int len = (int)s.length(); for (int i = 0; i < len; i++) { if (s[i] == ' ') { space.push_back(i); } } space.push_back(len); for (int i = 0; i < (int)space.size() - 1; i++) { int cur = space[i], nxt = space[i + 1]; reverse(s.begin() + cur + 1, s.begin() + nxt); } return s; } };
25.115385
58
0.464012
Singularity0909
7f64db1d46380ce8a1715f29d3dad63ec0e800f7
3,168
hpp
C++
include/reiji/unique_shared_lib.hpp
RealKC/Reiji
69a8b50c5e1e997fb90652d5b263c27f75e4e0ea
[ "BSL-1.0" ]
null
null
null
include/reiji/unique_shared_lib.hpp
RealKC/Reiji
69a8b50c5e1e997fb90652d5b263c27f75e4e0ea
[ "BSL-1.0" ]
4
2020-08-09T20:33:04.000Z
2021-02-07T04:02:39.000Z
include/reiji/unique_shared_lib.hpp
RealKC/Reiji
69a8b50c5e1e997fb90652d5b263c27f75e4e0ea
[ "BSL-1.0" ]
null
null
null
// Copyright Mițca Dumitru 2019 - present // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) #pragma once #include <cstddef> // std::nullptr_t #include <cstdint> // std::uint64_t #include <filesystem> #include <string> #include <vector> #include <reiji/detail/push_platform_detection_macros.hpp> #include <reiji/flags.hpp> #include <reiji/symbol.hpp> namespace reiji { namespace fs = std::filesystem; class unique_shared_lib { public: unique_shared_lib() = default; unique_shared_lib(const unique_shared_lib&) = delete; unique_shared_lib(unique_shared_lib&&) noexcept; explicit unique_shared_lib(const char* filename) { open(filename, detail::default_flags); } explicit unique_shared_lib(const std::string& filename) { open(filename.c_str(), detail::default_flags); } explicit unique_shared_lib(const fs::path& path) { open(path, detail::default_flags); } unique_shared_lib(const char* filename, flags_type flags) { open(filename, flags); } unique_shared_lib(const std::string& filename, flags_type flags) { open(filename.c_str(), flags); } unique_shared_lib(const fs::path& path, flags_type flags) { open(path, flags); } unique_shared_lib& operator=(const unique_shared_lib&) = delete; unique_shared_lib& operator=(unique_shared_lib&&) noexcept; ~unique_shared_lib() noexcept; void open(const char* filename) { open(filename, detail::default_flags); } void open(const char* filename, flags_type flags); void open(const std::string& filename) { open(filename.c_str(), detail::default_flags); } void open(const std::string& filename, flags_type flags) { open(filename.c_str()); } void open(const fs::path& path) { open(path, detail::default_flags); } void open(const fs::path& path, flags_type flags); void close(); void swap(unique_shared_lib& other); template <typename T> [[nodiscard]] symbol<T> get_symbol(const char* symbol_name) { return symbol<T> {reinterpret_cast<T*>(_get_symbol(symbol_name)), _next_uid(), this}; } template <typename T> [[nodiscard]] symbol<T> get_symbol(const std::string& symbol_name) { return get_symbol<T>(symbol_name.c_str()); } [[nodiscard]] std::string last_error() const { return _error; } private: friend class detail::symbol_base; // It *should* be fine for these to be void* on all the platforms we // support, I think. using native_handle = void*; using native_symbol = void*; [[nodiscard]] native_symbol _get_symbol(const char* symbol_name); std::uint64_t _next_uid() noexcept { return ++_curr_uid; } native_handle _handle {nullptr}; std::uint64_t _curr_uid {0}; std::string _error; std::vector<detail::symbol_base*> _symbols; }; inline void swap(unique_shared_lib& lhs, unique_shared_lib& rhs) noexcept { lhs.swap(rhs); } } // namespace reiji #include <reiji/detail/pop_platform_detection_macros.hpp>
29.607477
78
0.684343
RealKC
7f6c711ccee4c7ca0a39c38f9f07aa28852e190b
2,679
cpp
C++
targets/libraries/TLC5952/TLC5952.cpp
sicrisembay/mbed_target
dd7af2f2903fdc633ccd6028e6ae4f7b3cdd54c8
[ "Apache-2.0" ]
20
2017-10-12T10:49:10.000Z
2022-03-16T03:21:46.000Z
targets/libraries/TLC5952/TLC5952.cpp
sicrisembay/mbed_target
dd7af2f2903fdc633ccd6028e6ae4f7b3cdd54c8
[ "Apache-2.0" ]
2
2018-06-22T16:00:02.000Z
2019-09-01T13:32:27.000Z
targets/libraries/TLC5952/TLC5952.cpp
sicrisembay/mbed_target
dd7af2f2903fdc633ccd6028e6ae4f7b3cdd54c8
[ "Apache-2.0" ]
9
2017-08-13T12:15:32.000Z
2021-11-21T07:57:08.000Z
#include <TLC5952.h> // Konstruktor: // Pin-Belegung + Strom pro LED TLC5952::TLC5952(PinName clk, PinName data, PinName latch, PinName blank, uint8_t strom = 5) { int32_t registerCount = 0x25; clkout = new DigitalOut(clk); dataout = new DigitalOut(data); latchout = new DigitalOut(latch); blankout = new DigitalOut(blank); this->registerCount = registerCount; init_TLC5952(strom); } // Destruktor: TLC5952::~TLC5952() { delete clkout; delete dataout; delete latchout; delete blankout; } /** Writes the given integer to the shift register */ void TLC5952::write(int data) { *latchout = 0; for (int i = registerCount - 1; i >= 0; i--) { wait_us(15); *clkout = 0; *dataout = (data & (1 << i)) != 0; *clkout = 1; } *latchout = 1; } // Balkenanzeige 1=LED1 an // Anzahl leuchtender LED's übergeben void TLC5952::LED_bar_down(int num) { num=(uint8_t)num; int c=0; long out=0; if(num>24 && num<126) { num=24; } else if (num>127 ) { num=0; } for(c=0;c<num;c++) { out=(out<<1)+1 ; } for(c=0;c<(24-num);c++) { out=(out<<1)+0 ; } c=0; write(out); } // Balkenanzeige 1=LED24 an // Anzahl leuchtender LED's übergeben void TLC5952::LED_bar_up(int num) { num=(uint8_t)num; int c=0; long out=0; if(num>24 && num<126) { num=24; } else if (num>127 ) { num=0; } for(c=0;c<num;c++) { out=(out<<1)+1 ; } write(out); } // 6 LED-Lauflicht für Ventile (pro IC 4 Stück) void TLC5952::ventil_1_mov(int on_off) { if(on_off==1) { ventil_1 = mov(ventil_1); ventil_out(); } } void TLC5952::ventil_2_mov(int on_off) { if(on_off==1) { ventil_2 = mov(ventil_2); ventil_out(); } } void TLC5952::ventil_3_mov(int on_off) { if(on_off==1) { ventil_3 = mov(ventil_3); ventil_out(); } } void TLC5952::ventil_4_mov(int on_off) { if(on_off==1) { ventil_4 = mov(ventil_4); ventil_out(); } } // Einrichten und Strom für LED's setzen void TLC5952::init_TLC5952(int strom) { int strom_blau=((strom*127)/max_strom_blau); int strom_rot=((strom*127)/max_strom_rot); int strom_gruen=((strom*127)/max_strom_gruen); long control=8; control = (control<<7)+strom_blau; control = (control<<7)+strom_gruen; control = (control<<7)+strom_rot; *blankout=1; write(control); write(0); *blankout=0; } // Hilfsfunktionen für Ventil-Lauflicht int TLC5952::mov(int v) { if(v>16) { v=1; } else if (v==0) { v=1; } else { v=v<<1; } return v; } void TLC5952::ventil_out() { long out=0; out = ventil_1; out = (out<<6)+ventil_2; out = (out<<6)+ventil_3; out = (out<<6)+ventil_4; write(out); }
17.741722
95
0.610676
sicrisembay
7f6d0c4733962a9fc6715bc8de6c5a0dd6f48f75
601
cpp
C++
src/types/Int16.cpp
shumway/tdmsreader
4262f4fba4f90fc903b83426e5fa3a2ebff26cb0
[ "MIT" ]
7
2018-09-28T23:54:04.000Z
2021-03-14T14:53:55.000Z
src/types/Int16.cpp
shumway/tdmsreader
4262f4fba4f90fc903b83426e5fa3a2ebff26cb0
[ "MIT" ]
null
null
null
src/types/Int16.cpp
shumway/tdmsreader
4262f4fba4f90fc903b83426e5fa3a2ebff26cb0
[ "MIT" ]
10
2015-04-01T09:18:50.000Z
2022-03-02T20:15:47.000Z
#include "types/Int16.h" #include "types/Int16Value.h" #include "types/Int16Array.h" DataValue* Int16::readValue(std::ifstream &infile) const { short data; infile.read((char*)&data, 2); return new Int16Value(this,data); } DataArray* Int16::readArray(std::ifstream &infile, unsigned int size, unsigned int nbytes) const { short* data = new short[size]; infile.read((char*)data, 2*size); return new Int16Array(this, data, size); } DataArray* Int16::newArray(unsigned int size, unsigned int nbytes) const { short* data = new short[size]; return new Int16Array(this, data, size); }
27.318182
74
0.710483
shumway
7f6ddb9dd54ad5c3411be48bb33984ee5e932f8a
5,103
cpp
C++
RubeusCore/Source/GraphicComponents/window_component.cpp
Rodrirokr/Rubeus
12623b04db959b428b9eb791d3943b11d74c0532
[ "MIT" ]
179
2018-12-22T14:02:02.000Z
2022-01-29T18:26:57.000Z
RubeusCore/Source/GraphicComponents/window_component.cpp
rahil627/Rubeus
dd057d23c94a0406126c32d62889ac83cba47570
[ "MIT" ]
56
2019-01-07T11:55:16.000Z
2020-12-10T21:32:18.000Z
RubeusCore/Source/GraphicComponents/window_component.cpp
rahil627/Rubeus
dd057d23c94a0406126c32d62889ac83cba47570
[ "MIT" ]
20
2018-12-23T11:19:49.000Z
2022-03-11T06:18:10.000Z
/** * @file Source/window_component.cpp. * * @brief Implements the RWindowComponent class */ #include <window_component.h> #include <any> #include <GL/glew.h> #include <GLFW/glfw3.h> namespace Rubeus { namespace GraphicComponents { int RWindowComponent::MouseX; int RWindowComponent::Y; void getGLFWErrorLog(int error, const char * description) { ERRORLOG(description); } void windowCloseCallback(GLFWwindow * window) { LOG("Window close callback was evoked"); } void windowResizeCallback(GLFWwindow * window, int width, int height) { LOG("Window resize callback was evoked"); GLCall(glViewport(0, 0, width, height)); } RWindowComponent::RWindowComponent(const char *title, int width, int height, EWindowParameters windowMode, EWindowParameters windowType, int setFPS) { if (!initWindow(title, width, height, windowMode, windowType)) { ERRORLOG("WindowComponent Initialisation failed"); glfwTerminate(); } SUCCESS("Window initialisation successful"); //glfwSwapInterval(setFPS); ASSERT("FPS set to " + std::to_string((1.0f / ((float)setFPS)) * 60.0f)); ASSERT((const char *)glGetString(GL_VENDOR)); m_Height = height; m_Width = width; m_Title = title; // TODO: Add customisable resolutions } bool RWindowComponent::closed() { return glfwWindowShouldClose(m_GLFWWindow); } void RWindowComponent::setWindowTitle(const char * title) { glfwSetWindowTitle(m_GLFWWindow, title); ASSERT("Window title set to: " + (std::string) title); } void RWindowComponent::setWindowIcon(RWindowComponent GameWindow, std::string names[]) { //GLFWimage * images = new GLFWimage[names->length]; //for(int i = 0; i < names->length; i++) //{ // images[i] = LoaderComponent::LoadImageWindows(names[i]); //} // TODO: Remove this when LoaderComponent::LoadImageWindows() is completed // TODO: Remove this when LoaderComponent::LoadImageWindows() is completed ERRORLOG("ABORT! Incomplete code used"); //delete[] images; } RWindowComponent::~RWindowComponent() { ASSERT("Terminating GLFW Window"); glfwTerminate(); } void RWindowComponent::clearWindow() { // No GLCall() used for maintaining performance glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); } void RWindowComponent::updateWindow() { glfwPollEvents(); glfwSwapBuffers(m_GLFWWindow); } bool RWindowComponent::initWindow(const char * title, int width, int height, EWindowParameters windowMode, EWindowParameters windowType) { if (!glfwInit()) { ERRORLOG("Error: GLFW initialisation failed"); } SUCCESS("GLFW initialisation successful"); // Set window hints if any if (windowType == EWindowParameters::RESIZABLE_WINDOW) { glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE); } else { if (windowType == EWindowParameters::NON_RESIZABLE_WINDOW) { glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE); } else { ERRORLOG("Semantics error: Use valid Enum values"); } } glfwWindowHint(GLFW_FOCUSED, GLFW_TRUE); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // Create a window of specified mode, title, width and height if (windowMode == EWindowParameters::WINDOWED_MODE) { m_GLFWWindow = glfwCreateWindow(width, height, title, NULL, NULL); } else { if (windowMode == EWindowParameters::FULLSCREEN_MODE) { m_GLFWWindow = glfwCreateWindow(width, height, title, glfwGetPrimaryMonitor(), NULL); } else { ERRORLOG("Semantics error: Use valid Enum values"); } } if (!m_GLFWWindow) { glfwTerminate(); ERRORLOG("Failed to create window"); return false; } // Set the new window as the current context glfwMakeContextCurrent(m_GLFWWindow); glfwSetWindowUserPointer(m_GLFWWindow, this); SUCCESS("Window creation successful"); glfwSetErrorCallback(getGLFWErrorLog); glfwSetWindowCloseCallback(m_GLFWWindow, windowCloseCallback); glfwSetFramebufferSizeCallback(m_GLFWWindow, windowResizeCallback); glfwSetCursorPosCallback(m_GLFWWindow, cursorPositionCallback); glfwSetMouseButtonCallback(m_GLFWWindow, mouseButtonCallback); glfwSetInputMode(m_GLFWWindow, GLFW_STICKY_MOUSE_BUTTONS, 1); glfwSetScrollCallback(m_GLFWWindow, scrollCallback); glfwSetKeyCallback(m_GLFWWindow, keyCallback); glfwSetInputMode(m_GLFWWindow, GLFW_STICKY_KEYS, 1); if (glewInit() != GLEW_OK) { ERRORLOG("GLEW initialisation failed"); return false; } SUCCESS("GLEW initialisation successful"); ASSERT("OpenGL Driver software: " + std::string((const char *)glGetString(GL_VERSION))); return true; } void RWindowComponent::change_window_title(var data) { setWindowTitle(std::any_cast<const char *>(data)); } void RWindowComponent::get_loaded_image(var data ) { ASSERT("Image received"); Image & image = std::any_cast<Image &>(data); } } }
24.771845
150
0.706643
Rodrirokr
7f6edea35d1aef78975e0439ba29531b9dfdda25
532
hpp
C++
libs/Counter.hpp
longlt3/utils
08c446db77ff5baacac2a5203b5ec4a068c36c8d
[ "MIT" ]
null
null
null
libs/Counter.hpp
longlt3/utils
08c446db77ff5baacac2a5203b5ec4a068c36c8d
[ "MIT" ]
null
null
null
libs/Counter.hpp
longlt3/utils
08c446db77ff5baacac2a5203b5ec4a068c36c8d
[ "MIT" ]
null
null
null
#ifndef COUNTER_HPP #define COUNTER_HPP #include <string> #include <chrono> #include <thread> #include <unordered_map> #include "log.hpp" bool canLog(int log_type); struct Counter { public: // Counter(); Counter(std::string const &a_str, LogType aLogType); virtual ~Counter(); private: std::string _context; LogType _logType; std::chrono::high_resolution_clock::time_point _tbeg; static std::unordered_map<std::thread::id, int> _indents; }; #endif // COUNTER_HPP
16.625
62
0.661654
longlt3
7f70ef142df3476a2eaabfa0990d139d9d954f86
1,107
cpp
C++
00049_group-anagrams/191225-1.cpp
yanlinlin82/leetcode
ddcc0b9606d951cff9c08d1f7dfbc202067c8d65
[ "MIT" ]
6
2019-10-23T01:07:29.000Z
2021-12-05T01:51:16.000Z
00049_group-anagrams/191225-1.cpp
yanlinlin82/leetcode
ddcc0b9606d951cff9c08d1f7dfbc202067c8d65
[ "MIT" ]
null
null
null
00049_group-anagrams/191225-1.cpp
yanlinlin82/leetcode
ddcc0b9606d951cff9c08d1f7dfbc202067c8d65
[ "MIT" ]
1
2021-12-03T06:54:57.000Z
2021-12-03T06:54:57.000Z
// https://leetcode-cn.com/problems/group-anagrams/ #include <cstdio> #include <vector> #include <string> #include <unordered_map> #include <algorithm> using namespace std; class Solution { public: vector<vector<string>> groupAnagrams(vector<string>& strs) { vector<vector<string>> res; unordered_map<string, int> index; for (int i = 0; i < strs.size(); ++i) { string key = strs[i]; sort(key.begin(), key.end()); auto it = index.find(key); if (it == index.end()) { index[key] = res.size(); res.push_back(vector<string>{strs[i]}); } else { res[it->second].push_back(strs[i]); } } return res; } }; void print(const vector<vector<string>>& a) { printf("[\n"); for (const auto& b : a) { printf(" [ "); for (int i = 0; i < b.size(); ++i) { if (i > 0) printf(", "); printf("\"%s\"", b[i].c_str()); } printf(" ]\n"); } printf("]\n"); } int main() { Solution s; { vector<string> a = { "eat", "tea", "tan", "ate", "nat", "bat" }; auto r = s.groupAnagrams(a); print(r); // answer: [ ["ate","eat","tea"], ["nat","tan"], ["bat"] ] } return 0; }
20.886792
70
0.563686
yanlinlin82
7f76969d2f91be2a0a5eb283c09c725802e39843
314
cpp
C++
code/GAME.cpp
PIPIKAI/ACM
b8e4416a29c0619946c9b73b0fe5699b6e96e782
[ "MIT" ]
null
null
null
code/GAME.cpp
PIPIKAI/ACM
b8e4416a29c0619946c9b73b0fe5699b6e96e782
[ "MIT" ]
null
null
null
code/GAME.cpp
PIPIKAI/ACM
b8e4416a29c0619946c9b73b0fe5699b6e96e782
[ "MIT" ]
null
null
null
#include<bits/stdc++.h> #include<stdio.h> using namespace std; int main() { int n; while(cin>>n) { int f[2000]; for(int i=0;i<n;i++) cin>>f[i]; sort(f,f+n); if(n&1) cout<<f[n/2]<<endl; else cout<<f[n/2-1]<<endl; } return 0; }
15.7
29
0.429936
PIPIKAI
7f78e2bd8fa7ee69598b61e5dacc8b15d06ff45a
1,529
hpp
C++
src/channel/IpcChannel.hpp
Chopper455/Stalink
4ed94b35b9eafd1358e9f42fc8c0f8a961878a5d
[ "MIT" ]
null
null
null
src/channel/IpcChannel.hpp
Chopper455/Stalink
4ed94b35b9eafd1358e9f42fc8c0f8a961878a5d
[ "MIT" ]
null
null
null
src/channel/IpcChannel.hpp
Chopper455/Stalink
4ed94b35b9eafd1358e9f42fc8c0f8a961878a5d
[ "MIT" ]
null
null
null
#ifndef SRC_NEW_IPCCHANNEL_HPP_ #define SRC_NEW_IPCCHANNEL_HPP_ #include "Messages.hpp" #include <string> namespace stamask { /** * Interface of class to interchange messages. * Connection URL is passed in subclass' constructor. */ class IpcChannel { public: /** * Empty destructor. */ virtual ~IpcChannel() {} /** * Connects channel to it's remote counterpart. * @return success flag */ virtual bool connect() = 0; /** * Dis channel from it's remote counterpart. */ virtual void disconnect() = 0; public: /** * Waits for arrival of any type of message. */ virtual void waitMessageArrival() = 0; /** * Waits for arrival of any type of message for given amount of time. * Returns false if time has run out. * @param inMsTimeout milliseconds to wait * @return flag that message arrived */ virtual bool waitTimeOutMessageArrival(unsigned long inMsTimeout) = 0; /** * Returns type of message that has arrived. * @return message type */ virtual EMessageType peekMessageType() const = 0; public: /** * Method to send a message. * @param inMessage message to send * @return success status */ virtual EMessageStatus send( const Message& inMessage) = 0; /** * Method to get a message. * @param outResponse message to fill * @return success status */ virtual EMessageStatus popMessage( Message& outResponse) = 0; }; } #endif /* SRC_NEW_ICLIENTIPCCHANNEL_HPP_ */
18.876543
72
0.653368
Chopper455
7f7a6ff8b5870ff280acbbe488de39c1d26beb4a
5,184
cpp
C++
tech/UI/UIComposer.cpp
nbtdev/teardrop
fa9cc8faba03a901d1d14f655a04167e14cd08ee
[ "MIT" ]
null
null
null
tech/UI/UIComposer.cpp
nbtdev/teardrop
fa9cc8faba03a901d1d14f655a04167e14cd08ee
[ "MIT" ]
null
null
null
tech/UI/UIComposer.cpp
nbtdev/teardrop
fa9cc8faba03a901d1d14f655a04167e14cd08ee
[ "MIT" ]
null
null
null
/****************************************************************************** Copyright (c) 2015 Teardrop Games 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 "stdafx.h" #include "UIComposer.h" #include "UILayer.h" #include "Memory/Memory.h" using namespace Teardrop; using namespace UI; //--------------------------------------------------------------------------- Composer::Composer() { } //--------------------------------------------------------------------------- Composer::~Composer() { clear(); } //--------------------------------------------------------------------------- void Composer::clear() { for (Layers::iterator it = m_layers.begin(); it != m_layers.end(); ++it) { it->second->clear(); delete it->second; } } //--------------------------------------------------------------------------- Layer* Composer::addLayer(int zOrder) { Layer* pLayer = TD_NEW Layer; m_layers.insert(Layers::value_type(zOrder, pLayer)); return pLayer; } //--------------------------------------------------------------------------- void Composer::removeLayer(Layer* pLayer) { for (Layers::iterator it = m_layers.begin(); it != m_layers.end(); ++it) { if (pLayer == it->second) { delete it->second; m_layers.erase(it); break; } } } //--------------------------------------------------------------------------- Composer::LayerRenderOrder Composer::getRenderOrder() const { return m_renderOrder; } //--------------------------------------------------------------------------- void Composer::setRenderOrder(LayerRenderOrder order) { m_renderOrder = order; } //--------------------------------------------------------------------------- bool Composer::update(float deltaT) { for (Layers::iterator it = m_layers.begin(); it != m_layers.end(); ++it) { it->second->update(deltaT); } return true; } //--------------------------------------------------------------------------- bool Composer::render(Renderer* pRenderer) { for (Layers::iterator it = m_layers.begin(); it != m_layers.end(); ++it) { it->second->render(pRenderer); } return true; } //--------------------------------------------------------------------------- void Composer::resize(float width, float height) { for (Layers::iterator it = m_layers.begin(); it != m_layers.end(); ++it) { it->second->resize(width, height); } } //--------------------------------------------------------------------------- bool Composer::injectMouseMove(int x, int y) { for (Layers::iterator it = m_layers.begin(); it != m_layers.end(); ++it) { if (it->second->injectMouseMove(x, y)) return true; } return false; } //--------------------------------------------------------------------------- bool Composer::injectMouseDown(int button, int x, int y) { for (Layers::iterator it = m_layers.begin(); it != m_layers.end(); ++it) { if (it->second->injectMouseDown(button, x, y)) return true; } return false; } //--------------------------------------------------------------------------- bool Composer::injectMouseUp(int button, int x, int y) { for (Layers::iterator it = m_layers.begin(); it != m_layers.end(); ++it) { if (it->second->injectMouseUp(button, x, y)) return true; } return false; } //--------------------------------------------------------------------------- bool Composer::injectKeyDown(int keyCode, int keyChar) { for (Layers::iterator it = m_layers.begin(); it != m_layers.end(); ++it) { if (it->second->injectKeyDown(keyCode, keyChar)) return true; } return false; } //--------------------------------------------------------------------------- bool Composer::injectKeyUp(int keyCode, int keyChar) { for (Layers::iterator it = m_layers.begin(); it != m_layers.end(); ++it) { if (it->second->injectKeyUp(keyCode, keyChar)) return true; } return false; } //--------------------------------------------------------------------------- bool Composer::injectKeyEvent(size_t msg, size_t wParam, size_t lParam) { for (Layers::iterator it = m_layers.begin(); it != m_layers.end(); ++it) { if (it->second->injectKeyEvent(msg, wParam, lParam)) return true; } return false; }
30.139535
79
0.51466
nbtdev
7f80d29eeacb5ac4a287f00143d09a2777445f72
1,305
hpp
C++
Sources/Core/Resources/Loaders/MapLoader.hpp
VladimirBalun/RacingWorld
c7e600c5899e3ea78f50bd2f8cd915437bad7789
[ "Apache-2.0" ]
70
2019-02-02T15:43:38.000Z
2022-03-09T13:58:27.000Z
Sources/Core/Resources/Loaders/MapLoader.hpp
VladimirBalun/RacingWorld
c7e600c5899e3ea78f50bd2f8cd915437bad7789
[ "Apache-2.0" ]
19
2019-03-27T05:57:30.000Z
2019-07-07T16:07:05.000Z
Sources/Core/Resources/Loaders/MapLoader.hpp
VladimirBalun/RacingWorld
c7e600c5899e3ea78f50bd2f8cd915437bad7789
[ "Apache-2.0" ]
32
2019-03-07T12:22:40.000Z
2022-03-18T01:12:56.000Z
/* * Copyright 2018 Vladimir Balun * * 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. */ #pragma once #include <string> #include "Aliases.hpp" #include "../Map.hpp" namespace Core::Resources { class Text; namespace Loaders { class MapLoader { public: static bool load(Map& map, std::string_view map_file_path) noexcept; private: static void loadDimensions(Map& map, const bpt::ptree::value_type& xml_value); static void loadObjectModelsIdentifiers(Map& map, const bpt::ptree& xml_models); static Map::MapObject getMapObjectFromXML(const bpt::ptree::value_type& xml_value); static std::vector<Map::MapObject> getSetMapObjectsFromXML(const bpt::ptree& xml_object); }; } }
27.765957
101
0.685057
VladimirBalun
7f89f09f8c62478230d349036956dfba1de223bd
3,363
cpp
C++
Source/ModuleImGui.cpp
BooLAW/Pau-Bonet-3D-Game-Engine
4ddf5ef5b28194a466770ff9492aa6181c202068
[ "MIT" ]
null
null
null
Source/ModuleImGui.cpp
BooLAW/Pau-Bonet-3D-Game-Engine
4ddf5ef5b28194a466770ff9492aa6181c202068
[ "MIT" ]
null
null
null
Source/ModuleImGui.cpp
BooLAW/Pau-Bonet-3D-Game-Engine
4ddf5ef5b28194a466770ff9492aa6181c202068
[ "MIT" ]
null
null
null
#include "ModuleImGui.h" #include "Application.h" ModuleImGui::ModuleImGui(Application * parent, bool start_enabled) : Module(parent,start_enabled) { } ModuleImGui::~ModuleImGui() { } bool ModuleImGui::Init() { ImGui_ImplSdlGL2_Init(App->window->window); return true; } update_status ModuleImGui::PreUpdate(float dt) { ImGui_ImplSdlGL2_NewFrame(App->window->window); return UPDATE_CONTINUE; } update_status ModuleImGui::Update(float dt) { //Create all UI items here //----TEST WINDOW if (DrawTopBar() != UPDATE_CONTINUE) return UPDATE_STOP; return UPDATE_CONTINUE; } update_status ModuleImGui::PostUpdate(float dt) { //Use Panels console.Print(); ImGui::Render(); return UPDATE_CONTINUE; } bool ModuleImGui::CleanUp() { ImGui_ImplSdlGL2_Shutdown(); return true; } update_status ModuleImGui::DrawTopBar() { if (ImGui::BeginMainMenuBar()) { if (ImGui::BeginMenu("File")) { if (ImGui::MenuItem("Quit", "ESC")) { return UPDATE_STOP; } ImGui::EndMenu(); } if (ImGui::BeginMenu("Create")) { if (ImGui::MenuItem("Sphere")) { show_sphere_creator = true; } ImGui::EndMenu(); } if (ImGui::BeginMenu("Tools")) { if (ImGui::MenuItem("Random Number Generator")) { show_random_num_gen = !show_random_num_gen; } if (ImGui::MenuItem("Console")) { show_console = !show_console; } if (ImGui::MenuItem("ImGui Demo")) { show_test_window = !show_test_window; } ImGui::EndMenu(); } if (ImGui::BeginMenu("Other...")) { if (ImGui::MenuItem("Link To Repository")) { App->OpenWeb("https://github.com/BooLAW/Pau-Bonet-3D-Game-Engine"); } ImGui::EndMenu(); } if (show_random_num_gen)ShowRandomCalculatorWindow(); if (show_test_window)ShowTestWindow(); if (show_console)ShowConsole(); if (show_sphere_creator)ShowSphereCreator(); ImGui::EndMainMenuBar(); } return UPDATE_CONTINUE; } void ModuleImGui::ShowRandomCalculatorWindow() { ImGui::Begin("Random Number Generator", &show_random_num_gen); ImGui::Text("Random Generator tool:"); ImGui::Text("-Random Integer between the 2 values:"); ImGui::DragInt("Minimum", &i_min, 1, 0, 100); ImGui::DragInt("Maximum", &i_max, 1, 0, 100); if (ImGui::Button("Generate Int") == true) { i_rand = (rand() % (i_max - i_min)) + i_min; } ImGui::Text("%d", i_rand); ImGui::Text("Random Float Generator:"); if (ImGui::Button("Generate float") == true) { //std function f_rand = static_cast <float> (rand()) / static_cast <float> (RAND_MAX); } ImGui::Text("%f", f_rand); ImGui::End(); } void ModuleImGui::ShowTestWindow() { ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver); ImGui::ShowTestWindow(&show_test_window); } void ModuleImGui::ShowConsole() { if(!console.is_active) console.SetActive(true); } void ModuleImGui::ShowSphereCreator() { if (ImGui::Begin("Sphere Creator")) { ImGui::InputInt("Radius", &rad_aux); ImGui::InputInt("Position X", &x_aux); ImGui::InputInt("Position Y", &y_aux); ImGui::InputInt("Position Z", &z_aux); if (ImGui::SmallButton("Create")) { pos_aux.Set(x_aux, y_aux, z_aux); App->physics->CreateSphere(pos_aux, rad_aux); } if (ImGui::SmallButton("Reset")) { x_aux = y_aux = z_aux = rad_aux =0; } ImGui::End(); } } void ModuleImGui::AddToConsole(const std::string text) { console.Add(text); }
21.150943
97
0.676182
BooLAW
7f8b367d0144b42339dbd6c1e07362172302e74d
2,899
cpp
C++
src/tests/test_mix/source/test_TAOCP_book_mul.cpp
grishavanika/mix
6a4b465debfd16a6cdc4b76cb730a17ee631b062
[ "MIT" ]
3
2018-01-25T01:14:37.000Z
2021-08-31T15:22:21.000Z
src/tests/test_mix/source/test_TAOCP_book_mul.cpp
grishavanika/mix
6a4b465debfd16a6cdc4b76cb730a17ee631b062
[ "MIT" ]
null
null
null
src/tests/test_mix/source/test_TAOCP_book_mul.cpp
grishavanika/mix
6a4b465debfd16a6cdc4b76cb730a17ee631b062
[ "MIT" ]
3
2020-03-07T06:35:23.000Z
2020-12-04T04:15:35.000Z
#include "precompiled.h" using namespace mix; namespace { Word MakeRandomWord(std::random_device& rd) { std::uniform_int_distribution<std::size_t> dist{0, Byte::k_max_value}; Word w; for (std::size_t i = 1; i <= 5; ++i) { w.set_byte(i, dist(rd)); } w.set_sign((dist(rd) < (Byte::k_max_value / 2)) ? Sign::Negative : Sign::Positive); return w; } } // namespace TEST(MUL_TAOCP_Book_Test, Multiply_RA_With_Cell_Replaces_RA_And_RX_Content) { Computer mix; { Register ra; ra.set_sign(Sign::Positive); ra.set_byte(1, 1); ra.set_byte(2, 1); ra.set_byte(3, 1); ra.set_byte(4, 1); ra.set_byte(5, 1); mix.set_ra(ra); } { Word w; w.set_sign(Sign::Positive); w.set_byte(1, 1); w.set_byte(2, 1); w.set_byte(3, 1); w.set_byte(4, 1); w.set_byte(5, 1); mix.set_memory(1000, w); } mix.execute(MakeMUL(1000)); Register expected_ra; { expected_ra.set_sign(Sign::Positive); expected_ra.set_byte(1, 0); expected_ra.set_byte(2, 1); expected_ra.set_byte(3, 2); expected_ra.set_byte(4, 3); expected_ra.set_byte(5, 4); } Register expected_rx; { expected_rx.set_sign(Sign::Positive); expected_rx.set_byte(1, 5); expected_rx.set_byte(2, 4); expected_rx.set_byte(3, 3); expected_rx.set_byte(4, 2); expected_rx.set_byte(5, 1); } ASSERT_EQ(expected_ra, mix.ra()); ASSERT_EQ(expected_rx, mix.rx()); } TEST(MUL_TAOCP_Book_Test, Multiply_RA_With_Cell_Takes_Into_Account_Field) { std::random_device rd; Computer mix; Register ra; ra.set_value(WordValue{-112}); Word w = MakeRandomWord(rd); w.set_byte(1, 2); mix.set_ra(ra); mix.set_memory(1000, w); mix.execute(MakeMUL(1000, WordField{1, 1})); ASSERT_EQ(WordValue(Sign::Negative, 0), mix.ra().value()); ASSERT_EQ(WordValue{-224}, mix.rx().value()); } TEST(MUL_TAOCP_Book_Test, Multiply_RA_With_Cell_Stores_Most_Significant_Part_In_RA) { Computer mix; { Register ra; ra.set_sign(Sign::Negative); ra.set_byte(1, 50); ra.set_byte(2, 0); ra.set_value(WordValue{112}, WordField{3, 4}, false/*do not touch sign*/); ra.set_byte(5, 4); mix.set_ra(ra); } { Word w; w.set_sign(Sign::Negative); w.set_byte(1, 2); w.set_byte(2, 0); w.set_byte(3, 0); w.set_byte(4, 0); w.set_byte(5, 0); mix.set_memory(1000, w); } mix.execute(MakeMUL(1000)); Register expected_ra; { expected_ra.set_value(WordValue{100}, WordField{0, 2}); expected_ra.set_byte(3, 0); expected_ra.set_value(WordValue{224}, WordField{4, 5}); } Register expected_rx; { expected_rx.set_sign(Sign::Positive); expected_rx.set_byte(1, 8); expected_rx.set_byte(2, 0); expected_rx.set_byte(3, 0); expected_rx.set_byte(4, 0); expected_rx.set_byte(5, 0); } ASSERT_EQ(expected_ra, mix.ra()); ASSERT_EQ(expected_rx, mix.rx()); }
20.856115
85
0.648844
grishavanika
7f9105992bf99805489bd2711496032da41a7fe8
17,085
cpp
C++
src/driver/driver.cpp
TrueFinch/KappaDBMS
f4f9e91c52ae33f929e6db458a713a98a9958da3
[ "Apache-2.0" ]
null
null
null
src/driver/driver.cpp
TrueFinch/KappaDBMS
f4f9e91c52ae33f929e6db458a713a98a9958da3
[ "Apache-2.0" ]
null
null
null
src/driver/driver.cpp
TrueFinch/KappaDBMS
f4f9e91c52ae33f929e6db458a713a98a9958da3
[ "Apache-2.0" ]
null
null
null
#include "driver.hpp" // TODO: explore for memory leaks (pointers) namespace sql { thread_local std::unordered_map<std::string, Driver::CapturedData> Driver::capture = {}; cmd::LiteralType LiteralTypeFromStr(const std::string str) { if (str == "INTEGER") return cmd::LiteralType::INTEGER; else if (str == "DOUBLE") return cmd::LiteralType::DOUBLE; else if (str == "TEXT") return cmd::LiteralType::TEXT; else if (str == "BOOL") return cmd::LiteralType::BOOL; return cmd::LiteralType::NONE; } void Driver::CaptureRawData(my_json meta, const se::RawData& raw) { // TODO: Refactor this shit capture.clear(); for (auto d = meta.items().begin(); d != meta.items().end(); ++d) { switch ( LiteralTypeFromStr(d.value()) ) { case cmd::LiteralType::INTEGER: capture.emplace(d.key(), std::make_pair( sql::Table::Column(d.key(), cmd::LiteralType::INTEGER), std::make_shared<IntField>(raw.Get<int32_t>()) )); break; case cmd::LiteralType::DOUBLE: capture.emplace(d.key(), std::make_pair( sql::Table::Column(d.key(), cmd::LiteralType::DOUBLE), std::make_shared<DoubleField>(raw.Get<double>()) )); break; case cmd::LiteralType::TEXT: capture.emplace(d.key(), std::make_pair( sql::Table::Column(d.key(), cmd::LiteralType::TEXT), std::make_shared<TextField>(raw.Get<std::string>()) )); break; case cmd::LiteralType::BOOL: capture.emplace(d.key(), std::make_pair( sql::Table::Column(d.key(), cmd::LiteralType::BOOL), std::make_shared<BoolField>(raw.Get<bool>()) )); break; default: throw std::logic_error("DriverError: Failed to capture data"); } } } std::string Driver::RunQuery(const std::string query) { capture.clear(); auto& parser = Parser::Instance(); auto instructions = parser.Process(query); std::vector<Table> tables; for (auto& instruction : instructions) { Table* t = instruction->Accept(*this); t->name_ = cmd::TableDefinition(instruction->GetRaw()); tables.push_back(*t); delete(t); } json result; result["code"] = 1; result["result"] = tables; return result.dump(); } Table* Driver::Execute(const cmd::Instruction& instruction) { throw std::logic_error("DriverError: Invalid instruction. Couldn't find child instruction"); } Table* Driver::Execute(const cmd::Expression&) { throw std::logic_error("DriverError: Call to base expression"); } Table* Driver::Execute(const cmd::Operation& instruction) { throw std::logic_error("DriverError: Call to base operation"); } Table* Driver::Execute(const cmd::TableDefinition& instruction) { return new Table(instruction); } Table* Driver::Execute(const cmd::CreateTable& instruction) { auto& storage = se::StorageEngine::Instance(); std::string name = instruction.table_.ToString(); if (storage.HasMetaData(name)) { throw std::logic_error("DriverError: Table already exists"); } se::MetaData& meta = storage.CreateData(name); for (auto& col : instruction.columns_) { meta.Add(col.name_, to_string(col.type_)); } se::size_t size = 0; for (auto& row : meta.data().at("public").items()) { size += mapping[row.value()]; } meta.Add("size", size, "private"); storage.Flush(); return new Table({ {"result", cmd::LiteralType::BOOL} }, { {std::make_shared<BoolField>(true)} }); } Table* Driver::Execute(const cmd::DropTable& instruction) { auto& storage = se::StorageEngine::Instance(); std::string name = instruction.table_.ToString(); if (!storage.HasMetaData(name)) { throw std::logic_error("DriverError: Table doesn't exist"); } storage.RemoveData(name); return new Table({ {"result", cmd::LiteralType::BOOL} }, { {std::make_shared<BoolField>(true)} }); } Table* Driver::Execute(const cmd::Select& instruction) { auto& storage = se::StorageEngine::Instance(); if (!storage.HasMetaData(instruction.table_.name_)) { throw std::logic_error("DriverError: Table doesn't exist"); } se::MetaData& meta = storage.GetMetaData(instruction.table_.ToString()); auto& columns_meta = meta.data().at("public"); size_t size = meta.data()["private"]["size"]; std::list<sql::Table::Column> columns; std::list<sql::Table::Record> records; std::list<se::RawData> data; if (instruction.where_ != nullptr) { data = storage.Read(meta, size, [&, this](const se::RawData& raw) { CaptureRawData(columns_meta, raw); auto result = std::shared_ptr<Table>(instruction.where_->Accept(*this)); return (result->GetRecords().back().back()->ToString() == "true"); }); } else { data = storage.Read(meta, size); } if (instruction.type() == cmd::InstructionType::SELECT_ALL) { for (auto d = columns_meta.items().begin(); d != columns_meta.items().end(); ++d) { columns.emplace_back(d.key(), LiteralTypeFromStr(d.value())); } for (auto& x : data) { sql::Table::Record record; for (auto& column : columns) { int test = 0; switch(column.second) { case cmd::LiteralType::INTEGER: record.emplace_back(std::make_shared<IntField>(x.Get<int32_t>())); break; case cmd::LiteralType::DOUBLE: record.emplace_back(std::make_shared<DoubleField>(x.Get<double>())); break; case cmd::LiteralType::BOOL: record.emplace_back(std::make_shared<BoolField>(x.Get<bool>())); break; case cmd::LiteralType::TEXT: record.emplace_back(std::make_shared<TextField>(x.Get<std::string>())); break; } } records.push_back(record); } } else if (!instruction.columnDef_.empty()) { if (data.empty()) { for (auto& expr : instruction.columnDef_) { columns.emplace_back(expr->ToString(), cmd::LiteralType::NONE); } } bool fillColumns = columns.empty(); for (auto& x : data) { CaptureRawData(columns_meta, x); sql::Table::Record record; for (auto& expr : instruction.columnDef_) { auto result = std::shared_ptr<Table>(expr->Accept(*this)); record.emplace_back( result->GetRecords().back().back() ); if (fillColumns) { columns.emplace_back(expr->ToString(), result->GetColumns().back().second); } } records.push_back(record); fillColumns = false; } } else { throw std::logic_error("DriverError: Sorry, we don't working with this type of SELECT query yet"); } return new Table(instruction.table_, std::move(columns), std::move(records)); } Table* Driver::Execute(const cmd::Insert& instruction) { auto& storage = se::StorageEngine::Instance(); if (!storage.HasMetaData(instruction.table_.name_)) { throw std::logic_error("DriverError: Table doesn't exist"); } se::MetaData& meta = storage.GetMetaData(instruction.table_.ToString()); if (instruction.into_.empty()) { auto &data = meta.data().at("public"); if (data.size() != instruction.values_.size()) { throw std::logic_error("DriverError: The number of values doesn't match the number of columns"); } auto d = data.items().begin(); se::RawData raw(meta.data()["private"]["size"]); for (auto l = instruction.values_.begin(); d != data.items().end() && l != instruction.values_.end(); ++d, ++l) { std::string str = data.at(d.key()); if (LiteralTypeFromStr(str) != l->ValueType()) { throw std::logic_error("DriverError: Type of value " + l->Value() + " and type of column " + str + " doesnt't match"); } switch (l->ValueType()) { case cmd::LiteralType::INTEGER: raw.Fill<int32_t>(std::stoi(l->Value())); break; case cmd::LiteralType::DOUBLE: raw.Fill<double>(std::stod(l->Value())); break; case cmd::LiteralType::BOOL: raw.Fill<bool>((bool) std::stoi(l->Value())); break; default: raw.Fill<std::string>(l->Value()); } } storage.Write(meta, raw.data(), raw.capacity()); } else { throw std::logic_error("DriverError: Sorry, we don't working with this type of INSERT query yet"); } return new Table({ {"result", cmd::LiteralType::BOOL} }, { {std::make_shared<BoolField>(true)} }); } Table* Driver::Execute(const cmd::Update& instruction) { auto& storage = se::StorageEngine::Instance(); if (!storage.HasMetaData(instruction.table_.ToString())) { throw std::logic_error("DriverError: Table doesn't exist"); } se::MetaData& meta = storage.GetMetaData(instruction.table_.ToString()); auto& columns_meta = meta.data().at("public"); size_t size = meta.data()["private"]["size"]; std::unordered_map<std::string, se::size_t> shift; se::size_t temp = 0; for (auto d = columns_meta.items().begin(); d != columns_meta.items().end(); ++d) { shift.emplace(d.key(), temp); temp += mapping[d.value()]; } storage.Update(meta, size, [&, this](se::RawData&& raw) { CaptureRawData(columns_meta, raw); bool updated = (instruction.where_ == nullptr); if (!updated) { auto result = std::shared_ptr<Table>(instruction.where_->Accept(*this)); updated = (result->GetRecords().back().back()->ToString() == "true"); } if (updated) { for (auto& set : instruction.setList_) { auto data = capture.find(set.first.name_); if (data == capture.end()) { continue; } std::shared_ptr<Table> t; switch (data->second.first.second) { case cmd::LiteralType::INTEGER: t.reset( set.second->Accept(*this) ); raw.Reset() .Skip<char>(shift[set.first.name_]) .Fill<int32_t>(std::stoi( t->GetRecords().back().back()->ToString() ), true); break; case cmd::LiteralType::DOUBLE: t.reset( set.second->Accept(*this) ); raw.Reset() .Skip<char>(shift[set.first.name_]) .Fill<double>(std::stod( t->GetRecords().back().back()->ToString() ), true); break; case cmd::LiteralType::BOOL: t.reset( set.second->Accept(*this) ); raw.Reset() .Skip<char>(shift[set.first.name_]) .Fill<bool>((bool) std::stoi( t->GetRecords().back().back()->ToString() ), true); break; default: t.reset( set.second->Accept(*this) ); raw.Reset() .Skip<char>(shift[set.first.name_]) .Fill<std::string>(t->GetRecords().back().back()->ToString(), true); } } } return updated; }); return new Table({ {"result", cmd::LiteralType::BOOL} }, { {std::make_shared<BoolField>(true)} }); } Table* Driver::Execute(const cmd::Delete& instruction) { auto& storage = se::StorageEngine::Instance(); if (!storage.HasMetaData(instruction.table_.ToString())) { throw std::logic_error("DriverError: Table doesn't exist"); } se::MetaData& meta = storage.GetMetaData(instruction.table_.ToString()); auto& columns_meta = meta.data().at("public"); size_t size = meta.data()["private"]["size"]; storage.Delete(meta, size, [&, this](const se::RawData& raw) { if (instruction.where_ == nullptr) { return true; } CaptureRawData(columns_meta, raw); auto result = std::shared_ptr<Table>(instruction.where_->Accept(*this)); return (result->GetRecords().back().back()->ToString() == "true"); }); return new Table({ {"result", cmd::LiteralType::BOOL} }, { {std::make_shared<BoolField>(true)} }); } Table* Driver::Execute(const cmd::ShowCreateTable& instruction) { auto& storage = se::StorageEngine::Instance(); if (!storage.HasMetaData(instruction.table_.ToString())) { throw std::logic_error("DriverError: Table doesn't exist"); } se::MetaData& meta = storage.GetMetaData(instruction.table_.ToString()); std::string result = "CREATE TABLE " + instruction.table_.ToString() + " ("; for (auto& j : meta.data().at("public").items()) { result += j.key() + " " + std::string(j.value()) + ", "; } result.pop_back(); result.pop_back(); result += ");"; return new Table({ {"result", cmd::LiteralType::TEXT} }, { {std::make_shared<TextField>(result)} }); } Table* Driver::Execute(const cmd::Literal& instruction) { switch (instruction.ValueType()) { case cmd::LiteralType::BOOL: return new Table({ {"result", cmd::LiteralType::BOOL} }, { {std::make_shared<BoolField>(instruction.bval_)} }); case cmd::LiteralType::INTEGER: return new Table({ {"result", cmd::LiteralType::INTEGER} }, { {std::make_shared<IntField>(instruction.ival_)} }); case cmd::LiteralType::DOUBLE: return new Table({ {"result", cmd::LiteralType::DOUBLE} }, { {std::make_shared<DoubleField>(instruction.fval_)} }); case cmd::LiteralType::TEXT: return new Table({ {"result", cmd::LiteralType::TEXT} }, { {std::make_shared<TextField>(instruction.sval_)} }); } return new Table({ {"result", cmd::LiteralType::NONE} }, { {std::make_shared<Field>()} }); } Table* Driver::Execute(const cmd::Column& instruction) { auto data = capture.find(instruction.name_); if (capture.find(instruction.name_) == capture.end()) { return new Table( { {instruction.name_, cmd::LiteralType::NONE} }, { {std::make_shared<Field>()} } ); } return new Table({ data->second.first }, { {data->second.second} }); } Table* Driver::Execute(const cmd::BinaryOperation& instruction) { auto operandA = std::shared_ptr<Table>(instruction.left_->Accept(*this)); auto operandB = std::shared_ptr<Table>(instruction.right_->Accept(*this)); switch (instruction.operation()) { case cmd::OperationType::PLUS: return new Table((*operandA) + (*operandB)); case cmd::OperationType::MINUS: return new Table((*operandA) - (*operandB)); case cmd::OperationType::MULTIPLY: return new Table((*operandA) * (*operandB)); case cmd::OperationType::DIVISION: return new Table((*operandA) / (*operandB)); case cmd::OperationType::MOD: return new Table((*operandA) % (*operandB)); case cmd::OperationType::AND: return new Table({{"bool", cmd::LiteralType::BOOL}}, {{std::make_shared<BoolField>( *operandA && *operandB )}}); case cmd::OperationType::OR: return new Table({{"bool", cmd::LiteralType::BOOL}}, {{std::make_shared<BoolField>( *operandA || *operandB )}}); case cmd::OperationType::XOR: return new Table({{"bool", cmd::LiteralType::BOOL}}, {{std::make_shared<BoolField>( *operandA ^ *operandB )}}); case cmd::OperationType::LESS: return new Table({{"bool", cmd::LiteralType::BOOL}}, {{std::make_shared<BoolField>( *operandA < *operandB )}}); case cmd::OperationType::GREATER: return new Table({{"bool", cmd::LiteralType::BOOL}}, {{std::make_shared<BoolField>( *operandA > *operandB )}}); case cmd::OperationType::EQUAL: return new Table({{"bool", cmd::LiteralType::BOOL}}, {{std::make_shared<BoolField>( *operandA == *operandB )}}); case cmd::OperationType::NOT_EQUAL: return new Table({{"bool", cmd::LiteralType::BOOL}}, {{std::make_shared<BoolField>( *operandA != *operandB )}}); case cmd::OperationType::LESS_EQUAL: return new Table({{"bool", cmd::LiteralType::BOOL}}, {{std::make_shared<BoolField>( *operandA <= *operandB )}}); case cmd::OperationType::GREATER_EQUAL: return new Table({{"bool", cmd::LiteralType::BOOL}}, {{std::make_shared<BoolField>( *operandA >= *operandB )}}); // case cmd::OperationType::FUNCTION: // throw std::logic_error("OperationError: Functions is not implemented yet"); default: throw std::logic_error("DriverError: Unknown or not implemented OperationType"); } throw std::logic_error("DriverError: Nothing to return from BinaryOperation"); return new Table(); } // TODO: refactor this ... Table* Driver::Execute(const cmd::UnaryOperation& instruction) { auto operand = std::shared_ptr<Table>(instruction.operator_->Accept(*this)); switch (instruction.operation()) { case cmd::OperationType::UNARY_MINUS: return new Table(-(*operand)); case cmd::OperationType::UNARY_PLUS: return new Table(*operand); case cmd::OperationType::NOT: return new Table({{"bool", cmd::LiteralType::BOOL}}, {{std::make_shared<BoolField>( !(*operand) )}}); // case cmd::OperationType::BIN_NOT: // return new Table(); // case cmd::OperationType::ISNULL: // return new Table(); default: throw std::logic_error("DriverError: Unknown or not implemented OperationType"); } throw std::logic_error("DriverError: Nothing to return from UnaryOperation"); return new Table(); } Table* Driver::Execute(const cmd::ColumnDefinition& instruction) { return new Table(); } } // namespace sql
35.154321
126
0.622827
TrueFinch
7f92ca77e8d0fe52cf40b0083751db6ddfa39f19
12,916
cpp
C++
src/fuml/src_gen/fUML/Semantics/SimpleClassifiers/impl/EnumerationValueImpl.cpp
MDE4CPP/MDE4CPP
9db9352dd3b1ae26a5f640e614ed3925499b93f1
[ "MIT" ]
12
2017-02-17T10:33:51.000Z
2022-03-01T02:48:10.000Z
src/fuml/src_gen/fUML/Semantics/SimpleClassifiers/impl/EnumerationValueImpl.cpp
ndongmo/MDE4CPP
9db9352dd3b1ae26a5f640e614ed3925499b93f1
[ "MIT" ]
28
2017-10-17T20:23:52.000Z
2021-03-04T16:07:13.000Z
src/fuml/src_gen/fUML/Semantics/SimpleClassifiers/impl/EnumerationValueImpl.cpp
ndongmo/MDE4CPP
9db9352dd3b1ae26a5f640e614ed3925499b93f1
[ "MIT" ]
22
2017-03-24T19:03:58.000Z
2022-03-31T12:10:07.000Z
#include "fUML/Semantics/SimpleClassifiers/impl/EnumerationValueImpl.hpp" #ifdef NDEBUG #define DEBUG_MESSAGE(a) /**/ #else #define DEBUG_MESSAGE(a) a #endif #ifdef ACTIVITY_DEBUG_ON #define ACT_DEBUG(a) a #else #define ACT_DEBUG(a) /**/ #endif //#include "util/ProfileCallCount.hpp" #include <cassert> #include <iostream> #include <sstream> #include "abstractDataTypes/SubsetUnion.hpp" #include "ecore/EAnnotation.hpp" #include "ecore/EClass.hpp" //Includes from codegen annotation #include "fUML/FUMLFactory.hpp" #include "uml/Class.hpp" #include "uml/Enumeration.hpp" #include "uml/EnumerationLiteral.hpp" #include "uml/InstanceSpecification.hpp" #include "uml/InstanceValue.hpp" #include "uml/umlFactory.hpp" //Forward declaration includes #include "persistence/interfaces/XLoadHandler.hpp" // used for Persistence #include "persistence/interfaces/XSaveHandler.hpp" // used for Persistence #include <exception> // used in Persistence #include "uml/Classifier.hpp" #include "uml/Enumeration.hpp" #include "uml/EnumerationLiteral.hpp" #include "fUML/Semantics/Values/Value.hpp" #include "uml/ValueSpecification.hpp" //Factories an Package includes #include "fUML/Semantics/SimpleClassifiers/impl/SimpleClassifiersFactoryImpl.hpp" #include "fUML/Semantics/SimpleClassifiers/impl/SimpleClassifiersPackageImpl.hpp" #include "fUML/fUMLFactory.hpp" #include "fUML/fUMLPackage.hpp" #include "fUML/Semantics/SemanticsFactory.hpp" #include "fUML/Semantics/SemanticsPackage.hpp" #include "ecore/EAttribute.hpp" #include "ecore/EStructuralFeature.hpp" using namespace fUML::Semantics::SimpleClassifiers; //********************************* // Constructor / Destructor //********************************* EnumerationValueImpl::EnumerationValueImpl() { } EnumerationValueImpl::~EnumerationValueImpl() { #ifdef SHOW_DELETION std::cout << "-------------------------------------------------------------------------------------------------\r\ndelete EnumerationValue "<< this << "\r\n------------------------------------------------------------------------ " << std::endl; #endif } EnumerationValueImpl::EnumerationValueImpl(const EnumerationValueImpl & obj):EnumerationValueImpl() { //create copy of all Attributes #ifdef SHOW_COPIES std::cout << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\ncopy EnumerationValue "<< this << "\r\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ " << std::endl; #endif //copy references with no containment (soft copy) m_literal = obj.getLiteral(); m_type = obj.getType(); //Clone references with containment (deep copy) } std::shared_ptr<ecore::EObject> EnumerationValueImpl::copy() const { std::shared_ptr<EnumerationValueImpl> element(new EnumerationValueImpl(*this)); element->setThisEnumerationValuePtr(element); return element; } std::shared_ptr<ecore::EClass> EnumerationValueImpl::eStaticClass() const { return fUML::Semantics::SimpleClassifiers::SimpleClassifiersPackage::eInstance()->getEnumerationValue_Class(); } //********************************* // Attribute Setter Getter //********************************* //********************************* // Operations //********************************* std::shared_ptr<fUML::Semantics::Values::Value> EnumerationValueImpl::_copy() { //ADD_COUNT(__PRETTY_FUNCTION__) //generated from body annotation // Create a new enumeration value with the same literal as this enumeration value. std::shared_ptr<fUML::Semantics::SimpleClassifiers::EnumerationValue> newValue(new fUML::Semantics::SimpleClassifiers::EnumerationValueImpl()); newValue->setType(this->getType()); newValue->setLiteral(this->getLiteral()); return newValue; //end of body } bool EnumerationValueImpl::equals(std::shared_ptr<fUML::Semantics::Values::Value> otherValue) { //ADD_COUNT(__PRETTY_FUNCTION__) //generated from body annotation bool isEqual = false; std::shared_ptr<fUML::Semantics::SimpleClassifiers::EnumerationValue> value = std::dynamic_pointer_cast<fUML::Semantics::SimpleClassifiers::EnumerationValue>(otherValue); if(value != nullptr) { isEqual = (value->getLiteral() == this->getLiteral()); } return isEqual; //end of body } std::shared_ptr<Bag<uml::Classifier> > EnumerationValueImpl::getTypes() { //ADD_COUNT(__PRETTY_FUNCTION__) //generated from body annotation std::shared_ptr<Bag<uml::Classifier> > types(new Bag<uml::Classifier>()); types->push_back(std::dynamic_pointer_cast<uml::Classifier>(this->getType())); return types; //end of body } std::shared_ptr<fUML::Semantics::Values::Value> EnumerationValueImpl::new_() { //ADD_COUNT(__PRETTY_FUNCTION__) //generated from body annotation return std::shared_ptr<fUML::Semantics::Values::Value>(fUML::Semantics::SimpleClassifiers::SimpleClassifiersFactory::eInstance()->createEnumerationValue()); //end of body } std::shared_ptr<uml::ValueSpecification> EnumerationValueImpl::specify() { //ADD_COUNT(__PRETTY_FUNCTION__) //generated from body annotation std::shared_ptr<uml::InstanceValue> instanceValue(uml::umlFactory::eInstance()->createInstanceValue_in_Namespace(std::shared_ptr<uml::Class>())); //Remark: instance is so defined in the specification, but even there is not used. //uml::InstanceSpecification * instance = uml::umlFactory::eInstance()->createInstanceSpecification(std::shared_ptr<uml::Class>()); instanceValue->setType(this->getType()); instanceValue->setInstance(this->getLiteral()); return instanceValue; //end of body } std::string EnumerationValueImpl::toString() { //ADD_COUNT(__PRETTY_FUNCTION__) //generated from body annotation return this->getLiteral()->getName(); //end of body } //********************************* // References //********************************* /* Getter & Setter for reference literal */ std::shared_ptr<uml::EnumerationLiteral > EnumerationValueImpl::getLiteral() const { //assert(m_literal); return m_literal; } void EnumerationValueImpl::setLiteral(std::shared_ptr<uml::EnumerationLiteral> _literal) { m_literal = _literal; } /* Getter & Setter for reference type */ std::shared_ptr<uml::Enumeration > EnumerationValueImpl::getType() const { //assert(m_type); return m_type; } void EnumerationValueImpl::setType(std::shared_ptr<uml::Enumeration> _type) { m_type = _type; } //********************************* // Union Getter //********************************* std::shared_ptr<EnumerationValue> EnumerationValueImpl::getThisEnumerationValuePtr() const { return m_thisEnumerationValuePtr.lock(); } void EnumerationValueImpl::setThisEnumerationValuePtr(std::weak_ptr<EnumerationValue> thisEnumerationValuePtr) { m_thisEnumerationValuePtr = thisEnumerationValuePtr; setThisValuePtr(thisEnumerationValuePtr); } std::shared_ptr<ecore::EObject> EnumerationValueImpl::eContainer() const { return nullptr; } //********************************* // Structural Feature Getter/Setter //********************************* Any EnumerationValueImpl::eGet(int featureID, bool resolve, bool coreType) const { switch(featureID) { case fUML::Semantics::SimpleClassifiers::SimpleClassifiersPackage::ENUMERATIONVALUE_ATTRIBUTE_LITERAL: return eAny(std::dynamic_pointer_cast<ecore::EObject>(getLiteral())); //410 case fUML::Semantics::SimpleClassifiers::SimpleClassifiersPackage::ENUMERATIONVALUE_ATTRIBUTE_TYPE: return eAny(std::dynamic_pointer_cast<ecore::EObject>(getType())); //411 } return fUML::Semantics::Values::ValueImpl::eGet(featureID, resolve, coreType); } bool EnumerationValueImpl::internalEIsSet(int featureID) const { switch(featureID) { case fUML::Semantics::SimpleClassifiers::SimpleClassifiersPackage::ENUMERATIONVALUE_ATTRIBUTE_LITERAL: return getLiteral() != nullptr; //410 case fUML::Semantics::SimpleClassifiers::SimpleClassifiersPackage::ENUMERATIONVALUE_ATTRIBUTE_TYPE: return getType() != nullptr; //411 } return fUML::Semantics::Values::ValueImpl::internalEIsSet(featureID); } bool EnumerationValueImpl::eSet(int featureID, Any newValue) { switch(featureID) { case fUML::Semantics::SimpleClassifiers::SimpleClassifiersPackage::ENUMERATIONVALUE_ATTRIBUTE_LITERAL: { // BOOST CAST std::shared_ptr<ecore::EObject> _temp = newValue->get<std::shared_ptr<ecore::EObject>>(); std::shared_ptr<uml::EnumerationLiteral> _literal = std::dynamic_pointer_cast<uml::EnumerationLiteral>(_temp); setLiteral(_literal); //410 return true; } case fUML::Semantics::SimpleClassifiers::SimpleClassifiersPackage::ENUMERATIONVALUE_ATTRIBUTE_TYPE: { // BOOST CAST std::shared_ptr<ecore::EObject> _temp = newValue->get<std::shared_ptr<ecore::EObject>>(); std::shared_ptr<uml::Enumeration> _type = std::dynamic_pointer_cast<uml::Enumeration>(_temp); setType(_type); //411 return true; } } return fUML::Semantics::Values::ValueImpl::eSet(featureID, newValue); } //********************************* // Persistence Functions //********************************* void EnumerationValueImpl::load(std::shared_ptr<persistence::interfaces::XLoadHandler> loadHandler) { std::map<std::string, std::string> attr_list = loadHandler->getAttributeList(); loadAttributes(loadHandler, attr_list); // // Create new objects (from references (containment == true)) // // get fUMLFactory int numNodes = loadHandler->getNumOfChildNodes(); for(int ii = 0; ii < numNodes; ii++) { loadNode(loadHandler->getNextNodeName(), loadHandler); } } void EnumerationValueImpl::loadAttributes(std::shared_ptr<persistence::interfaces::XLoadHandler> loadHandler, std::map<std::string, std::string> attr_list) { try { std::map<std::string, std::string>::const_iterator iter; std::shared_ptr<ecore::EClass> metaClass = this->eClass(); // get MetaClass iter = attr_list.find("literal"); if ( iter != attr_list.end() ) { // add unresolvedReference to loadHandler's list loadHandler->addUnresolvedReference(iter->second, loadHandler->getCurrentObject(), metaClass->getEStructuralFeature("literal")); // TODO use getEStructuralFeature() with id, for faster access to EStructuralFeature } iter = attr_list.find("type"); if ( iter != attr_list.end() ) { // add unresolvedReference to loadHandler's list loadHandler->addUnresolvedReference(iter->second, loadHandler->getCurrentObject(), metaClass->getEStructuralFeature("type")); // TODO use getEStructuralFeature() with id, for faster access to EStructuralFeature } } catch (std::exception& e) { std::cout << "| ERROR | " << e.what() << std::endl; } catch (...) { std::cout << "| ERROR | " << "Exception occurred" << std::endl; } fUML::Semantics::Values::ValueImpl::loadAttributes(loadHandler, attr_list); } void EnumerationValueImpl::loadNode(std::string nodeName, std::shared_ptr<persistence::interfaces::XLoadHandler> loadHandler) { std::shared_ptr<fUML::Semantics::SimpleClassifiers::SimpleClassifiersFactory> modelFactory=fUML::Semantics::SimpleClassifiers::SimpleClassifiersFactory::eInstance(); //load BasePackage Nodes fUML::Semantics::Values::ValueImpl::loadNode(nodeName, loadHandler); } void EnumerationValueImpl::resolveReferences(const int featureID, std::list<std::shared_ptr<ecore::EObject> > references) { switch(featureID) { case fUML::Semantics::SimpleClassifiers::SimpleClassifiersPackage::ENUMERATIONVALUE_ATTRIBUTE_LITERAL: { if (references.size() == 1) { // Cast object to correct type std::shared_ptr<uml::EnumerationLiteral> _literal = std::dynamic_pointer_cast<uml::EnumerationLiteral>( references.front() ); setLiteral(_literal); } return; } case fUML::Semantics::SimpleClassifiers::SimpleClassifiersPackage::ENUMERATIONVALUE_ATTRIBUTE_TYPE: { if (references.size() == 1) { // Cast object to correct type std::shared_ptr<uml::Enumeration> _type = std::dynamic_pointer_cast<uml::Enumeration>( references.front() ); setType(_type); } return; } } fUML::Semantics::Values::ValueImpl::resolveReferences(featureID, references); } void EnumerationValueImpl::save(std::shared_ptr<persistence::interfaces::XSaveHandler> saveHandler) const { saveContent(saveHandler); fUML::Semantics::Values::ValueImpl::saveContent(saveHandler); fUML::Semantics::Loci::SemanticVisitorImpl::saveContent(saveHandler); ecore::EObjectImpl::saveContent(saveHandler); } void EnumerationValueImpl::saveContent(std::shared_ptr<persistence::interfaces::XSaveHandler> saveHandler) const { try { std::shared_ptr<fUML::Semantics::SimpleClassifiers::SimpleClassifiersPackage> package = fUML::Semantics::SimpleClassifiers::SimpleClassifiersPackage::eInstance(); // Add references saveHandler->addReference("literal", this->getLiteral()); saveHandler->addReference("type", this->getType()); } catch (std::exception& e) { std::cout << "| ERROR | " << e.what() << std::endl; } }
31.273608
245
0.707572
MDE4CPP
7fa36cc69e484a584fe26dae00503d759850a325
1,688
hpp
C++
SDK/ARKSurvivalEvolved_SpaceDolphinLaserUpgrade_parameters.hpp
2bite/ARK-SDK
c38ca9925309516b2093ad8c3a70ed9489e1d573
[ "MIT" ]
10
2020-02-17T19:08:46.000Z
2021-07-31T11:07:19.000Z
SDK/ARKSurvivalEvolved_SpaceDolphinLaserUpgrade_parameters.hpp
2bite/ARK-SDK
c38ca9925309516b2093ad8c3a70ed9489e1d573
[ "MIT" ]
9
2020-02-17T18:15:41.000Z
2021-06-06T19:17:34.000Z
SDK/ARKSurvivalEvolved_SpaceDolphinLaserUpgrade_parameters.hpp
2bite/ARK-SDK
c38ca9925309516b2093ad8c3a70ed9489e1d573
[ "MIT" ]
3
2020-07-22T17:42:07.000Z
2021-06-19T17:16:13.000Z
#pragma once // ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_SpaceDolphinLaserUpgrade_classes.hpp" namespace sdk { //--------------------------------------------------------------------------- //Parameters //--------------------------------------------------------------------------- // Function SpaceDolphinLaserUpgrade.SpaceDolphinLaserUpgrade_C.BPCustomIsRelevantForClient struct ASpaceDolphinLaserUpgrade_C_BPCustomIsRelevantForClient_Params { class APlayerController** ForPC; // (Parm, ZeroConstructor, IsPlainOldData) bool ReturnValue; // (Parm, OutParm, ZeroConstructor, ReturnParm, IsPlainOldData) }; // Function SpaceDolphinLaserUpgrade.SpaceDolphinLaserUpgrade_C.ReceiveTick struct ASpaceDolphinLaserUpgrade_C_ReceiveTick_Params { float* DeltaSeconds; // (Parm, ZeroConstructor, IsPlainOldData) }; // Function SpaceDolphinLaserUpgrade.SpaceDolphinLaserUpgrade_C.UserConstructionScript struct ASpaceDolphinLaserUpgrade_C_UserConstructionScript_Params { }; // Function SpaceDolphinLaserUpgrade.SpaceDolphinLaserUpgrade_C.ExecuteUbergraph_SpaceDolphinLaserUpgrade struct ASpaceDolphinLaserUpgrade_C_ExecuteUbergraph_SpaceDolphinLaserUpgrade_Params { int EntryPoint; // (Parm, ZeroConstructor, IsPlainOldData) }; } #ifdef _MSC_VER #pragma pack(pop) #endif
36.695652
173
0.594194
2bite
7fa5893f7b9b981a540ee9b2114740ba97313250
1,939
cpp
C++
src/main.cpp
tevoran/haeschen-und-woelfchen
4d993f9bfbe1c767292ff00cf980830ca8b9c913
[ "BSD-2-Clause" ]
2
2021-06-11T18:58:42.000Z
2021-06-11T19:09:30.000Z
src/main.cpp
tevoran/haeschen-und-woelfchen
4d993f9bfbe1c767292ff00cf980830ca8b9c913
[ "BSD-2-Clause" ]
null
null
null
src/main.cpp
tevoran/haeschen-und-woelfchen
4d993f9bfbe1c767292ff00cf980830ca8b9c913
[ "BSD-2-Clause" ]
null
null
null
#include <huw.hpp> #include <level/actual_levels.hpp> #undef main int main(int argc, char *argv[]) { //SDL_Color TEXT_COLOR={228,20,228,0}; huw::game game; huw::sprite background("../assets/DarkGhetto.png", & game, 0, 0, 640, 360, RESX, RESY); huw::sprite hase("../assets/Haeschen1.png", &game, 0, 0, 32, 32, PLAYER_SIZE, PLAYER_SIZE); huw::sprite wolf("../assets/Woelfchen1.png", &game, 0, 0, 32, 32, PLAYER_SIZE, PLAYER_SIZE); huw::player player(&hase, &wolf, &game); std::vector<huw::level> level; level.push_back(huw::level(huw::levelTest, &game, player)); //level 0 int current_level=0; int current_instance=0; bool quit=false; while(!quit) { background.render(); level[current_instance].enemy_update(); level[current_instance].render(); if(level[current_instance].done(player)) { current_level++; current_instance++; if(current_level==1) { level.push_back(huw::level(huw::level1, &game, player)); //level 1 } if(current_level==2) { level.push_back(huw::level(huw::level2, &game, player)); //level 2 } if(current_level==3) { level.push_back(huw::level(huw::level3, &game, player)); //level 3 } } if(level[current_instance].game_over(player)) { current_instance++; std::cout << current_instance << std::endl; if(current_level==0) { level.push_back(huw::level(huw::level0, &game, player)); //level 0 } if(current_level==1) { level.push_back(huw::level(huw::level1, &game, player)); //level 1 } if(current_level==2) { level.push_back(huw::level(huw::level2, &game, player)); //level 2 } if(current_level==3) { level.push_back(huw::level(huw::level3, &game, player)); //level 3 } } huw::level_scripts(current_level, game); if(current_level == 4){ exit(1); } player.update(); //muss vor der level kollision sein level[current_instance].collision(player); game.update(quit); } }
24.858974
93
0.650335
tevoran
7fab53529cd53d2fee571d670a2ca2e68c974025
6,030
cpp
C++
Sources/Samples/Stealth/Utils.cpp
jdelezenne/Sonata
fb1b1b64a78874a0ab2809995be4b6f14f9e4d56
[ "MIT" ]
null
null
null
Sources/Samples/Stealth/Utils.cpp
jdelezenne/Sonata
fb1b1b64a78874a0ab2809995be4b6f14f9e4d56
[ "MIT" ]
null
null
null
Sources/Samples/Stealth/Utils.cpp
jdelezenne/Sonata
fb1b1b64a78874a0ab2809995be4b6f14f9e4d56
[ "MIT" ]
null
null
null
/*============================================================================= Utils.cpp Project: Sonata Engine Author: Julien Delezenne =============================================================================*/ #include "Utils.h" Image* CreateImage(const String& fileName) { Resource* resource; String path = FileSystem::Instance()->GetFullPath(fileName); resource = ResourceHelper::LoadFromFile(path, SE_ID_DATA_IMAGE); if (resource == NULL) return NULL; return (Image*)resource->GetData(); } Texture* CreateTexture(const String& fileName) { Texture* texture; Image* image; image = CreateImage(fileName); if (!RenderSystem::Current()->CreateTexture(image, &texture)) return NULL; return texture; } Font* CreateFont(const String& fileName) { String path = FileSystem::Instance()->GetFullPath(fileName); Resource* resImage = ResourceHelper::LoadFromFile(path, SE_ID_DATA_IMAGE); if (resImage == NULL) return NULL; Image* fontImage = (Image*)resImage->GetData(); if (fontImage == NULL) return NULL; Texture* texture; RenderSystem::Current()->CreateTexture(fontImage, &texture); String xmlName = Path::Combine(Path::GetDirectoryName(path), Path::ChangeExtension(path, _T("xml"))); XMLReader reader(xmlName); SonataEngine::XMLDocument* document = reader.GetDocument(); if (document == NULL) return NULL; Font* font = new Font(); font->SetTexture(texture); const XMLNode::XMLAttributeList& fontAttributes = document->GetDocumentElement()->GetAttributes(); for (int i=0; i<fontAttributes.Count(); i++) { if (fontAttributes[i]->GetName().CompareTo("Spacing", true) == 0) font->SetSpacing(fontAttributes[i]->GetValue().ToInt32()); else if (fontAttributes[i]->GetName().CompareTo("SpaceWidth", true) == 0) font->SetSpaceWidth(fontAttributes[i]->GetValue().ToInt32()); else if (fontAttributes[i]->GetName().CompareTo("Height", true) == 0) font->SetHeight(fontAttributes[i]->GetValue().ToInt32()); } XMLNode* glyths = document->GetDocumentElement()->GetFirstChild(); XMLNode* glyth = glyths->GetFirstChild(); while (glyth != NULL) { FontGlyth fontGlyth; const XMLNode::XMLAttributeList& glythAttributes = glyth->GetAttributes(); for (int i=0; i<glythAttributes.Count(); i++) { try { if (glythAttributes[i]->GetName().CompareTo("Character", true) == 0) fontGlyth.Character = glythAttributes[i]->GetValue().ToChar(); else if (glythAttributes[i]->GetName().CompareTo("X", true) == 0) fontGlyth.Rectangle.X = glythAttributes[i]->GetValue().ToInt32(); else if (glythAttributes[i]->GetName().CompareTo("Y", true) == 0) fontGlyth.Rectangle.Y = glythAttributes[i]->GetValue().ToInt32(); else if (glythAttributes[i]->GetName().CompareTo("Width", true) == 0) fontGlyth.Rectangle.Width = glythAttributes[i]->GetValue().ToInt32(); } catch (const FormatException&) { } } fontGlyth.Rectangle.Width -= fontGlyth.Rectangle.X; fontGlyth.Rectangle.Height = font->GetHeight(); if (fontGlyth.Character != 0 && !fontGlyth.Rectangle.IsEmpty()) { font->SetGlyth(fontGlyth.Character, fontGlyth); } glyth = glyth->GetNextSibling(); } font->Build(); delete fontImage; return font; } Sprite* CreateSprite(const String& fileName) { Texture* image = CreateTexture(fileName); if (image == NULL) return NULL; Sprite* sprite = new Sprite(); SpriteFrame* frame = new SpriteFrame(); SizeInt imageSize = SizeInt(image->GetWidth(), image->GetHeight()); frame->SetSourceRect(RectangleInt(PointInt(0, 0), imageSize)); frame->SetTexture(image); sprite->AddSpriteFrame(frame); sprite->SetSize(Vector2(imageSize.Width, imageSize.Height)); return sprite; } Model* CreateModel(const String& fileName) { Model* model; Resource* resource; String path = FileSystem::Instance()->GetFullPath(fileName); resource = ResourceHelper::LoadFromFile(path, SE_ID_DATA_MODEL); if (resource == NULL) return NULL; model = (Model*)resource->GetData(); model->SetName(Path::GetFileNameWithoutExtension(path)); return model; } ShaderProgram* CreateVP(const String& fileName, const String& entryPoint) { String path = FileSystem::Instance()->GetFullPath(fileName); File* file = new File(path); if (file == NULL) return NULL; FileStreamPtr stream = file->Open(FileMode_Open, FileAccess_Read, FileShare_Read); if (stream == NULL) { delete file; return NULL; } TextStream text((Stream*)&(*stream)); String source = text.ReadToEnd(); ShaderProgram* vp = ShaderSystem::Current()->CreateShaderProgram(ShaderProgramType_Vertex); vp->SetSourceData(source); vp->SetEntryPoint(entryPoint); vp->Compile(); vp->Create(); return vp; } ShaderProgram* CreatePP(const String& fileName, const String& entryPoint) { String path = FileSystem::Instance()->GetFullPath(fileName); File* file = new File(path); if (file == NULL) return NULL; FileStreamPtr stream = file->Open(FileMode_Open, FileAccess_Read, FileShare_Read); if (stream == NULL) { delete file; return NULL; } TextStream text((Stream*)&(*stream)); String source = text.ReadToEnd(); ShaderProgram* pp = ShaderSystem::Current()->CreateShaderProgram(ShaderProgramType_Pixel); pp->SetSourceData(source); pp->SetEntryPoint(entryPoint); pp->Compile(); pp->Create(); return pp; } ShaderMaterial* CreateHWShader(const String& vertex, const String& pixel, const String& entryPoint) { ShaderMaterial* shader = new Shader(); ShaderTechnique* technique = new ShaderTechnique(); ShaderPass* pass = new ShaderPass(); pass->AddSamplerState(new SamplerState()); TextureState* textureState = new TextureState(); Texture* texture = CreateTexture(_T("tswater.dds")); textureState->SetTexture(texture); pass->AddTextureState(textureState); if (ShaderSystem::Current()) { ShaderProgram* vp = CreateVP(vertex, entryPoint); ShaderProgram* pp = CreatePP(pixel, entryPoint); pass->SetVertexProgram(vp); pass->SetPixelProgram(pp); } technique->AddPass(pass); shader->AddTechnique(technique); return shader; }
27.162162
99
0.697181
jdelezenne
7fb1332c42abf769e96f1582b584b85ed20e38b2
3,490
hpp
C++
src/libs/inputting/Input.hpp
JKot-Coder/OpenDemo
8b9554914f5bab08df47e032486ca668a560c97c
[ "BSD-3-Clause" ]
null
null
null
src/libs/inputting/Input.hpp
JKot-Coder/OpenDemo
8b9554914f5bab08df47e032486ca668a560c97c
[ "BSD-3-Clause" ]
null
null
null
src/libs/inputting/Input.hpp
JKot-Coder/OpenDemo
8b9554914f5bab08df47e032486ca668a560c97c
[ "BSD-3-Clause" ]
null
null
null
#pragma once #include <map> #include "common/Math.hpp" #include "windowing/InputtingWindow.hpp" namespace RR { namespace Inputting { enum InputKey { ikNone, // keyboard ikLeft, ikRight, ikUp, ikDown, ikSpace, ikTab, ikEnter, ikEscape, ikShift, ikCtrl, ikAlt, ik0, ik1, ik2, ik3, ik4, ik5, ik6, ik7, ik8, ik9, ikA, ikB, ikC, ikD, ikE, ikF, ikG, ikH, ikI, ikJ, ikK, ikL, ikM, ikN, ikO, ikP, ikQ, ikR, ikS, ikT, ikU, ikV, ikW, ikX, ikY, ikZ, // mouse ikMouseL, ikMouseR, ikMouseM, ikMAX }; class IKeyboardListener { public: virtual void OnKeyUp(InputKey inputKey) { (void)inputKey; } virtual void OnKeyDown(InputKey inputKey) { (void)inputKey; } }; class IMouseListener { public: virtual void OnMouseMove(const Vector2i& position, const Vector2i& relative) { (void)position; (void)relative; } virtual void OnButtonUp(InputKey inputKey) { (void)inputKey; } virtual void OnButtonDown(InputKey inputKey) { (void)inputKey; } }; class Input final : public IMouseListener, IKeyboardListener { public: struct Mouse { Vector2i pos; Vector2i relative; struct { Vector2i L, R, M; } start; } Mouse; ~Input(); void Reset(); void Init(); void Terminate(); void Update(); inline bool IsDown(InputKey inputKey) const { ASSERT(inputKey >= 0 && inputKey < ikMAX) return _down[inputKey]; } inline static const std::unique_ptr<Input>& Instance() { return _instance; } void SubscribeToWindow(const std::shared_ptr<WindowSystem::InputtingWindow>& inputtingWindow); private: static std::unique_ptr<Input> _instance; std::shared_ptr<WindowSystem::InputtingWindow> _inputtingWindow; InputKey _lastKey; bool _down[ikMAX]; virtual void OnKeyUp(InputKey inputKey) override; virtual void OnKeyDown(InputKey inputKey) override; virtual void OnMouseMove(const Vector2i& position, const Vector2i& relative) override; virtual void OnButtonUp(InputKey inputKey) override; virtual void OnButtonDown(InputKey inputKey) override; void SetDown(InputKey key, bool value); void SetPos(InputKey key, const Vector2i& pos); }; inline static const std::unique_ptr<Input>& Instance() { return Input::Instance(); } } }
23.581081
106
0.450143
JKot-Coder
7fbb34c41f2555d8b0adcea32fbb69856d378f93
6,925
hpp
C++
source/ashes/renderer/GlRenderer/Enum/GlGetParameter.hpp
DragonJoker/Ashes
a6ed950b3fd8fb9626c60b4291fbd52ea75ac66e
[ "MIT" ]
227
2018-09-17T16:03:35.000Z
2022-03-19T02:02:45.000Z
source/ashes/renderer/GlRenderer/Enum/GlGetParameter.hpp
DragonJoker/RendererLib
0f8ad8edec1b0929ebd10247d3dd0a9ee8f8c91a
[ "MIT" ]
39
2018-02-06T22:22:24.000Z
2018-08-29T07:11:06.000Z
source/ashes/renderer/GlRenderer/Enum/GlGetParameter.hpp
DragonJoker/Ashes
a6ed950b3fd8fb9626c60b4291fbd52ea75ac66e
[ "MIT" ]
8
2019-05-04T10:33:32.000Z
2021-04-05T13:19:27.000Z
/* This file belongs to Ashes. See LICENSE file in root folder */ #pragma once #ifdef GL_SUBPIXEL_BITS #undef GL_SUBPIXEL_BITS #endif #ifdef GL_MAX_TEXTURE_SIZE #undef GL_MAX_TEXTURE_SIZE #endif #ifdef GL_MAX_VIEWPORT_DIMS #undef GL_MAX_VIEWPORT_DIMS #endif #ifdef GL_POINT_SIZE_RANGE #undef GL_POINT_SIZE_RANGE #endif #ifdef GL_POINT_SIZE_GRANULARITY #undef GL_POINT_SIZE_GRANULARITY #endif #ifdef GL_LINE_WIDTH_GRANULARITY #undef GL_LINE_WIDTH_GRANULARITY #endif namespace ashes::gl { enum GlGetParameter { GL_SMOOTH_LINE_WIDTH_RANGE = 0x0B22, GL_ALIASED_LINE_WIDTH_RANGE = 0x846E, GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34, GL_MAX_TEXTURE_SIZE = 0x0D33, GL_SUBPIXEL_BITS = 0x0D50, GL_MAX_3D_TEXTURE_SIZE = 0x8073, GL_MAX_ARRAY_TEXTURE_LAYERS = 0x88FF, GL_MAX_CLIP_DISTANCES = 0x0D32, GL_MAX_COLOR_ATTACHMENTS = 0x8CDF, GL_MAX_COLOR_TEXTURE_SAMPLES = 0x910E, GL_MAX_COMBINED_ATOMIC_COUNTERS = 0x92D7, GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES = 0x82FA, GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS = 0x8266, GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33, GL_MAX_COMBINED_IMAGE_UNIFORMS = 0x90CF, GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES = 0x8F39, GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS = 0x90DC, GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E1E, GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E1F, GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D, GL_MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E, GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31, GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS = 0x8264, GL_MAX_COMPUTE_ATOMIC_COUNTERS = 0x8265, GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS = 0x90EB, GL_MAX_COMPUTE_FIXED_GROUP_SIZE = 0x91BF, GL_MAX_COMPUTE_IMAGE_UNIFORMS = 0x91BD, GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS = 0x90DB, GL_MAX_COMPUTE_SHARED_MEMORY_SIZE = 0x8262, GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS = 0x91BC, GL_MAX_COMPUTE_UNIFORM_BLOCKS = 0x91BB, GL_MAX_COMPUTE_UNIFORM_COMPONENTS = 0x8263, GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS = 0x9344, GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE = 0x9345, GL_MAX_COMPUTE_WORK_GROUP_COUNT = 0x91BE, GL_MAX_CONVOLUTION_HEIGHT = 0x801B, GL_MAX_CONVOLUTION_WIDTH = 0x801A, GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C, GL_MAX_CULL_DISTANCES = 0x82F9, GL_MAX_DEPTH_TEXTURE_SAMPLES = 0x910F, GL_MAX_DRAW_BUFFERS = 0x8824, GL_MAX_DUAL_SOURCE_DRAW_BUFFERS = 0x88FC, GL_MAX_ELEMENTS_INDICES = 0x80E9, GL_MAX_ELEMENTS_VERTICES = 0x80E8, GL_MAX_FRAGMENT_ATOMIC_COUNTERS = 0x92D6, GL_MAX_FRAGMENT_IMAGE_UNIFORMS = 0x90CE, GL_MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125, GL_MAX_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5C, GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS = 0x90DA, GL_MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D, GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49, GL_MAX_FRAMEBUFFER_HEIGHT = 0x9316, GL_MAX_FRAMEBUFFER_LAYERS = 0x9317, GL_MAX_FRAMEBUFFER_SAMPLES = 0x9318, GL_MAX_FRAMEBUFFER_WIDTH = 0x9315, GL_MAX_GEOMETRY_ATOMIC_COUNTERS = 0x92D5, GL_MAX_GEOMETRY_IMAGE_UNIFORMS = 0x90CD, GL_MAX_GEOMETRY_INPUT_COMPONENTS = 0x9123, GL_MAX_GEOMETRY_OUTPUT_COMPONENTS = 0x9124, GL_MAX_GEOMETRY_OUTPUT_VERTICES = 0x8DE0, GL_MAX_GEOMETRY_SHADER_INVOCATIONS = 0x8E5A, GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = 0x90D7, GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = 0x8C29, GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 0x8DE1, GL_MAX_GEOMETRY_UNIFORM_BLOCKS = 0x8A2C, GL_MAX_GEOMETRY_UNIFORM_COMPONENTS = 0x8DDF, GL_MAX_GEOMETRY_VARYING_COMPONENTS = 0x8DDD, GL_MAX_IMAGE_SAMPLES = 0x906D, GL_MAX_IMAGE_UNITS = 0x8F38, GL_MAX_INTEGER_SAMPLES = 0x9110, GL_MAX_PATCH_VERTICES = 0x8E7D, GL_MAX_PROGRAM_ALU_INSTRUCTIONS = 0x880B, GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS = 0x880E, GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS = 0x8810, GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS = 0x880F, GL_MAX_PROGRAM_TEX_INDIRECTIONS = 0x880D, GL_MAX_PROGRAM_TEX_INSTRUCTIONS = 0x880C, GL_MAX_PROGRAM_TEXEL_OFFSET = 0x8905, GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS = 0x8F9F, GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5F, GL_MAX_RECTANGLE_TEXTURE_SIZE = 0x84F8, GL_MAX_SAMPLE_MASK_WORDS = 0x8E59, GL_MAX_SAMPLES = 0x8D57, GL_MAX_SERVER_WAIT_TIMEOUT = 0x9111, GL_MAX_SHADER_STORAGE_BLOCK_SIZE = 0x90DE, GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS = 0x90DD, GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS = 0x8DE8, GL_MAX_SUBROUTINES = 0x8DE7, GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS = 0x92D3, GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS = 0x90CB, GL_MAX_TESS_CONTROL_INPUT_COMPONENTS = 0x886C, GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS = 0x8E83, GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS = 0x90D8, GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS = 0x8E81, GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS = 0x8E85, GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS = 0x8E89, GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E7F, GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS = 0x92D4, GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS = 0x90CC, GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS = 0x886D, GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS = 0x8E86, GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS = 0x90D9, GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS = 0x8E82, GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS = 0x8E8A, GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E80, GL_MAX_TESS_GEN_LEVEL = 0x8E7E, GL_MAX_TESS_PATCH_COMPONENTS = 0x8E84, GL_MAX_TEXTURE_BUFFER_SIZE = 0x8C2B, GL_MAX_TEXTURE_COORDS = 0x8871, GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872, GL_MAX_TEXTURE_LOD_BIAS = 0x84FD, GL_MAX_TEXTURE_MAX_ANISOTROPY = 0x84FF, GL_MAX_UNIFORM_BLOCK_SIZE = 0x8A30, GL_MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F, GL_UNIFORM_BUFFER_SIZE = 0x8A2A, GL_MAX_UNIFORM_LOCATIONS = 0x826E, GL_MAX_VARYING_FLOATS = 0x8B4B, GL_MAX_VERTEX_ATOMIC_COUNTERS = 0x92D2, GL_MAX_VERTEX_ATTRIB_BINDINGS = 0x82DA, GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D9, GL_MAX_VERTEX_ATTRIB_STRIDE = 0x82E5, GL_MAX_VERTEX_ATTRIBS = 0x8869, GL_MAX_VERTEX_IMAGE_UNIFORMS = 0x90CA, GL_MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122, GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS = 0x90D6, GL_MAX_VERTEX_STREAMS = 0x8E71, GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C, GL_MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B, GL_MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A, GL_MAX_VERTEX_UNITS = 0x86A4, GL_MAX_VERTEX_VARYING_COMPONENTS = 0x8DDE, GL_MAX_VIEWPORT_DIMS = 0x0D3A, GL_MIN_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5B, GL_MIN_LOD_WARNING = 0x919C,// AMD GL_MIN_PROGRAM_TEXEL_OFFSET = 0x8904, GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5E, GL_MIN_SAMPLE_SHADING_VALUE = 0x8C37, GL_MIN_SPARSE_LEVEL = 0x919B,// AMD GL_MAX_VIEWPORTS = 0x825B, GL_POINT_SIZE_RANGE = 0x0B12, GL_POINT_SIZE_GRANULARITY = 0x0B13, GL_LINE_WIDTH_GRANULARITY = 0x0B23, GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX = 0x9048, GL_TEXTURE_FREE_MEMORY_ATI = 0x87FC, }; std::string getName( GlGetParameter value ); inline std::string toString( GlGetParameter value ) { return getName( value ); } }
38.904494
81
0.835957
DragonJoker
7fc5ed4cca61af64f45af44bf8fa598cbfd575cb
2,863
cc
C++
src/core/field_bits_256_test.cc
puyoai/puyoai
575068dffab021cd42b0178699d480a743ca4e1f
[ "CC-BY-4.0" ]
115
2015-02-21T15:08:26.000Z
2022-02-05T01:38:10.000Z
src/core/field_bits_256_test.cc
haripo/puyoai
575068dffab021cd42b0178699d480a743ca4e1f
[ "CC-BY-4.0" ]
214
2015-01-16T04:53:35.000Z
2019-03-23T11:39:59.000Z
src/core/field_bits_256_test.cc
haripo/puyoai
575068dffab021cd42b0178699d480a743ca4e1f
[ "CC-BY-4.0" ]
56
2015-01-16T05:14:13.000Z
2020-09-22T07:22:49.000Z
#ifdef __AVX2__ #include <gtest/gtest.h> #include "core/bit_field.h" #include "core/field_bits_256.h" using namespace std; TEST(FieldBits256Test, ctor1) { FieldBits256 bits; for (int x = 0; x < 8; ++x) { for (int y = 0; y < 16; ++y) { EXPECT_FALSE(bits.get(FieldBits256::HighLow::LOW, x, y)); EXPECT_FALSE(bits.get(FieldBits256::HighLow::HIGH, x, y)); } } } TEST(FieldBits256Test, ctor2) { FieldBits low; low.set(1, 3); low.set(4, 8); FieldBits high; high.set(2, 4); high.set(5, 9); FieldBits256 fb256(high, low); EXPECT_TRUE(fb256.get(FieldBits256::HighLow::LOW, 1, 3)); EXPECT_TRUE(fb256.get(FieldBits256::HighLow::LOW, 4, 8)); EXPECT_TRUE(fb256.get(FieldBits256::HighLow::HIGH, 2, 4)); EXPECT_TRUE(fb256.get(FieldBits256::HighLow::HIGH, 5, 9)); EXPECT_FALSE(fb256.get(FieldBits256::HighLow::HIGH, 1, 3)); EXPECT_FALSE(fb256.get(FieldBits256::HighLow::HIGH, 4, 8)); EXPECT_FALSE(fb256.get(FieldBits256::HighLow::LOW, 2, 4)); EXPECT_FALSE(fb256.get(FieldBits256::HighLow::LOW, 5, 9)); } TEST(FieldBits256Test, expand) { FieldBits maskHigh( "..1..." "..1.11" "111.11"); FieldBits maskLow( "111111" ".....1" "111111" "1....." "111111"); FieldBits256 mask(maskHigh, maskLow); FieldBits256 bit; bit.setHigh(3, 1); bit.setLow(6, 1); FieldBits256 expanded = bit.expand(mask); FieldBits highExpected = FieldBits(3, 1).expand(maskHigh); FieldBits lowExpected = FieldBits(6, 1).expand(maskLow); EXPECT_EQ(highExpected, expanded.high()); EXPECT_EQ(lowExpected, expanded.low()); EXPECT_EQ(maskLow, expanded.low()); } TEST(FieldBits256Test, findVanishingBits) { BitField bf( ".....R" ".RR..R" "YYRBBR" "RYYBBG" "RRRGGG"); FieldBits red = bf.bits(PuyoColor::RED); FieldBits blue = bf.bits(PuyoColor::BLUE); FieldBits yellow = bf.bits(PuyoColor::YELLOW); FieldBits green = bf.bits(PuyoColor::GREEN); FieldBits256 redBlueVanishing; FieldBits256 yellowGreenVanishing; EXPECT_TRUE(FieldBits256(red, blue).findVanishingBits(&redBlueVanishing)); EXPECT_TRUE(FieldBits256(yellow, green).findVanishingBits(&yellowGreenVanishing)); FieldBits redVanishing; FieldBits blueVanishing; FieldBits yellowVanishing; FieldBits greenVanishing; EXPECT_TRUE(red.findVanishingBits(&redVanishing)); EXPECT_TRUE(blue.findVanishingBits(&blueVanishing)); EXPECT_TRUE(yellow.findVanishingBits(&yellowVanishing)); EXPECT_TRUE(green.findVanishingBits(&greenVanishing)); EXPECT_EQ(FieldBits256(redVanishing, blueVanishing), redBlueVanishing); EXPECT_EQ(FieldBits256(yellowVanishing, greenVanishing), yellowGreenVanishing); } #endif // __AVX2__
27.009434
86
0.660496
puyoai
7fceba3648250a38f6d77bbbfc9258b07ddeb0fc
857
cpp
C++
dp/knapsack_dp/abc153_e2.cpp
Takumi1122/data-structure-algorithm
6b9f26e4dbba981f034518a972ecfc698b86d837
[ "MIT" ]
null
null
null
dp/knapsack_dp/abc153_e2.cpp
Takumi1122/data-structure-algorithm
6b9f26e4dbba981f034518a972ecfc698b86d837
[ "MIT" ]
null
null
null
dp/knapsack_dp/abc153_e2.cpp
Takumi1122/data-structure-algorithm
6b9f26e4dbba981f034518a972ecfc698b86d837
[ "MIT" ]
null
null
null
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; // 個数制限なしナップサック 最小化 // in-place /* 参考リンク ABC 153 E - Crested Ibis vs Monster https://atcoder.jp/contests/abc153/tasks/abc153_e */ template <class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } const ll INF = 1LL << 60; int main() { int h, n; cin >> h >> n; vector<int> a(n); vector<int> b(n); rep(i, n) cin >> a[i] >> b[i]; vector<ll> dp(h + 1, INF); dp[0] = 0; for (int i = 0; i < n; i++) { for (int j = 0; j <= h; j++) { chmin(dp[min(j + a[i], h)], dp[j] + b[i]); } } cout << dp[h] << endl; return 0; }
16.169811
55
0.502917
Takumi1122
7fd5a51abd857a03e8223e1243850c419f49d591
660
cpp
C++
src/TrackerEvents/PauseStartEvent.cpp
kyranet/drakhtar-telemetry
cf659dbb656fcfe55db81d8d402de89bf5d357c1
[ "MIT" ]
null
null
null
src/TrackerEvents/PauseStartEvent.cpp
kyranet/drakhtar-telemetry
cf659dbb656fcfe55db81d8d402de89bf5d357c1
[ "MIT" ]
1
2021-04-30T10:45:13.000Z
2021-04-30T10:45:13.000Z
src/TrackerEvents/PauseStartEvent.cpp
kyranet/drakhtar-telemetry
cf659dbb656fcfe55db81d8d402de89bf5d357c1
[ "MIT" ]
null
null
null
// Copyright 2021 the Drakhtar authors. All rights reserved. MIT license. #include "TrackerEvents/PauseStartEvent.h" #include "Serialization/Json/JsonObject.h" #include "Serialization/Xml/XmlObject.h" PauseStartEvent::PauseStartEvent(uint32_t levelNumber) : TrackerEvent(PAUSE_START), levelNumber_(levelNumber) {} void PauseStartEvent::toJson(JsonObject& object) { object.add("EventType", "Pause Start Event"); TrackerEvent::toJson(object); object.add("Level", levelNumber_); } void PauseStartEvent::toXml(XmlObject& object) { object.add("EventType", "Pause Start Event"); TrackerEvent::toXml(object); object.add("Level", levelNumber_); }
30
73
0.760606
kyranet
7fd8c69942e00ed7fdf0c0d18fb9bef75b4b3aa2
2,715
cpp
C++
LocationData/Read_Subzone_Map.cpp
kravitz/transims4
ea0848bf3dc71440d54724bb3ecba3947b982215
[ "NASA-1.3" ]
2
2018-04-27T11:07:02.000Z
2020-04-24T06:53:21.000Z
LocationData/Read_Subzone_Map.cpp
idkravitz/transims4
ea0848bf3dc71440d54724bb3ecba3947b982215
[ "NASA-1.3" ]
null
null
null
LocationData/Read_Subzone_Map.cpp
idkravitz/transims4
ea0848bf3dc71440d54724bb3ecba3947b982215
[ "NASA-1.3" ]
null
null
null
//********************************************************* // Read_Subzone_Map.cpp - Read the Subzone Zone File //********************************************************* #include "LocationData.hpp" //--------------------------------------------------------- // Read_Subzone_Map //--------------------------------------------------------- void LocationData::Read_Subzone_Map (void) { int i, id, zone, num_field, field; double factor; int id_field, zone_field [20], fac_field [20]; char name1 [20], name2 [20], name3 [20], name4 [20]; Subzone_Map map; //---- get the field names ---- id_field = subzone_zone_file.Required_Field ("ID", "SUBZONE", "RECORD", "REC_ID", "SUB_ID"); num_field = 0; for (i=1; i <= 20; i++) { str_fmt (name1, sizeof (name1), "ZONE_%d", i); str_fmt (name2, sizeof (name2), "TAZ_%d", i); str_fmt (name3, sizeof (name3), "ZONE%d", i); str_fmt (name4, sizeof (name4), "TAZ%d", i); field = subzone_zone_file.Optional_Field (name1, name2, name3, name4); if (field == 0) break; num_field = i; zone_field [i-1] = field; str_fmt (name1, sizeof (name1), "ZONE_%d_PER", i); str_fmt (name2, sizeof (name2), "TAZ_%d_PER", i); str_fmt (name3, sizeof (name3), "ZONE%d_PER", i); str_fmt (name4, sizeof (name4), "TAZ%d_PER", i); field = subzone_zone_file.Optional_Field (name1, name2, name3, name4); if (field == 0) { str_fmt (name1, sizeof (name1), "ZONE_%d_FAC", i); str_fmt (name2, sizeof (name2), "TAZ_%d_FAC", i); str_fmt (name3, sizeof (name3), "ZONE%d_FAC", i); str_fmt (name4, sizeof (name4), "TAZ%d_FAC", i); field = subzone_zone_file.Optional_Field (name1, name2, name3, name4); } if (field == 0) { Error ("A Subzone Factor Field Name for %d was Not Found", subzone_zone_file.Field (zone_field [i-1])->Name ()); } fac_field [i-1] = field; } if (num_field == 0) { Error ("No Subzone Zone Field Names were Found"); } //---- read the subzone zone file ---- Show_Message ("Reading %s -- Record", subzone_zone_file.File_Type ()); Set_Progress (1000); while (subzone_zone_file.Read ()) { Show_Progress (); subzone_zone_file.Get_Field (id_field, &id); if (id == 0) continue; map.subzone = id; for (i=0; i < num_field; i++) { subzone_zone_file.Get_Field (zone_field [i], &zone); if (zone == 0) break; subzone_zone_file.Get_Field (fac_field [i], &factor); if (factor == 0.0) continue; if (factor > 1.0) factor /= 100.0; map.zone = zone; map.factor = factor; if (!subzone_map.Add (&map)) { Error ("Adding Subzone Map Data"); } } } End_Progress (); Print (2, "Number of Subzone Zone Data Records = %d", Progress_Count ()); subzone_zone_file.Close (); }
27.15
93
0.580479
kravitz
7fde30553a71a99b2a58edf124fc3e7e055b43f4
4,955
cpp
C++
spritesheets.cpp
block8437/GameEngine
e4b452c33781566e55e9339efee9441ddb924f58
[ "MIT" ]
null
null
null
spritesheets.cpp
block8437/GameEngine
e4b452c33781566e55e9339efee9441ddb924f58
[ "MIT" ]
1
2017-04-05T00:58:21.000Z
2017-04-05T00:58:21.000Z
spritesheets.cpp
block8437/GameEngine
e4b452c33781566e55e9339efee9441ddb924f58
[ "MIT" ]
null
null
null
#include "spritesheets.h" inline bool exists_test1 (const std::string& name) { if (FILE *file = fopen(name.c_str(), "r")) { fclose(file); return true; } else { return false; } } namespace GameEngine { SpriteSheet::SpriteSheet() { } SpriteSheet::SpriteSheet(const char* filename) { //printf("%s\n", exists_test1(filename) ? "true" : "false"); int n; unsigned char* data = stbi_load(filename, &width, &height, &n, 4); if (data == NULL) { printf("ERROR LOADING IMAGE"); return; } glGenTextures(1, &textureID); glBindTexture(GL_TEXTURE_2D, textureID); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height,0, GL_RGBA, GL_UNSIGNED_BYTE, data); //printf("TexID: %i\nValid: %s\nError: %s\n", textureID, glIsTexture(textureID) ? "true" : "false", gluErrorString(glGetError())); //printf("W/H: (%d, %d)\n", width, height); //printf("%d %d %d %d\n",*(data+30),*(data+31),*(data+32),*(data+33)); stbi_image_free(data); } SpriteSheet::~SpriteSheet() { printf("BALLS\n"); //glDeleteTextures(1, &textureID); } void SpriteSheet::initSequence(std::string sequence, float frametime, float width, float height) { frameNumber[sequence] = 0; frameTime[sequence] = frametime; frameSize[sequence] = b2Vec2(width, height); } void SpriteSheet::addAnimationRow(std::string sequence, int row, int size) { int y = row; for(int i = 0;i < size; i++) { addSequenceFrame(sequence, b2Vec2(i * frameSize[sequence].x, y)); } } void SpriteSheet::setFrameNum(std::string sequence, int frame) { frameNumber[sequence] = frame % spriteMap[sequence].size(); } b2Vec2 SpriteSheet::getSequenceSize(std::string sequence) { return frameSize[sequence]; } void SpriteSheet::addSequenceFrame(std::string sequence, b2Vec2 position) { float a2 = frameSize[sequence].x / width; float b2 = frameSize[sequence].y / height; float c2 = position.x / width; float d2 = position.y / height; /*b2Vec2 A = b2Vec2(c2, d2); b2Vec2 B = b2Vec2(c2, d2 + b2); b2Vec2 C = b2Vec2(c2 + a2, d2 + b2); b2Vec2 D = b2Vec2(c2 + a2, d2);*/ b2Vec2 D = b2Vec2((position.x/frameSize[sequence].x)*a2,(position.y)*b2); b2Vec2 B = b2Vec2(D.x + a2, D.y + b2); b2Vec2 A = b2Vec2(D.x, B.y); b2Vec2 C = b2Vec2(B.x, D.y); std::vector<b2Vec2> corners; corners.push_back(A); corners.push_back(B); corners.push_back(C); corners.push_back(D); spriteMap[sequence].push_back(corners); } void SpriteSheet::renderPart(std::vector<b2Vec2> texCoords, int x, int y, float angle, float scale, b2Vec2 size, bool flip) { if( textureID != 0 ) { glMatrixMode(GL_MODELVIEW); glPushMatrix(); glLoadIdentity(); glColor4f(1.0,1.0,1.0, 1.0); glTranslatef( x, y, 0.0f ); glRotatef(angle, 0.0f, 0.0f, 1.0f); glEnable(GL_TEXTURE_2D); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glBindTexture( GL_TEXTURE_2D, textureID ); glBegin( GL_QUADS ); if(!flip) { glTexCoord2f( texCoords[0].x, texCoords[0].y ); glVertex2f( 0.0f, 0.0f ); glTexCoord2f( texCoords[1].x, texCoords[1].y ); glVertex2f( size.x*scale, 0.0f ); glTexCoord2f( texCoords[2].x, texCoords[2].y ); glVertex2f( size.x*scale, size.y*scale ); glTexCoord2f( texCoords[3].x, texCoords[3].y ); glVertex2f( 0.0f, size.y*scale ); glEnd(); } else { float tex = 1.0f - texCoords[0].x; glTexCoord2f( texCoords[1].x, texCoords[1].y ); glVertex2f( 0.0f, 0.0f ); glTexCoord2f( texCoords[0].x, texCoords[0].y ); glVertex2f( size.x*scale, 0.0f ); glTexCoord2f( texCoords[3].x, texCoords[3].y ); glVertex2f( size.x*scale, size.y*scale ); glTexCoord2f( texCoords[2].x, texCoords[2].y ); glVertex2f( 0.0f, size.y*scale ); glEnd(); } glDisable(GL_TEXTURE_2D); glDisable(GL_BLEND); glPopMatrix(); } } void SpriteSheet::renderFrame(std::string animation, int frame, int x, int y, float angle, float scale, bool flip) { if(frame < spriteMap[animation].size()) renderPart(spriteMap[animation][frame], x, y, angle, scale, frameSize[animation], flip); } void SpriteSheet::render(std::string animation, int x, int y, float angle, float scale, bool flip) { int size = spriteMap[animation].size(); int curr = frameNumber[animation]; int time = glutGet(GLUT_ELAPSED_TIME); if ((time - basetime[animation]) > frameTime[animation]) { frameNumber[animation] += 1; curr += 1; if(curr > size - 1) { curr = 0; frameNumber[animation] = 0; } basetime[animation] = time; } renderPart(spriteMap[animation][curr], x, y, angle, scale, frameSize[animation], flip); } }
33.47973
132
0.659738
block8437
8f10bb825249ffd7497052d55f5332a9dd7b3afb
360
cpp
C++
clientplugin/HttpReceiver/Windows/WebBpeLauncherQT/delbutton.cpp
shrewdlin/BPE
cf29647479b1b8ed53afadaf70557387f4c07e16
[ "BSD-3-Clause" ]
1
2016-07-12T06:00:37.000Z
2016-07-12T06:00:37.000Z
clientplugin/HttpReceiver/Windows/WebBpeLauncherQT/delbutton.cpp
shrewdlin/BPE
cf29647479b1b8ed53afadaf70557387f4c07e16
[ "BSD-3-Clause" ]
null
null
null
clientplugin/HttpReceiver/Windows/WebBpeLauncherQT/delbutton.cpp
shrewdlin/BPE
cf29647479b1b8ed53afadaf70557387f4c07e16
[ "BSD-3-Clause" ]
2
2016-09-06T07:59:09.000Z
2020-12-12T03:25:24.000Z
#include "delbutton.h" DelButton::DelButton(): m_iNo(-1) { setStyleSheet("border: 1px solid black; background-image: url(:/picture/resource/delete.png);"); setFixedSize(25, 25); connect(this, SIGNAL(clicked(bool)), this, SLOT(OnClicked(bool))); } DelButton::~DelButton() { } void DelButton::OnClicked(bool) { emit DelClicked(m_iNo); }
17.142857
100
0.675
shrewdlin
8f1eb2f6a6af209fa2364d6527c8076219bef40e
75,688
cc
C++
common/ipc/chat_db_ipc.pb.cc
shockerjue/Gameserver
78faab152e1cb211d551a794ea4df5738cf99b04
[ "Unlicense" ]
31
2017-10-18T08:56:43.000Z
2022-03-22T15:43:10.000Z
common/ipc/chat_db_ipc.pb.cc
shockerjue/Gameserver
78faab152e1cb211d551a794ea4df5738cf99b04
[ "Unlicense" ]
null
null
null
common/ipc/chat_db_ipc.pb.cc
shockerjue/Gameserver
78faab152e1cb211d551a794ea4df5738cf99b04
[ "Unlicense" ]
14
2018-03-15T10:36:53.000Z
2021-11-11T19:35:39.000Z
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chat_db_ipc.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "chat_db_ipc.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/port.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 inner_ipc { class OfflineMsgIPCDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<OfflineMsgIPC> { } _OfflineMsgIPC_default_instance_; class EmailBodyDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<EmailBody> { } _EmailBody_default_instance_; class EmailMsgIPCDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<EmailMsgIPC> { } _EmailMsgIPC_default_instance_; class OfflineGoodsIPCDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<OfflineGoodsIPC> { } _OfflineGoodsIPC_default_instance_; namespace protobuf_chat_5fdb_5fipc_2eproto { namespace { ::google::protobuf::Metadata file_level_metadata[4]; } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField const TableStruct::entries[] = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField const TableStruct::aux[] = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const TableStruct::schema[] = { { NULL, NULL, 0, -1, -1, false }, { NULL, NULL, 0, -1, -1, false }, { NULL, NULL, 0, -1, -1, false }, { NULL, NULL, 0, -1, -1, false }, }; const ::google::protobuf::uint32 TableStruct::offsets[] = { ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OfflineMsgIPC, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OfflineMsgIPC, srid_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OfflineMsgIPC, did_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OfflineMsgIPC, type_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OfflineMsgIPC, msg_type_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OfflineMsgIPC, tid_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OfflineMsgIPC, size_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OfflineMsgIPC, stime_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OfflineMsgIPC, msg_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OfflineMsgIPC, sname_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EmailBody, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EmailBody, emailtype_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EmailBody, emailbody_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EmailMsgIPC, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EmailMsgIPC, sendrid_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EmailMsgIPC, recvrid_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EmailMsgIPC, emailtype_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EmailMsgIPC, emailhead_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EmailMsgIPC, emailbody_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OfflineGoodsIPC, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OfflineGoodsIPC, sendrid_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OfflineGoodsIPC, recvrid_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OfflineGoodsIPC, count_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OfflineGoodsIPC, goodsid_), }; static const ::google::protobuf::internal::MigrationSchema schemas[] = { { 0, -1, sizeof(OfflineMsgIPC)}, { 14, -1, sizeof(EmailBody)}, { 21, -1, sizeof(EmailMsgIPC)}, { 31, -1, sizeof(OfflineGoodsIPC)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast<const ::google::protobuf::Message*>(&_OfflineMsgIPC_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&_EmailBody_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&_EmailMsgIPC_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&_OfflineGoodsIPC_default_instance_), }; namespace { void protobuf_AssignDescriptors() { AddDescriptors(); ::google::protobuf::MessageFactory* factory = NULL; AssignDescriptors( "chat_db_ipc.proto", schemas, file_default_instances, TableStruct::offsets, factory, file_level_metadata, NULL, NULL); } void protobuf_AssignDescriptorsOnce() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); } void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 4); } } // namespace void TableStruct::Shutdown() { _OfflineMsgIPC_default_instance_.Shutdown(); delete file_level_metadata[0].reflection; _EmailBody_default_instance_.Shutdown(); delete file_level_metadata[1].reflection; _EmailMsgIPC_default_instance_.Shutdown(); delete file_level_metadata[2].reflection; _OfflineGoodsIPC_default_instance_.Shutdown(); delete file_level_metadata[3].reflection; } void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::internal::InitProtobufDefaults(); _OfflineMsgIPC_default_instance_.DefaultConstruct(); _EmailBody_default_instance_.DefaultConstruct(); _EmailMsgIPC_default_instance_.DefaultConstruct(); _OfflineGoodsIPC_default_instance_.DefaultConstruct(); } void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] = { "\n\021chat_db_ipc.proto\022\tinner_ipc\"\220\001\n\rOffli" "neMsgIPC\022\014\n\004srid\030\001 \001(\005\022\013\n\003did\030\002 \001(\005\022\014\n\004t" "ype\030\003 \001(\005\022\020\n\010msg_type\030\004 \001(\005\022\013\n\003tid\030\005 \001(\005" "\022\014\n\004size\030\006 \001(\005\022\r\n\005stime\030\007 \001(\005\022\013\n\003msg\030\010 \001" "(\t\022\r\n\005sname\030\t \001(\t\"1\n\tEmailBody\022\021\n\temailT" "ype\030\001 \001(\005\022\021\n\temailBody\030\002 \001(\t\"~\n\013EmailMsg" "IPC\022\017\n\007sendRid\030\001 \001(\005\022\017\n\007recvRid\030\002 \001(\005\022\021\n" "\temailType\030\003 \001(\005\022\021\n\temailHead\030\004 \001(\t\022\'\n\te" "mailBody\030\005 \003(\0132\024.inner_ipc.EmailBody\"S\n\017" "OfflineGoodsIPC\022\017\n\007sendRid\030\001 \001(\005\022\017\n\007recv" "Rid\030\002 \001(\005\022\r\n\005count\030\003 \001(\005\022\017\n\007goodsId\030\004 \001(" "\005b\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( descriptor, 449); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "chat_db_ipc.proto", &protobuf_RegisterTypes); ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); } } static_descriptor_initializer; } // namespace protobuf_chat_5fdb_5fipc_2eproto // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int OfflineMsgIPC::kSridFieldNumber; const int OfflineMsgIPC::kDidFieldNumber; const int OfflineMsgIPC::kTypeFieldNumber; const int OfflineMsgIPC::kMsgTypeFieldNumber; const int OfflineMsgIPC::kTidFieldNumber; const int OfflineMsgIPC::kSizeFieldNumber; const int OfflineMsgIPC::kStimeFieldNumber; const int OfflineMsgIPC::kMsgFieldNumber; const int OfflineMsgIPC::kSnameFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 OfflineMsgIPC::OfflineMsgIPC() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { protobuf_chat_5fdb_5fipc_2eproto::InitDefaults(); } SharedCtor(); // @@protoc_insertion_point(constructor:inner_ipc.OfflineMsgIPC) } OfflineMsgIPC::OfflineMsgIPC(const OfflineMsgIPC& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); msg_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.msg().size() > 0) { msg_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.msg_); } sname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.sname().size() > 0) { sname_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.sname_); } ::memcpy(&srid_, &from.srid_, reinterpret_cast<char*>(&stime_) - reinterpret_cast<char*>(&srid_) + sizeof(stime_)); // @@protoc_insertion_point(copy_constructor:inner_ipc.OfflineMsgIPC) } void OfflineMsgIPC::SharedCtor() { msg_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); sname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&srid_, 0, reinterpret_cast<char*>(&stime_) - reinterpret_cast<char*>(&srid_) + sizeof(stime_)); _cached_size_ = 0; } OfflineMsgIPC::~OfflineMsgIPC() { // @@protoc_insertion_point(destructor:inner_ipc.OfflineMsgIPC) SharedDtor(); } void OfflineMsgIPC::SharedDtor() { msg_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); sname_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void OfflineMsgIPC::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* OfflineMsgIPC::descriptor() { protobuf_chat_5fdb_5fipc_2eproto::protobuf_AssignDescriptorsOnce(); return protobuf_chat_5fdb_5fipc_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const OfflineMsgIPC& OfflineMsgIPC::default_instance() { protobuf_chat_5fdb_5fipc_2eproto::InitDefaults(); return *internal_default_instance(); } OfflineMsgIPC* OfflineMsgIPC::New(::google::protobuf::Arena* arena) const { OfflineMsgIPC* n = new OfflineMsgIPC; if (arena != NULL) { arena->Own(n); } return n; } void OfflineMsgIPC::Clear() { // @@protoc_insertion_point(message_clear_start:inner_ipc.OfflineMsgIPC) msg_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); sname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&srid_, 0, reinterpret_cast<char*>(&stime_) - reinterpret_cast<char*>(&srid_) + sizeof(stime_)); } bool OfflineMsgIPC::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:inner_ipc.OfflineMsgIPC) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // int32 srid = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &srid_))); } else { goto handle_unusual; } break; } // int32 did = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(16u)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &did_))); } else { goto handle_unusual; } break; } // int32 type = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(24u)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &type_))); } else { goto handle_unusual; } break; } // int32 msg_type = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(32u)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &msg_type_))); } else { goto handle_unusual; } break; } // int32 tid = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(40u)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &tid_))); } else { goto handle_unusual; } break; } // int32 size = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(48u)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &size_))); } else { goto handle_unusual; } break; } // int32 stime = 7; case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(56u)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &stime_))); } else { goto handle_unusual; } break; } // string msg = 8; case 8: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(66u)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_msg())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->msg().data(), this->msg().length(), ::google::protobuf::internal::WireFormatLite::PARSE, "inner_ipc.OfflineMsgIPC.msg")); } else { goto handle_unusual; } break; } // string sname = 9; case 9: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(74u)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_sname())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->sname().data(), this->sname().length(), ::google::protobuf::internal::WireFormatLite::PARSE, "inner_ipc.OfflineMsgIPC.sname")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); break; } } } success: // @@protoc_insertion_point(parse_success:inner_ipc.OfflineMsgIPC) return true; failure: // @@protoc_insertion_point(parse_failure:inner_ipc.OfflineMsgIPC) return false; #undef DO_ } void OfflineMsgIPC::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:inner_ipc.OfflineMsgIPC) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // int32 srid = 1; if (this->srid() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->srid(), output); } // int32 did = 2; if (this->did() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->did(), output); } // int32 type = 3; if (this->type() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->type(), output); } // int32 msg_type = 4; if (this->msg_type() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->msg_type(), output); } // int32 tid = 5; if (this->tid() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->tid(), output); } // int32 size = 6; if (this->size() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->size(), output); } // int32 stime = 7; if (this->stime() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->stime(), output); } // string msg = 8; if (this->msg().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->msg().data(), this->msg().length(), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "inner_ipc.OfflineMsgIPC.msg"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 8, this->msg(), output); } // string sname = 9; if (this->sname().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->sname().data(), this->sname().length(), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "inner_ipc.OfflineMsgIPC.sname"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 9, this->sname(), output); } // @@protoc_insertion_point(serialize_end:inner_ipc.OfflineMsgIPC) } ::google::protobuf::uint8* OfflineMsgIPC::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:inner_ipc.OfflineMsgIPC) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // int32 srid = 1; if (this->srid() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->srid(), target); } // int32 did = 2; if (this->did() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->did(), target); } // int32 type = 3; if (this->type() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->type(), target); } // int32 msg_type = 4; if (this->msg_type() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->msg_type(), target); } // int32 tid = 5; if (this->tid() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->tid(), target); } // int32 size = 6; if (this->size() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->size(), target); } // int32 stime = 7; if (this->stime() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->stime(), target); } // string msg = 8; if (this->msg().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->msg().data(), this->msg().length(), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "inner_ipc.OfflineMsgIPC.msg"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 8, this->msg(), target); } // string sname = 9; if (this->sname().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->sname().data(), this->sname().length(), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "inner_ipc.OfflineMsgIPC.sname"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 9, this->sname(), target); } // @@protoc_insertion_point(serialize_to_array_end:inner_ipc.OfflineMsgIPC) return target; } size_t OfflineMsgIPC::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:inner_ipc.OfflineMsgIPC) size_t total_size = 0; // string msg = 8; if (this->msg().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->msg()); } // string sname = 9; if (this->sname().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->sname()); } // int32 srid = 1; if (this->srid() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->srid()); } // int32 did = 2; if (this->did() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->did()); } // int32 type = 3; if (this->type() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->type()); } // int32 msg_type = 4; if (this->msg_type() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->msg_type()); } // int32 tid = 5; if (this->tid() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->tid()); } // int32 size = 6; if (this->size() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->size()); } // int32 stime = 7; if (this->stime() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->stime()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void OfflineMsgIPC::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:inner_ipc.OfflineMsgIPC) GOOGLE_DCHECK_NE(&from, this); const OfflineMsgIPC* source = ::google::protobuf::internal::DynamicCastToGenerated<const OfflineMsgIPC>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:inner_ipc.OfflineMsgIPC) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:inner_ipc.OfflineMsgIPC) MergeFrom(*source); } } void OfflineMsgIPC::MergeFrom(const OfflineMsgIPC& from) { // @@protoc_insertion_point(class_specific_merge_from_start:inner_ipc.OfflineMsgIPC) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.msg().size() > 0) { msg_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.msg_); } if (from.sname().size() > 0) { sname_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.sname_); } if (from.srid() != 0) { set_srid(from.srid()); } if (from.did() != 0) { set_did(from.did()); } if (from.type() != 0) { set_type(from.type()); } if (from.msg_type() != 0) { set_msg_type(from.msg_type()); } if (from.tid() != 0) { set_tid(from.tid()); } if (from.size() != 0) { set_size(from.size()); } if (from.stime() != 0) { set_stime(from.stime()); } } void OfflineMsgIPC::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:inner_ipc.OfflineMsgIPC) if (&from == this) return; Clear(); MergeFrom(from); } void OfflineMsgIPC::CopyFrom(const OfflineMsgIPC& from) { // @@protoc_insertion_point(class_specific_copy_from_start:inner_ipc.OfflineMsgIPC) if (&from == this) return; Clear(); MergeFrom(from); } bool OfflineMsgIPC::IsInitialized() const { return true; } void OfflineMsgIPC::Swap(OfflineMsgIPC* other) { if (other == this) return; InternalSwap(other); } void OfflineMsgIPC::InternalSwap(OfflineMsgIPC* other) { msg_.Swap(&other->msg_); sname_.Swap(&other->sname_); std::swap(srid_, other->srid_); std::swap(did_, other->did_); std::swap(type_, other->type_); std::swap(msg_type_, other->msg_type_); std::swap(tid_, other->tid_); std::swap(size_, other->size_); std::swap(stime_, other->stime_); std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata OfflineMsgIPC::GetMetadata() const { protobuf_chat_5fdb_5fipc_2eproto::protobuf_AssignDescriptorsOnce(); return protobuf_chat_5fdb_5fipc_2eproto::file_level_metadata[kIndexInFileMessages]; } #if PROTOBUF_INLINE_NOT_IN_HEADERS // OfflineMsgIPC // int32 srid = 1; void OfflineMsgIPC::clear_srid() { srid_ = 0; } ::google::protobuf::int32 OfflineMsgIPC::srid() const { // @@protoc_insertion_point(field_get:inner_ipc.OfflineMsgIPC.srid) return srid_; } void OfflineMsgIPC::set_srid(::google::protobuf::int32 value) { srid_ = value; // @@protoc_insertion_point(field_set:inner_ipc.OfflineMsgIPC.srid) } // int32 did = 2; void OfflineMsgIPC::clear_did() { did_ = 0; } ::google::protobuf::int32 OfflineMsgIPC::did() const { // @@protoc_insertion_point(field_get:inner_ipc.OfflineMsgIPC.did) return did_; } void OfflineMsgIPC::set_did(::google::protobuf::int32 value) { did_ = value; // @@protoc_insertion_point(field_set:inner_ipc.OfflineMsgIPC.did) } // int32 type = 3; void OfflineMsgIPC::clear_type() { type_ = 0; } ::google::protobuf::int32 OfflineMsgIPC::type() const { // @@protoc_insertion_point(field_get:inner_ipc.OfflineMsgIPC.type) return type_; } void OfflineMsgIPC::set_type(::google::protobuf::int32 value) { type_ = value; // @@protoc_insertion_point(field_set:inner_ipc.OfflineMsgIPC.type) } // int32 msg_type = 4; void OfflineMsgIPC::clear_msg_type() { msg_type_ = 0; } ::google::protobuf::int32 OfflineMsgIPC::msg_type() const { // @@protoc_insertion_point(field_get:inner_ipc.OfflineMsgIPC.msg_type) return msg_type_; } void OfflineMsgIPC::set_msg_type(::google::protobuf::int32 value) { msg_type_ = value; // @@protoc_insertion_point(field_set:inner_ipc.OfflineMsgIPC.msg_type) } // int32 tid = 5; void OfflineMsgIPC::clear_tid() { tid_ = 0; } ::google::protobuf::int32 OfflineMsgIPC::tid() const { // @@protoc_insertion_point(field_get:inner_ipc.OfflineMsgIPC.tid) return tid_; } void OfflineMsgIPC::set_tid(::google::protobuf::int32 value) { tid_ = value; // @@protoc_insertion_point(field_set:inner_ipc.OfflineMsgIPC.tid) } // int32 size = 6; void OfflineMsgIPC::clear_size() { size_ = 0; } ::google::protobuf::int32 OfflineMsgIPC::size() const { // @@protoc_insertion_point(field_get:inner_ipc.OfflineMsgIPC.size) return size_; } void OfflineMsgIPC::set_size(::google::protobuf::int32 value) { size_ = value; // @@protoc_insertion_point(field_set:inner_ipc.OfflineMsgIPC.size) } // int32 stime = 7; void OfflineMsgIPC::clear_stime() { stime_ = 0; } ::google::protobuf::int32 OfflineMsgIPC::stime() const { // @@protoc_insertion_point(field_get:inner_ipc.OfflineMsgIPC.stime) return stime_; } void OfflineMsgIPC::set_stime(::google::protobuf::int32 value) { stime_ = value; // @@protoc_insertion_point(field_set:inner_ipc.OfflineMsgIPC.stime) } // string msg = 8; void OfflineMsgIPC::clear_msg() { msg_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } const ::std::string& OfflineMsgIPC::msg() const { // @@protoc_insertion_point(field_get:inner_ipc.OfflineMsgIPC.msg) return msg_.GetNoArena(); } void OfflineMsgIPC::set_msg(const ::std::string& value) { msg_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:inner_ipc.OfflineMsgIPC.msg) } #if LANG_CXX11 void OfflineMsgIPC::set_msg(::std::string&& value) { msg_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:inner_ipc.OfflineMsgIPC.msg) } #endif void OfflineMsgIPC::set_msg(const char* value) { GOOGLE_DCHECK(value != NULL); msg_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:inner_ipc.OfflineMsgIPC.msg) } void OfflineMsgIPC::set_msg(const char* value, size_t size) { msg_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast<const char*>(value), size)); // @@protoc_insertion_point(field_set_pointer:inner_ipc.OfflineMsgIPC.msg) } ::std::string* OfflineMsgIPC::mutable_msg() { // @@protoc_insertion_point(field_mutable:inner_ipc.OfflineMsgIPC.msg) return msg_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } ::std::string* OfflineMsgIPC::release_msg() { // @@protoc_insertion_point(field_release:inner_ipc.OfflineMsgIPC.msg) return msg_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void OfflineMsgIPC::set_allocated_msg(::std::string* msg) { if (msg != NULL) { } else { } msg_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), msg); // @@protoc_insertion_point(field_set_allocated:inner_ipc.OfflineMsgIPC.msg) } // string sname = 9; void OfflineMsgIPC::clear_sname() { sname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } const ::std::string& OfflineMsgIPC::sname() const { // @@protoc_insertion_point(field_get:inner_ipc.OfflineMsgIPC.sname) return sname_.GetNoArena(); } void OfflineMsgIPC::set_sname(const ::std::string& value) { sname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:inner_ipc.OfflineMsgIPC.sname) } #if LANG_CXX11 void OfflineMsgIPC::set_sname(::std::string&& value) { sname_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:inner_ipc.OfflineMsgIPC.sname) } #endif void OfflineMsgIPC::set_sname(const char* value) { GOOGLE_DCHECK(value != NULL); sname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:inner_ipc.OfflineMsgIPC.sname) } void OfflineMsgIPC::set_sname(const char* value, size_t size) { sname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast<const char*>(value), size)); // @@protoc_insertion_point(field_set_pointer:inner_ipc.OfflineMsgIPC.sname) } ::std::string* OfflineMsgIPC::mutable_sname() { // @@protoc_insertion_point(field_mutable:inner_ipc.OfflineMsgIPC.sname) return sname_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } ::std::string* OfflineMsgIPC::release_sname() { // @@protoc_insertion_point(field_release:inner_ipc.OfflineMsgIPC.sname) return sname_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void OfflineMsgIPC::set_allocated_sname(::std::string* sname) { if (sname != NULL) { } else { } sname_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), sname); // @@protoc_insertion_point(field_set_allocated:inner_ipc.OfflineMsgIPC.sname) } #endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int EmailBody::kEmailTypeFieldNumber; const int EmailBody::kEmailBodyFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 EmailBody::EmailBody() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { protobuf_chat_5fdb_5fipc_2eproto::InitDefaults(); } SharedCtor(); // @@protoc_insertion_point(constructor:inner_ipc.EmailBody) } EmailBody::EmailBody(const EmailBody& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); emailbody_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.emailbody().size() > 0) { emailbody_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.emailbody_); } emailtype_ = from.emailtype_; // @@protoc_insertion_point(copy_constructor:inner_ipc.EmailBody) } void EmailBody::SharedCtor() { emailbody_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); emailtype_ = 0; _cached_size_ = 0; } EmailBody::~EmailBody() { // @@protoc_insertion_point(destructor:inner_ipc.EmailBody) SharedDtor(); } void EmailBody::SharedDtor() { emailbody_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void EmailBody::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* EmailBody::descriptor() { protobuf_chat_5fdb_5fipc_2eproto::protobuf_AssignDescriptorsOnce(); return protobuf_chat_5fdb_5fipc_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const EmailBody& EmailBody::default_instance() { protobuf_chat_5fdb_5fipc_2eproto::InitDefaults(); return *internal_default_instance(); } EmailBody* EmailBody::New(::google::protobuf::Arena* arena) const { EmailBody* n = new EmailBody; if (arena != NULL) { arena->Own(n); } return n; } void EmailBody::Clear() { // @@protoc_insertion_point(message_clear_start:inner_ipc.EmailBody) emailbody_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); emailtype_ = 0; } bool EmailBody::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:inner_ipc.EmailBody) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // int32 emailType = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &emailtype_))); } else { goto handle_unusual; } break; } // string emailBody = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_emailbody())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->emailbody().data(), this->emailbody().length(), ::google::protobuf::internal::WireFormatLite::PARSE, "inner_ipc.EmailBody.emailBody")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); break; } } } success: // @@protoc_insertion_point(parse_success:inner_ipc.EmailBody) return true; failure: // @@protoc_insertion_point(parse_failure:inner_ipc.EmailBody) return false; #undef DO_ } void EmailBody::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:inner_ipc.EmailBody) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // int32 emailType = 1; if (this->emailtype() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->emailtype(), output); } // string emailBody = 2; if (this->emailbody().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->emailbody().data(), this->emailbody().length(), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "inner_ipc.EmailBody.emailBody"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->emailbody(), output); } // @@protoc_insertion_point(serialize_end:inner_ipc.EmailBody) } ::google::protobuf::uint8* EmailBody::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:inner_ipc.EmailBody) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // int32 emailType = 1; if (this->emailtype() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->emailtype(), target); } // string emailBody = 2; if (this->emailbody().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->emailbody().data(), this->emailbody().length(), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "inner_ipc.EmailBody.emailBody"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->emailbody(), target); } // @@protoc_insertion_point(serialize_to_array_end:inner_ipc.EmailBody) return target; } size_t EmailBody::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:inner_ipc.EmailBody) size_t total_size = 0; // string emailBody = 2; if (this->emailbody().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->emailbody()); } // int32 emailType = 1; if (this->emailtype() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->emailtype()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void EmailBody::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:inner_ipc.EmailBody) GOOGLE_DCHECK_NE(&from, this); const EmailBody* source = ::google::protobuf::internal::DynamicCastToGenerated<const EmailBody>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:inner_ipc.EmailBody) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:inner_ipc.EmailBody) MergeFrom(*source); } } void EmailBody::MergeFrom(const EmailBody& from) { // @@protoc_insertion_point(class_specific_merge_from_start:inner_ipc.EmailBody) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.emailbody().size() > 0) { emailbody_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.emailbody_); } if (from.emailtype() != 0) { set_emailtype(from.emailtype()); } } void EmailBody::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:inner_ipc.EmailBody) if (&from == this) return; Clear(); MergeFrom(from); } void EmailBody::CopyFrom(const EmailBody& from) { // @@protoc_insertion_point(class_specific_copy_from_start:inner_ipc.EmailBody) if (&from == this) return; Clear(); MergeFrom(from); } bool EmailBody::IsInitialized() const { return true; } void EmailBody::Swap(EmailBody* other) { if (other == this) return; InternalSwap(other); } void EmailBody::InternalSwap(EmailBody* other) { emailbody_.Swap(&other->emailbody_); std::swap(emailtype_, other->emailtype_); std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata EmailBody::GetMetadata() const { protobuf_chat_5fdb_5fipc_2eproto::protobuf_AssignDescriptorsOnce(); return protobuf_chat_5fdb_5fipc_2eproto::file_level_metadata[kIndexInFileMessages]; } #if PROTOBUF_INLINE_NOT_IN_HEADERS // EmailBody // int32 emailType = 1; void EmailBody::clear_emailtype() { emailtype_ = 0; } ::google::protobuf::int32 EmailBody::emailtype() const { // @@protoc_insertion_point(field_get:inner_ipc.EmailBody.emailType) return emailtype_; } void EmailBody::set_emailtype(::google::protobuf::int32 value) { emailtype_ = value; // @@protoc_insertion_point(field_set:inner_ipc.EmailBody.emailType) } // string emailBody = 2; void EmailBody::clear_emailbody() { emailbody_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } const ::std::string& EmailBody::emailbody() const { // @@protoc_insertion_point(field_get:inner_ipc.EmailBody.emailBody) return emailbody_.GetNoArena(); } void EmailBody::set_emailbody(const ::std::string& value) { emailbody_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:inner_ipc.EmailBody.emailBody) } #if LANG_CXX11 void EmailBody::set_emailbody(::std::string&& value) { emailbody_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:inner_ipc.EmailBody.emailBody) } #endif void EmailBody::set_emailbody(const char* value) { GOOGLE_DCHECK(value != NULL); emailbody_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:inner_ipc.EmailBody.emailBody) } void EmailBody::set_emailbody(const char* value, size_t size) { emailbody_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast<const char*>(value), size)); // @@protoc_insertion_point(field_set_pointer:inner_ipc.EmailBody.emailBody) } ::std::string* EmailBody::mutable_emailbody() { // @@protoc_insertion_point(field_mutable:inner_ipc.EmailBody.emailBody) return emailbody_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } ::std::string* EmailBody::release_emailbody() { // @@protoc_insertion_point(field_release:inner_ipc.EmailBody.emailBody) return emailbody_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void EmailBody::set_allocated_emailbody(::std::string* emailbody) { if (emailbody != NULL) { } else { } emailbody_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), emailbody); // @@protoc_insertion_point(field_set_allocated:inner_ipc.EmailBody.emailBody) } #endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int EmailMsgIPC::kSendRidFieldNumber; const int EmailMsgIPC::kRecvRidFieldNumber; const int EmailMsgIPC::kEmailTypeFieldNumber; const int EmailMsgIPC::kEmailHeadFieldNumber; const int EmailMsgIPC::kEmailBodyFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 EmailMsgIPC::EmailMsgIPC() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { protobuf_chat_5fdb_5fipc_2eproto::InitDefaults(); } SharedCtor(); // @@protoc_insertion_point(constructor:inner_ipc.EmailMsgIPC) } EmailMsgIPC::EmailMsgIPC(const EmailMsgIPC& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), emailbody_(from.emailbody_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); emailhead_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.emailhead().size() > 0) { emailhead_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.emailhead_); } ::memcpy(&sendrid_, &from.sendrid_, reinterpret_cast<char*>(&emailtype_) - reinterpret_cast<char*>(&sendrid_) + sizeof(emailtype_)); // @@protoc_insertion_point(copy_constructor:inner_ipc.EmailMsgIPC) } void EmailMsgIPC::SharedCtor() { emailhead_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&sendrid_, 0, reinterpret_cast<char*>(&emailtype_) - reinterpret_cast<char*>(&sendrid_) + sizeof(emailtype_)); _cached_size_ = 0; } EmailMsgIPC::~EmailMsgIPC() { // @@protoc_insertion_point(destructor:inner_ipc.EmailMsgIPC) SharedDtor(); } void EmailMsgIPC::SharedDtor() { emailhead_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void EmailMsgIPC::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* EmailMsgIPC::descriptor() { protobuf_chat_5fdb_5fipc_2eproto::protobuf_AssignDescriptorsOnce(); return protobuf_chat_5fdb_5fipc_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const EmailMsgIPC& EmailMsgIPC::default_instance() { protobuf_chat_5fdb_5fipc_2eproto::InitDefaults(); return *internal_default_instance(); } EmailMsgIPC* EmailMsgIPC::New(::google::protobuf::Arena* arena) const { EmailMsgIPC* n = new EmailMsgIPC; if (arena != NULL) { arena->Own(n); } return n; } void EmailMsgIPC::Clear() { // @@protoc_insertion_point(message_clear_start:inner_ipc.EmailMsgIPC) emailbody_.Clear(); emailhead_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&sendrid_, 0, reinterpret_cast<char*>(&emailtype_) - reinterpret_cast<char*>(&sendrid_) + sizeof(emailtype_)); } bool EmailMsgIPC::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:inner_ipc.EmailMsgIPC) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // int32 sendRid = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &sendrid_))); } else { goto handle_unusual; } break; } // int32 recvRid = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(16u)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &recvrid_))); } else { goto handle_unusual; } break; } // int32 emailType = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(24u)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &emailtype_))); } else { goto handle_unusual; } break; } // string emailHead = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_emailhead())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->emailhead().data(), this->emailhead().length(), ::google::protobuf::internal::WireFormatLite::PARSE, "inner_ipc.EmailMsgIPC.emailHead")); } else { goto handle_unusual; } break; } // repeated .inner_ipc.EmailBody emailBody = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_emailbody())); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); break; } } } success: // @@protoc_insertion_point(parse_success:inner_ipc.EmailMsgIPC) return true; failure: // @@protoc_insertion_point(parse_failure:inner_ipc.EmailMsgIPC) return false; #undef DO_ } void EmailMsgIPC::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:inner_ipc.EmailMsgIPC) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // int32 sendRid = 1; if (this->sendrid() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->sendrid(), output); } // int32 recvRid = 2; if (this->recvrid() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->recvrid(), output); } // int32 emailType = 3; if (this->emailtype() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->emailtype(), output); } // string emailHead = 4; if (this->emailhead().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->emailhead().data(), this->emailhead().length(), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "inner_ipc.EmailMsgIPC.emailHead"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->emailhead(), output); } // repeated .inner_ipc.EmailBody emailBody = 5; for (unsigned int i = 0, n = this->emailbody_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 5, this->emailbody(i), output); } // @@protoc_insertion_point(serialize_end:inner_ipc.EmailMsgIPC) } ::google::protobuf::uint8* EmailMsgIPC::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:inner_ipc.EmailMsgIPC) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // int32 sendRid = 1; if (this->sendrid() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->sendrid(), target); } // int32 recvRid = 2; if (this->recvrid() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->recvrid(), target); } // int32 emailType = 3; if (this->emailtype() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->emailtype(), target); } // string emailHead = 4; if (this->emailhead().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->emailhead().data(), this->emailhead().length(), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "inner_ipc.EmailMsgIPC.emailHead"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 4, this->emailhead(), target); } // repeated .inner_ipc.EmailBody emailBody = 5; for (unsigned int i = 0, n = this->emailbody_size(); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( 5, this->emailbody(i), deterministic, target); } // @@protoc_insertion_point(serialize_to_array_end:inner_ipc.EmailMsgIPC) return target; } size_t EmailMsgIPC::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:inner_ipc.EmailMsgIPC) size_t total_size = 0; // repeated .inner_ipc.EmailBody emailBody = 5; { unsigned int count = this->emailbody_size(); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( this->emailbody(i)); } } // string emailHead = 4; if (this->emailhead().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->emailhead()); } // int32 sendRid = 1; if (this->sendrid() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->sendrid()); } // int32 recvRid = 2; if (this->recvrid() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->recvrid()); } // int32 emailType = 3; if (this->emailtype() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->emailtype()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void EmailMsgIPC::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:inner_ipc.EmailMsgIPC) GOOGLE_DCHECK_NE(&from, this); const EmailMsgIPC* source = ::google::protobuf::internal::DynamicCastToGenerated<const EmailMsgIPC>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:inner_ipc.EmailMsgIPC) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:inner_ipc.EmailMsgIPC) MergeFrom(*source); } } void EmailMsgIPC::MergeFrom(const EmailMsgIPC& from) { // @@protoc_insertion_point(class_specific_merge_from_start:inner_ipc.EmailMsgIPC) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; emailbody_.MergeFrom(from.emailbody_); if (from.emailhead().size() > 0) { emailhead_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.emailhead_); } if (from.sendrid() != 0) { set_sendrid(from.sendrid()); } if (from.recvrid() != 0) { set_recvrid(from.recvrid()); } if (from.emailtype() != 0) { set_emailtype(from.emailtype()); } } void EmailMsgIPC::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:inner_ipc.EmailMsgIPC) if (&from == this) return; Clear(); MergeFrom(from); } void EmailMsgIPC::CopyFrom(const EmailMsgIPC& from) { // @@protoc_insertion_point(class_specific_copy_from_start:inner_ipc.EmailMsgIPC) if (&from == this) return; Clear(); MergeFrom(from); } bool EmailMsgIPC::IsInitialized() const { return true; } void EmailMsgIPC::Swap(EmailMsgIPC* other) { if (other == this) return; InternalSwap(other); } void EmailMsgIPC::InternalSwap(EmailMsgIPC* other) { emailbody_.InternalSwap(&other->emailbody_); emailhead_.Swap(&other->emailhead_); std::swap(sendrid_, other->sendrid_); std::swap(recvrid_, other->recvrid_); std::swap(emailtype_, other->emailtype_); std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata EmailMsgIPC::GetMetadata() const { protobuf_chat_5fdb_5fipc_2eproto::protobuf_AssignDescriptorsOnce(); return protobuf_chat_5fdb_5fipc_2eproto::file_level_metadata[kIndexInFileMessages]; } #if PROTOBUF_INLINE_NOT_IN_HEADERS // EmailMsgIPC // int32 sendRid = 1; void EmailMsgIPC::clear_sendrid() { sendrid_ = 0; } ::google::protobuf::int32 EmailMsgIPC::sendrid() const { // @@protoc_insertion_point(field_get:inner_ipc.EmailMsgIPC.sendRid) return sendrid_; } void EmailMsgIPC::set_sendrid(::google::protobuf::int32 value) { sendrid_ = value; // @@protoc_insertion_point(field_set:inner_ipc.EmailMsgIPC.sendRid) } // int32 recvRid = 2; void EmailMsgIPC::clear_recvrid() { recvrid_ = 0; } ::google::protobuf::int32 EmailMsgIPC::recvrid() const { // @@protoc_insertion_point(field_get:inner_ipc.EmailMsgIPC.recvRid) return recvrid_; } void EmailMsgIPC::set_recvrid(::google::protobuf::int32 value) { recvrid_ = value; // @@protoc_insertion_point(field_set:inner_ipc.EmailMsgIPC.recvRid) } // int32 emailType = 3; void EmailMsgIPC::clear_emailtype() { emailtype_ = 0; } ::google::protobuf::int32 EmailMsgIPC::emailtype() const { // @@protoc_insertion_point(field_get:inner_ipc.EmailMsgIPC.emailType) return emailtype_; } void EmailMsgIPC::set_emailtype(::google::protobuf::int32 value) { emailtype_ = value; // @@protoc_insertion_point(field_set:inner_ipc.EmailMsgIPC.emailType) } // string emailHead = 4; void EmailMsgIPC::clear_emailhead() { emailhead_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } const ::std::string& EmailMsgIPC::emailhead() const { // @@protoc_insertion_point(field_get:inner_ipc.EmailMsgIPC.emailHead) return emailhead_.GetNoArena(); } void EmailMsgIPC::set_emailhead(const ::std::string& value) { emailhead_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:inner_ipc.EmailMsgIPC.emailHead) } #if LANG_CXX11 void EmailMsgIPC::set_emailhead(::std::string&& value) { emailhead_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:inner_ipc.EmailMsgIPC.emailHead) } #endif void EmailMsgIPC::set_emailhead(const char* value) { GOOGLE_DCHECK(value != NULL); emailhead_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:inner_ipc.EmailMsgIPC.emailHead) } void EmailMsgIPC::set_emailhead(const char* value, size_t size) { emailhead_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast<const char*>(value), size)); // @@protoc_insertion_point(field_set_pointer:inner_ipc.EmailMsgIPC.emailHead) } ::std::string* EmailMsgIPC::mutable_emailhead() { // @@protoc_insertion_point(field_mutable:inner_ipc.EmailMsgIPC.emailHead) return emailhead_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } ::std::string* EmailMsgIPC::release_emailhead() { // @@protoc_insertion_point(field_release:inner_ipc.EmailMsgIPC.emailHead) return emailhead_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void EmailMsgIPC::set_allocated_emailhead(::std::string* emailhead) { if (emailhead != NULL) { } else { } emailhead_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), emailhead); // @@protoc_insertion_point(field_set_allocated:inner_ipc.EmailMsgIPC.emailHead) } // repeated .inner_ipc.EmailBody emailBody = 5; int EmailMsgIPC::emailbody_size() const { return emailbody_.size(); } void EmailMsgIPC::clear_emailbody() { emailbody_.Clear(); } const ::inner_ipc::EmailBody& EmailMsgIPC::emailbody(int index) const { // @@protoc_insertion_point(field_get:inner_ipc.EmailMsgIPC.emailBody) return emailbody_.Get(index); } ::inner_ipc::EmailBody* EmailMsgIPC::mutable_emailbody(int index) { // @@protoc_insertion_point(field_mutable:inner_ipc.EmailMsgIPC.emailBody) return emailbody_.Mutable(index); } ::inner_ipc::EmailBody* EmailMsgIPC::add_emailbody() { // @@protoc_insertion_point(field_add:inner_ipc.EmailMsgIPC.emailBody) return emailbody_.Add(); } ::google::protobuf::RepeatedPtrField< ::inner_ipc::EmailBody >* EmailMsgIPC::mutable_emailbody() { // @@protoc_insertion_point(field_mutable_list:inner_ipc.EmailMsgIPC.emailBody) return &emailbody_; } const ::google::protobuf::RepeatedPtrField< ::inner_ipc::EmailBody >& EmailMsgIPC::emailbody() const { // @@protoc_insertion_point(field_list:inner_ipc.EmailMsgIPC.emailBody) return emailbody_; } #endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int OfflineGoodsIPC::kSendRidFieldNumber; const int OfflineGoodsIPC::kRecvRidFieldNumber; const int OfflineGoodsIPC::kCountFieldNumber; const int OfflineGoodsIPC::kGoodsIdFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 OfflineGoodsIPC::OfflineGoodsIPC() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { protobuf_chat_5fdb_5fipc_2eproto::InitDefaults(); } SharedCtor(); // @@protoc_insertion_point(constructor:inner_ipc.OfflineGoodsIPC) } OfflineGoodsIPC::OfflineGoodsIPC(const OfflineGoodsIPC& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&sendrid_, &from.sendrid_, reinterpret_cast<char*>(&goodsid_) - reinterpret_cast<char*>(&sendrid_) + sizeof(goodsid_)); // @@protoc_insertion_point(copy_constructor:inner_ipc.OfflineGoodsIPC) } void OfflineGoodsIPC::SharedCtor() { ::memset(&sendrid_, 0, reinterpret_cast<char*>(&goodsid_) - reinterpret_cast<char*>(&sendrid_) + sizeof(goodsid_)); _cached_size_ = 0; } OfflineGoodsIPC::~OfflineGoodsIPC() { // @@protoc_insertion_point(destructor:inner_ipc.OfflineGoodsIPC) SharedDtor(); } void OfflineGoodsIPC::SharedDtor() { } void OfflineGoodsIPC::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* OfflineGoodsIPC::descriptor() { protobuf_chat_5fdb_5fipc_2eproto::protobuf_AssignDescriptorsOnce(); return protobuf_chat_5fdb_5fipc_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const OfflineGoodsIPC& OfflineGoodsIPC::default_instance() { protobuf_chat_5fdb_5fipc_2eproto::InitDefaults(); return *internal_default_instance(); } OfflineGoodsIPC* OfflineGoodsIPC::New(::google::protobuf::Arena* arena) const { OfflineGoodsIPC* n = new OfflineGoodsIPC; if (arena != NULL) { arena->Own(n); } return n; } void OfflineGoodsIPC::Clear() { // @@protoc_insertion_point(message_clear_start:inner_ipc.OfflineGoodsIPC) ::memset(&sendrid_, 0, reinterpret_cast<char*>(&goodsid_) - reinterpret_cast<char*>(&sendrid_) + sizeof(goodsid_)); } bool OfflineGoodsIPC::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:inner_ipc.OfflineGoodsIPC) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // int32 sendRid = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &sendrid_))); } else { goto handle_unusual; } break; } // int32 recvRid = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(16u)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &recvrid_))); } else { goto handle_unusual; } break; } // int32 count = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(24u)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &count_))); } else { goto handle_unusual; } break; } // int32 goodsId = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(32u)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &goodsid_))); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); break; } } } success: // @@protoc_insertion_point(parse_success:inner_ipc.OfflineGoodsIPC) return true; failure: // @@protoc_insertion_point(parse_failure:inner_ipc.OfflineGoodsIPC) return false; #undef DO_ } void OfflineGoodsIPC::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:inner_ipc.OfflineGoodsIPC) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // int32 sendRid = 1; if (this->sendrid() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->sendrid(), output); } // int32 recvRid = 2; if (this->recvrid() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->recvrid(), output); } // int32 count = 3; if (this->count() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->count(), output); } // int32 goodsId = 4; if (this->goodsid() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->goodsid(), output); } // @@protoc_insertion_point(serialize_end:inner_ipc.OfflineGoodsIPC) } ::google::protobuf::uint8* OfflineGoodsIPC::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:inner_ipc.OfflineGoodsIPC) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // int32 sendRid = 1; if (this->sendrid() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->sendrid(), target); } // int32 recvRid = 2; if (this->recvrid() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->recvrid(), target); } // int32 count = 3; if (this->count() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->count(), target); } // int32 goodsId = 4; if (this->goodsid() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->goodsid(), target); } // @@protoc_insertion_point(serialize_to_array_end:inner_ipc.OfflineGoodsIPC) return target; } size_t OfflineGoodsIPC::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:inner_ipc.OfflineGoodsIPC) size_t total_size = 0; // int32 sendRid = 1; if (this->sendrid() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->sendrid()); } // int32 recvRid = 2; if (this->recvrid() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->recvrid()); } // int32 count = 3; if (this->count() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->count()); } // int32 goodsId = 4; if (this->goodsid() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->goodsid()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = cached_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void OfflineGoodsIPC::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:inner_ipc.OfflineGoodsIPC) GOOGLE_DCHECK_NE(&from, this); const OfflineGoodsIPC* source = ::google::protobuf::internal::DynamicCastToGenerated<const OfflineGoodsIPC>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:inner_ipc.OfflineGoodsIPC) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:inner_ipc.OfflineGoodsIPC) MergeFrom(*source); } } void OfflineGoodsIPC::MergeFrom(const OfflineGoodsIPC& from) { // @@protoc_insertion_point(class_specific_merge_from_start:inner_ipc.OfflineGoodsIPC) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.sendrid() != 0) { set_sendrid(from.sendrid()); } if (from.recvrid() != 0) { set_recvrid(from.recvrid()); } if (from.count() != 0) { set_count(from.count()); } if (from.goodsid() != 0) { set_goodsid(from.goodsid()); } } void OfflineGoodsIPC::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:inner_ipc.OfflineGoodsIPC) if (&from == this) return; Clear(); MergeFrom(from); } void OfflineGoodsIPC::CopyFrom(const OfflineGoodsIPC& from) { // @@protoc_insertion_point(class_specific_copy_from_start:inner_ipc.OfflineGoodsIPC) if (&from == this) return; Clear(); MergeFrom(from); } bool OfflineGoodsIPC::IsInitialized() const { return true; } void OfflineGoodsIPC::Swap(OfflineGoodsIPC* other) { if (other == this) return; InternalSwap(other); } void OfflineGoodsIPC::InternalSwap(OfflineGoodsIPC* other) { std::swap(sendrid_, other->sendrid_); std::swap(recvrid_, other->recvrid_); std::swap(count_, other->count_); std::swap(goodsid_, other->goodsid_); std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata OfflineGoodsIPC::GetMetadata() const { protobuf_chat_5fdb_5fipc_2eproto::protobuf_AssignDescriptorsOnce(); return protobuf_chat_5fdb_5fipc_2eproto::file_level_metadata[kIndexInFileMessages]; } #if PROTOBUF_INLINE_NOT_IN_HEADERS // OfflineGoodsIPC // int32 sendRid = 1; void OfflineGoodsIPC::clear_sendrid() { sendrid_ = 0; } ::google::protobuf::int32 OfflineGoodsIPC::sendrid() const { // @@protoc_insertion_point(field_get:inner_ipc.OfflineGoodsIPC.sendRid) return sendrid_; } void OfflineGoodsIPC::set_sendrid(::google::protobuf::int32 value) { sendrid_ = value; // @@protoc_insertion_point(field_set:inner_ipc.OfflineGoodsIPC.sendRid) } // int32 recvRid = 2; void OfflineGoodsIPC::clear_recvrid() { recvrid_ = 0; } ::google::protobuf::int32 OfflineGoodsIPC::recvrid() const { // @@protoc_insertion_point(field_get:inner_ipc.OfflineGoodsIPC.recvRid) return recvrid_; } void OfflineGoodsIPC::set_recvrid(::google::protobuf::int32 value) { recvrid_ = value; // @@protoc_insertion_point(field_set:inner_ipc.OfflineGoodsIPC.recvRid) } // int32 count = 3; void OfflineGoodsIPC::clear_count() { count_ = 0; } ::google::protobuf::int32 OfflineGoodsIPC::count() const { // @@protoc_insertion_point(field_get:inner_ipc.OfflineGoodsIPC.count) return count_; } void OfflineGoodsIPC::set_count(::google::protobuf::int32 value) { count_ = value; // @@protoc_insertion_point(field_set:inner_ipc.OfflineGoodsIPC.count) } // int32 goodsId = 4; void OfflineGoodsIPC::clear_goodsid() { goodsid_ = 0; } ::google::protobuf::int32 OfflineGoodsIPC::goodsid() const { // @@protoc_insertion_point(field_get:inner_ipc.OfflineGoodsIPC.goodsId) return goodsid_; } void OfflineGoodsIPC::set_goodsid(::google::protobuf::int32 value) { goodsid_ = value; // @@protoc_insertion_point(field_set:inner_ipc.OfflineGoodsIPC.goodsId) } #endif // PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) } // namespace inner_ipc // @@protoc_insertion_point(global_scope)
34.216998
120
0.69657
shockerjue
8f1eecc36cacc4251c0b3004d50c05dd2943a5f6
352
cpp
C++
3rdparty/openbw/bwapi/bwapi/BWScriptEmulator/Nuke_Pos.cpp
ratiotile/StardustDevEnvironment
15c512b81579d8bd663db3fa8e0847d4c27f17e8
[ "MIT" ]
8
2020-09-29T17:11:15.000Z
2022-01-29T20:41:33.000Z
3rdparty/openbw/bwapi/bwapi/BWScriptEmulator/Nuke_Pos.cpp
ratiotile/StardustDevEnvironment
15c512b81579d8bd663db3fa8e0847d4c27f17e8
[ "MIT" ]
1
2021-03-08T17:43:05.000Z
2021-03-09T06:35:04.000Z
3rdparty/openbw/bwapi/bwapi/BWScriptEmulator/Nuke_Pos.cpp
ratiotile/StardustDevEnvironment
15c512b81579d8bd663db3fa8e0847d4c27f17e8
[ "MIT" ]
1
2021-03-01T04:31:30.000Z
2021-03-01T04:31:30.000Z
#include "Nuke_Pos.h" #include <tuple> #include "Controller.h" using namespace AISCRIPT; IMPLEMENT(Nuke_Pos); bool Nuke_Pos::execute(aithread &thread) const { // Params WORD x, y; thread.readTuple( std::tie(x,y) ); // @TODO // Save debug info and return thread.saveDebug(Text::Red, this->getOpcode(), "%u %u", x, y); return true; }
16
64
0.661932
ratiotile
8f316af1ac71328f76b827b7b1265718289478ea
408
cpp
C++
DISELAPI/DISELAPI.cpp
YbJerry/DISELAPI
fd04b294351c50dcf6d0b6129bccc3fd3b41a024
[ "Apache-2.0" ]
null
null
null
DISELAPI/DISELAPI.cpp
YbJerry/DISELAPI
fd04b294351c50dcf6d0b6129bccc3fd3b41a024
[ "Apache-2.0" ]
null
null
null
DISELAPI/DISELAPI.cpp
YbJerry/DISELAPI
fd04b294351c50dcf6d0b6129bccc3fd3b41a024
[ "Apache-2.0" ]
null
null
null
// DISELAPI.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include "DISXMLReader.h" #include "DISXMLWriter.h" int main() { DISXMLReader reader("./examples/onlyAtomDomain.xml"); DISEL::Ontology *onto = reader.read(); auto res = onto->getAtomDomain(); DISXMLWriter writer; writer.write("test.xml", *onto); return 0; }
21.473684
98
0.683824
YbJerry
8f3378af516d29c097aed2448ca232f91129efd3
2,701
cpp
C++
src/elab/elab.cpp
bridgekat/apimu
2e401a01e0aad859dc1dd975dae164f622c48696
[ "CC0-1.0" ]
5
2021-12-12T22:10:57.000Z
2022-03-10T21:01:48.000Z
src/elab/elab.cpp
bridgekat/apimu
2e401a01e0aad859dc1dd975dae164f622c48696
[ "CC0-1.0" ]
null
null
null
src/elab/elab.cpp
bridgekat/apimu
2e401a01e0aad859dc1dd975dae164f622c48696
[ "CC0-1.0" ]
null
null
null
#include "elab.hpp" namespace Elab { using std::vector; using std::string; using std::pair; using namespace Core; using enum Expr::Tag; using enum Expr::SortTag; using enum Expr::VarTag; using enum Expr::LamTag; using enum Expr::PiTag; /* pair<const Expr*, const Expr*> inferHoles(const Expr* e, const Context& ctx, Allocator<Expr>& pool, vector<const Expr*>& stk, vector<string>& names) { switch (e->tag) { case Sort: { switch (e->sort.tag) { case SProp: return { e, pool.emplaceBack(SType) }; case SType: return { e, pool.emplaceBack(SKind) }; case SKind: throw InvalidExpr("\"Kind\" does not have a type", ctx, e); } exhaustive; } case Var: { switch (e->var.tag) { case VBound: if (e->var.id < stk.size()) return stk[stk.size() - 1 - e->var.id]->reduce(pool); else throw InvalidExpr("de Bruijn index overflow", ctx, e); case VFree: if (e->var.id < ctx.size()) return ctx[e->var.id]->reduce(pool); else throw InvalidExpr("free variable not in context", ctx, e); case VMeta: // ##### // Make a new metavariable `?t` as type, add has-type constraint `e: t`, return `?t` } exhaustive; } case App: { // Π-elimination const auto tl = inferHoles(e->app.l, ctx, pool, stk, names); const auto tr = inferHoles(e->app.r, ctx, pool, stk, names); // ##### // Add unification constraint `tl ?= Pi: tr, ?m` and return `?m` // if (tl->tag != Pi) throw InvalidExpr("expected function, term has type " + tl->toString(ctx, names), ctx, e->app.l); // if (*tl->pi.t != *tr) throw InvalidExpr("argument type mismatch, expected " + tl->pi.t->toString(ctx, names) + ", got " + tr->toString(ctx, names), ctx, e->app.r); // return tl->pi.r->makeReplace(e->app.r, pool)->reduce(pool); } case Lam: { // Π-introduction const auto tt = inferHoles(e->lam.t, ctx, pool, stk, names); names.push_back(e->lam.s); stk.push_back(e->lam.t); const auto tr = inferHoles(e->lam.r, ctx, pool, stk, names); names.pop_back(); stk.pop_back(); return pool.emplaceBack(PPi, e->lam.s, e->lam.t->reduce(pool), tr); } case Pi: { // Π-formation const auto tt = inferHoles(e->pi.t, ctx, pool, stk, names); names.push_back(e->pi.s); stk.push_back(e->pi.t); const auto tr = inferHoles(e->pi.r, ctx, pool, stk, names); names.pop_back(); stk.pop_back(); return pool.emplaceBack(Expr::imax(st, sr)); } } exhaustive; } */ }
37.513889
174
0.560163
bridgekat
8f3cc5b42e23157fd49fff3e383746aca09a6dbc
10,119
hxx
C++
include/graphics/twm4nx/ctwm4nx.hxx
DS-LK/incubator-nuttx-apps
5719753399c41529478ced0a3af9a8fae93a50a9
[ "Apache-2.0" ]
132
2019-12-17T23:45:42.000Z
2022-03-30T11:58:30.000Z
include/graphics/twm4nx/ctwm4nx.hxx
VanFeo/incubator-nuttx-apps
009e66874538658c10a26bc076d27e9de48fabc6
[ "Apache-2.0" ]
443
2020-01-01T03:06:24.000Z
2022-03-31T08:57:35.000Z
include/graphics/twm4nx/ctwm4nx.hxx
VanFeo/incubator-nuttx-apps
009e66874538658c10a26bc076d27e9de48fabc6
[ "Apache-2.0" ]
232
2019-12-21T10:18:12.000Z
2022-03-30T07:42:13.000Z
///////////////////////////////////////////////////////////////////////////// // apps/include/graphics/twm4nx/ctwm4nx.hxx // // Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. The // ASF licenses this file to you 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. // ///////////////////////////////////////////////////////////////////////////// // Largely an original work but derives from TWM 1.0.10 in many ways: // // Copyright 1989,1998 The Open Group // Copyright 1988 by Evans & Sutherland Computer Corporation, // // Please refer to apps/twm4nx/COPYING for detailed copyright information. // Although not listed as a copyright holder, thanks and recognition need // to go to Tom LaStrange, the original author of TWM. #ifndef __APPS_INCLUDE_GRAPHICS_TWM4NX_CTWM4NX_HXX #define __APPS_INCLUDE_GRAPHICS_TWM4NX_CTWM4NX_HXX ///////////////////////////////////////////////////////////////////////////// // Included Files ///////////////////////////////////////////////////////////////////////////// #include <nuttx/config.h> #include <cstdlib> #include <semaphore.h> #include <mqueue.h> #include <nuttx/nx/nx.h> #include <nuttx/nx/nxglib.h> #include <nuttx/nx/nxfonts.h> #include "graphics/nxwidgets/nxconfig.hxx" #include "graphics/nxwidgets/cnxserver.hxx" #include "graphics/nxwidgets/cnxwindow.hxx" #include "graphics/nxwidgets/cimage.hxx" #include "graphics/twm4nx/cwindowevent.hxx" #include "graphics/twm4nx/twm4nx_events.hxx" ///////////////////////////////////////////////////////////////////////////// // Implementation Classes ///////////////////////////////////////////////////////////////////////////// namespace Twm4Nx { class CInput; // Forward reference class CBackground; // Forward reference class CWidgetEvent; // Forward reference class CIconMgr; // Forward reference class CFonts; // Forward reference class CWindow; // Forward reference class CMainMenu; // Forward reference class CResize; // Forward reference class CWindowFactory; // Forward reference class CResize; // Forward reference struct SWindow; // Forward reference /** * Public Constant Data */ extern const char GNoName[]; /**< Name to use when there is no name */ /** * This class provides the overall state of the window manager. It is also * the heart of the window manager: It inherits for CNxServer and, hence, * represents the NX server itself. */ class CTwm4Nx : public NXWidgets::CNxServer { private: int m_display; /**< Display that we are using */ FAR char *m_queueName; /**< NxWidget event queue name */ mqd_t m_eventq; /**< NxWidget event message queue */ FAR CBackground *m_background; /**< Background window management */ FAR CIconMgr *m_iconmgr; /**< The Default icon manager */ FAR CWindowFactory *m_factory; /**< The cached CWindowFactory instance */ FAR CFonts *m_fonts; /**< The cached Cfonts instance */ FAR CMainMenu *m_mainMenu; /**< The cached CMainMenu instance */ FAR CResize *m_resize; /**< The cached CResize instance */ #if !defined(CONFIG_TWM4NX_NOKEYBOARD) || !defined(CONFIG_TWM4NX_NOMOUSE) FAR CInput *m_input; /**< Keyboard/mouse input injector */ #endif /* Display properties */ FAR struct nxgl_size_s m_displaySize; /**< Size of the display */ FAR struct nxgl_size_s m_maxWindow; /**< Maximum size of a window */ /** * Connect to the NX server * * @return True if the message was properly handled. false is * return on any failure. */ bool connect(void); /** * Generate a random message queue name. Different message queue * names are required for each instance of Twm4Nx that is started. */ inline void genMqName(void); /** * Handle SYSTEM events. * * @param eventmsg. The received NxWidget SYSTEM event message. * @return True if the message was properly handled. false is * return on any failure. */ inline bool systemEvent(FAR struct SEventMsg *eventmsg); /** * Cleanup in preparation for termination. */ void cleanup(void); public: /** * CTwm4Nx Constructor * * @param display. Indicates which display will be used. Usually zero * except in the case wehre there of multiple displays. */ CTwm4Nx(int display); /** * CTwm4Nx Destructor */ ~CTwm4Nx(void); /** * Perform initialization additional, post-construction initialization * that may fail. This initialization logic fully initialized the * Twm4Nx session. Upon return, the session is ready for use. * * After Twm4Nx is initialized, external applications should register * themselves into the Main Menu in order to be a part of the desktop. * * @return True if the Twm4Nx was properly initialized. false is * returned on any failure. */ bool initialize(void); /** * This is the main, event loop of the Twm4Nx session. * * @return True if the Twm4Nxr was terminated noramly. false is returned * on any failure. */ bool eventLoop(void); /** * Return a reference to the randomly generated event messageq queue * name. Different message queue names are required for each instance * of Twm4Nx that is started. */ inline FAR const char *getEventQueueName(void) { return m_queueName; } /** * Return the size of the physical display (whichi is equivalent to the * size of the contained background window). * * @return The size of the display. */ inline void getDisplaySize(FAR struct nxgl_size_s *size) { size->w = m_displaySize.w; size->h = m_displaySize.h; } /** * Return the pixel depth. * * REVISIT: Currently only the pixel depth configured for NxWidgets is * supported. That is probably compatible with support for multiple * displays of differing resolutions. * * @return The number of bits-per-pixel. */ inline uint8_t getPixelDepth(void) { return CONFIG_NXWIDGETS_BPP; } /** * Return the maximum size of a window. * * @return The maximum size of a window. */ inline void maxWindowSize(FAR struct nxgl_size_s *size) { size->w = m_maxWindow.w; size->h = m_maxWindow.h; } /** * Return the session's CBackground instance. * * @return The contained instance of the CBackground class for this * session. */ inline FAR CBackground *getBackground(void) { return m_background; } /** * Return the session's Icon Manager instance. * * @return The contained instance of the Icon Manager for this session. */ inline FAR CIconMgr *getIconMgr(void) { return m_iconmgr; } /** * Return the session's CWindowFactory instance. * * @return The contained instance of the CWindow instance this * session. */ inline FAR CWindowFactory *getWindowFactory(void) { return m_factory; } /** * Return the session's CFonts instance. * * @return The contained instance of the CFonts instance for this * session. */ inline FAR CFonts *getFonts(void) { return m_fonts; } /** * Return the session's CMainMenu instance. * * @return The contained instance of the CMainMenu instance for this * session. */ inline FAR CMainMenu *getMainMenu(void) { return m_mainMenu; } /** * Return the session's CResize instance. * * @return The contained instance of the CResize instance for this * session. */ inline FAR CResize *getResize(void) { return m_resize; } #if !defined(CONFIG_TWM4NX_NOKEYBOARD) || !defined(CONFIG_TWM4NX_NOMOUSE) /** * Return the session's CInput instance. * * @return The contained instance of the CInput instance for this * session. */ inline FAR CInput *getInput(void) { return m_input; } #endif /** * Dispatch NxWidget-related events. Normally used only internally * but there is one use case where messages are injected here from * CMenus. * * @param eventmsg. The received NxWidget event message. * @return True if the message was properly dispatched. false is * return on any failure. */ bool dispatchEvent(FAR struct SEventMsg *eventmsg); /** * Cleanup and exit Twm4Nx abnormally. */ void abort(void); }; } #endif // __APPS_INCLUDE_GRAPHICS_TWM4NX_CTWM4NX_HXX
30.20597
92
0.582567
DS-LK
8f48db7b0b2e7160b9e6d9b85f95d6ed82653223
39,806
cpp
C++
TIFPart/TIFFView.cpp
HiraokaHyperTools/AxTIF5
d50fbd33436fc07005e5712a586912932c450f58
[ "BSD-3-Clause" ]
null
null
null
TIFPart/TIFFView.cpp
HiraokaHyperTools/AxTIF5
d50fbd33436fc07005e5712a586912932c450f58
[ "BSD-3-Clause" ]
3
2016-05-23T07:05:17.000Z
2022-02-10T14:20:54.000Z
TIFPart/TIFFView.cpp
HiraokaHyperTools/AxTIF5
d50fbd33436fc07005e5712a586912932c450f58
[ "BSD-3-Clause" ]
1
2019-07-23T15:12:37.000Z
2019-07-23T15:12:37.000Z
// AxTIF3View.cpp : CTIFFView クラスの実装 // #include "pch.h" #include "TIFPart.resource.h" #include "TIFFDoc.h" #include "TIFFView.h" #include "../RUt.h" #include "PaperSizeUtil.h" #include "FitRect3.h" #ifdef _DEBUG #define new DEBUG_NEW #endif #define ENABLE_PRINT 1 const int cxBMFirst = 16; const int cxBMPrev = 40; const int cxBMNext = 40; const int cxBMLast = 16; const int cxBMGear = 254; const int cyBar = 24; // CTIFFView IMPLEMENT_DYNCREATE(CTIFFView, CView) #ifndef WM_MOUSEHWHEEL #define WM_MOUSEHWHEEL 0x020E #endif // WM_MOUSEHWHEEL BEGIN_MESSAGE_MAP(CTIFFView, CView) ON_WM_CREATE() ON_WM_SIZE() ON_WM_HSCROLL() ON_WM_VSCROLL() ON_WM_LBUTTONDOWN() ON_WM_RBUTTONDOWN() ON_WM_LBUTTONDBLCLK() ON_WM_RBUTTONDBLCLK() ON_WM_LBUTTONUP() ON_WM_MOUSEMOVE() ON_WM_ERASEBKGND() ON_WM_MOUSEWHEEL() ON_MESSAGE(WM_MOUSEHWHEEL, OnMouseHWheel) ON_WM_MOUSEACTIVATE() ON_COMMAND_EX(IDC_MAG, OnSelCmd) ON_COMMAND_EX(IDC_MOVE, OnSelCmd) ON_COMMAND_EX(IDC_P6, OnSelCmd) ON_COMMAND_EX(IDC_P12, OnSelCmd) ON_COMMAND_EX(IDC_P25, OnSelCmd) ON_COMMAND_EX(IDC_P50, OnSelCmd) ON_COMMAND_EX(IDC_P100, OnSelCmd) ON_COMMAND_EX(IDC_P200, OnSelCmd) ON_COMMAND_EX(IDC_P400, OnSelCmd) ON_COMMAND_EX(IDC_P800, OnSelCmd) ON_COMMAND_EX(IDC_P1600, OnSelCmd) ON_UPDATE_COMMAND_UI(IDC_MAG, OnUpdateSelCmd) ON_UPDATE_COMMAND_UI(IDC_MOVE, OnUpdateSelCmd) ON_COMMAND(IDC_PRINT, OnFilePrint) ON_WM_TIMER() END_MESSAGE_MAP() // CTIFFView コンストラクション/デストラクション CTIFFView::CTIFFView() : m_ddcompat(0), m_slowzoom(15), m_fAllowSelfDelete(true) { RUt::GetInt(_T("HIRAOKA HYPERS TOOLS, Inc."), _T("AxTIF5"), _T("ddcompat"), reinterpret_cast<DWORD&>(m_ddcompat), 0); RUt::GetInt(_T("HIRAOKA HYPERS TOOLS, Inc."), _T("AxTIF5"), _T("slowzoom"), reinterpret_cast<DWORD&>(m_slowzoom), 15); } CTIFFView::~CTIFFView() { } BOOL CTIFFView::PreCreateWindow(CREATESTRUCT& cs) { if (!CView::PreCreateWindow(cs)) return false; cs.style |= WS_CLIPCHILDREN | WS_CLIPSIBLINGS; cs.dwExStyle &= ~WS_EX_CLIENTEDGE; return true; } // CTIFFView 描画 inline int RUTo4(int v) { return (v + 3) & (~3); } inline BYTE Lerp255(BYTE v0, BYTE v1, int f) { if (v0 == v1 || f == 0) return v0; return v0 + (v1 - v0) / 255 * f; } typedef struct BI256 { BITMAPINFOHEADER bmiHeader; RGBQUAD bmiColors[256]; } BI256; void CTIFFView::OnDraw(CDC* pDC) { CTIFFDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); if (!pDoc) return; CxImage* p = GetCurrentPageImage(); if (p != NULL && pDC->RectVisible(m_rcPaint)) { CSize size = GetZoomedSize(); int cx = size.cx; int cy = size.cy; int xp = -m_siH.nPos; int yp = -m_siV.nPos; if (cx < m_rcPaint.Width()) { xp = (m_rcPaint.Width() - cx) / 2; } if (cy < m_rcPaint.Height()) { yp = (m_rcPaint.Height() - cy) / 2; } ASSERT(p != NULL); bool fSmallMono = p->GetBpp() == 1 && ULONG(size.cx) < p->GetWidth() && ULONG(size.cy) < p->GetHeight(); if (fSmallMono && m_slowzoom == 10) { BI256 bi; bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); bi.bmiHeader.biWidth = cx; bi.bmiHeader.biHeight = cy; bi.bmiHeader.biPlanes = 1; bi.bmiHeader.biBitCount = 8; bi.bmiHeader.biCompression = BI_RGB; bi.bmiHeader.biClrUsed = 256; bi.bmiHeader.biClrImportant = 256; RGBQUAD c0 = p->GetPaletteColor(0); RGBQUAD c1 = p->GetPaletteColor(1); for (int c = 0; c < 256; c++) { bi.bmiColors[c].rgbReserved = 0; bi.bmiColors[c].rgbRed = Lerp255(c0.rgbRed, c1.rgbRed, c); bi.bmiColors[c].rgbGreen = Lerp255(c0.rgbGreen, c1.rgbGreen, c); bi.bmiColors[c].rgbBlue = Lerp255(c0.rgbBlue, c1.rgbBlue, c); } const int ocx = p->GetWidth(); const int ocy = p->GetHeight(); CRect rcDrawBox( xp, yp, xp + cx, yp + cy ); CRect rcClip = m_rcPaint; if (pDC->IsKindOf(RUNTIME_CLASS(CPaintDC))) { CRect rcNeedPaint = STATIC_DOWNCAST(CPaintDC, pDC)->m_ps.rcPaint; if (!rcClip.IntersectRect(rcClip, &rcNeedPaint)) { rcClip.SetRectEmpty(); } } const int ox = std::max<int>(0, rcClip.left - rcDrawBox.left); const int oy = std::max<int>(0, rcClip.top - rcDrawBox.top); const int ox1 = std::min<int>(cx, ox + rcClip.Width()); const int oy1 = std::min<int>(cy, oy + rcClip.Height()); CByteArray bits; int pitchSrc = RUTo4(cx); bits.SetSize(pitchSrc * cy); CUIntArray vecx; for (int x = 0; x < cx; x++) vecx.Add(int(x / (float)cx * ocx)); vecx.Add(ocx); CUIntArray vecy; for (int y = 0; y < cy; y++) vecy.Add(int(y / (float)cy * ocy)); vecy.Add(ocy); const int basx = vecx[ox]; CUIntArray veca, vecc; veca.SetSize(cx); vecc.SetSize(cx); int cntpix = 0; for (int y = oy; y < oy1; y++) { int vy0 = vecy[y]; int vy1 = vecy[y + 1]; for (; vy0 < vy1; vy0++) { BYTE* pbSrc = p->GetBits(ocy - vy0 - 1) + (basx >> 3); BYTE b = *pbSrc; pbSrc++; BYTE rest = 8 - (basx & 7); b <<= basx & 7; for (int x = ox; x < ox1; x++) { int vx0 = vecx[x]; int vx1 = vecx[x + 1]; UINT va = 0, vc = 0; for (; vx0 < vx1; vx0++) { if (rest == 0) { b = *pbSrc; pbSrc++; rest = 8; } if (b & 128) { ++va; } ++vc; b <<= 1; --rest; cntpix++; } veca[x] = va; vecc[x] = vc; } } BYTE* pbDst = bits.GetData() + pitchSrc * (cy - y - 1) + ox; for (int x = ox; x < ox1; x++) { UINT vc = vecc[x]; if (vc == 0) vc = 1; *pbDst = veca[x] * 255 / vc; pbDst++; } } _RPT1(_CRT_WARN, "# %d \n", cntpix); int r = SetDIBitsToDevice( pDC->GetSafeHdc(), xp, yp, cx, cy, 0, 0, 0, cy, bits.GetData(), reinterpret_cast<PBITMAPINFO>(&bi), DIB_RGB_COLORS ); printf(""); } else if (fSmallMono && m_slowzoom == 20) { p->Draw(pDC->GetSafeHdc(), xp, yp, cx, cy, m_rcPaint, true); } else if (m_slowzoom == 15) { int strMode = pDC->SetStretchBltMode(HALFTONE); CPoint pt = pDC->SetBrushOrg(xp, yp); int state = pDC->SaveDC(); StretchDIBits( pDC->GetSafeHdc(), xp, yp, cx, cy, 0, 0, p->GetWidth(), p->GetHeight(), p->GetBits(), reinterpret_cast<BITMAPINFO*>(p->GetDIB()), DIB_RGB_COLORS, SRCCOPY ); pDC->IntersectClipRect(m_rcPaint); pDC->RestoreDC(state); pDC->SetBrushOrg(pt); pDC->SetStretchBltMode(strMode); } else { p->Draw(pDC->GetSafeHdc(), xp, yp, cx, cy, m_rcPaint, true); } CRect rcBox(xp, yp, xp + cx, yp + cy); if (rcBox.IntersectRect(&rcBox, m_rcPaint)) { pDC->ExcludeClipRect(rcBox); } CBrush br; br.CreateSysColorBrush(COLOR_BTNSHADOW); pDC->FillRect(m_rcPaint, &br); pDC->ExcludeClipRect(m_rcPaint); } if (pDC->RectVisible(m_rcGlass)) { CDC dc; dc.CreateCompatibleDC(pDC); CBitmap* pOrg = dc.SelectObject(&m_bmMag); pDC->BitBlt(m_rcGlass.left, m_rcGlass.top, m_rcGlass.Width(), m_rcGlass.Height(), &dc, 0, 0, SRCCOPY); if (m_toolZoom) pDC->InvertRect(m_rcGlass); dc.SelectObject(pOrg); pDC->ExcludeClipRect(m_rcGlass); } if (pDC->RectVisible(m_rcMove)) { CDC dc; dc.CreateCompatibleDC(pDC); CBitmap* pOrg = dc.SelectObject(&m_bmMove); pDC->BitBlt(m_rcMove.left, m_rcMove.top, m_rcMove.Width(), m_rcMove.Height(), &dc, 0, 0, SRCCOPY); if (!m_toolZoom) pDC->InvertRect(m_rcMove); dc.SelectObject(pOrg); pDC->ExcludeClipRect(m_rcMove); } if (pDC->RectVisible(m_rcFitWH)) { CDC dc; dc.CreateCompatibleDC(pDC); CBitmap* pOrg = dc.SelectObject(&m_bmFitWH); pDC->BitBlt(m_rcFitWH.left, m_rcFitWH.top, m_rcFitWH.Width(), m_rcFitWH.Height(), &dc, 0, 0, SRCCOPY); if (m_fit == FitWH) pDC->InvertRect(m_rcFitWH); dc.SelectObject(pOrg); pDC->ExcludeClipRect(m_rcFitWH); } if (pDC->RectVisible(m_rcFitW)) { CDC dc; dc.CreateCompatibleDC(pDC); CBitmap* pOrg = dc.SelectObject(&m_bmFitW); pDC->BitBlt(m_rcFitW.left, m_rcFitW.top, m_rcFitW.Width(), m_rcFitW.Height(), &dc, 0, 0, SRCCOPY); if (m_fit == FitW) pDC->InvertRect(m_rcFitW); dc.SelectObject(pOrg); pDC->ExcludeClipRect(m_rcFitW); } if (pDC->RectVisible(m_rcGear)) { CDC dc; dc.CreateCompatibleDC(pDC); CBitmap* pOrg = dc.SelectObject(&m_bmGear); pDC->BitBlt(m_rcGear.left, m_rcGear.top, m_rcGear.Width(), m_rcGear.Height(), &dc, 0, 0, SRCCOPY); dc.SelectObject(m_bmTrick); pDC->BitBlt(m_rcGear.left + 7 + GetTrickPos() - 7 / 2, m_rcGear.top + 7 - 12 / 2 + (cyBar - 16) / 2, 7, 12, &dc, 0, 0, SRCCOPY); dc.SelectObject(pOrg); pDC->ExcludeClipRect(m_rcGear); } if (pDC->RectVisible(m_rcFirst)) { CDC dc; dc.CreateCompatibleDC(pDC); CBitmap* pOrg = dc.SelectObject(&m_bmFirst); pDC->BitBlt(m_rcFirst.left, m_rcFirst.top, m_rcFirst.Width(), m_rcFirst.Height(), &dc, 0, 0, SRCCOPY); dc.SelectObject(pOrg); pDC->ExcludeClipRect(m_rcFirst); } if (pDC->RectVisible(m_rcPrev)) { CDC dc; dc.CreateCompatibleDC(pDC); CBitmap* pOrg = dc.SelectObject(&m_bmPrev); pDC->BitBlt(m_rcPrev.left, m_rcPrev.top, m_rcPrev.Width(), m_rcPrev.Height(), &dc, 0, 0, SRCCOPY); dc.SelectObject(pOrg); pDC->ExcludeClipRect(m_rcPrev); } if (pDC->RectVisible(m_rcNext)) { CDC dc; dc.CreateCompatibleDC(pDC); CBitmap* pOrg = dc.SelectObject(&m_bmNext); pDC->BitBlt(m_rcNext.left, m_rcNext.top, m_rcNext.Width(), m_rcNext.Height(), &dc, 0, 0, SRCCOPY); dc.SelectObject(pOrg); pDC->ExcludeClipRect(m_rcNext); } if (pDC->RectVisible(m_rcLast)) { CDC dc; dc.CreateCompatibleDC(pDC); CBitmap* pOrg = dc.SelectObject(&m_bmLast); pDC->BitBlt(m_rcLast.left, m_rcLast.top, m_rcLast.Width(), m_rcLast.Height(), &dc, 0, 0, SRCCOPY); dc.SelectObject(pOrg); pDC->ExcludeClipRect(m_rcLast); } if (pDC->RectVisible(m_rcRotl)) { CDC dc; dc.CreateCompatibleDC(pDC); CBitmap* pOrg = dc.SelectObject(&m_bmRotl); pDC->BitBlt(m_rcRotl.left, m_rcRotl.top, m_rcRotl.Width(), m_rcRotl.Height(), &dc, 0, 0, SRCCOPY); dc.SelectObject(pOrg); pDC->ExcludeClipRect(m_rcRotl); } if (pDC->RectVisible(m_rcRotr)) { CDC dc; dc.CreateCompatibleDC(pDC); CBitmap* pOrg = dc.SelectObject(&m_bmRotr); pDC->BitBlt(m_rcRotr.left, m_rcRotr.top, m_rcRotr.Width(), m_rcRotr.Height(), &dc, 0, 0, SRCCOPY); dc.SelectObject(pOrg); pDC->ExcludeClipRect(m_rcRotr); } if (pDC->RectVisible(m_rcDisp)) { pDC->SelectStockObject(DEFAULT_GUI_FONT); CString str; //str.Format(_T("%u"), 1+m_iPage); if (m_iPage < CntPages()) str.Format(_T("%u/%u"), 1 + m_iPage, CntPages()); COLORREF lastBkClr = pDC->SetBkColor(GetSysColor(COLOR_WINDOW)); UINT lastMode = pDC->SetTextAlign(TA_CENTER | TA_TOP); CSize size = pDC->GetTextExtent(str); CPoint pt = m_rcDisp.CenterPoint() - CPoint(0, size.cy / 2); pDC->ExtTextOut(pt.x, pt.y, ETO_CLIPPED | ETO_OPAQUE, m_rcDisp, str, str.GetLength(), NULL); pDC->SetTextAlign(lastMode); pDC->SetBkColor(lastBkClr); pDC->ExcludeClipRect(m_rcDisp); } if (pDC->RectVisible(m_rcPrt)) { CDC dc; dc.CreateCompatibleDC(pDC); CBitmap* pOrg = dc.SelectObject(&m_bmPrt); pDC->BitBlt(m_rcPrt.left, m_rcPrt.top, m_rcPrt.Width(), m_rcPrt.Height(), &dc, 0, 0, SRCCOPY); dc.SelectObject(pOrg); pDC->ExcludeClipRect(m_rcPrt); } if (pDC->RectVisible(m_rcAbout)) { CDC dc; dc.CreateCompatibleDC(pDC); CBitmap* pOrg = dc.SelectObject(&m_bmAbout); pDC->BitBlt(m_rcAbout.left, m_rcAbout.top, m_rcAbout.Width(), m_rcAbout.Height(), &dc, 0, 0, SRCCOPY); dc.SelectObject(pOrg); pDC->ExcludeClipRect(m_rcAbout); } if (pDC->RectVisible(m_rcMMSel)) { CDC dc; dc.CreateCompatibleDC(pDC); CBitmap* pOrg = dc.SelectObject(m_toolZoom ? &m_bmMagBtn : &m_bmMoveBtn); pDC->BitBlt(m_rcMMSel.left, m_rcMMSel.top, m_rcMMSel.Width(), m_rcMMSel.Height(), &dc, 0, 0, SRCCOPY); dc.SelectObject(pOrg); pDC->ExcludeClipRect(m_rcMMSel); } if (pDC->RectVisible(m_rcZoomVal)) { CDC dc; dc.CreateCompatibleDC(pDC); CBitmap* pOrg = dc.SelectObject(&m_bmZoomVal); pDC->BitBlt(m_rcZoomVal.left, m_rcZoomVal.top, m_rcZoomVal.Width(), m_rcZoomVal.Height(), &dc, 0, 0, SRCCOPY); dc.SelectObject(pOrg); pDC->SelectStockObject(DEFAULT_GUI_FONT); CString str; str.Format(_T("%u %%"), (int)(100 * Getzf())); //COLORREF lastBkClr = pDC->SetBkColor(GetSysColor(COLOR_WINDOW)); UINT lastMode = pDC->SetTextAlign(TA_CENTER | TA_TOP); COLORREF lastTextClr = pDC->SetTextColor(RGB(0, 0, 0)); CSize size = pDC->GetTextExtent(str); CPoint pt = m_rcZoomVal.CenterPoint() - CPoint(0, size.cy / 2); pDC->ExtTextOut(pt.x, pt.y, ETO_CLIPPED, m_rcZoomVal, str, str.GetLength(), NULL); pDC->SetTextColor(lastTextClr); pDC->SetTextAlign(lastMode); //pDC->SetBkColor(lastBkClr); pDC->ExcludeClipRect(m_rcZoomVal); } { CBrush br; br.CreateSysColorBrush(COLOR_WINDOW); CRect rc; GetClientRect(rc); //pDC->GetClipBox(rc); pDC->FillRect(rc, &br); } } CxImage* CTIFFView::GetCurrentPageImage() { if (m_currentPage == NULL || m_currentPage->pageIndex != m_iPage) { m_currentPage.reset(new CurrentPage()); m_currentPage->pageIndex = m_iPage; CTIFFDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); if (pDoc != NULL && pDoc->m_tiff.get() != NULL && pDoc->m_tiff->NumPages() >= 1) { m_currentPage->image = pDoc->m_tiff->ExtractImage(m_currentPage->pageIndex); } } return m_currentPage->image.get(); } CxImage* CTIFFView::GetPrintImage(int frame) { CTIFFDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); if (pDoc != NULL && pDoc->m_tiff.get() != NULL) { m_printImage = pDoc->m_tiff->ExtractImage(frame); } return m_printImage.get(); } // OLE Server サポート // 以下に示すコマンド ハンドラは組み込み先編集を中止するための標準的な // キーボード ユーザー インターフェイスを用意しています。ここではコンテナ // (サーバーではない)が非アクティブ化を引き起こします。 // CTIFFView 診断 #ifdef _DEBUG void CTIFFView::AssertValid() const { CView::AssertValid(); } void CTIFFView::Dump(CDumpContext& dc) const { CView::Dump(dc); } CTIFFDoc* CTIFFView::GetDocument() const // デバッグ以外のバージョンはインラインです。 { ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTIFFDoc))); return (CTIFFDoc*)m_pDocument; } #endif //_DEBUG // CTIFFView メッセージ ハンドラ int CTIFFView::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CView::OnCreate(lpCreateStruct) == -1) return -1; if (false || !m_sbH.Create(WS_CHILDWINDOW | WS_VISIBLE | SBS_HORZ | SBS_BOTTOMALIGN, CRect(), this, IDC_HORZ) || !m_sbV.Create(WS_CHILDWINDOW | WS_VISIBLE | SBS_VERT | SBS_RIGHTALIGN, CRect(), this, IDC_VERT)) return -1; if (false || !m_bmMag.LoadBitmap(IDB_MAG) || !m_bmMove.LoadBitmap(IDB_MOVE) || !m_bmGear.LoadBitmap(IDB_GEAR) || !m_bmTrick.LoadBitmap(IDB_TRICK) || !m_bmFirst.LoadBitmap(IDB_FIRST) || !m_bmPrev.LoadBitmap(IDB_PREV) || !m_bmNext.LoadBitmap(IDB_NEXT) || !m_bmLast.LoadBitmap(IDB_LAST) || !m_bmPrt.LoadBitmap(IDB_PRT) || !m_bmAbout.LoadBitmap(IDB_ABOUT) || !m_bmFitWH.LoadBitmap(IDB_FITWH) || !m_bmFitW.LoadBitmap(IDB_FITW) || !m_bmMagBtn.LoadBitmap(IDB_MAGBTN) || !m_bmMoveBtn.LoadBitmap(IDB_MOVEBTN) || !m_bmZoomVal.LoadBitmap(IDB_ZOOMVAL) || !m_bmRotl.LoadBitmap(IDB_ROTL) || !m_bmRotr.LoadBitmap(IDB_ROTR) ) return -1; m_fZoom = 1; ZeroMemory(&m_siH, sizeof(m_siH)); m_siH.cbSize = sizeof(m_siH); ZeroMemory(&m_siV, sizeof(m_siV)); m_siV.cbSize = sizeof(m_siV); m_toolZoom = true; m_fDrag = false; m_iPage = 0; m_fit = FitWH; m_ptClip = CPoint(0, 0); LayoutClient(); return 0; } void CTIFFView::OnSize(UINT nType, int cx, int cy) { CView::OnSize(nType, cx, cy); DoFit(); LayoutClient(); } void CTIFFView::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) { if (pScrollBar == &m_sbH) { int oldpos = m_sbH.GetScrollPos(); int newpos = oldpos; switch (nSBCode) { case SB_LEFT: newpos = m_siH.nMin; break; case SB_LINELEFT: newpos--; break; case SB_LINERIGHT: newpos++; break; case SB_PAGELEFT: newpos -= m_siH.nPage; break; case SB_PAGERIGHT: newpos += m_siH.nPage; break; case SB_RIGHT: newpos = m_siH.nMax; break; case SB_THUMBPOSITION: newpos = nPos; break; case SB_THUMBTRACK: newpos = nPos; break; } newpos = Newxp(newpos); if (oldpos != newpos) { m_siH.nPos = newpos; m_sbH.SetScrollPos(newpos); this->ScrollWindowEx(-(newpos - oldpos), 0, m_rcPaint, m_rcPaint, NULL, NULL, SW_INVALIDATE); return; } return; } CView::OnHScroll(nSBCode, nPos, pScrollBar); } void CTIFFView::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) { if (pScrollBar == &m_sbV) { int oldpos = m_sbV.GetScrollPos(); int newpos = oldpos; switch (nSBCode) { case SB_TOP: newpos = m_siV.nMin; break; case SB_LINEUP: newpos--; break; case SB_LINEDOWN: newpos++; break; case SB_PAGEUP: newpos -= m_siV.nPage; break; case SB_PAGEDOWN: newpos += m_siV.nPage; break; case SB_BOTTOM: newpos = m_siV.nMax; break; case SB_THUMBPOSITION: newpos = nPos; break; case SB_THUMBTRACK: newpos = nPos; break; } newpos = Newyp(newpos); if (oldpos != newpos) { m_siV.nPos = newpos; m_sbV.SetScrollPos(newpos); this->ScrollWindowEx(0, -(newpos - oldpos), m_rcPaint, m_rcPaint, NULL, NULL, SW_INVALIDATE); return; } return; } CView::OnVScroll(nSBCode, nPos, pScrollBar); } void CTIFFView::OnRButtonDown(UINT nFlags, CPoint point) { if (GetFocus() == this) { if (m_toolZoom && m_rcPaint.PtInRect(point)) { bool fControl = 0 != (MK_CONTROL & nFlags); if (fControl) { SetFit(FitWH); DoFit(); LayoutClient(); InvalidateRect(m_rcPaint, false); } else { Zoomat(false, point); } return; } } CView::OnRButtonDown(nFlags, point); } #define SW2(val, A, B) ((val == (A)) ? (B) : (A)) void CTIFFView::OnLButtonDown(UINT nFlags, CPoint point) { if (GetFocus() == this) { if (m_rcGlass.PtInRect(point)) { m_toolZoom = true; InvalidateRect(m_rcGlass, false); InvalidateRect(m_rcMove, false); } else if (m_rcMove.PtInRect(point)) { m_toolZoom = false; InvalidateRect(m_rcGlass, false); InvalidateRect(m_rcMove, false); } else if (m_rcFitWH.PtInRect(point)) { SetFit(SW2(m_fit, FitWH, FitNo)); DoFit(); LayoutClient(); InvalidateRect(m_rcPaint, false); } else if (m_rcFitW.PtInRect(point)) { SetFit(SW2(m_fit, FitW, FitNo)); DoFit(); LayoutClient(); InvalidateRect(m_rcPaint, false); } else if (m_toolZoom && m_rcPaint.PtInRect(point)) { bool fControl = 0 != (MK_CONTROL & nFlags); bool fShift = 0 != (MK_SHIFT & nFlags); if (fControl) { Zoomat2(point); } else { Zoomat(fShift ? false : true, point); } } else if (m_rcGearOn.PtInRect(point)) { int x = point.x - m_rcGearOn.left; SetzoomR(tp2z(x)); } else if (!m_toolZoom && m_rcPaint.PtInRect(point)) { m_ptBegin = point; m_ptScrollFrm = CPoint(m_siH.nPos, m_siV.nPos); m_fDrag = true; SetCapture(); } else if (m_rcFirst.PtInRect(point)) { if (m_iPage > 0) { m_iPage = 0; CWaitCursor wc; LayoutClient(); InvalidateRect(m_rcPaint, false); InvalidateRect(m_rcDisp, false); } } else if (m_rcPrev.PtInRect(point)) { if (m_iPage > 0) { m_iPage--; CWaitCursor wc; LayoutClient(); InvalidateRect(m_rcPaint, false); InvalidateRect(m_rcDisp, false); } } else if (m_rcNext.PtInRect(point)) { if (m_iPage + 1 < CntPages()) { m_iPage++; CWaitCursor wc; LayoutClient(); InvalidateRect(m_rcPaint, false); InvalidateRect(m_rcDisp, false); } } else if (m_rcLast.PtInRect(point)) { if (m_iPage + 1 < CntPages()) { m_iPage = CntPages() - 1; CWaitCursor wc; LayoutClient(); InvalidateRect(m_rcPaint, false); InvalidateRect(m_rcDisp, false); } } else if (m_rcRotl.PtInRect(point)) { RotPic(-1); } else if (m_rcRotr.PtInRect(point)) { RotPic(1); } else if (m_rcAbout.PtInRect(point)) { AfxGetApp()->OnCmdMsg(ID_APP_ABOUT, 0, NULL, NULL); } else if (m_rcPrt.PtInRect(point)) { OnFilePrint(); } else if (m_rcMMSel.PtInRect(point)) { CMenu aSel; aSel.CreatePopupMenu(); aSel.AppendMenu(MF_BITMAP, IDC_MAG, &m_bmMag); aSel.AppendMenu(MF_BITMAP, IDC_MOVE, &m_bmMove); CPoint ptMenu = m_rcMMSel.TopLeft(); ClientToScreen(&ptMenu); aSel.TrackPopupMenu(TPM_LEFTALIGN, ptMenu.x, ptMenu.y, GetParentFrame()); } else if (m_rcZoomVal.PtInRect(point)) { CMenu aSel; aSel.LoadMenu(IDR_MENU_P); CMenu* pMenu = aSel.GetSubMenu(0); CPoint ptMenu = m_rcZoomVal.TopLeft(); ClientToScreen(&ptMenu); if (pMenu != NULL) pMenu->TrackPopupMenu(TPM_LEFTALIGN, ptMenu.x, ptMenu.y, GetParentFrame()); } } CView::OnLButtonDown(nFlags, point); } void CTIFFView::SetzoomR(float zf) { CPoint posat = GetAbsPosAt(m_rcPaint.CenterPoint() + GetScrollOff()); Setzf(zf); LayoutClient(); SetCenterAt(posat, m_rcPaint.CenterPoint()); InvalidateRect(m_rcPaint, false); } void CTIFFView::Zoomat(bool fIn, CPoint mouseat) { float zf = Getzf(); ZoomatR(fIn ? zf * 2 : zf / 2, mouseat); } void CTIFFView::ZoomatR(float zf, CPoint mouseat) { CPoint clientpt = mouseat; CPoint dispat = GetZoomedDispRect().TopLeft(); CPoint posat = GetAbsPosAt(clientpt - dispat); Setzf(max(0.0625f, min(16.0f, zf))); LayoutClient(); SetCenterAt(posat, clientpt); InvalidateRect(m_rcPaint, false); } void CTIFFView::Zoomat2(CPoint mouseat) { CPoint clientpt = mouseat; CRect rcDisp = GetZoomedDispRect(); CPoint dispat = rcDisp.TopLeft(); CSize dispSize = rcDisp.Size(); CPoint posat = GetAbsPosAt(clientpt - dispat); float curzf = Getzf(); float fxl = (curzf * float(clientpt.x) / std::max<int>(clientpt.x - dispat.x, 1)); float fxr = (curzf * float(m_rcPaint.Width() - clientpt.x) / std::max<int>(m_rcPaint.Width() - clientpt.x - dispat.x, 1)); float fyt = (curzf * float(clientpt.y) / std::max<int>(clientpt.y - dispat.y, 1)); float fyb = (curzf * float(m_rcPaint.Height() - clientpt.y) / std::max<int>(m_rcPaint.Height() - clientpt.y - dispat.y, 1)); float zf = curzf; zf = max(zf, fxl); zf = max(zf, fxr); zf = max(zf, fyt); zf = max(zf, fyb); if (fabs(zf - curzf) < 0.001f) { zf *= 1.5f; } Setzf(max(0.0625f, min(16.0f, zf))); LayoutClient(); SetCenterAt(posat, clientpt); InvalidateRect(m_rcPaint, false); } void CTIFFView::LayoutClient() { CRect rcH; m_sbH.GetWindowRect(rcH); CRect rcV; m_sbV.GetWindowRect(rcV); { m_rcGlass = m_rcMove = m_rcFitW = m_rcFitWH = m_rcGear = m_rcGearOn = m_rcFirst = m_rcPrev = m_rcNext = m_rcLast = m_rcDisp = m_rcAbout = m_rcPrt = m_rcMMSel = m_rcZoomVal = m_rcRotl = m_rcRotr = CRect(); } CRect rc; GetClientRect(&rc); rc.OffsetRect(m_ptClip); int curx = 0; if (m_ddcompat == 0) { m_rcGlass.left = 0; m_rcGlass.bottom = rc.bottom; m_rcGlass.right = (curx += 24); m_rcGlass.top = m_rcGlass.bottom - cyBar; m_rcMove.left = curx; m_rcMove.bottom = rc.bottom; m_rcMove.right = (curx += 24); m_rcMove.top = m_rcMove.bottom - cyBar; m_rcFitW.left = curx; m_rcFitW.bottom = rc.bottom; m_rcFitW.right = (curx += 24); m_rcFitW.top = m_rcFitW.bottom - cyBar; m_rcFitWH.left = curx; m_rcFitWH.bottom = rc.bottom; m_rcFitWH.right = (curx += 24); m_rcFitWH.top = m_rcFitWH.bottom - cyBar; m_rcGear.left = curx; m_rcGear.bottom = rc.bottom; m_rcGear.right = (curx += cxBMGear); m_rcGear.top = m_rcGear.bottom - cyBar; m_rcGearOn = m_rcGear; m_rcGearOn.left += 7; m_rcGearOn.right -= 7; curx += 8; m_rcFirst.left = curx; m_rcFirst.bottom = rc.bottom; m_rcFirst.right = curx = (curx += cxBMFirst); m_rcFirst.top = rc.bottom - cyBar; m_rcPrev.left = curx; m_rcPrev.bottom = rc.bottom; m_rcPrev.right = curx = (curx += cxBMPrev); m_rcPrev.top = rc.bottom - cyBar; m_rcNext.left = curx; m_rcNext.bottom = rc.bottom; m_rcNext.right = curx = (curx += cxBMNext); m_rcNext.top = rc.bottom - cyBar; m_rcLast.left = curx; m_rcLast.bottom = rc.bottom; m_rcLast.right = curx = (curx += cxBMLast); m_rcLast.top = rc.bottom - cyBar; m_rcDisp.left = curx; m_rcDisp.bottom = rc.bottom; m_rcDisp.right = curx = (curx += 50); m_rcDisp.top = rc.bottom - cyBar; #if ENABLE_PRINT m_rcPrt.left = curx; m_rcPrt.bottom = rc.bottom; m_rcPrt.right = (curx += 24); m_rcPrt.top = rc.bottom - cyBar; #endif m_rcAbout.left = curx; m_rcAbout.bottom = rc.bottom; m_rcAbout.right = (curx += 24); m_rcAbout.top = rc.bottom - cyBar; } else { m_rcMMSel.left = curx; m_rcMMSel.bottom = rc.bottom; m_rcMMSel.right = (curx += 24); m_rcMMSel.top = rc.bottom - cyBar; m_rcZoomVal.left = curx; m_rcZoomVal.bottom = rc.bottom; m_rcZoomVal.right = (curx += 48); m_rcZoomVal.top = rc.bottom - cyBar; curx += 8; m_rcFirst.left = curx; m_rcFirst.bottom = rc.bottom; m_rcFirst.right = curx = (curx += cxBMFirst); m_rcFirst.top = rc.bottom - cyBar; m_rcPrev.left = curx; m_rcPrev.bottom = rc.bottom; m_rcPrev.right = curx = (curx += cxBMPrev); m_rcPrev.top = rc.bottom - cyBar; m_rcDisp.left = curx; m_rcDisp.bottom = rc.bottom; m_rcDisp.right = curx = (curx += 50); m_rcDisp.top = rc.bottom - cyBar; m_rcNext.left = curx; m_rcNext.bottom = rc.bottom; m_rcNext.right = curx = (curx += cxBMNext); m_rcNext.top = rc.bottom - cyBar; m_rcLast.left = curx; m_rcLast.bottom = rc.bottom; m_rcLast.right = curx = (curx += cxBMLast); m_rcLast.top = rc.bottom - cyBar; curx += 8; m_rcRotl.left = curx; m_rcRotl.bottom = rc.bottom; m_rcRotl.right = curx = (curx += 32); m_rcRotl.top = rc.bottom - cyBar; m_rcRotr.left = curx; m_rcRotr.bottom = rc.bottom; m_rcRotr.right = curx = (curx += 32); m_rcRotr.top = rc.bottom - cyBar; curx += 8; #if ENABLE_PRINT m_rcPrt.left = curx; m_rcPrt.bottom = rc.bottom; m_rcPrt.right = (curx += 24); m_rcPrt.top = rc.bottom - cyBar; #endif m_rcAbout.left = curx; m_rcAbout.bottom = rc.bottom; m_rcAbout.right = (curx += 24); m_rcAbout.top = rc.bottom - cyBar; } rc.bottom -= cyBar; m_sbH.MoveWindow(rc.left, rc.bottom - rcH.Height(), rc.right - rc.left - rcV.Width(), rcH.Height()); m_sbV.MoveWindow(rc.right - rc.left - rcV.Width(), rc.top, rcV.Width(), rc.bottom - rc.top - rcH.Height()); rc.right -= rcV.Width(); rc.bottom -= rcH.Height(); m_rcPaint = rc; CSize size = GetZoomedSize(); int cxpic = std::max<int>(1, (int)(size.cx)); int cypic = std::max<int>(1, (int)(size.cy)); m_siH.fMask = SIF_PAGE | SIF_RANGE | SIF_DISABLENOSCROLL | SIF_POS; m_siH.nMin = 0; m_siH.nMax = cxpic - 1; m_siH.nPage = m_rcPaint.Width(); m_siH.nPos = Newxp(m_siH.nPos); m_sbH.SetScrollInfo(&m_siH); m_sbH.EnableScrollBar((m_siH.nMax <= (int)m_siH.nPage) ? ESB_DISABLE_BOTH : 0); m_siV.fMask = SIF_PAGE | SIF_RANGE | SIF_DISABLENOSCROLL | SIF_POS; m_siV.nMin = 0; m_siV.nMax = cypic - 1; m_siV.nPage = m_rcPaint.Height(); m_siV.nPos = Newyp(m_siV.nPos); m_sbV.SetScrollInfo(&m_siV); m_sbV.EnableScrollBar((m_siV.nMax <= (int)m_siV.nPage) ? ESB_DISABLE_BOTH : 0); } void CTIFFView::OnLButtonDblClk(UINT nFlags, CPoint point) { CTIFFView::OnLButtonDown(nFlags, point); // // CView::OnLButtonDblClk(nFlags, point); } void CTIFFView::OnRButtonDblClk(UINT nFlags, CPoint point) { CTIFFView::OnRButtonDown(nFlags, point); // // CView::OnRButtonDblClk(nFlags, point); } CPoint CTIFFView::GetCenterPos() { CPoint pt = m_rcPaint.CenterPoint(); float zf = Getzf(); return CPoint( (int)(pt.x / zf), (int)(pt.y / zf) ); } CPoint CTIFFView::GetAbsPosAt(CPoint pt) { float zf = Getzf(); return CPoint( (int)(pt.x / zf), (int)(pt.y / zf) ); } void CTIFFView::SetCenterAt(CPoint pt, CPoint clientpt) { float zf = Getzf(); { int xp = Newxp((int)(pt.x * zf - m_rcPaint.Width() / 2 + (m_rcPaint.Width() / 2 - clientpt.x))); if (xp != m_siH.nPos) m_sbH.SetScrollPos(m_siH.nPos = xp); } { int yp = Newyp((int)(pt.y * zf - m_rcPaint.Height() / 2 + (m_rcPaint.Height() / 2 - clientpt.y))); if (yp != m_siV.nPos) m_sbV.SetScrollPos(m_siV.nPos = yp); } } void CTIFFView::OnLButtonUp(UINT nFlags, CPoint point) { if (m_fDrag) { m_fDrag = false; if (GetCapture() == this) ReleaseCapture(); } CView::OnLButtonUp(nFlags, point); } void CTIFFView::OnMouseMove(UINT nFlags, CPoint point) { if (m_fDrag && 0 != (nFlags & MK_LBUTTON) && GetCapture() == this) { CPoint pt = m_ptScrollFrm + m_ptBegin - point; bool moved = false; int xp = Newxp(pt.x); if (xp != m_siH.nPos) m_sbH.SetScrollPos(m_siH.nPos = xp), moved = true; int yp = Newyp(pt.y); if (yp != m_siV.nPos) m_sbV.SetScrollPos(m_siV.nPos = yp), moved = true; if (moved) InvalidateRect(m_rcPaint, false); } CView::OnMouseMove(nFlags, point); } int CTIFFView::CntPages() { if (GetDocument() != NULL && GetDocument()->m_tiff.get() != NULL) { return static_cast<int>(GetDocument()->m_tiff->NumPages()); } return 0; } BOOL CTIFFView::OnEraseBkgnd(CDC* pDC) { return 1; // return CView::OnEraseBkgnd(pDC); } BOOL CTIFFView::OnMouseWheel(UINT nFlags, short zDelta, CPoint pt) { { int oldpos = m_sbV.GetScrollPos(); int newpos = oldpos; newpos = Newyp(newpos - zDelta); if (oldpos != newpos) { m_siV.nPos = newpos; m_sbV.SetScrollPos(newpos); this->InvalidateRect(m_rcPaint, false); return true; } } return CView::OnMouseWheel(nFlags, zDelta, pt); } // http://msdn.microsoft.com/en-us/library/ms645614(VS.85).aspx LRESULT CTIFFView::OnMouseHWheel(WPARAM wp, LPARAM) { short zDelta = HIWORD(wp); { int oldpos = m_sbH.GetScrollPos(); int newpos = oldpos; newpos = Newxp(newpos + zDelta); if (oldpos != newpos) { m_siH.nPos = newpos; m_sbH.SetScrollPos(newpos); this->InvalidateRect(m_rcPaint, false); return 1; } } return 0; } int CTIFFView::OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message) { return CView::OnMouseActivate(pDesktopWnd, nHitTest, message); } CSize CTIFFView::GetZoomedSize() { CxImage* p = GetCurrentPageImage(); if (p != NULL) { CSize size = CSize(p->GetWidth(), p->GetHeight()); int rx = p->GetXDPI(); int ry = p->GetYDPI(); if (rx == ry || rx < 1 || ry < 1) { } else if (rx > ry) { size.cx = int(size.cx * (float(ry) / rx)); //size.cy = int(size.cy * (float(rx) / ry)); } else { size.cy = int(size.cy * (float(rx) / ry)); //size.cx = int(size.cx * (float(ry) / rx)); } switch (m_fit) { case FitNo: return CSize((int)(size.cx * m_fZoom), (int)(size.cy * m_fZoom)); case FitW: if (m_rcPaint.Width() < size.cx) { return CSize( m_rcPaint.Width(), (size.cx != 0) ? (int)(size.cy * (m_rcPaint.Width() / (float)size.cx)) : 0 ); } return size; case FitWH: if (m_rcPaint.Width() < size.cx || m_rcPaint.Height() < size.cy) { return Fitrect::Fit(m_rcPaint, size).Size(); } return size; } } return CSize(0, 0); } float CTIFFView::Getzf() { CxImage* p = GetCurrentPageImage(); if (p != NULL) { CSize size = CSize(p->GetWidth(), p->GetHeight()); switch (m_fit) { default: case FitNo: return m_fZoom; case FitW: if (m_rcPaint.Width() < size.cx) { return (size.cx != 0) ? (m_rcPaint.Width() / (float)size.cx) : 1 ; } return 1; case FitWH: if (m_rcPaint.Width() < size.cx || m_rcPaint.Height() < size.cy) { CSize newSize = Fitrect::Fit(m_rcPaint, size).Size(); float fx = (size.cx != 0) ? ((float)newSize.cx / size.cx) : 0; float fy = (size.cy != 0) ? ((float)newSize.cy / size.cy) : 0; if (fx != 0) return fx; if (fy != 0) return fy; return 1; } return 1; } } return 1; } void CTIFFView::PostNcDestroy() { m_printState.reset(nullptr); if (m_fAllowSelfDelete) { CView::PostNcDestroy(); } return; } BOOL CTIFFView::OnSelCmd(UINT nID) { switch (nID) { case IDC_MAG: m_toolZoom = true; break; case IDC_MOVE: m_toolZoom = false; break; case IDC_P6: SetzoomR(0.06f); return true; case IDC_P12: SetzoomR(0.12f); return true; case IDC_P25: SetzoomR(0.25f); return true; case IDC_P50: SetzoomR(0.5f); return true; case IDC_P100: SetzoomR(1); return true; case IDC_P200: SetzoomR(2); return true; case IDC_P400: SetzoomR(4); return true; case IDC_P800: SetzoomR(8); return true; case IDC_P1600: SetzoomR(16); return true; default: return false; } InvalidateRect(m_rcMMSel, false); return true; } void CTIFFView::OnUpdateSelCmd(CCmdUI* pUI) { switch (pUI->m_nID) { case IDC_MAG: pUI->SetCheck(m_toolZoom); break; case IDC_MOVE: pUI->SetCheck(!m_toolZoom); break; } } void CTIFFView::OnUpdate(CView* /*pSender*/, LPARAM lHint, CObject* /*pHint*/) { switch (lHint) { case UPHINT_LOADED: m_currentPage.reset(); LayoutClient(); break; } } void CTIFFView::RotPic(int a) { CxImage* p = GetCurrentPageImage(); if (p != NULL) { int n = 0; while (a < 0) { p->RotateLeft(); a++; n++; } while (a > 0) { p->RotateRight(); a--; n++; } if (n & 1) { long x = p->GetXDPI(); long y = p->GetYDPI(); p->SetXDPI(y); p->SetYDPI(x); } SetFit(FitWH); DoFit(); LayoutClient(); InvalidateRect(m_rcPaint, false); } } class CPrintOptsPage : public CPropertyPage, public PrintOpts { DECLARE_DYNAMIC(CPrintOptsPage); DECLARE_MESSAGE_MAP(); public: enum { IDD = IDD_PRINT_OPTS }; CPrintOptsPage() : CPropertyPage(IDD, IDS_AXTIF5_PRINT_PROP_CAPTION) { } virtual BOOL OnInitDialog() { __super::OnInitDialog(); UpdateData(false); return true; } void DoDataExchange(CDataExchange* pDX) { __super::DoDataExchange(pDX); DDX_Check(pDX, IDC_CENTERING, m_bCentering); DDX_Check(pDX, IDC_IGNORE_MARGIN, m_bIgnoreMargin); DDX_Check(pDX, IDC_AUTO_PAPERSIZE, m_bAutoPaperSize); } }; BEGIN_MESSAGE_MAP(CPrintOptsPage, CPropertyPage) END_MESSAGE_MAP() IMPLEMENT_DYNAMIC(CPrintOptsPage, CPropertyPage); void CTIFFView::OnFilePrint() { CPrintDialogEx dlg( PD_ALLPAGES | PD_PAGENUMS | PD_USEDEVMODECOPIES | PD_HIDEPRINTTOFILE | PD_NOSELECTION, this ); CPrintOptsPage page; page.LoadFromReg(); HPROPSHEETPAGE hPage = CreatePropertySheetPage(&page.GetPSP()); PRINTPAGERANGE ranges[13] = { 0 }; ranges[0].nFromPage = dlg.m_pdex.nMinPage = 1; ranges[0].nToPage = dlg.m_pdex.nMaxPage = CntPages(); dlg.m_pdex.lpPageRanges = ranges; dlg.m_pdex.nPageRanges = 1; dlg.m_pdex.nMaxPageRanges = 13; dlg.m_pdex.nPropertyPages = 1; dlg.m_pdex.lphPropertyPages = &hPage; int result = dlg.DoModal(); if (result != S_OK) { return; } if (dlg.m_pdex.dwResultAction == PD_RESULT_CANCEL) { return; } page.SaveToReg(); if (dlg.m_pdex.dwResultAction != PD_RESULT_PRINT) { return; } m_printState.reset(new CTIFFView::PrintState()); DEVMODE* devmode = dlg.GetDevMode(); m_printState.get()->devmode.SetSize(devmode->dmSize + devmode->dmDriverExtra); memcpy(m_printState.get()->devmode.GetData(), devmode, m_printState.get()->devmode.GetSize()); auto& targetPages = m_printState.get()->targetPages; if (dlg.m_pdex.Flags & PD_CURRENTPAGE) { targetPages.AddPages(1 + m_iPage, 1 + m_iPage); } else if (dlg.m_pdex.Flags & PD_PAGENUMS) { targetPages.AddRanges(ranges, dlg.m_pdex.nPageRanges); } else { targetPages.AddPages(dlg.m_pdex.nMinPage, dlg.m_pdex.nMaxPage); } m_printState.get()->opts = page; CDC& printer = m_printState.get()->printer; printer.m_bPrinting = true; printer.Attach(dlg.CreatePrinterDC()); SetTimer(1000, 100, NULL); m_dlgPrint.DoModal(); } void CTIFFView::OnTimer(UINT_PTR nIDEvent) { if (nIDEvent == 1000) { KillTimer(nIDEvent); if (m_dlgPrint.GetSafeHwnd() != NULL) { if ((bool)m_printState) { m_dlgPrint.m_strPrintPos.Format(_T("%d / %d") , (std::max)(1, m_printState.get()->getCurPage()) , 0 + m_printState.get()->getMaxPage() ); } m_dlgPrint.UpdateData(false); if (PrintNextPage()) { SetTimer(1000, 100, NULL); } else { m_dlgPrint.EndDialog(0); m_printState.reset(nullptr); } } else { m_printState.reset(nullptr); } } } bool CTIFFView::PrintNextPage() { if (!(bool)m_printState) { return false; } DOCINFO& di = m_printState.get()->di; DEVMODE* devmode = reinterpret_cast<DEVMODE*>(m_printState.get()->devmode.GetData()); PaperSizeLite& defaultPaperSize = m_printState.get()->defaultPaperSize; CDC& printer = m_printState.get()->printer; if (m_printState.get()->isFirstPage()) { ZeroMemory(&di, sizeof(di)); auto pDoc = GetDocument(); ASSERT_VALID(pDoc); CString title; if (pDoc != NULL) { title = pDoc->GetTitle(); } if (title.IsEmpty()) { title = _T("TIFF document"); } di.cbSize = sizeof(di); di.lpszDocName = title; defaultPaperSize.CopyFrom(*devmode); devmode->dmFields |= DM_PAPERSIZE | DM_ORIENTATION; m_printState.get()->printer.StartDoc(&di); m_printState.get()->startDocActive = true; } if (m_printState.get()->isPrintingDone()) { printer.EndDoc(); m_printState.get()->startDocActive = false; return false; } int iPage = m_printState.get()->getTargetPage(); CxImage* p = GetPrintImage(iPage - 1); if (p != NULL) { DWORD bmWidth = p->GetWidth(); long xDpi = p->GetXDPI(); DWORD bmHeight = p->GetHeight(); long yDpi = p->GetYDPI(); float mmWidth = bmWidth / (float)xDpi * 25.4f; float mmHeight = bmHeight / (float)yDpi * 25.4f; int dx = printer.GetDeviceCaps(LOGPIXELSX); int dy = printer.GetDeviceCaps(LOGPIXELSY); PaperSizeLite guessed; if (m_printState.get()->opts.m_bAutoPaperSize && PaperSizeUtil::Guess(mmWidth, mmHeight, guessed)) { guessed.CopyTo(*devmode); } else { defaultPaperSize.CopyTo(*devmode); devmode->dmOrientation = (mmWidth <= mmHeight) ? DMORIENT_PORTRAIT : DMORIENT_LANDSCAPE; } printer.ResetDC(devmode); printer.StartPage(); CRect rc; int ox = printer.GetDeviceCaps(PHYSICALOFFSETX); int oy = printer.GetDeviceCaps(PHYSICALOFFSETY); int cx = printer.GetDeviceCaps(PHYSICALWIDTH); int cy = printer.GetDeviceCaps(PHYSICALHEIGHT); if (!m_printState.get()->opts.m_bIgnoreMargin) { cx -= ox + ox; cy -= oy + oy; ox = 0; oy = 0; } CRect rcPaper(-ox, -oy, cx, cy); CRect rcDraw = m_printState.get()->opts.m_bCentering ? FitRect3::Fit( rcPaper, CSize( int(bmWidth / (float)xDpi * dx), int(bmHeight / (float)yDpi * dy) ), 0, 0 ) : FitRect3::Fit( rcPaper, CSize( int(bmWidth / (float)xDpi * dx), int(bmHeight / (float)yDpi * dy) ), -1, -1 ); p->Draw2(printer, rcDraw); printer.EndPage(); } m_printState.get()->moveToNextPage(); return true; }
26.17094
131
0.63606
HiraokaHyperTools
8f49e864bef6591ea7cf8e6b3ddf92d898687cce
709
cpp
C++
Problemset/repeated-substring-pattern/repeated-substring-pattern.cpp
Singularity0909/LeetCode
d46fb1c8ed9b16339d46d5c37f69d44e5c178954
[ "MIT" ]
1
2020-10-06T01:06:45.000Z
2020-10-06T01:06:45.000Z
Problemset/repeated-substring-pattern/repeated-substring-pattern.cpp
Singularity0909/LeetCode
d46fb1c8ed9b16339d46d5c37f69d44e5c178954
[ "MIT" ]
null
null
null
Problemset/repeated-substring-pattern/repeated-substring-pattern.cpp
Singularity0909/LeetCode
d46fb1c8ed9b16339d46d5c37f69d44e5c178954
[ "MIT" ]
1
2021-11-17T13:52:51.000Z
2021-11-17T13:52:51.000Z
// @Title: 重复的子字符串 (Repeated Substring Pattern) // @Author: Singularity0909 // @Date: 2020-08-24 22:22:32 // @Runtime: 28 ms // @Memory: 12.3 MB class Solution { public: bool kmp(const string& pattern) { int n = pattern.size(); vector<int> fail(n, -1); for (int i = 1; i < n; ++i) { int j = fail[i - 1]; while (j != -1 && pattern[j + 1] != pattern[i]) { j = fail[j]; } if (pattern[j + 1] == pattern[i]) { fail[i] = j + 1; } } return fail[n - 1] != -1 && n % (n - fail[n - 1] - 1) == 0; } bool repeatedSubstringPattern(string s) { return kmp(s); } };
24.448276
67
0.445698
Singularity0909
8f5501733da2f19eaebc90e04146300d5dc5aa54
6,762
cpp
C++
libs/graphslam/src/CGraphSlamHandler.cpp
yhexie/mrpt
0bece2883aa51ad3dc88cb8bb84df571034ed261
[ "OLDAP-2.3" ]
null
null
null
libs/graphslam/src/CGraphSlamHandler.cpp
yhexie/mrpt
0bece2883aa51ad3dc88cb8bb84df571034ed261
[ "OLDAP-2.3" ]
null
null
null
libs/graphslam/src/CGraphSlamHandler.cpp
yhexie/mrpt
0bece2883aa51ad3dc88cb8bb84df571034ed261
[ "OLDAP-2.3" ]
1
2021-08-16T11:50:47.000Z
2021-08-16T11:50:47.000Z
/* +---------------------------------------------------------------------------+ | Mobile Robot Programming Toolkit (MRPT) | | http://www.mrpt.org/ | | | | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file | | See: http://www.mrpt.org/Authors - All rights reserved. | | Released under BSD License. See details in http://www.mrpt.org/License | +---------------------------------------------------------------------------+ */ // Implementation file for CGraphSlamHandler class #include "graphslam-precomp.h" #include <mrpt/graphslam/apps_related/CGraphSlamHandler.h> CGraphSlamHandler::CGraphSlamHandler() { using namespace mrpt::system; this->logger = NULL; win_manager = NULL; win_observer = NULL; win = NULL; } ////////////////////////////////////////////////////////////////////////////// void CGraphSlamHandler::setOutputLoggerPtr(mrpt::utils::COutputLogger* logger) { MRPT_START; ASSERT_(logger); this->logger = logger; MRPT_END; } ////////////////////////////////////////////////////////////////////////////// CGraphSlamHandler::~CGraphSlamHandler() { // Removed MRPT_START/END since a dtor can't launch an exception using namespace mrpt::utils; logger->logFmt(LVL_WARN, "graphslam-engine has finished."); // keep the window open until user closes it. if (win) { logger->logFmt(LVL_WARN, "Application will exit when the display window is closed."); bool break_exec = false; while (win->isOpen() && break_exec == false) { break_exec = !this->queryObserverForEvents(); mrpt::system::sleep(100); win->forceRepaint(); } } if (win) { logger->logFmt(LVL_DEBUG, "Releasing CDisplayWindow3D instance..."); delete win; } if (win_observer) { logger->logFmt(LVL_DEBUG, "Releasing CWindowObserver instance..."); delete win_observer; } if (win_manager) { logger->logFmt(LVL_DEBUG, "Releasing CWindowManager instance..."); delete win_manager; } logger->logFmt(LVL_INFO, "Exited."); } ////////////////////////////////////////////////////////////////////////////// void CGraphSlamHandler::readConfigFname(const std::string& fname) { MRPT_START; using namespace mrpt::utils; ASSERTMSG_(mrpt::system::fileExists(fname), mrpt::format("\nConfiguration file not found: \n%s\n", fname.c_str())); if (logger) { logger->logFmt(LVL_INFO, "Reading the .ini file... "); } CConfigFile cfg_file(fname); output_dir_fname = cfg_file.read_string( "GeneralConfiguration", "output_dir_fname", "graphslam_engine_results", false); user_decides_about_output_dir = cfg_file.read_bool( "GeneralConfiguration", "user_decides_about_output_dir", false, false); save_graph = cfg_file.read_bool( "GeneralConfiguration", "save_graph", true, false); save_3DScene = cfg_file.read_bool( "GeneralConfiguration", "save_3DScene", true, false); save_gridmap = cfg_file.read_bool( "GeneralConfiguration", "save_gridmap", true, false); save_graph_fname = cfg_file.read_string( "GeneralConfiguration", "save_graph_fname", "output_graph.graph", false); save_3DScene_fname = cfg_file.read_string( "GeneralConfiguration", "save_3DScene_fname", "scene.3DScene", false); save_gridmap_fname = cfg_file.read_string( "GeneralConfiguration", "save_gridmap_fname", "output_gridmap", false); MRPT_END; } ////////////////////////////////////////////////////////////////////////////// void CGraphSlamHandler::printParams() const { std::cout << this->getParamsAsString() << std::endl; } ////////////////////////////////////////////////////////////////////////////// void CGraphSlamHandler::getParamsAsString(std::string* str) const { using namespace std; ASSERT_(str); stringstream ss_out(""); ss_out << "\n------------[ graphslam-engine_app Parameters ]------------" << std::endl; // general configuration parameters ss_out << "User decides about output dir? = " << (user_decides_about_output_dir ? "TRUE" : "FALSE") << std::endl; ss_out << "Output directory = " << output_dir_fname << std::endl; ss_out << "Generate .graph file? = " << ( save_graph? "TRUE" : "FALSE" ) << std::endl; ss_out << "Generate .3DScene file? = " << ( save_3DScene? "TRUE" : "FALSE" ) << std::endl; if (save_graph) { ss_out << "Generated .graph filename = " << save_graph_fname << std::endl; } if (save_3DScene) { ss_out << "Generated .3DScene filename = " << save_3DScene_fname << std::endl; } ss_out << "Rawlog filename = " << rawlog_fname << std::endl; *str = ss_out.str(); } ////////////////////////////////////////////////////////////////////////////// std::string CGraphSlamHandler::getParamsAsString() const { std::string str; this->getParamsAsString(&str); return str; } ////////////////////////////////////////////////////////////////////////////// void CGraphSlamHandler::setRawlogFname(std::string rawlog_fname) { using namespace mrpt::utils; logger->logFmt(LVL_DEBUG, "Successfully fetched rawlog filename"); this->rawlog_fname = rawlog_fname; } ////////////////////////////////////////////////////////////////////////////// void CGraphSlamHandler::initVisualization() { MRPT_START; using namespace mrpt::opengl; using namespace mrpt::gui; using namespace mrpt::utils; using namespace mrpt::graphslam; win_observer = new CWindowObserver(); win = new CDisplayWindow3D( "GraphSlam building procedure", 800, 600); win->setPos(400, 200); win_observer->observeBegin(*win); { COpenGLScenePtr &scene = win->get3DSceneAndLock(); COpenGLViewportPtr main_view = scene->getViewport("main"); win_observer->observeBegin( *main_view ); win->unlockAccess3DScene(); } logger->logFmt(LVL_DEBUG, "Initialized CDisplayWindow3D..."); logger->logFmt(LVL_DEBUG, "Listening to CDisplayWindow3D events..."); // pass the window and the observer pointers to the CWindowManager instance win_manager = new mrpt::graphslam::CWindowManager(); win_manager->setCDisplayWindow3DPtr(win); win_manager->setWindowObserverPtr(win_observer); MRPT_END; } ////////////////////////////////////////////////////////////////////////////// bool CGraphSlamHandler::queryObserverForEvents() { MRPT_START; std::map<std::string, bool> events_occurred; win_observer->returnEventsStruct( &events_occurred, /* reset_keypresses = */ false); bool request_to_exit = events_occurred.find("Ctrl+c")->second; return !request_to_exit; MRPT_END; } //////////////////////////////////////////////////////////////////////////////
29.528384
87
0.584738
yhexie
8f59099f72d134fb6adcef7bebcede86cb2da323
17,765
cpp
C++
dynadjust/include/io/dnaiodna.cpp
dotzhou/DynAdjust
5e5918aff7975e2c2cead4f5be16b48d3eee7c76
[ "Apache-2.0" ]
1
2020-06-02T04:49:13.000Z
2020-06-02T04:49:13.000Z
dynadjust/include/io/dnaiodna.cpp
dotzhou/DynAdjust
5e5918aff7975e2c2cead4f5be16b48d3eee7c76
[ "Apache-2.0" ]
null
null
null
dynadjust/include/io/dnaiodna.cpp
dotzhou/DynAdjust
5e5918aff7975e2c2cead4f5be16b48d3eee7c76
[ "Apache-2.0" ]
null
null
null
//============================================================================ // Name : dnaiodna.cpp // Author : Roger Fraser // Contributors : // Version : 1.00 // Copyright : Copyright 2017 Geoscience Australia // // 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. // // Description : DNA file io helper //============================================================================ #include <include/io/dnaiodna.hpp> #include <include/parameters/dnaepsg.hpp> #include <include/measurement_types/dnameasurement_types.hpp> using namespace dynadjust::measurements; using namespace dynadjust::epsg; namespace dynadjust { namespace iostreams { void dna_io_dna::write_dna_files(vdnaStnPtr* vStations, vdnaMsrPtr* vMeasurements, const string& stnfilename, const string& msrfilename, const project_settings& p, const CDnaDatum& datum, const CDnaProjection& projection, bool flagUnused, const string& stn_comment, const string& msr_comment) { write_stn_file(vStations, stnfilename, p, datum, projection, flagUnused, stn_comment); write_msr_file(vMeasurements, msrfilename, p, datum, msr_comment); } void dna_io_dna::write_dna_files(pvstn_t vbinary_stn, pvmsr_t vbinary_msr, const string& stnfilename, const string& msrfilename, const project_settings& p, const CDnaDatum& datum, const CDnaProjection& projection, bool flagUnused, const string& stn_comment, const string& msr_comment) { write_stn_file(vbinary_stn, stnfilename, p, datum, projection, flagUnused, stn_comment); write_msr_file(*vbinary_stn, vbinary_msr, msrfilename, p, datum, msr_comment); } void dna_io_dna::create_file_stn(std::ofstream* ptr, const string& filename) { determineDNASTNFieldParameters<UINT16>("3.01", dsl_, dsw_); create_file_pointer(ptr, filename); } void dna_io_dna::create_file_msr(std::ofstream* ptr, const string& filename) { determineDNAMSRFieldParameters<UINT16>("3.01", dml_, dmw_); create_file_pointer(ptr, filename); } void dna_io_dna::prepare_sort_list(const UINT32 count) { vStationList_.resize(count); // initialise vector with 0,1,2,...,n-2,n-1,n initialiseIncrementingIntegerVector<UINT32>(vStationList_, count); } void dna_io_dna::create_file_pointer(std::ofstream* ptr, const string& filename) { try { // Create file pointer to DNA file. file_opener(*ptr, filename); } catch (const runtime_error& e) { throw boost::enable_current_exception(runtime_error(e.what())); } } void dna_io_dna::open_file_pointer(std::ifstream* ptr, const string& filename) { try { // Open DNA file. file_opener(*ptr, filename, ios::in, ascii, true); } catch (const runtime_error& e) { throw boost::enable_current_exception(runtime_error(e.what())); } } void dna_io_dna::write_stn_header(std::ofstream* ptr, vdnaStnPtr* vStations, const project_settings& p, const CDnaDatum& datum, bool flagUnused, const string& comment) { // print stations // Has the user specified --flag-unused-stations, in which case, do not // print stations marked unused? size_t count(0); if (flagUnused) { for_each(vStations->begin(), vStations->end(), [&count](const dnaStnPtr& stn) { if (stn.get()->IsNotUnused()) count++; }); } else count = vStations->size(); // Write version line dna_header(*ptr, "3.01", "STN", datum.GetName(), datum.GetEpoch_s(), count); // Write header comment line, e.g. "Coordinates exported from reftran." dna_comment(*ptr, comment); } void dna_io_dna::write_stn_header(std::ofstream* ptr, pvstn_t vbinary_stn, const project_settings& p, const CDnaDatum& datum, bool flagUnused, const string& comment) { // print stations // Has the user specified --flag-unused-stations, in which case, do not // print stations marked unused? size_t count(0); if (flagUnused) { for_each(vbinary_stn->begin(), vbinary_stn->end(), [&count](const station_t& stn) { if (stn.unusedStation == 0) count++; }); } else count = vbinary_stn->size(); // Write version line dna_header(*ptr, "3.01", "STN", datum.GetName(), datum.GetEpoch_s(), count); // Write header comment line, e.g. "Coordinates exported from reftran." dna_comment(*ptr, comment); } void dna_io_dna::read_ren_file(const string& filename, pv_string_vstring_pair stnRenaming) { std::ifstream renaming_file; // create file pointer open_file_pointer(&renaming_file, filename); string version; INPUT_DATA_TYPE idt; CDnaDatum datum; string geoidVersion, fileEpsg, fileEpoch; UINT32 count(0); // read header information read_dna_header(&renaming_file, version, idt, datum, false, false, fileEpsg, fileEpoch, geoidVersion, count); read_ren_data(&renaming_file, stnRenaming); renaming_file.close(); } void dna_io_dna::read_ren_data(std::ifstream* ptr, pv_string_vstring_pair stnRenaming) { string sBuf; string_vstring_pair stnNames; vstring altStnNames; while (!ptr->eof()) // while EOF not found { try { getline((*ptr), sBuf); } catch (...) { if (ptr->eof()) return; stringstream ss; ss << "read_ren_data(): Could not read from the renaming file." << endl; boost::enable_current_exception(runtime_error(ss.str())); } // blank or whitespace? if (trimstr(sBuf).empty()) continue; // Ignore lines with blank station name if (trimstr(sBuf.substr(dsl_.stn_name, dsw_.stn_name)).empty()) continue; // Ignore lines with comments if (sBuf.compare(0, 1, "*") == 0) continue; string tmp; // Add the preferred name try { tmp = trimstr(sBuf.substr(dsl_.stn_name, dsw_.stn_name)); stnNames.first = tmp; } catch (...) { stringstream ss; ss << "read_ren_data(): Could not extract station name from the record: " << endl << " " << sBuf << endl; boost::enable_current_exception(runtime_error(ss.str())); } // Alernative names altStnNames.clear(); UINT32 positionEndName(dsw_.stn_name+dsw_.stn_name); UINT32 positionNextName(dsw_.stn_name); while (sBuf.length() > positionNextName) { if (sBuf.length() > positionEndName) tmp = trimstr(sBuf.substr(positionNextName, dsw_.stn_name)); else tmp = trimstr(sBuf.substr(positionNextName)); if (!tmp.empty()) altStnNames.push_back(tmp); positionNextName = positionEndName; positionEndName += dsw_.stn_name; } // sort for faster searching sort(altStnNames.begin(), altStnNames.end()); // Add the alternate names stnNames.second = altStnNames; // Okay, add the pair to the list stnRenaming->push_back(stnNames); } } void dna_io_dna::read_dna_header(std::ifstream* ptr, string& version, INPUT_DATA_TYPE& idt, CDnaDatum& referenceframe, bool user_supplied_frame, bool override_input_frame, string& fileEpsg, string& fileEpoch, string& geoidversion, UINT32& count) { string sBuf; getline((*ptr), sBuf); sBuf = trimstr(sBuf); // Set the default version version = "1.00"; // Attempt to get the file's version try { if (iequals("!#=DNA", sBuf.substr(0, 6))) version = trimstr(sBuf.substr(6, 6)); } catch (const runtime_error& e) { throw boost::enable_current_exception(runtime_error(e.what())); } // Attempt to get the file's type try { determineDNASTNFieldParameters<UINT16>(version, dsl_, dsw_); determineDNAMSRFieldParameters<UINT16>(version, dml_, dmw_); } catch (const runtime_error& e) { stringstream ssError; ssError << "- Error: Unable to determine DNA file version." << endl << sBuf << endl << " " << e.what() << endl; throw boost::enable_current_exception(runtime_error(ssError.str())); } // Version 1 if (iequals(version, "1.00")) { idt = unknown; // could be stn or msr count = 100; // set default 100 stations return; } string type; // Attempt to get the file's type try { type = trimstr(sBuf.substr(12, 3)); } catch (const runtime_error& e) { stringstream ssError; ssError << "- Error: File type has not been provided in the header" << endl << sBuf << endl << e.what() << endl; throw boost::enable_current_exception(runtime_error(ssError.str())); } // Station file if (iequals(type, "stn")) idt = stn_data; // MEasurement file else if (iequals(type, "msr")) idt = msr_data; // Geoid information file else if (iequals(type, "geo")) idt = geo_data; // Station renaming else if (iequals(type, "ren")) idt = ren_data; else idt = unknown; if (sBuf.length() < 29) { count = 100; return; } string file_referenceframe; // Attempt to get the default reference frame try { if (sBuf.length() > 42) file_referenceframe = trimstr(sBuf.substr(29, 14)); else if (sBuf.length() > 29) file_referenceframe = trimstr(sBuf.substr(29)); else file_referenceframe = ""; } catch (...) { // datum not provided? file_referenceframe = ""; } string epoch_version; // Attempt to get the default epoch / geoid version try { if (sBuf.length() > 56) epoch_version = trimstr(sBuf.substr(43, 14)); else if (sBuf.length() > 43) epoch_version = trimstr(sBuf.substr(43)); else epoch_version = ""; } catch (...) { // epoch / version not provided? epoch_version = ""; } // Try to get the reference frame try { switch (idt) { case stn_data: case msr_data: // Capture file epsg if (file_referenceframe.empty()) // Get the epsg code from the default datum fileEpsg = referenceframe.GetEpsgCode_s(); else fileEpsg = epsgStringFromName<string>(file_referenceframe); if (epoch_version.empty()) // No, so get the epoch from the default datum fileEpoch = referenceframe.GetEpoch_s(); else fileEpoch = epoch_version; // Presently, the logic for handling default reference frame is duplicated for // each file type, here and in dnaparser_pimpl.cxx: // void referenceframe_pimpl::post_type(...) // 2. Does the user want to override the default datum? if (override_input_frame) // Do nothing, just return as referenceframe will become // the default for all stations and measurements loaded // from the file. break; // 3. Does the user want the referenceframe attribute in the file to become the default? if (!user_supplied_frame) { if (!file_referenceframe.empty()) // adopt the reference frame supplied in the file referenceframe.SetDatumFromName(file_referenceframe, epoch_version); } // Since import doesn't offer an option to capture epoch on the command line, // take the epoch from the file (if not empty). if (!epoch_version.empty()) referenceframe.SetEpoch(epoch_version); break; case geo_data: geoidversion = epoch_version; break; } } catch (const runtime_error& e) { stringstream ssError; ssError << "The supplied frame is not recognised" << endl << e.what() << endl; throw boost::enable_current_exception(runtime_error(ssError.str())); } // Attempt to get the data count try { if (sBuf.length() > 66) count = val_uint<UINT32, string>(trimstr(sBuf.substr(57, 10))); else if (sBuf.length() > 57) count = val_uint<UINT32, string>(trimstr(sBuf.substr(57))); else count = 100; } catch (...) { count = 100; } } void dna_io_dna::write_stn_file(pvstn_t vbinary_stn, const string& stnfilename, const project_settings& p, const CDnaDatum& datum, const CDnaProjection& projection, bool flagUnused, const string& comment) { // Print DNA stations from a vector of stn_t std::ofstream dna_stn_file; try { // Create file pointer create_file_stn(&dna_stn_file, stnfilename); // Write header and comment write_stn_header(&dna_stn_file, vbinary_stn, p, datum, flagUnused, comment); // Sort on original file order prepare_sort_list(static_cast<UINT32>(vbinary_stn->size())); CompareStnFileOrder<station_t, UINT32> stnorderCompareFunc(vbinary_stn); sort(vStationList_.begin(), vStationList_.end(), stnorderCompareFunc); dnaStnPtr stnPtr(new CDnaStation(datum.GetName(), datum.GetEpoch_s())); // print stations // Has the user specified --flag-unused-stations, in wich case, do not // print stations marked unused? if (flagUnused) { // Print stations in DNA format for_each(vStationList_.begin(), vStationList_.end(), [&dna_stn_file, &stnPtr, &projection, &datum, &vbinary_stn, this](const UINT32& stn) { if (stnPtr->IsNotUnused()) { stnPtr->SetStationRec(vbinary_stn->at(stn)); stnPtr->WriteDNAXMLStnCurrentEstimates(&dna_stn_file, datum.GetEllipsoidRef(), const_cast<CDnaProjection*>(&projection), dna, &dsw_); } }); } else { // Print stations in DNA format for_each(vStationList_.begin(), vStationList_.end(), [&dna_stn_file, &stnPtr, &projection, &datum, &vbinary_stn, this](const UINT32& stn) { stnPtr->SetStationRec(vbinary_stn->at(stn)); stnPtr->WriteDNAXMLStnCurrentEstimates(&dna_stn_file, datum.GetEllipsoidRef(), const_cast<CDnaProjection*>(&projection), dna, &dsw_); }); } dna_stn_file.close(); } catch (const std::ifstream::failure f) { throw boost::enable_current_exception(runtime_error(f.what())); } } void dna_io_dna::write_stn_file(vdnaStnPtr* vStations, const string& stnfilename, const project_settings& p, const CDnaDatum& datum, const CDnaProjection& projection, bool flagUnused, const string& comment) { // Print DNA stations from a vector of dnaStnPtr std::ofstream dna_stn_file; try { // Create file pointer create_file_stn(&dna_stn_file, stnfilename); // Write header and comment write_stn_header(&dna_stn_file, vStations, p, datum, flagUnused, comment); // Sort on original file order sort(vStations->begin(), vStations->end(), CompareStnFileOrder_CDnaStn<CDnaStation>()); // print stations // Has the user specified --flag-unused-stations, in wich case, do not // print stations marked unused? if (flagUnused) { // Print stations in DNA format for_each(vStations->begin(), vStations->end(), [&dna_stn_file, &projection, &datum, this](const dnaStnPtr& stn) { if (stn.get()->IsNotUnused()) stn.get()->WriteDNAXMLStnCurrentEstimates(&dna_stn_file, datum.GetEllipsoidRef(), const_cast<CDnaProjection*>(&projection), dna, &dsw_); }); } else { // Print stations in DNA format for_each(vStations->begin(), vStations->end(), [&dna_stn_file, &projection, &datum, this](const dnaStnPtr& stn) { stn.get()->WriteDNAXMLStnCurrentEstimates(&dna_stn_file, datum.GetEllipsoidRef(), const_cast<CDnaProjection*>(&projection), dna, &dsw_); }); } dna_stn_file.close(); } catch (const std::ifstream::failure f) { throw boost::enable_current_exception(runtime_error(f.what())); } } void dna_io_dna::write_msr_header(std::ofstream* ptr, vdnaMsrPtr* vMeasurements, const project_settings& p, const CDnaDatum& datum, bool flagUnused, const string& comment) { // Write version line dna_header(*ptr, "3.01", "MSR", datum.GetName(), datum.GetEpoch_s(), vMeasurements->size()); // Write header comment line dna_comment(*ptr, comment); } void dna_io_dna::write_msr_header(std::ofstream* ptr, pvmsr_t vbinary_msrn, const project_settings& p, const CDnaDatum& datum, bool flagUnused, const string& comment) { // Write version line dna_header(*ptr, "3.01", "MSR", datum.GetName(), datum.GetEpoch_s(), vbinary_msrn->size()); // Write header comment line dna_comment(*ptr, comment); } void dna_io_dna::write_msr_file(const vstn_t& vbinary_stn, pvmsr_t vbinary_msr, const string& msrfilename, const project_settings& p, const CDnaDatum& datum, const string& comment) { // Print DNA measurements std::ofstream dna_msr_file; it_vmsr_t _it_msr(vbinary_msr->begin()); dnaMsrPtr msrPtr; try { // Create file pointer create_file_msr(&dna_msr_file, msrfilename); // Write header and comment write_msr_header(&dna_msr_file, vbinary_msr, p, datum, true, comment); // print measurements for (_it_msr=vbinary_msr->begin(); _it_msr!=vbinary_msr->end(); ++_it_msr) { ResetMeasurementPtr<char>(&msrPtr, _it_msr->measType); msrPtr->SetMeasurementRec(vbinary_stn, _it_msr); msrPtr->WriteDNAMsr(&dna_msr_file, dmw_); } dna_msr_file.close(); } catch (const std::ifstream::failure f) { throw boost::enable_current_exception(runtime_error(f.what())); } } void dna_io_dna::write_msr_file(vdnaMsrPtr* vMeasurements, const string& msrfilename, const project_settings& p, const CDnaDatum& datum, const string& comment) { // Print DNA measurements std::ofstream dna_msr_file; _it_vdnamsrptr _it_msr(vMeasurements->begin()); try { // Create file pointer create_file_msr(&dna_msr_file, msrfilename); // Write header and comment write_msr_header(&dna_msr_file, vMeasurements, p, datum, true, comment); // print measurements for (_it_msr=vMeasurements->begin(); _it_msr!=vMeasurements->end(); _it_msr++) _it_msr->get()->WriteDNAMsr(&dna_msr_file, dmw_); dna_msr_file.close(); } catch (const std::ifstream::failure f) { throw boost::enable_current_exception(runtime_error(f.what())); } } } // dnaiostreams } // dynadjust
28.378594
110
0.691134
dotzhou
8f599c1b4607f92309e3f57c9c6b19e649ad246b
12,573
inl
C++
development/hfsm2/detail/structure/composite_sub_2.inl
mjukel/HFSM2
583b085734b9542dbd74ddce69cc94a1d2b0d601
[ "MIT" ]
null
null
null
development/hfsm2/detail/structure/composite_sub_2.inl
mjukel/HFSM2
583b085734b9542dbd74ddce69cc94a1d2b0d601
[ "MIT" ]
null
null
null
development/hfsm2/detail/structure/composite_sub_2.inl
mjukel/HFSM2
583b085734b9542dbd74ddce69cc94a1d2b0d601
[ "MIT" ]
null
null
null
namespace hfsm2 { namespace detail { //////////////////////////////////////////////////////////////////////////////// template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) void CS_<TN, TA, SG, NI, TL_<T>>::wideRegister(Registry& registry, const Parent parent) noexcept { State::deepRegister(registry, Parent{parent.forkId, PRONG_INDEX}); } //------------------------------------------------------------------------------ template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) bool CS_<TN, TA, SG, NI, TL_<T>>::wideForwardEntryGuard(GuardControl& control, const Short HFSM2_IF_ASSERT(prong)) noexcept { HFSM2_ASSERT(prong == PRONG_INDEX); return State::deepForwardEntryGuard(control); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // COMMON template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) bool CS_<TN, TA, SG, NI, TL_<T>>::wideEntryGuard(GuardControl& control, const Short HFSM2_IF_ASSERT(prong)) noexcept { HFSM2_ASSERT(prong == PRONG_INDEX); return State::deepEntryGuard(control); } //------------------------------------------------------------------------------ template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) void CS_<TN, TA, SG, NI, TL_<T>>::wideEnter(PlanControl& control, const Short HFSM2_IF_ASSERT(prong)) noexcept { HFSM2_ASSERT(prong == PRONG_INDEX); State::deepEnter(control); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) void CS_<TN, TA, SG, NI, TL_<T>>::wideReenter(PlanControl& control, const Short HFSM2_IF_ASSERT(prong)) noexcept { HFSM2_ASSERT(prong == PRONG_INDEX); State::deepReenter(control); } //------------------------------------------------------------------------------ template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) Status CS_<TN, TA, SG, NI, TL_<T>>::wideUpdate(FullControl& control, const Short HFSM2_IF_ASSERT(prong)) noexcept { HFSM2_ASSERT(prong == PRONG_INDEX); return State::deepUpdate(control); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) Status CS_<TN, TA, SG, NI, TL_<T>>::wideReverseUpdate(FullControl& control, const Short HFSM2_IF_ASSERT(prong)) noexcept { HFSM2_ASSERT(prong == PRONG_INDEX); return State::deepReverseUpdate(control); } //------------------------------------------------------------------------------ template <typename TN, typename TA, Strategy SG, Short NI, typename T> template <typename TEvent> HFSM2_CONSTEXPR(14) Status CS_<TN, TA, SG, NI, TL_<T>>::wideReact(FullControl& control, const TEvent& event, const Short HFSM2_IF_ASSERT(prong)) noexcept { HFSM2_ASSERT(prong == PRONG_INDEX); return State::deepReact(control, event); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - template <typename TN, typename TA, Strategy SG, Short NI, typename T> template <typename TEvent> HFSM2_CONSTEXPR(14) Status CS_<TN, TA, SG, NI, TL_<T>>::wideReverseReact(FullControl& control, const TEvent& event, const Short HFSM2_IF_ASSERT(prong)) noexcept { HFSM2_ASSERT(prong == PRONG_INDEX); return State::deepReverseReact(control, event); } //------------------------------------------------------------------------------ template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) bool CS_<TN, TA, SG, NI, TL_<T>>::wideForwardExitGuard(GuardControl& control, const Short HFSM2_IF_ASSERT(prong)) noexcept { HFSM2_ASSERT(prong == PRONG_INDEX); return State::deepForwardExitGuard(control); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // COMMON template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) bool CS_<TN, TA, SG, NI, TL_<T>>::wideExitGuard(GuardControl& control, const Short HFSM2_IF_ASSERT(prong)) noexcept { HFSM2_ASSERT(prong == PRONG_INDEX); return State::deepExitGuard(control); } //------------------------------------------------------------------------------ template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) void CS_<TN, TA, SG, NI, TL_<T>>::wideExit(PlanControl& control, const Short HFSM2_IF_ASSERT(prong)) noexcept { HFSM2_ASSERT(prong == PRONG_INDEX); State::deepExit(control); } //------------------------------------------------------------------------------ template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) void CS_<TN, TA, SG, NI, TL_<T>>::wideForwardActive(Control& control, const Request request, const Short HFSM2_IF_ASSERT(prong)) noexcept { HFSM2_ASSERT(prong == PRONG_INDEX); State::deepForwardActive(control, request); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) void CS_<TN, TA, SG, NI, TL_<T>>::wideForwardRequest(Control& control, const Request request, const Short HFSM2_IF_ASSERT(prong)) noexcept { HFSM2_ASSERT(prong == PRONG_INDEX); State::deepForwardRequest(control, request); } //------------------------------------------------------------------------------ template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) void CS_<TN, TA, SG, NI, TL_<T>>::wideRequestChangeComposite(Control& control, const Request request) noexcept { State::deepRequestChange(control, request); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) void CS_<TN, TA, SG, NI, TL_<T>>::wideRequestChangeResumable(Control& control, const Request request, const Short HFSM2_IF_ASSERT(prong)) noexcept { HFSM2_ASSERT(prong == PRONG_INDEX); State::deepRequestChange(control, request); } //------------------------------------------------------------------------------ template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) void CS_<TN, TA, SG, NI, TL_<T>>::wideRequestRestart(Control& control, const Request request) noexcept { State::deepRequestRestart(control, request); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) void CS_<TN, TA, SG, NI, TL_<T>>::wideRequestResume(Control& control, const Request request, const Short HFSM2_IF_ASSERT(prong)) noexcept { HFSM2_ASSERT(prong == PRONG_INDEX); State::deepRequestResume(control, request); } //------------------------------------------------------------------------------ #if HFSM2_UTILITY_THEORY_AVAILABLE() template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) typename TA::UP CS_<TN, TA, SG, NI, TL_<T>>::wideReportUtilize(Control& control) noexcept { return State::deepReportUtilize(control); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) typename TA::Rank CS_<TN, TA, SG, NI, TL_<T>>::wideReportRank(Control& control, Rank* const ranks) noexcept { HFSM2_ASSERT(ranks); *ranks = State::deepReportRank(control); return *ranks; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) typename TA::Utility CS_<TN, TA, SG, NI, TL_<T>>::wideReportRandomize(Control& control, Utility* const options, const Rank* const ranks, const Rank top) noexcept { HFSM2_ASSERT(options && ranks); *options = (*ranks == top) ? State::deepReportRandomize(control) : Utility{0}; return *options; } //------------------------------------------------------------------------------ template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) typename TA::UP CS_<TN, TA, SG, NI, TL_<T>>::wideReportChangeComposite(Control& control) noexcept { return State::deepReportChange(control); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) typename TA::UP CS_<TN, TA, SG, NI, TL_<T>>::wideReportChangeResumable(Control& control, const Short HFSM2_IF_ASSERT(prong)) noexcept { HFSM2_ASSERT(prong == PRONG_INDEX); return State::deepReportChange(control); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) typename TA::UP CS_<TN, TA, SG, NI, TL_<T>>::wideReportChangeUtilitarian(Control& control) noexcept { return State::deepReportChange(control); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) typename TA::Utility CS_<TN, TA, SG, NI, TL_<T>>::wideReportChangeRandom(Control& control, Utility* const options, const Rank* const ranks, const Rank top) noexcept { HFSM2_ASSERT(options && ranks); *options = (*ranks == top) ? State::deepReportChange(control).utility : Utility{0}; return *options; } #endif //------------------------------------------------------------------------------ template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) void CS_<TN, TA, SG, NI, TL_<T>>::wideChangeToRequested(PlanControl& control, const Short HFSM2_IF_ASSERT(prong)) noexcept { HFSM2_ASSERT(prong == PRONG_INDEX); State::deepChangeToRequested(control); } //------------------------------------------------------------------------------ #if HFSM2_SERIALIZATION_AVAILABLE() template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) void CS_<TN, TA, SG, NI, TL_<T>>::wideSaveActive(const Registry& registry, WriteStream& stream, const Short HFSM2_IF_ASSERT(prong)) const noexcept { HFSM2_ASSERT(prong == PRONG_INDEX); State::deepSaveActive(registry, stream); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) void CS_<TN, TA, SG, NI, TL_<T>>::wideSaveResumable(const Registry& registry, WriteStream& stream) const noexcept { State::deepSaveResumable(registry, stream); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) void CS_<TN, TA, SG, NI, TL_<T>>::wideLoadRequested(Registry& registry, ReadStream& stream, const Short HFSM2_IF_ASSERT(prong)) const noexcept { HFSM2_ASSERT(prong == PRONG_INDEX); State::deepLoadRequested(registry, stream); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) void CS_<TN, TA, SG, NI, TL_<T>>::wideLoadResumable(Registry& registry, ReadStream& stream) const noexcept { State::deepLoadResumable(registry, stream); } #endif //------------------------------------------------------------------------------ #if HFSM2_STRUCTURE_REPORT_AVAILABLE() template <typename TN, typename TA, Strategy SG, Short NI, typename T> HFSM2_CONSTEXPR(14) void CS_<TN, TA, SG, NI, TL_<T>>::wideGetNames(const Long parent, const RegionType /*region*/, const Short depth, StructureStateInfos& _stateInfos) const noexcept { State::deepGetNames(parent, StructureStateInfo::RegionType::COMPOSITE, depth, _stateInfos); } #endif //////////////////////////////////////////////////////////////////////////////// } }
29.583529
92
0.566691
mjukel
8f5ada0171d1116004f1fe467e6a98b11b58f7f2
1,202
hpp
C++
src/utils.hpp
stash-s/esp-vfd-clock
272f013feaffdbeb68c9fb9de253d65f00e487db
[ "MIT" ]
null
null
null
src/utils.hpp
stash-s/esp-vfd-clock
272f013feaffdbeb68c9fb9de253d65f00e487db
[ "MIT" ]
null
null
null
src/utils.hpp
stash-s/esp-vfd-clock
272f013feaffdbeb68c9fb9de253d65f00e487db
[ "MIT" ]
null
null
null
#ifndef __UTILS_HPP__ #define __UTILS_HPP__ /** * Utility class. Rotate through available numbers and trigger actions when ticking and reseting */ template <typename tick_callback_type, typename reset_callback_type> class rotary_counter { const int max_counter; int counter; const tick_callback_type tick_callback; const reset_callback_type reset_callback; public: rotary_counter(int _dupa, tick_callback_type tick_callback, reset_callback_type reset_callback) :max_counter (_dupa), counter (_dupa-1), reset_callback (reset_callback), tick_callback (tick_callback) {} inline int next () { ++ counter; if (counter == max_counter) { reset_callback (counter); counter = 0; tick_callback (counter); } else { tick_callback (counter); } return counter; } inline int value () const { return counter; } }; template <typename t, typename q> inline rotary_counter<t,q> make_rotary_counter (int max, t tick, q reset) { return rotary_counter<t,q>(max, tick, reset); } #endif // __UTILS_HPP__
23.568627
99
0.640599
stash-s
8f5dc958bb416dac40f837b04dfd7d5f51fcbbce
375
hpp
C++
src/targets/gpu/include/migraphx/gpu/cosh.hpp
aaronenyeshi/AMDMIGraphX
87528938188f0247f3dfcc6ab9b83c22187109fd
[ "MIT" ]
72
2018-12-06T18:31:17.000Z
2022-03-30T15:01:02.000Z
src/targets/gpu/include/migraphx/gpu/cosh.hpp
aaronenyeshi/AMDMIGraphX
87528938188f0247f3dfcc6ab9b83c22187109fd
[ "MIT" ]
1,006
2018-11-30T16:32:33.000Z
2022-03-31T22:43:39.000Z
src/targets/gpu/include/migraphx/gpu/cosh.hpp
aaronenyeshi/AMDMIGraphX
87528938188f0247f3dfcc6ab9b83c22187109fd
[ "MIT" ]
36
2019-05-07T10:41:46.000Z
2022-03-28T15:59:56.000Z
#ifndef MIGRAPHX_GUARD_RTGLIB_COSH_HPP #define MIGRAPHX_GUARD_RTGLIB_COSH_HPP #include <migraphx/gpu/oper.hpp> #include <migraphx/gpu/device/cosh.hpp> namespace migraphx { inline namespace MIGRAPHX_INLINE_NS { namespace gpu { struct hip_cosh : unary_device<hip_cosh, device::cosh> { }; } // namespace gpu } // namespace MIGRAPHX_INLINE_NS } // namespace migraphx #endif
18.75
54
0.786667
aaronenyeshi
8f675f68cb0d16cf75141954b54dca873091193a
544
cpp
C++
codeforces/stuff/e.cpp
AadityaJ/Spoj
61664c1925ef5bb072a3fe78fb3dac4fb68d77a1
[ "MIT" ]
null
null
null
codeforces/stuff/e.cpp
AadityaJ/Spoj
61664c1925ef5bb072a3fe78fb3dac4fb68d77a1
[ "MIT" ]
null
null
null
codeforces/stuff/e.cpp
AadityaJ/Spoj
61664c1925ef5bb072a3fe78fb3dac4fb68d77a1
[ "MIT" ]
null
null
null
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; bool isConsonant(char ch){ switch(ch){ case 'a': case 'e': case 'i': case 'o': case 'u': case 'y': return 0; } return 1; } int main(int argc, char const *argv[]) { string str; cin>>str; std::transform(str.begin(), str.end(), str.begin(), ::tolower); string s1; for(int i=0;i<str.length();i++){ if(isConsonant(str[i])){ s1+="."; //if(str[i]<='Z') str[i]=str[i]-'A'+'a'; s1+=str[i]; } } cout<<s1; return 0; }
16.484848
64
0.573529
AadityaJ
8f70e95e1c2a57ec85a971e50f6dc10eae6bdf95
1,443
cpp
C++
core/src/SimpleIterant.cpp
athelaf/nextsimdg
557e45db6af2cc07d00b3228c2d46f87567fe755
[ "Apache-2.0" ]
null
null
null
core/src/SimpleIterant.cpp
athelaf/nextsimdg
557e45db6af2cc07d00b3228c2d46f87567fe755
[ "Apache-2.0" ]
null
null
null
core/src/SimpleIterant.cpp
athelaf/nextsimdg
557e45db6af2cc07d00b3228c2d46f87567fe755
[ "Apache-2.0" ]
null
null
null
/*! * @file SimpleIterant.cpp * @date 12 Aug 2021 * @author Tim Spain <timothy.spain@nersc.no> */ #include "include/SimpleIterant.hpp" #include <ctime> #include <iostream> #include <sstream> #include <string> namespace Nextsim { SimpleIterant::SimpleIterant() { // It's so simple, there's nothing here } void SimpleIterant::init() { std::cout << "SimpleIterant::init" << std::endl; } void SimpleIterant::start(const Iterator::TimePoint& startTime) { std::cout << "SimpleIterant::start at " << stringFromTimePoint(startTime) << std::endl; } void SimpleIterant::iterate(const Iterator::Duration& dt) { std::cout << "SimpleIterant::iterate for " << count(dt) << std::endl; } void SimpleIterant::stop(const Iterator::TimePoint& stopTime) { std::cout << "SimpleIterant::stop at " << stringFromTimePoint(stopTime) << std::endl; } std::string SimpleIterant::stringFromTimePoint( const std::chrono::time_point<std::chrono::system_clock>& t) { std::time_t t_c = Nextsim::Iterator::Clock::to_time_t(t); return std::string(ctime(&t_c)); } std::string SimpleIterant::stringFromTimePoint(const int t) { std::stringstream ss; ss << t; return ss.str(); } template <> std::chrono::time_point<Iterator::Clock> SimpleIterant::zeroTime<std::chrono::time_point<Iterator::Clock>>() { return Iterator::Clock::now(); } template <> int SimpleIterant::zeroTime<int>() { return 0; } } /* namespace Nextsim */
23.655738
91
0.689536
athelaf
8f778c9945028639bc47070f6e42ea2f5e4f72fa
963
hpp
C++
AudioKit/Common/Nodes/Generators/Physical Models/Metal Bar/AKMetalBarDSP.hpp
colinhallett/AudioKit
10600731f5a0a3ea1cd980d4c3a991c57aa473de
[ "MIT" ]
null
null
null
AudioKit/Common/Nodes/Generators/Physical Models/Metal Bar/AKMetalBarDSP.hpp
colinhallett/AudioKit
10600731f5a0a3ea1cd980d4c3a991c57aa473de
[ "MIT" ]
null
null
null
AudioKit/Common/Nodes/Generators/Physical Models/Metal Bar/AKMetalBarDSP.hpp
colinhallett/AudioKit
10600731f5a0a3ea1cd980d4c3a991c57aa473de
[ "MIT" ]
null
null
null
// Copyright AudioKit. All Rights Reserved. Revision History at http://github.com/AudioKit/AudioKit/ #pragma once #import <AVFoundation/AVFoundation.h> typedef NS_ENUM(AUParameterAddress, AKMetalBarParameter) { AKMetalBarParameterLeftBoundaryCondition, AKMetalBarParameterRightBoundaryCondition, AKMetalBarParameterDecayDuration, AKMetalBarParameterScanSpeed, AKMetalBarParameterPosition, AKMetalBarParameterStrikeVelocity, AKMetalBarParameterStrikeWidth, }; #ifndef __cplusplus AKDSPRef createMetalBarDSP(void); #else #import "AKSoundpipeDSPBase.hpp" class AKMetalBarDSP : public AKSoundpipeDSPBase { private: struct InternalData; std::unique_ptr<InternalData> data; public: AKMetalBarDSP(); void init(int channelCount, double sampleRate) override; void deinit() override; void reset() override; void process(AUAudioFrameCount frameCount, AUAudioFrameCount bufferOffset) override; }; #endif
22.395349
100
0.786085
colinhallett
8f7835cd6a89bec08a1a8a9cb20714bc61d84c1c
46
cpp
C++
Physics Engine/Physics/Generics/PhysicsCollider.cpp
FirowMD/Luna-Engine
4011a43df48ca85f6d8f8657709471da02bd8301
[ "MIT" ]
2
2021-07-28T23:08:29.000Z
2021-09-14T19:32:36.000Z
Physics Engine/Physics/Generics/PhysicsCollider.cpp
FirowMD/Luna-Engine
4011a43df48ca85f6d8f8657709471da02bd8301
[ "MIT" ]
null
null
null
Physics Engine/Physics/Generics/PhysicsCollider.cpp
FirowMD/Luna-Engine
4011a43df48ca85f6d8f8657709471da02bd8301
[ "MIT" ]
null
null
null
#include "pc.h" #include "PhysicsCollider.h"
11.5
28
0.717391
FirowMD
8f819ec7d2ccc64dd46dde18259b106a063fe320
833
cpp
C++
src/utils/string_utils.cpp
scp-studios/scp-game-framework
17ffb68a50d834e490d387028f05add9f5391ea5
[ "MIT" ]
1
2022-01-31T22:20:01.000Z
2022-01-31T22:20:01.000Z
src/utils/string_utils.cpp
scp-studios/scp-game-framework
17ffb68a50d834e490d387028f05add9f5391ea5
[ "MIT" ]
null
null
null
src/utils/string_utils.cpp
scp-studios/scp-game-framework
17ffb68a50d834e490d387028f05add9f5391ea5
[ "MIT" ]
null
null
null
#include <sstream> #include <scp/utils/string_utils.hpp> namespace string_utils = scp::utils::string_utils; bool string_utils::startsWith(std::string_view p_a, std::string_view p_b) { if (p_a.size() < p_b.size()) { return false; } for (std::string_view::iterator aIt = p_a.begin(), bIt = p_b.begin(); bIt != p_b.end(); aIt++, bIt++) { if (*aIt != *bIt) { return false; } } return true; } std::vector<std::string> string_utils::splitString(std::string_view host, char delimiter) { std::vector<std::string> result; std::stringstream stream(host.data()); while (stream.good()) { std::string part; std::getline(stream, part, delimiter); result.push_back(part); } return result; }
20.825
105
0.571429
scp-studios
8f865db48e779d551203f30bbc577b6f2d3cad43
21,964
cpp
C++
CO/tools/LT/LT.cpp
Snake52996/Spring2021-FoCS
c78662021d0017d25dccd9006e8eb0e80dfedfe7
[ "MIT" ]
null
null
null
CO/tools/LT/LT.cpp
Snake52996/Spring2021-FoCS
c78662021d0017d25dccd9006e8eb0e80dfedfe7
[ "MIT" ]
null
null
null
CO/tools/LT/LT.cpp
Snake52996/Spring2021-FoCS
c78662021d0017d25dccd9006e8eb0e80dfedfe7
[ "MIT" ]
null
null
null
#include "tinyxml2.h" #include<getopt.h> #include<cstdlib> #include<cstring> #include<thread> #include<cstdio> #include<filesystem> #include<mutex> #include<vector> #include<cstdio> #include<fstream> #include<string> #include<regex> #ifdef _WIN32 #define REDCOLOR "" #define GREENCOLOR "" #define YELLOWCOLOR "" #define BLUECOLOR "" #define PURPLECOLOR "" #define AOCOLOR "" #define ENDCOLOR "" #define LOGISIM_COMMAND "Start-Job -WorkingDirectory \"$PWD\" { %s -tty table %s > \"%s\" 2>Out-Null } | Wait-Job -Timeout %d",config.logisim_.c_str(),circ_path.string().c_str(),temp_out_path.string().c_str(),config.timeout_ #define MARS_COMMAND "%s -Command %s nc db mc CompactDataAtZero dump .text HexText %s %s > %s",config.ps_.c_str(),config.mars_.c_str(),text_path.string().c_str(),test_case.string().c_str(),ans_path.string().c_str() #else #define REDCOLOR "\e[31;1m" #define GREENCOLOR "\e[32;1m" #define YELLOWCOLOR "\e[33;1m" #define BLUECOLOR "\e[34;1m" #define PURPLECOLOR "\e[35;1m" #define AOCOLOR "\e[36;1m" #define ENDCOLOR "\e[0m" #define LOGISIM_COMMAND "timeout %d \"%s\" -tty table \"%s\" > \"%s\" 2>/dev/null",config.timeout_,config.logisim_.c_str(),circ_path.c_str(),temp_out_path.c_str() #define MARS_COMMAND "\"%s\" nc db mc CompactDataAtZero dump .text HexText \"%s\" \"%s\" > \"%s\"",config.mars_.c_str(),text_path.string().c_str(),test_case.string().c_str(),ans_path.string().c_str() #endif using namespace std; namespace fs = std::filesystem; enum Errors{ ERROR_OK = 0, ERROR_UNEXPECTED_NULL_POINTER = 1, ERROR_INVALID_OPTION, ERROR_INVALID_LOGISIM_OUTPUT, ERROR_DOUBTFUL_DESIGN }; constexpr const char* DEFAULT_MARS = "./Mars.jar"; constexpr const char* DEFAULT_CIRCUIT = "CPU.circ"; constexpr const char* DEFAULT_DIR = "test"; constexpr const char* DEFAULT_LOGISIM = "logisim"; #ifdef _WIN32 constexpr const char* DEFAULT_PS = "powershell"; #endif struct Configuration{ bool show_help_ = false; string mars_ = DEFAULT_MARS; string circuit_ = DEFAULT_CIRCUIT; string test_dir_ = DEFAULT_DIR; string logisim_ = DEFAULT_LOGISIM; unsigned int thread_limit_ = 1; unsigned int timeout_ = 5; bool debug = false; #ifdef _WIN32 string ps_ = DEFAULT_PS; #endif bool cleanup = true; }; struct CountInfo{ private: unsigned int total_ = 0; unsigned int passed_ = 0; unsigned int failed_ = 0; unsigned int exception_ = 0; unsigned int doubt_ = 0; mutex ci_mux_; public: void pass(){ lock_guard<mutex> lock(ci_mux_); ++total_; ++passed_; } void fail(){ lock_guard<mutex> lock(ci_mux_); ++total_; ++failed_; } void exception(){ lock_guard<mutex> lock(ci_mux_); ++total_; ++exception_; } void doubt(){ lock_guard<mutex> lock(ci_mux_); ++total_; ++doubt_; } void getScore(){ lock_guard<mutex> lock(ci_mux_); if(!total_) return; if(passed_) printf("%s您通过了%lf%%的测试点,恭喜!%s\n", GREENCOLOR, static_cast<double>(passed_) / total_ * 100, ENDCOLOR); if(failed_) printf("%s您在%lf%%的测试点中失败了,希望不是LT的问题...%s\n", REDCOLOR, static_cast<double>(failed_) / total_ * 100, ENDCOLOR); if(exception_) printf("%s%lf%%的测试点中出现了异常,抱歉%s\n", PURPLECOLOR, static_cast<double>(exception_) / total_ * 100, ENDCOLOR); if(doubt_) printf("%s%lf%%的测试点被通过了,但或许您的设计可能不是真正的流水线%s\n", YELLOWCOLOR, static_cast<double>(doubt_) / total_ * 100, ENDCOLOR); } }; class FileAssigner{ private: fs::directory_iterator base_; fs::directory_iterator iter_; mutex fa_mutex_; public: FileAssigner(const char* path): base_(path), iter_(begin(base_)){} bool get(fs::path& path){ lock_guard<mutex> lock(fa_mutex_); while(iter_ != end(base_) && !((*iter_).is_regular_file())) iter_++; if(iter_ == end(base_)) return false; path = (*iter_).path(); iter_++; return true; } }; constexpr struct option LONG_CLI_ARGS[] = { {"help", no_argument, NULL, 'a'}, {"with-mars", required_argument, NULL, 'b'}, {"test-dir", required_argument, NULL, 'c'}, {"thread", optional_argument, NULL, 'd'}, {"with-logisim", required_argument, NULL, 'e'}, {"with-circuit", required_argument, NULL, 'f'}, {"timeout", required_argument, NULL, 'g'}, {"debug", no_argument, NULL, 'h'}, #ifdef _WIN32 {"with-ps", required_argument, NULL, 'i'}, #endif {"no-cleanup", no_argument, NULL, 'j'}, {NULL, 0, NULL, 0} }; int getConfiguration(int argc, char** argv, Configuration& config){ int opt; opterr = 0; // prevent error message char* strtol_end = NULL; int temp_int; while((opt = getopt_long(argc, argv, "", LONG_CLI_ARGS, NULL)) != -1){ switch(opt){ case 'a': config.show_help_ = true; return ERROR_OK; case 'b': config.mars_ = optarg; break; case 'c': config.test_dir_ = optarg; break; case 'd': if(optarg == NULL){ config.thread_limit_ = thread::hardware_concurrency(); }else{ temp_int = strtol(optarg, &strtol_end, 10); if(*strtol_end != '\0') break; config.thread_limit_ = temp_int; } break; case 'e': config.logisim_ = optarg; break; case 'f': config.circuit_ = optarg; break; case 'g': temp_int = strtol(optarg, &strtol_end, 10); if(*strtol_end != '\0') break; config.timeout_ = temp_int; break; case 'h': config.debug = true; break; #ifdef _WIN32 case 'i': config.ps_ = optarg; break; #endif case 'j': config.cleanup = false; break; case '?': return ERROR_INVALID_OPTION; } } return ERROR_OK; } int verifyConfiguration(Configuration& config){ if(!fs::is_regular_file(config.circuit_)){ printf("错误: 无法访问的设计文件\n"); return ERROR_INVALID_OPTION; } if(!fs::is_directory(config.test_dir_)){ printf("错误: 指定的测试文件目录无法识别\n"); return ERROR_INVALID_OPTION; } if(config.timeout_ <= 0){ printf("错误: 不合法的超时时间\n"); return ERROR_INVALID_OPTION; } return ERROR_OK; } void showHelp(){ printf( "LT: 用于Logisim的自动评测机\n" "用法: LT [选项(们)]\n" "选项:\n" "\t--help 显示此消息并退出\n\n" "\t--with-mars 指定用于调用Mars的指令\n" "\t 请注意使用修改后的Mars来提供需要的信息\n" "\t 不提供该选项时的默认值: ./Mars.jar\n\n" "\t--test-dir 指定存放测试程序的目录\n" "\t 注意LT将不会尝试递归的遍历此目录\n" "\t 不提供该选项时的默认值: test\n\n" "\t--thread 指定使用的线程数\n" "\t 当不指定参数时,采用自动推测的数目\n" "\t 不提供该选项时的默认值: 1\n\n" "\t--with-logisim 指定用于调用Logisim的指令\n" "\t 不提供该选项时的默认值: logisim\n\n" "\t--with-circuit 指定您设计的CPU文件\n" "\t 不提供该选项时的默认值: CPU.circ\n\n" "\t--timeout 指定Logisim仿真的超时时间(单位: 秒)\n" "\t 仿真将不会运行超过此时长\n" "\t 不提供该选项时的默认值: 5\n\n" #ifdef _WIN32 "\t--with-ps 指定使用的powershell\n\n" "\t 不提供该选项时的默认值: powershell\n\n" #endif "\t--debug 要求更多的日志输出\n\n" "\t--no-cleanup 不进行临时文件的清理,调试时可能有用\n\n" "\n" "如何工作:\n" "\t通常而言您仅需要按照上述给出的说明正确指定参数即可使用LT\n" "\t无需对您的 CPU 设计作出任何修改\n\n" "\t为了避免 PC 溢出导致重复输出带来的误判\n" "\t一条跳转到自身的指令将会被自动插入到汇编后的程序末尾\n" "\t其编码为 0x1000ffff\n\n" "\t通常仿真将在超时后结束\n" "\t为了在测试程序运行结束时立即终止仿真,需要对您的CPU做出如下的改动:\n" "\t\t在顶层添加一个额外的 1bit 输出并命名为 halt\n" "\t\t令当且仅当 WB 段的指令为 0x1000ffff 时其输出有效\n" "\t\t且这个端口必须位于所有的其他输出端口的下方\n" "\t则当 Logisim 发现名为 halt 的端口有效时将终止仿真\n\n" "\n" "系统相关:\n" "\t本程序在 Ubuntu20.04.2 上开发,测试中未出现值得注意的特殊情况\n\n" "\t在 Windows 10 1909 上的测试中发现如下的问题:\n" "\t\t直接使用\"*.jar\"启动Mars可能导致输出丢失\n" "\t\t 可在--with-mars使用\"java -jar *.jar\"解决\n" "\t\t (测试环境为JRE 12.0.2+10)\n" "\t\t可能出现\"系统无法找到指定的目录\"\n" "\t\t 更新PowerShell版本可能有所帮助\n" "\t\t 可以通过--with-ps指定使用的PowerShell\n\n" "\t关于与其他系统的兼容性并无相关数据\n\n" "更多信息:\n" "\thttps://github.com/Snake52996/Spring2021-FoCS\n" "\t 可以在CO/tools/LT找到(其实基本并没有更多信息)\n\n" ); } namespace TXUtility{ tinyxml2::XMLElement* findContent(tinyxml2::XMLElement* entry){ entry = entry->FirstChildElement(); while(entry != NULL){ if( !strcmp(entry->Name(), "a") && entry->Attribute("name") != NULL && !strcmp(entry->Attribute("name"), "contents") ){ return entry; } entry = entry->NextSiblingElement(); } return NULL; } void searchMemory(tinyxml2::XMLElement* entry, char** name){ while(entry != NULL && *name == NULL){ if( !strcmp(entry->Name(), "lib") && entry->Attribute("desc") != NULL && !strcmp(entry->Attribute("desc"), "#Memory") ){ const char* temp_name = entry->Attribute("name"); *name = new char[strlen(temp_name)]; strcpy(*name, temp_name); return; } if(!(entry->NoChildren())) searchMemory(entry->FirstChildElement(), name); entry = entry->NextSiblingElement(); } } tinyxml2::XMLElement* searchROM(tinyxml2::XMLElement* entry, const char* name){ while(entry != NULL){ if( !strcmp(entry->Name(), "comp") && entry->Attribute("lib") != NULL && !strcmp(entry->Attribute("lib"), name) && entry->Attribute("name") != NULL && !strcmp(entry->Attribute("name"), "ROM") ){ return findContent(entry); } if(!(entry->NoChildren())){ tinyxml2::XMLElement* ret = searchROM(entry->FirstChildElement(), name); if(ret != NULL) return ret; } entry = entry->NextSiblingElement(); } return NULL; } tinyxml2::XMLElement* getROMContext(tinyxml2::XMLDocument& doc){ char* memory_lib_name = NULL; tinyxml2::XMLElement* entry = doc.FirstChildElement(); searchMemory(entry, &memory_lib_name); entry = doc.FirstChildElement(); entry = searchROM(entry, memory_lib_name); delete[] memory_lib_name; return entry; } } namespace LogisimInterpreter{ constexpr size_t BUFFER_SIZE = 4096; constexpr short ELEMENT_WIDTH[] = {32, 32, 1, 5, 32, 1, 32, 32}; int interpret(FILE* input, FILE* output){ char file_buffer[BUFFER_SIZE]; bool doubtful = true; size_t cur = 0, rare = 0; unsigned int values[8] = {0}; unsigned short element_index = 0, read_width = 0; while(true){ if(cur == rare){ rare = fread(file_buffer, 1, BUFFER_SIZE, input); if(rare == 0) break; cur = 0; } if(file_buffer[cur] == '0' || file_buffer[cur] == '1'){ if(element_index < 8){ values[element_index] = (values[element_index] << 1) | (file_buffer[cur] == '1'); ++read_width; if(read_width == ELEMENT_WIDTH[element_index]){ read_width = 0; ++element_index; if(element_index == 8){ if(values[2]) fprintf(output, "@%08x: $%d <= %08x\n", values[0], values[3], values[4]); if(values[5]) fprintf(output, "@%08x: *%08x <= %08x\n", values[1], values[6], values[7]); if(values[2] && values[5]) doubtful = false; for(unsigned int i = 0; i < 8; ++i) values[i] = 0; } } } }else if(file_buffer[cur] == '\n'){ if(element_index != 8) return ERROR_INVALID_LOGISIM_OUTPUT; element_index = 0; } ++cur; } if(doubtful) return ERROR_DOUBTFUL_DESIGN; return ERROR_OK; } } namespace AnswerComparator{ enum RESULT{ PASS = 0, FAIL, EXCEPTION, DOUBT }; const regex REGISTER_LINE("^\\s*@(0x)?([0-9a-fA-F]{8})\\s*:\\s*\\$\\s*([0-9]+)\\s*<=\\s*(0x)?([0-9a-fA-F]{8})\\s*$"); const regex MEMORY_LINE("^\\s*@(0x)?([0-9a-fA-F]{8})\\s*:\\s*\\*\\s*(0x)?([0-9a-fA-F]{8})\\s*<=\\s*(0x)?([0-9a-fA-F]{8})\\s*$"); constexpr const char* ILLEGALOUTPUT = "遭遇了非法的输出。这可能是您的CPU的错误,但更可能是此程序的问题。"; constexpr const char* STANDARDOUTPUTILLEGAL = "在解析标准输出时遇到了错误。无法想象。"; constexpr const char* TOOLONG = "您的输出比标准输出更长。"; constexpr const char* TOOSHORT = "您的输出比标准输出要短\n\t这可能是由于跳转异常,也可能是仿真未在超时前结束"; string getNextLine(istream& log){ string temp; smatch m; while(!log.eof()){ getline(log, temp); if(!temp.size()) continue; if(regex_match(temp, m, REGISTER_LINE)){ if(stoi(m[3]) == 0) continue; temp = "@" + m.str(2) + ": $" + to_string(stoi(m.str(3))) + " <= " + m.str(5); break; }else if(regex_match(temp, m, MEMORY_LINE)){ temp = "@" + m.str(2) + ": *" + m.str(4) + " <= " + m.str(6); break; }else{ temp = ""; break; } } for(char& c: temp) if(c >= 'a' && c <= 'f') c = c - 'a' + 'A'; return temp; } RESULT compare(istream& out, istream& ans, string& comment){ string out_line, ans_line; while(!out.eof() && !ans.eof()){ out_line = getNextLine(out); ans_line = getNextLine(ans); if(out_line == ans_line) continue; if(!out_line.size()){ if(out.eof()) break; comment = ILLEGALOUTPUT; return EXCEPTION; } if(!ans_line.size()){ if(ans.eof()) break; comment = STANDARDOUTPUTILLEGAL; return EXCEPTION; } comment = "我们期望 " + out_line + " ,但您的输出是 " + ans_line + " 。"; return FAIL; } if(!out.eof()){ comment = TOOLONG; return FAIL; } if(!ans.eof()){ comment = TOOSHORT; return FAIL; } return PASS; } } void functionalThread( FileAssigner& file_assigner, const Configuration& config, CountInfo& count_info, const unsigned int id ){ if(config.debug) printf("线程%d: 已启动\n", id); char command_buffer[4096]; char text_buffer[10010] = "addr/data: 10 32\n"; const size_t text_start = strlen(text_buffer); fs::path work_dir = fs::temp_directory_path() / "LT-"; work_dir += to_string(id); if(config.debug) printf("线程%d: 工作目录为[%s]\n", id, work_dir.string().c_str()); fs::create_directories(work_dir); if(config.debug) printf("线程%d: 工作目录已创建\n", id); fs::path text_path = work_dir / "code.txt"; fs::path ans_path = work_dir / "ans"; fs::path temp_out_path = work_dir / "temp_out"; fs::path out_path = work_dir / "out"; fs::path circ_path = work_dir / "CPU.circ"; fs::path test_case; if(config.debug) printf("线程%d: 正在尝试定位设计中的指令存储器(ROM)\n", id); tinyxml2::XMLDocument xml_doc; xml_doc.LoadFile(config.circuit_.c_str()); tinyxml2::XMLElement* content = TXUtility::getROMContext(xml_doc); if(config.debug) printf("线程%d: 指令存储器(ROM)已定位\n", id); FILE* temp_out = NULL; #ifdef _WIN32 fs::path command_path = work_dir / "command.ps1"; temp_out = fopen(command_path.string().c_str(), "w"); fprintf(temp_out, LOGISIM_COMMAND); fclose(temp_out); if(config.debug) printf("线程%d: 已创建PowerShell指令文件\n", id); #endif FILE* code_text = NULL; FILE* out = NULL; size_t read_count; ifstream ans; ifstream your_ans; string comment; int ret; bool doubtful; while(true){ if(config.debug) printf("线程%d: 正在尝试获取下一个测试文件\n", id); ret = file_assigner.get(test_case); if(!ret){ if(config.debug) printf("线程%d: 所有测试文件已完成\n", id); break; } if(config.debug) printf("线程%d: 已取得测试文件[%s]\n", id, test_case.string().c_str()); sprintf(command_buffer, MARS_COMMAND); if(config.debug) printf("线程%d: 准备执行汇编和生成标准结果命令[%s]\n", id, command_buffer); system(command_buffer); if(config.debug) printf("线程%d: 正在向指令存储器(ROM)写入指令\n", id); code_text = fopen(text_path.string().c_str(), "rb"); if(code_text == NULL){ printf("%s异常%s:\t无法读取指令文件,或许测试代码[%s]是空的?\n", PURPLECOLOR, ENDCOLOR, test_case.filename().string().c_str()); count_info.exception(); continue; } read_count = fread(text_buffer + text_start, 1, 10000 - text_start, code_text); fclose(code_text); sprintf(text_buffer + text_start + read_count, "\n1000ffff\n00000000"); content->SetText(text_buffer); xml_doc.SaveFile(circ_path.string().c_str()); #ifdef _WIN32 sprintf(command_buffer, "%s %s", config.ps_.c_str(), command_path.string().c_str()); #else sprintf(command_buffer, LOGISIM_COMMAND); if(config.debug) printf("线程%d: 准备执行仿真指令[%s]\n", id, command_buffer); #endif system(command_buffer); if(config.debug) printf("线程%d: 正在解析您的 CPU 给出的输出\n", id); temp_out = fopen(temp_out_path.string().c_str(), "r"); out = fopen(out_path.string().c_str(), "w"); ret = LogisimInterpreter::interpret(temp_out, out); fclose(temp_out); fclose(out); if(ret == ERROR_INVALID_LOGISIM_OUTPUT){ printf("在解析 Logisim 仿真输出时出现了错误\n\t清确保您设计的接口数量排列和定义符合要求\n"); exit(ERROR_INVALID_LOGISIM_OUTPUT); }else if(ret == ERROR_DOUBTFUL_DESIGN) doubtful = true; else doubtful = false; if(config.debug) printf("线程%d: 正在比对您的结果和标准结果\n", id); ans.open(ans_path); your_ans.open(out_path); if(!ans.is_open() || !your_ans.is_open()){ printf("%s异常%s:\t无法读取输出文件%s\n", PURPLECOLOR, test_case.filename().string().c_str(), ENDCOLOR); count_info.exception(); continue; } ret = AnswerComparator::compare(your_ans, ans, comment); ans.close(); your_ans.close(); if(ret == AnswerComparator::PASS){ if(doubtful){ printf("%s通过?%s:\t%s\n\t您的 CPU 的输出与标准一致,但从未同时(在同一周期)出现内存和寄存器写入\n\t这可能是本组数据的问题,例如指令间距离很大或无访存\n\t但还请留意是否确实为流水线设计\n", YELLOWCOLOR, ENDCOLOR, test_case.filename().string().c_str()); count_info.doubt(); }else{ printf("%s通过%s:\t%s\n", GREENCOLOR, ENDCOLOR, test_case.filename().string().c_str()); count_info.pass(); } }else if(ret == AnswerComparator::FAIL){ printf("%s失败%s:\t%s: %s\n", REDCOLOR, ENDCOLOR, test_case.filename().string().c_str(), comment.c_str()); count_info.fail(); }else if(ret == AnswerComparator::EXCEPTION){ printf("%s异常%s:\t%s: %s\n", PURPLECOLOR, ENDCOLOR, test_case.filename().string().c_str(), comment.c_str()); count_info.exception(); } } if(config.cleanup){ if(config.debug) printf("线程%d: 工作已结束,正在尝试清理临时文件[%s]\n", id, work_dir.string().c_str()); try{ fs::remove_all(work_dir); if(config.debug) printf("线程%d: 文件已清理\n", id); }catch(const exception& e){ if(config.debug) printf("线程%d: 在清理中遇到了问题: %s\n", id, e.what()); } } if(config.debug) printf("线程%d: 正在退出\n", id); } int main(int argc, char** argv){ Configuration config; if(getConfiguration(argc, argv, config) != ERROR_OK){ printf("错误: 未识别的选项\n\n"); showHelp(); return ERROR_INVALID_OPTION; } if(config.show_help_){ showHelp(); return ERROR_OK; } if(verifyConfiguration(config) != ERROR_OK) return ERROR_INVALID_OPTION; printf( "您的设计位于: %s\n测试程序目录位于: %s\n用于调用Mars的命令: %s\n用于调用Logisim的命令: %s\n使用的线程数: %d\n仿真超时为(秒): %d\n", config.circuit_.c_str(), config.test_dir_.c_str(), config.mars_.c_str(), config.logisim_.c_str(), config.thread_limit_, config.timeout_ ); printf("================================================================================\n\n"); vector<thread> threads; FileAssigner file_assigner(config.test_dir_.c_str()); CountInfo count_info; srand(time(NULL)); unsigned int nonce_base = rand(); for(unsigned int i = 1; i < config.thread_limit_; ++i) threads.push_back(thread(functionalThread, ref(file_assigner), ref(config), ref(count_info), nonce_base + i)); functionalThread(file_assigner, config, count_info, nonce_base + config.thread_limit_); for(auto& t: threads) t.join(); printf("\n================================================================================\n"); count_info.getScore(); return 0; }
38
224
0.547259
Snake52996
8f8952eca6e0bad2496f4d58571c7f69624452be
1,706
cpp
C++
src/Engine/PieceTypes/ChuShogi/FreeBoar.cpp
jweathers777/mShogi
941cd4dc37e6e6210d4f993c96a553753e228b19
[ "BSD-3-Clause" ]
4
2015-12-24T04:52:48.000Z
2021-11-09T11:31:36.000Z
src/Engine/PieceTypes/ChuShogi/FreeBoar.cpp
jweathers777/mShogi
941cd4dc37e6e6210d4f993c96a553753e228b19
[ "BSD-3-Clause" ]
null
null
null
src/Engine/PieceTypes/ChuShogi/FreeBoar.cpp
jweathers777/mShogi
941cd4dc37e6e6210d4f993c96a553753e228b19
[ "BSD-3-Clause" ]
null
null
null
//////////////////////////////////////////////////////////////////////////// // Name: FreeBoar.cpp // Description: Implementation for a class that represents a free boar // Created: 08/31/2004 09:44:11 Eastern Daylight Time // Last Updated: $Date: 2004/09/18 22:23:06 $ // Revision: $Revision: 1.1 $ // Author: John Weathers // Email: hotanguish@hotmail.com // Copyright: (c) 2004 John Weathers //////////////////////////////////////////////////////////////////////////// // mShogi header files #include "FreeBoar.hpp" #include "Piece.hpp" #include "Move.hpp" #include "Board.hpp" using std::vector; using std::string; //-------------------------------------------------------------------------- // Class: FreeBoar // Method: FreeBoar // Description: Constructs an instance of a free boar //-------------------------------------------------------------------------- FreeBoar::FreeBoar(Board* board, int value, int typevalue) { mpBoard = board; mValue = value; mTypeValue = typevalue; mSize = mpBoard->GetSize(); mNotation = "FBo"; mNames[0] = "Free Boar"; mNames[1] = "Honchu"; mDescription = "Moves any number of squares in any direction except vertically"; // Set the size of the directions vector mDirections.resize(DIRECTION_COUNT); // Set up the directional method pointers mDirections[NORTHWEST] = &Board::NorthWest; mDirections[NORTHEAST] = &Board::NorthEast; mDirections[WEST] = &Board::West; mDirections[EAST] = &Board::East; mDirections[SOUTHWEST] = &Board::SouthWest; mDirections[SOUTHEAST] = &Board::SouthEast; // Initialize the attack patterns InitAttackPatterns(); }
32.807692
76
0.551583
jweathers777
8f93bdd147f9365152cbd18032726d0b1bd8e262
4,278
cc
C++
sigma_boron_dec_heinbach_simon.cc
bjbuckman/galprop_bb_
076b168f7475b3ba9fb198b6ec2df7be66b1763c
[ "MIT" ]
null
null
null
sigma_boron_dec_heinbach_simon.cc
bjbuckman/galprop_bb_
076b168f7475b3ba9fb198b6ec2df7be66b1763c
[ "MIT" ]
null
null
null
sigma_boron_dec_heinbach_simon.cc
bjbuckman/galprop_bb_
076b168f7475b3ba9fb198b6ec2df7be66b1763c
[ "MIT" ]
null
null
null
//**.****|****.****|****.****|****.****|****.****|****.****|****.****|****.****| // * sigma_boron_dec_heinbach_simon.cc * galprop package * 4/14/2000 //**"****!****"****!****"****!****"****!****"****!****"****!****"****!****"****| using namespace std;//AWS20050624 #include<iostream> double sigma_boron_dec_heinbach_simon(int IZ,int IA,int JZ,int JA,double EJ) { /* Heinbach and Simon 1995 ApJ 441, 209 Table 1 This gives 12C,16O -> 10C+10B, 11C+11B from a fit to experimental data In this subroutine the cross-sections are not split into 10C,10B,11C,11B, but the full decayed cross section is returned (cf routine sigma_boron_heinbach_simon where this split is made) EJ= kinetic energy per nucleon of 12C of 16O */ #define npoints 17 // sig_12_10 12C->10C+10B // sig_12_11 12C->11C+11B // sig_16_10 16O->10C+10B // sig_16_11 16O->11C+11B double QJ; int iuse,ie; //cout<< ">>>> sigma_boron_dec_heinbach_simon"<<endl; iuse=0; // NB here was an error in f90 version if(IA==12 && IZ == 6 && JA == 10 && JZ == 5)iuse=1;//12C->10B if(IA==12 && IZ == 6 && JA == 11 && JZ == 5)iuse=1;//12C->11B if(IA==16 && IZ == 8 && JA == 10 && JZ == 5)iuse=1;//16O->10B if(IA==16 && IZ == 8 && JA == 11 && JZ == 5)iuse=1;//16O->11B if (iuse == 0 ) { QJ=-99999.; return QJ; } float e[] = { 100.,200.,300.,400.,500.,600.,700.,800.,900.,1000.,1200.,1400.,1600.,1800.,2000.,2400.,2800.}; float sig_12_10[]= { 21.1,16.8,16.1,16.6,22.5,24.6,24.3,23.7,23.2,22.8, 22.0, 21.5, 21.3, 21.1, 20.8, 20.8, 20.8 }; float sig_12_11[]= { 67.4,59.2,62.7,65.9,67.5,64.3,61.2,57.9,53.9,51.3, 52.7, 55.4, 57.1, 56.8, 56.6, 56.4, 56.1 }; float sig_16_10[]= { 13.1, 8.2, 9.1, 9.8, 9.8, 9.9, 9.9, 9.9, 9.9, 9.9, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0 }; float sig_16_11[]= { 32.0,17.0,22.3,26.0,26.0,26.0,26.0,26.0,26.0,26.0, 26.0, 26.0, 26.0, 26.0, 26.0, 26.0, 26.0 }; ie=0; for(ie=0; ie<npoints-1; ie++) { if(EJ > e[ie] && EJ <= e[ie+1] ) break; } //cout<< EJ<<" "<<ie<<" "<<e[ie]<<endl; float *sig_buff; if (IA ==12 && JA == 10)sig_buff=sig_12_10; if (IA ==12 && JA == 11)sig_buff=sig_12_11; if (IA ==16 && JA == 10)sig_buff=sig_16_10; if (IA ==16 && JA == 11)sig_buff=sig_16_11; QJ=sig_buff[ie]+(EJ-e[ie])* ( sig_buff[ie+1]-sig_buff[ie] ) /(e[ie+1]-e[ie]); if(EJ <= e[0] ) QJ= sig_buff[0]; if(EJ >= e[npoints-1]) QJ= sig_buff[npoints-1]; //cout<< IZ<<" "<<IA<<" "<<JZ<<" "<<JA<<" "<<EJ<<" "<<QJ<<endl; //cout<< "<<<<<< sigma_boron_dec_heinbach_simon"<<endl; return QJ; } int test_sigma_boron_dec_heinbach_simon() { cout<< ">>>> test_boron_dec_heinbach_simon"<<endl; int IZ; int IA; int JZ; int JA; double EJ; IA=12; IZ=6; JA=10; JZ=5; for(EJ=50.; EJ<1.e5; EJ*=1.5) { cout<<"IZ IA JZ JA EJ sigma "<< IZ<<" "<<IA<<" "<<JZ<<" "<<JA<<" "<<EJ<<" "<< sigma_boron_dec_heinbach_simon(IZ,IA,JZ,JA ,EJ)<<endl; } cout<<endl; IA=12; IZ=6; JA=11; JZ=5; for(EJ=50.; EJ<1.e5; EJ*=1.5) { cout<<"IZ IA JZ JA EJ sigma "<< IZ<<" "<<IA<<" "<<JZ<<" "<<JA<<" "<<EJ<<" "<< sigma_boron_dec_heinbach_simon(IZ,IA,JZ,JA ,EJ)<<endl; } cout<<endl; IA=16; IZ=8; JA=10; JZ=5; for(EJ=50.; EJ<1.e5; EJ*=1.5) { cout<<"IZ IA JZ JA EJ sigma "<< IZ<<" "<<IA<<" "<<JZ<<" "<<JA<<" "<<EJ<<" "<< sigma_boron_dec_heinbach_simon(IZ,IA,JZ,JA ,EJ)<<endl; } cout<<endl; IA=16; IZ=8; JA=11; JZ=5; for(EJ=50.; EJ<1.e5; EJ*=1.5) { cout<<"IZ IA JZ JA EJ sigma "<< IZ<<" "<<IA<<" "<<JZ<<" "<<JA<<" "<<EJ<<" "<< sigma_boron_dec_heinbach_simon(IZ,IA,JZ,JA ,EJ)<<endl; } cout<<endl; JA=9; // test case where cross section undefined cout<<" undefined case:IZ IA JZ JA EJ sigma "<< IZ<<" "<<IA<<" "<<JZ<<" "<<JA<<" "<<EJ<<" "<< sigma_boron_dec_heinbach_simon(IZ,IA,JZ,JA ,EJ)<<endl; cout<< "<<<< test_boron_dec_heinbach_simon"<<endl; return 0; }
30.126761
121
0.492052
bjbuckman
8f94369d72cb462a6d8bb3b9ddb1e7226ad368d6
751
cpp
C++
pub/1381.cpp
BashuMiddleSchool/Bashu_OnlineJudge_Code
4707a271e6658158a1910b0e6e27c75f96841aca
[ "MIT" ]
2
2021-05-01T15:51:58.000Z
2021-05-02T15:19:49.000Z
pub/1381.cpp
BashuMiddleSchool/Bashu_OnlineJudge_Code
4707a271e6658158a1910b0e6e27c75f96841aca
[ "MIT" ]
1
2021-05-16T15:04:38.000Z
2021-09-19T09:49:00.000Z
pub/1381.cpp
BashuMiddleSchool/Bashu_OnlineJudge_Code
4707a271e6658158a1910b0e6e27c75f96841aca
[ "MIT" ]
null
null
null
#include<iostream> #include<algorithm> #include<cstdlib> using namespace std; const int N = 20; const int xx[2] = {0,-1} , yy[2] = {-1,0}; int f[N][N][N][N],a[N][N]; int x,y,z,nx1,nx2,ny1,ny2,n; int main() { cin >> n; cin >> x >> y >> z; while(x) { a[x][y]=z; cin >> x >> y >> z; } for(int x1=1;x1<=n;++x1) { for(int y1=1;y1<=n;++y1) { for(int x2=1;x2<=n;++x2) { for(int y2=1;y2<=n;++y2) { for(int i=0;i<2;++i) for(int j=0;j<2;++j) { nx1=x1+xx[i]; ny1=y1+yy[i]; nx2=x2+xx[j]; ny2=y2+yy[j]; f[x1][y1][x2][y2] = max(f[x1][y1][x2][y2],f[nx1][ny1][nx2][ny2]); } f[x1][y1][x2][y2] +=a[x1][y1] + a[x2][y2]; if(x1==x2 && y1 == y2) f[x1][y2][x2][y2] -= a[x2][y2]; } } } } cout << f[n][n][n][n]; return 0; }
19.763158
68
0.475366
BashuMiddleSchool
8f9a5b10c438d9cd441f23f290b85c55b8400313
279
hpp
C++
exercises/5/ex03/task2/array.hpp
triffon/oop-2019-20
db199631d59ddefdcc0c8eb3d689de0095618f92
[ "MIT" ]
19
2020-02-21T16:46:50.000Z
2022-01-26T19:59:49.000Z
exercises/5/ex03/task2/array.hpp
triffon/oop-2019-20
db199631d59ddefdcc0c8eb3d689de0095618f92
[ "MIT" ]
1
2020-03-14T08:09:45.000Z
2020-03-14T08:09:45.000Z
exercises/5/ex03/task2/array.hpp
triffon/oop-2019-20
db199631d59ddefdcc0c8eb3d689de0095618f92
[ "MIT" ]
11
2020-02-23T12:29:58.000Z
2021-04-11T08:30:12.000Z
#ifndef __ARRAY_HPP__ #define __ARRAY_HPP__ #include "company.hpp" class Array { private: Company * data; int count; int reservedCount; public: Array(); ~Array(); void push(Company &); Company & get(int); int size(); }; #endif
12.681818
26
0.584229
triffon
8f9d703a052a256a7b68ec73544c8fd39cd478bd
1,271
hpp
C++
src/ruby/embedded.hpp
bburns/cppagent
c1891c631465ebc9b63a4b3c627727ca3da14ee8
[ "Apache-2.0" ]
null
null
null
src/ruby/embedded.hpp
bburns/cppagent
c1891c631465ebc9b63a4b3c627727ca3da14ee8
[ "Apache-2.0" ]
null
null
null
src/ruby/embedded.hpp
bburns/cppagent
c1891c631465ebc9b63a4b3c627727ca3da14ee8
[ "Apache-2.0" ]
null
null
null
// // Copyright Copyright 2009-2022, AMT – The Association For Manufacturing Technology (“AMT”) // 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. // #pragma once #include <boost/asio.hpp> #include <memory> #include "utilities.hpp" namespace Rice { class Module; class Class; } // namespace Rice namespace mtconnect { class Agent; namespace ruby { class RubyVM; class Embedded { public: Embedded(Agent *agent, const ConfigOptions &options); ~Embedded(); protected: Agent *m_agent; ConfigOptions m_options; boost::asio::io_context *m_context = nullptr; std::unique_ptr<RubyVM> m_rubyVM; }; } // namespace ruby } // namespace mtconnect
25.938776
92
0.685287
bburns
8fa3766c495311603d527055d8217e0e3bf77f30
4,116
cpp
C++
src/com/cyosp/mpa/api/rest/v1/Login.cpp
cyosp/MPA
f640435c483dcbf7bfe7ff7887a25e6c76612528
[ "BSD-3-Clause" ]
null
null
null
src/com/cyosp/mpa/api/rest/v1/Login.cpp
cyosp/MPA
f640435c483dcbf7bfe7ff7887a25e6c76612528
[ "BSD-3-Clause" ]
null
null
null
src/com/cyosp/mpa/api/rest/v1/Login.cpp
cyosp/MPA
f640435c483dcbf7bfe7ff7887a25e6c76612528
[ "BSD-3-Clause" ]
null
null
null
/* * Login.cpp * * Created on: 2017-01-04 * Author: CYOSP */ #include <com/cyosp/mpa/api/rest/v1/Login.hpp> namespace mpa_api_rest_v1 { string Login::URL_STRING_PATH_IDENTIFIER = "login"; Login::Login(HttpRequestType httpRequestType, ActionType actionType, const map<string, string>& argvals, vector<std::pair<string, int> > urlPairs) : MPAO(httpRequestType, actionType, argvals, urlPairs) { restrictedAccess = false; } bool Login::areGetParametersOk() { return false; } bool Login::arePostLoginParametersOk() { bool ret = false; if( argvals.find("login") != argvals.end() && argvals.find("pwd") != argvals.end() ) ret = true; return ret; } bool Login::arePostAddParametersOk() { return false; } string Login::executeGetRequest(ptree & root) { string ret = MPAO::DEFAULT_JSON_ID; return ret; } string Login::executePostLoginRequest(ptree & root) { string ret = MPAO::DEFAULT_JSON_ID; string login = argvals.find("login")->second; string pwd = argvals.find("pwd")->second; string locale = MPA::DEFAULT_LOCALE; if( argvals.find("locale") != argvals.end() ) locale = argvals.find("locale")->second; // There is an administrator user defined if( mpa::User::isAdminRegistered() ) { try { mpapo::User user = mpa::User::getUser(login); if( user.pwdErrNbr < MPA::PWD_SECURITY_ERROR_NBR ) { if( user.password.value().compare(pwd) == 0 ) { // Reset password error because password used is correct if( user.pwdErrNbr != 0 ) { user.resetPwdErr(); user.store(); } // Create and register token Token token = Token(user.login); MPAOFactory::getInstance()->getTokenList().insert( std::pair<string, string>(token.getValue(), token.getUserLogin())); ret = token.getValue(); } else { // TODO : Message for fail2ban or same program using remote IP MPA_LOG_TRIVIAL(info, "Account: " + user.login + " has password failed"); // Register this password error user.addPwdErr(); user.store(); ret = MPA::getInstance()->getResourceBundle().translate(BAD_PASSWORD, locale); } } else { // TODO : Message for fail2ban or same program using remote IP MPA_LOG_TRIVIAL(error, "Account: " + user.login + " blocked"); ret = MPA::getInstance()->getResourceBundle().translate(USER_ACCOUNT_BLOCKED, locale); } } catch( NotFound & e ) { MPA_LOG_TRIVIAL(trace, "User authentication fails due to login error"); ret = BAD_IDENTIFIER; } } else { MPA_LOG_TRIVIAL(trace, ADMIN_ACCOUNT_NOT_DEFINED); ret = MPA::getInstance()->getResourceBundle().translate(ADMIN_ACCOUNT_NOT_DEFINED, locale); } return ret; } string Login::executePostAddRequest(ptree & root) { string ret = MPAO::DEFAULT_JSON_ID; return ret; } string Login::executePostDeleteRequest(ptree & root) { string ret = MPAO::DEFAULT_JSON_ID; return ret; } string Login::executePostUpdateRequest(ptree & root) { //MPA_LOG_TRIVIAL( trace , "Start" ); string ret = MPAO::DEFAULT_JSON_ID; return ret; } Login::~Login() { } }
27.624161
108
0.505102
cyosp
8fa533e74a2f079c4c9f13991605741186f68aa5
322
cpp
C++
Example/ref_01/main.cpp
KwangjoJeong/Boost
29c4e2422feded66a689e3aef73086c5cf95b6fe
[ "MIT" ]
null
null
null
Example/ref_01/main.cpp
KwangjoJeong/Boost
29c4e2422feded66a689e3aef73086c5cf95b6fe
[ "MIT" ]
null
null
null
Example/ref_01/main.cpp
KwangjoJeong/Boost
29c4e2422feded66a689e3aef73086c5cf95b6fe
[ "MIT" ]
null
null
null
#include <boost/ref.hpp> #include <vector> #include <algorithm> #include <functional> #include <iostream> void print(std::ostream &os, int i) { os << i << std::endl; } int main() { std::vector<int> v{1, 3, 2}; std::for_each(v.begin(), v.end(), std::bind(print, boost::ref(std::cout), std::placeholders::_1)); }
18.941176
68
0.627329
KwangjoJeong
8face490cdf582bd237ec19c65a9c6f8727c0f79
122
cpp
C++
C++Now 2017/Mocking Examples/assembly/test.cpp
dascandy/presentations
7a004ba5e485900a7c81e7a1116b098d24331075
[ "Apache-2.0" ]
2
2017-05-18T19:48:51.000Z
2017-11-10T16:11:43.000Z
C++Now 2017/Mocking Examples/assembly/test.cpp
dascandy/presentations
7a004ba5e485900a7c81e7a1116b098d24331075
[ "Apache-2.0" ]
null
null
null
C++Now 2017/Mocking Examples/assembly/test.cpp
dascandy/presentations
7a004ba5e485900a7c81e7a1116b098d24331075
[ "Apache-2.0" ]
null
null
null
#include "x.h" int main() { X x; X* y = new X(); X* z = new X(); x.func(); y->func(); delete y; z->~X(); }
10.166667
17
0.401639
dascandy
8faf8ec9dee5eff66a8819319507f025ee52ede1
2,626
cpp
C++
MainWindow.cpp
MarkVTech/CircularGauge
58c002ad992693b0d924b49675cc9076d011775a
[ "MIT" ]
1
2021-03-13T11:59:35.000Z
2021-03-13T11:59:35.000Z
MainWindow.cpp
MarkVTech/CircularGauge
58c002ad992693b0d924b49675cc9076d011775a
[ "MIT" ]
null
null
null
MainWindow.cpp
MarkVTech/CircularGauge
58c002ad992693b0d924b49675cc9076d011775a
[ "MIT" ]
3
2019-09-29T09:22:29.000Z
2021-04-23T08:00:23.000Z
#include <functional> #include <QGraphicsScene> #include <QGraphicsEllipseItem> #include <QDebug> #include <QSlider> #include <QColorDialog> #include "MainWindow.h" #include "ui_MainWindow.h" #include "RoundGaugeGraphicsObject.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); mScene = new QGraphicsScene(0, 0, 640, 480); mScene->setBackgroundBrush(QBrush("black")); ui->graphicsView->setDragMode(QGraphicsView::RubberBandDrag); ui->graphicsView->setRenderHint(QPainter::Antialiasing); ui->graphicsView->setScene(mScene); mRoundGauge = new RoundGaugeGraphicsObject(QRectF(50, 50, 200, 200)); mScene->addItem(mRoundGauge); mRoundGauge->setPos(QPointF(250, 0)); mRoundGauge->setGlowRingColor(QColor("magenta")); mRoundGauge->setValueColor(QColor("purple")); mRoundGauge->setFontColor(QColor("yellow")); mRoundGauge->setValue(ui->doubleSpinBox->value()); mRoundGauge->setRange(ui->doubleSpinBox->minimum(), ui->doubleSpinBox->maximum()); using namespace std::placeholders; connect(ui->valueColorButton, &QPushButton::clicked, [=]() { setAGaugeColor(ui->valueColorButton); } ); connect(ui->glowRingColorButton, &QPushButton::clicked, [=]() { setAGaugeColor(ui->glowRingColorButton); } ); connect(ui->fontColorButton, &QPushButton::clicked, [=]() { setAGaugeColor(ui->fontColorButton); } ); connect(ui->outerRingColorButton, &QPushButton::clicked, [=]() { setAGaugeColor(ui->outerRingColorButton); } ); } MainWindow::~MainWindow() { delete ui; } void MainWindow::on_pushButton_clicked() { mRoundGauge->setValue(ui->doubleSpinBox->value()); mRoundGauge->setGlowRingEnabled(ui->glowRingEnabledCheck->checkState()); } void MainWindow::setAGaugeColor(QPushButton *button) { QColor color = QColorDialog::getColor(); //QString qss = QString("color: rgba(%1, %2, %3, %4)"). //arg(color.red()).arg(color.green()).arg(color.blue()).arg(color.alpha()); //button->setStyleSheet(qss); if ( button->objectName() == "glowRingColorButton" ) mRoundGauge->setGlowRingColor(color); else if ( button->objectName() == "fontColorButton" ) mRoundGauge->setFontColor(color); else if ( button->objectName() == "valueColorButton" ) mRoundGauge->setValueColor(color); else if ( button->objectName() == "outerRingColorButton" ) mRoundGauge->setOuterRingColor(color); }
32.02439
88
0.659177
MarkVTech
8fb826fc91c26c9daaaa66f40203f9dd92a931e9
2,548
cpp
C++
TermPaper/ContactListener.cpp
VasiliyMatutin/2DPlatformer
70211cdb10b2746aefed3890723b23aef5de0099
[ "MIT" ]
null
null
null
TermPaper/ContactListener.cpp
VasiliyMatutin/2DPlatformer
70211cdb10b2746aefed3890723b23aef5de0099
[ "MIT" ]
null
null
null
TermPaper/ContactListener.cpp
VasiliyMatutin/2DPlatformer
70211cdb10b2746aefed3890723b23aef5de0099
[ "MIT" ]
null
null
null
#include "ContactListener.h" void MyContactListener::BeginContact(b2Contact * contact) { void* bodyUserData = contact->GetFixtureA()->GetBody()->GetUserData(); if (bodyUserData != nullptr && !contact->GetFixtureB()->GetBody()->GetFixtureList()->IsSensor()) { if (contact->GetFixtureA()->GetBody()->GetType() == b2BodyType::b2_staticBody) { for (int i = 0; i < 2; i++) { to_destroy_list.push_back(static_cast<NonStaticObj*>(contact->GetFixtureB()->GetBody()->GetUserData())); } } else { static_cast<ContactObject*>(bodyUserData)->contactEvent(contact, 1); } } bodyUserData = contact->GetFixtureB()->GetBody()->GetUserData(); if (bodyUserData != nullptr && !contact->GetFixtureA()->GetBody()->GetFixtureList()->IsSensor()) { if (contact->GetFixtureB()->GetBody()->GetType() == b2BodyType::b2_staticBody) { for (int i = 0; i < 2; i++) { to_destroy_list.push_back(static_cast<NonStaticObj*>(contact->GetFixtureA()->GetBody()->GetUserData())); } } else { static_cast<ContactObject*>(bodyUserData)->contactEvent(contact, 1); } } } void MyContactListener::EndContact(b2Contact * contact) { void* bodyUserData = contact->GetFixtureA()->GetBody()->GetUserData(); if (bodyUserData != nullptr && !contact->GetFixtureB()->GetBody()->GetFixtureList()->IsSensor() && contact->GetFixtureA()->GetBody()->GetType() != b2BodyType::b2_staticBody) { static_cast<ContactObject*>(bodyUserData)->contactEvent(contact, 0); } bodyUserData = contact->GetFixtureB()->GetBody()->GetUserData(); if (bodyUserData != nullptr && !contact->GetFixtureA()->GetBody()->GetFixtureList()->IsSensor() && contact->GetFixtureB()->GetBody()->GetType() != b2BodyType::b2_staticBody) { static_cast<ContactObject*>(bodyUserData)->contactEvent(contact, 0); } } void MyContactListener::PostSolve(b2Contact * contact, const b2ContactImpulse * impulse) { if (contact->GetFixtureA()->GetBody()->GetType() == b2BodyType::b2_dynamicBody && impulse->normalImpulses[0] > contact->GetFixtureA()->GetBody()->GetMass()*9) { to_destroy_list.push_back(static_cast<NonStaticObj*>(contact->GetFixtureA()->GetBody()->GetUserData())); } else if (contact->GetFixtureB()->GetBody()->GetType() == b2BodyType::b2_dynamicBody && impulse->normalImpulses[0] > contact->GetFixtureB()->GetBody()->GetMass() * 9) { to_destroy_list.push_back(static_cast<NonStaticObj*>(contact->GetFixtureB()->GetBody()->GetUserData())); } } std::list<NonStaticObj*>* MyContactListener::getToDestroyListPtr() { return &to_destroy_list; }
36.927536
174
0.69898
VasiliyMatutin
8fb96913f1707951eaf460d61dc41d26ba1cc26a
1,208
cpp
C++
src/prod/src/data/txnreplicator/statemanager/TestOperationContext.cpp
vishnuk007/service-fabric
d0afdea185ae932cc3c9eacf179692e6fddbc630
[ "MIT" ]
2,542
2018-03-14T21:56:12.000Z
2019-05-06T01:18:20.000Z
src/prod/src/data/txnreplicator/statemanager/TestOperationContext.cpp
vishnuk007/service-fabric
d0afdea185ae932cc3c9eacf179692e6fddbc630
[ "MIT" ]
994
2019-05-07T02:39:30.000Z
2022-03-31T13:23:04.000Z
src/prod/src/data/txnreplicator/statemanager/TestOperationContext.cpp
vishnuk007/service-fabric
d0afdea185ae932cc3c9eacf179692e6fddbc630
[ "MIT" ]
300
2018-03-14T21:57:17.000Z
2019-05-06T20:07:00.000Z
// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See License.txt in the repo root for license information. // ------------------------------------------------------------ #include "stdafx.h" #include <boost/test/unit_test.hpp> #include "Common/boost-taef.h" using namespace StateManagerTests; TestOperationContext::SPtr TestOperationContext::Create(__in LONG64 stateProviderId, __in KAllocator & allocator) noexcept { SPtr result = _new(TEST_OPERATIONCONTEXT, allocator) TestOperationContext(stateProviderId); VERIFY_IS_NOT_NULL(result, L"Must not be nullptr"); VERIFY_IS_TRUE(NT_SUCCESS(result->Status())); return result; } bool TestOperationContext::get_IsUnlocked() const { return isUnlocked_; } void TestOperationContext::Unlock(LONG64 stateProviderId) noexcept { VERIFY_ARE_EQUAL(stateProviderId, stateProviderId); VERIFY_IS_FALSE(isUnlocked_); isUnlocked_ = true; } TestOperationContext::TestOperationContext(__in LONG64 stateProviderId) noexcept : stateProviderId_(stateProviderId) { } TestOperationContext::~TestOperationContext() { }
27.454545
122
0.697848
vishnuk007
2631197118b7a5cfbc5c9f6573b3038b72414bce
556
cc
C++
example/index_manager.cc
chao-he/tictac
13b4b0289e8ac8e1d1764f99152ad0327ffa93d4
[ "Apache-2.0" ]
null
null
null
example/index_manager.cc
chao-he/tictac
13b4b0289e8ac8e1d1764f99152ad0327ffa93d4
[ "Apache-2.0" ]
null
null
null
example/index_manager.cc
chao-he/tictac
13b4b0289e8ac8e1d1764f99152ad0327ffa93d4
[ "Apache-2.0" ]
null
null
null
#include "index_manager.h" IndexManager::IndexManager() : doc_index_(NULL) , loc_index_(NULL) , ip_index_(NULL) { } IndexManager::~IndexManager() { if (doc_index_) { delete doc_index_; doc_index_ = NULL; } if (loc_index_) { delete loc_index_; loc_index_ = NULL; } if (ip_index_) { delete ip_index_; ip_index_ = NULL; } } void IndexManager::Init(const std::string& dbpath) { doc_index_ = new LevelDB(dbpath + "/doc"); loc_index_ = new LevelDB(dbpath + "/loc"); ip_index_ = new LevelDB(dbpath + "/ip"); }
19.172414
52
0.643885
chao-he
26321acde4283b2926a279110594efebf011397c
580
hpp
C++
src/Base/NonCopyable.hpp
xenginez/XE
7f536c906460c7062cad5b8e09a644812cabf6d3
[ "MIT" ]
2
2019-06-10T06:51:27.000Z
2021-11-20T19:57:46.000Z
src/Base/NonCopyable.hpp
xenginez/XE
7f536c906460c7062cad5b8e09a644812cabf6d3
[ "MIT" ]
1
2019-07-12T03:05:02.000Z
2019-08-12T12:01:06.000Z
src/Base/NonCopyable.hpp
xenginez/XE
7f536c906460c7062cad5b8e09a644812cabf6d3
[ "MIT" ]
null
null
null
/*! * \file NonCopyable.hpp * * \author ZhengYuanQing * \date 2019/01/23 * \email zhengyuanqing.95@gmail.com * */ #ifndef __NONCOPYABLE_HPP__51063BED_9A8D_4E17_8341_3300C518CD58 #define __NONCOPYABLE_HPP__51063BED_9A8D_4E17_8341_3300C518CD58 #include "Type.h" BEG_XE_NAMESPACE class XE_API NonCopyable { public: NonCopyable() = default; ~NonCopyable() = default; private: NonCopyable( const NonCopyable& ) = delete; NonCopyable& operator =( const NonCopyable& ) = delete; }; END_XE_NAMESPACE #endif // __NONCOPYABLE_HPP__51063BED_9A8D_4E17_8341_3300C518CD58
19.333333
65
0.772414
xenginez
2636519bc7b4e0cce86f90e86b996eb545f2b515
19,608
cpp
C++
src/Engine/collision/Collision.cpp
FraMecca/Coccode
e302c400e0bff40859c65ccefac923133c770861
[ "BSD-3-Clause" ]
null
null
null
src/Engine/collision/Collision.cpp
FraMecca/Coccode
e302c400e0bff40859c65ccefac923133c770861
[ "BSD-3-Clause" ]
null
null
null
src/Engine/collision/Collision.cpp
FraMecca/Coccode
e302c400e0bff40859c65ccefac923133c770861
[ "BSD-3-Clause" ]
null
null
null
/* * ====================== Collision.cpp ========================== * -- tpr -- * CREATE -- 2019.09.01 * MODIFY -- * ---------------------------------------------------------- */ #include "Collision.h" #include "pch.h" //-------------------- Engine --------------------// #include "AnimActionPos.h" #include "GameObj.h" #include "GameObjMesh.h" #include "MapCoord.h" #include "MapEnt.h" #include "calc_colliPoints.h" #include "collide_oth.h" #include "esrc_chunk.h" #include "esrc_coordinate.h" #include "esrc_gameObj.h" #include "esrc_time.h" //===== static =====// std::vector<glm::dvec2> Collision::obstructNormalVecs{}; std::set<NineDirection> Collision::confirmedAdjacentMapEnts{}; std::unordered_map<goid_t, glm::dvec2> Collision::adjacentCirBeGos{}; std::unordered_set<goid_t> Collision::begoids{}; std::unordered_set<goid_t> Collision::begoids_circular{}; std::multiset<double> Collision::tVals{}; std::vector<IntVec2> Collision::mapEnts_in_scanBody{}; // [*main-thread*] void Collision::init_for_static() noexcept { init_for_colliOth_inn(); //--- Collision::obstructNormalVecs.reserve(100); Collision::adjacentCirBeGos.reserve(100); Collision::begoids.reserve(100); Collision::begoids_circular.reserve(100); Collision::mapEnts_in_scanBody.reserve(100); //... } /* =========================================================== * detect_moveCollide * ----------------------------------------------------------- * 对于 移动碰撞检测来说: * dogo 必须是 majorGo: Cir 类型 * bego 可以为 Cir / Squ 2种类型之一 * Arc 从不参与 moveCollide, 仅参与 skillCollide * Nil 从不参与 moveCollide * --- * 目前版本的 moveCollide 不存在任何 回调函数,草地不会因为 go 的踩过而摇动 * 这是最干净的实现。任何 因为踩过而引发的 变化,统统由 skillCollide 来实现(目前也不推荐这么做...) */ glm::dvec2 Collision::detect_moveCollide(const glm::dvec2& moveVec_) { GameObj& dogoRef = this->goRef; tprAssert(dogoRef.family == GameObjFamily::Major); tprAssert(dogoRef.get_colliderType() == ColliderType::Circular); //------------- glm::dvec2 moveVec = limit_moveSpeed(moveVec_); //----- dogo.isDoPass -----// // isMoveCollide = false if (dogoRef.get_collisionRef().get_isDoPass() || (!dogoRef.isMoveCollide)) { this->reSignUp_dogo_to_chunk_and_mapents(moveVec); return moveVec; } //===================// // moveCollide //===================// //----------------// // 第一阶段 auto [isAllowedToMove1, newMoveVec1] = this->collect_AdjacentBegos_and_deflect_moveVec(moveVec_); // dogo 在 起始阶段就被 阻挡了,完全无法移动 if (!isAllowedToMove1) { return glm::dvec2{ 0.0, 0.0 }; // 完全无法移动,无需重登记 chunk / mapents } moveVec = newMoveVec1; //----------------// // 第二阶段 auto [isAllowedToMove2, newMoveVec2] = this->collect_IntersectBegos_and_truncate_moveVec(moveVec); // MAJOR !!!! //--- 如果确认 dogo 完全无法移动,直接退出 --- if (!isAllowedToMove2) { return glm::dvec2(0.0, 0.0); // 完全无法移动,无需重登记 chunk / mapents } moveVec = newMoveVec2; //=====// this->reSignUp_dogo_to_chunk_and_mapents(moveVec); return moveVec; } /* 检测 dogo 起始dpos,收集所有 相邻关系的,确认可以碰撞的 begos( squ/cir ) * 计算出它们作用于 dogo 的墙壁法向量,收集到容器 * 综合这些 墙壁法向量,确认本次是否可移动,如果可以,计算出 偏转后的 moveVec * --- * return: * bool: isAllowedToMove * dvec2: if it's allowed to move, return new moveVec */ std::pair<bool, glm::dvec2> Collision::collect_AdjacentBegos_and_deflect_moveVec(const glm::dvec2& moveVec_) { GameObj& dogoRef = this->goRef; const auto& dogoDPos = dogoRef.get_dpos(); IntVec2 dogoMPos = dpos_2_mpos(dogoDPos); IntVec2 mpos{}; //--- Collision::confirmedAdjacentMapEnts.clear(); Collision::adjacentCirBeGos.clear(); Collision::obstructNormalVecs.clear(); //===================// // square begos //===================// // 所有 squ begos,需要被当作一个整体来看待 for (const auto& dir : collect_Adjacent_nearbyMapEnts(dogoDPos, dogoMPos)) { // all Adjacent mapents mpos = dogoMPos + nineDirection_2_mposOff(dir); //- 当发现某个 ent 处于非 Active 的 chunk。 // 直接跳过,最简单的处理手段 auto mapEntPair = esrc::getnc_memMapEntPtr(mpos); if (mapEntPair.first != ChunkMemState::Active) { continue; //- skip } //----- empty bego -----// goid_t squ_goid = mapEntPair.second->get_square_goid(); if (squ_goid == 0) { continue; } auto begoOpt = esrc::get_goPtr(squ_goid); tprAssert(begoOpt.has_value()); GameObj& begoRef = *begoOpt.value(); //----- isMoveCollide -----// // bego.isBePass // goAltiRange if ((!begoRef.isMoveCollide) || begoRef.get_collisionRef().get_isBePass(dogoRef.speciesId) || (!is_GoAltiRange_collide(dogoRef.get_currentGoAltiRange(), begoRef.get_currentGoAltiRange()))) { continue; } //----- collect Adjacent mapents -----// auto [insertIt, insertBool] = Collision::confirmedAdjacentMapEnts.insert(dir); tprAssert(insertBool); } //--- if (!Collision::confirmedAdjacentMapEnts.empty()) { glm::dvec2 obstructNormalVec = calc_obstructNormalVec_from_AdjacentMapEnts( moveVec_, dogoDPos, dogoMPos, Collision::confirmedAdjacentMapEnts); //-- 过滤掉 背向而行的 可能性 -- if (!is_dogo_leave_begoSquares_easy(moveVec_, obstructNormalVec)) { Collision::obstructNormalVecs.push_back(obstructNormalVec); } } //===================// // circular begos //===================// // 初步收集 所有有效 begoid // 不包含 dogo 自己 Collision::begoids_circular.clear(); for (const auto& colliPointDPosOff : get_colliPointDPosOffsRef_for_cirDogo()) { mpos = dpos_2_mpos(dogoDPos + colliPointDPosOff); //- 当发现某个 ent 处于非 Active 的 chunk。 // 直接跳过,最简单的处理手段 auto mapEntPair = esrc::getnc_memMapEntPtr(mpos); if (mapEntPair.first != ChunkMemState::Active) { continue; //- skip } for (const auto& begoid : mapEntPair.second->get_circular_goids()) { //- each cir-bego if (begoid == dogoRef.goid) { continue; } //-- skip self -- Collision::begoids_circular.insert(begoid); } } //-------- for (const auto& begoid : Collision::begoids_circular) { //- each cir-bego auto begoOpt = esrc::get_goPtr(begoid); tprAssert(begoOpt.has_value()); GameObj& begoRef = *begoOpt.value(); //----- isMoveCollide -----// // bego.isBePass // goAltiRange if ((!begoRef.isMoveCollide) || begoRef.get_collisionRef().get_isBePass(dogoRef.speciesId) || (!is_GoAltiRange_collide(dogoRef.get_currentGoAltiRange(), begoRef.get_currentGoAltiRange()))) { continue; } //-- calc and collect Adjacent begos -- Circular begoCir = begoRef.calc_circular(CollideFamily::Move); auto colliState = collideState_from_circular_2_circular(dogoDPos, begoCir, 1.0); if (colliState == CollideState::Adjacent) { Collision::adjacentCirBeGos.insert({ begoid, dogoDPos - begoRef.get_dpos() }); } } //-------- if (!Collision::adjacentCirBeGos.empty()) { bool is_leftSide_have{ false }; bool is_rightSide_have{ false }; //-- for (const auto& [iGoid, iVec] : Collision::adjacentCirBeGos) { // get go ref auto begoOpt = esrc::get_goPtr(iGoid); tprAssert(begoOpt.has_value()); GameObj& begoRef = *begoOpt.value(); //----- 过滤掉那些 背向而行 的 bego ----- if (is_dogoCircular_leave_begoCircular(moveVec_, dogoDPos, begoRef.calc_circular(CollideFamily::Move))) { continue; } glm::dvec2 innVec = calc_innVec(moveVec_, iVec); //-- 几乎和 位移 同方向 if (is_closeEnough<double>(innVec.y, 0.0, 0.01)) { return { false, glm::dvec2{} }; //- 正面遭遇阻挡,完全无法位移. } //-- (innVec.y > 0.0) ? is_leftSide_have = true : is_rightSide_have = true; //-- if (is_leftSide_have && is_rightSide_have) { return { false, glm::dvec2{} }; //- 左右都遭遇阻挡,完全无法位移. } //-- Collision::obstructNormalVecs.push_back(iVec); } } //===================// // calc deflectmoveVec //===================// if (Collision::obstructNormalVecs.empty()) { return { true, moveVec_ }; //- 也许存在相邻go,但完全不影响位移 } glm::dvec2 sum{}; for (const auto& i : Collision::obstructNormalVecs) { sum += i; } //---- 现在,sum指向 总阻力向量 的反方向 ---- glm::dvec2 newMoveVec = calc_slideMoveVec(moveVec_, sum); return { true, newMoveVec }; // 修正了方向后的 新位移 } /* return: * bool: isAllowedToMove * dvec2: if it's allowed to move, return new moveVec 修正后的位移向量( 原值/t/偏向 ) */ std::pair<bool, glm::dvec2> Collision::collect_IntersectBegos_and_truncate_moveVec(const glm::dvec2& moveVec_) { auto& dogoRef = this->goRef; const auto& dogoDPos = dogoRef.get_dpos(); IntVec2 dogoMPos = dpos_2_mpos(dogoDPos); glm::dvec2 dogeTargetDPos = dogoDPos + moveVec_; IntVec2 mpos{}; Collision::tVals.clear(); //===================// // square begos //===================// Collision::build_a_scanBody(moveVec_, dogoDPos); for (const auto& impos : Collision::mapEnts_in_scanBody) { //- 当发现某个 ent 处于非 Active 的 chunk。 // 直接跳过,最简单的处理手段 auto mapEntPair = esrc::getnc_memMapEntPtr(impos); if (mapEntPair.first != ChunkMemState::Active) { continue; //- skip } goid_t squ_goid = mapEntPair.second->get_square_goid(); if (squ_goid == 0) { continue; //- skip } // get go ref auto begoOpt = esrc::get_goPtr(squ_goid); tprAssert(begoOpt.has_value()); GameObj& begoRef = *begoOpt.value(); //----- isMoveCollide -----// // bego.isBePass // goAltiRange if ((!begoRef.isMoveCollide) || begoRef.get_collisionRef().get_isBePass(dogoRef.speciesId) || (!is_GoAltiRange_collide(dogoRef.get_currentGoAltiRange(), begoRef.get_currentGoAltiRange()))) { continue; //- skip } //-- 剔除 背向而行 -- if (is_dogo_leave_begoSquares_2(moveVec_, dogoDPos, dogoMPos, impos)) { // 严谨版 continue; //- skip } //-- 现在确认 bego 为 有效碰撞bego: // 逐个检测每个 bego,计算并收集 t 值, auto [isHaveT, t] = cast_with_mapent(moveVec_, dogoDPos, impos); if (isHaveT) { Collision::tVals.insert(t); } } //===================// // circular begos //===================// // 初步收集 所有有效 begoid // 不包含 dogo 自己,不包含 adjacentCirBeGos 中的 bego Collision::begoids.clear(); for (const auto& colliPointDPosOff : get_colliPointDPosOffsRef_for_cirDogo()) { mpos = dpos_2_mpos(dogeTargetDPos + colliPointDPosOff); //- 当发现某个 addEnt 处于非 Active 的 chunk。 // 直接判定此次碰撞 为 阻塞,最简单的处理手段 auto mapEntPair = esrc::getnc_memMapEntPtr(mpos); if (mapEntPair.first != ChunkMemState::Active) { return { false, glm::dvec2{ 0.0, 0.0 } }; //- IMM!!! } for (const auto& begoid : mapEntPair.second->get_circular_goids()) { //- each bego if (begoid == dogoRef.goid) { continue; } //-- skip self -- if (Collision::adjacentCirBeGos.find(begoid) != Collision::adjacentCirBeGos.end()) { continue; } //-- skip old adjacent bego -- Collision::begoids.insert(begoid); } } //----------------------------------------// // check each bego,and collect tbegoids Circular begoCir{}; for (const auto& begoid : Collision::begoids) { //- each bego (cirs) // get go ref auto begoOpt = esrc::get_goPtr(begoid); tprAssert(begoOpt.has_value()); GameObj& begoRef = *begoOpt.value(); //----- isMoveCollide -----// // bego.isBePass // goAltiRange if ((!begoRef.isMoveCollide) || begoRef.get_collisionRef().get_isBePass(dogoRef.speciesId) || (!is_GoAltiRange_collide(dogoRef.get_currentGoAltiRange(), begoRef.get_currentGoAltiRange()))) { continue; } //-- 做二级碰撞检测,如果 targetPoint 确认发生碰撞,再计算出碰撞值 t -- begoCir = begoRef.calc_circular(CollideFamily::Move); //-- 剔除 背向而行 -- if (is_dogoCircular_leave_begoCircular(moveVec_, dogoDPos, begoCir)) { continue; } auto colliState = collideState_from_circular_2_circular(dogeTargetDPos, begoCir, 0.1); if (colliState == CollideState::Intersect) { double t = circularCast(moveVec_, dogoDPos, begoCir); //- 进一步计算出 t值, 并将 t值 存入 容器... Collision::tVals.insert(t); } } //- each bego //------ 没有 tVals 就直接 return -------// if (Collision::tVals.empty()) { return { true, moveVec_ }; //- 没有发生碰撞 } //----------------------------------------// //-- 找出最小的 t值 (允许重复) double tMin = *Collision::tVals.begin(); //- min if (is_closeEnough<double>(tMin, 0.0, 0.0001)) { return { false, glm::dvec2{ 0.0, 0.0 } }; } else { return { true, moveVec_ * tMin }; //- 用 t值 修正 位移向量 } } /* =========================================================== * reSignUp_dogo_to_chunk_and_mapents * ----------------------------------------------------------- */ void Collision::reSignUp_dogo_to_chunk_and_mapents(const glm::dvec2& moveVec_) noexcept { GameObj& dogoRef = this->goRef; SignInMapEnts_Circle& signInMapEntsRef = *this->signInMapEnts_cir_uptr; //--------------------------------// // 更新 dogo 在 mapents 中的登记信息 //--------------------------------// bool isSignINMapEntsChanged = signInMapEntsRef.forecast_signINMapEnts(dogoRef.get_dpos() + moveVec_); // 针对 dogo 完整半径 碰撞区的 forecast 操作 //-- update adds/dels -- if (isSignINMapEntsChanged == true) { signInMapEntsRef.sync_currentSignINMapEnts_from_future(); //-- adds -- for (const auto& mpos : signInMapEntsRef.get_currentAddsRef()) { auto mapEntPair = esrc::getnc_memMapEntPtr(mpos); //-- 有时,目标 mapent 所在 chunk,尚未 active 了,暂时直接忽略 if (mapEntPair.first == ChunkMemState::Active) { mapEntPair.second->insert_2_circular_goids(dogoRef.goid, dogoRef.get_colliderType()); } else { //-- debug -- tprDebug::console("++++ Collision::detect_for_move: catch not Active Chunk in adds!!!"); } } //-- dels -- for (const auto& mpos : signInMapEntsRef.get_currentDelsRef()) { auto mapEntPair = esrc::getnc_memMapEntPtr(mpos); //-- 有时,目标 mapent 所在 chunk,已经 not exist 了,那种的直接忽略 if (mapEntPair.first == ChunkMemState::Active) { mapEntPair.second->erase_from_circular_goids(dogoRef.goid, dogoRef.get_colliderType()); //-- 执行正式的注销操作,并确保原初 存在唯一的 目标元素 } else { //-- debug -- tprDebug::console("++++ Collision::detect_for_move: catch not Active Chunk in dels!!!"); } } } //--------------------------------// // 更新 dogo 在 chunk 中的登记信息 //--------------------------------// //-- 检查本go 的 新chunk,如果发生变化,释放旧chunk 中的 goids, edgeGoIds // 登记到 新chunk 的 goids chunkKey_t newChunkKey = anyDPos_2_chunkKey(dogoRef.get_dpos() + moveVec_); auto chunkPair1 = esrc::get_chunkPtr(newChunkKey); tprAssert(chunkPair1.first == ChunkMemState::Active); Chunk& newChunkRef = *(chunkPair1.second); if (newChunkKey != dogoRef.currentChunkKey) { auto chunkPair2 = esrc::get_chunkPtr(dogoRef.currentChunkKey); tprAssert(chunkPair2.first == ChunkMemState::Active); Chunk& oldChunkRef = *(chunkPair2.second); size_t eraseNum = oldChunkRef.erase_from_goIds(dogoRef.goid); tprAssert(eraseNum == 1); oldChunkRef.erase_from_edgeGoIds(dogoRef.goid); // maybe //--- dogoRef.currentChunkKey = newChunkKey; newChunkRef.insert_2_goIds(dogoRef.goid); } //---------------------------// //-- 重新统计 本go 的 chunkKeys,如果确认为 临界go, // 登记到 主chunk 的 edgegoids 容器中 size_t chunkKeysSize = dogoRef.reCollect_chunkKeys(); if (chunkKeysSize == 1) { newChunkRef.erase_from_edgeGoIds(dogoRef.goid); // maybe } else if (chunkKeysSize > 1) { newChunkRef.insert_2_edgeGoIds(dogoRef.goid); } else { tprAssert(0); } } /* =========================================================== * build_a_scanBody [static] * ----------------------------------------------------------- * 收集 扫掠体 内的所有 mapents */ void Collision::build_a_scanBody(const glm::dvec2& moveVec_, const glm::dvec2& dogoDPos_) { glm::dvec2 dogoTargetDPos = dogoDPos_ + moveVec_; //-------------------------// // 计算 扫掠体 4条边 //-------------------------// double leftLine{}; double rightLine{}; double topLine{}; double bottomLine{}; if (moveVec_.x >= 0.0) { leftLine = dogoDPos_.x - Circular::radius_for_dogo; rightLine = dogoTargetDPos.x + Circular::radius_for_dogo; } else { leftLine = dogoTargetDPos.x - Circular::radius_for_dogo; rightLine = dogoDPos_.x + Circular::radius_for_dogo; } if (moveVec_.y >= 0.0) { topLine = dogoTargetDPos.y + Circular::radius_for_dogo; bottomLine = dogoDPos_.y - Circular::radius_for_dogo; } else { topLine = dogoDPos_.y + Circular::radius_for_dogo; bottomLine = dogoTargetDPos.y - Circular::radius_for_dogo; } //-------------------------// // 如果某条边,临近 mapent 边界,主动收缩此边的值 // 以此来 减少 扫掠体内包含的 mapents 个数 // 与扫掠体 呈相邻关系 的 mp, 是不需要做检测的 // -- // 目前可以把 扫掠体收集的 mapents 数量控制在 1~4 个(高峰为6个) //-------------------------// constexpr double mpSideLen = PIXES_PER_MAPENT_D; constexpr double threshold = 0.5; // Adjacent double l = floor(leftLine / mpSideLen) * mpSideLen; double r = floor(rightLine / mpSideLen) * mpSideLen; double t = floor(topLine / mpSideLen) * mpSideLen; double b = floor(bottomLine / mpSideLen) * mpSideLen; if (is_closeEnough<double>(l + mpSideLen, leftLine, threshold)) { leftLine = l + mpSideLen + threshold; } if (is_closeEnough<double>(r, rightLine, threshold)) { rightLine = r - threshold; } if (is_closeEnough<double>(b + mpSideLen, bottomLine, threshold)) { bottomLine = b + mpSideLen + threshold; } if (is_closeEnough<double>(t, topLine, threshold)) { topLine = t - threshold; } //-------------------------// // 正式收集 mapents //-------------------------// IntVec2 mp_leftBottom = dpos_2_mpos(glm::dvec2{ leftLine, bottomLine }); IntVec2 mp_rightTop = dpos_2_mpos(glm::dvec2{ rightLine, topLine }); Collision::mapEnts_in_scanBody.clear(); for (int j = mp_leftBottom.y; j <= mp_rightTop.y; j++) { for (int i = mp_leftBottom.x; i <= mp_rightTop.x; i++) { //Collision::mapEnts_in_scanBody.push_back( IntVec2{i,j} ); Collision::mapEnts_in_scanBody.emplace_back(i, j); } } }
34.951872
198
0.566299
FraMecca
26365f95e99fc39b752de73207af1a03b4840a40
647
cpp
C++
C++/decoded-string-at-index.cpp
black-shadows/LeetCode-Solutions
b1692583f7b710943ffb19b392b8bf64845b5d7a
[ "Fair", "Unlicense" ]
1
2020-04-16T08:38:14.000Z
2020-04-16T08:38:14.000Z
decoded-string-at-index.cpp
Jeevan-kumar-Raj/LeetCode-Solutions-Topicwise
f1111b4edd401a3fc47111993bd7250cf4dc76da
[ "MIT" ]
null
null
null
decoded-string-at-index.cpp
Jeevan-kumar-Raj/LeetCode-Solutions-Topicwise
f1111b4edd401a3fc47111993bd7250cf4dc76da
[ "MIT" ]
1
2021-12-25T14:48:56.000Z
2021-12-25T14:48:56.000Z
// Time: O(n) // Space: O(1) class Solution { public: string decodeAtIndex(string S, int K) { uint64_t n = 0; for (int i = 0; i < S.length(); ++i) { if (isdigit(S[i])) { n *= S[i] - '0'; } else { ++n; } } for (int i = S.length() - 1; i >= 0; --i) { K %= n; if (K == 0 && isalpha(S[i])) { return (string) "" + S[i]; } if (isdigit(S[i])) { n /= S[i] - '0'; } else { --n; } } } };
21.566667
52
0.272025
black-shadows
263a8c420ba144ebde4c7b7b426b8e8555533d37
324
cc
C++
src/fe-readdfs.cc
salfter/fluxengine
331b59cd1e79a0dedbbe75989d3544b19215ee60
[ "MIT" ]
1
2021-04-05T17:40:50.000Z
2021-04-05T17:40:50.000Z
src/fe-readdfs.cc
salfter/fluxengine
331b59cd1e79a0dedbbe75989d3544b19215ee60
[ "MIT" ]
null
null
null
src/fe-readdfs.cc
salfter/fluxengine
331b59cd1e79a0dedbbe75989d3544b19215ee60
[ "MIT" ]
1
2021-04-06T17:04:28.000Z
2021-04-06T17:04:28.000Z
#include "globals.h" #include "reader.h" #include "fmt/format.h" #include "readibm.h" int mainReadDFS(int argc, const char* argv[]) { setReaderDefaultSource(":t=0-79:s=0"); setReaderDefaultOutput("dfs.img"); sectorIdBase.setDefaultValue(0); setReaderRevolutions(2); return mainReadIBM(argc, argv); }
21.6
46
0.694444
salfter
263e6d066e3d160af9300ab8711e84ea1e16eee1
1,816
cc
C++
src/hip/plugin-SiPixelClusterizer/SiPixelFedCablingMapGPUWrapperESProducer.cc
alexstrel/pixeltrack-standalone
0b625eef0ef0b5c0f018d9b466457c5575b3442c
[ "Apache-2.0" ]
9
2021-03-02T08:40:18.000Z
2022-01-24T14:31:40.000Z
src/hip/plugin-SiPixelClusterizer/SiPixelFedCablingMapGPUWrapperESProducer.cc
alexstrel/pixeltrack-standalone
0b625eef0ef0b5c0f018d9b466457c5575b3442c
[ "Apache-2.0" ]
158
2020-03-22T19:46:40.000Z
2022-03-24T09:51:35.000Z
src/hip/plugin-SiPixelClusterizer/SiPixelFedCablingMapGPUWrapperESProducer.cc
alexstrel/pixeltrack-standalone
0b625eef0ef0b5c0f018d9b466457c5575b3442c
[ "Apache-2.0" ]
26
2020-03-20T15:18:41.000Z
2022-03-14T16:58:07.000Z
#include "CondFormats/SiPixelFedIds.h" #include "CondFormats/SiPixelFedCablingMapGPU.h" #include "CondFormats/SiPixelFedCablingMapGPUWrapper.h" #include "Framework/ESProducer.h" #include "Framework/EventSetup.h" #include "Framework/ESPluginFactory.h" #include <fstream> #include <memory> class SiPixelFedCablingMapGPUWrapperESProducer : public edm::ESProducer { public: explicit SiPixelFedCablingMapGPUWrapperESProducer(std::filesystem::path const& datadir) : data_(datadir) {} void produce(edm::EventSetup& eventSetup); private: std::filesystem::path data_; }; void SiPixelFedCablingMapGPUWrapperESProducer::produce(edm::EventSetup& eventSetup) { { std::ifstream in(data_ / "fedIds.bin", std::ios::binary); in.exceptions(std::ifstream::badbit | std::ifstream::failbit | std::ifstream::eofbit); unsigned int nfeds; in.read(reinterpret_cast<char*>(&nfeds), sizeof(unsigned)); std::vector<unsigned int> fedIds(nfeds); in.read(reinterpret_cast<char*>(fedIds.data()), sizeof(unsigned int) * nfeds); eventSetup.put(std::make_unique<SiPixelFedIds>(std::move(fedIds))); } { std::ifstream in(data_ / "cablingMap.bin", std::ios::binary); in.exceptions(std::ifstream::badbit | std::ifstream::failbit | std::ifstream::eofbit); SiPixelFedCablingMapGPU obj; in.read(reinterpret_cast<char*>(&obj), sizeof(SiPixelFedCablingMapGPU)); unsigned int modToUnpDefSize; in.read(reinterpret_cast<char*>(&modToUnpDefSize), sizeof(unsigned int)); std::vector<unsigned char> modToUnpDefault(modToUnpDefSize); in.read(reinterpret_cast<char*>(modToUnpDefault.data()), modToUnpDefSize); eventSetup.put(std::make_unique<SiPixelFedCablingMapGPUWrapper>(obj, std::move(modToUnpDefault))); } } DEFINE_FWK_EVENTSETUP_MODULE(SiPixelFedCablingMapGPUWrapperESProducer);
41.272727
109
0.756608
alexstrel
264021bf80b5c6e9b01e828c25956bfd7ee598f4
2,006
cpp
C++
edu/07/1d.cpp
actium/cf
d7be128c3a9adb014a231a399f1c5f19e1ab2a38
[ "Unlicense" ]
1
2020-07-03T15:55:52.000Z
2020-07-03T15:55:52.000Z
edu/07/1d.cpp
actium/cf
d7be128c3a9adb014a231a399f1c5f19e1ab2a38
[ "Unlicense" ]
null
null
null
edu/07/1d.cpp
actium/cf
d7be128c3a9adb014a231a399f1c5f19e1ab2a38
[ "Unlicense" ]
3
2020-10-01T14:55:28.000Z
2021-07-11T11:33:58.000Z
#include <iostream> #include <utility> #include <vector> template <typename T> std::istream& operator >>(std::istream& input, std::vector<T>& v) { for (T& a : v) input >> a; return input; } struct Query { std::string t; unsigned u; unsigned v; }; std::istream& operator >>(std::istream& input, Query& v) { return input >> v.t >> v.u >> v.v; } class ComponentSet { public: explicit ComponentSet(size_t size); size_t operator [](size_t x) noexcept; void merge(size_t x, size_t y) noexcept; private: std::vector<size_t> roots_; std::vector<size_t> sizes_; }; // class ComponentSet inline ComponentSet::ComponentSet(size_t size) : roots_(size), sizes_(size, 1) { for (size_t i = 0; i < size; ++i) roots_[i] = i; } inline size_t ComponentSet::operator [](size_t x) noexcept { size_t root = x; while (root != roots_[root]) root = roots_[root]; while (roots_[x] != root) x = std::exchange(roots_[x], root); return root; } inline void ComponentSet::merge(size_t x, size_t y) noexcept { size_t rx = operator [](x), ry = operator [](y); if (rx == ry) return; if (sizes_[rx] < sizes_[ry]) std::swap(rx, ry); roots_[ry] = rx; sizes_[rx] += sizes_[ry]; } void answer(bool v) { constexpr const char* s[2] = { "NO", "YES" }; std::cout << s[v] << '\n'; } void solve(size_t n, std::vector<Query>& q) { ComponentSet cs(1+n); std::vector<bool> r; for (auto it = q.rbegin(); it != q.rend(); ++it) { if (it->t == "ask") r.push_back(cs[it->u] == cs[it->v]); else cs.merge(it->u, it->v); } for (auto it = r.rbegin(); it != r.rend(); ++it) answer(*it); } int main() { size_t n, m, k; std::cin >> n >> m >> k; for (size_t i = 0; i < m; ++i) { unsigned u, v; std::cin >> u >> v; } std::vector<Query> q(k); std::cin >> q; solve(n, q); return 0; }
18.072072
65
0.537388
actium
26445ad8594114641d20a32a4757db247f73cb44
5,864
hpp
C++
include/snet/event_manager.hpp
Voev/snet
f22356ffc0a81df9be51da6e82d52cb4339e776c
[ "Unlicense" ]
null
null
null
include/snet/event_manager.hpp
Voev/snet
f22356ffc0a81df9be51da6e82d52cb4339e776c
[ "Unlicense" ]
null
null
null
include/snet/event_manager.hpp
Voev/snet
f22356ffc0a81df9be51da6e82d52cb4339e776c
[ "Unlicense" ]
null
null
null
#pragma once #include <array> #include <map> #include <memory> #include <cstdint> #include <cstring> #include <iostream> #include <openssl/bio.h> #include <errno.h> #include <snet/address.hpp> #include <snet/event_poll.hpp> #include <snet/event_data.hpp> class EventManager { public: static constexpr int kMaxEvents = 32; using EpollEvent = struct epoll_event; using EpollEventArray = std::array<EpollEvent, kMaxEvents>; EventManager(std::unique_ptr<AcceptSocket>&& sock, std::unique_ptr<SslContext>&& ctx = nullptr) : epoll_(std::make_unique<Epoll>()) , listener_(std::move(sock)) , ctx_(std::move(ctx)) { epoll_->Add(listener_->GetFd(), EPOLLIN); } ~EventManager() { } std::uint32_t OnConnected() { return EPOLLIN; } std::array<char, 1024> buffer; int readed = 0; std::uint32_t OnHandshake(std::unique_ptr<EventData>& evtData) { int ret = evtData->GetSslSocket().Accept(); if (ret == 1) { return EPOLLIN; } int err = evtData->GetSslSocket().GetError(ret); if (err == SSL_ERROR_WANT_WRITE) { return EPOLLOUT; } else if (err == SSL_ERROR_WANT_READ) { ERR_print_errors_fp(stderr); return EPOLLIN; } ERR_print_errors_fp(stderr); return 0; } std::uint32_t OnReceive(std::unique_ptr<EventData>& evtData) { if (!evtData->GetSslSocket().HandshakeDone()) { return OnHandshake(evtData); } readed = evtData->GetSslSocket().Read(buffer.data(), sizeof(buffer)); if (readed == 0) { return 0; } else if (readed < 0) { if (BIO_sock_should_retry(readed)) { return EPOLLIN; } if (errno == ECONNRESET) { return 0; } throw std::runtime_error("read process error"); } std::copy(std::begin(buffer), buffer.data() + readed, std::ostream_iterator<char>(std::cout)); return EPOLLOUT; } std::uint32_t OnSend(std::unique_ptr<EventData>& evtData) { auto ret = evtData->GetSslSocket().Write(buffer.data(), readed); if (ret == 0) { return 0; } else if (ret < 0) { if (BIO_sock_should_retry(ret)) { return EPOLLOUT; } else { throw std::runtime_error("read process error"); } } return EPOLLIN; } void MainThread(int timeout) { while (true) { EpollEventArray events; auto nReady = epoll_->Wait(events.data(), kMaxEvents, timeout); if (nReady < 0) { if (errno != EINTR) { std::cout << "Epoll error: " << errno << " fd is <todo>"; } continue; } for (auto i = 0; i < nReady; ++i) { auto flags = events.at(i).events; auto fd = events.at(i).data.fd; if (listener_->GetFd() == fd) { Address addr; auto asock = listener_->Accept(addr); if (asock < 0) { if (BIO_sock_should_retry(asock)) { continue; } else { throw std::runtime_error("accept() error"); } } else { std::cout << "socket " << asock << " opened: " << addr.ToString() << std::endl; std::uint32_t events = OnConnected(); auto pasock = std::make_unique<Socket>(asock); fds_[asock] = std::make_unique<EventData>( std::move(pasock), *ctx_.get()); epoll_->Add(asock, events); } } else { auto& evtData = fds_.at(fd); if (flags & EPOLLIN) { std::uint32_t events = OnReceive(evtData); if (events == 0) { std::cout << "socket " << fd << " closed" << std::endl; epoll_->Delete(fd); fds_.erase(fd); } else { epoll_->Modify(fd, events); } } else if (flags & EPOLLOUT) { std::uint32_t events = OnSend(evtData); if (events == 0) { std::cout << "socket " << fd << " closing\n "; epoll_->Delete(fd); fds_.erase(fd); } else { epoll_->Modify(fd, events); } } } } } } private: std::unique_ptr<Epoll> epoll_; std::unique_ptr<AcceptSocket> listener_; std::unique_ptr<SslContext> ctx_; std::map<int, std::unique_ptr<EventData>> fds_; };
28.8867
77
0.404502
Voev
2648b1be19df1c822459dede9d7f78a420c4f062
3,274
cpp
C++
Assembly Workbench/File.cpp
DebugBSD/Assembly-Workbench
c41172eab063ccec64016908688f3a33a43f2e26
[ "BSD-3-Clause" ]
5
2020-05-25T15:33:39.000Z
2021-07-07T08:47:45.000Z
Assembly Workbench/File.cpp
DebugBSD/Assembly-Workbench
c41172eab063ccec64016908688f3a33a43f2e26
[ "BSD-3-Clause" ]
null
null
null
Assembly Workbench/File.cpp
DebugBSD/Assembly-Workbench
c41172eab063ccec64016908688f3a33a43f2e26
[ "BSD-3-Clause" ]
2
2020-05-30T11:07:10.000Z
2022-01-11T16:55:43.000Z
/* * BSD 3-Clause License * * Copyright (c) 2020, DebugBSD * 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 "stdafx.h" #include "AssemblerBase.h" #include "LinkerBase.h" #include "CompilerBase.h" #include "FileSettings.h" #include "File.h" #include "Project.h" File::File(const wxFileName& file, AssemblerBase* pAssemblerFile, LinkerBase* pLinkerFile, CompilerBase* pCompiler, FileSettings* pFileSettings, Project* pProject): m_FileName{file}, m_pAssembler{pAssemblerFile}, m_pLinker{pLinkerFile}, m_pCompiler{pCompiler}, m_pProject{pProject}, m_pFileSettings{pFileSettings} { if (m_pProject) m_pProject->AddFile(this); wxString extension = m_FileName.GetExt(); if (extension == "asm") { m_FileType = FileType::FT_ASSEMBLER_SOURCE; } else if (extension == "inc") { m_FileType = FileType::FT_ASSEMBLER_INCLUDE; } else if (extension == "cpp") { m_FileType = FileType::FT_CPP_SOURCE; } else if (extension == "h") { m_FileType = FileType::FT_CCPP_INCLUDE; } else if (extension == "c") { m_FileType = FileType::FT_C_SOURCE; } else { m_FileType = FileType::FT_NONE; } } File::~File() { } void File::Assemble() { if (m_pAssembler && m_FileName.GetFullPath() != "" && IsSourceCode()) { m_pAssembler->AssembleFile(GetAbsoluteFileName(), m_pFileSettings); } } void File::Compile() { if (m_pCompiler && m_FileName.GetFullPath() != "" && IsSourceCode()) { m_pCompiler->Compile(GetAbsoluteFileName()); } } void File::Link() { if (m_pLinker && m_FileName.GetFullPath() != "" && IsSourceCode()) { m_pLinker->Link(GetAbsoluteFileName(), m_pFileSettings); } }
31.180952
164
0.697312
DebugBSD
264afac3cd86a082fb4a1f6d0fba4db0b9406050
3,358
cpp
C++
src/eepp/gaming/cobjectlayer.cpp
dogtwelve/eepp
dd672ff0e108ae1e08449ca918dc144018fb4ba4
[ "MIT" ]
null
null
null
src/eepp/gaming/cobjectlayer.cpp
dogtwelve/eepp
dd672ff0e108ae1e08449ca918dc144018fb4ba4
[ "MIT" ]
null
null
null
src/eepp/gaming/cobjectlayer.cpp
dogtwelve/eepp
dd672ff0e108ae1e08449ca918dc144018fb4ba4
[ "MIT" ]
null
null
null
#include <eepp/gaming/cobjectlayer.hpp> #include <eepp/gaming/cgameobjectobject.hpp> #include <eepp/gaming/cgameobjectpolygon.hpp> #include <eepp/gaming/cmap.hpp> #include <eepp/graphics/ctexture.hpp> #include <eepp/graphics/cglobalbatchrenderer.hpp> #include <eepp/graphics/renderer/cgl.hpp> using namespace EE::Graphics; namespace EE { namespace Gaming { cObjectLayer::cObjectLayer( cMap * map, Uint32 flags, std::string name, eeVector2f offset ) : cLayer( map, MAP_LAYER_OBJECT, flags, name, offset ) { } cObjectLayer::~cObjectLayer() { DeallocateLayer(); } void cObjectLayer::AllocateLayer() { } void cObjectLayer::DeallocateLayer() { for ( ObjList::iterator it = mObjects.begin(); it != mObjects.end(); it++ ) { eeSAFE_DELETE( *it ); } } void cObjectLayer::Draw( const eeVector2f &Offset ) { cGlobalBatchRenderer::instance()->Draw(); ObjList::iterator it; GLi->PushMatrix(); GLi->Translatef( mOffset.x, mOffset.y, 0.0f ); for ( it = mObjects.begin(); it != mObjects.end(); it++ ) { (*it)->Draw(); } cTexture * Tex = mMap->GetBlankTileTexture(); if ( mMap->ShowBlocked() && NULL != Tex ) { eeColorA Col( 255, 0, 0, 200 ); for ( it = mObjects.begin(); it != mObjects.end(); it++ ) { cGameObject * Obj = (*it); if ( Obj->Blocked() ) { Tex->DrawEx( Obj->Pos().x, Obj->Pos().y, Obj->Size().Width(), Obj->Size().Height(), 0, eeVector2f::One, Col, Col, Col, Col ); } } } cGlobalBatchRenderer::instance()->Draw(); GLi->PopMatrix(); } void cObjectLayer::Update() { for ( ObjList::iterator it = mObjects.begin(); it != mObjects.end(); it++ ) { (*it)->Update(); } } Uint32 cObjectLayer::GetObjectCount() const { return mObjects.size(); } void cObjectLayer::AddGameObject( cGameObject * obj ) { mObjects.push_back( obj ); } void cObjectLayer::RemoveGameObject( cGameObject * obj ) { mObjects.remove( obj ); eeSAFE_DELETE( obj ); } void cObjectLayer::RemoveGameObject( const eeVector2i& pos ) { cGameObject * tObj = GetObjectOver( pos, SEARCH_OBJECT ); if ( NULL != tObj ) { RemoveGameObject( tObj ); } } cGameObject * cObjectLayer::GetObjectOver( const eeVector2i& pos, SEARCH_TYPE type ) { cGameObject * tObj; eeVector2f tPos; eeSize tSize; for ( ObjList::reverse_iterator it = mObjects.rbegin(); it != mObjects.rend(); it++ ) { tObj = (*it); if ( type & SEARCH_POLY ) { if ( tObj->IsType( GAMEOBJECT_TYPE_OBJECT ) ) { cGameObjectObject * tObjObj = reinterpret_cast<cGameObjectObject*> ( tObj ); if ( tObjObj->PointInside( eeVector2f( pos.x, pos.y ) ) ) return tObj; } } else if ( type & SEARCH_OBJECT ) { if ( !tObj->IsType( GAMEOBJECT_TYPE_OBJECT ) ) { tPos = tObj->Pos(); tSize = tObj->Size(); eeRecti objR( tPos.x, tPos.y, tPos.x + tSize.x, tPos.y + tSize.y ); if ( objR.Contains( pos ) ) return tObj; } } else { if ( tObj->IsType( GAMEOBJECT_TYPE_OBJECT ) ) { cGameObjectObject * tObjObj = reinterpret_cast<cGameObjectObject*> ( tObj ); if ( tObjObj->PointInside( eeVector2f( pos.x, pos.y ) ) ) return tObj; } else { tPos = tObj->Pos(); tSize = tObj->Size(); eeRecti objR( tPos.x, tPos.y, tPos.x + tSize.x, tPos.y + tSize.y ); if ( objR.Contains( pos ) ) return tObj; } } } return NULL; } cObjectLayer::ObjList& cObjectLayer::GetObjectList() { return mObjects; } }}
23.647887
129
0.650685
dogtwelve
264c7f49a09d73606d7df1d8c72acf0fa50f23aa
848
cpp
C++
UVA/108.cpp
MaGnsio/CP-Problems
a7f518a20ba470f554b6d54a414b84043bf209c5
[ "Unlicense" ]
3
2020-11-01T06:31:30.000Z
2022-02-21T20:37:51.000Z
UVA/108.cpp
MaGnsio/CP-Problems
a7f518a20ba470f554b6d54a414b84043bf209c5
[ "Unlicense" ]
null
null
null
UVA/108.cpp
MaGnsio/CP-Problems
a7f518a20ba470f554b6d54a414b84043bf209c5
[ "Unlicense" ]
1
2021-05-05T18:56:31.000Z
2021-05-05T18:56:31.000Z
/** * author: MaGnsi0 * created: 20/09/2021 14:50:02 **/ #include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio (0); cin.tie (0); cout.tie (0); int n; cin >> n; vector<vector<int>> v(n, vector<int>(n)); for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) { cin >> v[i][j]; } } for (int i = 0; i < n; ++i) { for (int j = 1; j < n; ++j) { v[i][j] += v[i][j - 1]; } } int res = v[0][0]; for (int i = 0; i < n; ++i) { for (int j = i; j < n; ++j) { int cur = 0; for (int k = 0; k < n; ++k) { cur += (v[k][j] - (i ? v[k][i - 1] : 0)); res = max(cur, res); cur = max(cur, 0); } } } cout << res << endl; }
23.555556
61
0.352594
MaGnsio
264ff885e0591a77fb7ad314d263434d5bf09d1d
21,711
cpp
C++
src/XWindow.cpp
bullno1/xveearr
4690cde72b7ec747d944daa919c3275744d75e25
[ "BSD-2-Clause" ]
null
null
null
src/XWindow.cpp
bullno1/xveearr
4690cde72b7ec747d944daa919c3275744d75e25
[ "BSD-2-Clause" ]
null
null
null
src/XWindow.cpp
bullno1/xveearr
4690cde72b7ec747d944daa919c3275744d75e25
[ "BSD-2-Clause" ]
null
null
null
#include <bx/platform.h> #if BX_PLATFORM_LINUX == 1 #include "IWindowSystem.hpp" #include <unordered_map> #include <vector> #include <SDL_syswm.h> #include <SDL.h> #include <bx/spscqueue.h> #include <bx/macros.h> #include <bgfx/bgfxplatform.h> #include <bgfx/bgfx.h> #include <X11/Xlib-xcb.h> #include <xcb/xcbext.h> #include <xcb/composite.h> #include <xcb/xcb_util.h> #include <xcb/res.h> #include <xcb/xcb_ewmh.h> #include <xcb/xfixes.h> #include <GL/gl.h> #include <GL/glx.h> #include <GL/glext.h> #include "Registry.hpp" #include "Log.hpp" namespace xveearr { namespace { struct TextureReq { enum Type { Bind, Rebind, Unbind, Count }; Type mType; bgfx::TextureHandle mBgfxHandle; xcb_window_t mWindow; }; struct TextureInfo { GLuint mGLHandle; xcb_window_t mWindow; xcb_pixmap_t mCompositePixmap; GLXPixmap mGLXPixmap; }; const int GLX_PIXMAP_ATTRS[] = { GLX_TEXTURE_TARGET_EXT, GLX_TEXTURE_2D_EXT, GLX_TEXTURE_FORMAT_EXT, GLX_TEXTURE_FORMAT_RGBA_EXT, None }; xcb_screen_t* getScreenOfDisplay(xcb_connection_t *c, int screen) { for( xcb_screen_iterator_t iter = xcb_setup_roots_iterator(xcb_get_setup(c)); iter.rem; --screen, xcb_screen_next(&iter) ) { if(screen == 0) { return iter.data; } } return NULL; } } class XWindow: public IWindowSystem { public: XWindow() :mXcbConn(NULL) ,mEventIndex(0) {} bool init(const WindowSystemCfg& cfg) { mglXBindTexImageEXT = (PFNGLXBINDTEXIMAGEEXTPROC)glXGetProcAddress( (const GLubyte*)"glXBindTexImageEXT" ); mglXReleaseTexImageEXT = (PFNGLXRELEASETEXIMAGEEXTPROC)glXGetProcAddress( (const GLubyte*)"glXReleaseTexImageEXT" ); XVR_ENSURE( mglXBindTexImageEXT && mglXReleaseTexImageEXT, "GLX_EXT_texture_from_pixmap is not available" ); int screenNumber; mXcbConn = xcb_connect(NULL, &screenNumber); XVR_ENSURE(mXcbConn, "Could not connect to X server"); xcb_screen_t* screen = getScreenOfDisplay(mXcbConn, screenNumber); XVR_ENSURE(screen, "Sum Ting Wong"); mDisplayMetrics.mWidthInPixels = screen->width_in_pixels; mDisplayMetrics.mHeightInPixels = screen->height_in_pixels; mDisplayMetrics.mWidthInMeters = (float)screen->width_in_millimeters / 1000.f; mDisplayMetrics.mHeightInMeters = (float)screen->height_in_millimeters / 1000.f; xcb_prefetch_extension_data(mXcbConn, &xcb_composite_id); xcb_prefetch_extension_data(mXcbConn, &xcb_res_id); xcb_prefetch_extension_data(mXcbConn, &xcb_xfixes_id); const xcb_query_extension_reply_t* xcomposite = xcb_get_extension_data(mXcbConn, &xcb_composite_id); XVR_ENSURE(xcomposite->present, xcb_composite_id.name, " is not available"); const xcb_query_extension_reply_t* xres = xcb_get_extension_data(mXcbConn, &xcb_res_id); XVR_ENSURE(xres->present, xcb_res_id.name, " is not available"); const xcb_query_extension_reply_t* xfixes = xcb_get_extension_data(mXcbConn, &xcb_xfixes_id); XVR_ENSURE(xfixes->present, xcb_xfixes_id.name, " is not available"); mXFixesFirstEvent = xfixes->first_event; xcb_xfixes_query_version_unchecked( mXcbConn, XCB_XFIXES_MAJOR_VERSION, XCB_XFIXES_MINOR_VERSION ); xcb_res_query_version_unchecked( mXcbConn, XCB_RES_MAJOR_VERSION, XCB_RES_MINOR_VERSION ); SDL_SysWMinfo wmi; SDL_GetVersion(&wmi.version); SDL_GetWindowWMInfo(cfg.mWindow, &wmi); mRendererDisplay = wmi.info.x11.display; mRendererXcbConn = XGetXCBConnection(mRendererDisplay); mPID = getClientPidFromWindow(wmi.info.x11.window); xcb_generic_error_t *error; xcb_void_cookie_t voidCookie = xcb_grab_server_checked(mXcbConn); if((error = xcb_request_check(mXcbConn, voidCookie))) { free(error); XVR_LOG(Error, "Could not grab server"); return false; } int numScreens = xcb_setup_roots_length(xcb_get_setup(mXcbConn)); std::vector<xcb_void_cookie_t> cookies; cookies.reserve(numScreens * 2); for( xcb_screen_iterator_t itr = xcb_setup_roots_iterator(xcb_get_setup(mXcbConn)); itr.rem; xcb_screen_next(&itr) ) { xcb_window_t rootWindow = itr.data->root; const uint32_t eventMask[] = { XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY, 0 }; cookies.push_back( xcb_change_window_attributes_checked( mXcbConn, rootWindow, XCB_CW_EVENT_MASK, eventMask ) ); cookies.push_back( xcb_xfixes_select_cursor_input_checked( mXcbConn, rootWindow, XCB_XFIXES_CURSOR_NOTIFY_MASK_DISPLAY_CURSOR ) ); } for(xcb_void_cookie_t cookie: cookies) { if((error = xcb_request_check(mXcbConn, cookie))) { free(error); XVR_LOG(Error, "Some request failed"); return false; } } xcb_ewmh_connection_t ewmh; uint8_t initStatus = xcb_ewmh_init_atoms_replies( &ewmh, xcb_ewmh_init_atoms(mXcbConn, &ewmh), NULL ); if(!initStatus) { xcb_ewmh_connection_wipe(&ewmh); XVR_LOG(Error, "Could not initialize EWMH atoms"); return false; } xcb_window_t supportWindow; uint8_t supportCheckStatus = xcb_ewmh_get_supporting_wm_check_reply( &ewmh, xcb_ewmh_get_supporting_wm_check( &ewmh, xcb_setup_roots_iterator(xcb_get_setup(mXcbConn)).data->root ), &supportWindow, NULL ); if(!supportCheckStatus) { xcb_ewmh_connection_wipe(&ewmh); XVR_LOG(Error, "EWMH is not supported"); return false; } xcb_ewmh_connection_wipe(&ewmh); mWindowMgrPid = getPidFromWindow(supportWindow); XVR_ENSURE(mWindowMgrPid, "Could not retrieve PID of window manager"); voidCookie = xcb_ungrab_server_checked(mXcbConn); if((error = xcb_request_check(mXcbConn, voidCookie))) { free(error); XVR_LOG(Error, "Could not ungrab server"); return false; } return true; } void shutdown() { if(mXcbConn != NULL) { xcb_disconnect(mXcbConn); } } const char* getName() const { return "xwindow"; } DisplayMetrics getDisplayMetrics() { return mDisplayMetrics; } bool pollEvent(WindowEvent& xvrEvent) { if(tryDrainEvent(xvrEvent)) { return true; } // Quickly drain all pending events into a temp buff mTmpEventBuff.clear(); xcb_generic_event_t* xcbEvent; while((xcbEvent = xcb_poll_for_event(mXcbConn))) { WindowEvent tmpEvent; uint8_t respType = XCB_EVENT_RESPONSE_TYPE(xcbEvent); if(respType == mXFixesFirstEvent + XCB_XFIXES_CURSOR_NOTIFY) { updateCursorInfo( (xcb_xfixes_cursor_notify_event_t*)xcbEvent ); } else { switch(respType) { case XCB_MAP_NOTIFY: tmpEvent.mWindow = ((xcb_map_notify_event_t*)xcbEvent)->window; tmpEvent.mType = WindowEvent::WindowAdded; bufferEvent(tmpEvent); break; case XCB_UNMAP_NOTIFY: tmpEvent.mWindow = ((xcb_unmap_notify_event_t*)xcbEvent)->window; tmpEvent.mType = WindowEvent::WindowRemoved; bufferEvent(tmpEvent); break; case XCB_REPARENT_NOTIFY: // TODO: handle reparent to root tmpEvent.mWindow = ((xcb_reparent_notify_event_t*)xcbEvent)->window; tmpEvent.mType = WindowEvent::WindowRemoved; bufferEvent(tmpEvent); break; case XCB_CONFIGURE_NOTIFY: { xcb_configure_notify_event_t* cfgNotifyEvent = (xcb_configure_notify_event_t*)xcbEvent; tmpEvent.mWindow = cfgNotifyEvent->window; tmpEvent.mType = WindowEvent::WindowUpdated; tmpEvent.mInfo.mX = cfgNotifyEvent->x; tmpEvent.mInfo.mY = cfgNotifyEvent->y; tmpEvent.mInfo.mWidth = cfgNotifyEvent->width; tmpEvent.mInfo.mHeight = cfgNotifyEvent->height; bufferEvent(tmpEvent); } break; } } free(xcbEvent); } // Process buffered events and queue them mEventIndex = 0; mEvents.clear(); for(WindowEvent tmpEvent: mTmpEventBuff) { bool accepted = false; switch(tmpEvent.mType) { case WindowEvent::WindowAdded: accepted = translateWindowAdded(tmpEvent); break; case WindowEvent::WindowRemoved: accepted = translateWindowRemoved(tmpEvent); break; case WindowEvent::WindowUpdated: accepted = translateWindowUpdated(tmpEvent); break; } if(accepted) { mEvents.push_back(tmpEvent); } } // Try draining again return tryDrainEvent(xvrEvent); } void initRenderer() { xcb_composite_query_version_unchecked( mRendererXcbConn, XCB_COMPOSITE_MAJOR_VERSION, XCB_COMPOSITE_MINOR_VERSION ); xcb_grab_server(mRendererXcbConn); for( xcb_screen_iterator_t itr = xcb_setup_roots_iterator(xcb_get_setup(mRendererXcbConn)); itr.rem; xcb_screen_next(&itr) ) { xcb_window_t rootWindow = itr.data->root; xcb_composite_redirect_subwindows( mRendererXcbConn, rootWindow, XCB_COMPOSITE_REDIRECT_AUTOMATIC ); } xcb_ungrab_server(mRendererXcbConn); } void shutdownRenderer() { } void beginRender() { while(mTextureReqs.peek()) { TextureReq* req = mTextureReqs.pop(); if(req->mType == TextureReq::Bind) { mDeferredTextureReqs.push_back(*req); } else { executeTextureReq(*req); } delete req; } } void endRender() { for(const TextureReq& req: mDeferredTextureReqs) { executeTextureReq(req); } mDeferredTextureReqs.clear(); } const WindowInfo* getWindowInfo(WindowId id) { auto itr = mWindows.find(id); return itr != mWindows.end() ? &itr->second : NULL; } CursorInfo getCursorInfo() { if(mCursors.empty()) { retrieveCurrentCursor(); } auto itr = mCursors.find(mCurrentCursor); if(itr == mCursors.end()) { CursorInfo invalid; invalid.mTexture = BGFX_INVALID_HANDLE; return invalid; } else { return itr->second; } } private: uint32_t getPidFromWindow(xcb_window_t window) { xcb_res_client_id_spec_t idSpecs; idSpecs.client = window; idSpecs.mask = XCB_RES_CLIENT_ID_MASK_LOCAL_CLIENT_PID; xcb_res_query_client_ids_reply_t* idReply = xcb_res_query_client_ids_reply( mXcbConn, xcb_res_query_client_ids(mXcbConn, 1, &idSpecs), NULL ); if(!idReply) { return 0; } uint32_t pid = *xcb_res_client_id_value_value( (xcb_res_query_client_ids_ids_iterator(idReply).data) ); free(idReply); return pid; } uint32_t getClientPidFromWindow(xcb_window_t window) { uint32_t pid = getPidFromWindow(window); if(pid == 0 || pid != mWindowMgrPid) { return pid; } xcb_query_tree_reply_t* queryTreeReply = xcb_query_tree_reply( mXcbConn, xcb_query_tree(mXcbConn, window), NULL ); if(!queryTreeReply) { return 0; } int numChildren = xcb_query_tree_children_length(queryTreeReply); xcb_window_t* children = xcb_query_tree_children(queryTreeReply); for(int i = 0; i < numChildren; ++i) { uint32_t pid = getClientPidFromWindow(children[i]); if(pid != 0) { free(queryTreeReply); return pid; } } free(queryTreeReply); return 0; } bool tryDrainEvent(WindowEvent& xvrEvent) { if(mEventIndex < mEvents.size()) { xvrEvent = mEvents[mEventIndex++]; return true; } else { return false; } } void bufferEvent(WindowEvent& event) { switch(event.mType) { case WindowEvent::WindowRemoved: { bool completeCycle = false; for( auto itr = mTmpEventBuff.begin(); itr != mTmpEventBuff.end(); ) { if(itr->mWindow == event.mWindow) { itr = mTmpEventBuff.erase(itr); if(itr->mType == WindowEvent::WindowAdded) { completeCycle = true; } } else { ++itr; } } if(!completeCycle) { mTmpEventBuff.push_back(event); } } break; case WindowEvent::WindowUpdated: { bool coalesced = false; for(WindowEvent& pastEvent: mTmpEventBuff) { if(pastEvent.mWindow == event.mWindow) { pastEvent.mInfo = event.mInfo; coalesced = true; } } if(!coalesced) { mTmpEventBuff.push_back(event); } } break; default: mTmpEventBuff.push_back(event); break; } } bool translateWindowAdded(WindowEvent& event) { auto itr = mWindows.find(event.mWindow); if(itr != mWindows.end()) { return false; } xcb_get_geometry_reply_t* geomReply = xcb_get_geometry_reply( mXcbConn, xcb_get_geometry(mXcbConn, event.mWindow), NULL ); XVR_ENSURE(geomReply, "Could not retrieve window's geometry"); xcb_get_geometry_reply_t geom = *geomReply; free(geomReply); XVR_ENSURE(geom.depth != 0, "Window has zero depth"); uint32_t clientPid = getClientPidFromWindow(event.mWindow); if(clientPid == 0 || clientPid == mPID) { return false; } bgfx::TextureHandle texture = bgfx::createTexture2D(1, 1, 0, bgfx::TextureFormat::RGBA8); WindowInfo wndInfo; wndInfo.mX = geom.x; wndInfo.mY = geom.y; wndInfo.mWidth = geom.width; wndInfo.mHeight = geom.height; wndInfo.mTexture = texture; wndInfo.mInvertedY = true; wndInfo.mPID = clientPid; event.mInfo = wndInfo; mWindows.insert(std::make_pair(event.mWindow, wndInfo)); TextureReq* req = new TextureReq; req->mType = TextureReq::Bind; req->mBgfxHandle = texture; req->mWindow = event.mWindow; mTextureReqs.push(req); return true; } bool translateWindowRemoved(WindowEvent& event) { auto itr = mWindows.find(event.mWindow); if(itr == mWindows.end()) { return false; } TextureReq* req = new TextureReq; req->mType = TextureReq::Unbind; req->mBgfxHandle = itr->second.mTexture; mTextureReqs.push(req); bgfx::destroyTexture(itr->second.mTexture); mWindows.erase(itr); return true; } bool translateWindowUpdated(WindowEvent& event) { auto itr = mWindows.find(event.mWindow); if(itr == mWindows.end()) { return false; } WindowInfo& wndInfo = itr->second; unsigned int oldWidth = wndInfo.mWidth; unsigned int oldHeight = wndInfo.mHeight; wndInfo.mX = event.mInfo.mX; wndInfo.mY = event.mInfo.mY; wndInfo.mWidth = event.mInfo.mWidth; wndInfo.mHeight = event.mInfo.mHeight; event.mInfo = wndInfo; if(oldWidth != event.mInfo.mWidth || oldHeight != event.mInfo.mHeight) { TextureReq* req = new TextureReq; req->mType = TextureReq::Rebind; req->mBgfxHandle = wndInfo.mTexture; mTextureReqs.push(req); } return true; } void executeTextureReq(const TextureReq& req) { switch(req.mType) { case TextureReq::Bind: bindTexture(req); break; case TextureReq::Unbind: unbindTexture(req); break; case TextureReq::Rebind: rebindTexture(req); break; } } void bindTexture(const TextureReq& req) { XVR_LOG(Debug, "Binding window 0x", std::hex, req.mWindow, std::dec, " to texture ", req.mBgfxHandle.idx); xcb_pixmap_t compositePixmap; GLXFBConfig fbConfig; if(!getCompositePixmap(req.mWindow, compositePixmap, fbConfig)) { return; } GLuint glTexture; glGenTextures(1, &glTexture); glBindTexture(GL_TEXTURE_2D, glTexture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); GLXPixmap glxPixmap = glXCreatePixmap( mRendererDisplay, fbConfig, compositePixmap, GLX_PIXMAP_ATTRS ); mglXBindTexImageEXT( mRendererDisplay, glxPixmap, GLX_FRONT_LEFT_EXT, NULL ); TextureInfo texInfo; texInfo.mWindow = req.mWindow; texInfo.mGLHandle = glTexture; texInfo.mCompositePixmap = compositePixmap; texInfo.mGLXPixmap = glxPixmap; mTextures.insert(std::make_pair(req.mBgfxHandle.idx, texInfo)); bgfx::overrideInternal(req.mBgfxHandle, glTexture); XVR_LOG(Debug, "Window 0x", std::hex, req.mWindow, std::dec, " bound to texture ", req.mBgfxHandle.idx); } void unbindTexture(const TextureReq& req) { XVR_LOG(Debug, "Unbinding texture ", req.mBgfxHandle.idx); auto itr = mTextures.find(req.mBgfxHandle.idx); if(itr == mTextures.end()) { return; } TextureInfo& texInfo = itr->second; glBindTexture(GL_TEXTURE_2D, texInfo.mGLHandle); mglXReleaseTexImageEXT( mRendererDisplay, texInfo.mGLXPixmap, GLX_FRONT_LEFT_EXT ); glXDestroyPixmap(mRendererDisplay, texInfo.mGLXPixmap); xcb_free_pixmap(mRendererXcbConn, texInfo.mCompositePixmap); glDeleteTextures(1, &texInfo.mGLHandle); mTextures.erase(itr); XVR_LOG(Debug, "Texture ", req.mBgfxHandle.idx, " unbound"); } void rebindTexture(const TextureReq& req) { auto itr = mTextures.find(req.mBgfxHandle.idx); if(itr == mTextures.end()) { return; } XVR_LOG(Debug, "Rebinding texture ", req.mBgfxHandle.idx); TextureInfo& texInfo = itr->second; xcb_pixmap_t compositePixmap; GLXFBConfig fbConfig; if(!getCompositePixmap(texInfo.mWindow, compositePixmap, fbConfig)) { return; } glBindTexture(GL_TEXTURE_2D, texInfo.mGLHandle); mglXReleaseTexImageEXT( mRendererDisplay, texInfo.mGLXPixmap,GLX_FRONT_LEFT_EXT ); glXDestroyPixmap(mRendererDisplay, texInfo.mGLXPixmap); xcb_free_pixmap(mRendererXcbConn, texInfo.mCompositePixmap); GLXPixmap glxPixmap = glXCreatePixmap( mRendererDisplay, fbConfig, compositePixmap, GLX_PIXMAP_ATTRS ); mglXBindTexImageEXT( mRendererDisplay, glxPixmap, GLX_FRONT_LEFT_EXT, NULL ); texInfo.mCompositePixmap = compositePixmap; texInfo.mGLXPixmap = glxPixmap; XVR_LOG(Debug, "Texture ", req.mBgfxHandle.idx, " rebound"); } bool getCompositePixmap( xcb_window_t window, xcb_pixmap_t& compositePixmap, GLXFBConfig& fbConfig ) { // xcb_request_check will hang here for some reason so it cannot be // pipelined with the later get_geometry request xcb_pixmap_t pixmap = xcb_generate_id(mRendererXcbConn); xcb_generic_error_t* namePixmapError = xcb_request_check( mRendererXcbConn, xcb_composite_name_window_pixmap_checked( mRendererXcbConn, window, pixmap ) ); if(namePixmapError) { XVR_LOG(Error, "Could not assign composite pixmap to window 0x", std::hex, window, std::dec, ": ", xcb_event_get_error_label(namePixmapError->error_code) ); free(namePixmapError); return false; } free(namePixmapError); xcb_get_geometry_reply_t* geomReply = xcb_get_geometry_reply( mRendererXcbConn, xcb_get_geometry(mRendererXcbConn, window), NULL ); if(geomReply == NULL || geomReply->depth == 0) { free(geomReply); XVR_LOG(Error, "Could not retrieve window's data"); return false; } xcb_get_geometry_reply_t geom = *geomReply; free(geomReply); const int pixmapConfig[] = { GLX_BIND_TO_TEXTURE_RGBA_EXT, True, GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT, GLX_BIND_TO_TEXTURE_TARGETS_EXT, GLX_TEXTURE_2D_BIT_EXT, GLX_DOUBLEBUFFER, False, GLX_Y_INVERTED_EXT, (int)GLX_DONT_CARE, None }; int numConfigs = 0; int screen = DefaultScreen(mRendererDisplay); GLXFBConfig* fbConfigs = glXChooseFBConfig( mRendererDisplay, screen, pixmapConfig, &numConfigs ); for(int i = 0; i < numConfigs; ++i) { XVisualInfo* visualInfo = glXGetVisualFromFBConfig(mRendererDisplay, fbConfigs[i]); if(visualInfo->depth == geom.depth) { compositePixmap = pixmap; fbConfig = fbConfigs[i]; XFree(visualInfo); XFree(fbConfigs); return true; } XFree(visualInfo); } XFree(fbConfigs); XVR_LOG(Error, "Could not find a suitable FBConfig"); return false; } void updateCursorInfo(xcb_xfixes_cursor_notify_event_t* ev) { XVR_LOG(Debug, "Cursor serial: 0x", std::hex, ev->cursor_serial, std::dec); if(mCursors.find(ev->cursor_serial) == mCursors.end()) { retrieveCurrentCursor(); } else { XVR_LOG(Debug, "Using cached cursor"); mCurrentCursor = ev->cursor_serial; } } void retrieveCurrentCursor() { XVR_LOG(Debug, "Retrieving current cursor"); xcb_xfixes_get_cursor_image_reply_t* cursorImage = xcb_xfixes_get_cursor_image_reply( mXcbConn, xcb_xfixes_get_cursor_image(mXcbConn), NULL ); if(!cursorImage) { return; } CursorInfo cursorInfo; cursorInfo.mOriginX = cursorImage->xhot; cursorInfo.mOriginY = cursorImage->yhot; cursorInfo.mWidth = cursorImage->width; cursorInfo.mHeight = cursorImage->height; uint32_t imgSize = (uint32_t)cursorImage->width * (uint32_t)cursorImage->height; const uint32_t* imageData = xcb_xfixes_get_cursor_image_cursor_image(cursorImage); const bgfx::Memory* imgBuff = bgfx::alloc(imgSize * sizeof(uint32_t)); for(uint32_t i = 0; i < imgSize; ++i) { uint32_t pixel = imageData[i]; uint8_t a = (pixel >> 24) & 0xff; uint8_t r = (pixel >> 16) & 0xff; uint8_t g = (pixel >> 8) & 0xff; uint8_t b = (pixel >> 0) & 0xff; imgBuff->data[i * 4 + 0] = r; imgBuff->data[i * 4 + 1] = g; imgBuff->data[i * 4 + 2] = b; imgBuff->data[i * 4 + 3] = a; } cursorInfo.mTexture = bgfx::createTexture2D( cursorImage->width, cursorImage->height, 0, bgfx::TextureFormat::RGBA8, BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP, imgBuff ); mCurrentCursor = cursorImage->cursor_serial; mCursors.insert( std::make_pair(cursorImage->cursor_serial, cursorInfo) ); free(cursorImage); } Display* mRendererDisplay; xcb_connection_t* mXcbConn; xcb_connection_t* mRendererXcbConn; PID mPID; uint32_t mWindowMgrPid; DisplayMetrics mDisplayMetrics; std::unordered_map<WindowId, WindowInfo> mWindows; bx::SpScUnboundedQueue<TextureReq> mTextureReqs; std::vector<TextureReq> mDeferredTextureReqs; std::unordered_map<uint16_t, TextureInfo> mTextures; unsigned int mEventIndex; std::vector<WindowEvent> mEvents; std::vector<WindowEvent> mTmpEventBuff; std::unordered_map<uint32_t, CursorInfo> mCursors; uint32_t mCurrentCursor; uint8_t mXFixesFirstEvent; PFNGLXBINDTEXIMAGEEXTPROC mglXBindTexImageEXT; PFNGLXRELEASETEXIMAGEEXTPROC mglXReleaseTexImageEXT; }; XVR_REGISTER(IWindowSystem, XWindow) } #endif
24.559955
82
0.716964
bullno1
265389db82a7536e87253fdabb78243940c21647
344
cpp
C++
src/parser/ConstantExpression.cpp
rlucca/aslan
1f283c22fb72f717c590cf11482ac97c171f8518
[ "Unlicense" ]
null
null
null
src/parser/ConstantExpression.cpp
rlucca/aslan
1f283c22fb72f717c590cf11482ac97c171f8518
[ "Unlicense" ]
null
null
null
src/parser/ConstantExpression.cpp
rlucca/aslan
1f283c22fb72f717c590cf11482ac97c171f8518
[ "Unlicense" ]
null
null
null
#include "AllSymbol.hpp" ConstantExpression::ConstantExpression(unsigned line, char *lex) : Symbol(CONSTANT_EXPRESSION_SYMBOL, line, lex) { } ConstantExpression::~ConstantExpression() { } std::ostream& operator<<(std::ostream& os, ConstantExpression *ce) { // Constant Expression is similar to a literal os << ce->lexema(); return os; }
21.5
66
0.738372
rlucca
26539ee7de791a413be70e85eea37286f88159ec
1,519
cc
C++
hackt_docker/hackt/src/Object/def/footprint_value_base.cc
broken-wheel/hacktist
36e832ae7dd38b27bca9be7d0889d06054dc2806
[ "MIT" ]
null
null
null
hackt_docker/hackt/src/Object/def/footprint_value_base.cc
broken-wheel/hacktist
36e832ae7dd38b27bca9be7d0889d06054dc2806
[ "MIT" ]
null
null
null
hackt_docker/hackt/src/Object/def/footprint_value_base.cc
broken-wheel/hacktist
36e832ae7dd38b27bca9be7d0889d06054dc2806
[ "MIT" ]
null
null
null
/** \file "Object/inst/footprint_value_base.cc" Explicit template instantiations of footprint_bases that manage value-collections. $Id: footprint_value_base.cc,v 1.4 2010/09/21 00:18:11 fang Exp $ */ #define ENABLE_STACKTRACE 0 #define STACKTRACE_PERSISTENTS (0 && ENABLE_STACKTRACE) #include "Object/def/footprint_value_base.hh" #include "Object/def/footprint.hh" #include "Object/def/footprint_base.tcc" #include "Object/inst/value_collection_pool_bundle.tcc" #include "Object/inst/null_collection_type_manager.hh" #include "Object/inst/value_collection.hh" #include "Object/expr/const_collection.hh" #include "Object/expr/pbool_const.hh" #include "Object/expr/pint_const.hh" #include "Object/expr/preal_const.hh" #include "Object/expr/pstring_const.hh" #include "Object/inst/pbool_instance.hh" #include "Object/inst/pint_instance.hh" #include "Object/inst/preal_instance.hh" #include "Object/inst/pstring_instance.hh" #include "util/multikey_map.tcc" // for destructor, when symbol optimized namespace HAC { namespace entity { template struct value_collection_pool_bundle<pbool_tag>; template struct value_collection_pool_bundle<pint_tag>; template struct value_collection_pool_bundle<preal_tag>; template struct value_collection_pool_bundle<pstring_tag>; template class value_footprint_base<pbool_tag>; template class value_footprint_base<pint_tag>; template class value_footprint_base<preal_tag>; template class value_footprint_base<pstring_tag>; } // end namespace entity } // end namespace HAC
34.522727
73
0.813693
broken-wheel
26545e39528d599b4d90a0317ecaf2655e29ca4a
4,647
cpp
C++
src/MainApplication.cpp
Dibido/Robotwereld
3101e8452dc15dddb1b8271e5188e572da7b0f38
[ "BSD-2-Clause" ]
null
null
null
src/MainApplication.cpp
Dibido/Robotwereld
3101e8452dc15dddb1b8271e5188e572da7b0f38
[ "BSD-2-Clause" ]
null
null
null
src/MainApplication.cpp
Dibido/Robotwereld
3101e8452dc15dddb1b8271e5188e572da7b0f38
[ "BSD-2-Clause" ]
null
null
null
#include "MainApplication.hpp" #include <stdexcept> #include <algorithm> #include <cstring> #include "MainFrameWindow.hpp" #include "ObjectId.hpp" namespace Application { /* static */std::vector<CommandlineArgument> MainApplication::commandlineArguments; /* static */std::vector<std::string> MainApplication::commandlineFiles; // Create a new application object: this macro will allow wxWidgets to create // the application object during program execution (it's better than using a // static object for many reasons) and also implements the accessor function // wxGetApp() which will return the reference of the right type (i.e. MyApp and // not wxApp) wxIMPLEMENT_APP_NO_MAIN (MainApplication); /** * */ MainApplication& TheApp() { return wxGetApp(); } /** * */ bool MainApplication::OnInit() { // To make all platforms use all available images wxInitAllImageHandlers(); MainApplication::setCommandlineArguments(argc, argv); MainFrameWindow* frame = nullptr; if (MainApplication::isArgGiven("-help")) { std::cout << "usage : " << argv[0] << " [-local_port=[12345]] [-remote_ip=[localhost]] [remote_port=[12345]]" << std::endl; exit(-1); } if (MainApplication::isArgGiven("-worldname")) { Base::ObjectId::objectIdNamespace = MainApplication::getArg( "-worldname").value + "-"; frame = new MainFrameWindow( "RobotWorld : " + MainApplication::getArg("-worldname").value); } else { frame = new MainFrameWindow("RobotWorld"); } SetTopWindow(frame); // and show it (the frames, unlike simple controls, are not shown when // created initially) frame->Show(true); // success: wxApp::OnRun() will be called which will enter the main message // loop and the application will run. If we returned false here, the // application would exit immediately. return true; } /* static */void MainApplication::setCommandlineArguments(int argc, char* argv[]) { // argv[0] contains the executable name as one types on the command line (with or without extension) MainApplication::commandlineArguments.push_back( CommandlineArgument(0, "Executable", argv[0])); for (int i = 1; i < argc; ++i) { char* currentArg = argv[i]; size_t argLength = std::strlen(currentArg); // If the first char of the argument is not a "-" we assume that is is // a filename otherwise it is an ordinary argument if (currentArg[0] == '-') // ordinary argument { bool inserted = false; // First handle the arguments in the form of "variable=value", and find the "=" for (size_t j = 0; j < argLength; ++j) { if (currentArg[j] == '=') { std::string variable(currentArg, j); std::string value(&currentArg[j + 1]); MainApplication::commandlineArguments.push_back( CommandlineArgument(i, variable, value)); inserted = true; } } // Second handle the stand alone arguments. // If inserted is // It is assumed that they are actually booleans. // If given on the command line than the variable will be set to true as if // variable=true is passed if (inserted == false) { std::string variable(currentArg); std::string value("true"); MainApplication::commandlineArguments.push_back( CommandlineArgument(i, variable, value)); } } else // file argument { MainApplication::commandlineFiles.push_back(currentArg); } } } /* static */bool MainApplication::isArgGiven(const std::string& aVariable) { std::vector<CommandlineArgument>::iterator i = std::find( MainApplication::commandlineArguments.begin(), MainApplication::commandlineArguments.end(), aVariable); return i != commandlineArguments.end(); } /* static */CommandlineArgument& MainApplication::getArg( const std::string& aVariable) { std::vector<CommandlineArgument>::iterator i = std::find( MainApplication::commandlineArguments.begin(), MainApplication::commandlineArguments.end(), aVariable); if (i == MainApplication::commandlineArguments.end()) { throw std::invalid_argument("No such command line argument"); } return *i; } /* static */CommandlineArgument& MainApplication::getArg( unsigned long anArgumentNumber) { if (anArgumentNumber >= MainApplication::commandlineArguments.size()) { throw std::invalid_argument("No such command line argument"); } return MainApplication::commandlineArguments[anArgumentNumber]; } /* static */std::vector<std::string>& MainApplication::getCommandlineFiles() { return commandlineFiles; } } // namespace Application
28.163636
101
0.684097
Dibido
26547720cee619a9e86547f02ec6a06a91c2fb6e
706
hh
C++
src/kinem/EDepSimUniformPositionGenerator.hh
andrewmogan/edep-sim
4e9923ccba8b2f65f47b72cbb41ed683f19f1123
[ "MIT" ]
15
2017-04-25T14:20:22.000Z
2022-03-15T19:39:43.000Z
src/kinem/EDepSimUniformPositionGenerator.hh
andrewmogan/edep-sim
4e9923ccba8b2f65f47b72cbb41ed683f19f1123
[ "MIT" ]
24
2017-11-08T21:16:48.000Z
2022-03-04T13:33:18.000Z
src/kinem/EDepSimUniformPositionGenerator.hh
andrewmogan/edep-sim
4e9923ccba8b2f65f47b72cbb41ed683f19f1123
[ "MIT" ]
20
2017-11-09T15:41:46.000Z
2022-01-25T20:52:32.000Z
#ifndef EDepSim_UniformPositionGenerator_hh_seen #define EDepSim_UniformPositionGenerator_hh_seen #include "kinem/EDepSimVConstrainedPositionGenerator.hh" /// Select a position and time to be used as the vertex of a primary particle. namespace EDepSim {class UniformPositionGenerator;} class EDepSim::UniformPositionGenerator : public EDepSim::VConstrainedPositionGenerator { public: UniformPositionGenerator(const G4String& name); virtual ~UniformPositionGenerator(); /// Return a candidate vertex. virtual G4LorentzVector GetPosition(); /// Flag if the vertex should be forced to the candidate vertex returned /// by GetPosition(). virtual bool ForcePosition(); }; #endif
33.619048
89
0.787535
andrewmogan
26602bf1c7711de48102a14578e312e9e3dd856d
823
cpp
C++
competitive_programming/programming_contests/interfatecs/1_2018/c.cpp
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
205
2018-12-01T17:49:49.000Z
2021-12-22T07:02:27.000Z
competitive_programming/programming_contests/interfatecs/1_2018/c.cpp
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
2
2020-01-01T16:34:29.000Z
2020-04-26T19:11:13.000Z
competitive_programming/programming_contests/interfatecs/1_2018/c.cpp
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
50
2018-11-28T20:51:36.000Z
2021-11-29T04:08:25.000Z
#include <iostream> #include <bitset> #include <complex> #include <cstdlib> #include <string> #include <vector> #include <sstream> #include <queue> #include <stack> #include <deque> #include <set> #include <map> #include <algorithm> #include <functional> #include <utility> using namespace std; #ifdef DEBUG #define debug(args...) { cerr << #args << ": "; dbg,args; cerr << endl; } struct debugger { template<typename T> debugger& operator , (const T& v) { cerr << v << " "; return *this; } } dbg; #else #define debug(args...) #endif int main(void) { ios::sync_with_stdio(false); int sum = 0; for (int i = 0; i < 3; i++) { int T, Q; cin >> T >> Q; sum += T / Q; } cout << sum << endl; return EXIT_SUCCESS; }
16.137255
75
0.55407
LeandroTk
26676fe733156a97ec6d61310d9195c90f16d963
2,140
cpp
C++
src/smack_properties.cpp
michab66/dev_smack_cpp
37d57b8ccf35e8bbcc98c12eeaf2aeb7b82fa6c6
[ "MIT" ]
2
2021-07-19T16:13:46.000Z
2021-11-25T13:39:46.000Z
src/smack_properties.cpp
michab66/dev_smack_cpp
37d57b8ccf35e8bbcc98c12eeaf2aeb7b82fa6c6
[ "MIT" ]
34
2021-06-27T08:54:35.000Z
2022-02-16T09:13:56.000Z
src/smack_properties.cpp
michab66/dev_smack_cpp
37d57b8ccf35e8bbcc98c12eeaf2aeb7b82fa6c6
[ "MIT" ]
null
null
null
/* Smack C++ @ https://github.com/smacklib/dev_smack_cpp * * Property reading. * * Copyright © 2021 Michael Binz */ #include "smack_properties.hpp" #include "smack_util.hpp" #include <fstream> namespace { template<typename T, typename U> bool nextLine(T& stream, U& result) { size_t count = 0; std::string currentLine; result.erase(); while (std::getline(stream, currentLine)) { count++; if (!smack::util::strings::ends_with(currentLine, "\\")) { result.append(currentLine); break; } result = result.append( currentLine.substr(0, currentLine.size() - 1)); } return count != 0; } } namespace smack::util::properties { PropertyMap loadProperties(std::ifstream& infile) { const auto COMMENT_CHAR = '#'; const auto EQUALS_CHAR = '='; PropertyMap result; std::string line; if (!infile.is_open()) return result; size_t lineCount = 0; while (nextLine(infile, line)) { lineCount++; if (line.empty()) continue; std::string_view buffer{ line }; while (std::isspace(buffer[0])) buffer = buffer.substr(1); if (buffer.empty()) continue; if (buffer[0] == COMMENT_CHAR) continue; if (buffer[0] == EQUALS_CHAR) throw std::runtime_error("Empty key@" + std::to_string(lineCount)); auto equalsPosition = buffer.find(EQUALS_CHAR); if (equalsPosition == string::npos) throw std::runtime_error("Missing '='@" + std::to_string(lineCount)); auto key = buffer.substr(0, equalsPosition); key = util::strings::trim(key); auto val = buffer.substr(equalsPosition + 1); result[string{ key }] = string{ val }; } return result; } PropertyMap loadProperties(string filename) { std::ifstream infile(filename); return loadProperties(infile); } } // namespace smack::util::properties
24.318182
85
0.55514
michab66
266ad421451d42ee9641dfb3e841158c7ac43b11
1,065
cpp
C++
Competitive Programing/CodeChef/AggressiveCows.cpp
Ritvikjain/DataStructures-And-Algorithms
27f2d48343aeb91c67376ae2fee429ca92dbd353
[ "MIT" ]
null
null
null
Competitive Programing/CodeChef/AggressiveCows.cpp
Ritvikjain/DataStructures-And-Algorithms
27f2d48343aeb91c67376ae2fee429ca92dbd353
[ "MIT" ]
null
null
null
Competitive Programing/CodeChef/AggressiveCows.cpp
Ritvikjain/DataStructures-And-Algorithms
27f2d48343aeb91c67376ae2fee429ca92dbd353
[ "MIT" ]
null
null
null
#include<bits/stdc++.h> #include<algorithm> using namespace std; int main() { // Write your code here int t; cin>>t; while(t--) { int n,cows; cin>>n>>cows; long long pos[n]; for(int i=0;i<n;i++) { cin>>pos[i]; } sort(pos,pos+n); long long start = 0; long long end = pos[n-1] - pos[0]; long long ans = -1; while(start <= end) { long long mid = (start + end)/2; int lastPos = 0; long long count = 1; for(int i=1;i<n;i++) { if(pos[i] - pos[lastPos] >= mid) { count++; lastPos = i; } if(count == cows) break; } if(count == cows) { start = mid+1; ans = mid; } else { end = mid-1; } } cout << ans << endl; } }
21.734694
48
0.333333
Ritvikjain
266ca6aea25f6574a038f02e0008048ab2ed9b4a
12,651
hpp
C++
src/menu/Menu.hpp
zhec9/nemo
b719b89933ce722a14355e7ed825a76dea680501
[ "MIT" ]
null
null
null
src/menu/Menu.hpp
zhec9/nemo
b719b89933ce722a14355e7ed825a76dea680501
[ "MIT" ]
null
null
null
src/menu/Menu.hpp
zhec9/nemo
b719b89933ce722a14355e7ed825a76dea680501
[ "MIT" ]
null
null
null
#pragma once #include <string> #include <vector> #include <utility> #include <optional> #include <SFML/Graphics.hpp> #include "utility/type/Color.hpp" #include "utility/type/XY.hpp" #include "utility/type/RowColumn.hpp" #include "utility/adaptor/RC1DConverter.hpp" #include "utility/wrapper/sfVector2.hpp" namespace nemo { /** * \brief Graphical menu. * * Calling the constructor creates an empty menu. The client must add options * to the menu via \property add. The menu isn't displayed on the render window * until \property draw is called. */ class Menu { public: ///////////////////////////////////////////////////////// // Methods // ///////////////////////////////////////////////////////// /** * \brief Constructs an empty menu. * * Upon construction, the menu will be empty. The client should add options * to the menu before calling \property draw; otherwise, the menu would be * displayed in the render window as an empty box. The first menu option * added will always have the cursor over it by default. If the client * doesn't fill all the slots in a page of menu options, then there will be * empty space where the rest of the options would normally be. * * \param pos Starting position in the render window. * \param dim Overall size. This doesn't include the page number * that may be added directly below the menu. * \param rows Maximum rows of menu options per page. * \param cols Maximum columns of menu options per page. * * \param outer_margins Margins between the sides of the menu and of the * outer menu options. * \param inner_margins Margins between each menu option. * * \param align_center Whether all menu options' text should be * horizontally centered. * \param char_sz Character size of each menu option's text. * * \param option_color Colorset for each menu option. * \param cursor_color Colorset for the menu option the cursor is over. * \param box_color Colorset for the menu's box. * * \param font_file Font's filepath. */ Menu( const XYPair pos, const XYPair dim, const Row rows, const Column cols, const XYPair outer_margins = { XValue(10.f), YValue(10.f) }, const XYPair inner_margins = { XValue(10.f), YValue(10.f) }, const bool align_center = false, const size_t char_sz = 16, const TextBoxColor option_color = {{43,7,0}, {249,231,228}, {229,197,191}}, const TextBoxColor cursor_color = {{244,50,116}, {250,250,250}, {229,197,191}}, const TextBoxColor box_color = {{0,0,0}, {251,245,240}, {243,200,214}}, const std::string& font_file = "font/Montserrat-Regular.ttf" ); /** * \brief Constructs an empty menu. * * This constructor uses a json file containing the customizations for the * menu. * * \param file Path to the file containing menu arguments. */ Menu(const std::string& file); /** * \brief Add an option to the menu. * * The client must specify a unique ID for every menu option added. Two menus * can each have a menu option with the same ID, though. * * \param id ID of menu option to add. * \param txt Text to display. * * \return A reference to the object itself. */ Menu& add(const int id, const std::string& txt); /** * \brief Remove an option from the menu. * * This method finds the option based on its ID. If no options in the menu * has \a id, this method generates an assertion error. * * \param id ID of the menu option to remove. * * \return A reference to the object itself. */ Menu& remove(const int id); /** * \brief Change an option's text * * This method finds the option based on its ID. If no options in the menu * has \a id, then this method generates an assertion error. * * \param key Menu option's ID. * \param txt New text to display. * * \return A reference to the object itself. */ Menu& changeOptionText(const int id, const std::string& txt); /** * \brief Change an option's colors. * * This method finds the option based on its ID. If no options in the menu * has \a id, this method generates an assertion error. * * \param key ID of the menu option to change the colors of. * \param colors New color set. * * \return A reference to the object itself. */ Menu& changeOptionColor(const int id, const TextBoxColor color); /** * \brief Checks if the menu is empty. * * \return True if so; false otherwise. */ bool empty() const noexcept; /** * \brief Move cursor to the menu option above the current one. */ void moveUp() noexcept; /** * \brief Move cursor to the menu option below the current one. */ void moveDown() noexcept; /** * \brief Move cursor to the menu option to the right of the current one. */ void moveRight() noexcept; /** * \brief Move cursor to the menu option to the left of the current one. */ void moveLeft() noexcept; /** * \brief Render the menu on screen. * * This method should be called each frame of the game loop when applicable * to keep the menu displayed. * * \param window Render window for the graphical menu to be drawn on. */ void draw(sf::RenderWindow& window); /** * \brief Get the option that the cursor is currently over. * * Use this method if the player selects an option on the menu to find out * what the player selected. * * \return The ID of the menu option that the cursor is on, or nothing * if the menu is empty. */ std::optional<int> cursorAt() const; private: ///////////////////////////////////////////////////////// // Additional types // ///////////////////////////////////////////////////////// /** * \brief Struct containing all the arguments needed to construct a Menu * object, listed in order of the parameters of the first constructor. * The file-parsing constructor passes an instance of this struct returned by * \property parseFile to a private constructor to create a menu. */ struct CtorArgs { ///< Default arguments are bad values that would cause assertion errors // during construction. CtorArgs( const XYPair pos = { XValue(-1.f), YValue(-1.f) }, const XYPair dim = { XValue(-1.f), YValue(-1.f) }, const Row rows = Row(0), const Column cols = Column(0), const XYPair outer_margins = { XValue(-1.f), YValue(-1.f) }, const XYPair inner_margins = { XValue(-1.f), YValue(-1.f) }, const bool align_center = false, const size_t char_sz = 0, const TextBoxColor option_color = { {0,0,0}, {0,0,0}, {0,0,0} }, const TextBoxColor cursor_color = { {0,0,0}, {0,0,0}, {0,0,0} }, const TextBoxColor box_color = { {0,0,0}, {0,0,0}, {0,0,0} }, const std::string& font_file = "" ); XYPair pos_; XYPair dim_; Row rows_; Column cols_; XYPair outer_margins_; XYPair inner_margins_; bool align_center_; size_t char_sz_; TextBoxColor option_color_; TextBoxColor cursor_color_; TextBoxColor box_color_; std::string font_file_; }; /** * \brief Menu option data. */ struct MenuOption { int id_; ///< Identifier. sf::Text txt_; ///< Graphical text. TextBoxColor color_; ///< Colorset. }; /** * \brief Enumeration for which direction the player moves the cursor to in * the menu. * * This is used by \property move, which \property moveUp, \property * moveDown, \property moveLeft, and \property moveRight are wrappers of. */ enum class Direction { Up, Down, Right, Left }; ///////////////////////////////////////////////////////// // Variables // ///////////////////////////////////////////////////////// ///< All menu options' text are aligned to the center horizontally if this is // true. Otherwise, they are aligned to the left. bool align_center_; Row rows_; ///< Maximum rows of menu options per page. Column cols_; ///< Maximum columns of menu options per page. ///< Row-column/1-D index converter for indexing the container where all the // menu options are stored. While options are displayed as rows and columns, // they are internally stored as 1-D. RC1DConverter rc1d_conv_; ///< Container where all menu options that are added to, deleted from, etc.. std::vector<MenuOption> options_; TextBoxColor option_color_; ///< Default colorset of each menu option other // than the one the cursor is over. TextBoxColor cursor_color_; ///< Colorset of the menu option with the cursor. RCPair cursor_rc_; ///< 0-based row-column location of the menu's cursor. size_t char_sz_; ///< Character size for all menu options' text. std::vector<sf::RectangleShape> cells_; ///< Menu options' cells. sf::RectangleShape box_; ///< Menu box. sf::Font font_; ///< Font. ///////////////////////////////////////////////////////// // Methods // ///////////////////////////////////////////////////////// /** * \brief Set where a menu option's text should be drawn on the render * window. * * The exact position is based on its index in the menu option vector. * Options are positioned from left to right, down across rows. This or the * other version should be called for every new menu option added or for an * option that needs to be shifted frontward due to the removal of a * preceding option. * * \param idx 0-based index of the option in the menu option vector that * needs to its position preset. */ void presetTextPosition(const int idx); /** * \brief Change an option's colors * * \param idx 0-based index of the menu option to change the colors of. * \param color New colorset. */ void setOptionColor(const int idx, const TextBoxColor color); /** * \brief Render a menu option on screen. * * \property draw calls this method to render the appropriate page of menu * options on screen. * * \param idx 0-based index of the menu option to render. * \param window Render window for the menu option to be drawn on. */ void drawOption(const int idx, sf::RenderWindow& window); /** * \brief Render the page numbers and navigator arrow indicators on screen. * * \property draw calls this method if there are multiple pages. If there is * only one when this is called, the arrows are excluded. * * \param window Render window for the page navigation references to be * drawn on. */ void drawPageRef(sf::RenderWindow& window) const; /** * \brief Move the cursor along menu options. * * This method does the main work for \property moveUp, \property moveDown, * \property moveLeft, and \property moveRight * * \param dir Direction to move the cursor to. */ void move(const Direction dir) noexcept; /** * \brief Search for an option * * This method finds the option that matches \a id. It SHOULDN'T find more * than one since \property add disallows multiple menu options having * the same ID, but if for some reason there is, it returns the first * occurrence. * * \param id ID of the menu option to find. * * \return Non-const iterator to the menu option found. If there is no match, * \var options_.end() is returned. */ auto find(const int id) -> decltype(options_.begin()); /** * \brief Construct an empty menu from a struct containing arguments for the * non-file-based public constructor. * * This constructor works in tandem with \property parseFile to implement * the public constructor that takes in a json file containing menu * specifications. */ Menu(CtorArgs args); /** * \brief Parse a json file that contains arguments for constructing a Menu * object. * * This method works in tandem with the private constructor to implement the * the public constructor that takes in a json file. * * It generates an assertion error if the json parsing fails for any * reason. * * \return Struct containing arguments needed by the first public * constructor. */ CtorArgs parseFile(const std::string& file) const; }; }
30.631961
81
0.622797
zhec9
267283014342ece891ded836c221145ad5521ac5
5,149
cpp
C++
Compiler/src/Type.cpp
Vyraax/BirdLang
d7cd193531965e35e55fa26b2d3d27ec642d81a5
[ "MIT" ]
3
2020-06-21T15:21:34.000Z
2020-09-02T07:56:48.000Z
Compiler/src/Type.cpp
Vyraax/BirdLang
d7cd193531965e35e55fa26b2d3d27ec642d81a5
[ "MIT" ]
7
2020-06-28T12:56:16.000Z
2020-07-15T11:17:53.000Z
Compiler/src/Type.cpp
Vyraax/BirdLang
d7cd193531965e35e55fa26b2d3d27ec642d81a5
[ "MIT" ]
null
null
null
#include "pch.h" #include "Type.h" #include "Number.h" #include "Function.h" #include "Str.h" #include "Array.h" #include "File.h" #include "Object.h" #include "Interpreter.h" #include "Map.h" bool Type::Null = false; bool Type::False = false; bool Type::True = true; Type::Type( const DynamicType& value, std::shared_ptr<Cursor> start, std::shared_ptr<Cursor> end, Context* context ) { this->value = value; this->start = start; this->end = end; this->context = context; this->depth = 0; } RuntimeResult* Type::execute(const std::vector<Type*>& args, Context* context) { return nullptr; } std::pair<Type*, Error*> Type::add(Type* other) { return std::pair<Number*, Error*>(); } std::pair<Type*, Error*> Type::subtract(Type* other) { return std::pair<Number*, Error*>(); } std::pair<Type*, Error*> Type::multiply(Type* other) { return std::pair<Number*, Error*>(); } std::pair<Type*, Error*> Type::modulus(Type* other) { return std::pair<Number*, Error*>(); } std::pair<Type*, Error*> Type::divide(Type* other) { return std::pair<Number*, Error*>(); } std::pair<Type*, Error*> Type::power(Type* other) { return std::pair<Number*, Error*>(); } std::pair<Type*, Error*> Type::compare_equal(Type* other) { return std::pair<Number*, Error*>(); } std::pair<Type*, Error*> Type::compare_not_equal(Type* other) { return std::pair<Number*, Error*>(); } std::pair<Type*, Error*> Type::compare_less_than(Type* other) { return std::pair<Number*, Error*>(); } std::pair<Type*, Error*> Type::compare_greater_than(Type* other) { return std::pair<Number*, Error*>(); } std::pair<Type*, Error*> Type::compare_less_or_equal(Type* other) { return std::pair<Number*, Error*>(); } std::pair<Type*, Error*> Type::compare_greater_or_equal(Type* other) { return std::pair<Number*, Error*>(); } std::pair<Type*, Error*> Type::compare_and(Type* other) { return std::pair<Number*, Error*>(); } std::pair<Type*, Error*> Type::compare_or(Type* other) { return std::pair<Number*, Error*>(); } std::pair<Type*, Error*> Type::compare_not(Type* other) { return std::pair<Number*, Error*>(); } std::pair<Type*, Error*> Type::is_true() { return std::pair<Number*, Error*>(); } void Type::printArray(std::ostream& stream, Array* array) { auto elements = std::get<std::vector<Type*>>(array->value); std::vector<Type*>::iterator it = elements.begin(); stream << std::string(array->depth, ' ') << "[" << '\n'; array->depth += 4; for (unsigned int i = 0; it != elements.end(); ++it, i++) { auto comma = i != elements.size() - 1 ? ',' : '\0'; stream << std::string(array->depth, ' ') << *it << comma << '\n'; } stream << std::string(array->depth, ' ') << "]" << '\n'; } void Type::printFunction(std::ostream& stream, Function* function) { stream << "<function " << function->name << ">"; } void Type::printString(std::ostream& stream, String* string) { try { stream << '"' << std::get<std::string>(string->value) << '"'; } catch (const std::bad_variant_access&) {} } void Type::printNumber(std::ostream& stream, Number* number) { if (number->value.index() == 0) { try { stream << std::to_string(std::get<double>(number->value)); } catch (const std::bad_variant_access&) {} } else if (number->value.index() == 1) { try { stream << std::to_string(std::get<int>(number->value)); } catch (const std::bad_variant_access&) {} } else if (number->value.index() == 2) { try { stream << (std::get<bool>(number->value) == true ? "true" : "false"); } catch (const std::bad_variant_access&) {} } } void Type::printFile(std::ostream& stream, File* file) { if (file != nullptr) stream << "<file " << std::filesystem::path(file->name).filename() << ">"; } void Type::printMap(std::ostream& stream, Map* map) { auto elements = std::get<std::map<std::string, Type*>>(map->value); std::map<std::string, Type*>::reverse_iterator it = elements.rbegin(); stream << std::string(map->depth, ' ') << "{" << '\n'; map->depth += 4; for (unsigned int i = 0; it != elements.rend(); ++it, i++) { auto comma = i != elements.size() - 1 ? ',' : '\0'; stream << std::string(map->depth + 4, ' ') << it->first << ": " << it->second << comma << '\n'; } stream << std::string(map->depth, ' ') << "}"; map->depth = 0; } void Type::printObject(std::ostream& stream, Object* map) { } std::ostream& operator << (std::ostream& stream, Type* type) { if (type != nullptr) { if (Array* array = dynamic_cast<Array*>(type)) { type->depth = 0; Type::printArray(stream, array); } else if (Map* map = dynamic_cast<Map*>(type)) { type->depth = 0; Type::printMap(stream, map); } else if (Number* number = dynamic_cast<Number*>(type)) Type::printNumber(stream, number); else if (Function* function = dynamic_cast<Function*>(type)) Type::printFunction(stream, function); else if (String* string = dynamic_cast<String*>(type)) Type::printString(stream, string); else if (File* file = (File*)type) Type::printFile(stream, std::get<File*>(file->value)); /* else if (Object* object = (Object*)type) Type::printObject(stream, std::get<Object*>(object->value));*/ } return stream; }
25.745
79
0.62517
Vyraax
2673f6de9bea606b232d2d97e8b600b87b19200f
8,233
cpp
C++
svg_loader/manualBlit.cpp
sl1pkn07/onslaught-vn
b9eadbfc66e363a872a98d5455c7b9567de3e2b0
[ "BSD-3-Clause" ]
1
2021-06-10T08:26:59.000Z
2021-06-10T08:26:59.000Z
svg_loader/manualBlit.cpp
sl1pkn07/onslaught-vn
b9eadbfc66e363a872a98d5455c7b9567de3e2b0
[ "BSD-3-Clause" ]
null
null
null
svg_loader/manualBlit.cpp
sl1pkn07/onslaught-vn
b9eadbfc66e363a872a98d5455c7b9567de3e2b0
[ "BSD-3-Clause" ]
1
2021-06-10T08:27:01.000Z
2021-06-10T08:27:01.000Z
/* * Copyright (c) 2008-2010, Helios (helios.vmg@gmail.com) * 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. * * The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * Products derived from this software may not be called "ONSlaught" nor * may "ONSlaught" appear in their names without specific prior written * permission from the author. * * THIS SOFTWARE IS PROVIDED BY HELIOS "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 HELIOS 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. */ //(Parallelized surface function) struct PSF_parameters{ SDL_Surface *src; SDL_Rect *srcRect; SDL_Surface *dst; SDL_Rect *dstRect; manualBlitAlpha_t alpha; }; void manualBlit_threaded(SDL_Surface *src,SDL_Rect *srcRect,SDL_Surface *dst,SDL_Rect *dstRect,manualBlitAlpha_t alpha); void manualBlit_threaded(void *parameters); NONS_DLLexport void manualBlit(SDL_Surface *src,SDL_Rect *srcRect,SDL_Surface *dst,SDL_Rect *dstRect,manualBlitAlpha_t alpha){ if (!src || !dst || src->format->BitsPerPixel<24 ||dst->format->BitsPerPixel<24 || !alpha) return; SDL_Rect srcRect0,dstRect0; if (!srcRect){ srcRect0.x=0; srcRect0.y=0; srcRect0.w=src->w; srcRect0.h=src->h; }else srcRect0=*srcRect; if (!dstRect){ dstRect0.x=0; dstRect0.y=0; dstRect0.w=dst->w; dstRect0.h=dst->h; }else dstRect0=*dstRect; if (srcRect0.x<0){ if (srcRect0.w<=-srcRect0.x) return; srcRect0.w+=srcRect0.x; srcRect0.x=0; }else if (srcRect0.x>=src->w) return; if (srcRect0.y<0){ if (srcRect0.h<=-srcRect0.y) return; srcRect0.h+=srcRect0.y; srcRect0.y=0; }else if (srcRect0.y>=src->h) return; if (srcRect0.x+srcRect0.w>src->w) srcRect0.w-=srcRect0.x+srcRect0.w-src->w; if (srcRect0.y+srcRect0.h>src->h) srcRect0.h-=srcRect0.y+srcRect0.h-src->h; if (dstRect0.x+srcRect0.w>dst->w) srcRect0.w-=dstRect0.x+srcRect0.w-dst->w; if (dstRect0.y+srcRect0.h>dst->h) srcRect0.h-=dstRect0.y+srcRect0.h-dst->h; if (dstRect0.x<0){ srcRect0.x=-dstRect0.x; srcRect0.w+=dstRect0.x; dstRect0.x=0; }else if (dstRect0.x>=dst->w) return; if (dstRect0.y<0){ srcRect0.y=-dstRect0.y; srcRect0.h+=dstRect0.y; dstRect0.y=0; }else if (dstRect0.y>=dst->h) return; if (srcRect0.w<=0 || srcRect0.h<=0) return; SDL_LockSurface(src); SDL_LockSurface(dst); if (cpu_count==1 || srcRect0.w*srcRect0.h<5000){ manualBlit_threaded(src,&srcRect0,dst,&dstRect0,alpha); SDL_UnlockSurface(dst); SDL_UnlockSurface(src); return; } #ifndef USE_THREAD_MANAGER NONS_Thread *threads=new NONS_Thread[cpu_count]; #endif SDL_Rect *rects0=new SDL_Rect[cpu_count]; SDL_Rect *rects1=new SDL_Rect[cpu_count]; PSF_parameters *parameters=new PSF_parameters[cpu_count]; ulong division=ulong(float(srcRect0.h)/float(cpu_count)); ulong total=0; for (ushort a=0;a<cpu_count;a++){ rects0[a]=srcRect0; rects1[a]=dstRect0; rects0[a].y+=Sint16(a*division); rects0[a].h=Sint16(division); rects1[a].y+=Sint16(a*division); total+=rects0[a].h; parameters[a].src=src; parameters[a].srcRect=rects0+a; parameters[a].dst=dst; parameters[a].dstRect=rects1+a; parameters[a].alpha=alpha; } rects0[cpu_count-1].h+=Uint16(srcRect0.h-total); //ulong t0=SDL_GetTicks(); for (ushort a=1;a<cpu_count;a++) #ifndef USE_THREAD_MANAGER threads[a].call(manualBlit_threaded,parameters+a); #else threadManager.call(a-1,manualBlit_threaded,parameters+a); #endif manualBlit_threaded(parameters); #ifndef USE_THREAD_MANAGER for (ushort a=1;a<cpu_count;a++) threads[a].join(); #else threadManager.waitAll(); #endif //ulong t1=SDL_GetTicks(); //o_stderr <<"Done in "<<t1-t0<<" ms."<<std::endl; SDL_UnlockSurface(dst); SDL_UnlockSurface(src); #ifndef USE_THREAD_MANAGER delete[] threads; #endif delete[] rects0; delete[] rects1; delete[] parameters; } void manualBlit_threaded(void *parameters){ PSF_parameters *p=(PSF_parameters *)parameters; manualBlit_threaded(p->src,p->srcRect,p->dst,p->dstRect,p->alpha); } void manualBlit_threaded(SDL_Surface *src,SDL_Rect *srcRect,SDL_Surface *dst,SDL_Rect *dstRect,manualBlitAlpha_t alpha){ SDL_Rect &srcRect0=*srcRect, &dstRect0=*dstRect; int w0=srcRect0.w, h0=srcRect0.h; if (srcRect0.w<=0 || srcRect0.h<=0) return; surfaceData sd[]={ src, dst }; sd[0].pixels+=sd[0].pitch*srcRect0.y+sd[0].advance*srcRect0.x; sd[1].pixels+=sd[1].pitch*dstRect0.y+sd[1].advance*dstRect0.x; bool negate=(alpha<0); if (negate) alpha=-alpha; #define manualBlit_threaded_DO_ALPHA(variable_code){\ for (int y0=0;y0<h0;y0++){ \ uchar *pos[]={ \ sd[0].pixels, \ sd[1].pixels \ }; \ for (int x0=0;x0<w0;x0++){ \ long rgba0[4]; \ uchar *rgba1[4]; \ for (int a=0;a<4;a++){ \ rgba0[a]=pos[0][sd[0].offsets[a]]; \ rgba1[a]=pos[1]+sd[1].offsets[a]; \ } \ \ {variable_code} \ /*avoid unnecessary jumps*/ \ if (!(negate && rgba0[3])){ \ pos[0]+=sd[0].advance; \ pos[1]+=sd[1].advance; \ continue; \ } \ for (int a=0;a<3;a++) \ *rgba1[a]=~*rgba1[a]; \ } \ sd[0].pixels+=sd[0].pitch; \ sd[1].pixels+=sd[1].pitch; \ } \ } #define manualBlit_threaded_SINGLE_ALPHA_SOURCE(alpha_source) \ ulong as=(alpha_source); \ if (as){ \ *rgba1[0]=(uchar)APPLY_ALPHA(rgba0[0],*rgba1[0],as); \ *rgba1[1]=(uchar)APPLY_ALPHA(rgba0[1],*rgba1[1],as); \ *rgba1[2]=(uchar)APPLY_ALPHA(rgba0[2],*rgba1[2],as); \ } #define manualBlit_threaded_DOUBLE_ALPHA_SOURCE(alpha_source) \ ulong as=(alpha_source); \ ulong bottom_alpha= \ *rgba1[3]=~(uchar)INTEGER_MULTIPLICATION(as^0xFF,*rgba1[3]^0xFF); \ ulong composite=integer_division_lookup[as+bottom_alpha*256]; \ if (composite){ \ *rgba1[0]=(uchar)APPLY_ALPHA(rgba0[0],*rgba1[0],composite); \ *rgba1[1]=(uchar)APPLY_ALPHA(rgba0[1],*rgba1[1],composite); \ *rgba1[2]=(uchar)APPLY_ALPHA(rgba0[2],*rgba1[2],composite); \ } if (alpha==255){ if (!sd[0].alpha){ manualBlit_threaded_DO_ALPHA( *rgba1[0]=(uchar)rgba0[0]; *rgba1[1]=(uchar)rgba0[1]; *rgba1[2]=(uchar)rgba0[2]; if (sd[1].alpha) *rgba1[3]=0xFF; ) }else{ if (!sd[1].alpha){ manualBlit_threaded_DO_ALPHA( manualBlit_threaded_SINGLE_ALPHA_SOURCE(rgba0[3]); ) }else{ manualBlit_threaded_DO_ALPHA( manualBlit_threaded_DOUBLE_ALPHA_SOURCE(rgba0[3]); ) } } }else{ if (!sd[0].alpha){ if (!sd[1].alpha){ manualBlit_threaded_DO_ALPHA( manualBlit_threaded_SINGLE_ALPHA_SOURCE(alpha); ) }else{ manualBlit_threaded_DO_ALPHA( manualBlit_threaded_DOUBLE_ALPHA_SOURCE(alpha); ) } }else{ if (!sd[1].alpha){ manualBlit_threaded_DO_ALPHA( rgba0[3]=INTEGER_MULTIPLICATION(rgba0[3],alpha); manualBlit_threaded_SINGLE_ALPHA_SOURCE(rgba0[3]); ) }else{ manualBlit_threaded_DO_ALPHA( rgba0[3]=INTEGER_MULTIPLICATION(rgba0[3],alpha); manualBlit_threaded_DOUBLE_ALPHA_SOURCE(rgba0[3]); ) } } } }
30.380074
126
0.68104
sl1pkn07
2674fb0e1cc59248d0077f4769abac87262657fb
796
cpp
C++
patbasic/test1053.cpp
neild47/PATBasic
6215232750aa62cf406eb2a9f9c9a6d7c3850339
[ "MIT" ]
null
null
null
patbasic/test1053.cpp
neild47/PATBasic
6215232750aa62cf406eb2a9f9c9a6d7c3850339
[ "MIT" ]
null
null
null
patbasic/test1053.cpp
neild47/PATBasic
6215232750aa62cf406eb2a9f9c9a6d7c3850339
[ "MIT" ]
null
null
null
// // Created by neild47 on 18-4-29. // #include <iostream> using namespace std; int test1053() { int maybeNum = 0, mustNum = 0; int numPeople, D; double threshold; cin >> numPeople >> threshold >> D; for (int i = 0; i < numPeople; i++) { int day; cin >> day; int numLowerThreshold = 0; double tmp; for (int j = 0; j < day; j++) { cin >> tmp; if (tmp < threshold) { numLowerThreshold++; } } if (numLowerThreshold > day / 2) { if (day > D) { mustNum++; } else { maybeNum++; } } } printf("%.1f%% %.1f%%\n", maybeNum * 100.0 / numPeople, mustNum * 100.0 / numPeople); return 0; }
22.111111
89
0.444724
neild47