blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
3
264
content_id
stringlengths
40
40
detected_licenses
sequencelengths
0
85
license_type
stringclasses
2 values
repo_name
stringlengths
5
140
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
905 values
visit_date
timestamp[us]date
2015-08-09 11:21:18
2023-09-06 10:45:07
revision_date
timestamp[us]date
1997-09-14 05:04:47
2023-09-17 19:19:19
committer_date
timestamp[us]date
1997-09-14 05:04:47
2023-09-06 06:22:19
github_id
int64
3.89k
681M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]date
2012-06-07 00:51:45
2023-09-14 21:58:39
gha_created_at
timestamp[us]date
2008-03-27 23:40:48
2023-08-21 23:17:38
gha_language
stringclasses
141 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
10.4M
extension
stringclasses
115 values
content
stringlengths
3
10.4M
authors
sequencelengths
1
1
author_id
stringlengths
0
158
f9b013501e0018594f16a83b99d59a4738af5a78
be0282afa8dd436619c71d6118c9db455eaf1a29
/Intermediate/Build/Win64/Design3D/Inc/NavigationSystem/NavigationGraphNode.gen.cpp
a6948209ce3459874da45d2c7cdbcfcfcb10ef06
[]
no_license
Quant2017/Design3D
0f915580b222af40ab911021cceef5c26375d7f9
94a22386be4aa37aa0f546354cc62958820a4bf6
refs/heads/master
2022-04-23T10:44:12.398772
2020-04-22T01:02:39
2020-04-22T01:02:39
262,966,755
1
0
null
2020-05-11T07:12:37
2020-05-11T07:12:36
null
UTF-8
C++
false
false
3,468
cpp
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved. /*=========================================================================== Generated code exported from UnrealHeaderTool. DO NOT modify this manually! Edit the corresponding .h files instead! ===========================================================================*/ #include "UObject/GeneratedCppIncludes.h" #include "NavigationSystem/Public/NavGraph/NavigationGraphNode.h" #ifdef _MSC_VER #pragma warning (push) #pragma warning (disable : 4883) #endif PRAGMA_DISABLE_DEPRECATION_WARNINGS void EmptyLinkFunctionForGeneratedCodeNavigationGraphNode() {} // Cross Module References NAVIGATIONSYSTEM_API UClass* Z_Construct_UClass_ANavigationGraphNode_NoRegister(); NAVIGATIONSYSTEM_API UClass* Z_Construct_UClass_ANavigationGraphNode(); ENGINE_API UClass* Z_Construct_UClass_AActor(); UPackage* Z_Construct_UPackage__Script_NavigationSystem(); // End Cross Module References void ANavigationGraphNode::StaticRegisterNativesANavigationGraphNode() { } UClass* Z_Construct_UClass_ANavigationGraphNode_NoRegister() { return ANavigationGraphNode::StaticClass(); } struct Z_Construct_UClass_ANavigationGraphNode_Statics { static UObject* (*const DependentSingletons[])(); #if WITH_METADATA static const UE4CodeGen_Private::FMetaDataPairParam Class_MetaDataParams[]; #endif static const FCppClassTypeInfoStatic StaticCppClassTypeInfo; static const UE4CodeGen_Private::FClassParams ClassParams; }; UObject* (*const Z_Construct_UClass_ANavigationGraphNode_Statics::DependentSingletons[])() = { (UObject* (*)())Z_Construct_UClass_AActor, (UObject* (*)())Z_Construct_UPackage__Script_NavigationSystem, }; #if WITH_METADATA const UE4CodeGen_Private::FMetaDataPairParam Z_Construct_UClass_ANavigationGraphNode_Statics::Class_MetaDataParams[] = { { "IncludePath", "NavGraph/NavigationGraphNode.h" }, { "IsBlueprintBase", "false" }, { "ModuleRelativePath", "Public/NavGraph/NavigationGraphNode.h" }, }; #endif const FCppClassTypeInfoStatic Z_Construct_UClass_ANavigationGraphNode_Statics::StaticCppClassTypeInfo = { TCppClassTypeTraits<ANavigationGraphNode>::IsAbstract, }; const UE4CodeGen_Private::FClassParams Z_Construct_UClass_ANavigationGraphNode_Statics::ClassParams = { &ANavigationGraphNode::StaticClass, "Engine", &StaticCppClassTypeInfo, DependentSingletons, nullptr, nullptr, nullptr, ARRAY_COUNT(DependentSingletons), 0, 0, 0, 0x008800A1u, METADATA_PARAMS(Z_Construct_UClass_ANavigationGraphNode_Statics::Class_MetaDataParams, ARRAY_COUNT(Z_Construct_UClass_ANavigationGraphNode_Statics::Class_MetaDataParams)) }; UClass* Z_Construct_UClass_ANavigationGraphNode() { static UClass* OuterClass = nullptr; if (!OuterClass) { UE4CodeGen_Private::ConstructUClass(OuterClass, Z_Construct_UClass_ANavigationGraphNode_Statics::ClassParams); } return OuterClass; } IMPLEMENT_CLASS(ANavigationGraphNode, 314291788); template<> NAVIGATIONSYSTEM_API UClass* StaticClass<ANavigationGraphNode>() { return ANavigationGraphNode::StaticClass(); } static FCompiledInDefer Z_CompiledInDefer_UClass_ANavigationGraphNode(Z_Construct_UClass_ANavigationGraphNode, &ANavigationGraphNode::StaticClass, TEXT("/Script/NavigationSystem"), TEXT("ANavigationGraphNode"), false, nullptr, nullptr, nullptr); DEFINE_VTABLE_PTR_HELPER_CTOR(ANavigationGraphNode); PRAGMA_ENABLE_DEPRECATION_WARNINGS #ifdef _MSC_VER #pragma warning (pop) #endif
3492c784222ca9d3ad4d094508b55fda74966acc
c23e89296a5db607d754967860850bd3ad76a1e0
/test/osm-testdata/testdata-xml.cpp
e4c1716d43c9e84bbe0bfeb5907c794442be48da
[ "BSL-1.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
thomersch/libosmium
db31099bccdd117ef62d705ababf3a40b977e1d1
0999c41d75746551e921c1a2092f74038c1b1d86
refs/heads/master
2020-12-29T00:55:47.965373
2014-12-17T10:01:47
2014-12-17T10:01:47
null
0
0
null
null
null
null
UTF-8
C++
false
false
10,982
cpp
/* The code in this file is released into the Public Domain. */ #define CATCH_CONFIG_MAIN #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wctor-dtor-privacy" #include "catch.hpp" #pragma GCC diagnostic pop #include <cassert> #include <cstdlib> #include <iostream> #include <string> #include <osmium/io/xml_input.hpp> #include <osmium/io/gzip_compression.hpp> #include <osmium/visitor.hpp> std::string filename(const char* test_id, const char* suffix = "osm") { const char* testdir = getenv("TESTDIR"); if (!testdir) { std::cerr << "You have to set TESTDIR environment variable before running testdata-xml\n"; exit(2); } std::string f; f += testdir; f += "/"; f += test_id; f += "/data."; f += suffix; return f; } struct header_buffer_type { osmium::io::Header header; osmium::memory::Buffer buffer; }; // ============================================= // The following helper functions are used to call different parts of the // Osmium internals used to read and parse XML files. This way those parts // can be tested individually. These function can not be used in normal // operations, because they make certain assumptions, for instance that // file contents fit into small buffers. std::string read_file(const char* test_id) { int fd = osmium::io::detail::open_for_reading(filename(test_id)); assert(fd >= 0); std::string input(10000, '\0'); ssize_t n = ::read(fd, reinterpret_cast<unsigned char*>(const_cast<char*>(input.data())), 10000); assert(n >= 0); input.resize(static_cast<std::string::size_type>(n)); close(fd); return input; } std::string read_gz_file(const char* test_id, const char* suffix) { int fd = osmium::io::detail::open_for_reading(filename(test_id, suffix)); assert(fd >= 0); osmium::io::GzipDecompressor gzip_decompressor(fd); std::string input = gzip_decompressor.read(); gzip_decompressor.close(); return input; } header_buffer_type parse_xml(std::string input) { osmium::thread::Queue<std::string> input_queue; osmium::thread::Queue<osmium::memory::Buffer> output_queue; std::promise<osmium::io::Header> header_promise; std::atomic<bool> done {false}; input_queue.push(input); input_queue.push(std::string()); // EOF marker osmium::io::detail::XMLParser parser(input_queue, output_queue, header_promise, osmium::osm_entity_bits::all, done); parser(); header_buffer_type result; result.header = header_promise.get_future().get(); output_queue.wait_and_pop(result.buffer); if (result.buffer) { osmium::memory::Buffer buffer; output_queue.wait_and_pop(buffer); assert(!buffer); } return result; } header_buffer_type read_xml(const char* test_id) { std::string input = read_file(test_id); return parse_xml(input); } // ============================================= TEST_CASE("Reading OSM XML 100") { SECTION("Direct") { header_buffer_type r = read_xml("100-correct_but_no_data"); REQUIRE(r.header.get("generator") == "testdata"); REQUIRE(0 == r.buffer.committed()); REQUIRE(! r.buffer); } SECTION("Using Reader") { osmium::io::Reader reader(filename("100-correct_but_no_data")); osmium::io::Header header = reader.header(); REQUIRE(header.get("generator") == "testdata"); osmium::memory::Buffer buffer = reader.read(); REQUIRE(0 == buffer.committed()); REQUIRE(! buffer); reader.close(); } SECTION("Using Reader asking for header only") { osmium::io::Reader reader(filename("100-correct_but_no_data"), osmium::osm_entity_bits::nothing); osmium::io::Header header = reader.header(); REQUIRE(header.get("generator") == "testdata"); reader.close(); } } // ============================================= TEST_CASE("Reading OSM XML 101") { SECTION("Direct") { REQUIRE_THROWS_AS(read_xml("101-missing_version"), osmium::format_version_error); try { read_xml("101-missing_version"); } catch (osmium::format_version_error& e) { REQUIRE(e.version.empty()); } } SECTION("Using Reader") { REQUIRE_THROWS_AS({ osmium::io::Reader reader(filename("101-missing_version")); osmium::io::Header header = reader.header(); osmium::memory::Buffer buffer = reader.read(); reader.close(); }, osmium::format_version_error); } } // ============================================= TEST_CASE("Reading OSM XML 102") { SECTION("Direct") { REQUIRE_THROWS_AS(read_xml("102-wrong_version"), osmium::format_version_error); try { read_xml("102-wrong_version"); } catch (osmium::format_version_error& e) { REQUIRE(e.version == "0.1"); } } SECTION("Using Reader") { REQUIRE_THROWS_AS({ osmium::io::Reader reader(filename("102-wrong_version")); osmium::io::Header header = reader.header(); osmium::memory::Buffer buffer = reader.read(); reader.close(); }, osmium::format_version_error); } } // ============================================= TEST_CASE("Reading OSM XML 103") { SECTION("Direct") { REQUIRE_THROWS_AS(read_xml("103-old_version"), osmium::format_version_error); try { read_xml("103-old_version"); } catch (osmium::format_version_error& e) { REQUIRE(e.version == "0.5"); } } SECTION("Using Reader") { REQUIRE_THROWS_AS({ osmium::io::Reader reader(filename("103-old_version")); osmium::io::Header header = reader.header(); osmium::memory::Buffer buffer = reader.read(); reader.close(); }, osmium::format_version_error); } } // ============================================= TEST_CASE("Reading OSM XML 104") { SECTION("Direct") { REQUIRE_THROWS_AS(read_xml("104-empty_file"), osmium::xml_error); try { read_xml("104-empty_file"); } catch (osmium::xml_error& e) { REQUIRE(e.line == 1); REQUIRE(e.column == 0); } } SECTION("Using Reader") { REQUIRE_THROWS_AS({ osmium::io::Reader reader(filename("104-empty_file")); osmium::io::Header header = reader.header(); osmium::memory::Buffer buffer = reader.read(); reader.close(); }, osmium::xml_error); } } // ============================================= TEST_CASE("Reading OSM XML 105") { SECTION("Direct") { REQUIRE_THROWS_AS(read_xml("105-incomplete_xml_file"), osmium::xml_error); } SECTION("Using Reader") { REQUIRE_THROWS_AS({ osmium::io::Reader reader(filename("105-incomplete_xml_file")); osmium::io::Header header = reader.header(); osmium::memory::Buffer buffer = reader.read(); reader.close(); }, osmium::xml_error); } } // ============================================= TEST_CASE("Reading OSM XML 120") { SECTION("Direct") { std::string data = read_gz_file("120-correct_gzip_file_without_data", "osm.gz"); REQUIRE(data.size() == 102); header_buffer_type r = parse_xml(data); REQUIRE(r.header.get("generator") == "testdata"); REQUIRE(0 == r.buffer.committed()); REQUIRE(! r.buffer); } SECTION("Using Reader") { osmium::io::Reader reader(filename("120-correct_gzip_file_without_data", "osm.gz")); osmium::io::Header header = reader.header(); REQUIRE(header.get("generator") == "testdata"); osmium::memory::Buffer buffer = reader.read(); REQUIRE(0 == buffer.committed()); REQUIRE(! buffer); reader.close(); } } // ============================================= TEST_CASE("Reading OSM XML 121") { SECTION("Direct") { REQUIRE_THROWS_AS( { read_gz_file("121-truncated_gzip_file", "osm.gz"); }, osmium::gzip_error); } #if 0 SECTION("Using Reader") { REQUIRE_THROWS_AS({ osmium::io::Reader reader(filename("121-truncated_gzip_file", "osm.gz")); osmium::io::Header header = reader.header(); osmium::memory::Buffer buffer = reader.read(); reader.close(); }, osmium::gzip_error); } #endif } // ============================================= TEST_CASE("Reading OSM XML 200") { SECTION("Direct") { header_buffer_type r = read_xml("200-nodes"); REQUIRE(r.header.get("generator") == "testdata"); REQUIRE(r.buffer.committed() > 0); REQUIRE(r.buffer.get<osmium::memory::Item>(0).type() == osmium::item_type::node); REQUIRE(r.buffer.get<osmium::Node>(0).id() == 36966060); REQUIRE(std::distance(r.buffer.begin(), r.buffer.end()) == 3); } SECTION("Using Reader") { osmium::io::Reader reader(filename("200-nodes")); osmium::io::Header header = reader.header(); REQUIRE(header.get("generator") == "testdata"); osmium::memory::Buffer buffer = reader.read(); REQUIRE(buffer.committed() > 0); REQUIRE(buffer.get<osmium::memory::Item>(0).type() == osmium::item_type::node); REQUIRE(buffer.get<osmium::Node>(0).id() == 36966060); REQUIRE(std::distance(buffer.begin(), buffer.end()) == 3); reader.close(); } SECTION("Using Reader asking for nodes") { osmium::io::Reader reader(filename("200-nodes"), osmium::osm_entity_bits::node); osmium::io::Header header = reader.header(); REQUIRE(header.get("generator") == "testdata"); osmium::memory::Buffer buffer = reader.read(); REQUIRE(buffer.committed() > 0); REQUIRE(buffer.get<osmium::memory::Item>(0).type() == osmium::item_type::node); REQUIRE(buffer.get<osmium::Node>(0).id() == 36966060); REQUIRE(std::distance(buffer.begin(), buffer.end()) == 3); reader.close(); } SECTION("Using Reader asking for header only") { osmium::io::Reader reader(filename("200-nodes"), osmium::osm_entity_bits::nothing); osmium::io::Header header = reader.header(); REQUIRE(header.get("generator") == "testdata"); osmium::memory::Buffer buffer = reader.read(); REQUIRE(0 == buffer.committed()); REQUIRE(! buffer); reader.close(); } SECTION("Using Reader asking for ways") { osmium::io::Reader reader(filename("200-nodes"), osmium::osm_entity_bits::way); osmium::io::Header header = reader.header(); REQUIRE(header.get("generator") == "testdata"); osmium::memory::Buffer buffer = reader.read(); REQUIRE(0 == buffer.committed()); REQUIRE(! buffer); reader.close(); } }
7d16dc58bb565ef1b371719377d4841d253eb4fd
9450983856dd63048d3220a3e0558e1d8b930401
/STest/InstructionControlInstructionTests.cpp
a2febff967c972a3a7e60e33a691e2b0b438656b
[]
no_license
mjsmith707/MIPS_Emulator
aba028253932cbf5cb839421391d7917bf4b96e9
95385d169507df1c7d2e68a75fa9690c1c5e8c70
refs/heads/master
2021-01-15T15:38:11.489904
2016-09-12T01:42:28
2016-09-12T01:42:28
49,241,761
1
0
null
null
null
null
UTF-8
C++
false
false
682
cpp
// // InstructionControlInstructionTests.cpp // MIPS_Emulator // // Created by Matt on 1/29/16. // Copyright © 2016 Matt. All rights reserved. // #include "InstructionControlInstructionTests.h" using namespace STest; void add_instruction_control_instructions_tests() { add_test("CPU Instruction Control Instruction Tests", "MIPS_EHB", &MIPS_EHB); add_test("CPU Instruction Control Instruction Tests", "MIPS_PAUSE", &MIPS_PAUSE); add_test("CPU Instruction Control Instruction Tests", "MIPS_SSNOP", &MIPS_SSNOP); } void MIPS_EHB() { TEST_NOT_IMPLEMENTED(); } void MIPS_PAUSE() { TEST_NOT_IMPLEMENTED(); } void MIPS_SSNOP() { TEST_NOT_IMPLEMENTED(); }
f3ad1e3321d81f58758d790c395242bc4c3adba7
70ad0a06c54b68b7d817131f4b139b76739e2e20
/Messages/PRIMessage.h
0eb0dfeac74fd61ce2b060ac930fd68cf421ce55
[ "MIT" ]
permissive
SherlockThang/sidecar
391b08ffb8a91644cbc86cdcb976993386aca70c
2d09dfaebee3c9b030db4d8503b765862e634068
refs/heads/master
2022-12-09T14:57:08.727181
2020-09-01T10:31:12
2020-09-01T10:31:12
313,326,062
1
0
MIT
2020-11-16T14:21:59
2020-11-16T14:21:58
null
UTF-8
C++
false
false
19,049
h
#ifndef SIDECAR_MESSAGES_PRIMESSAGE_H // -*- C++ -*- #define SIDECAR_MESSAGES_PRIMESSAGE_H #include <algorithm> #include <complex> #include <vector> #include "boost/shared_ptr.hpp" #include "Messages/Header.h" #include "Messages/RadarConfig.h" #include "Messages/VMEHeader.h" #include "Time/TimeStamp.h" namespace Logger { class Log; } namespace SideCar { namespace Messages { class VMEDataMessage; /** Base class for all PRI-type messages created in the SideCar. Each message contains header information from the VME system, followed by the data samples. Previously, PRIMessage held a shared reference to a PRIMessageInfo object, which detailed radar configuration parameters. This is no longer the case. Radar settings are now contained in the RadarConfig class. */ class PRIMessage : public Header { public: using Super = Header; using Ref = boost::shared_ptr<PRIMessage>; /** Internal collection of VME/RIU header attributes. */ struct RIUInfo : public IO::CDRStreamable<RIUInfo>, public IO::Printable<RIUInfo> { /** Default constructor. Used when loading from a file. */ RIUInfo() {} /** Conversion constructor. Acquire values from a VME message header. \param vme header to copy */ RIUInfo(const VMEDataMessage& vme); double getRangeAt(double gate) const { return gate * rangeFactor + rangeMin; } /** Load values from a CDR input stream \param cdr stream to read from \return stream read from */ ACE_InputCDR& load(ACE_InputCDR& cdr, int version); /** Write values to a CDR output stream \param cdr stream to write to \return stream written to */ ACE_OutputCDR& write(ACE_OutputCDR& cdr) const; /** Print values to a C++ text stream \param os stream to write to \return stream written to */ std::ostream& print(std::ostream& os) const; std::ostream& printXML(std::ostream& os) const; void loadXML(XmlStreamReader& xsr); uint32_t msgDesc; ///< Description of the raw VME data uint32_t timeStamp; ///< VME timestamp value uint32_t sequenceCounter; ///< VME sequence counter uint32_t shaftEncoding; ///< Value of the shaft encoder at trigger uint32_t prfEncoding; ///< *** This used to be northMark *** double irigTime; ///< VME IRIG timestamp double rangeMin; ///< Range value of the first gate double rangeFactor; ///< Range change for subsequent gates }; /** Obtain the log device for PRIMessage objects. The device name is "SideCar.Messages.PRIMEssage" \return log device */ static Logger::Log& Log(); /** Obtain a reference to the VME header attributes. \return RIUInfo reference */ RIUInfo& getRIUInfo() { return riuInfo_; } uint32_t getSequenceCounter() const { return riuInfo_.sequenceCounter; } /** Obtain the shaft encoding value for the message. To get an azimuth value in radians, use getAzimuthStart(). This value should fall between 0 and RadarConfig::GetShaftEncodingMax(). \return encoder value */ uint32_t getShaftEncoding() const { return riuInfo_.shaftEncoding; } bool hasIRIGTime() const { return riuInfo_.msgDesc & VMEHeader::kIRIGValidMask; } double getIRIGTime() const { return riuInfo_.irigTime; } double getRangeMin() const { return riuInfo_.rangeMin; } double getRangeMax() const { return getRangeAt(size() - 1); } double getRangeFactor() const { return riuInfo_.rangeFactor; } double getRangeAt(double gate) const { return riuInfo_.getRangeAt(gate); } /** Obtain an azimuth value in radians for the PRI message, based on the shaft encoder and the north mark values from the VME syatem. \return azimuth in radians */ double getAzimuthStart() const; /** Obtain the value of getAzimuthStart() + RadarConfig::GetBeamWidth(). \return azimuth in radians */ double getAzimuthEnd() const; virtual size_t size() const = 0; /** Write out the message values to a C++ text output stream. \param os stream to write to \return stream written to */ std::ostream& printHeader(std::ostream& os) const; std::ostream& printDataXML(std::ostream& os) const; void loadXML(XmlStreamReader& xsr); protected: /** Constructor used to create a new message that is derived from another one. Shares the PRIMessageInfo object with the copy, but everything else s unique to the new object. \param producer name of the task that is creating the new object \param metaTypeInfo message type description \param copy message to derive from */ PRIMessage(const std::string& producer, const MetaTypeInfo& metaTypeInfo, const PRIMessage::Ref& copy); /** Constructor used to create a new message. \param producer name of the task that is creating the new object \param metaTypeInfo message type description \param vme header info from the VME RIU message */ PRIMessage(const std::string& producer, const MetaTypeInfo& metaTypeInfo, const VMEDataMessage& vme); /** Constructor used to create a new message populated with data from a raw buffer. \param metaTypeInfo message type description */ PRIMessage(const MetaTypeInfo& metaTypeInfo); /** Constructor used to create a new message populated with data from a raw buffer. \param metaTypeInfo message type description */ PRIMessage(const std::string& producer, const MetaTypeInfo& metaTypeInfo); /** Read in binary data from a CDR stream. \param cdr stream to read from \return stream read from */ ACE_InputCDR& loadArray(ACE_InputCDR& cdr, uint32_t& count); /** Write out our binary data to a CDR stream. \param cdr stream to write to \return stream written to */ ACE_OutputCDR& writeArray(ACE_OutputCDR& cdr, uint32_t size) const; private: RIUInfo riuInfo_; ///< VME header data static ACE_InputCDR& LoadV1(PRIMessage* obj, ACE_InputCDR& cdr); static ACE_InputCDR& LoadV2(PRIMessage* obj, ACE_InputCDR& cdr); static ACE_InputCDR& LoadV3(PRIMessage* obj, ACE_InputCDR& cdr); static ACE_InputCDR& LoadV4(PRIMessage* obj, ACE_InputCDR& cdr); using LoaderRegistry = TLoaderRegistry<PRIMessage>; static LoaderRegistry::VersionedLoaderVector DefineLoaders(); static LoaderRegistry loaderRegistry_; }; /** Reference-counting reference to message object. Derived from boost::shared_ptr to allow [] indexing. */ template <typename _T> class TPRIMessageRef : public boost::shared_ptr<_T> { public: using HeldType = _T; using Base = boost::shared_ptr<_T>; using DatumType = typename _T::DatumType; /** Default constructor. */ TPRIMessageRef() : Base() {} /** Constructor that takes ownership of a TPRIMessage object \param self object to acquire */ TPRIMessageRef(_T* self) : Base(self) {} /** Conversion constructor for boost::shared_ptr objects. \param r shared ptr to share */ TPRIMessageRef(Base const& r) : Base(r) {} /** Obtain a read-only reference to the item at a given position \param index position to dereference \return data reference */ const DatumType& operator[](size_t index) const { return Base::get()->operator[](index); } /** Obtain a reference to the item at a given position \param index position to dereference \return data reference */ DatumType& operator[](size_t index) { return Base::get()->operator[](index); } /** Assignment operator. \param rhs object to copy from \return reference to self */ TPRIMessageRef& operator=(TPRIMessageRef const& rhs) { Base::operator=(rhs); return *this; } }; /** Templated version of the PRIMessage class. Contains type-specific implementations and overrides. The sole template parameter is a type trait definition structure, which must contain the following definitions: - Type -- data type for a single sample (eg. int16, float) - Reader -- function to call to read in sample data from a CDR input stream - Writer -- function to call to write sample data to a CDR output stream - Printer -- function to call to print sample data to a C++ text stream Since nearly all of the type-specific functionality is contained in the type traits structure, TPRIMessage classes are very light-weight in terms of code bloat. */ template <typename _V> class TPRIMessage : public PRIMessage { public: using TraitsType = _V; using DatumType = typename _V::Type; using value_type = typename _V::Type; // for stl::vector compatibility using Self = TPRIMessage<_V>; using Ref = boost::shared_ptr<Self>; using Super = PRIMessage; using Container = std::vector<DatumType>; using iterator = typename Container::iterator; using const_iterator = typename Container::const_iterator; /** Obtain a writeable reference to the underlying sample data container. Should be used with caution. \return Container reference */ Container& getData() { return data_; } const Container& getData() const { return data_; } double getRangeAt(double gate) const { return PRIMessage::getRangeAt(gate); } /** Obtain the range of a particular sample \param pos iterator pointing to the sample to query \return range in kilometers */ double getRangeAt(const_iterator pos) const { return PRIMessage::getRangeAt(pos - data_.begin()); } /** Allocate enough space in the sample container to hold a certain number of samples. Simply forwards to the container's reserve() method. \param size space to reserve */ void reserve(size_t size) { data_.reserve(size); } /** Obtain the number of data elements in the message. \return count */ size_t size() const { return data_.size(); } /** Change the size of the container to hold a given number of values. \param size new size of the container \param init value to use for new values added when expanding the container */ void resize(size_t size, DatumType init = DatumType()) { data_.resize(size, init); } /** Determine if the message has any data at all. \return true if empty */ bool empty() const { return data_.empty(); } /** Append a sample value to the end of the message \param datum value to append */ void push_back(const DatumType& value) { data_.push_back(value); } /** Index operator to access samples using array notation. \param index sample to obtain \return reference to indexed sample */ DatumType& operator[](size_t index) { return data_[index]; } /** Read-only index operator to access samples using array notation. \param index sample to obtain \return read-only reference to indexed sample */ const DatumType& operator[](size_t index) const { return data_[index]; } /** Obtain read-only iterator to the first sample value in the message. \return read-only iterator */ const_iterator begin() const { return data_.begin(); } /** Obtain read-only iterator to the last + 1 sample value in the message. \return read-only iterator */ const_iterator end() const { return data_.end(); } /** Obtain writable iterator to the first sample value in the message. \return writable iterator */ iterator begin() { return data_.begin(); } /** Obtain writable iterator to the last + 1 sample value in the message. \return writable iterator */ iterator end() { return data_.end(); } size_t getSize() const { return data_.size() * sizeof(DatumType) + Header::getSize() + sizeof(RIUInfo); } /** Read in binary data from a CDR stream. \param cdr stream to read from \return stream read from */ ACE_InputCDR& load(ACE_InputCDR& cdr) { uint32_t count; loadArray(cdr, count); _V::Reader(cdr, count, data_); return cdr; } /** Write out our binary data to a CDR stream. \param cdr stream to write to \return stream written to */ ACE_OutputCDR& write(ACE_OutputCDR& cdr) const { writeArray(cdr, size()); _V::Writer(cdr, data_); return cdr; } /** Write out the message values to a C++ text output stream. \param os stream to write to \return stream written to */ std::ostream& printData(std::ostream& os) const { _V::Printer(os, data_); return os; } void loadXML(XmlStreamReader& xsr) { Super::loadXML(xsr); _V::ReaderXML(xsr, data_); } /** Write out the message values to a C++ text output stream. \param os stream to write to \return stream written to */ std::ostream& printDataXML(std::ostream& os) const { Super::printDataXML(os); os << "<samples count=\"" << data_.size() << "\">"; _V::PrinterXML(os, data_); return os << "</samples>"; } protected: /** Constructor for new PRI messages created from a VME RIU message. \param producer algorithm/task creating the message \param metaTypeInfo type specification for the message \param vme VME header describing the data \param size number of samples to reserve in the container */ TPRIMessage(const std::string& producer, const MetaTypeInfo& metaTypeInfo, const VMEDataMessage& vme, size_t size) : Super(producer, metaTypeInfo, vme), data_() { data_.reserve(size); } TPRIMessage(const std::string& producer, const MetaTypeInfo& metaTypeInfo, const VMEDataMessage& vme, const Container& data) : Super(producer, metaTypeInfo, vme), data_(data) { } /** Constructor for messages derived from another PRIMessage type. \param producer algorithm/task creating the message \param metaTypeInfo type specification for the message \param copy reference to the basis message \param size number of samples to reserve in the container */ TPRIMessage(const std::string& producer, const MetaTypeInfo& metaTypeInfo, const PRIMessage::Ref& copy, size_t size) : Super(producer, metaTypeInfo, copy), data_() { data_.reserve(size); } /** Constructor for messages loaded from a CDR stream. \param producer algorithm/task creating the message */ TPRIMessage(const MetaTypeInfo& metaTypeInfo) : Super(metaTypeInfo), data_() {} /** Constructor for messages loaded from a CDR stream. \param producer algorithm/task creating the message */ TPRIMessage(const std::string& producer, const MetaTypeInfo& metaTypeInfo) : Super(producer, metaTypeInfo), data_() { } Container data_; ///< Collection of PRIDatum values }; /** Definitions for various sample data types. These traits may be used as a parameter to the TPRIMessage template defined above. */ namespace Traits { /** Template function that will print out sample values from a vector onto a C++ output stream. The number of elements placed on a line is set by the kPerLine template parameter. \param os stream to write to \param data container with the data */ template <typename T, int kPerLine> void GenericPrinter(std::ostream& os, const std::vector<T>& data) { size_t count = data.size(); const T* ptr(count ? &data[0] : 0); os << "Size: " << count << '\n'; while (count) { for (int index = 0; index < kPerLine && count; ++index, --count) os << *ptr++ << ' '; os << '\n'; } } /** Traits for binary samples (on/off) */ struct Bool { using Type = char; static void Reader(ACE_InputCDR& cdr, size_t size, std::vector<Type>& data); static void Writer(ACE_OutputCDR& cdr, const std::vector<Type>& data); static void Printer(std::ostream& os, const std::vector<Type>& data); static void ReaderXML(XmlStreamReader& xsr, std::vector<Type>& data); static void PrinterXML(std::ostream& os, const std::vector<Type>& data); }; /** Traits for samples of 16 bits. */ struct Int16 { using Type = int16_t; static void Reader(ACE_InputCDR& cdr, size_t size, std::vector<Type>& data); static void Writer(ACE_OutputCDR& cdr, const std::vector<Type>& data); static void Printer(std::ostream& os, const std::vector<Type>& data); static void ReaderXML(XmlStreamReader& xsr, std::vector<Type>& data); static void PrinterXML(std::ostream& os, const std::vector<Type>& data); }; struct ComplexInt16 { using Type = std::complex<int16_t>; static void Reader(ACE_InputCDR& cdr, size_t size, std::vector<Type>& data); static void Writer(ACE_OutputCDR& cdr, const std::vector<Type>& data); static void Printer(std::ostream& os, const std::vector<Type>& data); static void ReaderXML(XmlStreamReader& xsr, std::vector<Type>& data); static void PrinterXML(std::ostream& os, const std::vector<Type>& data); }; /** Traits for samples of 32 bits. */ struct Int32 { using Type = int32_t; static void Reader(ACE_InputCDR& cdr, size_t size, std::vector<Type>& data); static void Writer(ACE_OutputCDR& cdr, const std::vector<Type>& data); static void Printer(std::ostream& os, const std::vector<Type>& data); static void ReaderXML(XmlStreamReader& xsr, std::vector<Type>& data); static void PrinterXML(std::ostream& os, const std::vector<Type>& data); }; /** Traits for samples of IEEE single-precision floating-point values */ struct Float { using Type = float; static void Reader(ACE_InputCDR& cdr, size_t size, std::vector<Type>& data); static void Writer(ACE_OutputCDR& cdr, const std::vector<Type>& data); static void Printer(std::ostream& os, const std::vector<Type>& data); static void ReaderXML(XmlStreamReader& xsr, std::vector<Type>& data); static void PrinterXML(std::ostream& os, const std::vector<Type>& data); }; /** Traits for samples of IEEE double-precision floating-point values */ struct Double { using Type = double; static void Reader(ACE_InputCDR& cdr, size_t size, std::vector<Type>& data); static void Writer(ACE_OutputCDR& cdr, const std::vector<Type>& data); static void Printer(std::ostream& os, const std::vector<Type>& data); static void ReaderXML(XmlStreamReader& xsr, std::vector<Type>& data); static void PrinterXML(std::ostream& os, const std::vector<Type>& data); }; } // end namespace Traits } // end namespace Messages } // end namespace SideCar /** \file */ #endif
45b9901b5ef1e591ecf90c9a02216dcabd63a1fe
44b15823f524dffab70fd6b9d1153c49271755b3
/01_intro/fahrToCel.cpp
eb8ac2785e98627d4cd5fd851b21d0d7ebb160e3
[]
no_license
AjayThakur12/cpp17winter
ecd6710aac8117758e86e1dc7feb1b5ca7ccb5a4
32b4b6e91b45e2d9a2748238ca5590e11109590a
refs/heads/master
2020-03-20T01:14:10.135659
2017-12-28T12:39:06
2017-12-28T12:39:06
null
0
0
null
null
null
null
UTF-8
C++
false
false
256
cpp
// Deepak Aggarwal, Coding Blocks // [email protected] #include <iostream> using namespace std; int main() { double fahr; cin >> fahr; double cel = (double)5 / 9 * (fahr - 32); // double cel = 5.0 / 9 * (fahr - 32); cout << cel << endl; }
f59114d29d276a9df1a6b99290d47a80dd6f750a
b5537e57e63a66e4b4c28442773bc0635c81ec96
/include/DBConnector.h
af38d7e874754adb8fb524ef8992ac91fd68696a
[]
no_license
Nerd0o0/ISPstats
aa4d80bcd8f9f7ff5a490171bfd9a1832de6cacb
5c5007f374573ee93f7ee687929d2dcacb501048
refs/heads/master
2023-03-27T09:41:22.532290
2021-03-20T03:41:02
2021-03-20T03:41:02
183,853,735
0
0
null
null
null
null
UTF-8
C++
false
false
1,071
h
#pragma once #include "../unities/include/SprintsAndProjects.h" #include "../unities/include/JobsForSprint.h" #include "../unities/include/JobsForPerson.h" #include "../unities/include/SprintBase.h" #include "../unities/include/ProjectBase.h" #include "../unities/include/PersonBase.h" #include "../unities/include/LeaderPerson.h" #include "mysql.h" using namespace std; class DBConnector { public: DBConnector(); ~DBConnector(); vector<unities::SprintsAndProjects> getSprintsAndProjects(); vector<unities::JobsForSprint> getJobsForSprint(int); vector<unities::JobsForPerson> getJobsForPerson(int); vector<unities::SprintBase> getSprints(); vector<unities::ProjectBase> getProjects(); vector<unities::ProjectBase> getProjectForSprint(int); vector<unities::PersonBase> getPersons(); vector<unities::SprintBase> getSprintsForProject(int); vector<unities::LeaderPerson> getMinRatioPerson(); unities::LeaderPerson getMinDiscussionsAndReturnsPerson(); private: MYSQL *connector; MYSQL_RES *res; MYSQL_ROW row; };
87be25353e5d65d8c5f29f738ade077674af3fcc
7acade811ca8ec73626cec0c60b8d1f30d78b195
/build/linux-build/Sources/include/hxinc/StringTools.h
aa14ca30ea08f1d0b1373e39aa464de8e05f02dd
[ "MIT" ]
permissive
Sondro/bonsai
f7f283a04f184efdc6db7b9f8498d25b2bb1d8d8
3373013359174e70301f31444e28b1478ee54830
refs/heads/master
2020-12-15T19:32:33.384353
2020-01-20T11:15:51
2020-01-20T11:15:51
null
0
0
null
null
null
null
UTF-8
C++
false
true
1,739
h
// Generated by Haxe 4.0.5 #ifndef INCLUDED_StringTools #define INCLUDED_StringTools #ifndef HXCPP_H #include <hxcpp.h> #endif HX_DECLARE_CLASS0(StringTools) class HXCPP_CLASS_ATTRIBUTES StringTools_obj : public hx::Object { public: typedef hx::Object super; typedef StringTools_obj OBJ_; StringTools_obj(); public: enum { _hx_ClassId = 0x0363db6a }; void __construct(); inline void *operator new(size_t inSize, bool inContainer=false,const char *inName="StringTools") { return hx::Object::operator new(inSize,inContainer,inName); } inline void *operator new(size_t inSize, int extra) { return hx::Object::operator new(inSize+extra,false,"StringTools"); } inline static hx::ObjectPtr< StringTools_obj > __new() { hx::ObjectPtr< StringTools_obj > __this = new StringTools_obj(); __this->__construct(); return __this; } inline static hx::ObjectPtr< StringTools_obj > __alloc(hx::Ctx *_hx_ctx) { StringTools_obj *__this = (StringTools_obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(StringTools_obj), false, "StringTools")); *(void **)__this = StringTools_obj::_hx_vtable; return __this; } static void * _hx_vtable; static Dynamic __CreateEmpty(); static Dynamic __Create(hx::DynamicArray inArgs); //~StringTools_obj(); HX_DO_RTTI_ALL; static bool __GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp); static void __register(); bool _hx_isInstanceOf(int inClassId); ::String __ToString() const { return HX_("StringTools",6a,db,63,03); } static ::String urlDecode(::String s); static ::Dynamic urlDecode_dyn(); static bool endsWith(::String s,::String end); static ::Dynamic endsWith_dyn(); }; #endif /* INCLUDED_StringTools */
b368edcc3ae2d99b98f8e567adeb3ae477b7d1f6
ba0cbdae81c171bd4be7b12c0594de72bd6d625a
/MyToontown/Panda3D-1.9.0/include/socket_address.h
a991a8861f607a115837ed30f3be9b340f9254f2
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
sweep41/Toontown-2016
65985f198fa32a832e762fa9c59e59606d6a40a3
7732fb2c27001264e6dd652c057b3dc41f9c8a7d
refs/heads/master
2021-01-23T16:04:45.264205
2017-06-04T02:47:34
2017-06-04T02:47:34
93,279,679
0
0
null
null
null
null
UTF-8
C++
false
false
9,823
h
#ifndef __SOCKET_ADDRESS_H__ #define __SOCKET_ADDRESS_H__ #include "pandabase.h" #include "numeric_types.h" #include "socket_portable.h" /////////////////////////////////// // Class : Socket_Address // // Description: A simple place to store and munipulate tcp and port address for // communication layer // ////////////////////////////// class EXPCL_PANDA_NATIVENET Socket_Address { public: typedef struct sockaddr_in AddressType; Socket_Address(const AddressType &inaddr); AddressType & GetAddressInfo() { return _addr; } const AddressType & GetAddressInfo() const { return _addr; } PUBLISHED: inline Socket_Address(short port = 0); inline Socket_Address(const Socket_Address &inaddr); inline virtual ~Socket_Address(); inline bool set_any_IP(int port); inline bool set_port(int port); inline bool set_broadcast(int port); inline bool set_host(const std::string &hostname, int port) ; inline bool set_host(const std::string &hostname) ; inline bool set_host(unsigned int ip4adr, int port); inline void clear(); inline unsigned short get_port() const; inline std::string get_ip() const ; inline std::string get_ip_port() const; inline unsigned long GetIPAddressRaw() const; inline bool operator== (const Socket_Address &in) const; inline bool operator < (const Socket_Address &in) const; inline bool isMcastRange(); private: AddressType _addr; }; ////////////////////////////////////////////////////////////// // Function name : Socket_Address::GetIPAdddressRaw // Description : Return a RAW sockaddr_in ////////////////////////////////////////////////////////////// inline unsigned long Socket_Address::GetIPAddressRaw() const { return _addr.sin_addr.s_addr; } /////////////////////////////////////////////////////////////////// // Function name : Socket_Address // Description : Constructor that lets us set a port value //////////////////////////////////////////////////////////////////// inline Socket_Address::Socket_Address(short port) { _addr.sin_family = AF_INET; _addr.sin_addr.s_addr = INADDR_ANY; _addr.sin_port = htons(port); } //////////////////////////////////////////////////////////////////// // Function name : Socket_Address Constructor // Description : Copy Constructor //////////////////////////////////////////////////////////////////// inline Socket_Address::Socket_Address(const Socket_Address &inaddr) { _addr.sin_family = inaddr._addr.sin_family; _addr.sin_addr.s_addr = inaddr._addr.sin_addr.s_addr; _addr.sin_port = inaddr._addr.sin_port; } inline Socket_Address::Socket_Address(const AddressType &inaddr) { _addr.sin_family = inaddr.sin_family; _addr.sin_addr.s_addr = inaddr.sin_addr.s_addr; _addr.sin_port = inaddr.sin_port; } //////////////////////////////////////////////////////////////////// // Function name : ~Socket_Address::Socket_Address // Description : Normal Destructor //////////////////////////////////////////////////////////////////// inline Socket_Address::~Socket_Address() {} ////////////////////////////////////////////////////////////// // Function name : Socket_Address::operator== // Description : Allow for normal == operation on a address item.. // Will simplify the use in sorted containers.. ////////////////////////////////////////////////////////////// inline bool Socket_Address::operator==(const Socket_Address &in) const { return ((_addr.sin_family == in._addr.sin_family) && (_addr.sin_addr.s_addr == in._addr.sin_addr.s_addr) && (_addr.sin_port == in._addr.sin_port) ); } //////////////////////////////////////////////////////////////////// // Function name : set_broadcast // Description : Set to the broadcast address and a specified port //////////////////////////////////////////////////////////////////// inline bool Socket_Address::set_broadcast(int port) { _addr.sin_family = AF_INET; _addr.sin_addr.s_addr = 0xffffffff; _addr.sin_port = htons(port); return true; } //////////////////////////////////////////////////////////////////// // Function name : set_any_IP // Description : Set to any address and a specified port //////////////////////////////////////////////////////////////////// inline bool Socket_Address::set_any_IP(int port) { _addr.sin_family = AF_INET; _addr.sin_addr.s_addr = INADDR_ANY; _addr.sin_port = htons(port); return true; } //////////////////////////////////////////////////////////////////// // Function name : set_port // Description : Set to a specified port //////////////////////////////////////////////////////////////////// inline bool Socket_Address::set_port(int port) { _addr.sin_port = htons(port); return true; } //////////////////////////////////////////////////////////////////// // Function name : clear // Description : Set the internal values to a suitable known value //////////////////////////////////////////////////////////////////// inline void Socket_Address::clear() { _addr.sin_family = AF_INET; _addr.sin_addr.s_addr = INADDR_ANY; _addr.sin_port = htons(0); } //////////////////////////////////////////////////////////////////// // Function name : get_port // Description : Get the port portion as an integer //////////////////////////////////////////////////////////////////// inline unsigned short Socket_Address::get_port() const { return ntohs(_addr.sin_port); } //////////////////////////////////////////////////////////////////// // Function name : get_ip // Description : Return the ip address portion in dot notation string //////////////////////////////////////////////////////////////////// inline std::string Socket_Address::get_ip() const { return std::string(inet_ntoa(_addr.sin_addr)); } //////////////////////////////////////////////////////////////////// // Function name : get_ip_port // Description : Return the ip address/port in dot notation string //////////////////////////////////////////////////////////////////// inline std::string Socket_Address::get_ip_port() const { char buf1[100]; // 100 is more than enough for any ip address:port combo.. sprintf(buf1, "%s:%d", inet_ntoa(_addr.sin_addr), get_port()); return std::string(buf1); } //////////////////////////////////////////////////////////////////// // Function name : set_host // Description : this function will take a port and string-based tcp address and initialize // the address with the information // // Return type : bool (address is undefined after an error) //////////////////////////////////////////////////////////////////// inline bool Socket_Address::set_host(const std::string &hostname, int port) { struct hostent *hp = NULL; // // hmm inet_addr does not resolve 255.255.255.255 on ME/98 ?? // // * HACK * ?? if(hostname == "255.255.255.255") return set_broadcast(port); // // PN_uint32 addr = (long)inet_addr (hostname.c_str()); if(addr == INADDR_NONE) { hp = gethostbyname(hostname.c_str()); if(hp== NULL) return false; else memcpy(&(_addr.sin_addr),hp->h_addr_list[0] , (unsigned int) hp->h_length); } else (void) memcpy(&_addr.sin_addr,&addr,sizeof(addr)); _addr.sin_port = htons(port); _addr.sin_family = AF_INET; return true; } ////////////////////////////////////////////////////////////// // Function name : Socket_Address::set_host // Description : ////////////////////////////////////////////////////////////// inline bool Socket_Address::set_host(const std::string &hostname) { std::string::size_type pos = hostname.find(':'); if (pos == std::string::npos) return false; std::string host = hostname.substr(0, pos); std::string port = hostname.substr(pos + 1, 100);; int port_dig = atoi(port.c_str()); return set_host(host, port_dig); } ////////////////////////////////////////////////////////////// // Function name : Socket_Address::set_host // Description : ////////////////////////////////////////////////////////////// inline bool Socket_Address::set_host(PN_uint32 in_hostname, int port) { memcpy(&_addr.sin_addr, &in_hostname, sizeof(in_hostname)); _addr.sin_port = htons(port); _addr.sin_family = AF_INET; return true; } ////////////////////////////////////////////////////////////// // Function name : < // Description : ////////////////////////////////////////////////////////////// inline bool Socket_Address::operator < (const Socket_Address &in) const { if (_addr.sin_port < in._addr.sin_port) return true; if (_addr.sin_port > in._addr.sin_port) return false; if (_addr.sin_addr.s_addr < in._addr.sin_addr.s_addr) return true; if (_addr.sin_addr.s_addr > in._addr.sin_addr.s_addr) return false; return (_addr.sin_family < in._addr.sin_family); } ////////////////////////////////////////////////////////////// // Function name : isMcastRange // Description : return true if the address is in the mcast range. ////////////////////////////////////////////////////////////// inline bool Socket_Address::isMcastRange(void) { PN_uint32 address = ntohl(_addr.sin_addr.s_addr); //224.0.0.0-239.255.255.255 .. e0,ef if(address >= 0xe0000000 && address < 0xefffffff) return true; return false; } #endif //__SOCKET_ADDRESS_H__
a9b66fce7eb8695d5026c2ad6d5245f352d37d62
9ff35738af78a2a93741f33eeb639d22db461c5f
/.build/Android-Debug/jni/app/Fuse.Internal.Float3Blender.cpp
5ce4ea5a3c6277fe57ecefc1f33e58c5aa56c566
[]
no_license
shingyho4/FuseProject-Minerals
aca37fbeb733974c1f97b1b0c954f4f660399154
643b15996e0fa540efca271b1d56cfd8736e7456
refs/heads/master
2016-09-06T11:19:06.904784
2015-06-15T09:28:09
2015-06-15T09:28:09
37,452,199
0
0
null
null
null
null
UTF-8
C++
false
false
1,052
cpp
// This file was generated based on 'C:\ProgramData\Uno\Packages\FuseCore\0.1.0\Internal\$.uno'. // WARNING: Changes might be lost if you edit this file directly. #include <app/Fuse.Internal.Float3Blender.h> namespace app { namespace Fuse { namespace Internal { Float3Blender__uType* Float3Blender__typeof() { static Float3Blender__uType* type; if (::uEnterCriticalIfNull(&type)) { type = (Float3Blender__uType*)::uAllocClassType(sizeof(Float3Blender__uType), "Fuse.Internal.Float3Blender", ::app::Fuse::Internal::Blender__float3__typeof()); ::uRetainObject(type); ::uExitCritical(); } return type; } void Float3Blender___ObjInit_1(Float3Blender* __this) { ::app::Fuse::Internal::Blender__float3___ObjInit(__this); } Float3Blender* Float3Blender__New_1(::uStatic* __this) { Float3Blender* inst = (::app::Fuse::Internal::Float3Blender*)::uAllocObject(sizeof(::app::Fuse::Internal::Float3Blender), ::app::Fuse::Internal::Float3Blender__typeof()); inst->_ObjInit_1(); return inst; } }}}
e323bba6a0d199fc2b4fed44d73492184828bd99
091afb7001e86146209397ea362da70ffd63a916
/inst/include/nt2/core/include/functions/sixteen.hpp
38905028e587da7b35a526e8150a81027327e4a4
[]
no_license
RcppCore/RcppNT2
f156b58c08863243f259d1e609c9a7a8cf669990
cd7e548daa2d679b6ccebe19744b9a36f1e9139c
refs/heads/master
2021-01-10T16:15:16.861239
2016-02-02T22:18:25
2016-02-02T22:18:25
50,460,545
15
1
null
2019-11-15T22:08:50
2016-01-26T21:29:34
C++
UTF-8
C++
false
false
163
hpp
#ifndef NT2_CORE_INCLUDE_FUNCTIONS_SIXTEEN_HPP_INCLUDED #define NT2_CORE_INCLUDE_FUNCTIONS_SIXTEEN_HPP_INCLUDED #include <nt2/core/functions/sixteen.hpp> #endif
609ff2f5994f94f09c94521f942cfe3e51563a48
733ce204191c5835584007c23e88eaf8c93892d4
/src/pro/pro_net/pro_service_hub.cpp
1254253e815ec9e7b3f931fb72a39259ea37211b
[ "Apache-2.0", "LicenseRef-scancode-public-domain", "BSD-3-Clause", "LicenseRef-scancode-mit-old-style" ]
permissive
skyformat99/libpronet
5e80429c1027960a511061840cf959dc1361f0cc
b9dd1fccc8d6f3bb68176b538d07ba48f500d643
refs/heads/master
2020-04-04T13:09:12.001583
2018-10-30T02:47:59
2018-10-30T02:47:59
null
0
0
null
null
null
null
UTF-8
C++
false
false
12,900
cpp
/* * Copyright (C) 2018 Eric Tung <[email protected]> * * 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. * * This file is part of LibProNet (http://www.libpro.org) */ #include "pro_service_hub.h" #include "pro_service_pipe.h" #include "../pro_net/pro_net.h" #include "../pro_util/pro_bsd_wrapper.h" #include "../pro_util/pro_ref_count.h" #include "../pro_util/pro_stl.h" #include "../pro_util/pro_thread_mutex.h" #include "../pro_util/pro_time_util.h" #include "../pro_util/pro_timer_factory.h" #include "../pro_util/pro_z.h" #if defined(WIN32) || defined(_WIN32_WCE) #include <windows.h> #endif #include <cassert> ///////////////////////////////////////////////////////////////////////////// //// #define HEARTBEAT_INTERVAL 1 #define SOCK_TIMEOUT 5 #define PIPE_TIMEOUT 10 ///////////////////////////////////////////////////////////////////////////// //// CProServiceHub* CProServiceHub::CreateInstance() { CProServiceHub* const hub = new CProServiceHub; return (hub); } CProServiceHub::CProServiceHub() { m_reactor = NULL; m_acceptor = NULL; m_timerId = 0; } CProServiceHub::~CProServiceHub() { Fini(); } bool CProServiceHub::Init(IProReactor* reactor, unsigned short servicePort, unsigned long timeoutInSeconds) /* = 0 */ { assert(reactor != NULL); assert(servicePort > 0); if (reactor == NULL || servicePort == 0) { return (false); } { CProThreadMutexGuard mon(m_lock); assert(m_reactor == NULL); assert(m_acceptor == NULL); if (m_reactor != NULL || m_acceptor != NULL) { return (false); } m_acceptor = ProCreateAcceptorEx( this, reactor, "0.0.0.0", servicePort, timeoutInSeconds); if (m_acceptor == NULL) { return (false); } m_reactor = reactor; m_timerId = reactor->ScheduleTimer(this, HEARTBEAT_INTERVAL * 1000, true); } return (true); } void CProServiceHub::Fini() { IProAcceptor* acceptor = NULL; CProStlSet<PRO_SERVICE_PIPE> allPipes; CProStlSet<PRO_SERVICE_SOCK> expireSocks; { CProThreadMutexGuard mon(m_lock); if (m_reactor == NULL || m_acceptor == NULL) { return; } m_reactor->CancelTimer(m_timerId); m_timerId = 0; expireSocks = m_expireSocks; m_expireSocks.clear(); m_serviceId2Pipe.clear(); allPipes = m_allPipes; m_allPipes.clear(); acceptor = m_acceptor; m_acceptor = NULL; m_reactor = NULL; } { CProStlSet<PRO_SERVICE_SOCK>::const_iterator itr = expireSocks.begin(); CProStlSet<PRO_SERVICE_SOCK>::const_iterator const end = expireSocks.end(); for (; itr != end; ++itr) { ProCloseSockId(itr->sockId); } } { CProStlSet<PRO_SERVICE_PIPE>::const_iterator itr = allPipes.begin(); CProStlSet<PRO_SERVICE_PIPE>::const_iterator const end = allPipes.end(); for (; itr != end; ++itr) { ProDeleteServicePipe(itr->pipe); } } ProDeleteAcceptor(acceptor); } unsigned long PRO_CALLTYPE CProServiceHub::AddRef() { const unsigned long refCount = CProRefCount::AddRef(); return (refCount); } unsigned long PRO_CALLTYPE CProServiceHub::Release() { const unsigned long refCount = CProRefCount::Release(); return (refCount); } void PRO_CALLTYPE CProServiceHub::OnAccept(IProAcceptor* acceptor, PRO_INT64 sockId, bool unixSocket, const char* remoteIp, unsigned short remotePort, unsigned char serviceId, unsigned char serviceOpt, PRO_UINT64 nonce) { assert(acceptor != NULL); assert(sockId != -1); assert(remoteIp != NULL); if (acceptor == NULL || sockId == -1 || remoteIp == NULL) { return; } if (serviceId == 0) { OnAcceptIpc(sockId, unixSocket, remoteIp); } else { OnAcceptOther(sockId, unixSocket, serviceId, serviceOpt, nonce); } } void CProServiceHub::OnAcceptIpc(PRO_INT64 sockId, bool unixSocket, const char* remoteIp) { assert(sockId != -1); assert(remoteIp != NULL); if (pbsd_inet_aton(remoteIp) != pbsd_inet_aton("127.0.0.1")) { ProCloseSockId(sockId); return; } #if !defined(WIN32) && !defined(_WIN32_WCE) if (!unixSocket) { ProCloseSockId(sockId); return; } #endif { CProThreadMutexGuard mon(m_lock); if (m_reactor == NULL || m_acceptor == NULL) { ProCloseSockId(sockId); return; } CProServicePipe* const pipe = ProCreateServicePipe(false, this, m_reactor, sockId, unixSocket); if (pipe == NULL) { ProCloseSockId(sockId); return; } PRO_SERVICE_PIPE sp; sp.pipe = pipe; sp.pending = true; sp.expireTick = ProGetTickCount64() + PIPE_TIMEOUT * 1000; m_allPipes.insert(sp); } } void CProServiceHub::OnAcceptOther(PRO_INT64 sockId, bool unixSocket, unsigned char serviceId, unsigned char serviceOpt, PRO_UINT64 nonce) { assert(sockId != -1); assert(serviceId > 0); { CProThreadMutexGuard mon(m_lock); if (m_reactor == NULL || m_acceptor == NULL) { ProCloseSockId(sockId); return; } CProStlMap<unsigned char, PRO_SERVICE_PIPE>::const_iterator const itr = m_serviceId2Pipe.find(serviceId); if (itr == m_serviceId2Pipe.end()) { ProCloseSockId(sockId); return; } const PRO_SERVICE_PIPE& sp = itr->second; assert(sp.pipe != NULL); assert(!sp.pending); assert(sp.serviceId == serviceId); PRO_SERVICE_PACKET s2cPacket; s2cPacket.s2c.serviceId = serviceId; s2cPacket.s2c.serviceOpt = serviceOpt; s2cPacket.s2c.nonce = nonce; s2cPacket.s2c.oldSock.expireTick = ProGetTickCount64() + SOCK_TIMEOUT * 1000; s2cPacket.s2c.oldSock.sockId = sockId; s2cPacket.s2c.oldSock.unixSocket = unixSocket; #if defined(_WIN32_WCE) sp.pipe->SendData(s2cPacket); #elif defined(WIN32) if (::WSADuplicateSocket( (SOCKET)sockId, (unsigned long)sp.processId, &s2cPacket.s2c.protocolInfo) != 0) { ProCloseSockId(sockId); return; } sp.pipe->SendData(s2cPacket); #else sp.pipe->SendFd(s2cPacket); #endif m_expireSocks.insert(s2cPacket.s2c.oldSock); } } void PRO_CALLTYPE CProServiceHub::OnRecv(CProServicePipe* pipe, const PRO_SERVICE_PACKET& packet) { assert(pipe != NULL); assert(packet.CheckMagic()); if (pipe == NULL || !packet.CheckMagic()) { return; } { CProThreadMutexGuard mon(m_lock); if (m_reactor == NULL || m_acceptor == NULL) { return; } PRO_SERVICE_PIPE sp; sp.pipe = pipe; CProStlSet<PRO_SERVICE_PIPE>::iterator const itr = m_allPipes.find(sp); if (itr == m_allPipes.end()) { return; } sp = *itr; assert(sp.pipe == pipe); if (sp.pending) { if (m_serviceId2Pipe.find(packet.c2s.serviceId) != m_serviceId2Pipe.end()) { return; } #if defined(_WIN32_WCE) assert(packet.c2s.processId == ::GetCurrentProcessId()); if (packet.c2s.processId != ::GetCurrentProcessId()) { return; } #endif sp.pending = false; sp.expireTick = ProGetTickCount64() + PIPE_TIMEOUT * 1000; sp.serviceId = packet.c2s.serviceId; sp.processId = packet.c2s.processId; m_serviceId2Pipe[sp.serviceId] = sp; } else { assert(packet.c2s.serviceId == sp.serviceId); assert(packet.c2s.processId == sp.processId); if (packet.c2s.serviceId != sp.serviceId || packet.c2s.processId != sp.processId) { return; } sp.expireTick = ProGetTickCount64() + PIPE_TIMEOUT * 1000; if (packet.c2s.oldSock.sockId != -1) { m_expireSocks.erase(packet.c2s.oldSock); #if !defined(_WIN32_WCE) ProCloseSockId(packet.c2s.oldSock.sockId, true); /* true!!! */ #endif } } /* * update pipes */ m_allPipes.erase(itr); m_allPipes.insert(sp); } } void PRO_CALLTYPE CProServiceHub::OnClose(CProServicePipe* pipe) { assert(pipe != NULL); if (pipe == NULL) { return; } { CProThreadMutexGuard mon(m_lock); if (m_reactor == NULL || m_acceptor == NULL) { return; } PRO_SERVICE_PIPE sp; sp.pipe = pipe; CProStlSet<PRO_SERVICE_PIPE>::iterator const itr = m_allPipes.find(sp); if (itr == m_allPipes.end()) { return; } sp = *itr; assert(sp.pipe == pipe); CProStlMap<unsigned char, PRO_SERVICE_PIPE>::iterator const itr2 = m_serviceId2Pipe.find(sp.serviceId); if (itr2 != m_serviceId2Pipe.end() && itr2->second.pipe == pipe) { m_serviceId2Pipe.erase(itr2); } m_allPipes.erase(itr); } ProDeleteServicePipe(pipe); } void PRO_CALLTYPE CProServiceHub::OnTimer(unsigned long timerId, PRO_INT64 userData) { assert(timerId > 0); if (timerId == 0) { return; } CProStlSet<CProServicePipe*> pipes; { CProThreadMutexGuard mon(m_lock); if (m_reactor == NULL || m_acceptor == NULL) { return; } if (timerId != m_timerId) { return; } const PRO_INT64 tick = ProGetTickCount64(); { CProStlSet<PRO_SERVICE_SOCK>::iterator itr = m_expireSocks.begin(); CProStlSet<PRO_SERVICE_SOCK>::iterator const end = m_expireSocks.end(); while (itr != end) { const PRO_SERVICE_SOCK ss = *itr; if (ss.expireTick > tick) { break; } CProStlSet<PRO_SERVICE_SOCK>::iterator const oldItr = itr; ++itr; m_expireSocks.erase(oldItr); ProCloseSockId(ss.sockId); } } { CProStlSet<PRO_SERVICE_PIPE>::iterator itr = m_allPipes.begin(); CProStlSet<PRO_SERVICE_PIPE>::iterator const end = m_allPipes.end(); while (itr != end) { const PRO_SERVICE_PIPE sp = *itr; if (sp.expireTick > tick) { ++itr; } else { CProStlSet<PRO_SERVICE_PIPE>::iterator const oldItr = itr; ++itr; m_allPipes.erase(oldItr); CProStlMap<unsigned char, PRO_SERVICE_PIPE>::iterator const itr2 = m_serviceId2Pipe.find(sp.serviceId); if (itr2 != m_serviceId2Pipe.end() && itr2->second.pipe == sp.pipe) { m_serviceId2Pipe.erase(itr2); } pipes.insert(sp.pipe); } } } } CProStlSet<CProServicePipe*>::const_iterator itr = pipes.begin(); CProStlSet<CProServicePipe*>::const_iterator const end = pipes.end(); for (; itr != end; ++itr) { ProDeleteServicePipe(*itr); } }
ae4d309b5c5a8826189037d87eb4689dd1f5492d
4ae98fdc1d33774e87a69b1827653a25b386dc0a
/DeletingLastTestCase.h
a05c2231b8ee23a93a2c4d0db6f695529777aedc
[]
no_license
mfurkin/binheap
9676378ab6eb458f4758a542770b7e6238dce498
0fd628230d125c0c22ca9b56bedd5748783a2047
refs/heads/master
2020-05-02T17:22:47.351349
2019-03-30T20:09:37
2019-03-30T20:09:37
178,096,360
0
0
null
null
null
null
UTF-8
C++
false
false
356
h
/* * DeletingLastTestCase.h * * Created on: 30 мар. 2019 г. * Author: mikhailf */ #ifndef DELETINGLASTTESTCASE_H_ #define DELETINGLASTTESTCASE_H_ #include "DeletingTestCase.h" class DeletingLastTestCase: public DeletingTestCase { public: DeletingLastTestCase(); virtual ~DeletingLastTestCase(); }; #endif /* DELETINGLASTTESTCASE_H_ */
[ "mikhailf@mikhailf-HP-Laptop-15-bw0xx" ]
mikhailf@mikhailf-HP-Laptop-15-bw0xx
51536d59569b90c83c61bf41c1497c337901f827
ccfce727f3b5b488dc71ad22c68cb6f263af52fc
/cmr_monitoring/src/bt_nodes/start_stop_nodes.cpp
a9d09ed63b7336ec32966d6298f49d99ddeeb1b9
[ "BSD-3-Clause" ]
permissive
MarvinStuede/cmr_monitoring
4a74de6970657e81ba7fafd0b60c95892a170fef
f66160460f00f11cca6a43c06cea56108af35031
refs/heads/master
2023-03-28T18:02:42.941719
2021-03-30T15:56:25
2021-03-30T15:56:25
353,056,662
0
0
null
null
null
null
UTF-8
C++
false
false
4,901
cpp
#include "cmr_monitoring/bt_nodes/start_stop_nodes.h" BT_REGISTER_NODES(factory) { StartStopNodes::registerStartStop(factory); } namespace StartStopNodes{ BT::NodeStatus StartLaunchFile::tick() { if(!_sent){ auto pkg = cmr_bt::checkInput(getInput<std::string>("pkg")); auto group = cmr_bt::checkInput(getInput<std::string>("group_block")); stt blocked_groups = cmr_bt::checkInput(getInput<stt>("blocked_groups")); auto launch_file = cmr_bt::checkInput(getInput<std::string>("launch_file")); //if no server is present, fail if (!_client.waitForServer(ros::Duration(4.0))) { ROS_ERROR("Can't contact roslaunch_axserver"); return BT::NodeStatus::FAILURE; } //Reset this flag _aborted = false; ROS_INFO_STREAM("Starting file '"<<launch_file<<"' in '"<<pkg<<"'"); _goal.pkg = pkg; _goal.launch_file = launch_file; _client.sendGoal(_goal); _sent = true; blocked_groups[group] = ros::Time::now(); setOutput("blocked_groups", blocked_groups); } if (_aborted) { // this happens only if method halt() was invoked _client.cancelAllGoals(); ROS_ERROR("Start Launch aborted"); return BT::NodeStatus::FAILURE; } if(_client.getState() != actionlib::SimpleClientGoalState::ACTIVE) setStatusRunningAndYield(); _sent = false; return BT::NodeStatus::SUCCESS; } BT::NodeStatus KillROSNode(BT::TreeNode &self) { auto msg = self.getInput<std::string>("node"); if(!msg.has_value()){ throw BT::RuntimeError("error reading port [node]:", msg.error()); } ROS_INFO_STREAM("Killing node "<<msg.value()); bool killed = killnode(msg.value()); if(killed){ ROS_INFO_STREAM("Node '"<<msg.value()<<"' killed"); return BT::NodeStatus::SUCCESS; } else{ ROS_WARN_STREAM("Node '"<<msg.value()<<"' not running and therefore not killed"); return BT::NodeStatus::FAILURE; } } BT::NodeStatus LaunchFileFromGroup::tick() { std::string group = cmr_bt::checkInput(getInput<std::string>("group")); if(_maps->group_to_launch.find(group) == _maps->group_to_launch.end()){ ROS_ERROR_STREAM("Group '"<<group<<"' not found in launch file map"); return BT::NodeStatus::FAILURE; } const auto& launch_pair = _maps->group_to_launch.at(group); ROS_DEBUG_STREAM("LaunchFileFromGroup: Receiving '"<<launch_pair.second<<"' in '"<<launch_pair.first<<"' from group '"<<group<<"'"); setOutput("pkg", launch_pair.first); setOutput("launch_file", launch_pair.second); return BT::NodeStatus::SUCCESS; } BT::NodeStatus KillNodeFromGroup::tick() { std::string group = cmr_bt::checkInput(getInput<std::string>("group")); if(_maps->group_to_kill.find(group) == _maps->group_to_kill.end()){ ROS_ERROR_STREAM("Group '"<<group<<"' not found in kill map"); return BT::NodeStatus::FAILURE; } const auto& kill_node = _maps->group_to_kill.at(group); ROS_DEBUG_STREAM("KillNodeFromROSNode: Receiving '"<<kill_node<<"' from group '"<<group<<"'"); setOutput("kill_node", kill_node); return BT::NodeStatus::SUCCESS; } BT::NodeStatus GroupFromKey::tick() { auto key = cmr_bt::checkInput(getInput<std::string>("key")); std::string group; try { group = _maps->groupByKey(key); } catch (BT::RuntimeError) { return BT::NodeStatus::FAILURE; } setOutput("group", group); return BT::NodeStatus::SUCCESS; } BT::NodeStatus GroupFromTopic::tick() { auto topic = cmr_bt::checkInput(getInput<std::string>("topic")); const auto& group = _maps->top_to_group.at(topic); ROS_DEBUG_STREAM("ROSNodeFromTopic: Receiving '"<<group<<"' from topic '"<<topic<<"'"); setOutput("group", group); return BT::NodeStatus::SUCCESS; } std::string NodeMapBase::receiveGroupName() { std::string group; try { group = cmr_bt::checkInput(getInput<std::string>("group")); if (group=="NONE") throw BT::RuntimeError(); } catch (BT::RuntimeError) { auto key = cmr_bt::checkInput(getInput<std::string>("key")); group = _maps->groupByKey(key); } return group; } BT::NodeStatus SetDelayAfterLaunch::tick() { auto launch_file = cmr_bt::checkInput(getInput<std::string>("launch_file")); unsigned int delay; if(_maps->launch_to_delay.find(launch_file) == _maps->launch_to_delay.end()){ ROS_WARN_STREAM("No mapping to delay found for launch_file '"<<launch_file<<"'. Setting to 10s"); delay = 10000; } else{ delay = _maps->launch_to_delay.at(launch_file) * 1000; } ROS_INFO("Blocking for %d s after launch", delay/1000); setOutput("delay", delay); return BT::NodeStatus::SUCCESS; } BT::NodeStatus GroupNotBlocked::tick() { std::string group = cmr_bt::checkInput(getInput<std::string>("group")); stt blocked_groups = cmr_bt::checkInput(getInput<stt>("blocked_groups")); if(blocked_groups.find(group) == blocked_groups.end()) return BT::NodeStatus::SUCCESS; else return BT::NodeStatus::FAILURE; } }
9e12a509ac218e8c97d91555a7041b9ae232c639
2cf838b54b556987cfc49f42935f8aa7563ea1f4
/aws-cpp-sdk-sagemaker-a2i-runtime/include/aws/sagemaker-a2i-runtime/model/HumanLoopOutput.h
da9d7f8ed79e8b61ef7300784580ce1f646aec63
[ "MIT", "Apache-2.0", "JSON" ]
permissive
QPC-database/aws-sdk-cpp
d11e9f0ff6958c64e793c87a49f1e034813dac32
9f83105f7e07fe04380232981ab073c247d6fc85
refs/heads/main
2023-06-14T17:41:04.817304
2021-07-09T20:28:20
2021-07-09T20:28:20
384,714,703
1
0
Apache-2.0
2021-07-10T14:16:41
2021-07-10T14:16:41
null
UTF-8
C++
false
false
3,015
h
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/sagemaker-a2i-runtime/AugmentedAIRuntime_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <utility> namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace AugmentedAIRuntime { namespace Model { /** * <p>Information about where the human output will be stored.</p><p><h3>See * Also:</h3> <a * href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-a2i-runtime-2019-11-07/HumanLoopOutput">AWS * API Reference</a></p> */ class AWS_AUGMENTEDAIRUNTIME_API HumanLoopOutput { public: HumanLoopOutput(); HumanLoopOutput(Aws::Utils::Json::JsonView jsonValue); HumanLoopOutput& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** * <p>The location of the Amazon S3 object where Amazon Augmented AI stores your * human loop output.</p> */ inline const Aws::String& GetOutputS3Uri() const{ return m_outputS3Uri; } /** * <p>The location of the Amazon S3 object where Amazon Augmented AI stores your * human loop output.</p> */ inline bool OutputS3UriHasBeenSet() const { return m_outputS3UriHasBeenSet; } /** * <p>The location of the Amazon S3 object where Amazon Augmented AI stores your * human loop output.</p> */ inline void SetOutputS3Uri(const Aws::String& value) { m_outputS3UriHasBeenSet = true; m_outputS3Uri = value; } /** * <p>The location of the Amazon S3 object where Amazon Augmented AI stores your * human loop output.</p> */ inline void SetOutputS3Uri(Aws::String&& value) { m_outputS3UriHasBeenSet = true; m_outputS3Uri = std::move(value); } /** * <p>The location of the Amazon S3 object where Amazon Augmented AI stores your * human loop output.</p> */ inline void SetOutputS3Uri(const char* value) { m_outputS3UriHasBeenSet = true; m_outputS3Uri.assign(value); } /** * <p>The location of the Amazon S3 object where Amazon Augmented AI stores your * human loop output.</p> */ inline HumanLoopOutput& WithOutputS3Uri(const Aws::String& value) { SetOutputS3Uri(value); return *this;} /** * <p>The location of the Amazon S3 object where Amazon Augmented AI stores your * human loop output.</p> */ inline HumanLoopOutput& WithOutputS3Uri(Aws::String&& value) { SetOutputS3Uri(std::move(value)); return *this;} /** * <p>The location of the Amazon S3 object where Amazon Augmented AI stores your * human loop output.</p> */ inline HumanLoopOutput& WithOutputS3Uri(const char* value) { SetOutputS3Uri(value); return *this;} private: Aws::String m_outputS3Uri; bool m_outputS3UriHasBeenSet; }; } // namespace Model } // namespace AugmentedAIRuntime } // namespace Aws
70b258485a594536707fcc6283ec1f49fc94d1e4
ed30d9b54ad58d2c134b465a3cb4008426aa6a72
/CPP_Feature_Testing/Lists/using-sexpresso/examples/example_3.cpp
659626eb68a81269f412b1016e1a88c2a90c8ae2
[]
no_license
CaspianA1/S2CPP
b0a026356887f9e0590518db7f242cc8d97530fc
808c426c2784018efd507b207702494ac85beef1
refs/heads/master
2022-12-07T06:50:41.560949
2020-09-06T19:56:00
2020-09-06T19:56:00
287,172,451
0
0
null
null
null
null
UTF-8
C++
false
false
1,891
cpp
// example_3.cpp #define SEXPRESSO_OPT_OUT_PIKESTYLE #ifdef SEXPRESSO_OPT_OUT_PIKESTYLE #ifndef SEXPRESSO_HEADER #define SEXPRESSO_HEADER #include <vector> #include <string> #include <cstdint> #include "../sexpresso/sexpresso/sexpresso.cpp" #endif #endif #include <iostream> #define print(var) std::cout << var << std::endl; std::string format(std::string unformatted) { sexpresso::Sexp parsedExpr = sexpresso::parse(unformatted); return parsedExpr.toString(); } std::string car(std::string expr) { expr = format(expr); std::cout << "Formatted: " << expr << std::endl; // list if (expr[1] == '(') { std::string charBuf; unsigned int lParens = 0, rParens = 0; for (int i = 1; i < expr.size(); i++) { char currChar = expr[i]; if (currChar == '(') { lParens++; } else if (currChar == ')') { rParens++; } charBuf += currChar; if (lParens == rParens) return charBuf; } } // symbol std::string charBuf; for (int i = 1; i < expr.size(); i++) { char currChar = expr[i]; if (currChar == ' ') break; else charBuf += currChar; } return charBuf; } std::string cdr(std::string expr) { // get car, strip it off std::string head = car(expr); std::string tail = "("; for (int i = expr.find(head) + head.size(); i < expr.size(); i++) { tail += expr[i]; } return format(tail); } /* int main() { // (a b (c d e)) // ((a b) c d e) // ((a ( j c) b) c) // std::string expr = "((a ( j c) b) c)"; std::string expr = "(a ab(a b c) c c b (c d e))"; // std::string head = car(expr); // after each call to car, convert back to the ints as needed std::string tail = cdr(expr); print(tail); } */ // after calling car or cdr, call another function that typechecks the output type // this will then return different types depending on the structure of the data /* std::string s_expr = makeSExpr("(define x (+ 2 5))") */
eaa74174c312ee8da64b39e5936d66bbc9166072
1b08ce242cf532a0af1378735a153a0cac172b85
/Ubung7/Header/Variable.h
d8a9b0c28af05689df56308dff82e5fb8726c6fd
[]
no_license
Martinay/PraktikumDesignPatterns
70dd43fc3c3dd16c71bc52ecf54796c06de74e06
0d5d7f6954993ccf6f7ac3445cdb7605335a6670
refs/heads/master
2021-04-30T22:06:49.422389
2017-01-20T11:08:10
2017-01-20T11:08:10
71,438,734
0
0
null
null
null
null
UTF-8
C++
false
false
372
h
#ifndef VARIABLE_H #define VARIABLE_H #include "Term.h" class Variable : public Term { public: Variable(string variable, int zahl); void Accept(Visitor* visitor); string GetVariable(){return _variable;} int GetZahl(){return _zahl;} void SetZahl(int zahl){_zahl = zahl;} private: string _variable; int _zahl; }; #endif
3e034b0eaedf097295d6b0bdde3752dc68deb7d1
3c5c1e3836edf3e9627a64600785503d1814df51
/build/Android/Debug/app/src/main/include/Fuse.Animations.Easin-a5b90955.h
3aa207e64b62e2f505534e2bd044d83782987cc8
[]
no_license
fypwyt/wytcarpool
70a0c9ca12d0f2981187f2ea21a8a02ee4cbcbd4
4fbdeedf261ee8ecd563260816991741ec701432
refs/heads/master
2021-09-08T10:32:17.612628
2018-03-09T05:24:54
2018-03-09T05:24:54
124,490,692
0
0
null
null
null
null
UTF-8
C++
false
false
921
h
// This file was generated based on C:/Users/Brian/AppData/Local/Fusetools/Packages/Fuse.Common/1.6.0/Easing.uno. // WARNING: Changes might be lost if you edit this file directly. #pragma once #include <Fuse.Animations.Easing.h> namespace g{namespace Fuse{namespace Animations{struct Easing__QuinticInOutImpl;}}} namespace g{ namespace Fuse{ namespace Animations{ // internal sealed class Easing.QuinticInOutImpl :175 // { ::g::Fuse::Animations::Easing_type* Easing__QuinticInOutImpl_typeof(); void Easing__QuinticInOutImpl__ctor_1_fn(Easing__QuinticInOutImpl* __this); void Easing__QuinticInOutImpl__Map_fn(Easing__QuinticInOutImpl* __this, double* k, double* __retval); void Easing__QuinticInOutImpl__New1_fn(Easing__QuinticInOutImpl** __retval); struct Easing__QuinticInOutImpl : ::g::Fuse::Animations::Easing { void ctor_1(); static Easing__QuinticInOutImpl* New1(); }; // } }}} // ::g::Fuse::Animations
9d4f9232880176ccfb1c0cceb39c01b2fed318d8
c8b39acfd4a857dc15ed3375e0d93e75fa3f1f64
/Engine/Source/Runtime/AIModule/Private/BehaviorTree/Composites/BTComposite_SimpleParallel.cpp
22e8d7dc0befe7c394017d660b4c66101fea5a0b
[ "MIT", "LicenseRef-scancode-proprietary-license" ]
permissive
windystrife/UnrealEngine_NVIDIAGameWorks
c3c7863083653caf1bc67d3ef104fb4b9f302e2a
b50e6338a7c5b26374d66306ebc7807541ff815e
refs/heads/4.18-GameWorks
2023-03-11T02:50:08.471040
2022-01-13T20:50:29
2022-01-13T20:50:29
124,100,479
262
179
MIT
2022-12-16T05:36:38
2018-03-06T15:44:09
C++
UTF-8
C++
false
false
9,096
cpp
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. #include "BehaviorTree/Composites/BTComposite_SimpleParallel.h" #include "GameFramework/Actor.h" #include "VisualLogger/VisualLogger.h" #include "BehaviorTree/BTTaskNode.h" #include "BehaviorTree/BTAuxiliaryNode.h" UBTComposite_SimpleParallel::UBTComposite_SimpleParallel(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) { NodeName = "Simple Parallel"; bUseChildExecutionNotify = true; bUseNodeDeactivationNotify = true; bUseDecoratorsDeactivationCheck = true; OnNextChild.BindUObject(this, &UBTComposite_SimpleParallel::GetNextChildHandler); } int32 UBTComposite_SimpleParallel::GetNextChildHandler(FBehaviorTreeSearchData& SearchData, int32 PrevChild, EBTNodeResult::Type LastResult) const { FBTParallelMemory* MyMemory = GetNodeMemory<FBTParallelMemory>(SearchData); int32 NextChildIdx = BTSpecialChild::ReturnToParent; if (PrevChild == BTSpecialChild::NotInitialized) { NextChildIdx = EBTParallelChild::MainTask; MyMemory->MainTaskResult = EBTNodeResult::Failed; MyMemory->bRepeatMainTask = false; } else if ((MyMemory->bMainTaskIsActive || MyMemory->bForceBackgroundTree) && !SearchData.OwnerComp.IsRestartPending()) { // if main task is running - always pick background tree // unless search is from abort from background tree - return to parent (and break from search when node gets deactivated) NextChildIdx = EBTParallelChild::BackgroundTree; MyMemory->bForceBackgroundTree = false; } else if (MyMemory->bRepeatMainTask) { UE_VLOG(SearchData.OwnerComp.GetOwner(), LogBehaviorTree, Verbose, TEXT("Repeating main task of %s"), *UBehaviorTreeTypes::DescribeNodeHelper(this)); NextChildIdx = EBTParallelChild::MainTask; MyMemory->bRepeatMainTask = false; } if ((PrevChild == NextChildIdx) && (MyMemory->LastSearchId == SearchData.SearchId)) { // retrying the same branch again within the same search - possible infinite loop SearchData.bPostponeSearch = true; } MyMemory->LastSearchId = SearchData.SearchId; return NextChildIdx; } void UBTComposite_SimpleParallel::NotifyChildExecution(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, int32 ChildIdx, EBTNodeResult::Type& NodeResult) const { FBTParallelMemory* MyMemory = (FBTParallelMemory*)NodeMemory; if (ChildIdx == EBTParallelChild::MainTask) { MyMemory->MainTaskResult = NodeResult; if (NodeResult == EBTNodeResult::InProgress) { EBTTaskStatus::Type Status = OwnerComp.GetTaskStatus(Children[EBTParallelChild::MainTask].ChildTask); if (Status == EBTTaskStatus::Active) { // can't register if task is currently being aborted (latent abort returns in progress) MyMemory->bMainTaskIsActive = true; MyMemory->bForceBackgroundTree = false; OwnerComp.RegisterParallelTask(Children[EBTParallelChild::MainTask].ChildTask); RequestDelayedExecution(OwnerComp, EBTNodeResult::Succeeded); } } else if (MyMemory->bMainTaskIsActive) { MyMemory->bMainTaskIsActive = false; // notify decorators on main task, ignore observers updates in FakeSearchData - they are not allowed by parallel composite FBehaviorTreeSearchData FakeSearchData(OwnerComp); NotifyDecoratorsOnDeactivation(FakeSearchData, ChildIdx, NodeResult); const int32 MyInstanceIdx = OwnerComp.FindInstanceContainingNode(this); OwnerComp.UnregisterParallelTask(Children[EBTParallelChild::MainTask].ChildTask, MyInstanceIdx); if (NodeResult != EBTNodeResult::Aborted && !MyMemory->bRepeatMainTask) { // check if subtree should be aborted when task finished with success/failed result if (FinishMode == EBTParallelMode::AbortBackground) { OwnerComp.RequestExecution((UBTCompositeNode*)this, MyInstanceIdx, Children[EBTParallelChild::MainTask].ChildTask, EBTParallelChild::MainTask, NodeResult); } } } else if (NodeResult == EBTNodeResult::Succeeded && FinishMode == EBTParallelMode::WaitForBackground) { // special case: if main task finished instantly, but composite is supposed to wait for background tree, // request single run of background tree anyway MyMemory->bForceBackgroundTree = true; RequestDelayedExecution(OwnerComp, EBTNodeResult::Succeeded); } } } void UBTComposite_SimpleParallel::NotifyNodeDeactivation(FBehaviorTreeSearchData& SearchData, EBTNodeResult::Type& NodeResult) const { FBTParallelMemory* MyMemory = GetNodeMemory<FBTParallelMemory>(SearchData); const uint16 ActiveInstanceIdx = SearchData.OwnerComp.GetActiveInstanceIdx(); // modify node result if main task has finished if (!MyMemory->bMainTaskIsActive) { NodeResult = MyMemory->MainTaskResult; } // remove main task if (Children.IsValidIndex(EBTParallelChild::MainTask)) { SearchData.AddUniqueUpdate(FBehaviorTreeSearchUpdate(Children[EBTParallelChild::MainTask].ChildTask, ActiveInstanceIdx, EBTNodeUpdateMode::Remove)); } // remove all active nodes from background tree const FBTNodeIndex FirstBackgroundIndex(ActiveInstanceIdx, GetChildExecutionIndex(EBTParallelChild::BackgroundTree, EBTChildIndex::FirstNode)); const FBTNodeIndex LastBackgroundIndex(ActiveInstanceIdx, GetLastExecutionIndex()); SearchData.OwnerComp.UnregisterAuxNodesUpTo(FirstBackgroundIndex); // remove all pending updates "Add" from background tree // it doesn't make sense for decorators to reactivate themselves there for (int32 Idx = SearchData.PendingUpdates.Num() - 1; Idx >= 0; Idx--) { const FBehaviorTreeSearchUpdate& UpdateInfo = SearchData.PendingUpdates[Idx]; if (UpdateInfo.Mode == EBTNodeUpdateMode::Add) { const uint16 UpdateNodeIdx = UpdateInfo.AuxNode ? UpdateInfo.AuxNode->GetExecutionIndex() : UpdateInfo.TaskNode->GetExecutionIndex(); const FBTNodeIndex UpdateIdx(UpdateInfo.InstanceIndex, UpdateNodeIdx); if (FirstBackgroundIndex.TakesPriorityOver(UpdateIdx) && UpdateIdx.TakesPriorityOver(LastBackgroundIndex)) { UE_VLOG(SearchData.OwnerComp.GetOwner(), LogBehaviorTree, Verbose, TEXT("Search node update[canceled]: %s"), *UBehaviorTreeTypes::DescribeNodeHelper(UpdateInfo.AuxNode ? (UBTNode*)UpdateInfo.AuxNode : (UBTNode*)UpdateInfo.TaskNode)); SearchData.PendingUpdates.RemoveAt(Idx); } } } } bool UBTComposite_SimpleParallel::CanNotifyDecoratorsOnDeactivation(FBehaviorTreeSearchData& SearchData, int32 ChildIdx, EBTNodeResult::Type& NodeResult) const { // don't pass deactivation to decorators when parallel is just switching to background tree // decorators on running main task will be notified when their task finishes execution if (ChildIdx == EBTParallelChild::MainTask) { FBTParallelMemory* MyMemory = GetNodeMemory<FBTParallelMemory>(SearchData); if (MyMemory->bMainTaskIsActive) { return false; } } return true; } uint16 UBTComposite_SimpleParallel::GetInstanceMemorySize() const { return sizeof(FBTParallelMemory); } bool UBTComposite_SimpleParallel::CanPushSubtree(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, int32 ChildIdx) const { return (ChildIdx != EBTParallelChild::MainTask); } void UBTComposite_SimpleParallel::SetChildOverride(FBehaviorTreeSearchData& SearchData, int8 Index) const { // store information about repeating main task and use it when possible // ignore changes to other child indices = background tree, as it's already being auto repeated if (Index == EBTParallelChild::MainTask) { FBTParallelMemory* MyMemory = GetNodeMemory<FBTParallelMemory>(SearchData); MyMemory->bRepeatMainTask = true; UE_VLOG(SearchData.OwnerComp.GetOwner(), LogBehaviorTree, Log, TEXT("Main task of %s will be repeated."), *UBehaviorTreeTypes::DescribeNodeHelper(this)); } } FString UBTComposite_SimpleParallel::DescribeFinishMode(EBTParallelMode::Type Mode) { static FString FinishDesc[] = { TEXT("AbortBackground"), TEXT("WaitForBackground") }; return FinishDesc[Mode]; } FString UBTComposite_SimpleParallel::GetStaticDescription() const { static FString FinishDesc[] = { TEXT("finish with main task"), TEXT("wait for subtree") }; return FString::Printf(TEXT("%s: %s"), *Super::GetStaticDescription(), FinishMode < 2 ? *FinishDesc[FinishMode] : TEXT("")); } void UBTComposite_SimpleParallel::DescribeRuntimeValues(const UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTDescriptionVerbosity::Type Verbosity, TArray<FString>& Values) const { Super::DescribeRuntimeValues(OwnerComp, NodeMemory, Verbosity, Values); if (Verbosity == EBTDescriptionVerbosity::Detailed) { FBTParallelMemory* MyMemory = (FBTParallelMemory*)NodeMemory; Values.Add(FString::Printf(TEXT("main task: %s"), MyMemory->bMainTaskIsActive ? TEXT("active") : TEXT("not active"))); if (MyMemory->bForceBackgroundTree) { Values.Add(TEXT("force background tree")); } } } #if WITH_EDITOR bool UBTComposite_SimpleParallel::CanAbortLowerPriority() const { return false; } bool UBTComposite_SimpleParallel::CanAbortSelf() const { return false; } FName UBTComposite_SimpleParallel::GetNodeIconName() const { return FName("BTEditor.Graph.BTNode.Composite.SimpleParallel.Icon"); } #endif // WITH_EDITOR
c20f1ccb102a372110e952966b6811bacc739017
f9f86d9fc94fbfd09575bccf108ff857d98c916a
/cfl/Src/AssetModel.cpp
d5a8be62241d9acf12793ecc24bce542763fb9e6
[]
no_license
FinancialEngineerLab/Financial_Computing-cpp
19c4a6dab57e1c0be43719a18329834a3515ab95
75729732526845d50a6bb4370ac55d02094990e1
refs/heads/master
2023-03-17T17:37:14.040628
2020-12-02T17:51:35
2020-12-02T17:51:35
null
0
0
null
null
null
null
UTF-8
C++
false
false
392
cpp
// Copyright (c) Dmitry Kramkov, 2000-2006. All rights reserved. // Implementation of classes and functions declared in the corresponding *.hpp file. #include "cfl/AssetModel.hpp" using namespace cfl; //class AssetModel cfl::AssetModel::AssetModel(IAssetModel * pNewModel, const Extended & rExtended) :m_pModel(pNewModel), m_uExtended(rExtended) { m_uExtended.assign(*m_pModel); }
e0d8637f657f3a6e90c73932aad0202ccf299f32
38664d844d9fad34e88160f6ebf86c043db9f1c5
/branches/initialize/infostudio/InfoStudio/httpupload/LyoulException.h
389c3b8c554194bda0064140f9da4b363b1beb7b
[]
no_license
cnsuhao/jezzitest
84074b938b3e06ae820842dac62dae116d5fdaba
9b5f6cf40750511350e5456349ead8346cabb56e
refs/heads/master
2021-05-28T23:08:59.663581
2010-11-25T13:44:57
2010-11-25T13:44:57
null
0
0
null
null
null
null
UTF-8
C++
false
false
6,327
h
/*! * \file LyoulException.h * \brief exception classes which extends the std::exception class. * \author Hyung-Lyoul CHO * \since 2004.04.12 * \version $LastChangedRevision: 39 $ * $LastChangedDate: 2004-07-17 22:06:46 +0900 (Sat, 17 Jul 2004) $ * * This file contains exception classes which extends the standard exception class. * \n\n\n * Copyright &copy; 2004 by <a href="mailto:[email protected]">Hyung-Lyoul CHO</a>\n * Permission to copy, use, modify, sell and distribute this software is * granted provided this copyright notice appears in all copies. * This software is provided "as is" without express or implied warranty, * and with no claim as to its suitability for any purpose. */ #pragma once #include <windows.h> // for generic types, .. etc #include <stdarg.h> // for va_arg, va_start, va_end #include <stdexcept> // for std::exception class #pragma warning (disable: 4290) // avoids 'C++ Exception Specification ignored' message /*! * \brief The namespace of the Lyoul's library * * This is the namespace for source codes written by Hyung-Lyoul CHO. */ namespace Lyoul { enum { EXCEPTION_BUFF_SIZE = 512 //!< Maximum buffer size for an error message stored //! in the varerrmsg_exception class. } ; /*! * \brief A simple exception class with a error message which is allocated in heap by malloc. (Ansi Ver.) * * This is a simple exception class derived from the standard exception class. * This class can set or get an error message. The message is internally allocated in heap by malloc. * So it is possible to lose the error message if memory allocation failed. */ class errmsg_exceptionA : public std::exception { public: /*! \brief Default constructor */ errmsg_exceptionA (void) throw () ; /*! \brief Constructor with an initial error message */ errmsg_exceptionA (LPCSTR szErrMsg) throw () ; /*! \brief Copy constructor */ errmsg_exceptionA (const errmsg_exceptionA & ee) throw () ; /*! \brief Default destructor */ virtual ~errmsg_exceptionA (void) throw () ; /*! \brief Returns an error message. */ LPCSTR what (void) const throw () ; /*! \brief Returns an error message. */ virtual LPCSTR errmsg (void) const throw () ; /*! \brief Assigns a new error message. */ virtual void seterrmsg (LPCSTR szErrMsg) throw () ; /*! \brief Assignment operator. */ errmsg_exceptionA & operator=(const errmsg_exceptionA & ee) throw () ; protected: LPSTR m_szErrMsg ; //!< An internal error message pointer. } ; /*! * \brief A simple exception class with a error message which is allocated in heap by malloc. (Unicode Ver.) * * This is a simple exception class derived from the standard exception class. * This class can set or get an error message. The message is internally allocated in heap by malloc. * So it is possible to lose the error message if memory allocation failed. */ class errmsg_exceptionW : public std::exception { public: /*! \brief Default constructor */ errmsg_exceptionW (void) throw () ; /*! \brief Constructor with an initial error message */ errmsg_exceptionW (LPCWSTR szErrMsg) throw () ; /*! \brief Copy constructor */ errmsg_exceptionW (const errmsg_exceptionW & ee) throw () ; /*! \brief Default destructor */ virtual ~errmsg_exceptionW (void) throw () ; /*! \brief Returns "errmsg_exceptionW" */ LPCSTR what (void) const throw () ; /*! \brief Returns an error message. */ virtual LPCWSTR errmsg (void) const throw () ; /*! \brief Assigns a new error message. */ virtual void seterrmsg (LPCWSTR szErrMsg) throw () ; /*! \brief Assignment operator. */ errmsg_exceptionW & operator=(const errmsg_exceptionW & ee) throw () ; protected: LPWSTR m_szErrMsg ; //!< An internal error message pointer. } ; #ifdef UNICODE typedef errmsg_exceptionW errmsg_exception ; #else typedef errmsg_exceptionA errmsg_exception ; #endif /*! * \brief A simple exception class which can take a variable number of arguments. (Ansi Ver.) * * This class takes a format string and optional arguments and then stores a formatted * error message using _vsnprintf. The stored error message can not exceed * EXCEPTION_BUFF_SIZE - 1 characters. If an error occured, the stored error messsage will be NULL. */ class varerrmsg_exceptionA : public errmsg_exceptionA { public: /*! \brief Default constructor */ varerrmsg_exceptionA (void) throw () ; /*! \brief Constructor with a format string and optional arguments */ varerrmsg_exceptionA (LPCSTR szErrMsg, ...) throw () ; /*! \brief Constructor with a format string and a pointer to list of arguments */ varerrmsg_exceptionA (LPCSTR szErrMsg, va_list arg) throw () ; /*! \brief Assigns a new error message using _vsnprintf */ virtual void seterrmsg (LPCSTR szErrMsg, ...) throw () ; /*! \brief Assigns a new error message using _vsnprintf */ virtual void seterrmsg (LPCSTR szErrMsg, va_list args) throw () ; } ; /*! * \brief A simple exception class which can take a variable number of arguments. (Unicode Ver.) * * This class takes a format string and optional arguments and then stores a formatted * error message using _vsnwprintf. The stored error message can not exceed * EXCEPTION_BUFF_SIZE - 1 characters. If an error occured, the stored error messsage will be NULL. */ class varerrmsg_exceptionW : public errmsg_exceptionW { public: /*! \brief Default constructor */ varerrmsg_exceptionW (void) throw () ; /*! \brief Constructor with a format string and optional arguments */ varerrmsg_exceptionW (LPCWSTR szErrMsg, ...) throw () ; /*! \brief Constructor with a format string and a pointer to list of arguments */ varerrmsg_exceptionW (LPCWSTR szErrMsg, va_list args) throw () ; /*! \brief Returns "varerrmsg_exceptionW" */ virtual LPCSTR what (void) const throw () ; /*! \brief Assigns a new error message using _vsnwprintf */ virtual void seterrmsg (LPCWSTR szErrMsg, ...) throw () ; /*! \brief Assigns a new error message using _vsnwprintf */ virtual void seterrmsg (LPCWSTR szErrMsg, va_list args) throw () ; } ; #ifdef UNICODE typedef varerrmsg_exceptionW varerrmsg_exception ; #else typedef varerrmsg_exceptionA varerrmsg_exception ; #endif }
[ "ken.shao@ba8f1dc9-3c1c-0410-9eed-0f8a660c14bd" ]
ken.shao@ba8f1dc9-3c1c-0410-9eed-0f8a660c14bd
91c10f1bdf2a7dabb2db81178f327becc10c0c93
149ac3661e61ce4b1bfb1b20f5100443ed0ea21e
/TiledLighting/source/Object.h
67419a956ed70565390a31c7e2ced4bf42ed7ec6
[]
no_license
djarksnd/MultiThreadedTiledLighting
d33626f09a0fd74212d454061f5a08b24b06f108
3ed51b6de14fdcdad109494c8a0b4f6371f59c5a
refs/heads/master
2023-06-07T20:02:27.629774
2023-05-31T19:46:28
2023-05-31T19:46:28
228,071,881
0
0
null
null
null
null
UTF-8
C++
false
false
986
h
#pragma once #include <string> #include <DirectXMath.h> #include <vector> #include "..\\..\\DXUT\\Core\\DXUT.h" #include "..\\..\\DXUT\\Optional\\SDKmesh.h" #include "AABBox.h" class Frustum; class Object { public: Object() : transform(DirectX::XMMatrixIdentity()) {} ~Object() { mesh.Destroy(); } bool Create(ID3D11Device* device, ID3D11DeviceContext* ImmediateContext, const std::wstring& fileName); void Render(ID3D11DeviceContext* deviceContext, const Frustum& frustum); void XM_CALLCONV SetTransform(DirectX::FXMMATRIX argTransform) { transform = argTransform; } const DirectX::FXMMATRIX GetTransform() { return transform; } const CDXUTSDKMesh& GetMesh() const { return mesh; } const AABBox& GetBound() const { return bound; } Object(const Object&) = delete; const Object& operator = (const Object&) = delete; private: CDXUTSDKMesh mesh; DirectX::XMMATRIX transform; AABBox bound; std::vector<std::vector<AABBox>> subsetBounds; };
12f46d17b00d02da7cacb29cfd3d1e2c6e0fbd1a
4c7e4286bed81fa0fedab4b5b2925df342c3a1fb
/fmivisbase/newBaseSourcer.cpp
1c7106419eb47ecc28c8e5ca98bdadcb0c617e74
[ "MIT" ]
permissive
fmidev/smartmet-workstation-vtk
5289d5703256a4b50e0e9e1ff6a2a4e036882e5c
ee1b42f63a9bc54dd5217e5c1a1fa8e672870a99
refs/heads/master
2020-04-08T15:46:06.103447
2018-11-29T05:36:33
2018-11-29T05:36:33
159,491,027
0
0
null
null
null
null
ISO-8859-1
C++
false
false
10,253
cpp
#include "newBaseSourcer.h" #include <future> #include <vtkStreamingDemandDrivenPipeline.h> #include <vtkInformation.h> #include <vtkInformationVector.h> #include <vtkImageData.h> #include <NFmiQueryData.h> #include <NFmiFastQueryInfo.h> #include "nbsMetadata.h" #include "nbsImpl.h" namespace fmiVis { newBaseSourcer::newBaseSourcer(const std::string &file, nbsMetadata *meta, int param, int res, int sub, size_t dim) : newBaseSourcerBase(file, meta, param, res), im(nullptr), heights(), subSample(sub), dimension(dim) { SetNumberOfInputPorts(0); ReadHeights(1); } const NFmiDataIdent newBaseSourcer::getParamDescr() { return pimpl->data.Param(); } newBaseSourcer::~newBaseSourcer() {} int newBaseSourcer::RequestInformation(vtkInformation* vtkNotUsed(request), vtkInformationVector** vtkNotUsed(inputVector), vtkInformationVector* outputVector) { //cout << "start time: " << minT() << ", double conversion: " << minDT() << std::endl; //cout << "end time: " << maxT()<< ", double conversion: " << maxDT() << std::endl; vtkInformation* outInfo = outputVector->GetInformationObject(0); double doubleRange[2]; doubleRange[0] = meta->times.front(); doubleRange[1] = meta->times.back(); outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_RANGE(), doubleRange, 2); outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(), &meta->times[0], meta->times.size()); outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), 0, meta->sizeX - 1, 0, meta->sizeY - 1, 0, zRes - 1); return 1; } int newBaseSourcer::RequestData(vtkInformation* vtkNotUsed(request), vtkInformationVector** vtkNotUsed(inputVector), vtkInformationVector* outputVector) { float zScale = 1; int sizeX = meta->sizeX / subSample; int sizeY = meta->sizeY / subSample; int sizeZ = zRes / subSample; unsigned long time = 0; vtkInformation* outInfo = outputVector->GetInformationObject(0); //pyydetäänkö tiettyä ajanjaksoa if (outInfo->Has(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP())) { time = meta->timeStepToEpoch ( outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP()) ); cout << param << ": Request for time " << time << std::endl; } //pyydetäänkö jotain aluetta (näyttäisi olevan aina koko alue) int* reqExtent = nullptr; if (outInfo->Has(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT())) { reqExtent = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()); cout << param << ": Requested extent " << reqExtent[0] << "-" << reqExtent[1] << ", " << reqExtent[2] << "-" << reqExtent[3] << ", " << reqExtent[4] << "-" << reqExtent[5] << std::endl; } vtkDataObject *ds = outInfo->Get(vtkDataSet::DATA_OBJECT()); int timeI = nearestIndex(time); NFmiFastQueryInfo &dataInfo = pimpl->dataInfo; //is this a new timestep if (timeI != prevTime) { ResetImage(); dataInfo.ResetTime(); float minVal = kMaxFloat, maxVal = kMinFloat; float maxHeight = -1; auto t0 = std::chrono::system_clock::now(); //reads the data into im LoopParam(param,timeI,[=,&maxVal,&minVal](int x, int y, int z, float val) { if (meta->hasHeight) { z = getHeight(x, y, z); } if (z >= sizeZ) { z = sizeZ - 1; } float* pixel = static_cast<float*>(im->GetScalarPointer(x, y, z)); if (pixel[0] != kFloatMissing) { pixel[0] += val; if (pixel[0] > maxVal) maxVal = pixel[0]; if (pixel[0] < minVal) minVal = pixel[0]; } else pixel[0] = val; } ); float magnitude = maxVal - minVal; cout << param << ": max: " << maxVal << " min: " << minVal << ", mag: " << magnitude << std::endl; auto t1 = std::chrono::system_clock::now(); //for (int i = 0; i<zRes; ++i) // cout << "z: " << i << " : " << static_cast<float*>(im->GetScalarPointer(0, 90, i))[0] << endl; //cout << "interpolating..." << endl; //TODO proper threadpool implementation unsigned int usedThreadCount = boost::thread::hardware_concurrency(); auto threads = std::list<std::future<void>>(); int blockWidth = 3; for (int i = 0; i < blockWidth*blockWidth; ++i) { int blockX = i % blockWidth; int blockY = i / blockWidth; int startX = blockX*sizeX / blockWidth; int endX; if (blockX < blockWidth - 1) { endX = startX + sizeX / blockWidth; } else { endX = sizeX; } int startY = blockY*sizeY / blockWidth; int endY; if (blockY < blockWidth - 1) { endY = startY + sizeY / blockWidth; } else { endY = sizeY; } if (threads.size() >= usedThreadCount) { auto iter = threads.begin(); while (iter != threads.end()) { if (iter->valid() && iter->wait_for(std::chrono::milliseconds(1)) == std::future_status::ready) { iter = threads.erase(iter); } else ++iter; } } threads.push_back(std::async(std::launch::async, [=] { InterpolateImage(startX, startY, endX, endY); }) ); } //for(int i=0;i<zRes;++i) // cout << "z: "<<i<<" : "<<static_cast<float*>(im->GetScalarPointer(40, 40, i))[0]<<endl; auto t2 = std::chrono::system_clock::now(); auto readTime = std::chrono::duration_cast<std::chrono::milliseconds>(t1 - t0).count(); auto interpTime = std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1).count(); cout << "time to read: " << readTime << " time to interp: " << interpTime << endl; prevTime = timeI; } else cout << "Reused time " << prevTime << std::endl; //this is the actual output operation ds->DeepCopy(im); ds->GetInformation()->Set(vtkDataObject::DATA_TIME_STEP(), dataInfo.Time().EpochTime()); outInfo->Set(vtkDataObject::DATA_EXTENT(), reqExtent ? reqExtent : im->GetExtent(), 6); //explicitly tell VTK there was a change of state Modified(); //ptime utcTime = ptime(from_time_t(dataInfo.Time().EpochTime())); //cout << "Returned time " << dataInfo.Time().EpochTime() << ", UTC: " << to_iso_extended_string( utcTime.date() ) <<", "<< utcTime.time_of_day() << endl; //ds->ReleaseData(); return 1; } int newBaseSourcer::getHeight(int x, int y, int z) { int sizeX = meta->sizeX / subSample; int sizeY = meta->sizeY / subSample; int sizeZ = meta->sizeZ / subSample; bool rising = pimpl->dataInfo.HeightParamIsRising(); if (rising) z = sizeZ-1 - z; int ret = std::roundf(heights[z + x*sizeZ + y*sizeZ*sizeX]); return ret; } //heights is same dimensions as newbase is, subsampled void newBaseSourcer::ReadHeights(int time) { int sizeX = meta->sizeX / subSample; int sizeY = meta->sizeY / subSample; int sizeZ = zRes / subSample; int dataZ = meta->sizeZ; auto &dataInfo = pimpl->dataInfo; //if(heights==nullptr AllocateHeights(); if (dataInfo.Param(kFmiGeopHeight)) dataInfo.GetCube(heights); else if (dataInfo.Param(kFmiGeomHeight)) { cout << "Warning: kFmiGeopHeight not found, using kFmiGeomHeight" << endl; dataInfo.GetCube(heights); } else { cout << "Warning: kFmiGeomHeight not found, heightdata unavailable" << endl; return; } std::transform(begin(heights), end(heights), begin(heights), [=](float val) { return val / zHeight * float(sizeZ); }); dataZ += 0; } void newBaseSourcer::AllocateHeights() { int sizeX = meta->sizeX / subSample; int sizeY = meta->sizeY / subSample; int sizeZ = zRes / subSample; int dataZ = meta->sizeZ; auto &dataInfo = pimpl->dataInfo; //if (heights != nullptr) delete heights; //heights = new float[sizeX*sizeY*dataZ]; heights.resize(sizeX*sizeY*dataZ); } bool newBaseSourcer::ValidValue(float *val) { return (val[0] != kFloatMissing && (dimension < 3 || val[2] != kFloatMissing)); } bool newBaseSourcer::ValidValue(std::vector<float> &val) { return ValidValue(&val[0]); } void newBaseSourcer::ResetImage(bool realloc) { int sizeX = meta->sizeX/subSample, sizeY = meta->sizeY / subSample, sizeZ = zRes/subSample; if (realloc || !im) { if (!im) im = vtkImageData::New(); im->Initialize(); im->SetDimensions(sizeX, sizeY, sizeZ); im->SetSpacing(2 * subSample, 2 * subSample, 2 * subSample); im->AllocateScalars(VTK_FLOAT, dimension); } float* p = static_cast<float*>(im->GetScalarPointer()); for (long i = 0; i < sizeX*sizeY*sizeZ * dimension; ++i) p[i] = kFloatMissing; } //interpolates the invalid values between valid ones in each column in the startX,startY-endX,endY block //TODO handle overshooting values (requires a dedicated array for them and their height in order to find which one is lowest) void newBaseSourcer::InterpolateImage(int startX,int startY,int endX,int endY) { int sizeZ = zRes / subSample; for (int ix = startX; ix < endX; ++ix) { for (int iy = startY; iy < endY; ++iy) { std::vector<float> prevVal( dimension,0.0f ); std::vector<float> nextVal( dimension,0.0f ); for (int iz = 0; iz < sizeZ; ++iz) { float* val = static_cast<float*>(im->GetScalarPointer(ix, iy, iz)); if (ValidValue(val)) { //remember the last valid value in this column SetValue(prevVal, val); } else { if (iz == 0 || iz == sizeZ - 1) { SetValue(val, prevVal); } //find the next valid value for (int findNext = iz + 1; findNext < sizeZ; ++findNext) { float* val2 = static_cast<float*>(im->GetScalarPointer(ix, iy, findNext)); //found one or reached the end if (ValidValue(val2) || findNext == sizeZ - 1) { if ( ValidValue(val2) ) { SetValue(nextVal, val2); } else if( findNext == sizeZ - 1) { float zero[3] = { 0.0f,0.0f,0.0f }; SetValue(nextVal, prevVal); } //go backwards, interpolating between the valid values for (int interpolateBack = findNext; interpolateBack >= iz; --interpolateBack) { float alpha = float(findNext - interpolateBack) / float(findNext - iz + 1); float* pixel = static_cast<float*>(im->GetScalarPointer(ix, iy, interpolateBack)); for (int i = 0; i < dimension; i++) { pixel[i] = prevVal[i] * alpha + nextVal[i] * (1.0f - alpha); } } //this will be the new latest valid value SetValue(prevVal, val2); //continue from the valid value we found iz = findNext; break; } } } } } } } }
a9bd3c1b9172ed2576c31725a1e4a0541006383d
d939ea588d1b215261b92013e050993b21651f9a
/tke/src/v20180525/model/UpdateEKSClusterResponse.cpp
dc638adc205d59d187376eae62c1eedc56b8696f
[ "Apache-2.0" ]
permissive
chenxx98/tencentcloud-sdk-cpp
374e6d1349f8992893ded7aa08f911dd281f1bda
a9e75d321d96504bc3437300d26e371f5f4580a0
refs/heads/master
2023-03-27T05:35:50.158432
2021-03-26T05:18:10
2021-03-26T05:18:10
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,447
cpp
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <tencentcloud/tke/v20180525/model/UpdateEKSClusterResponse.h> #include <tencentcloud/core/utils/rapidjson/document.h> #include <tencentcloud/core/utils/rapidjson/writer.h> #include <tencentcloud/core/utils/rapidjson/stringbuffer.h> using TencentCloud::CoreInternalOutcome; using namespace TencentCloud::Tke::V20180525::Model; using namespace rapidjson; using namespace std; UpdateEKSClusterResponse::UpdateEKSClusterResponse() { } CoreInternalOutcome UpdateEKSClusterResponse::Deserialize(const string &payload) { Document d; d.Parse(payload.c_str()); if (d.HasParseError() || !d.IsObject()) { return CoreInternalOutcome(Error("response not json format")); } if (!d.HasMember("Response") || !d["Response"].IsObject()) { return CoreInternalOutcome(Error("response `Response` is null or not object")); } Value &rsp = d["Response"]; if (!rsp.HasMember("RequestId") || !rsp["RequestId"].IsString()) { return CoreInternalOutcome(Error("response `Response.RequestId` is null or not string")); } string requestId(rsp["RequestId"].GetString()); SetRequestId(requestId); if (rsp.HasMember("Error")) { if (!rsp["Error"].IsObject() || !rsp["Error"].HasMember("Code") || !rsp["Error"]["Code"].IsString() || !rsp["Error"].HasMember("Message") || !rsp["Error"]["Message"].IsString()) { return CoreInternalOutcome(Error("response `Response.Error` format error").SetRequestId(requestId)); } string errorCode(rsp["Error"]["Code"].GetString()); string errorMsg(rsp["Error"]["Message"].GetString()); return CoreInternalOutcome(Error(errorCode, errorMsg).SetRequestId(requestId)); } return CoreInternalOutcome(true); }
2e59580f7c4422f5eb2f217659dcb821ca22e1a6
6cd1bf6544347c85cabaf672a5ed2dad94a18b63
/kakomon/abc147_f.cpp
e3edede30a1efba685fd326d244e925d5ec05b69
[]
no_license
Shell-Wataru/AtCoder
0a35f12478ac0ab54711171f653ce7bed5189c92
0ba32250f4e4a44459a4cd231ff47a5f46c4fe87
refs/heads/master
2023-01-10T04:21:25.199532
2023-01-09T04:16:30
2023-01-09T04:16:30
89,144,933
0
0
null
null
null
null
UTF-8
C++
false
false
2,387
cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <deque> #include <queue> #include <set> #include <stack> #include <map> #include <iomanip> #include <numeric> #include <cmath> #include <unordered_map> #include <unordered_set> using namespace std; using ll = long long; int solve() { ll N,X,D; cin >> N >> X >> D; if (X == 0 && D== 0){ cout << 1 << endl; }else if (X == 0){ cout << N*(N-1)/2 + 1 << endl; }else if (D == 0){ cout << 2*(N-1)+1; }else{ ll lca = abs(X*D/gcd(X,D)); ll x_add = abs(lca/X); ll d_add = x_add*X/D; cout << x_add << endl; unordered_map<ll,vector<pair<ll,ll>>> ranges; for(int i = 0;i <= N;i++){ ll a = N-2*i; ll l = (N-i)*(N-1-i)/2 - (N-i+N-1)*i/2; ll r = N*(N-1)/2 - (0+i-1)*i/2 * 2 + 1; cout << a << ":" << l << "~" << r << endl; if (a < 0){ ll add = (-a+x_add-1)/x_add * x_add; a += add; l -= add*X/D; r -= add*X/D; }else{ ll sub = a/x_add * x_add; a -= sub; l += sub*X/D; r += sub*X/D; } cout << a << ":" << l << "~" << r << endl; ranges[a].push_back({l,r}); } ll ans = 0; for(auto p:ranges){ auto range = p.second; sort(range.begin(),range.end()); cout << p.first << ":" << endl; pair<ll,ll> current = {numeric_limits<ll>::min(),numeric_limits<ll>::min()}; for(auto r:range){ if (current.second < r.first){ ans += (current.second - current.first+1)/2; cout << (current.second - current.first+1)/2 << endl; current = r; }else{ current.second = max(current.second,r.second); } } cout << (current.second - current.first+1)/2 << endl; ans += (current.second - current.first+1)/2; } cout << ans << endl; } return 0; } int main() { // cout << "!" << endl; // 整数の入力 // ll t; // cin >> t; // for (size_t i = 0; i < t; i++) // { solve(); // } // cout << flush; return 0; }
06a7ca72b906e566e89e45084d87ffbad86fb0c0
9b62ee0bd9bbec283877363e183f089c491c5f88
/GameTemplate/tkEngine/graphics/tkSkinModelRender.cpp
37b03871cddef747d714d264a85a18ece480e349
[]
no_license
tatibanakotone0424/MZ
7fd7d9c4772484519f83f4d4c5bbb12d5a64f791
7d5053dc349a47419df113118e6966e7af505fc3
refs/heads/master
2020-05-07T17:06:41.526597
2019-04-27T05:38:44
2019-04-27T05:38:44
180,714,406
0
0
null
null
null
null
SHIFT_JIS
C++
false
false
3,155
cpp
/*! * @brief スキンモデルレンダラー */ #include "tkEngine/tkEnginePreCompile.h" #include "tkEngine/graphics/tkSkinModelRender.h" namespace tkEngine{ namespace prefab{ void CSkinModelRender::Init( const wchar_t* filePath, CAnimationClip* animationClips, int numAnimationClips , EnFbxUpAxis fbxUpAxis, int maxInstance ) { m_enFbxUpAxis = fbxUpAxis; m_skinModelData.Load(filePath); m_skinModel.Init(m_skinModelData, maxInstance); m_frustumCulling.Init(MainCamera()); InitAnimation(animationClips, numAnimationClips); } void CSkinModelRender::InitAnimation(CAnimationClip* animationClips, int numAnimationClips) { m_animationClips = animationClips; m_numAnimationClips = numAnimationClips; if (m_animationClips != nullptr) { m_animation.Init(m_skinModel, m_animationClips, m_numAnimationClips); } } void CSkinModelRender::OnDestroy() { auto& shadowMap = GraphicsEngine().GetShadowMap(); shadowMap.Remove(&m_skinModel.GetShadowCaster()); auto& gBuffer = GraphicsEngine().GetGBufferRender(); gBuffer.RemoveSkinModel(&m_skinModel); } /*! * @brief 更新前に呼ばれる関数。 */ bool CSkinModelRender::Start() { return true; } /*! * @brief 更新。 */ void CSkinModelRender::Update() { if (m_skinModelData.IsAvailable() == false) { //m_skinModelDataが利用不可。 //多分初期化の時にエラーが出ているはずです。エラーを直してください。 return; } if (m_isFrustumCulling == true) { m_skinModel.UpdateBoundingBox(); m_frustumCulling.Execute(m_skinModel.GetBoundingBox()); } m_skinModel.Update(m_position, m_rotation, m_scale, m_enFbxUpAxis, m_isForwardRender); } /*! * @brief 描画。 */ void CSkinModelRender::ForwardRender(CRenderContext& rc) { if (m_skinModelData.IsAvailable() == false) { //m_skinModelDataが利用不可。 //多分初期化の時にエラーが出ているはずです。エラーを直してください。 return; } if (m_isForwardRender == false || (m_isFrustumCulling == true && m_frustumCulling.IsCulling()) ) { return; } m_skinModel.Draw(rc); } void CSkinModelRender::FindVertexPosition(std::function<void(CVector3* pos)> func) { m_skinModelData.FindMesh([&](const auto& mesh) { ID3D11DeviceContext* deviceContext = GraphicsEngine().GetD3DImmediateDeviceContext(); //頂点バッファを作成。 { D3D11_MAPPED_SUBRESOURCE subresource; HRESULT hr = deviceContext->Map(mesh->vertexBuffer.Get(), 0, D3D11_MAP_WRITE_NO_OVERWRITE, 0, &subresource); if (FAILED(hr)) { TK_WARNING("Failed map vertexBuffer"); return; } D3D11_BUFFER_DESC bufferDesc; mesh->vertexBuffer->GetDesc(&bufferDesc); int vertexCount = bufferDesc.ByteWidth / mesh->vertexStride; char* pData = reinterpret_cast<char*>(subresource.pData); CVector3* pos; for (int i = 0; i < vertexCount; i++) { pos = reinterpret_cast<CVector3*>(pData); func(pos); pData += mesh->vertexStride; } //頂点バッファをアンロック deviceContext->Unmap(mesh->vertexBuffer.Get(), 0); } }); } } }
[ "36" ]
36
acd734770c6ef1beec080c5530d2a26970f489a7
582de932f1a392af7b09507bf0b2b19b07c94fe7
/reference_implementation/cs6620-prog6/.svn/text-base/Array3.h.svn-base
91161bd86ccf876bbafe838f4c7a0be08e96f311
[ "MIT" ]
permissive
daniel-perry/rt
5519d1de157dcade3ce66eb2a8609ad8b5e60165
d54e2fcf66b6ed09066ec16d519724f00c082658
refs/heads/master
2021-01-18T21:43:51.170786
2016-04-22T01:38:25
2016-04-22T01:38:25
6,724,244
0
0
null
null
null
null
UTF-8
C++
false
false
1,853
#ifndef Array3_h #define Array3_h template<typename T> class Array3 { public: Array3() { nx = ny = nz = extra = 0; xidx = yidx = zidx = 0; data = 0; } Array3(int nx, int ny, int nz, int extra = 0) { xidx = yidx = zidx = 0; data = 0; resize(nx, ny, nz, extra); } ~Array3() { resize(0, 0, 0); } void resize(int newnx, int newny, int newnz, int newextra = 0) { if(xidx) delete[] xidx; if(yidx) delete[] yidx; if(zidx) delete[] zidx; if(data) delete[] data; nx = newnx; ny = newny; nz = newnz; extra = newextra; int total = nx*ny*nz+extra; if(total != 0){ data = new T[total]; allocateAndInitializeStride(xidx, nx, 1); allocateAndInitializeStride(yidx, ny, nx); allocateAndInitializeStride(zidx, nz, nx*ny); } else { xidx = yidx = zidx = 0; data = 0; } } void initialize(const T& value) { int total = nx*ny*nz+extra; for(int i=0;i<total;i++) data[i] = value; } T& operator()(int x, int y, int z) { return data[xidx[x] + yidx[y] + zidx[z]]; } const T& operator()(int x, int y, int z) const { return data[xidx[x] + yidx[y] + zidx[z]]; } int getIndex(int x, int y, int z) const { return xidx[x] + yidx[y] + zidx[z]; } T& operator[](int idx) { return data[idx]; } const T& operator[](int idx) const { return data[idx]; } int getNx() const { return nx; } int getNy() const { return ny; } int getNz() const { return nz; } private: Array3(const Array3&); Array3& operator=(const Array3&); int nx, ny, nz, extra; int* xidx; int* yidx; int* zidx; T* data; void allocateAndInitializeStride(int*& idx, int num, int stride) { idx = new int[num]; for(int i=0;i<num;i++) idx[i] = stride*i; } }; #endif
f6a1b3f087645189c57c6466d63a2d9764354253
64b351e63d28f4d49462086b5e4f20dcb36cb826
/Lab 3/CG2020_P3/src/framework/application.h
e5495e0288e1a0331f2f3b627618bd2a06cc912c
[]
no_license
gecaro/computergraphics
149068ea94b1f724914b1a6032d4a4d6b83beac4
639804b5e5a33d8c41d6537177d2d3c9c1fc1b6d
refs/heads/master
2022-04-21T15:23:15.390654
2020-03-12T23:35:08
2020-03-12T23:35:08
237,953,151
0
0
null
null
null
null
UTF-8
C++
false
false
1,552
h
/* by Javi Agenjo 2013 UPF [email protected] This class encapsulates the application, is in charge of creating the data, getting the user input, process the update and render. */ #ifndef APPLICATION_H #define APPLICATION_H #include "includes.h" #include "framework.h" #include "camera.h" #include "image.h" class Application { public: //window SDL_Window* window; float window_width; float window_height; float time; Image framebuffer; FloatImage zFramebuffer; //keyboard state const Uint8* keystate; //mouse state int mouse_state; //tells which buttons are pressed Vector2 mouse_position; //last mouse position Vector2 mouse_delta; //mouse movement in the last frame //constructor Application(const char* caption, int width, int height); //main methods void init( void ); void render( Image& framebuffer ); void update( double dt ); //methods for events void onKeyDown( SDL_KeyboardEvent event ); void onKeyUp(SDL_KeyboardEvent event); void onMouseButtonDown( SDL_MouseButtonEvent event ); void onMouseButtonUp( SDL_MouseButtonEvent event ); void onWindowResize(int width, int height); //other methods to control the app void setWindowSize(int width, int height) { glViewport( 0,0, width, height ); this->window_width = width; this->window_height = height; this->onWindowResize(width, height); } Vector2 getWindowSize() { int w,h; SDL_GetWindowSize(window,&w,&h); return Vector2(w,h); } void start(); }; #endif
33ea12fdf3d13afba4b25452b8bf4920923b88a7
c397c12712b0326c2033f62727853d85cf2df69e
/src/objects/computer_vision/OpticalFlow.cpp
d9ba10040cf87bc0fea198e971e8d4d0652eb69c
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
audazz/ofxVisualProgramming
1559f2705248ccaafec245f9299bbf3ee5ad293e
fd0c96eeedbc9219921a096fd50b908f58e80ef1
refs/heads/master
2020-04-16T09:52:33.832171
2018-12-13T17:29:48
2018-12-13T17:29:48
null
0
0
null
null
null
null
UTF-8
C++
false
false
14,183
cpp
/*============================================================================== ofxVisualProgramming: A visual programming patching environment for OF Copyright (c) 2018 Emanuele Mazza aka n3m3da <[email protected]> ofxVisualProgramming is distributed under the MIT License. This gives everyone the freedoms to use ofxVisualProgramming in any context: commercial or non-commercial, public or private, open or closed source. 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. See https://github.com/d3cod3/ofxVisualProgramming for documentation ==============================================================================*/ #include "OpticalFlow.h" using namespace ofxCv; using namespace cv; //-------------------------------------------------------------- OpticalFlow::OpticalFlow() : PatchObject(){ this->numInlets = 1; this->numOutlets = 2; _inletParams[0] = new ofTexture(); // input _outletParams[0] = new ofTexture(); // output texture _outletParams[1] = new vector<float>(); // optical flow data this->initInletsState(); isGUIObject = true; this->isOverGUI = true; posX = posY = drawW = drawH = 0.0f; pix = new ofPixels(); scaledPix = new ofPixels(); outputFBO = new ofFbo(); isFBOAllocated = false; } //-------------------------------------------------------------- void OpticalFlow::newObject(){ this->setName("optical flow"); this->addInlet(VP_LINK_TEXTURE,"input"); this->addOutlet(VP_LINK_TEXTURE); this->addOutlet(VP_LINK_ARRAY); this->setCustomVar(static_cast<float>(0.0),"FB_USE_GAUSSIAN"); this->setCustomVar(static_cast<float>(0.25),"FB_PYR_SCALE"); this->setCustomVar(static_cast<float>(1.5),"FB_POLY_SIGMA"); this->setCustomVar(static_cast<float>(4.0),"FB_LEVELS"); this->setCustomVar(static_cast<float>(2.0),"FB_ITERATIONS"); this->setCustomVar(static_cast<float>(7.0),"FB_POLY_N"); this->setCustomVar(static_cast<float>(32.0),"FB_WIN_SIZE"); } //-------------------------------------------------------------- void OpticalFlow::setupObjectContent(shared_ptr<ofAppGLFWWindow> &mainWindow){ gui = new ofxDatGui( ofxDatGuiAnchor::TOP_RIGHT ); gui->setAutoDraw(false); gui->setUseCustomMouse(true); gui->setWidth(this->width); header = gui->addHeader("CONFIG",false); header->setUseCustomMouse(true); header->setCollapsable(true); fbUseGaussian = gui->addToggle("GAUSS.",static_cast<int>(floor(this->getCustomVar("FB_USE_GAUSSIAN")))); fbUseGaussian->setUseCustomMouse(true); fbPyrScale = gui->addSlider("PSCALE",0.0,0.5); fbPyrScale->setUseCustomMouse(true); fbPyrScale->setValue(static_cast<double>(this->getCustomVar("FB_PYR_SCALE"))); fbLevels = gui->addSlider("LEVELS",1,8); fbLevels->setUseCustomMouse(true); fbLevels->setValue(static_cast<double>(this->getCustomVar("FB_LEVELS"))); fbWinSize = gui->addSlider("SIZE",16,64); fbWinSize->setUseCustomMouse(true); fbWinSize->setValue(static_cast<double>(this->getCustomVar("FB_WIN_SIZE"))); fbIterations = gui->addSlider("ITER.",1,3); fbIterations->setUseCustomMouse(true); fbIterations->setValue(static_cast<double>(this->getCustomVar("FB_ITERATIONS"))); fbPolyN = gui->addSlider("POLYN",5,10); fbPolyN->setUseCustomMouse(true); fbPolyN->setValue(static_cast<double>(this->getCustomVar("FB_POLY_N"))); fbPolySigma = gui->addSlider("POLYS",1.1,2); fbPolySigma->setUseCustomMouse(true); fbPolySigma->setValue(static_cast<double>(this->getCustomVar("FB_POLY_SIGMA"))); gui->onToggleEvent(this, &OpticalFlow::onToggleEvent); gui->onSliderEvent(this, &OpticalFlow::onSliderEvent); gui->setPosition(0,this->height - header->getHeight()); gui->collapse(); header->setIsCollapsed(true); } //-------------------------------------------------------------- void OpticalFlow::updateObjectContent(map<int,PatchObject*> &patchObjects){ gui->update(); header->update(); if(!header->getIsCollapsed()){ fbUseGaussian->update(); fbPyrScale->update(); fbLevels->update(); fbWinSize->update(); fbIterations->update(); fbPolyN->update(); fbPolySigma->update(); fbUseGaussian->update(); } if(this->inletsConnected[0] && static_cast<ofTexture *>(_inletParams[0])->isAllocated()){ if(!isFBOAllocated){ isFBOAllocated = true; pix = new ofPixels(); scaledPix = new ofPixels(); scaledPix->allocate(320,static_cast<ofTexture *>(_inletParams[0])->getHeight()/static_cast<ofTexture *>(_inletParams[0])->getWidth()*320,OF_PIXELS_RGB); outputFBO->allocate(static_cast<ofTexture *>(_inletParams[0])->getWidth(),static_cast<ofTexture *>(_inletParams[0])->getHeight(),GL_RGB,1); } fb.setPyramidScale(fbPyrScale->getValue()); fb.setNumLevels(static_cast<int>(floor(fbLevels->getValue()))); fb.setWindowSize(static_cast<int>(floor(fbWinSize->getValue()))); fb.setNumIterations(static_cast<int>(floor(fbIterations->getValue()))); fb.setPolyN(static_cast<int>(floor(fbPolyN->getValue()))); fb.setPolySigma(fbPolySigma->getValue()); fb.setUseGaussian(fbUseGaussian->getChecked()); static_cast<ofTexture *>(_inletParams[0])->readToPixels(*pix); pix->resizeTo(*scaledPix); fb.calcOpticalFlow(*scaledPix); if(outputFBO->isAllocated()){ *static_cast<ofTexture *>(_outletParams[0]) = outputFBO->getTexture(); static_cast<vector<float> *>(_outletParams[1])->clear(); static_cast<vector<float> *>(_outletParams[1])->push_back(fb.getFlow().rows); static_cast<vector<float> *>(_outletParams[1])->push_back(fb.getFlow().cols); for(int y = 0; y < fb.getFlow().rows; y += 10) { for(int x = 0; x < fb.getFlow().cols; x += 10) { static_cast<vector<float> *>(_outletParams[1])->push_back(x); static_cast<vector<float> *>(_outletParams[1])->push_back(y); static_cast<vector<float> *>(_outletParams[1])->push_back(fb.getFlowPosition(x, y).x); static_cast<vector<float> *>(_outletParams[1])->push_back(fb.getFlowPosition(x, y).y); } } } }else{ isFBOAllocated = false; } } //-------------------------------------------------------------- void OpticalFlow::drawObjectContent(ofxFontStash *font){ ofSetColor(255); ofEnableAlphaBlending(); if(this->inletsConnected[0] && outputFBO->isAllocated() && static_cast<ofTexture *>(_outletParams[0])->isAllocated()){ outputFBO->begin(); ofClear(0,0,0,255); ofSetColor(255); static_cast<ofTexture *>(_inletParams[0])->draw(0,0); ofSetColor(yellowPrint); fb.draw(0,0,static_cast<ofTexture *>(_outletParams[0])->getWidth(),static_cast<ofTexture *>(_outletParams[0])->getHeight()); outputFBO->end(); if(static_cast<ofTexture *>(_outletParams[0])->getWidth() >= static_cast<ofTexture *>(_outletParams[0])->getHeight()){ // horizontal texture drawW = this->width; drawH = (this->width/static_cast<ofTexture *>(_outletParams[0])->getWidth())*static_cast<ofTexture *>(_outletParams[0])->getHeight(); posX = 0; posY = (this->height-drawH)/2.0f; }else{ // vertical texture drawW = (static_cast<ofTexture *>(_outletParams[0])->getWidth()*this->height)/static_cast<ofTexture *>(_outletParams[0])->getHeight(); drawH = this->height; posX = (this->width-drawW)/2.0f; posY = 0; } static_cast<ofTexture *>(_outletParams[0])->draw(posX,posY,drawW,drawH); } gui->draw(); ofDisableAlphaBlending(); } //-------------------------------------------------------------- void OpticalFlow::removeObjectContent(){ } //-------------------------------------------------------------- void OpticalFlow::mouseMovedObjectContent(ofVec3f _m){ gui->setCustomMousePos(static_cast<int>(_m.x - this->getPos().x),static_cast<int>(_m.y - this->getPos().y)); header->setCustomMousePos(static_cast<int>(_m.x - this->getPos().x),static_cast<int>(_m.y - this->getPos().y)); fbUseGaussian->setCustomMousePos(static_cast<int>(_m.x - this->getPos().x),static_cast<int>(_m.y - this->getPos().y)); fbPyrScale->setCustomMousePos(static_cast<int>(_m.x - this->getPos().x),static_cast<int>(_m.y - this->getPos().y)); fbLevels->setCustomMousePos(static_cast<int>(_m.x - this->getPos().x),static_cast<int>(_m.y - this->getPos().y)); fbWinSize->setCustomMousePos(static_cast<int>(_m.x - this->getPos().x),static_cast<int>(_m.y - this->getPos().y)); fbIterations->setCustomMousePos(static_cast<int>(_m.x - this->getPos().x),static_cast<int>(_m.y - this->getPos().y)); fbPolyN->setCustomMousePos(static_cast<int>(_m.x - this->getPos().x),static_cast<int>(_m.y - this->getPos().y)); fbPolySigma->setCustomMousePos(static_cast<int>(_m.x - this->getPos().x),static_cast<int>(_m.y - this->getPos().y)); fbUseGaussian->setCustomMousePos(static_cast<int>(_m.x - this->getPos().x),static_cast<int>(_m.y - this->getPos().y)); if(!header->getIsCollapsed()){ this->isOverGUI = header->hitTest(_m-this->getPos()) || fbUseGaussian->hitTest(_m-this->getPos()) || fbPyrScale->hitTest(_m-this->getPos()) || fbLevels->hitTest(_m-this->getPos()) || fbWinSize->hitTest(_m-this->getPos()) || fbIterations->hitTest(_m-this->getPos()) || fbPolyN->hitTest(_m-this->getPos()) || fbPolySigma->hitTest(_m-this->getPos()) || fbUseGaussian->hitTest(_m-this->getPos()); }else{ this->isOverGUI = header->hitTest(_m-this->getPos()); } } //-------------------------------------------------------------- void OpticalFlow::dragGUIObject(ofVec3f _m){ if(this->isOverGUI){ gui->setCustomMousePos(static_cast<int>(_m.x - this->getPos().x),static_cast<int>(_m.y - this->getPos().y)); header->setCustomMousePos(static_cast<int>(_m.x - this->getPos().x),static_cast<int>(_m.y - this->getPos().y)); fbUseGaussian->setCustomMousePos(static_cast<int>(_m.x - this->getPos().x),static_cast<int>(_m.y - this->getPos().y)); fbPyrScale->setCustomMousePos(static_cast<int>(_m.x - this->getPos().x),static_cast<int>(_m.y - this->getPos().y)); fbLevels->setCustomMousePos(static_cast<int>(_m.x - this->getPos().x),static_cast<int>(_m.y - this->getPos().y)); fbWinSize->setCustomMousePos(static_cast<int>(_m.x - this->getPos().x),static_cast<int>(_m.y - this->getPos().y)); fbIterations->setCustomMousePos(static_cast<int>(_m.x - this->getPos().x),static_cast<int>(_m.y - this->getPos().y)); fbPolyN->setCustomMousePos(static_cast<int>(_m.x - this->getPos().x),static_cast<int>(_m.y - this->getPos().y)); fbPolySigma->setCustomMousePos(static_cast<int>(_m.x - this->getPos().x),static_cast<int>(_m.y - this->getPos().y)); fbUseGaussian->setCustomMousePos(static_cast<int>(_m.x - this->getPos().x),static_cast<int>(_m.y - this->getPos().y)); }else{ ofNotifyEvent(dragEvent, nId); box->setFromCenter(_m.x, _m.y,box->getWidth(),box->getHeight()); headerBox->set(box->getPosition().x,box->getPosition().y,box->getWidth(),headerHeight); x = box->getPosition().x; y = box->getPosition().y; for(int j=0;j<static_cast<int>(outPut.size());j++){ outPut[j]->linkVertices[0].move(outPut[j]->posFrom.x,outPut[j]->posFrom.y); outPut[j]->linkVertices[1].move(outPut[j]->posFrom.x+20,outPut[j]->posFrom.y); } } } //-------------------------------------------------------------- void OpticalFlow::onToggleEvent(ofxDatGuiToggleEvent e){ if(!header->getIsCollapsed()){ if(e.target == fbUseGaussian){ this->setCustomVar(static_cast<float>(e.checked),"FB_USE_GAUSSIAN"); } } } //-------------------------------------------------------------- void OpticalFlow::onSliderEvent(ofxDatGuiSliderEvent e){ if(!header->getIsCollapsed()){ if(e.target == fbPyrScale){ this->setCustomVar(static_cast<float>(e.value),"FB_PYR_SCALE"); }else if(e.target == fbLevels){ this->setCustomVar(static_cast<float>(e.value),"FB_LEVELS"); }else if(e.target == fbWinSize){ this->setCustomVar(static_cast<float>(e.value),"FB_WIN_SIZE"); }else if(e.target == fbIterations){ this->setCustomVar(static_cast<float>(e.value),"FB_ITERATIONS"); }else if(e.target == fbPolyN){ this->setCustomVar(static_cast<float>(e.value),"FB_POLY_N"); }else if(e.target == fbPolySigma){ this->setCustomVar(static_cast<float>(e.value),"FB_POLY_SIGMA"); } } }
843d530b65d8fac2216fba304b9b695df0b72e1f
d25c3d2a553bf57574c72288cc54d6321b83a972
/libraries/SHT31/examples/SHT31_demo/SHT31_demo.ino
e085a2639fca5359150dcbd99dc5a4aec00bee5d
[ "MIT" ]
permissive
roberto-lopardo-aimen/Arduino
32f99d48920d3cacefb7135a1528e1cd641b6a47
f4d0b1d978fbf4009cd87d0fa6cb7c11cc76aea3
refs/heads/master
2023-05-07T13:21:12.226603
2021-05-26T14:39:03
2021-05-26T14:39:03
null
0
0
null
null
null
null
UTF-8
C++
false
false
887
ino
// // FILE: SHT31_demo.ino // AUTHOR: Rob Tillaart // VERSION: 0.0.2 // PURPOSE: demo // URL: https://github.com/RobTillaart/SHT31 #include "Wire.h" #include "SHT31.h" #define SHT31_ADDRESS 0x44 uint32_t start; uint32_t stop; SHT31 sht; void setup() { Serial.begin(115200); Serial.println(__FILE__); Serial.print("SHT31_LIB_VERSION: \t"); Serial.println(SHT31_LIB_VERSION); Wire.begin(); sht.begin(SHT31_ADDRESS); Wire.setClock(100000); uint16_t stat = sht.readStatus(); Serial.print(stat, HEX); Serial.println(); } void loop() { start = micros(); sht.read(); // default = true/fast slow = false stop = micros(); Serial.print("\t"); Serial.print(stop - start); Serial.print("\t"); Serial.print(sht.getTemperature(), 1); Serial.print("\t"); Serial.println(sht.getHumidity(), 1); delay(100); } // -- END OF FILE --
e0c497a76a794f4d3582ee96d72e3c033178a4fe
54590b50af2c4a1335401229f3b4eeb1d665b37b
/Novus-Engine/src/Graphics/PostProcess/DeferredRenderer.cpp
cb0681adee7385b3b2bf90410f8bb3862ad7a5ec
[ "MIT" ]
permissive
wubugui/Novus-Engine
8f14dcdff7d9aa387a7e4a45a5f0d07bc599dbd5
b266e08a3ea15a1456de3eb90749f0f0e47308fc
refs/heads/master
2021-05-04T07:50:47.587561
2015-05-11T18:57:12
2015-05-11T18:57:12
null
0
0
null
null
null
null
UTF-8
C++
false
false
6,296
cpp
#include "DeferredRenderer.h" #include "Graphics/Shaders/Shader.h" #include "Graphics/Textures/Texture2D.h" #include "Graphics/D3DRenderer.h" #include "PrefilteredEnvironmentMap.h" namespace novus { DeferredRenderer::DeferredRenderer() : mpTiledDeferredShader(NULL), mpLUTShader(NULL), mpDebugOutputShader(NULL), mpPointSampler(NULL), mpEnvironmentSampler(NULL), mpEnvMap(NULL), mpBRDFLUT(NULL), mpSourceRenderTarget(NULL), mMaxLightCount(1024) { mpHDRRenderTarget = NE_NEW Texture2D(); mpLightManager = NE_NEW LightManager(); } DeferredRenderer::~DeferredRenderer() { ReleaseCOM(mpPointSampler); ReleaseCOM(mpEnvironmentSampler); NE_DELETE(mpLightManager); NE_DELETE(mpHDRRenderTarget); NE_DELETE(mpEnvMap); NE_DELETE(mpBRDFLUT); } void DeferredRenderer::Init(D3DRenderer* renderer, int width, int height) { if (mpTiledDeferredShader == NULL) //This is the first init { ShaderInfo deferredShaderInfo[] = { { ShaderType::Compute, "ComputeShaderTileCS" }, { ShaderType::None, NULL } }; mpTiledDeferredShader = renderer->LoadShader(L"../Shaders/Deferred/ComputeTiledDeferred.hlsl", deferredShaderInfo, D3D_PRIMITIVE_TOPOLOGY_UNDEFINED, NULL, 0); ShaderInfo LUTShaderInfo[] = { { ShaderType::Compute, "PreIntegrateBRDFCS" }, { ShaderType::None, NULL } }; mpLUTShader = renderer->LoadShader(L"../Shaders/Utils/PreIntegrateBRDF.hlsl", LUTShaderInfo, D3D_PRIMITIVE_TOPOLOGY_UNDEFINED, NULL, 0); ShaderInfo debugShaderInfo[] = { { ShaderType::Vertex, "VS" }, { ShaderType::Pixel, "PS" }, { ShaderType::None, NULL } }; mpDebugOutputShader = renderer->LoadShader(L"../Shaders/Utils/DebugFullscreenTriangle.hlsl", debugShaderInfo, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST, NULL, 0); //mTestPointLights.clear(); //mTestPointLights.reserve(mMaxLightCount); //for (int i = 0; i < mMaxLightCount; i++) //{ // PointLight light; // light.Color = Vector3(Math::RandF(), Math::RandF(), Math::RandF()); // //light.Color = Vector3(1.0f, 1.0f, 1.0f); // light.Intensity = Math::RandF(0.3f, 2.7f) * 0.1f; // light.Radius = 0.0f; // light.Range = sqrt(light.Intensity / 0.002f) - 1.0f + light.Radius; // light.FalloffPow = 1; // light.PositionWorld = Vector3(Math::RandF(-1.0f, 1.0f), Math::RandF(-1.0f, 1.0f), Math::RandF(-1.0f, 1.0f)) * 20.0f; // light.PositionWorld.y = Math::RandF(0.8f, 9.5f); // mTestPointLights.push_back(light); //} D3D11_SAMPLER_DESC samDesc; ZeroMemory(&samDesc, sizeof(samDesc)); samDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT; samDesc.AddressU = samDesc.AddressV = samDesc.AddressW = D3D11_TEXTURE_ADDRESS_WRAP; samDesc.MaxAnisotropy = 1; samDesc.ComparisonFunc = D3D11_COMPARISON_ALWAYS; samDesc.MaxLOD = D3D11_FLOAT32_MAX; HR(renderer->device()->CreateSamplerState(&samDesc, &mpPointSampler)); samDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR; HR(renderer->device()->CreateSamplerState(&samDesc, &mpEnvironmentSampler)); mpEnvMap = NE_NEW PrefilteredEnvironmentMap(); mpEnvMap->Init(renderer, L"../Textures/sunsetcube1024.dds"); mLightBuffer.Init(renderer, mMaxLightCount, D3D11_BIND_SHADER_RESOURCE, true); mpBRDFLUT = NE_NEW Texture2D(); mpBRDFLUT->Init(renderer, 256, 256, DXGI_FORMAT_R16G16_FLOAT, 1, D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_UNORDERED_ACCESS); mpBRDFLUT->setDebugName("BRDF LUT"); ID3D11UnorderedAccessView* texUav = mpBRDFLUT->getUnorderedAccessView(); renderer->setShader(mpLUTShader); renderer->context()->CSSetUnorderedAccessViews(0, 1, &texUav, 0); renderer->context()->Dispatch(mpBRDFLUT->getWidth() / 16, mpBRDFLUT->getHeight() / 16, 1); } mpHDRRenderTarget->Init(renderer, width, height, DXGI_FORMAT_R16G16B16A16_FLOAT, 1, D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_UNORDERED_ACCESS | D3D11_BIND_RENDER_TARGET); mpHDRRenderTarget->setDebugName("HDR Render Target"); mpSourceRenderTarget = mpHDRRenderTarget; } void DeferredRenderer::Update(float dt) { /*for (int i = 0; i < mMaxLightCount; i++) { mTestPointLights[i].PositionWorld = Matrix3::RotateY(dt * 0.02f) * mTestPointLights[i].PositionWorld; }*/ mpLightManager->ClearLights(); } void DeferredRenderer::RenderDeferredShading(D3DRenderer* renderer) { float clearColor[4] = { 0.0f, 1.0f, 0.0f, 1.0f }; renderer->context()->ClearRenderTargetView(mpHDRRenderTarget->getRenderTargetView(), clearColor); Matrix4 view = renderer->getPerFrameBuffer()->View; //Upload view-space lights PointLight* lightBufferPtr = mLightBuffer.Map(renderer); for (int i = 0; i < mMaxLightCount; i++) { if (i < mpLightManager->getLights().size()) { PointLight light = mpLightManager->getLights()[i]; light.PositionView = Vector3(Vector4(light.PositionWorld, 1.0f) * view); light.Range = light.Range = sqrt(light.Intensity / 0.002f) - 1.0f + light.Radius; //light.PositionView.z = -light.PositionView.z; lightBufferPtr[i] = light; } else { lightBufferPtr[i].Intensity = 0.0f; lightBufferPtr[i].Range = 0.0f; } } mLightBuffer.Unmap(renderer); renderer->setShader(mpTiledDeferredShader); renderer->BindPerFrameBuffer(); renderer->getGBuffer()->BindTextures(); renderer->ResetSamplerState(); mpEnvMap->Bind(renderer, 5); renderer->setTextureResource(7, mpBRDFLUT); ID3D11ShaderResourceView* lightSRV = mLightBuffer.getSRV(); renderer->context()->CSSetShaderResources(6, 1, &lightSRV); ID3D11UnorderedAccessView* outputUAV = mpHDRRenderTarget->getUnorderedAccessView(); renderer->context()->CSSetUnorderedAccessViews(0, 1, &outputUAV, 0); //Compute shader tile group dimensions = 16x16 unsigned int dispatchWidth = (mpHDRRenderTarget->getWidth() + 16 - 1) / 16; unsigned int dispatchHeight = (mpHDRRenderTarget->getHeight() + 16 - 1) / 16; renderer->context()->Dispatch(dispatchWidth, dispatchHeight, 1); renderer->UnbindTextureResources(); renderer->UnbindUAVs(); } void DeferredRenderer::RenderDebugOutput(D3DRenderer* renderer) { renderer->setShader(mpDebugOutputShader); renderer->ResetRenderTarget(); renderer->ResetSamplerState(); renderer->setSampler(0, mpPointSampler); renderer->setTextureResource(0, mpSourceRenderTarget); renderer->context()->IASetVertexBuffers(0, 0, 0, 0, 0); renderer->context()->IASetIndexBuffer(NULL, (DXGI_FORMAT)0, 0); renderer->context()->Draw(3, 0); } }
773d51b3db056f0fc7a2bc2ab915c0ad00d02f95
b9e8d33a26e13bc5b919150574f03d47a082055a
/library/graphics/WidgetContainer.cc
08f8a3e2071a1864b230e4edb2e5fce3529e6306
[ "Zlib", "BSL-1.0" ]
permissive
magestik/gf
9215fb1e25c8a092bad4aa5875f030fd63d891ac
60d9bbe084828fff88f1a511bd1191c774ccef4a
refs/heads/master
2020-12-26T19:54:45.888737
2020-01-14T15:31:28
2020-01-14T15:31:28
237,623,167
0
0
NOASSERTION
2020-02-01T14:02:32
2020-02-01T14:02:31
null
UTF-8
C++
false
false
4,332
cc
/* * Gamedev Framework (gf) * Copyright (C) 2016-2019 Lilian Franchi * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. */ #include <gf/WidgetContainer.h> #include <cassert> #include <gf/Widgets.h> #include <gf/Log.h> namespace gf { #ifndef DOXYGEN_SHOULD_SKIP_THIS inline namespace v1 { #endif WidgetContainer::WidgetContainer() : m_selectedWidgetIndex(0) , m_widgetIsSelected(false) { } void WidgetContainer::pointTo(Vector2f coords) { if (m_widgets.empty()) { return; } unselectCurrentlySelected(); m_widgetIsSelected = false; for(size_t i = 0; i < m_widgets.size(); i++) { Widget& currentWidget = m_widgets[i]; if (currentWidget.isDefault() && currentWidget.contains(coords)) { m_selectedWidgetIndex = i; m_widgetIsSelected = true; currentWidget.setSelected(); break; // to avoid multiple selection } } } void WidgetContainer::render(RenderTarget &target, const RenderStates &states) { for (Widget& widget : m_widgets) { widget.draw(target, states); } } void WidgetContainer::addWidget(Widget& widget) { m_widgets.push_back(widget); } Widget *WidgetContainer::removeWidget(Widget *widget) { // erase-remove idiom auto it = std::remove(m_widgets.begin(), m_widgets.end(), *widget); if (it != m_widgets.end()) { m_widgets.erase(it, m_widgets.end()); return widget; } return nullptr; } void WidgetContainer::triggerAction() { if (m_widgets.empty()) { return; } if (m_widgetIsSelected) { getCurrent().triggerCallback(); } } void WidgetContainer::selectNextWidget() { if (m_widgets.empty()) { return; } unselectCurrentlySelected(); // select the new one if (m_widgetIsSelected) { computeNextIndex(); } else { m_widgetIsSelected = true; } std::size_t count = 0; std::size_t maxCount = m_widgets.size(); while (count < maxCount && !getCurrent().isDefault()) { computeNextIndex(); ++count; } if (count == maxCount) { m_widgetIsSelected = false; return; } getCurrent().setSelected(); } void WidgetContainer::selectPreviousWidget() { if (m_widgets.empty()) { return; } unselectCurrentlySelected(); // select the new one if (m_widgetIsSelected) { computePreviousIndex(); } else { m_widgetIsSelected = true; } std::size_t count = 0; std::size_t maxCount = m_widgets.size(); while (count < maxCount && !getCurrent().isDefault()) { computePreviousIndex(); ++count; } if (count == maxCount) { m_widgetIsSelected = false; return; } getCurrent().setSelected(); } void WidgetContainer::unselectCurrentlySelected() { if (m_widgetIsSelected) { assert(getCurrent().isSelected()); getCurrent().setDefault(); } } void WidgetContainer::computePreviousIndex() { if (m_selectedWidgetIndex == 0) { m_selectedWidgetIndex = m_widgets.size(); } --m_selectedWidgetIndex; } void WidgetContainer::computeNextIndex() { ++m_selectedWidgetIndex; if (m_selectedWidgetIndex >= m_widgets.size()) { m_selectedWidgetIndex = 0; } } Widget& WidgetContainer::getCurrent() { assert(m_widgetIsSelected); assert(m_selectedWidgetIndex < m_widgets.size()); return m_widgets[m_selectedWidgetIndex]; } #ifndef DOXYGEN_SHOULD_SKIP_THIS } #endif }
354bf5b668e53f837239377af9d18ea45084590d
275a4fd85a1d85e6cfbfdc22adf6f1cb4bfb9360
/shared/util/TextScanner.cpp
2967c98a4b4a0ceb5b4e30c2e0ca426a077eb2f5
[ "LicenseRef-scancode-unknown-license-reference", "XFree86-1.1" ]
permissive
fatalfeel/proton_sdk_source
20656e1df64b29cfe0fc3d15f8b36cf1358704c4
15addf2c7f9b137788322d609b7df0506c767f68
refs/heads/master
2021-08-03T07:14:18.079209
2021-07-23T02:35:54
2021-07-23T02:35:54
17,131,205
20
5
null
null
null
null
UTF-8
C++
false
false
4,354
cpp
#include "PlatformPrecomp.h" #include "TextScanner.h" #include "util/ResourceUtils.h" #include "util/MiscUtils.h" #include "FileSystem/FileManager.h" TextScanner::TextScanner() { m_lastLine = 0; } TextScanner::TextScanner(const string &fName ) { m_lastLine = 0; LoadFile(fName); } TextScanner::TextScanner(const string &fName, bool bAddBasePath ) { m_lastLine = 0; LoadFile(fName, bAddBasePath); } TextScanner::TextScanner( const char *pCharArray ) { m_lastLine = 0; SetupFromMemoryAddress(pCharArray); } bool TextScanner::LoadFile( const string &fName, bool bAddBasePath ) { Kill(); FileInstance f(fName, bAddBasePath); if (!f.IsLoaded()) return false; return SetupFromMemoryAddress(f.GetAsChars()); } bool TextScanner::SetupFromMemoryAddress(const char *pCharArray) { m_lines = StringTokenize(pCharArray, "\n"); for (unsigned int i=0; i < m_lines.size(); i++) { StringReplace("\r", "", m_lines[i]); } return true; } std::string TextScanner::GetParmString( string label, int index, string token) { if (m_lines.empty()) { LogError("Load a file first"); return ""; } for (unsigned int i=0; i < m_lines.size(); i++) { if (m_lines[i].empty()) continue; vector<string> line = StringTokenize(m_lines[i], token); if (line[0] == label) { //found it return line[index]; } } return ""; } TextScanner::~TextScanner() { Kill(); } void TextScanner::Kill() { m_lines.clear(); m_lastLine = 0; } std::string TextScanner::GetMultipleLineStrings( string label, string token ) { for (unsigned int i=m_lastLine; i < m_lines.size(); i++) { if (m_lines[i].empty()) continue; vector<string> line = StringTokenize(m_lines[i], token); if (line[0] == label) { //found it m_lastLine = i+1; return m_lines[i]; } } m_lastLine = 0; //reset it return ""; } void TextScanner::StripLeadingSpaces() { for (unsigned int i=0; i < m_lines.size(); i++) { m_lines[i] = StripWhiteSpace(m_lines[i]); } } string TextScanner::GetLine( int lineNum ) { if ((int)m_lines.size() > lineNum && lineNum >= 0) { return m_lines[lineNum]; } //invalid line return ""; } string TextScanner::GetAll() { string s; for (unsigned int i=0; i < m_lines.size(); i++) { s += StripWhiteSpace(m_lines[i])+"\n"; } return s; } std::string TextScanner::GetParmStringFromLine( int lineNum, int index, string token /*= "|"*/ ) { assert(lineNum >= 0 && (uint32)lineNum < m_lines.size()); assert(token.size() == 1 && "We don't actually support a non char delim yet"); return SeparateStringSTL(m_lines[lineNum], index, token[0]); } int TextScanner::GetParmIntFromLine( int lineNum, int index, string token /*= "|"*/ ) { assert(lineNum >= 0 && (uint32)lineNum < m_lines.size()); assert(token.size() == 1 && "We don't actually support a non char delim yet"); return atoi(SeparateStringSTL(m_lines[lineNum], index, token[0]).c_str()); } float TextScanner::GetParmFloatFromLine( int lineNum, int index, string token /*= "|"*/ ) { assert(lineNum >= 0 && (uint32)lineNum < m_lines.size()); assert(token.size() == 1 && "We don't actually support a non char delim yet"); return (float)atof(SeparateStringSTL(m_lines[lineNum], index, token[0]).c_str()); } void TextScanner::Replace( const string &thisStr, const string &thatStr ) { for (unsigned int i=0; i < m_lines.size(); i++) { StringReplace(thisStr, thatStr, m_lines[i]); } } void TextScanner::DumpToLog() { for (int i=0; i < GetLineCount(); i++) { string tmp = m_lines[i].c_str(); StringReplace("%", "%%", tmp); LogMsg(tmp.c_str()); } } bool TextScanner::SaveFile( const string &fName, bool bAddBasePath /*= true*/ ) { string f; string lineFeed = "\r\n"; if (bAddBasePath) { f = GetSavePath()+fName; } else { f = fName; } FILE *fp = fopen( f.c_str(), "wb"); if (!fp) { LogError("Unable to save data"); return false; } for (uint32 i=0; i < m_lines.size(); i++) { fwrite(m_lines[i].c_str(), m_lines[i].size(), 1, fp); fwrite(lineFeed.c_str(), lineFeed.size(), 1, fp); } fclose(fp); return true; } void TextScanner::DeleteLine( int lineNum ) { if (m_lastLine && m_lastLine >= lineNum) m_lastLine--; m_lines.erase(m_lines.begin()+lineNum); } vector<string> TextScanner::TokenizeLine( int lineNum, const string &theDelimiter /*= "|"*/ ) { return StringTokenize(m_lines[lineNum], theDelimiter); }
08c8e06bb7c569692f3ff6ede1524292cad274bd
6cc00c07a75bf18a2b1824383c3acc050098d9ed
/HackerRank/Data Structures/Easy/E0001.cpp
a6d125b0aab165e0e3ceffc3c9359d7091e79602
[ "MIT" ]
permissive
Mohammed-Shoaib/Coding-Problems
ac681c16c0f7c6d83f7cb46be71ea304d238344e
ccfb9fc2f0d8dff454439d75ce519cf83bad7c3b
refs/heads/master
2022-06-14T02:24:10.316962
2022-03-20T20:04:16
2022-03-20T20:04:16
145,226,886
75
31
MIT
2020-10-02T07:46:58
2018-08-18T14:31:33
C++
UTF-8
C++
false
false
348
cpp
/* Problem Code: https://www.hackerrank.com/challenges/arrays-ds/problem */ #include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int N; cin >> N; vector<int> A(N); for (int i = 0; i < N; i++) cin >> A[i]; reverse(A.begin(), A.end()); for (int i = 0; i < N; i++) cout << A[i] << " "; return 0; }
1172bb0c89398ab92b8f97e605b0736120f03cc3
00075bf57912082b2f072cba4112325eabaf32d9
/AutoMages/src/Systems/PeriodicSystem.h
a9ee5a185d87a0aa5094a275d18a747a50cc84eb
[]
no_license
Manicqin/AutoMages
5e591b5f51e9c8ebf735571f009b8ed9f324645d
f51a37b81f9e9d20bef1bd44749bac0c29f82357
HEAD
2016-09-06T10:27:45.756140
2014-06-09T11:23:03
2014-06-09T11:23:03
3,336,130
0
0
null
null
null
null
UTF-8
C++
false
false
813
h
/* * PeriodicSystem.h * * Created on: Apr 24, 2013 * Author: manicqin */ #ifndef PERIODICSYSTEM_H_ #define PERIODICSYSTEM_H_ #include "SystemBase.h" namespace Systems { class PeriodicSystem : public EnumedSystem <PeriodicSystem> { public: PeriodicSystem(); virtual ~PeriodicSystem(); //virtual void operator()(std::shared_ptr<Messages> const& incomingMsg, ChannelHandler outChannel); DEFINE_CASE_PROTO(periodicalFunction); DEFINE_CASE_PROTO(startSystem){return MsgSwitch::caseOperationRet();} DEFINE_CASE_PROTO(createComponent){return MsgSwitch::caseOperationRet();} DEFINE_CASE_PROTO(initSystem){return MsgSwitch::caseOperationRet(); } DEFINE_CASE_PROTO(shutDownSystem){return MsgSwitch::caseOperationRet(); } }; } /* namespace Systems */ #endif /* PERIODICSYSTEM_H_ */
337a1fc35893f124a38ee9a80fe9808560a7514d
7cc40c63024a70dbfe5024d4461140491a10398c
/Q7.h
0e9199dd998d604252907861bf757e76869f602f
[]
no_license
Two-To-Two/offer
8a3d402a220ed6e453244e1d3f2cdfaebb875632
c451efd365a0d9bd7c3134724371dfeca1509ecc
refs/heads/master
2021-01-24T08:10:54.992034
2018-03-10T10:07:17
2018-03-10T10:07:17
122,970,052
0
0
null
null
null
null
UTF-8
C++
false
false
1,996
h
#include <iostream> #include <stack> template <typename T> class CQueue { public: CQueue() = default; ~CQueue(); void exchangeStack(); void appendTail(const T &node); T deleteHead(); private: std::stack<T> stack1; std::stack<T> stack2; }; /* * 1. always at least one stack empty * 2. for appendTail(), append to stack1. * if stack2 not empty * exchange; append; * else append * 3. for deleteHead(), pop on stack2 */ /* * IMPROVED: * exchangeStack is not necessary if we only need appendTail() and deleteHead(). * for appendTail, we simply append to stack1, which is always in reverse order. * for deleteHead, because stack2's top is always the "oldest" element, * when stack2 is not empty, we simply pop; * when stack2 is empty, it means elements previously moved to stack2 have all been popped, * we move elements in stack1 to stack2, if stack1 is not empty. */ template <typename T> void CQueue<T>::exchangeStack() { if (stack1.size() == stack2.size() == 0) return; if (stack1.size() == 0) { // stack1 -> stack2 for (int i = 0; i < stack1.size(); i++) { T& top = stack1.top(); /// stack1.pop(); stack2.push(top); } } else { // stack2 -> stack1 for (int i = 0; i < stack2.size(); i++) { T top = stack2.top(); stack2.pop(); stack1.push(top); } } /// need to check if only one empty? return; } template <typename T> void CQueue<T>::appendTail(const T &node) { if (stack1.size() == stack2.size() ==0) { stack1.push(node); return; } if (stack2.size() != 0) { exchangeStack(); } stack1.push(node); return; } template <typename T> T CQueue<T>::deleteHead() { if (stack1.size() == stack2.size() ==0) { return; } if (stack1.size() != 0) { exchangeStack(); } stack2.pop(); } /// TODO: Q7 ??? o(n) + o(n)
999ed8487cb028b7b5558b3544b90e28411c4e62
2536321de7f41da93f8e6efc6a404da1a236aaa0
/MarioBros3/FireBall.h
a3af7c8ff9b2760f1d96f53e7473c2a22c0cbd6e
[]
no_license
thichuong/GameMariobros3
f00a0af50deb6d3088e618e1dad918ad4e01d33b
173112f619c432b3fb167d73a6ca3071b7302ce9
refs/heads/main
2023-02-20T15:22:23.832202
2021-01-23T06:49:29
2021-01-23T06:49:29
304,309,649
1
0
null
null
null
null
UTF-8
C++
false
false
512
h
#pragma once #include "GameObject.h" #define Bullet_BBOX_WIDTH 24 #define Bullet_BBOX_HEIGHT 24 #define FIRE_SPEED 0.2f #define ANI "ANI" class FireBall : public CGameObject { bool active; public: bool getactive() { return active; } FireBall(float x, float y, int ax, float vy); virtual void Render(); virtual void GetBoundingBox(float& l, float& t, float& r, float& b); virtual void SetAnimationSet(CAnimations* ani_set); virtual void Update(DWORD dt, vector<LPGAMEOBJECT>* coObjects = NULL); };
9fc2388714ef6e7ff2f91419dccf2a95c86e6921
b4b15ec8d2f7c394d61e31fbc7343f02d1a46c02
/lineMatch.cpp
0b45278bac86366a3077c4baddd1e47fecdfb07e
[]
no_license
darkin-blade/opencv_cpp
a8904790bd51318e26d6d6a71e38503a00cf9697
542f90ce9741381f8227e0ff67c0f97248ced558
refs/heads/master
2023-06-05T10:35:17.182959
2021-06-29T08:51:09
2021-06-29T08:51:09
216,942,650
0
0
null
null
null
null
UTF-8
C++
false
false
2,573
cpp
/** * 线段匹配, 用不了 */ #include <opencv2/core/mat.hpp> #include <opencv2/highgui.hpp> #include <opencv2/imgcodecs.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/line_descriptor/descriptor.hpp> #include <opencv2/ximgproc/fast_line_detector.hpp> #include <iostream> #include <vector> using namespace std; using namespace cv; using namespace cv::detail; using namespace cv::line_descriptor; using namespace cv::ximgproc; #define LOG(format, ...) \ printf("\033[1;32m[%s, %d]" format "\33[0m\n", __func__, __LINE__, ## __VA_ARGS__) const int MATCHES_DIST_THRESHOLD = 25; void show_img(const char *window_name, Mat img) { namedWindow(window_name, WINDOW_NORMAL); resizeWindow(window_name, 1280, 720); imshow(window_name, img); waitKey(0); // 保存图片 char img_name[128]; int savable = 0; for (int i = 0; i < 100; i ++) { sprintf(img_name, "./result_%d.png", i); if (fopen(img_name, "r") == NULL) { savable = 1; break; } } if (savable) { imwrite(img_name, img); } else { LOG("can't save img"); } } int main() { Mat img1 = imread("../1.jpg"); Mat img2 = imread("../2.jpg"); Mat mask1 = Mat::ones(img1.size(), CV_8UC1); Mat mask2 = Mat::ones(img2.size(), CV_8UC1); Ptr<BinaryDescriptor> bd = BinaryDescriptor::createBinaryDescriptor(); /***********************************/ Ptr<FastLineDetector> fld = createFastLineDetector(10, 1.41421356, 50.0, 50.0, 3, false); vector<KeyLine> keylines1, keylines2; Mat descriptor1, descriptor2; fld->detect(img1, keylines1); fld->detect(img2, keylines2); bd->compute(img1, keylines1, descriptor1); bd->compute(img2, keylines2, descriptor2); vector<KeyLine> octave1, octave2; Mat left, right; for (int i = 0; i < keylines1.size(); i ++) { if (keylines1[i].octave == 0) { octave1.emplace_back(keylines1[i]); left.push_back(descriptor1.row(i)); } } for (int i = 0; i < keylines2.size(); i ++) { if (keylines2[i].octave == 0) { octave2.emplace_back(keylines2[i]); right.push_back(descriptor2.row(i)); } } Ptr<BinaryDescriptorMatcher> bdm = BinaryDescriptorMatcher::createBinaryDescriptorMatcher(); vector<DMatch> matches; bdm->match(left, right, matches); vector<DMatch> good_matches; for (int i = 0; i < matches.size(); i ++) { if (matches[i].distance < MATCHES_DIST_THRESHOLD) { good_matches.emplace_back(matches[i]); } } Mat result; drawLineMatches(img1, octave1, img2, octave2, good_matches, result); show_img("result", result); }
e82e7a1d46cd7a464635d8156d8fff24714bc5f7
ab1c643f224197ca8c44ebd562953f0984df321e
/pchealth/sysinfo/control/whqlobj.h
5b88ac792939b34d96f21eef1cdb6702225ac35b
[]
no_license
KernelPanic-OpenSource/Win2K3_NT_admin
e162e0452fb2067f0675745f2273d5c569798709
d36e522f16bd866384bec440517f954a1a5c4a4d
refs/heads/master
2023-04-12T13:25:45.807158
2021-04-13T16:33:59
2021-04-13T16:33:59
357,613,696
0
1
null
null
null
null
UTF-8
C++
false
false
10,148
h
// WhqlObj.h : Declaration of the CWhqlObj #ifndef __WHQLOBJ_H_ #define __WHQLOBJ_H_ #include "resource.h" // main symbols #include "WbemProv.h" #include <softpub.h> // Macros and pre-defined values #define cbX(X) sizeof(X) #define cA(a) (cbX(a)/cbX(a[0])) #define MALLOC(x) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (x)) #define FREE(x) if (x) { HeapFree(GetProcessHeap(), 0, (x)); x = NULL; } #define EXIST(x) (GetFileAttributes(x) != 0xFFFFFFFF) #define MAX_INT 0x7FFFFFFF #define HASH_SIZE 100 #define NUM_PAGES 2 typedef struct tagFileNode { LPTSTR lpFileName; LPTSTR lpDirName; LPTSTR lpVersion; LPTSTR lpCatalog; LPTSTR lpSignedBy; LPTSTR lpTypeName; INT iIcon; BOOL bSigned; BOOL bScanned; BOOL bValidateAgainstAnyOs; DWORD LastError; SYSTEMTIME LastModified; struct tagFileNode *next; } FILENODE, *LPFILENODE; ///////////////////////////////////////////////////////////////////////////// // CWhqlObj class ATL_NO_VTABLE CWhqlObj : public CComObjectRootEx<CComMultiThreadModel>, public CComCoClass<CWhqlObj, &CLSID_WhqlObj>, public IDispatchImpl<IWhqlObj, &IID_IWhqlObj, &LIBID_MSINFO32Lib>, public IWbemProviderInit, public IWbemServices { public: CWhqlObj() { } //DECLARE_REGISTRY_RESOURCEID(IDR_WHQLPROV) DECLARE_REGISTRY_RESOURCEID(IDR_WHQLOBJ) DECLARE_PROTECT_FINAL_CONSTRUCT() BEGIN_COM_MAP(CWhqlObj) COM_INTERFACE_ENTRY(IWhqlObj) COM_INTERFACE_ENTRY(IDispatch) COM_INTERFACE_ENTRY(IWbemProviderInit) COM_INTERFACE_ENTRY(IWbemServices) END_COM_MAP() // IWhqlObj public: //IWbemProviderInit STDMETHOD(Initialize)( /* [in] */ LPWSTR pszUser, /* [in] */ LONG lFlags, /* [in] */ LPWSTR pszNamespace, /* [in] */ LPWSTR pszLocale, /* [in] */ IWbemServices *pNamespace, /* [in] */ IWbemContext *pCtx, /* [in] */ IWbemProviderInitSink *pInitSink); STDMETHOD(GetByPath)(BSTR Path, IWbemClassObject FAR* FAR* pObj, IWbemContext *pCtx) {return WBEM_E_NOT_SUPPORTED;}; //IWbemServices HRESULT STDMETHODCALLTYPE OpenNamespace( /* [in] */ const BSTR strNamespace, /* [in] */ long lFlags, /* [in] */ IWbemContext __RPC_FAR *pCtx, /* [unique][in][out] */ IWbemServices __RPC_FAR *__RPC_FAR *ppWorkingNamespace, /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppResult){return WBEM_E_NOT_SUPPORTED;}; HRESULT STDMETHODCALLTYPE CancelAsyncCall( /* [in] */ IWbemObjectSink __RPC_FAR *pSink){return WBEM_E_NOT_SUPPORTED;}; HRESULT STDMETHODCALLTYPE QueryObjectSink( /* [in] */ long lFlags, /* [out] */ IWbemObjectSink __RPC_FAR *__RPC_FAR *ppResponseHandler){return WBEM_E_NOT_SUPPORTED;}; HRESULT STDMETHODCALLTYPE GetObject( /* [in] */ const BSTR strObjectPath, /* [in] */ long lFlags, /* [in] */ IWbemContext __RPC_FAR *pCtx, /* [unique][in][out] */ IWbemClassObject __RPC_FAR *__RPC_FAR *ppObject, /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult){return WBEM_E_NOT_SUPPORTED;}; HRESULT STDMETHODCALLTYPE GetObjectAsync( /* [in] */ const BSTR strObjectPath, /* [in] */ long lFlags, /* [in] */ IWbemContext __RPC_FAR *pCtx, /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler){return WBEM_E_NOT_SUPPORTED;}; HRESULT STDMETHODCALLTYPE PutClass( /* [in] */ IWbemClassObject __RPC_FAR *pObject, /* [in] */ long lFlags, /* [in] */ IWbemContext __RPC_FAR *pCtx, /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult){return WBEM_E_NOT_SUPPORTED;}; HRESULT STDMETHODCALLTYPE PutClassAsync( /* [in] */ IWbemClassObject __RPC_FAR *pObject, /* [in] */ long lFlags, /* [in] */ IWbemContext __RPC_FAR *pCtx, /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler){return WBEM_E_NOT_SUPPORTED;}; HRESULT STDMETHODCALLTYPE DeleteClass( /* [in] */ const BSTR strClass, /* [in] */ long lFlags, /* [in] */ IWbemContext __RPC_FAR *pCtx, /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult){return WBEM_E_NOT_SUPPORTED;}; HRESULT STDMETHODCALLTYPE DeleteClassAsync( /* [in] */ const BSTR strClass, /* [in] */ long lFlags, /* [in] */ IWbemContext __RPC_FAR *pCtx, /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler){return WBEM_E_NOT_SUPPORTED;}; HRESULT STDMETHODCALLTYPE CreateClassEnum( /* [in] */ const BSTR strSuperclass, /* [in] */ long lFlags, /* [in] */ IWbemContext __RPC_FAR *pCtx, /* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum){return WBEM_E_NOT_SUPPORTED;}; HRESULT STDMETHODCALLTYPE CreateClassEnumAsync( /* [in] */ const BSTR strSuperclass, /* [in] */ long lFlags, /* [in] */ IWbemContext __RPC_FAR *pCtx, /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler){return WBEM_E_NOT_SUPPORTED;}; HRESULT STDMETHODCALLTYPE PutInstance( /* [in] */ IWbemClassObject __RPC_FAR *pInst, /* [in] */ long lFlags, /* [in] */ IWbemContext __RPC_FAR *pCtx, /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult){return WBEM_E_NOT_SUPPORTED;}; HRESULT STDMETHODCALLTYPE PutInstanceAsync( /* [in] */ IWbemClassObject __RPC_FAR *pInst, /* [in] */ long lFlags, /* [in] */ IWbemContext __RPC_FAR *pCtx, /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler){return WBEM_E_NOT_SUPPORTED;}; HRESULT STDMETHODCALLTYPE DeleteInstance( /* [in] */ const BSTR strObjectPath, /* [in] */ long lFlags, /* [in] */ IWbemContext __RPC_FAR *pCtx, /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult){return WBEM_E_NOT_SUPPORTED;}; HRESULT STDMETHODCALLTYPE DeleteInstanceAsync( /* [in] */ const BSTR strObjectPath, /* [in] */ long lFlags, /* [in] */ IWbemContext __RPC_FAR *pCtx, /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler){return WBEM_E_NOT_SUPPORTED;}; HRESULT STDMETHODCALLTYPE CreateInstanceEnum( /* [in] */ const BSTR strClass, /* [in] */ long lFlags, /* [in] */ IWbemContext __RPC_FAR *pCtx, /* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum){return WBEM_E_NOT_SUPPORTED;}; HRESULT STDMETHODCALLTYPE CreateInstanceEnumAsync( /* [in] */ const BSTR strClass, /* [in] */ long lFlags, /* [in] */ IWbemContext __RPC_FAR *pCtx, /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler); HRESULT STDMETHODCALLTYPE ExecQuery( /* [in] */ const BSTR strQueryLanguage, /* [in] */ const BSTR strQuery, /* [in] */ long lFlags, /* [in] */ IWbemContext __RPC_FAR *pCtx, /* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum){return WBEM_E_NOT_SUPPORTED;}; HRESULT STDMETHODCALLTYPE ExecQueryAsync( /* [in] */ const BSTR strQueryLanguage, /* [in] */ const BSTR strQuery, /* [in] */ long lFlags, /* [in] */ IWbemContext __RPC_FAR *pCtx, /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler){return WBEM_E_NOT_SUPPORTED;}; HRESULT STDMETHODCALLTYPE ExecNotificationQuery( /* [in] */ const BSTR strQueryLanguage, /* [in] */ const BSTR strQuery, /* [in] */ long lFlags, /* [in] */ IWbemContext __RPC_FAR *pCtx, /* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum){return WBEM_E_NOT_SUPPORTED;}; HRESULT STDMETHODCALLTYPE ExecNotificationQueryAsync( /* [in] */ const BSTR strQueryLanguage, /* [in] */ const BSTR strQuery, /* [in] */ long lFlags, /* [in] */ IWbemContext __RPC_FAR *pCtx, /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler){return WBEM_E_NOT_SUPPORTED;}; HRESULT STDMETHODCALLTYPE ExecMethod( /* [in] */ const BSTR strObjectPath, /* [in] */ const BSTR strMethodName, /* [in] */ long lFlags, /* [in] */ IWbemContext __RPC_FAR *pCtx, /* [in] */ IWbemClassObject __RPC_FAR *pInParams, /* [unique][in][out] */ IWbemClassObject __RPC_FAR *__RPC_FAR *ppOutParams, /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult){return WBEM_E_NOT_SUPPORTED;}; HRESULT STDMETHODCALLTYPE ExecMethodAsync( /* [in] */ const BSTR strObjectPath, /* [in] */ const BSTR strMethodName, /* [in] */ long lFlags, /* [in] */ IWbemContext __RPC_FAR *pCtx, /* [in] */ IWbemClassObject __RPC_FAR *pInParams, /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler){return WBEM_E_NOT_SUPPORTED;}; private: IWbemServices* m_pNamespace; //IWbemClassObject* m_pClass; //CString m_csPathStr ; //CPtrArray m_ptrArr; SCODE PutPropertyValue(IWbemClassObject*, LPCTSTR, LPCTSTR); SCODE PutPropertyDTMFValue(IWbemClassObject* pInstance, LPCTSTR szName, LPCTSTR szValue);//v-stlowe int WalkTree(void); int CreateList(CPtrArray&, IWbemClassObject *&, IWbemContext *, Classes_Provided); SCODE GetServerAndNamespace(IWbemContext*, CString&); void BuildPrinterFileList(CPtrArray&, IWbemClassObject *&, IWbemContext *, Classes_Provided); }; #endif //__WHQLOBJ_H_
c9657026c30a757015e97ca2874a62a0fad74188
c70e26f24f4f1fafdeed78755c91afef3e15a0aa
/GucchiFrameWork/GucchiLibrary/MapTip/AStar.cpp
07d70e3c7cd734fce97468cc70951cf4e9414ebe
[]
no_license
yutaHiguchi0204/GucchiFrameWork
a73625e31bfc98c4878c2fef8c81cc97c3e869e2
c8a472153c98f43d01886b4638aa2331e9edeba3
refs/heads/master
2021-09-12T17:00:44.229399
2018-03-15T02:27:48
2018-03-15T02:27:48
105,857,321
4
0
null
2018-03-15T02:27:49
2017-10-05T06:39:03
C++
SHIFT_JIS
C++
false
false
11,998
cpp
/* ===================================================================== //! @param 「AStar」ソース //! @create 樋口 裕太 //! @date 17/12/28 ===================================================================== */ // ヘッダファイルのインクルード #include "AStar.h" #include <cassert> #include <d3d11_1.h> #include "../3D/ObjectRenderer.h" #include "../System/DebugSystem.h" // 名前空間 using namespace DirectX; using namespace GucchiLibrary; using namespace std; // 静的メンバの定義 const int AStar::NUM_ADJOIN; // 隣接タイル数 /* // 123 // 8 4 // 765 */ Node::Point AStar::offset_[NUM_ADJOIN] = { // オフセットリスト { -1, -1 }, { 0, -1 }, { 1, -1 }, { 1, 0 }, { 1, 1 }, { 0, 1 }, { -1, 1 }, { -1, 0 } }; vector<vector<Node*>> AStar::mapData_; // マップデータ list<Node*> AStar::openList_; // オープンリスト vector<Node*> AStar::shortestRoute_; // 最短経路 Node::Point AStar::start_; // 経路探索開始地点 Node::Point AStar::end_; // 経路探索終了地点 AStar::Vector3 AStar::mapPos_; // マップ自体の座標 vector<unique_ptr<Object>> AStar::routePlane_; // 最短経路ナビゲーター // メンバ関数の定義 // コンストラクタ Node::Node() : cost_(0) , terrainCost_(0) , heuristic_(0) , parentNode_(nullptr) , pos_(Point{ 0, 0 }) , attribute_(ATTRIBUTE::NONE) , state_(STATE::FREE) { } /*============================================================== // @brief 初期化処理 // @param マップデータ(vector<vector<int>>) // @return なし ===============================================================*/ void AStar::Initialize(vector<vector<int>> map) { start_ = { -1, -1 }; end_ = { -1, -1 }; // 各ノードの生成 for (auto& mapRow : map) { mapData_.emplace_back(); for (auto& mapTip : mapRow) { // 新ノード Node* node = new Node; int row = mapData_.size() - 1; mapData_[row].emplace_back(node); int column = mapData_[row].size() - 1; // 位置の保存 mapData_[row][column]->SetPos(Node::Point{ column, row }); // 属性の保存 mapData_[row][column]->SetAttribute(static_cast<Node::ATTRIBUTE>(mapTip)); // スタートとゴールの設定 if (mapData_[row][column]->GetAttribute() == Node::ATTRIBUTE::START) { start_ = Node::Point{ column, row }; } else if (mapData_[row][column]->GetAttribute() == Node::ATTRIBUTE::GOAL) { end_ = Node::Point{ column, row }; } } } // コストとヒューリスティックの計算 for (int i = 0; i < static_cast<int>(mapData_.size()); i++) { for (int j = 0; j < static_cast<int>(mapData_[i].size()); j++) { // 地形コストの設定 int terrainCost = SetTerrainCost(j, i); mapData_[i][j]->SetTerrainCost(terrainCost); // ヒューリスティックの計算 int heuristic = SetHeuristic(j, i); mapData_[i][j]->SetHeuristic(heuristic); } } // スタートもしくはゴールが設定されていなかったらエラー if (start_.posX == -1 || start_.posY == -1 || end_.posX == -1 || end_.posY == -1) { DebugSystem::DebugLog(L"Map data error.", true); assert(false); } // マップ自体の座標を0に設定 mapPos_ = Vector3::Zero; } /*============================================================== // @brief 終了処理 // @param なし // @return なし ===============================================================*/ void AStar::Finalize() { for (auto& mapRow : mapData_) { for (auto& mapTip : mapRow) { delete mapTip; } } } /*============================================================== // @brief 経路探索 // @param なし // @return 経路探索が完了したデータ(vector<vector<Node*>>) ===============================================================*/ vector<vector<Node*>> AStar::Search() { // ゴール地点のノードをオープンし、オープンリストに追加する mapData_[end_.posY][end_.posX]->SetState(Node::STATE::OPEN); openList_.emplace_back(mapData_[end_.posY][end_.posX]); // 現在のノード Node* checkNode = mapData_[end_.posY][end_.posX]; // ゴールからスタートまでのA*経路探索 // オープンリストが空でない while (!openList_.empty()) { // オープンリストのうち、スコアが最小のノードを取得 checkNode = CheckMinScoreNode(); // 経路が完成したかどうか if (checkNode->GetAttribute() == Node::ATTRIBUTE::START) { checkNode->SetState(Node::STATE::CLOSED); return mapData_; } else { // 隣接タイルをチェック CheckAdjoin(checkNode); } } // ここにくることはない return mapData_; } /*============================================================== // @brief 最短経路リストを取得 // @param なし // @return 最短経路リスト(vector<Node*>) ===============================================================*/ vector<Node*> AStar::GetShortestRoute() { // 経路探索が終わっていなければエラー if (mapData_[start_.posY][start_.posX]->GetState() != Node::STATE::CLOSED) { DebugSystem::DebugLog(L"Don't finish search.", true); assert(false); } // 最短経路をリストに追加 shortestRoute_.emplace_back(mapData_[start_.posY][start_.posX]); // 親ノードをたどり、ゴールまでリストに追加する Node* parent = mapData_[start_.posY][start_.posX]->GetParentNode(); while (parent != nullptr) { shortestRoute_.emplace_back(parent); parent = parent->GetParentNode(); } return shortestRoute_; } /*============================================================== // @brief 探索結果を四角形で表示 // @param なし // @return なし ===============================================================*/ void AStar::DrawResult() { // 目標地点がクローズドリストに含まれてなかったら探索が完了していないのでなにもしない if (mapData_[start_.posY][start_.posX]->GetState() == Node::STATE::CLOSED) { ObjectFactory& factory = ObjectFactory::GetInstance(); ObjectRenderer& renderer = ObjectRenderer::GetInstance(); // 目標地点にナビゲーター平面を設置 routePlane_.emplace_back(factory.CreateObjectFromFile(L"routePlane")); routePlane_.back()->SetTranslate(Vector3(start_.posX + mapPos_.x, mapPos_.y + 1.f, start_.posY + mapPos_.z)); renderer.RegisterObject(routePlane_.back().get()); // 親ノードをたどり、すべてにナビゲーター平面を設置 Node* parent = mapData_[start_.posY][start_.posX]->GetParentNode(); while (parent != nullptr) { routePlane_.emplace_back(factory.CreateObjectFromFile(L"routePlane")); routePlane_.back()->SetTranslate(Vector3(parent->GetPosX() + mapPos_.x, mapPos_.y + 1.f, parent->GetPosY() + mapPos_.z)); renderer.RegisterObject(routePlane_.back().get()); // 親ノードをたどる parent = parent->GetParentNode(); } } } /*============================================================== // @brief 最短経路ナビゲーターのアクティブ状態を変更 // @param アクティブ状態(bool) // @return なし ===============================================================*/ void AStar::SetNavigatorActive(bool active) { for (auto& routePlane : routePlane_) { routePlane->SetActive(active); } } /*============================================================== // @brief 隣接するタイル8つを調べる // @param チェック中のノード(Node*) // @return なし ===============================================================*/ void AStar::CheckAdjoin(Node* node) { // 現在のノードをクローズドリストに追加 node->SetState(Node::STATE::CLOSED); // 現在のノードをオープンリストから削除 for (auto itr = openList_.cbegin(); itr != openList_.cend();) { if (*itr == node) { openList_.erase(itr); break; } ++itr; } // 隣接する8つのノードを調べる for (auto& i : offset_) { // チェックする隣接タイル int x = node->GetPosX() + i.posX; int y = node->GetPosY() + i.posY; // マップ内かどうか bool insideMap = (x >= 0 && y >= 0) && (y < static_cast<int>(mapData_.size())) && (x < static_cast<int>(mapData_[y].size())); if (insideMap) { // すでにオープンリスト・クローズドリストに含まれているとき、 // または障害物の場合は無視する if (mapData_[y][x]->GetState() != Node::STATE::OPEN && mapData_[y][x]->GetState() != Node::STATE::CLOSED && mapData_[y][x]->GetAttribute() != Node::ATTRIBUTE::WALL) { // 親ノードを設定 mapData_[y][x]->SetParentNode(node); // コスト計算 int cost = GetCost(mapData_[y][x]); mapData_[y][x]->SetCost(cost); // オープンリストに追加 mapData_[y][x]->SetState(Node::STATE::OPEN); openList_.emplace_back(mapData_[y][x]); } } } } /*============================================================== // @brief 地形コストの設定 // @param 自身の位置x(int)、自身の位置y(int) // @return 地形コスト(int) ===============================================================*/ int AStar::SetTerrainCost(int x, int y) { switch (mapData_[y][x]->GetAttribute()) { case Node::ATTRIBUTE::NONE: return 1; break; // 通常の道 case Node::ATTRIBUTE::SWAMP: return 3; break; // 沼 default: return 0; break; } } /*============================================================== // @brief ヒューリスティックの計算 // @param 自身の位置x(int)、自身の位置y(int) // @return ヒューリスティック値(int) ===============================================================*/ int AStar::SetHeuristic(int x, int y) { // X, Yの距離を求める int distanceX = abs(x - start_.posX) * 10; int distanceY = abs(y - start_.posY) * 10; // 距離が大きい方を返す return distanceX > distanceY ? distanceX : distanceY; } /*============================================================== // @brief オープンリストの中でスコアが最小のノードをチェック // @param なし // @return オープンリストの中でスコアが最小のノード(Node*) ===============================================================*/ Node* AStar::CheckMinScoreNode() { // オープンリストにノードがなかったらnullを返す if (openList_.empty()) { return nullptr; } Node* checkNode = nullptr; // 現在のノードにオープンリストのうちスコアが最小のノードを設定 int scoreMin = 999; for (auto& node : openList_) { // スコア計算 int score = GetScore(node); // スコアが最小のノードを設定 if (score <= scoreMin) { scoreMin = score; checkNode = node; } } return checkNode; } /*============================================================== // @brief コストの計算 // @param コストを取得したいノード(Node*) // @return コスト(int) ===============================================================*/ int AStar::GetCost(Node* node) { int cost = 0; // 親ノードがあればさらに辿る if (node->GetParentNode()) { // 上下左右 if (abs(node->GetParentNode()->GetPosX() - node->GetPosX()) + abs(node->GetParentNode()->GetPosY() - node->GetPosY()) == 1) { cost += GetCost(node->GetParentNode()) + node->GetTerrainCost() * 10; } // 斜め else { cost += GetCost(node->GetParentNode()) + node->GetTerrainCost() * 15; } } return cost; } /*============================================================== // @brief スコアの計算 // @param スコアを取得したいノード(Node*) // @return スコア(int) ===============================================================*/ int AStar::GetScore(Node* node) { return node->GetCost() + node->GetHeuristic(); }
d85f7ac8193e773de611198fa51a3e7ef355cc46
9b7f8b025d3932939b333ff62f88159f9ff0b490
/leetNgeeks/450/heap/k_largest.cpp
deb5da572579a5f73fbddbe85f85e3ab1fd5edea
[]
no_license
afAditya/Competitive-Coding
b43b64e2ab12a3839a9822e1ec4d9b38620ee251
378fe8b8a95cb1419953052857291cc3afbe3fe4
refs/heads/master
2023-08-21T19:47:31.385873
2021-10-19T05:50:54
2021-10-19T05:50:54
418,787,747
0
0
null
2021-10-19T05:47:47
2021-10-19T05:47:46
null
UTF-8
C++
false
false
833
cpp
/* */ #include<bits/stdc++.h> using namespace std; void heapify(vector<int>&a,int n,int ind) { //int n = a.size(); if(ind >= n) { return; } int left = 2*ind + 1; int right = 2*ind + 2; int largest = ind; if(left < n && a[left] > a[largest]) { largest = left; } if(right < n && a[right] > a[largest]) { largest = right; } if(largest != ind) { swap(a[largest], a[ind]); heapify(a,n,ind); } } void k_largest(vector<int> &a,int k) { int n = a.size(); // make max-heap for(int i = n/2-1; i >= 0; i--) { heapify(a,n,i); } // now extract larger element every time for(int i = n-1; i > 0; i--) { swap(a[i],a[0]); heapify(a,i,0); } for(auto x:a) { cout<<x<<" "; } } int main() { int n; cin>>n; vector<int>a(n); for(auto &x:a) { cin>>x; } int k; cin>>k; k_largest(a,k); }
f7053062dc05e44e2741012a727ea4d7708fd6fe
52389fec20497942fd8928f008eadba65552a6d9
/dev/so_5/rt/h/adhoc_agent_wrapper.hpp
c78dfdab27bf1cb145b3e390847f7181c0bf811a
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
DronMDF/SObjectizer
bb08fa127bd5df50db47e3a4d16aa882b6cbb031
9e0002edfba740c2c608669154f2f5ce23005a08
refs/heads/master
2021-01-17T23:34:33.694854
2015-04-07T15:52:28
2015-04-07T15:52:28
33,542,909
0
0
null
2015-04-07T12:52:05
2015-04-07T12:52:04
null
UTF-8
C++
false
false
4,235
hpp
/* SObjectizer 5. */ /*! * \file * \since v.5.3.0 * \brief Special agent class which would be used as wrapper for ad-hoc agents. */ #pragma once #include <so_5/rt/h/agent.hpp> #include <functional> #if defined( SO_5_MSVC ) #pragma warning(push) #pragma warning(disable: 4251) #endif namespace so_5 { namespace rt { /*! * \since v.5.3.0 * \brief Special agent class which would be used as wrapper for ad-hoc agents. * * \note The presence and usefulness of this class is based on the fact * that it is not necessary to subscribe agent exactly in so_define_agent() * method. The current implementation of agents and SObjectizer Run-Time * allows to subscribe and unsubscribe agent in any place and at any time. */ class SO_5_TYPE adhoc_agent_wrapper_t : public agent_t { public : adhoc_agent_wrapper_t( environment_t & env ); virtual ~adhoc_agent_wrapper_t(); //! Set function for reaction on work start. void set_on_evt_start( std::function< void() > handler ); //! Set function for reaction on work finish. void set_on_evt_finish( std::function< void() > handler ); //! Set reaction for non-handled exceptions. void set_exception_reaction( exception_reaction_t reaction ); virtual void so_evt_start(); virtual void so_evt_finish(); virtual exception_reaction_t so_exception_reaction() const; private : std::function< void() > m_on_start; std::function< void() > m_on_finish; exception_reaction_t m_exception_reaction; }; // // adhoc_agent_definition_proxy_t // /*! * \since v.5.3.0 * \brief A proxy for process of ad-hoc agent definition. */ class adhoc_agent_definition_proxy_t { public : adhoc_agent_definition_proxy_t( adhoc_agent_wrapper_t * agent ) : m_agent( agent ) {} /*! * Subscription of event- or service-handler to message. */ template< class LAMBDA > inline adhoc_agent_definition_proxy_t & event( const mbox_t & mbox, LAMBDA lambda, thread_safety_t thread_safety = not_thread_safe ) { m_agent->so_subscribe( mbox ).event( lambda, thread_safety ); return *this; } /*! * Subscription of event- or service-handler to signal. */ template< class MESSAGE, class LAMBDA > inline adhoc_agent_definition_proxy_t & event( const mbox_t & mbox, signal_indicator_t< MESSAGE > (*indicator)(), LAMBDA lambda, thread_safety_t thread_safety = not_thread_safe ) { m_agent->so_subscribe( mbox ) .event( indicator, lambda, thread_safety ); return *this; } /*! * \since v.5.5.1 * \brief Subscription of event- or service-handler to signal. * * \par Usage sample: * \code so_5::rt::agent_coop_unique_ptr_t coop = env.create_coop(...); coop->define_agent() .event< msg_my_signal >( mbox, [=] { ... } ); * \endcode */ template< class SIGNAL, typename... ARGS > inline adhoc_agent_definition_proxy_t & event( const mbox_t & mbox, ARGS&&... args ) { return this->event( mbox, signal< SIGNAL >, std::forward< ARGS >(args)... ); } /*! * Define reaction to work start. */ inline adhoc_agent_definition_proxy_t & on_start( std::function< void() > handler ) { m_agent->set_on_evt_start( handler ); return *this; } /*! * Define reaction to work finish. */ inline adhoc_agent_definition_proxy_t & on_finish( std::function< void() > handler ) { m_agent->set_on_evt_finish( handler ); return *this; } /*! * Define reaction to non-handled exception. */ inline adhoc_agent_definition_proxy_t & exception_reaction( exception_reaction_t reaction ) { m_agent->set_exception_reaction( reaction ); return *this; } /*! * \since v.5.5.3 * \brief Access to agent's direct mbox. * * \par Usage sample: \code auto coop = env.create_coop(); auto adhoc_agent = coop.define_agent(); adhoc_agent.event( adhoc_agent.direct_mbox(), []{ ... } ); \endcode */ inline const mbox_t & direct_mbox() const { return m_agent->so_direct_mbox(); } private : adhoc_agent_wrapper_t * m_agent; }; } /* namespace rt */ } /* namespace so_5 */ #if defined( SO_5_MSVC ) #pragma warning(pop) #endif
[ "eao197@1d1731ae-3f85-447d-88f8-c72b288064d1" ]
eao197@1d1731ae-3f85-447d-88f8-c72b288064d1
b37436a73ac4da475cb2b688604f05ef98222e0d
681c84ad83ce6ad403a8f905f65f4bb43ef2bb87
/hotheater1/constant/fluid/polyMesh/faceRegionAddressing
b3fb15028f6fe78dea2a34f227b6be92e38cd451
[]
no_license
zachery-style/prolate
fd8c1b8edb5457508c50b431fc34c8bcfead1cab
b344df4ae9f22d16555b43b07cc66d0cd2fce3fd
refs/heads/main
2023-04-08T22:07:41.537811
2021-04-14T02:28:52
2021-04-14T02:28:52
346,477,510
1
0
null
null
null
null
UTF-8
C++
false
false
258,945
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2012 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class labelList; location "constant/fluid/polyMesh"; object faceRegionAddressing; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 44821 ( 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160 10161 10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10182 10183 10184 10185 10186 10187 10188 10189 10190 10191 10192 10193 10194 10195 10196 10197 10198 10199 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 10295 10296 10297 10298 10299 10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 10316 10317 10318 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 10393 10394 10395 10396 10397 10398 10399 10400 10401 10402 10403 10404 10405 10406 10407 10408 10409 10410 10411 10412 10413 10414 10415 10416 10417 10418 10419 10420 10421 10422 10423 10424 10425 10426 10427 10428 10429 10430 10431 10432 10433 10434 10435 10436 10437 10438 10439 10440 10441 10442 10443 10444 10445 10446 10447 10448 10449 10450 10451 10452 10453 10454 10455 10456 10457 10458 10459 10460 10461 10462 10463 10464 10465 10466 10467 10468 10469 10470 10471 10472 10473 10474 10475 10476 10477 10478 10479 10480 10481 10482 10483 10484 10485 10486 10487 10488 10489 10490 10491 10492 10493 10494 10495 10496 10497 10498 10499 10500 10501 10502 10503 10504 10505 10506 10507 10508 10509 10510 10511 10512 10513 10514 10515 10516 10517 10518 10519 10520 10521 10522 10523 10524 10525 10526 10527 10528 10529 10530 10531 10532 10533 10534 10535 10536 10537 10538 10539 10540 10541 10542 10543 10544 10545 10546 10547 10548 10549 10550 10551 10552 10553 10554 10555 10556 10557 10558 10559 10560 10561 10562 10563 10564 10565 10566 10567 10568 10569 10570 10571 10572 10573 10574 10575 10576 10577 10578 10579 10580 10581 10582 10583 10584 10585 10586 10587 10588 10589 10590 10591 10592 10593 10594 10595 10596 10597 10598 10599 10600 10601 10602 10603 10604 10605 10606 10607 10608 10609 10610 10611 10612 10613 10614 10615 10616 10617 10618 10619 10620 10621 10622 10623 10624 10625 10626 10627 10628 10629 10630 10631 10632 10633 10634 10635 10636 10637 10638 10639 10640 10641 10642 10643 10644 10645 10646 10647 10648 10649 10650 10651 10652 10653 10654 10655 10656 10657 10658 10659 10660 10661 10662 10663 10664 10665 10666 10667 10668 10669 10670 10671 10672 10673 10674 10675 10676 10677 10678 10679 10680 10681 10682 10683 10684 10685 10686 10687 10688 10689 10690 10691 10692 10693 10694 10695 10696 10697 10698 10699 10700 10701 10702 10703 10704 10705 10706 10707 10708 10709 10710 10711 10712 10713 10714 10715 10716 10717 10718 10719 10720 10721 10722 10723 10724 10725 10726 10727 10728 10729 10730 10731 10732 10733 10734 10735 10736 10737 10738 10739 10740 10741 10742 10743 10744 10745 10746 10747 10748 10749 10750 10751 10752 10753 10754 10755 10756 10757 10758 10759 10760 10761 10762 10763 10764 10765 10766 10767 10768 10769 10770 10771 10772 10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 10897 10898 10899 10900 10901 10902 10903 10904 10905 10906 10907 10908 10909 10910 10911 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 10938 10939 10940 10941 10942 10943 10944 10945 10946 10947 10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 11005 11006 11007 11008 11009 11010 11011 11012 11013 11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 11031 11032 11033 11034 11035 11036 11037 11038 11039 11040 11041 11042 11043 11044 11045 11046 11047 11048 11049 11050 11051 11052 11053 11054 11055 11056 11057 11058 11059 11060 11061 11062 11063 11064 11065 11066 11067 11068 11069 11070 11071 11072 11073 11074 11075 11076 11077 11078 11079 11080 11081 11082 11083 11084 11085 11086 11087 11088 11089 11090 11091 11092 11093 11094 11095 11096 11097 11098 11099 11100 11101 11102 11103 11104 11105 11106 11107 11108 11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182 11183 11184 11185 11186 11187 11188 11189 11190 11191 11192 11193 11194 11195 11196 11197 11198 11199 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210 11211 11212 11213 11214 11215 11216 11217 11218 11219 11220 11221 11222 11223 11224 11225 11226 11227 11228 11229 11230 11231 11232 11233 11234 11235 11236 11237 11238 11239 11240 11241 11242 11243 11244 11245 11246 11247 11248 11249 11250 11251 11252 11253 11254 11255 11256 11257 11258 11259 11260 11261 11262 11263 11264 11265 11266 11267 11268 11269 11270 11271 11272 11273 11274 11275 11276 11277 11278 11279 11280 11281 11282 11283 11284 11285 11286 11287 11288 11289 11290 11291 11292 11293 11294 11295 11296 11297 11298 11299 11300 11301 11302 11303 11304 11305 11306 11307 11308 11309 11310 11311 11312 11313 11314 11315 11316 11317 11318 11319 11320 11321 11322 11323 11324 11325 11326 11327 11328 11329 11330 11331 11332 11333 11334 11335 11336 11337 11338 11339 11340 11341 11342 11343 11344 11345 11346 11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 11357 11358 11359 11360 11361 11362 11363 11364 11365 11366 11367 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 11393 11394 11395 11396 11397 11398 11399 11400 11401 11402 11403 11404 11405 11406 11407 11408 11409 11410 11411 11412 11413 11414 11415 11416 11417 11418 11419 11420 11421 11422 11423 11424 11425 11426 11427 11428 11429 11430 11431 11432 11433 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 11444 11445 11446 11447 11448 11449 11450 11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461 11462 11463 11464 11465 11466 11467 11468 11469 11470 11471 11472 11473 11474 11475 11476 11477 11478 11479 11480 11481 11482 11483 11484 11485 11486 11487 11488 11489 11490 11491 11492 11493 11494 11495 11496 11497 11498 11499 11500 11501 11502 11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 11532 11533 11534 11535 11536 11537 11538 11539 11540 11541 11542 11543 11544 11545 11546 11547 11548 11549 11550 11551 11552 11553 11554 11555 11556 11557 11558 11559 11560 11561 11562 11563 11564 11565 11566 11567 11568 11569 11570 11571 11572 11573 11574 11575 11576 11577 11578 11579 11580 11581 11582 11583 11584 11585 11586 11587 11588 11589 11590 11591 11592 11593 11594 11595 11596 11597 11598 11599 11600 11601 11602 11603 11604 11605 11606 11607 11608 11609 11610 11611 11612 11613 11614 11615 11616 11617 11618 11619 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 11684 11685 11686 11687 11688 11689 11690 11691 11692 11693 11694 11695 11696 11697 11698 11699 11700 11701 11702 11703 11704 11705 11706 11707 11708 11709 11710 11711 11712 11713 11714 11715 11716 11717 11718 11719 11720 11721 11722 11723 11724 11725 11726 11727 11728 11729 11730 11731 11732 11733 11734 11735 11736 11737 11738 11739 11740 11741 11742 11743 11744 11745 11746 11747 11748 11749 11750 11751 11752 11753 11754 11755 11756 11757 11758 11759 11760 11761 11762 11763 11764 11765 11766 11767 11768 11769 11770 11771 11772 11773 11774 11775 11776 11777 11778 11779 11780 11781 11782 11783 11784 11785 11786 11787 11788 11789 11790 11791 11792 11793 11794 11795 11796 11797 11798 11799 11800 11801 11802 11803 11804 11805 11806 11807 11808 11809 11810 11811 11812 11813 11814 11815 11816 11817 11818 11819 11820 11821 11822 11823 11824 11825 11826 11827 11828 11829 11830 11831 11832 11833 11834 11835 11836 11837 11838 11839 11840 11841 11842 11843 11844 11845 11846 11847 11848 11849 11850 11851 11852 11853 11854 11855 11856 11857 11858 11859 11860 11861 11862 11863 11864 11865 11866 11867 11868 11869 11870 11871 11872 11873 11874 11875 11876 11877 11878 11879 11880 11881 11882 11883 11884 11885 11886 11887 11888 11889 11890 11891 11892 11893 11894 11895 11896 11897 11898 11899 11900 11901 11902 11903 11904 11905 11906 11907 11908 11909 11910 11911 11912 11913 11914 11915 11916 11917 11918 11919 11920 11921 11922 11923 11924 11925 11926 11927 11928 11929 11930 11931 11932 11933 11934 11935 11936 11937 11938 11939 11940 11941 11942 11943 11944 11945 11946 11947 11948 11949 11950 11951 11952 11953 11954 11955 11956 11957 11958 11959 11960 11961 11962 11963 11964 11965 11966 11967 11968 11969 11970 11971 11972 11973 11974 11975 11976 11977 11978 11979 11980 11981 11982 11983 11984 11985 11986 11987 11988 11989 11990 11991 11992 11993 11994 11995 11996 11997 11998 11999 12000 12001 12002 12003 12004 12005 12006 12007 12008 12009 12010 12011 12012 12013 12014 12015 12016 12017 12018 12019 12020 12021 12022 12023 12024 12025 12026 12027 12028 12029 12030 12031 12032 12033 12034 12035 12036 12037 12038 12039 12040 12041 12042 12043 12044 12045 12046 12047 12048 12049 12050 12051 12052 12053 12054 12055 12056 12057 12058 12059 12060 12061 12062 12063 12064 12065 12066 12067 12068 12069 12070 12071 12072 12073 12074 12075 12076 12077 12078 12079 12080 12081 12082 12083 12084 12085 12086 12087 12088 12089 12090 12091 12092 12093 12094 12095 12096 12097 12098 12099 12100 12101 12102 12103 12104 12105 12106 12107 12108 12109 12110 12111 12112 12113 12114 12115 12116 12117 12118 12119 12120 12121 12122 12123 12124 12125 12126 12127 12128 12129 12130 12131 12132 12133 12134 12135 12136 12137 12138 12139 12140 12141 12142 12143 12144 12145 12146 12147 12148 12149 12150 12151 12152 12153 12154 12155 12156 12157 12158 12159 12160 12161 12162 12163 12164 12165 12166 12167 12168 12169 12170 12171 12172 12173 12174 12175 12176 12177 12178 12179 12180 12181 12182 12183 12184 12185 12186 12187 12188 12189 12190 12191 12192 12193 12194 12195 12196 12197 12198 12199 12200 12201 12202 12203 12204 12205 12206 12207 12208 12209 12210 12211 12212 12213 12214 12215 12216 12217 12218 12219 12220 12221 12222 12223 12224 12225 12226 12227 12228 12229 12230 12231 12232 12233 12234 12235 12236 12237 12238 12239 12240 12241 12242 12243 12244 12245 12246 12247 12248 12249 12250 12251 12252 12253 12254 12255 12256 12257 12258 12259 12260 12261 12262 12263 12264 12265 12266 12267 12268 12269 12270 12271 12272 12273 12274 12275 12276 12277 12278 12279 12280 12281 12282 12283 12284 12285 12286 12287 12288 12289 12290 12291 12292 12293 12294 12295 12296 12297 12298 12299 12300 12301 12302 12303 12304 12305 12306 12307 12308 12309 12310 12311 12312 12313 12314 12315 12316 12317 12318 12319 12320 12321 12322 12323 12324 12325 12326 12327 12328 12329 12330 12331 12332 12333 12334 12335 12336 12337 12338 12339 12340 12341 12342 12343 12344 12345 12346 12347 12348 12349 12350 12351 12352 12353 12354 12355 12356 12357 12358 12359 12360 12361 12362 12363 12364 12365 12366 12367 12368 12369 12370 12371 12372 12373 12374 12375 12376 12377 12378 12379 12380 12381 12382 12383 12384 12385 12386 12387 12388 12389 12390 12391 12392 12393 12394 12395 12396 12397 12398 12399 12400 12401 12402 12403 12404 12405 12406 12407 12408 12409 12410 12411 12412 12413 12414 12415 12416 12417 12418 12419 12420 12421 12422 12423 12424 12425 12426 12427 12428 12429 12430 12431 12432 12433 12434 12435 12436 12437 12438 12439 12440 12441 12442 12443 12444 12445 12446 12447 12448 12449 12450 12451 12452 12453 12454 12455 12456 12457 12458 12459 12460 12461 12462 12463 12464 12465 12466 12467 12468 12469 12470 12471 12472 12473 12474 12475 12476 12477 12478 12479 12480 12481 12482 12483 12484 12485 12486 12487 12488 12489 12490 12491 12492 12493 12494 12495 12496 12497 12498 12499 12500 12501 12502 12503 12504 12505 12506 12507 12508 12509 12510 12511 12512 12513 12514 12515 12516 12517 12518 12519 12520 12521 12522 12523 12524 12525 12526 12527 12528 12529 12530 12531 12532 12533 12534 12535 12536 12537 12538 12539 12540 12541 12542 12543 12544 12545 12546 12547 12548 12549 12550 12551 12552 12553 12554 12555 12556 12557 12558 12559 12560 12561 12562 12563 12564 12565 12566 12567 12568 12569 12570 12571 12572 12573 12574 12575 12576 12577 12578 12579 12580 12581 12582 12583 12584 12585 12586 12587 12588 12589 12590 12591 12592 12593 12594 12595 12596 12597 12598 12599 12600 12601 12602 12603 12604 12605 12606 12607 12608 12609 12610 12611 12612 12613 12614 12615 12616 12617 12618 12619 12620 12621 12622 12623 12624 12625 12626 12627 12628 12629 12630 12631 12632 12633 12634 12635 12636 12637 12638 12639 12640 12641 12642 12643 12644 12645 12646 12647 12648 12649 12650 12651 12652 12653 12654 12655 12656 12657 12658 12659 12660 12661 12662 12663 12664 12665 12666 12667 12668 12669 12670 12671 12672 12673 12674 12675 12676 12677 12678 12679 12680 12681 12682 12683 12684 12685 12686 12687 12688 12689 12690 12691 12692 12693 12694 12695 12696 12697 12698 12699 12700 12701 12702 12703 12704 12705 12706 12707 12708 12709 12710 12711 12712 12713 12714 12715 12716 12717 12718 12719 12720 12721 12722 12723 12724 12725 12726 12727 12728 12729 12730 12731 12732 12733 12734 12735 12736 12737 12738 12739 12740 12741 12742 12743 12744 12745 12746 12747 12748 12749 12750 12751 12752 12753 12754 12755 12756 12757 12758 12759 12760 12761 12762 12763 12764 12765 12766 12767 12768 12769 12770 12771 12772 12773 12774 12775 12776 12777 12778 12779 12780 12781 12782 12783 12784 12785 12786 12787 12788 12789 12790 12791 12792 12793 12794 12795 12796 12797 12798 12799 12800 12801 12802 12803 12804 12805 12806 12807 12808 12809 12810 12811 12812 12813 12814 12815 12816 12817 12818 12819 12820 12821 12822 12823 12824 12825 12826 12827 12828 12829 12830 12831 12832 12833 12834 12835 12836 12837 12838 12839 12840 12841 12842 12843 12844 12845 12846 12847 12848 12849 12850 12851 12852 12853 12854 12855 12856 12857 12858 12859 12860 12861 12862 12863 12864 12865 12866 12867 12868 12869 12870 12871 12872 12873 12874 12875 12876 12877 12878 12879 12880 12881 12882 12883 12884 12885 12886 12887 12888 12889 12890 12891 12892 12893 12894 12895 12896 12897 12898 12899 12900 12901 12902 12903 12904 12905 12906 12907 12908 12909 12910 12911 12912 12913 12914 12915 12916 12917 12918 12919 12920 12921 12922 12923 12924 12925 12926 12927 12928 12929 12930 12931 12932 12933 12934 12935 12936 12937 12938 12939 12940 12941 12942 12943 12944 12945 12946 12947 12948 12949 12950 12951 12952 12953 12954 12955 12956 12957 12958 12959 12960 12961 12962 12963 12964 12965 12966 12967 12968 12969 12970 12971 12972 12973 12974 12975 12976 12977 12978 12979 12980 12981 12982 12983 12984 12985 12986 12987 12988 12989 12990 12991 12992 12993 12994 12995 12996 12997 12998 12999 13000 13001 13002 13003 13004 13005 13006 13007 13008 13009 13010 13011 13012 13013 13014 13015 13016 13017 13018 13019 13020 13021 13022 13023 13024 13025 13026 13027 13028 13029 13030 13031 13032 13033 13034 13035 13036 13037 13038 13039 13040 13041 13042 13043 13044 13045 13046 13047 13048 13049 13050 13051 13052 13053 13054 13055 13056 13057 13058 13059 13060 13061 13062 13063 13064 13065 13066 13067 13068 13069 13070 13071 13072 13073 13074 13075 13076 13077 13078 13079 13080 13081 13082 13083 13084 13085 13086 13087 13088 13089 13090 13091 13092 13093 13094 13095 13096 13097 13098 13099 13100 13101 13102 13103 13104 13105 13106 13107 13108 13109 13110 13111 13112 13113 13114 13115 13116 13117 13118 13119 13120 13121 13122 13123 13124 13125 13126 13127 13128 13129 13130 13131 13132 13133 13134 13135 13136 13137 13138 13139 13140 13141 13142 13143 13144 13145 13146 13147 13148 13149 13150 13151 13152 13153 13154 13155 13156 13157 13158 13159 13160 13161 13162 13163 13164 13165 13166 13167 13168 13169 13170 13171 13172 13173 13174 13175 13176 13177 13178 13179 13180 13181 13182 13183 13184 13185 13186 13187 13188 13189 13190 13191 13192 13193 13194 13195 13196 13197 13198 13199 13200 13201 13202 13203 13204 13205 13206 13207 13208 13209 13210 13211 13212 13213 13214 13215 13216 13217 13218 13219 13220 13221 13222 13223 13224 13225 13226 13227 13228 13229 13230 13231 13232 13233 13234 13235 13236 13237 13238 13239 13240 13241 13242 13243 13244 13245 13246 13247 13248 13249 13250 13251 13252 13253 13254 13255 13256 13257 13258 13259 13260 13261 13262 13263 13264 13265 13266 13267 13268 13269 13270 13271 13272 13273 13274 13275 13276 13277 13278 13279 13280 13281 13282 13283 13284 13285 13286 13287 13288 13289 13290 13291 13292 13293 13294 13295 13296 13297 13298 13299 13300 13301 13302 13303 13304 13305 13306 13307 13308 13309 13310 13311 13312 13313 13314 13315 13316 13317 13318 13319 13320 13321 13322 13323 13324 13325 13326 13327 13328 13329 13330 13331 13332 13333 13334 13335 13336 13337 13338 13339 13340 13341 13342 13343 13344 13345 13346 13347 13348 13349 13350 13351 13352 13353 13354 13355 13356 13357 13358 13359 13360 13361 13362 13363 13364 13365 13366 13367 13368 13369 13370 13371 13372 13373 13374 13375 13376 13377 13378 13379 13380 13381 13382 13383 13384 13385 13386 13387 13388 13389 13390 13391 13392 13393 13394 13395 13396 13397 13398 13399 13400 13401 13402 13403 13404 13405 13406 13407 13408 13409 13410 13411 13412 13413 13414 13415 13416 13417 13418 13419 13420 13421 13422 13423 13424 13425 13426 13427 13428 13429 13430 13431 13432 13433 13434 13435 13436 13437 13438 13439 13440 13441 13442 13443 13444 13445 13446 13447 13448 13449 13450 13451 13452 13453 13454 13455 13456 13457 13458 13459 13460 13461 13462 13463 13464 13465 13466 13467 13468 13469 13470 13471 13472 13473 13474 13475 13476 13477 13478 13479 13480 13481 13482 13483 13484 13485 13486 13487 13488 13489 13490 13491 13492 13493 13494 13495 13496 13497 13498 13499 13500 13501 13502 13503 13504 13505 13506 13507 13508 13509 13510 13511 13512 13513 13514 13515 13516 13517 13518 13519 13520 13521 13522 13523 13524 13525 13526 13527 13528 13529 13530 13531 13532 13533 13534 13535 13536 13537 13538 13539 13540 13541 13542 13543 13544 13545 13546 13547 13548 13549 13550 13551 13552 13553 13554 13555 13556 13557 13558 13559 13560 13561 13562 13563 13564 13565 13566 13567 13568 13569 13570 13571 13572 13573 13574 13575 13576 13577 13578 13579 13580 13581 13582 13583 13584 13585 13586 13587 13588 13589 13590 13591 13592 13593 13594 13595 13596 13597 13598 13599 13600 13601 13602 13603 13604 13605 13606 13607 13608 13609 13610 13611 13612 13613 13614 13615 13616 13617 13618 13619 13620 13621 13622 13623 13624 13625 13626 13627 13628 13629 13630 13631 13632 13633 13634 13635 13636 13637 13638 13639 13640 13641 13642 13643 13644 13645 13646 13647 13648 13649 13650 13651 13652 13653 13654 13655 13656 13657 13658 13659 13660 13661 13662 13663 13664 13665 13666 13667 13668 13669 13670 13671 13672 13673 13674 13675 13676 13677 13678 13679 13680 13681 13682 13683 13684 13685 13686 13687 13688 13689 13690 13691 13692 13693 13694 13695 13696 13697 13698 13699 13700 13701 13702 13703 13704 13705 13706 13707 13708 13709 13710 13711 13712 13713 13714 13715 13716 13717 13718 13719 13720 13721 13722 13723 13724 13725 13726 13727 13728 13729 13730 13731 13732 13733 13734 13735 13736 13737 13738 13739 13740 13741 13742 13743 13744 13745 13746 13747 13748 13749 13750 13751 13752 13753 13754 13755 13756 13757 13758 13759 13760 13761 13762 13763 13764 13765 13766 13767 13768 13769 13770 13771 13772 13773 13774 13775 13776 13777 13778 13779 13780 13781 13782 13783 13784 13785 13786 13787 13788 13789 13790 13791 13792 13793 13794 13795 13796 13797 13798 13799 13800 13801 13802 13803 13804 13805 13806 13807 13808 13809 13810 13811 13812 13813 13814 13815 13816 13817 13818 13819 13820 13821 13822 13823 13824 13825 13826 13827 13828 13829 13830 13831 13832 13833 13834 13835 13836 13837 13838 13839 13840 13841 13842 13843 13844 13845 13846 13847 13848 13849 13850 13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984 13985 13986 13987 13988 13989 13990 13991 13992 13993 13994 13995 13996 13997 13998 13999 14000 14001 14002 14003 14004 14005 14006 14007 14008 14009 14010 14011 14012 14013 14014 14015 14016 14017 14018 14019 14020 14021 14022 14023 14024 14025 14026 14027 14028 14029 14030 14031 14032 14033 14034 14035 14036 14037 14038 14039 14040 14041 14042 14043 14044 14045 14046 14047 14048 14049 14050 14051 14052 14053 14054 14055 14056 14057 14058 14059 14060 14061 14062 14063 14064 14065 14066 14067 14068 14069 14070 14071 14072 14073 14074 14075 14076 14077 14078 14079 14080 14081 14082 14083 14084 14085 14086 14087 14088 14089 14090 14091 14092 14093 14094 14095 14096 14097 14098 14099 14100 14101 14102 14103 14104 14105 14106 14107 14108 14109 14110 14111 14112 14113 14114 14115 14116 14117 14118 14119 14120 14121 14122 14123 14124 14125 14126 14127 14128 14129 14130 14131 14132 14133 14134 14135 14136 14137 14138 14139 14140 14141 14142 14143 14144 14145 14146 14147 14148 14149 14150 14151 14152 14153 14154 14155 14156 14157 14158 14159 14160 14161 14162 14163 14164 14165 14166 14167 14168 14169 14170 14171 14172 14173 14174 14175 14176 14177 14178 14179 14180 14181 14182 14183 14184 14185 14186 14187 14188 14189 14190 14191 14192 14193 14194 14195 14196 14197 14198 14199 14200 14201 14202 14203 14204 14205 14206 14207 14208 14209 14210 14211 14212 14213 14214 14215 14216 14217 14218 14219 14220 14221 14222 14223 14224 14225 14226 14227 14228 14229 14230 14231 14232 14233 14234 14235 14236 14237 14238 14239 14240 14241 14242 14243 14244 14245 14246 14247 14248 14249 14250 14251 14252 14253 14254 14255 14256 14257 14258 14259 14260 14261 14262 14263 14264 14265 14266 14267 14268 14269 14270 14271 14272 14273 14274 14275 14276 14277 14278 14279 14280 14281 14282 14283 14284 14285 14286 14287 14288 14289 14290 14291 14292 14293 14294 14295 14296 14297 14298 14299 14300 14301 14302 14303 14304 14305 14306 14307 14308 14309 14310 14311 14312 14313 14314 14315 14316 14317 14318 14319 14320 14321 14322 14323 14324 14325 14326 14327 14328 14329 14330 14331 14332 14333 14334 14335 14336 14337 14338 14339 14340 14341 14342 14343 14344 14345 14346 14347 14348 14349 14350 14351 14352 14353 14354 14355 14356 14357 14358 14359 14360 14361 14362 14363 14364 14365 14366 14367 14368 14369 14370 14371 14372 14373 14374 14375 14376 14377 14378 14379 14380 14381 14382 14383 14384 14385 14386 14387 14388 14389 14390 14391 14392 14393 14394 14395 14396 14397 14398 14399 14400 14401 14402 14403 14404 14405 14406 14407 14408 14409 14410 14411 14412 14413 14414 14415 14416 14417 14418 14419 14420 14421 14422 14423 14424 14425 14426 14427 14428 14429 14430 14431 14432 14433 14434 14435 14436 14437 14438 14439 14440 14441 14442 14443 14444 14445 14446 14447 14448 14449 14450 14451 14452 14453 14454 14455 14456 14457 14458 14459 14460 14461 14462 14463 14464 14465 14466 14467 14468 14469 14470 14471 14472 14473 14474 14475 14476 14477 14478 14479 14480 14481 14482 14483 14484 14485 14486 14487 14488 14489 14490 14491 14492 14493 14494 14495 14496 14497 14498 14499 14500 14501 14502 14503 14504 14505 14506 14507 14508 14509 14510 14511 14512 14513 14514 14515 14516 14517 14518 14519 14520 14521 14522 14523 14524 14525 14526 14527 14528 14529 14530 14531 14532 14533 14534 14535 14536 14537 14538 14539 14540 14541 14542 14543 14544 14545 14546 14547 14548 14549 14550 14551 14552 14553 14554 14555 14556 14557 14558 14559 14560 14561 14562 14563 14564 14565 14566 14567 14568 14569 14570 14571 14572 14573 14574 14575 14576 14577 14578 14579 14580 14581 14582 14583 14584 14585 14586 14587 14588 14589 14590 14591 14592 14593 14594 14595 14596 14597 14598 14599 14600 14601 14602 14603 14604 14605 14606 14607 14608 14609 14610 14611 14612 14613 14614 14615 14616 14617 14618 14619 14620 14621 14622 14623 14624 14625 14626 14627 14628 14629 14630 14631 14632 14633 14634 14635 14636 14637 14638 14639 14640 14641 14642 14643 14644 14645 14646 14647 14648 14649 14650 14651 14652 14653 14654 14655 14656 14657 14658 14659 14660 14661 14662 14663 14664 14665 14666 14667 14668 14669 14670 14671 14672 14673 14674 14675 14676 14677 14678 14679 14680 14681 14682 14683 14684 14685 14686 14687 14688 14689 14690 14691 14692 14693 14694 14695 14696 14697 14698 14699 14700 14701 14702 14703 14704 14705 14706 14707 14708 14709 14710 14711 14712 14713 14714 14715 14716 14717 14718 14719 14720 14721 14722 14723 14724 14725 14726 14727 14728 14729 14730 14731 14732 14733 14734 14735 14736 14737 14738 14739 14740 14741 14742 14743 14744 14745 14746 14747 14748 14749 14750 14751 14752 14753 14754 14755 14756 14757 14758 14759 14760 14761 14762 14763 14764 14765 14766 14767 14768 14769 14770 14771 14772 14773 14774 14775 14776 14777 14778 14779 14780 14781 14782 14783 14784 14785 14786 14787 14788 14789 14790 14791 14792 14793 14794 14795 14796 14797 14798 14799 14800 14801 14802 14803 14804 14805 14806 14807 14808 14809 14810 14811 14812 14813 14814 14815 14816 14817 14818 14819 14820 14821 14822 14823 14824 14825 14826 14827 14828 14829 14830 14831 14832 14833 14834 14835 14836 14837 14838 14839 14840 14841 14842 14843 14844 14845 14846 14847 14848 14849 14850 14851 14852 14853 14854 14855 14856 14857 14858 14859 14860 14861 14862 14863 14864 14865 14866 14867 14868 14869 14870 14871 14872 14873 14874 14875 14876 14877 14878 14879 14880 14881 14882 14883 14884 14885 14886 14887 14888 14889 14890 14891 14892 14893 14894 14895 14896 14897 14898 14899 14900 14901 14902 14903 14904 14905 14906 14907 14908 14909 14910 14911 14912 14913 14914 14915 14916 14917 14918 14919 14920 14921 14922 14923 14924 14925 14926 14927 14928 14929 14930 14931 14932 14933 14934 14935 14936 14937 14938 14939 14940 14941 14942 14943 14944 14945 14946 14947 14948 14949 14950 14951 14952 14953 14954 14955 14956 14957 14958 14959 14960 14961 14962 14963 14964 14965 14966 14967 14968 14969 14970 14971 14972 14973 14974 14975 14976 14977 14978 14979 14980 14981 14982 14983 14984 14985 14986 14987 14988 14989 14990 14991 14992 14993 14994 14995 14996 14997 14998 14999 15000 15001 15002 15003 15004 15005 15006 15007 15008 15009 15010 15011 15012 15013 15014 15015 15016 15017 15018 15019 15020 15021 15022 15023 15024 15025 15026 15027 15028 15029 15030 15031 15032 15033 15034 15035 15036 15037 15038 15039 15040 15041 15042 15043 15044 15045 15046 15047 15048 15049 15050 15051 15052 15053 15054 15055 15056 15057 15058 15059 15060 15061 15062 15063 15064 15065 15066 15067 15068 15069 15070 15071 15072 15073 15074 15075 15076 15077 15078 15079 15080 15081 15082 15083 15084 15085 15086 15087 15088 15089 15090 15091 15092 15093 15094 15095 15096 15097 15098 15099 15100 15101 15102 15103 15104 15105 15106 15107 15108 15109 15110 15111 15112 15113 15114 15115 15116 15117 15118 15119 15120 15121 15122 15123 15124 15125 15126 15127 15128 15129 15130 15131 15132 15133 15134 15135 15136 15137 15138 15139 15140 15141 15142 15143 15144 15145 15146 15147 15148 15149 15150 15151 15152 15153 15154 15155 15156 15157 15158 15159 15160 15161 15162 15163 15164 15165 15166 15167 15168 15169 15170 15171 15172 15173 15174 15175 15176 15177 15178 15179 15180 15181 15182 15183 15184 15185 15186 15187 15188 15189 15190 15191 15192 15193 15194 15195 15196 15197 15198 15199 15200 15201 15202 15203 15204 15205 15206 15207 15208 15209 15210 15211 15212 15213 15214 15215 15216 15217 15218 15219 15220 15221 15222 15223 15224 15225 15226 15227 15228 15229 15230 15231 15232 15233 15234 15235 15236 15237 15238 15239 15240 15241 15242 15243 15244 15245 15246 15247 15248 15249 15250 15251 15252 15253 15254 15255 15256 15257 15258 15259 15260 15261 15262 15263 15264 15265 15266 15267 15268 15269 15270 15271 15272 15273 15274 15275 15276 15277 15278 15279 15280 15281 15282 15283 15284 15285 15286 15287 15288 15289 15290 15291 15292 15293 15294 15295 15296 15297 15298 15299 15300 15301 15302 15303 15304 15305 15306 15307 15308 15309 15310 15311 15312 15313 15314 15315 15316 15317 15318 15319 15320 15321 15322 15323 15324 15325 15326 15327 15328 15329 15330 15331 15332 15333 15334 15335 15336 15337 15338 15339 15340 15341 15342 15343 15344 15345 15346 15347 15348 15349 15350 15351 15352 15353 15354 15355 15356 15357 15358 15359 15360 15361 15362 15363 15364 15365 15366 15367 15368 15369 15370 15371 15372 15373 15374 15375 15376 15377 15378 15379 15380 15381 15382 15383 15384 15385 15386 15387 15388 15389 15390 15391 15392 15393 15394 15395 15396 15397 15398 15399 15400 15401 15402 15403 15404 15405 15406 15407 15408 15409 15410 15411 15412 15413 15414 15415 15416 15417 15418 15419 15420 15421 15422 15423 15424 15425 15426 15427 15428 15429 15430 15431 15432 15433 15434 15435 15436 15437 15438 15439 15440 15441 15442 15443 15444 15445 15446 15447 15448 15449 15450 15451 15452 15453 15454 15455 15456 15457 15458 15459 15460 15461 15462 15463 15464 15465 15466 15467 15468 15469 15470 15471 15472 15473 15474 15475 15476 15477 15478 15479 15480 15481 15482 15483 15484 15485 15486 15487 15488 15489 15490 15491 15492 15493 15494 15495 15496 15497 15498 15499 15500 15501 15502 15503 15504 15505 15506 15507 15508 15509 15510 15511 15512 15513 15514 15515 15516 15517 15518 15519 15520 15521 15522 15523 15524 15525 15526 15527 15528 15529 15530 15531 15532 15533 15534 15535 15536 15537 15538 15539 15540 15541 15542 15543 15544 15545 15546 15547 15548 15549 15550 15551 15552 15553 15554 15555 15556 15557 15558 15559 15560 15561 15562 15563 15564 15565 15566 15567 15568 15569 15570 15571 15572 15573 15574 15575 15576 15577 15578 15579 15580 15581 15582 15583 15584 15585 15586 15587 15588 15589 15590 15591 15592 15593 15594 15595 15596 15597 15598 15599 15600 15601 15602 15603 15604 15605 15606 15607 15608 15609 15610 15611 15612 15613 15614 15615 15616 15617 15618 15619 15620 15621 15622 15623 15624 15625 15626 15627 15628 15629 15630 15631 15632 15633 15634 15635 15636 15637 15638 15639 15640 15641 15642 15643 15644 15645 15646 15647 15648 15649 15650 15651 15652 15653 15654 15655 15656 15657 15658 15659 15660 15661 15662 15663 15664 15665 15666 15667 15668 15669 15670 15671 15672 15673 15674 15675 15676 15677 15678 15679 15680 15681 15682 15683 15684 15685 15686 15687 15688 15689 15690 15691 15692 15693 15694 15695 15696 15697 15698 15699 15700 15701 15702 15703 15704 15705 15706 15707 15708 15709 15710 15711 15712 15713 15714 15715 15716 15717 15718 15719 15720 15721 15722 15723 15724 15725 15726 15727 15728 15729 15730 15731 15732 15733 15734 15735 15736 15737 15738 15739 15740 15741 15742 15743 15744 15745 15746 15747 15748 15749 15750 15751 15752 15753 15754 15755 15756 15757 15758 15759 15760 15761 15762 15763 15764 15765 15766 15767 15768 15769 15770 15771 15772 15773 15774 15775 15776 15777 15778 15779 15780 15781 15782 15783 15784 15785 15786 15787 15788 15789 15790 15791 15792 15793 15794 15795 15796 15797 15798 15799 15800 15801 15802 15803 15804 15805 15806 15807 15808 15809 15810 15811 15812 15813 15814 15815 15816 15817 15818 15819 15820 15821 15822 15823 15824 15825 15826 15827 15828 15829 15830 15831 15832 15833 15834 15835 15836 15837 15838 15839 15840 15841 15842 15843 15844 15845 15846 15847 15848 15849 15850 15851 15852 15853 15854 15855 15856 15857 15858 15859 15860 15861 15862 15863 15864 15865 15866 15867 15868 15869 15870 15871 15872 15873 15874 15875 15876 15877 15878 15879 15880 15881 15882 15883 15884 15885 15886 15887 15888 15889 15890 15891 15892 15893 15894 15895 15896 15897 15898 15899 15900 15901 15902 15903 15904 15905 15906 15907 15908 15909 15910 15911 15912 15913 15914 15915 15916 15917 15918 15919 15920 15921 15922 15923 15924 15925 15926 15927 15928 15929 15930 15931 15932 15933 15934 15935 15936 15937 15938 15939 15940 15941 15942 15943 15944 15945 15946 15947 15948 15949 15950 15951 15952 15953 15954 15955 15956 15957 15958 15959 15960 15961 15962 15963 15964 15965 15966 15967 15968 15969 15970 15971 15972 15973 15974 15975 15976 15977 15978 15979 15980 15981 15982 15983 15984 15985 15986 15987 15988 15989 15990 15991 15992 15993 15994 15995 15996 15997 15998 15999 16000 16001 16002 16003 16004 16005 16006 16007 16008 16009 16010 16011 16012 16013 16014 16015 16016 16017 16018 16019 16020 16021 16022 16023 16024 16025 16026 16027 16028 16029 16030 16031 16032 16033 16034 16035 16036 16037 16038 16039 16040 16041 16042 16043 16044 16045 16046 16047 16048 16049 16050 16051 16052 16053 16054 16055 16056 16057 16058 16059 16060 16061 16062 16063 16064 16065 16066 16067 16068 16069 16070 16071 16072 16073 16074 16075 16076 16077 16078 16079 16080 16081 16082 16083 16084 16085 16086 16087 16088 16089 16090 16091 16092 16093 16094 16095 16096 16097 16098 16099 16100 16101 16102 16103 16104 16105 16106 16107 16108 16109 16110 16111 16112 16113 16114 16115 16116 16117 16118 16119 16120 16121 16122 16123 16124 16125 16126 16127 16128 16129 16130 16131 16132 16133 16134 16135 16136 16137 16138 16139 16140 16141 16142 16143 16144 16145 16146 16147 16148 16149 16150 16151 16152 16153 16154 16155 16156 16157 16158 16159 16160 16161 16162 16163 16164 16165 16166 16167 16168 16169 16170 16171 16172 16173 16174 16175 16176 16177 16178 16179 16180 16181 16182 16183 16184 16185 16186 16187 16188 16189 16190 16191 16192 16193 16194 16195 16196 16197 16198 16199 16200 16201 16202 16203 16204 16205 16206 16207 16208 16209 16210 16211 16212 16213 16214 16215 16216 16217 16218 16219 16220 16221 16222 16223 16224 16225 16226 16227 16228 16229 16230 16231 16232 16233 16234 16235 16236 16237 16238 16239 16240 16241 16242 16243 16244 16245 16246 16247 16248 16249 16250 16251 16252 16253 16254 16255 16256 16257 16258 16259 16260 16261 16262 16263 16264 16265 16266 16267 16268 16269 16270 16271 16272 16273 16274 16275 16276 16277 16278 16279 16280 16281 16282 16283 16284 16285 16286 16287 16288 16289 16290 16291 16292 16293 16294 16295 16296 16297 16298 16299 16300 16301 16302 16303 16304 16305 16306 16307 16308 16309 16310 16311 16312 16313 16314 16315 16316 16317 16318 16319 16320 16321 16322 16323 16324 16325 16326 16327 16328 16329 16330 16331 16332 16333 16334 16335 16336 16337 16338 16339 16340 16341 16342 16343 16344 16345 16346 16347 16348 16349 16350 16351 16352 16353 16354 16355 16356 16357 16358 16359 16360 16361 16362 16363 16364 16365 16366 16367 16368 16369 16370 16371 16372 16373 16374 16375 16376 16377 16378 16379 16380 16381 16382 16383 16384 16385 16386 16387 16388 16389 16390 16391 16392 16393 16394 16395 16396 16397 16398 16399 16400 16401 16402 16403 16404 16405 16406 16407 16408 16409 16410 16411 16412 16413 16414 16415 16416 16417 16418 16419 16420 16421 16422 16423 16424 16425 16426 16427 16428 16429 16430 16431 16432 16433 16434 16435 16436 16437 16438 16439 16440 16441 16442 16443 16444 16445 16446 16447 16448 16449 16450 16451 16452 16453 16454 16455 16456 16457 16458 16459 16460 16461 16462 16463 16464 16465 16466 16467 16468 16469 16470 16471 16472 16473 16474 16475 16476 16477 16478 16479 16480 16481 16482 16483 16484 16485 16486 16487 16488 16489 16490 16491 16492 16493 16494 16495 16496 16497 16498 16499 16500 16501 16502 16503 16504 16505 16506 16507 16508 16509 16510 16511 16512 16513 16514 16515 16516 16517 16518 16519 16520 16521 16522 16523 16524 16525 16526 16527 16528 16529 16530 16531 16532 16533 16534 16535 16536 16537 16538 16539 16540 16541 16542 16543 16544 16545 16546 16547 16548 16549 16550 16551 16552 16553 16554 16555 16556 16557 16558 16559 16560 16561 16562 16563 16564 16565 16566 16567 16568 16569 16570 16571 16572 16573 16574 16575 16576 16577 16578 16579 16580 16581 16582 16583 16584 16585 16586 16587 16588 16589 16590 16591 16592 16593 16594 16595 16596 16597 16598 16599 16600 16601 16602 16603 16604 16605 16606 16607 16608 16609 16610 16611 16612 16613 16614 16615 16616 16617 16618 16619 16620 16621 16622 16623 16624 16625 16626 16627 16628 16629 16630 16631 16632 16633 16634 16635 16636 16637 16638 16639 16640 16641 16642 16643 16644 16645 16646 16647 16648 16649 16650 16651 16652 16653 16654 16655 16656 16657 16658 16659 16660 16661 16662 16663 16664 16665 16666 16667 16668 16669 16670 16671 16672 16673 16674 16675 16676 16677 16678 16679 16680 16681 16682 16683 16684 16685 16686 16687 16688 16689 16690 16691 16692 16693 16694 16695 16696 16697 16698 16699 16700 16701 16702 16703 16704 16705 16706 16707 16708 16709 16710 16711 16712 16713 16714 16715 16716 16717 16718 16719 16720 16721 16722 16723 16724 16725 16726 16727 16728 16729 16730 16731 16732 16733 16734 16735 16736 16737 16738 16739 16740 16741 16742 16743 16744 16745 16746 16747 16748 16749 16750 16751 16752 16753 16754 16755 16756 16757 16758 16759 16760 16761 16762 16763 16764 16765 16766 16767 16768 16769 16770 16771 16772 16773 16774 16775 16776 16777 16778 16779 16780 16781 16782 16783 16784 16785 16786 16787 16788 16789 16790 16791 16792 16793 16794 16795 16796 16797 16798 16799 16800 16801 16802 16803 16804 16805 16806 16807 16808 16809 16810 16811 16812 16813 16814 16815 16816 16817 16818 16819 16820 16821 16822 16823 16824 16825 16826 16827 16828 16829 16830 16831 16832 16833 16834 16835 16836 16837 16838 16839 16840 16841 16842 16843 16844 16845 16846 16847 16848 16849 16850 16851 16852 16853 16854 16855 16856 16857 16858 16859 16860 16861 16862 16863 16864 16865 16866 16867 16868 16869 16870 16871 16872 16873 16874 16875 16876 16877 16878 16879 16880 16881 16882 16883 16884 16885 16886 16887 16888 16889 16890 16891 16892 16893 16894 16895 16896 16897 16898 16899 16900 16901 16902 16903 16904 16905 16906 16907 16908 16909 16910 16911 16912 16913 16914 16915 16916 16917 16918 16919 16920 16921 16922 16923 16924 16925 16926 16927 16928 16929 16930 16931 16932 16933 16934 16935 16936 16937 16938 16939 16940 16941 16942 16943 16944 16945 16946 16947 16948 16949 16950 16951 16952 16953 16954 16955 16956 16957 16958 16959 16960 16961 16962 16963 16964 16965 16966 16967 16968 16969 16970 16971 16972 16973 16974 16975 16976 16977 16978 16979 16980 16981 16982 16983 16984 16985 16986 16987 16988 16990 16991 16992 16993 16994 16995 16996 16997 16998 16999 17000 17001 17002 17003 17004 17005 17006 17007 17008 17009 17010 17011 17012 17013 17014 17015 17016 17017 17018 17019 17020 17021 17022 17023 17024 17025 17026 17027 17028 17029 17030 17031 17032 17033 17034 17035 17036 17037 17038 17039 17040 17041 17042 17043 17044 17045 17046 17047 17048 17049 17050 17051 17052 17053 17054 17055 17056 17057 17058 17059 17060 17061 17062 17063 17064 17065 17066 17067 17068 17069 17070 17071 17072 17073 17074 17076 17077 17078 17079 17080 17081 17082 17083 17084 17085 17086 17087 17088 17089 17090 17091 17092 17093 17094 17095 17096 17097 17098 17099 17100 17101 17102 17103 17104 17105 17106 17107 17108 17109 17110 17111 17112 17113 17114 17115 17116 17117 17118 17119 17120 17121 17122 17123 17124 17125 17126 17127 17128 17129 17130 17131 17132 17133 17134 17135 17136 17137 17138 17139 17140 17141 17142 17143 17144 17145 17146 17147 17148 17149 17150 17151 17152 17153 17154 17155 17156 17157 17158 17159 17160 17161 17162 17163 17164 17165 17166 17167 17168 17169 17170 17171 17172 17173 17174 17175 17176 17177 17178 17179 17180 17181 17182 17183 17184 17185 17186 17187 17188 17189 17190 17191 17192 17193 17194 17195 17196 17197 17198 17199 17200 17201 17202 17203 17204 17205 17206 17207 17208 17209 17210 17211 17212 17213 17214 17215 17216 17217 17218 17219 17220 17221 17222 17223 17224 17225 17226 17227 17228 17229 17230 17231 17232 17233 17234 17235 17236 17237 17238 17239 17240 17241 17242 17243 17244 17245 17246 17247 17248 17249 17250 17251 17252 17253 17254 17255 17256 17257 17258 17259 17260 17261 17262 17263 17264 17265 17266 17267 17268 17269 17270 17271 17272 17273 17274 17275 17276 17277 17278 17279 17280 17281 17282 17283 17284 17285 17286 17287 17288 17289 17290 17291 17292 17293 17294 17295 17296 17297 17298 17299 17300 17301 17302 17303 17304 17305 17306 17307 17308 17309 17310 17311 17312 17313 17314 17315 17316 17317 17318 17319 17320 17321 17322 17323 17324 17325 17326 17327 17328 17329 17330 17331 17332 17333 17334 17335 17336 17337 17338 17339 17340 17341 17342 17343 17344 17345 17346 17347 17348 17349 17350 17351 17352 17353 17354 17355 17356 17357 17358 17359 17360 17361 17362 17363 17364 17365 17366 17367 17368 17369 17370 17371 17372 17373 17374 17375 17376 17377 17378 17379 17380 17381 17382 17383 17384 17385 17386 17387 17388 17389 17390 17391 17392 17393 17394 17395 17396 17397 17398 17399 17400 17401 17402 17403 17404 17405 17406 17407 17408 17409 17410 17411 17412 17413 17414 17415 17416 17417 17418 17419 17420 17421 17422 17423 17424 17425 17426 17427 17428 17429 17430 17431 17432 17433 17434 17435 17436 17437 17438 17439 17440 17441 17442 17443 17444 17445 17446 17447 17448 17449 17450 17451 17452 17453 17454 17455 17456 17457 17458 17459 17460 17461 17462 17463 17464 17465 17466 17467 17468 17469 17470 17471 17472 17473 17474 17475 17476 17477 17478 17479 17480 17481 17482 17483 17484 17485 17486 17487 17488 17489 17490 17491 17492 17493 17494 17495 17496 17497 17498 17499 17500 17501 17502 17503 17504 17505 17506 17507 17508 17509 17510 17511 17512 17513 17514 17515 17516 17517 17518 17519 17520 17521 17522 17523 17524 17525 17526 17527 17528 17529 17530 17531 17532 17533 17534 17535 17536 17537 17538 17539 17540 17541 17542 17543 17544 17545 17546 17547 17548 17549 17550 17551 17552 17553 17554 17555 17556 17557 17558 17559 17560 17561 17562 17563 17564 17565 17566 17567 17568 17569 17570 17571 17572 17573 17574 17575 17576 17577 17578 17579 17580 17581 17582 17583 17584 17585 17586 17587 17588 17589 17590 17591 17592 17593 17594 17595 17596 17597 17598 17599 17600 17601 17602 17603 17604 17605 17606 17607 17608 17609 17610 17611 17612 17613 17614 17615 17616 17617 17618 17619 17620 17621 17622 17623 17624 17625 17626 17627 17628 17629 17630 17631 17632 17633 17634 17635 17636 17637 17638 17639 17640 17641 17642 17643 17644 17645 17646 17647 17648 17649 17650 17651 17652 17653 17654 17655 17656 17657 17658 17659 17660 17661 17662 17663 17664 17665 17666 17667 17668 17669 17670 17671 17672 17673 17674 17675 17676 17677 17678 17679 17680 17681 17682 17683 17684 17685 17686 17687 17688 17689 17690 17691 17692 17693 17694 17695 17696 17697 17698 17699 17700 17701 17702 17703 17704 17705 17706 17707 17708 17709 17710 17711 17712 17713 17714 17715 17716 17717 17718 17719 17720 17721 17722 17723 17724 17725 17726 17727 17728 17729 17730 17731 17732 17733 17734 17735 17736 17737 17738 17739 17740 17741 17742 17743 17744 17745 17746 17747 17748 17749 17750 17751 17752 17753 17754 17755 17756 17757 17758 17759 17760 17761 17762 17763 17764 17765 17766 17767 17768 17769 17770 17771 17772 17773 17774 17775 17776 17777 17778 17779 17780 17781 17782 17783 17784 17785 17786 17787 17788 17789 17790 17791 17792 17793 17794 17795 17796 17797 17798 17799 17800 17801 17802 17803 17804 17805 17806 17807 17808 17809 17810 17811 17812 17813 17814 17815 17816 17817 17818 17819 17820 17821 17822 17823 17824 17825 17826 17827 17828 17829 17830 17831 17832 17833 17834 17835 17836 17837 17838 17839 17840 17841 17842 17843 17844 17845 17846 17847 17848 17849 17850 17851 17852 17853 17854 17855 17856 17857 17858 17859 17860 17861 17862 17863 17864 17865 17866 17867 17868 17869 17870 17871 17872 17873 17874 17875 17876 17877 17878 17879 17880 17881 17882 17883 17884 17885 17886 17887 17888 17889 17890 17891 17892 17893 17894 17895 17896 17897 17898 17899 17900 17901 17902 17903 17904 17905 17906 17907 17908 17909 17910 17911 17912 17913 17914 17915 17916 17917 17918 17919 17920 17921 17922 17923 17924 17925 17926 17927 17928 17929 17930 17931 17932 17933 17934 17935 17936 17937 17938 17939 17940 17941 17942 17943 17944 17945 17946 17947 17948 17949 17950 17951 17952 17953 17954 17955 17956 17957 17958 17959 17960 17961 17962 17963 17964 17965 17966 17967 17968 17969 17970 17971 17972 17973 17974 17975 17976 17977 17978 17979 17980 17981 17982 17983 17984 17985 17986 17987 17988 17989 17990 17991 17992 17993 17994 17995 17996 17997 17998 17999 18000 18001 18002 18003 18004 18005 18006 18007 18008 18009 18010 18011 18012 18013 18014 18015 18016 18017 18018 18019 18020 18021 18022 18023 18024 18025 18026 18027 18028 18029 18030 18031 18032 18033 18034 18035 18036 18037 18038 18039 18040 18041 18042 18043 18044 18045 18046 18047 18048 18049 18050 18051 18052 18053 18054 18055 18056 18057 18058 18059 18060 18061 18062 18063 18064 18065 18066 18067 18068 18069 18070 18071 18072 18073 18074 18075 18076 18077 18078 18079 18080 18081 18082 18083 18084 18085 18086 18087 18088 18089 18090 18091 18092 18093 18094 18095 18096 18097 18098 18099 18100 18101 18102 18103 18104 18105 18106 18107 18108 18109 18110 18111 18112 18113 18114 18115 18116 18117 18118 18119 18120 18121 18122 18123 18124 18125 18126 18127 18128 18129 18130 18131 18132 18133 18134 18135 18136 18137 18138 18139 18140 18141 18142 18143 18144 18145 18146 18147 18148 18149 18150 18151 18152 18153 18154 18155 18156 18157 18158 18159 18160 18161 18162 18163 18164 18165 18166 18167 18168 18169 18170 18171 18172 18173 18174 18175 18176 18177 18178 18179 18180 18181 18182 18183 18184 18185 18186 18187 18188 18189 18190 18191 18192 18193 18194 18195 18196 18197 18198 18199 18200 18201 18202 18203 18204 18205 18206 18207 18208 18209 18210 18211 18212 18213 18214 18215 18216 18217 18218 18219 18220 18221 18222 18223 18224 18225 18226 18227 18228 18229 18230 18231 18232 18233 18234 18235 18236 18237 18238 18239 18240 18241 18242 18243 18244 18245 18246 18247 18248 18249 18250 18251 18252 18253 18254 18255 18256 18257 18258 18259 18260 18261 18262 18263 18264 18265 18266 18267 18268 18269 18270 18271 18272 18273 18274 18275 18276 18277 18278 18279 18280 18281 18282 18283 18284 18285 18286 18287 18288 18289 18290 18291 18292 18293 18294 18295 18296 18297 18298 18299 18300 18301 18302 18303 18304 18305 18306 18307 18308 18309 18310 18311 18312 18313 18314 18315 18316 18317 18318 18319 18320 18321 18322 18323 18324 18325 18326 18327 18328 18329 18330 18331 18332 18333 18334 18335 18336 18337 18338 18339 18340 18341 18342 18343 18344 18345 18346 18347 18348 18349 18350 18351 18352 18353 18354 18355 18356 18357 18358 18359 18360 18361 18362 18363 18364 18365 18366 18367 18368 18369 18370 18371 18372 18373 18374 18375 18376 18377 18378 18379 18380 18381 18382 18383 18384 18385 18386 18387 18388 18389 18390 18391 18392 18393 18394 18395 18396 18397 18398 18399 18400 18401 18402 18403 18404 18405 18406 18407 18408 18409 18410 18411 18412 18413 18414 18415 18416 18417 18418 18419 18420 18421 18422 18423 18424 18425 18426 18427 18428 18429 18430 18431 18432 18433 18434 18435 18436 18437 18438 18439 18440 18441 18442 18443 18444 18445 18446 18447 18448 18449 18450 18451 18452 18453 18454 18455 18456 18457 18458 18459 18460 18461 18462 18463 18464 18465 18466 18467 18468 18469 18470 18471 18472 18473 18474 18475 18476 18477 18478 18479 18480 18481 18482 18483 18484 18485 18486 18487 18488 18489 18490 18491 18492 18493 18494 18495 18496 18497 18498 18499 18500 18501 18502 18503 18504 18505 18506 18507 18508 18509 18510 18511 18512 18513 18514 18515 18516 18517 18518 18519 18520 18521 18522 18523 18524 18525 18526 18527 18528 18529 18530 18531 18532 18533 18534 18535 18536 18537 18538 18539 18540 18541 18542 18543 18544 18545 18546 18547 18548 18549 18550 18551 18552 18553 18554 18555 18556 18557 18558 18559 18560 18561 18562 18563 18564 18565 18566 18567 18568 18569 18570 18571 18572 18573 18574 18575 18576 18577 18578 18579 18580 18581 18582 18583 18584 18585 18586 18587 18588 18589 18590 18591 18592 18593 18594 18595 18596 18597 18598 18599 18600 18601 18602 18603 18604 18605 18606 18607 18608 18609 18610 18611 18612 18613 18614 18615 18616 18617 18618 18619 18620 18621 18622 18623 18624 18625 18626 18627 18628 18629 18630 18631 18632 18633 18634 18635 18636 18637 18638 18639 18640 18641 18642 18643 18644 18645 18646 18647 18648 18649 18650 18651 18652 18653 18654 18655 18656 18657 18658 18659 18660 18661 18662 18663 18664 18665 18666 18667 18668 18669 18670 18671 18672 18673 18674 18675 18676 18677 18678 18679 18680 18681 18682 18683 18684 18685 18686 18687 18688 18689 18690 18691 18692 18693 18694 18695 18696 18697 18698 18699 18700 18701 18702 18703 18704 18705 18706 18707 18708 18709 18710 18711 18712 18713 18714 18715 18716 18717 18718 18719 18720 18721 18722 18723 18724 18725 18726 18727 18728 18729 18730 18731 18732 18733 18734 18735 18736 18737 18738 18739 18740 18741 18742 18743 18744 18745 18746 18747 18748 18749 18750 18751 18752 18753 18754 18755 18756 18757 18758 18759 18760 18761 18762 18763 18764 18765 18766 18767 18768 18769 18770 18771 18772 18773 18774 18775 18776 18777 18778 18779 18780 18781 18782 18783 18784 18785 18786 18787 18788 18789 18790 18791 18792 18793 18794 18795 18796 18797 18798 18799 18800 18801 18802 18803 18804 18805 18808 18809 18810 18811 18812 18813 18814 18815 18816 18817 18818 18819 18820 18821 18822 18823 18824 18825 18826 18827 18828 18829 18830 18831 18832 18833 18834 18835 18836 18837 18838 18839 18840 18841 18842 18843 18844 18845 18846 18847 18848 18849 18850 18851 18852 18853 18854 18855 18856 18857 18858 18859 18860 18861 18862 18863 18864 18865 18866 18867 18868 18869 18870 18871 18872 18873 18874 18875 18876 18877 18878 18879 18880 18881 18882 18883 18884 18891 18892 18893 18894 18895 18896 18897 18898 18899 18900 18901 18902 18903 18904 18905 18906 18907 18908 18909 18910 18911 18912 18913 18914 18915 18916 18917 18918 18919 18920 18921 18922 18923 18924 18925 18926 18927 18928 18929 18930 18931 18932 18933 18934 18935 18936 18937 18938 18939 18940 18941 18942 18943 18944 18945 18946 18947 18948 18949 18950 18951 18952 18953 18954 18955 18956 18957 18958 18959 18960 18961 18962 18963 18964 18965 18966 18973 18974 18975 18976 18977 18978 18979 18980 18981 18982 18983 18984 18985 18986 18987 18988 18989 18990 18991 18992 18993 18994 18995 18996 18997 18998 18999 19000 19001 19002 19003 19004 19005 19006 19007 19008 19009 19010 19011 19012 19013 19014 19015 19016 19017 19018 19019 19020 19021 19022 19023 19024 19025 19026 19027 19028 19029 19030 19031 19032 19033 19034 19035 19036 19037 19038 19039 19040 19041 19042 19043 19044 19045 19046 19047 19048 19049 19051 19052 19059 19060 19061 19062 19063 19064 19065 19066 19067 19068 19069 19070 19071 19072 19073 19074 19075 19076 19077 19078 19079 19080 19081 19082 19083 19084 19085 19086 19087 19088 19089 19090 19091 19092 19093 19094 19095 19096 19097 19098 19099 19100 19101 19102 19103 19104 19105 19106 19107 19108 19109 19110 19111 19112 19113 19114 19115 19116 19117 19118 19119 19120 19121 19122 19123 19124 19125 19126 19127 19128 19129 19130 19131 19132 19133 19134 19135 19137 19138 19145 19146 19147 19148 19149 19150 19151 19152 19153 19154 19155 19156 19157 19158 19159 19160 19161 19162 19163 19164 19165 19166 19167 19168 19169 19170 19171 19172 19173 19174 19175 19176 19177 19178 19179 19180 19181 19182 19183 19184 19185 19186 19187 19188 19189 19190 19191 19192 19193 19194 19195 19196 19197 19198 19199 19200 19201 19202 19203 19204 19205 19206 19207 19208 19209 19210 19211 19212 19213 19214 19215 19216 19217 19218 19219 19220 19221 19222 19223 19224 19225 19227 19228 19235 19236 19237 19238 19239 19240 19241 19242 19243 19244 19245 19246 19247 19248 19249 19250 19251 19252 19253 19254 19255 19256 19257 19258 19259 19260 19261 19262 19263 19264 19265 19266 19267 19268 19269 19270 19271 19272 19273 19274 19275 19276 19277 19278 19279 19280 19281 19282 19283 19284 19285 19286 19287 19288 19289 19290 19291 19292 19293 19294 19295 19296 19297 19298 19299 19300 19301 19302 19303 19304 19305 19306 19307 19308 19309 19310 19311 19312 19313 19314 19315 19316 19317 19318 19319 19320 19321 19322 19323 19324 19325 19326 19327 19328 19329 19330 19331 19332 19333 19334 19335 19336 19337 19338 19339 19340 19341 19342 19343 19344 19345 19346 19347 19348 19349 19350 19351 19352 19353 19354 19355 19356 19357 19358 19359 19360 19361 19362 19363 19364 19365 19366 19367 19368 19369 19370 19371 19372 19373 19374 19375 19376 19377 19378 19379 19380 19381 19382 19383 19384 19385 19386 19387 19388 19389 19390 19391 19392 19393 19394 19395 19396 19397 19398 19399 19400 19401 19402 19403 19404 19405 19406 19407 19408 19409 19410 19411 19412 19413 19414 19415 19416 19417 19418 19419 19420 19421 19422 19423 19424 19425 19426 19427 19428 19429 19430 19431 19432 19433 19434 19435 19436 19437 19438 19439 19440 19441 19442 19443 19444 19445 19446 19447 19448 19449 19450 19451 19452 19453 19454 19455 19456 19457 19458 19459 19460 19461 19462 19463 19464 19465 19466 19467 19468 19469 19470 19471 19472 19473 19474 19475 19476 19477 19478 19479 19480 19481 19482 19483 19484 19485 19486 19487 19488 19489 19490 19491 19492 19493 19494 19495 19496 19497 19498 19499 19500 19501 19502 19503 19504 19505 19506 19507 19508 19509 19510 19511 19512 19513 19514 19515 19516 19517 19518 19519 19520 19521 19522 19523 19524 19525 19526 19527 19528 19529 19530 19531 19532 19533 19534 19535 19536 19537 19538 19539 19540 19541 19542 19543 19544 19545 19546 19547 19548 19549 19550 19551 19552 19553 19554 19555 19556 19557 19558 19559 19560 19561 19562 19563 19564 19565 19566 19567 19568 19569 19570 19571 19572 19573 19574 19575 19576 19577 19578 19579 19580 19581 19582 19583 19584 19585 19586 19587 19588 19589 19590 19591 19592 19593 19594 19595 19596 19597 19598 19599 19600 19601 19602 19603 19604 19605 19606 19607 19608 19609 19610 19611 19612 19613 19614 19615 19616 19617 19618 19619 19620 19621 19622 19623 19624 19625 19626 19627 19628 19629 19630 19631 19632 19633 19634 19635 19636 19637 19638 19639 19640 19641 19642 19643 19644 19645 19646 19647 19648 19649 19650 19651 19652 19653 19654 19655 19656 19657 19658 19659 19660 19661 19662 19663 19664 19665 19666 19667 19668 19669 19670 19671 19672 19673 19674 19675 19676 19677 19678 19679 19680 19681 19682 19683 19684 19685 19686 19687 19688 19689 19690 19691 19692 19693 19694 19695 19696 19697 19698 19699 19700 19701 19702 19703 19704 19705 19706 19707 19708 19709 19710 19711 19712 19713 19714 19715 19716 19717 19718 19719 19720 19721 19722 19723 19724 19725 19726 19727 19728 19729 19730 19731 19732 19733 19734 19735 19736 19737 19738 19739 19740 19741 19742 19743 19744 19745 19746 19747 19748 19749 19750 19751 19752 19753 19754 19755 19756 19757 19758 19759 19760 19761 19762 19763 19764 19765 19766 19767 19768 19769 19770 19771 19772 19773 19774 19775 19776 19777 19778 19779 19780 19781 19782 19783 19784 19785 19786 19787 19788 19789 19790 19791 19792 19793 19794 19795 19796 19797 19798 19799 19800 19801 19802 19803 19804 19805 19806 19807 19808 19809 19810 19811 19812 19813 19814 19815 19816 19817 19818 19819 19820 19821 19822 19823 19824 19825 19826 19827 19828 19829 19830 19831 19832 19833 19834 19835 19836 19837 19838 19839 19840 19841 19842 19843 19844 19845 19846 19847 19848 19849 19850 19851 19852 19853 19854 19855 19856 19857 19858 19859 19860 19861 19862 19863 19864 19865 19866 19867 19868 19869 19870 19871 19872 19873 19874 19875 19876 19877 19878 19879 19880 19881 19882 19883 19884 19885 19886 19887 19888 19889 19890 19891 19892 19893 19894 19895 19896 19897 19898 19899 19900 19901 19902 19903 19904 19905 19906 19907 19908 19909 19910 19911 19912 19913 19914 19915 19916 19917 19918 19919 19920 19921 19922 19923 19924 19925 19926 19927 19928 19929 19930 19931 19932 19933 19934 19935 19936 19937 19938 19939 19940 19941 19942 19943 19944 19945 19946 19947 19948 19949 19950 19951 19952 19953 19954 19955 19956 19957 19958 19959 19960 19961 19962 19963 19964 19965 19966 19967 19968 19969 19970 19971 19972 19973 19974 19975 19976 19977 19978 19979 19980 19981 19982 19983 19984 19985 19986 19987 19988 19989 19990 19991 19992 19993 19994 19995 19996 19997 19998 19999 20000 20001 20002 20003 20004 20005 20006 20007 20008 20009 20010 20011 20012 20013 20014 20015 20016 20017 20018 20019 20020 20021 20022 20023 20024 20025 20026 20027 20028 20029 20030 20031 20032 20033 20034 20035 20036 20037 20038 20039 20040 20041 20042 20043 20044 20045 20046 20047 20048 20049 20050 20051 20052 20053 20054 20055 20056 20057 20058 20059 20060 20061 20062 20063 20064 20065 20066 20067 20068 20069 20070 20071 20072 20073 20074 20075 20076 20077 20078 20079 20080 20081 20082 20083 20084 20085 20086 20087 20088 20089 20090 20091 20092 20093 20094 20095 20096 20097 20098 20099 20100 20101 20102 20103 20104 20105 20106 20107 20108 20109 20110 20111 20112 20113 20114 20115 20116 20117 20118 20119 20120 20121 20122 20123 20124 20125 20126 20127 20128 20129 20130 20131 20132 20133 20134 20135 20136 20137 20138 20139 20140 20141 20142 20143 20144 20145 20146 20147 20148 20149 20150 20151 20152 20153 20154 20155 20156 20157 20158 20159 20160 20161 20162 20163 20164 20165 20166 20167 20168 20169 20170 20171 20172 20173 20174 20175 20176 20177 20178 20179 20180 20181 20182 20183 20184 20185 20186 20187 20188 20189 20190 20191 20192 20193 20194 20195 20196 20197 20198 20199 20200 20201 20202 20203 20204 20205 20206 20207 20208 20209 20210 20211 20212 20213 20214 20215 20216 20217 20218 20219 20220 20221 20222 20223 20224 20225 20226 20227 20228 20229 20230 20231 20232 20233 20234 20235 20236 20237 20238 20239 20240 20241 20242 20243 20244 20245 20246 20247 20248 20249 20250 20251 20252 20253 20254 20255 20256 20257 20258 20259 20260 20261 20262 20263 20264 20265 20266 20267 20268 20269 20270 20271 20272 20273 20274 20275 20276 20277 20278 20279 20280 20281 20282 20283 20284 20285 20286 20287 20288 20289 20290 20291 20292 20293 20294 20295 20296 20297 20298 20299 20300 20301 20302 20303 20304 20305 20306 20307 20308 20309 20310 20311 20312 20313 20314 20315 20316 20317 20318 20319 20320 20321 20322 20323 20324 20325 20326 20327 20328 20329 20330 20331 20332 20333 20334 20335 20336 20337 20338 20339 20340 20341 20342 20343 20344 20345 20346 20347 20348 20349 20350 20351 20352 20353 20354 20355 20356 20357 20358 20359 20360 20361 20362 20363 20364 20365 20366 20367 20368 20369 20370 20371 20372 20373 20374 20375 20376 20377 20378 20379 20380 20381 20382 20383 20384 20385 20386 20387 20388 20389 20390 20391 20392 20393 20394 20395 20396 20397 20398 20399 20400 20401 20402 20403 20404 20405 20406 20407 20408 20409 20410 20411 20412 20413 20414 20415 20416 20417 20418 20419 20420 20421 20422 20423 20424 20425 20426 20427 20428 20429 20430 20431 20432 20433 20434 20435 20436 20437 20438 20439 20440 20441 20442 20443 20444 20445 20446 20447 20448 20449 20450 20451 20452 20453 20454 20455 20456 20457 20458 20459 20460 20461 20462 20463 20464 20465 20466 20467 20468 20469 20470 20471 20472 20473 20474 20475 20476 20477 20478 20479 20480 20481 20482 20483 20484 20485 20486 20487 20488 20489 20490 20491 20492 20493 20494 20495 20496 20497 20498 20499 20500 20501 20502 20503 20504 20505 20506 20507 20508 20509 20510 20511 20512 20513 20514 20515 20516 20517 20518 20519 20520 20521 20522 20523 20524 20525 20526 20527 20528 20529 20530 20531 20532 20533 20534 20535 20536 20537 20538 20539 20540 20541 20542 20543 20544 20545 20546 20547 20548 20549 20550 20551 20552 20553 20554 20555 20556 20557 20558 20559 20560 20561 20562 20563 20564 20565 20566 20567 20568 20569 20570 20571 20572 20573 20574 20575 20576 20577 20578 20579 20580 20581 20582 20583 20584 20585 20586 20587 20588 20589 20590 20591 20592 20593 20594 20595 20596 20597 20598 20599 20600 20601 20602 20603 20604 20605 20606 20607 20608 20609 20610 20611 20612 20613 20614 20615 20616 20617 20618 20619 20620 20621 20622 20623 20624 20625 20626 20627 20628 20629 20630 20631 20632 20633 20634 20635 20636 20637 20638 20639 20640 20641 20642 20643 20644 20645 20646 20647 20648 20649 20650 20651 20652 20653 20654 20655 20656 20657 20658 20659 20660 20661 20662 20663 20664 20665 20666 20667 20668 20669 20670 20671 20672 20673 20674 20675 20676 20677 20678 20679 20680 20681 20682 20683 20684 20685 20686 20687 20688 20689 20690 20691 20692 20693 20694 20695 20696 20697 20698 20699 20700 20701 20702 20703 20704 20705 20706 20707 20708 20709 20710 20711 20712 20713 20714 20715 20716 20717 20718 20719 20720 20721 20722 20723 20724 20725 20726 20727 20728 20729 20730 20731 20732 20733 20734 20735 20736 20737 20738 20739 20740 20741 20742 20743 20744 20745 20746 20747 20748 20749 20750 20751 20752 20753 20754 20755 20756 20757 20758 20759 20760 20761 20762 20763 20764 20765 20766 20767 20768 20769 20770 20771 20772 20773 20774 20775 20776 20777 20778 20779 20780 20781 20782 20783 20784 20785 20786 20787 20788 20789 20790 20791 20792 20793 20794 20795 20796 20797 20798 20799 20800 20801 20802 20803 20804 20805 20806 20807 20808 20809 20810 20811 20812 20813 20814 20815 20816 20817 20818 20819 20820 20821 20822 20823 20824 20825 20826 20827 20828 20829 20830 20831 20832 20833 20834 20835 20836 20837 20838 20839 20840 20841 20842 20843 20844 20845 20846 20847 20848 20849 20850 20851 20852 20853 20854 20855 20856 20857 20858 20859 20860 20861 20862 20863 20864 20865 20866 20867 20868 20869 20870 20871 20872 20873 20874 20875 20876 20877 20878 20879 20880 20881 20882 20883 20884 20885 20886 20887 20888 20889 20890 20891 20892 20893 20894 20895 20896 20897 20898 20899 20900 20901 20902 20903 20904 20905 20906 20907 20908 20909 20910 20911 20912 20913 20914 20915 20916 20917 20918 20919 20920 20921 20922 20923 20924 20925 20926 20927 20928 20929 20930 20931 20932 20933 20934 20935 20936 20937 20938 20939 20940 20941 20942 20943 20944 20945 20946 20947 20948 20949 20950 20951 20952 20953 20954 20955 20956 20957 20958 20959 20960 20961 20962 20963 20964 20965 20966 20967 20968 20969 20970 20971 20972 20973 20974 20975 20976 20977 20978 20979 20980 20981 20982 20983 20984 20985 20986 20987 20988 20989 20990 20991 20992 20993 20994 20995 20996 20997 20998 20999 21000 21001 21002 21003 21004 21005 21006 21007 21008 21009 21010 21011 21012 21013 21014 21015 21016 21017 21018 21019 21020 21021 21022 21023 21024 21025 21026 21027 21028 21029 21030 21031 21032 21033 21034 21035 21036 21037 21038 21039 21040 21041 21042 21043 21044 21045 21046 21047 21048 21049 21050 21051 21052 21053 21054 21055 21056 21057 21058 21059 21060 21061 21062 21063 21064 21065 21066 21067 21068 21069 21070 21071 21072 21073 21074 21075 21076 21077 21078 21079 21080 21081 21082 21083 21084 21085 21086 21087 21088 21089 21090 21091 21092 21093 21094 21095 21096 21097 21098 21099 21100 21101 21102 21103 21104 21105 21106 21107 21108 21109 21110 21111 21112 21113 21114 21115 21116 21117 21118 21119 21120 21121 21122 21123 21124 21125 21126 21127 21128 21129 21130 21131 21132 21133 21134 21135 21136 21137 21138 21139 21140 21141 21142 21143 21144 21145 21146 21147 21148 21149 21150 21151 21152 21153 21154 21155 21156 21157 21158 21159 21160 21161 21162 21163 21164 21165 21166 21167 21168 21169 21170 21171 21172 21173 21174 21175 21176 21177 21178 21179 21180 21181 21182 21183 21184 21185 21186 21187 21188 21189 21190 21191 21192 21193 21194 21195 21196 21197 21198 21199 21200 21201 21202 21203 21204 21205 21206 21207 21208 21209 21210 21211 21212 21213 21214 21215 21216 21217 21218 21219 21220 21221 21222 21223 21224 21225 21226 21227 21228 21229 21230 21231 21232 21233 21234 21235 21236 21237 21238 21239 21240 21241 21242 21243 21244 21245 21246 21247 21248 21249 21250 21251 21252 21253 21254 21255 21256 21257 21258 21259 21260 21261 21262 21263 21264 21265 21266 21267 21268 21269 21270 21271 21272 21273 21274 21275 21276 21277 21278 21279 21280 21281 21282 21283 21284 21285 21286 21287 21288 21289 21290 21291 21292 21293 21294 21295 21296 21297 21298 21299 21300 21301 21302 21303 21304 21305 21306 21307 21308 21309 21310 21311 21312 21313 21314 21315 21316 21317 21318 21319 21320 21321 21322 21323 21324 21325 21326 21327 21328 21329 21330 21331 21332 21333 21334 21335 21336 21337 21338 21339 21340 21341 21342 21343 21344 21345 21346 21347 21348 21349 21350 21351 21352 21353 21354 21355 21356 21357 21358 21359 21360 21361 21362 21363 21364 21365 21366 21367 21368 21369 21370 21371 21372 21373 21374 21375 21376 21377 21378 21379 21380 21381 21382 21383 21384 21385 21386 21387 21388 21389 21390 21391 21392 21393 21394 21395 21396 21397 21398 21399 21400 21401 21402 21403 21404 21405 21406 21407 21408 21409 21410 21411 21412 21413 21414 21415 21416 21417 21418 21419 21420 21421 21422 21423 21424 21425 21426 21427 21428 21429 21430 21431 21432 21433 21434 21435 21436 21437 21438 21439 21440 21441 21442 21443 21444 21445 21446 21447 21448 21449 21450 21451 21452 21453 21454 21455 21456 21457 21458 21459 21460 21461 21462 21463 21464 21465 21466 21467 21468 21469 21470 21471 21472 21473 21474 21475 21476 21477 21478 21479 21480 21481 21482 21483 21484 21485 21486 21487 21488 21489 21490 21491 21492 21493 21494 21495 21496 21497 21498 21499 21500 21501 21502 21503 21504 21505 21506 21507 21508 21509 21510 21511 21512 21513 21514 21515 21516 21517 21518 21519 21520 21521 21522 21523 21524 21525 21526 21527 21528 21529 21530 21531 21532 21533 21534 21535 21536 21537 21538 21539 21540 21541 21542 21543 21544 21545 21546 21547 21548 21549 21550 21551 21552 21553 21554 21555 21556 21557 21558 21559 21560 21561 21562 21563 21564 21565 21566 21567 21568 21569 21570 21571 21572 21573 21574 21575 21576 21577 21578 21579 21580 21581 21582 21583 21584 21585 21586 21587 21588 21589 21590 21591 21592 21593 21594 21595 21596 21597 21598 21599 21600 21601 21602 21603 21604 21605 21606 21607 21608 21609 21610 21611 21612 21613 21614 21615 21616 21617 21618 21619 21620 21621 21622 21623 21624 21625 21626 21627 21628 21629 21630 21631 21632 21633 21634 21635 21636 21637 21638 21639 21640 21641 21642 21643 21644 21645 21646 21647 21648 21649 21650 21651 21652 21653 21654 21655 21656 21657 21658 21659 21660 21661 21662 21663 21664 21665 21666 21667 21668 21669 21670 21671 21672 21673 21674 21675 21676 21677 21678 21679 21680 21681 21682 21683 21684 21685 21686 21687 21688 21689 21690 21691 21692 21693 21694 21695 21696 21697 21698 21699 21700 21701 21702 21703 21704 21705 21706 21707 21708 21709 21710 21711 21712 21713 21714 21715 21716 21717 21718 21719 21720 21721 21722 21723 21724 21725 21726 21727 21728 21729 21730 21731 21732 21733 21734 21735 21736 21737 21738 21739 21740 21741 21742 21743 21744 21745 21746 21747 21748 21749 21750 21751 21752 21753 21754 21755 21756 21757 21758 21759 21760 21761 21762 21763 21764 21765 21766 21767 21768 21769 21770 21771 21772 21773 21774 21775 21776 21777 21778 21779 21780 21781 21782 21783 21784 21785 21786 21787 21788 21789 21790 21791 21792 21793 21794 21795 21796 21797 21798 21799 21800 21801 21802 21803 21804 21805 21806 21807 21808 21809 21810 21811 21812 21813 21814 21815 21816 21817 21818 21819 21820 21821 21822 21823 21824 21825 21826 21827 21828 21829 21830 21831 21832 21833 21834 21835 21836 21837 21838 21839 21840 21841 21842 21843 21844 21845 21846 21847 21848 21849 21850 21851 21852 21853 21854 21855 21856 21857 21858 21859 21860 21861 21862 21863 21864 21865 21866 21867 21868 21869 21870 21871 21872 21873 21874 21875 21876 21877 21878 21879 21880 21881 21882 21883 21884 21885 21886 21887 21888 21889 21890 21891 21892 21893 21894 21895 21896 21897 21898 21899 21900 21901 21902 21903 21904 21905 21906 21907 21908 21909 21910 21911 21912 21913 21914 21915 21916 21917 21918 21919 21920 21921 21922 21923 21924 21925 21926 21927 21928 21929 21930 21931 21932 21933 21934 21935 21936 21937 21938 21939 21940 21941 21942 21943 21944 21945 21946 21947 21948 21949 21950 21951 21952 21953 21954 21955 21956 21957 21958 21959 21960 21961 21962 21963 21964 21965 21966 21967 21968 21969 21970 21971 21972 21973 21974 21975 21976 21977 21978 21979 21980 21981 21982 21983 21984 21985 21986 21987 21988 21989 21990 21991 21992 21993 21994 21995 21996 21997 21998 21999 22000 22001 22002 22003 22004 22005 22006 22007 22008 22009 22010 22011 22012 22013 22014 22015 22016 22017 22018 22019 22020 22021 22022 22023 22024 22025 22026 22027 22028 22029 22030 22031 22032 22033 22034 22035 22036 22037 22038 22039 22040 22041 22042 22043 22044 22045 22046 22047 22048 22049 22050 22051 22052 22053 22054 22055 22056 22057 22058 22059 22060 22061 22062 22063 22064 22065 22066 22067 22068 22069 22070 22071 22072 22073 22074 22075 22076 22077 22078 22079 22080 22081 22082 22083 22084 22085 22086 22087 22088 22089 22090 22091 22092 22093 22094 22095 22096 22097 22098 22099 22100 22101 22102 22103 22104 22105 22106 22107 22108 22109 22110 22111 22112 22113 22114 22115 22116 22117 22118 22119 22120 22121 22122 22123 22124 22125 22126 22127 22128 22129 22130 22131 22132 22133 22134 22135 22136 22137 22138 22139 22140 22141 22142 22143 22144 22145 22146 22147 22148 22149 22150 22151 22152 22153 22154 22155 22156 22157 22158 22159 22160 22161 22162 22163 22164 22165 22166 22167 22168 22169 22170 22171 22172 22173 22174 22175 22176 22177 22178 22179 22180 22181 22182 22183 22184 22185 22186 22187 22188 22189 22190 22191 22192 22193 22194 22195 22196 22197 22198 22199 22200 22201 22202 22203 22204 22205 22206 22207 22208 22209 22210 22211 22212 22213 22214 22215 22216 22217 22218 22219 22220 22221 22222 22223 22224 22225 22226 22227 22228 22229 22230 22231 22232 22233 22234 22235 22236 22237 22238 22239 22240 22241 22242 22243 22244 22245 22246 22247 22248 22249 22250 22251 22252 22253 22254 22255 22256 22257 22258 22259 22260 22261 22262 22263 22264 22265 22266 22267 22268 22269 22270 22271 22272 22273 22274 22275 22276 22277 22278 22279 22280 22281 22282 22283 22284 22285 22286 22287 22288 22289 22290 22291 22292 22293 22294 22295 22296 22297 22298 22299 22300 22301 22302 22303 22304 22305 22306 22307 22308 22309 22310 22311 22312 22313 22314 22315 22316 22317 22318 22319 22320 22321 22322 22323 22324 22325 22326 22327 22328 22329 22330 22331 22332 22333 22334 22335 22336 22337 22338 22339 22340 22341 22342 22343 22344 22345 22346 22347 22348 22349 22350 22351 22352 22353 22354 22355 22356 22357 22358 22359 22360 22361 22362 22363 22364 22365 22366 22367 22368 22369 22370 22371 22372 22373 22374 22375 22376 22377 22378 22379 22380 22381 22382 22383 22384 22385 22386 22387 22388 22389 22390 22391 22392 22393 22394 22395 22396 22397 22398 22399 22400 22401 22402 22403 22404 22405 22406 22407 22408 22409 22410 22411 22412 22413 22414 22415 22416 22417 22418 22419 22420 22421 22422 22423 22424 22425 22426 22427 22428 22429 22430 22431 22432 22433 22434 22435 22436 22437 22438 22439 22440 22441 22442 22443 22444 22445 22446 22447 22448 22449 22450 22451 22452 22453 22454 22455 22456 22457 22458 22459 22460 22461 22462 22463 22464 22465 22466 22467 22468 22469 22470 22471 22472 22473 22474 22475 22476 22477 22478 22479 22480 22481 22482 22483 22484 22485 22486 22487 22488 22489 22490 22491 22492 22493 22494 22495 22496 22497 22498 22499 22500 22501 22502 22503 22504 22505 22506 22507 22508 22509 22510 22511 22512 22513 22514 22515 22516 22517 22518 22519 22520 22521 22522 22523 22524 22525 22526 22527 22528 22529 22530 22531 22532 22533 22534 22535 22536 22537 22538 22539 22540 22541 22542 22543 22544 22545 22546 22547 22548 22549 22550 22551 22552 22553 22554 22555 22556 22557 22558 22559 22560 22561 22562 22563 22564 22565 22566 22567 22568 22569 22570 22571 22572 22573 22574 22575 22576 22577 22578 22579 22580 22581 22582 22583 22584 22585 22586 22587 22588 22589 22590 22591 22592 22593 22594 22595 22596 22597 22598 22599 22600 22601 22602 22603 22604 22605 22606 22607 22608 22609 22610 22611 22612 22613 22614 22615 22616 22617 22618 22619 22620 22621 22622 22623 22624 22625 22626 22627 22628 22629 22630 22631 22632 22633 22634 22635 22636 22637 22638 22639 22640 22641 22642 22643 22644 22645 22646 22647 22648 22649 22650 22651 22652 22653 22654 22655 22656 22657 22658 22659 22660 22661 22662 22663 22664 22665 22666 22667 22668 22669 22670 22671 22672 22673 22674 22675 22676 22677 22678 22679 22680 22681 22682 22683 22684 22685 22686 22687 22688 22689 22690 22691 22692 22693 22694 22695 22696 22697 22698 22699 22700 22701 22702 22703 22704 22705 22706 22707 22708 22709 22710 22711 22712 22713 22714 22715 22716 22717 22718 22719 22720 22721 22722 22723 22724 22725 22726 22727 22728 22729 22730 22731 22732 22733 22734 22735 22736 22737 22738 22739 22740 22741 22742 22743 22744 22745 22746 22747 22748 22749 22750 22751 22752 22753 22754 22755 22756 22757 22758 22759 22760 22761 22762 22763 22764 22765 22766 22767 22768 22769 22770 22771 22772 22773 22774 22775 22776 22777 22778 22779 22780 22781 22782 22783 22784 22785 22786 22787 22788 22789 22790 22791 22792 22793 22794 22795 22796 22797 22798 22799 22800 22801 22802 22803 22804 22805 22806 22807 22808 22809 22810 22811 22812 22813 22814 22815 22816 22817 22818 22819 22820 22821 22822 22823 22824 22825 22826 22827 22828 22829 22830 22831 22832 22833 22834 22835 22836 22837 22838 22839 22840 22841 22842 22843 22844 22845 22846 22847 22848 22849 22850 22851 22852 22853 22854 22855 22856 22857 22858 22859 22860 22861 22862 22863 22864 22865 22866 22867 22868 22869 22870 22871 22872 22873 22874 22875 22876 22877 22878 22879 22880 22881 22882 22883 22884 22885 22886 22887 22888 22889 22890 22891 22892 22893 22894 22895 22896 22897 22898 22899 22900 22901 22902 22903 22904 22905 22906 22907 22908 22909 22910 22911 22912 22913 22914 22915 22916 22917 22918 22919 22920 22921 22922 22923 22924 22925 22926 22927 22928 22929 22930 22931 22932 22933 22934 22935 22936 22937 22938 22939 22940 22941 22942 22943 22944 22945 22946 22947 22948 22949 22950 22951 22952 22953 22954 22955 22956 22957 22958 22959 22960 22961 22962 22963 22964 22965 22966 22967 22968 22969 22970 22971 22972 22973 22974 22975 22976 22977 22978 22979 22980 22981 22982 22983 22984 22985 22986 22987 22988 22989 22990 22991 22992 22993 22994 22995 22996 22997 22998 22999 23000 23001 23002 23003 23004 23005 23006 23007 23008 23009 23010 23011 23012 23013 23014 23015 23016 23017 23018 23019 23020 23021 23022 23023 23024 23025 23026 23027 23028 23029 23030 23031 23032 23033 23034 23035 23036 23037 23038 23039 23040 23041 23042 23043 23044 23045 23046 23047 23048 23049 23050 23051 23052 23053 23054 23055 23056 23057 23058 23059 23060 23061 23062 23063 23064 23065 23066 23067 23068 23069 23070 23071 23072 23073 23074 23075 23076 23077 23078 23079 23080 23081 23082 23083 23084 23085 23086 23087 23088 23089 23090 23091 23092 23093 23094 23095 23096 23097 23098 23099 23100 23101 23102 23103 23104 23105 23106 23107 23108 23109 23110 23111 23112 23113 23114 23115 23116 23117 23118 23119 23120 23121 23122 23123 23124 23125 23126 23127 23128 23129 23130 23131 23132 23133 23134 23135 23136 23137 23138 23139 23140 23141 23142 23143 23144 23145 23146 23147 23148 23149 23150 23151 23152 23153 23154 23155 23156 23157 23158 23159 23160 23161 23162 23163 23164 23165 23166 23167 23168 23169 23170 23171 23172 23173 23174 23175 23176 23177 23178 23179 23180 23181 23182 23183 23184 23185 23186 23187 23188 23189 23190 23191 23192 23193 23194 23195 23196 23197 23198 23199 23200 23201 23202 23203 23204 23205 23206 23207 23208 23209 23210 23211 23212 23213 23214 23215 23216 23217 23218 23219 23220 23221 23222 23223 23224 23225 23226 23227 23228 23229 23230 23231 23232 23233 23234 23235 23236 23237 23238 23239 23240 23241 23242 23243 23244 23245 23246 23247 23248 23249 23250 23251 23252 23253 23254 23255 23256 23257 23258 23259 23260 23261 23262 23263 23264 23265 23266 23267 23268 23269 23270 23271 23272 23273 23274 23275 23276 23277 23278 23279 23280 23281 23282 23283 23284 23285 23286 23287 23288 23289 23290 23291 23292 23293 23294 23295 23296 23297 23298 23299 23300 23301 23302 23303 23304 23305 23306 23307 23308 23309 23310 23311 23312 23313 23314 23315 23316 23317 23318 23319 23320 23321 23322 23323 23324 23325 23326 23327 23328 23329 23330 23331 23332 23333 23334 23335 23336 23337 23338 23339 23340 23341 23342 23343 23344 23345 23346 23347 23348 23349 23350 23351 23352 23353 23354 23355 23356 23357 23358 23359 23360 23361 23362 23363 23364 23365 23366 23367 23368 23369 23370 23371 23372 23373 23374 23375 23376 23377 23378 23379 23380 23381 23382 23383 23384 23385 23386 23387 23388 23389 23390 23391 23392 23393 23394 23395 23396 23397 23398 23399 23400 23401 23402 23403 23404 23405 23406 23407 23408 23409 23410 23411 23412 23413 23414 23415 23416 23417 23418 23419 23420 23421 23422 23423 23424 23425 23426 23427 23428 23429 23430 23431 23432 23433 23434 23435 23436 23437 23438 23439 23440 23441 23442 23443 23444 23445 23446 23447 23448 23449 23450 23451 23452 23453 23454 23455 23456 23457 23458 23459 23460 23461 23462 23463 23464 23465 23466 23467 23468 23469 23470 23471 23472 23473 23474 23475 23476 23477 23478 23479 23480 23481 23482 23483 23484 23485 23486 23487 23488 23489 23490 23491 23492 23493 23494 23495 23496 23497 23498 23499 23500 23501 23502 23503 23504 23505 23506 23507 23508 23509 23510 23511 23512 23513 23514 23515 23516 23517 23518 23519 23520 23521 23522 23523 23524 23525 23526 23527 23528 23529 23530 23531 23532 23533 23534 23535 23536 23537 23538 23539 23540 23541 23542 23543 23544 23545 23546 23547 23548 23549 23550 23551 23552 23553 23554 23555 23556 23557 23558 23559 23560 23561 23562 23563 23564 23565 23566 23567 23568 23569 23570 23571 23572 23573 23574 23575 23576 23577 23578 23579 23580 23581 23582 23583 23584 23585 23586 23587 23588 23589 23590 23591 23592 23593 23594 23595 23596 23597 23598 23599 23600 23601 23602 23603 23604 23605 23606 23607 23608 23609 23610 23611 23612 23613 23614 23615 23616 23617 23618 23619 23620 23621 23622 23623 23624 23625 23626 23627 23628 23629 23630 23631 23632 23633 23634 23635 23636 23637 23638 23639 23640 23641 23642 23643 23644 23645 23646 23647 23648 23649 23650 23651 23652 23653 23654 23655 23656 23657 23658 23659 23660 23661 23662 23663 23664 23665 23666 23667 23668 23669 23670 23671 23672 23673 23674 23675 23676 23677 23678 23679 23680 23681 23682 23683 23684 23685 23686 23687 23688 23689 23690 23691 23692 23693 23694 23695 23696 23697 23698 23699 23700 23701 23702 23703 23704 23705 23706 23707 23708 23709 23710 23711 23712 23713 23714 23715 23716 23717 23718 23719 23720 23721 23722 23723 23724 23725 23726 23727 23728 23729 23730 23731 23732 23733 23734 23735 23736 23737 23738 23739 23740 23741 23742 23743 23744 23745 23746 23747 23748 23749 23750 23751 23752 23753 23754 23755 23756 23757 23758 23759 23760 23761 23762 23763 23764 23765 23766 23767 23768 23769 23770 23771 23772 23773 23774 23775 23776 23777 23778 23779 23780 23781 23782 23783 23784 23785 23786 23787 23788 23789 23790 23791 23792 23793 23794 23795 23796 23797 23798 23799 23800 23801 23802 23803 23804 23805 23806 23807 23808 23809 23810 23811 23812 23813 23814 23815 23816 23817 23818 23819 23820 23821 23822 23823 23824 23825 23826 23827 23828 23829 23830 23831 23832 23833 23834 23835 23836 23837 23838 23839 23840 23841 23842 23843 23844 23845 23846 23847 23848 23849 23850 23851 23852 23853 23854 23855 23856 23857 23858 23859 23860 23861 23862 23863 23864 23865 23866 23867 23868 23869 23870 23871 23872 23873 23874 23875 23876 23877 23878 23879 23880 23881 23882 23883 23884 23885 23886 23887 23888 23889 23890 23891 23892 23893 23894 23895 23896 23897 23898 23899 23900 23901 23902 23903 23904 23905 23906 23907 23908 23909 23910 23911 23912 23913 23914 23915 23916 23917 23918 23919 23920 23921 23922 23923 23924 23925 23926 23927 23928 23929 23930 23931 23932 23933 23934 23935 23936 23937 23938 23939 23940 23941 23942 23943 23944 23945 23946 23947 23948 23949 23950 23951 23952 23953 23954 23955 23956 23957 23958 23959 23960 23961 23962 23963 23964 23965 23966 23967 23968 23969 23970 23971 23972 23973 23974 23975 23976 23977 23978 23979 23980 23981 23982 23983 23984 23985 23986 23987 23988 23989 23990 23991 23992 23993 23994 23995 23996 23997 23998 23999 24000 24001 24002 24003 24004 24005 24006 24007 24008 24009 24010 24011 24012 24013 24014 24015 24016 24017 24018 24019 24020 24021 24022 24023 24024 24025 24026 24027 24028 24029 24030 24031 24032 24033 24034 24035 24036 24037 24038 24039 24040 24041 24042 24043 24044 24045 24046 24047 24048 24049 24050 24051 24052 24053 24054 24055 24056 24057 24058 24059 24060 24061 24062 24063 24064 24065 24066 24067 24068 24069 24070 24071 24072 24073 24074 24075 24076 24077 24078 24079 24080 24081 24082 24083 24084 24085 24086 24087 24088 24089 24090 24091 24092 24093 24094 24095 24096 24097 24098 24099 24100 24101 24102 24103 24104 24105 24106 24107 24108 24109 24110 24111 24112 24113 24114 24115 24116 24117 24118 24119 24120 24121 24122 24123 24124 24125 24126 24127 24128 24129 24130 24131 24132 24133 24134 24135 24136 24137 24138 24139 24140 24141 24142 24143 24144 24145 24146 24147 24148 24149 24150 24151 24152 24153 24154 24155 24156 24157 24158 24159 24160 24161 24162 24163 24164 24165 24166 24167 24168 24169 24170 24171 24172 24173 24174 24175 24176 24177 24178 24179 24180 24181 24182 24183 24184 24185 24186 24187 24188 24189 24190 24191 24192 24193 24194 24195 24196 24197 24198 24199 24200 24201 24202 24203 24204 24205 24206 24207 24208 24209 24210 24211 24212 24213 24214 24215 24216 24217 24218 24219 24220 24221 24222 24223 24224 24225 24226 24227 24228 24229 24230 24231 24232 24233 24234 24235 24236 24237 24238 24239 24240 24241 24242 24243 24244 24245 24246 24247 24248 24249 24250 24251 24252 24253 24254 24255 24256 24257 24258 24259 24260 24261 24262 24263 24264 24265 24266 24267 24268 24269 24270 24271 24272 24273 24274 24275 24276 24277 24278 24279 24280 24281 24282 24283 24284 24285 24286 24287 24288 24289 24290 24291 24292 24293 24294 24295 24296 24297 24298 24299 24300 24301 24302 24303 24304 24305 24306 24307 24308 24309 24310 24311 24312 24313 24314 24315 24316 24317 24318 24319 24320 24321 24322 24323 24324 24325 24326 24327 24328 24329 24330 24331 24332 24333 24334 24335 24336 24337 24338 24339 24340 24341 24342 24343 24344 24345 24346 24347 24348 24349 24350 24351 24352 24353 24354 24355 24356 24357 24358 24359 24360 24361 24362 24363 24364 24365 24366 24367 24368 24369 24370 24371 24372 24373 24374 24375 24376 24377 24378 24379 24380 24381 24382 24383 24384 24385 24386 24387 24388 24389 24390 24391 24392 24393 24394 24395 24396 24397 24398 24399 24400 24401 24402 24403 24404 24405 24406 24407 24408 24409 24410 24411 24412 24413 24414 24415 24416 24417 24418 24419 24420 24421 24422 24423 24424 24425 24426 24427 24428 24429 24430 24431 24432 24433 24434 24435 24436 24437 24438 24439 24440 24441 24442 24443 24444 24445 24446 24447 24448 24449 24450 24451 24452 24453 24454 24455 24456 24457 24458 24459 24460 24461 24462 24463 24464 24465 24466 24467 24468 24469 24470 24471 24472 24473 24474 24475 24476 24477 24478 24479 24480 24481 24482 24483 24484 24485 24486 24487 24488 24489 24490 24491 24492 24493 24494 24495 24496 24497 24498 24499 24500 24501 24502 24503 24504 24505 24506 24507 24508 24509 24510 24511 24512 24513 24514 24515 24516 24517 24518 24519 24520 24521 24522 24523 24524 24525 24526 24527 24528 24529 24530 24531 24532 24533 24534 24535 24536 24537 24538 24539 24540 24541 24542 24543 24544 24545 24546 24547 24548 24549 24550 24551 24552 24553 24554 24555 24556 24557 24558 24559 24560 24561 24562 24563 24564 24565 24566 24567 24568 24569 24570 24571 24572 24573 24574 24575 24576 24577 24578 24579 24580 24581 24582 24583 24584 24585 24586 24587 24588 24589 24590 24591 24592 24593 24594 24595 24596 24597 24598 24599 24600 24601 24602 24603 24604 24605 24606 24607 24608 24609 24610 24611 24612 24613 24614 24615 24616 24617 24618 24619 24620 24621 24622 24623 24624 24625 24626 24627 24628 24629 24630 24631 24632 24633 24634 24635 24636 24637 24638 24639 24640 24641 24642 24643 24644 24645 24646 24647 24648 24649 24650 24651 24652 24653 24654 24655 24656 24657 24658 24659 24660 24661 24662 24663 24664 24665 24666 24667 24668 24669 24670 24671 24672 24673 24674 24675 24676 24677 24678 24679 24680 24681 24682 24683 24684 24685 24686 24687 24688 24689 24690 24691 24692 24693 24694 24695 24696 24697 24698 24699 24700 24701 24702 24703 24704 24705 24706 24707 24708 24709 24710 24711 24712 24713 24714 24715 24716 24717 24718 24719 24720 24721 24722 24723 24724 24725 24726 24727 24728 24729 24730 24731 24732 24733 24734 24735 24736 24737 24738 24739 24740 24741 24742 24743 24744 24745 24746 24747 24748 24749 24750 24751 24752 24753 24754 24755 24756 24757 24758 24759 24760 24761 24762 24763 24764 24765 24766 24767 24768 24769 24770 24771 24772 24773 24774 24775 24776 24777 24778 24779 24780 24781 24782 24783 24784 24785 24786 24787 24788 24789 24790 24791 24792 24793 24794 24795 24796 24797 24798 24799 24800 24801 24802 24803 24804 24805 24806 24807 24808 24809 24810 24811 24812 24813 24814 24815 24816 24817 24818 24819 24820 24821 24822 24823 24824 24825 24826 24827 24828 24829 24830 24831 24832 24833 24834 24835 24836 24837 24838 24839 24840 24841 24842 24843 24844 24845 24846 24847 24848 24849 24850 24851 24852 24853 24854 24855 24856 24857 24858 24859 24860 24861 24862 24863 24864 24865 24866 24867 24868 24869 24870 24871 24872 24873 24874 24875 24876 24877 24878 24879 24880 24881 24882 24883 24884 24885 24886 24887 24888 24889 24890 24891 24892 24893 24894 24895 24896 24897 24898 24899 24900 24901 24902 24903 24904 24905 24906 24907 24908 24909 24910 24911 24912 24913 24914 24915 24916 24917 24918 24919 24920 24921 24922 24923 24924 24925 24926 24927 24928 24929 24930 24931 24932 24933 24934 24935 24936 24937 24938 24939 24940 24941 24942 24943 24944 24945 24946 24947 24948 24949 24950 24951 24952 24953 24954 24955 24956 24957 24958 24959 24960 24961 24962 24963 24964 24965 24966 24967 24968 24969 24970 24971 24972 24973 24974 24975 24976 24977 24978 24979 24980 24981 24982 24983 24984 24985 24986 24987 24988 24989 24990 24991 24992 24993 24994 24995 24996 24997 24998 24999 25000 25001 25002 25003 25004 25005 25006 25007 25008 25009 25010 25011 25012 25013 25014 25015 25016 25017 25018 25019 25020 25021 25022 25023 25024 25025 25026 25027 25028 25029 25030 25031 25032 25033 25034 25035 25036 25037 25038 25039 25040 25041 25042 25043 25044 25045 25046 25047 25048 25049 25050 25051 25052 25053 25054 25055 25056 25057 25058 25059 25060 25061 25062 25063 25064 25065 25066 25067 25068 25069 25070 25071 25072 25073 25074 25075 25076 25077 25078 25079 25080 25081 25082 25083 25084 25085 25086 25087 25088 25089 25090 25091 25092 25093 25094 25095 25096 25097 25098 25099 25100 25101 25102 25103 25104 25105 25106 25107 25108 25109 25110 25111 25112 25113 25114 25115 25116 25117 25118 25119 25120 25121 25122 25123 25124 25125 25126 25127 25128 25129 25130 25131 25132 25133 25134 25135 25136 25137 25138 25139 25140 25141 25142 25143 25144 25145 25146 25147 25148 25149 25150 25151 25152 25153 25154 25155 25156 25157 25158 25159 25160 25161 25162 25163 25164 25165 25166 25167 25168 25169 25170 25171 25172 25173 25174 25175 25176 25177 25178 25179 25180 25181 25182 25183 25184 25185 25186 25187 25188 25189 25190 25191 25192 25193 25194 25195 25196 25197 25198 25199 25200 25201 25202 25203 25204 25205 25206 25207 25208 25209 25210 25211 25212 25213 25214 25215 25216 25217 25218 25219 25220 25221 25222 25223 25224 25225 25226 25227 25228 25229 25230 25231 25232 25233 25234 25235 25236 25237 25238 25239 25240 25241 25242 25243 25244 25245 25246 25247 25248 25249 25250 25251 25252 25253 25254 25255 25256 25257 25258 25259 25260 25261 25262 25263 25264 25265 25266 25267 25268 25269 25270 25271 25272 25273 25274 25275 25276 25277 25278 25279 25280 25281 25282 25283 25284 25285 25286 25287 25288 25289 25290 25291 25292 25293 25294 25295 25296 25297 25298 25299 25300 25301 25302 25303 25304 25305 25306 25307 25308 25309 25310 25311 25312 25313 25314 25315 25316 25317 25318 25319 25320 25321 25322 25323 25324 25325 25326 25327 25328 25329 25330 25331 25332 25333 25334 25335 25336 25337 25338 25339 25340 25341 25342 25343 25344 25345 25346 25347 25348 25349 25350 25351 25352 25353 25354 25355 25356 25357 25358 25359 25360 25361 25362 25363 25364 25365 25366 25367 25368 25369 25370 25371 25372 25373 25374 25375 25376 25377 25378 25379 25380 25381 25382 25383 25384 25385 25386 25387 25388 25389 25390 25391 25392 25393 25394 25395 25396 25397 25398 25399 25400 25401 25402 25403 25404 25405 25406 25407 25408 25409 25410 25411 25412 25413 25414 25415 25416 25417 25418 25419 25420 25421 25422 25423 25424 25425 25426 25427 25428 25429 25430 25431 25432 25433 25434 25435 25436 25437 25438 25439 25440 25441 25442 25443 25444 25445 25446 25447 25448 25449 25450 25451 25452 25453 25454 25455 25456 25457 25458 25459 25460 25461 25462 25463 25464 25465 25466 25467 25468 25469 25470 25471 25472 25473 25474 25475 25476 25477 25478 25479 25480 25481 25482 25483 25484 25485 25486 25487 25488 25489 25490 25491 25492 25493 25494 25495 25496 25497 25498 25499 25500 25501 25502 25503 25504 25505 25506 25507 25508 25509 25510 25511 25512 25513 25514 25515 25516 25517 25518 25519 25520 25521 25522 25523 25524 25525 25526 25527 25528 25529 25530 25531 25532 25533 25534 25535 25536 25537 25538 25539 25540 25541 25542 25543 25544 25545 25546 25547 25548 25549 25550 25551 25552 25553 25554 25555 25556 25557 25558 25559 25560 25561 25562 25563 25564 25565 25566 25567 25568 25569 25570 25571 25572 25573 25574 25575 25576 25577 25578 25579 25580 25581 25582 25583 25584 25585 25586 25587 25588 25589 25590 25591 25592 25593 25594 25595 25596 25597 25598 25599 25600 25601 25602 25603 25604 25605 25606 25607 25608 25609 25610 25611 25612 25613 25614 25615 25616 25617 25618 25619 25620 25621 25622 25623 25624 25625 25626 25627 25628 25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949 25950 25951 25952 25953 25954 25955 25956 25957 25958 25959 25960 25961 25962 25963 25964 25965 25966 25967 25968 25969 25970 25971 25972 25973 25974 25975 25976 25977 25978 25979 25980 25981 25982 25983 25984 25985 25986 25987 25988 25989 25990 25991 25992 25993 25994 25995 25996 25997 25998 25999 26000 26001 26002 26003 26004 26005 26006 26007 26008 26009 26010 26011 26012 26013 26014 26015 26016 26017 26018 26019 26020 26021 26022 26023 26024 26025 26026 26027 26028 26029 26030 26031 26032 26033 26034 26035 26036 26037 26038 26039 26040 26041 26042 26043 26044 26045 26046 26047 26048 26049 26050 26051 26052 26053 26054 26055 26056 26057 26058 26059 26060 26061 26062 26063 26064 26065 26066 26067 26068 26069 26070 26071 26072 26073 26074 26075 26076 26077 26078 26079 26080 26081 26082 26083 26084 26085 26086 26087 26088 26089 26090 26091 26092 26093 26094 26095 26096 26097 26098 26099 26100 26101 26102 26103 26104 26105 26106 26107 26108 26109 26110 26111 26112 26113 26114 26115 26116 26117 26118 26119 26120 26121 26122 26123 26124 26125 26126 26127 26128 26129 26130 26131 26132 26133 26134 26135 26136 26137 26138 26139 26140 26141 26142 26143 26144 26145 26146 26147 26148 26149 26150 26151 26152 26153 26154 26155 26156 26157 26158 26159 26160 26161 26162 26163 26164 26165 26166 26167 26168 26169 26170 26171 26172 26173 26174 26175 26176 26177 26178 26179 26180 26181 26182 26183 26184 26185 26186 26187 26188 26189 26190 26191 26192 26193 26194 26195 26196 26197 26198 26199 26200 26201 26202 26203 26204 26205 26206 26207 26208 26209 26210 26211 26212 26213 26214 26215 26216 26217 26218 26219 26220 26221 26222 26223 26224 26225 26226 26227 26228 26229 26230 26231 26232 26233 26234 26235 26236 26237 26238 26239 26240 26241 26242 26243 26244 26245 26246 26247 26248 26249 26250 26251 26252 26253 26254 26255 26256 26257 26258 26259 26260 26261 26262 26263 26264 26265 26266 26267 26268 26269 26270 26271 26272 26273 26274 26275 26276 26277 26278 26279 26280 26281 26282 26283 26284 26285 26286 26287 26288 26289 26290 26291 26292 26293 26294 26295 26296 26297 26298 26299 26300 26301 26302 26303 26304 26305 26306 26307 26308 26309 26310 26311 26312 26313 26314 26315 26316 26317 26318 26319 26320 26321 26322 26323 26324 26325 26326 26327 26328 26329 26330 26331 26332 26333 26334 26335 26336 26337 26338 26339 26340 26341 26342 26343 26344 26345 26346 26347 26348 26349 26350 26351 26352 26353 26354 26355 26356 26357 26358 26359 26360 26361 26362 26363 26364 26365 26366 26367 26368 26369 26370 26371 26372 26373 26374 26375 26376 26377 26378 26379 26380 26381 26382 26383 26384 26385 26386 26387 26388 26389 26390 26391 26392 26393 26394 26395 26396 26397 26398 26399 26400 26401 26402 26403 26404 26405 26406 26407 26408 26409 26410 26411 26412 26413 26414 26415 26416 26417 26418 26419 26420 26421 26422 26423 26424 26425 26426 26427 26428 26429 26430 26431 26432 26433 26434 26435 26436 26437 26438 26439 26440 26441 26442 26443 26444 26445 26446 26447 26448 26449 26450 26451 26452 26453 26454 26455 26456 26457 26458 26459 26460 26461 26462 26463 26464 26465 26466 26467 26468 26469 26470 26471 26472 26473 26474 26475 26476 26477 26478 26479 26480 26481 26482 26483 26484 26485 26486 26487 26488 26489 26490 26491 26492 26493 26494 26495 26496 26497 26498 26499 26500 26501 26502 26503 26504 26505 26506 26507 26508 26509 26510 26511 26512 26513 26514 26515 26516 26517 26518 26519 26520 26521 26522 26523 26524 26525 26526 26527 26528 26529 26530 26531 26532 26533 26534 26535 26536 26537 26538 26539 26540 26541 26542 26543 26544 26545 26546 26547 26548 26549 26550 26551 26552 26553 26554 26555 26556 26557 26558 26559 26560 26561 26562 26563 26564 26565 26566 26567 26568 26569 26570 26571 26572 26573 26574 26575 26576 26577 26578 26579 26580 26581 26582 26583 26584 26585 26586 26587 26588 26589 26590 26591 26592 26593 26594 26595 26596 26597 26598 26599 26600 26601 26602 26603 26604 26605 26606 26607 26608 26609 26610 26611 26612 26613 26614 26615 26616 26617 26618 26619 26620 26621 26622 26623 26624 26625 26626 26627 26628 26629 26630 26631 26632 26633 26634 26635 26636 26637 26638 26639 26640 26641 26642 26643 26644 26645 26646 26647 26648 26649 26650 26651 26652 26653 26654 26655 26656 26657 26658 26659 26660 26661 26662 26663 26664 26665 26666 26667 26668 26669 26670 26671 26672 26673 26674 26675 26676 26677 26678 26679 26680 26681 26682 26683 26684 26685 26686 26687 26688 26689 26690 26691 26692 26693 26694 26695 26696 26697 26698 26699 26700 26701 26702 26703 26704 26705 26706 26707 26708 26709 26710 26711 26712 26713 26714 26715 26716 26717 26718 26719 26720 26721 26722 26723 26724 26725 26726 26727 26728 26729 26730 26731 26732 26733 26734 26735 26736 26737 26738 26739 26740 26741 26742 26743 26744 26745 26746 26747 26748 26749 26750 26751 26752 26753 26754 26755 26756 26757 26758 26759 26760 26761 26762 26763 26764 26765 26766 26767 26768 26769 26770 26771 26772 26773 26774 26775 26776 26777 26778 26779 26780 26781 26782 26783 26784 26785 26786 26787 26788 26789 26790 26791 26792 26793 26794 26795 26796 26797 26798 26799 26800 26801 26802 26803 26804 26805 26806 26807 26808 26809 26810 26811 26812 26813 26814 26815 26816 26817 26818 26819 26820 26821 26822 26823 26824 26825 26826 26827 26828 26829 26830 26831 26832 26833 26834 26835 26836 26837 26838 26839 26840 26841 26842 26843 26844 26845 26846 26847 26848 26849 26850 26851 26852 26853 26854 26855 26856 26857 26858 26859 26860 26861 26862 26863 26864 26865 26866 26867 26868 26869 26870 26871 26872 26873 26874 26875 26876 26877 26878 26879 26880 26881 26882 26883 26884 26885 26886 26887 26888 26889 26890 26891 26892 26893 26894 26895 26896 26897 26898 26899 26900 26901 26902 26903 26904 26905 26906 26907 26908 26909 26910 26911 26912 26913 26914 26915 26916 26917 26918 26919 26920 26921 26922 26923 26924 26925 26926 26927 26928 26929 26930 26931 26932 26933 26934 26935 26936 26937 26938 26939 26940 26941 26942 26943 26944 26945 26946 26947 26948 26949 26950 26951 26952 26953 26954 26955 26956 26957 26958 26959 26960 26961 26962 26963 26964 26965 26966 26967 26968 26969 26970 26971 26972 26973 26974 26975 26976 26977 26978 26979 26980 26981 26982 26983 26984 26985 26986 26987 26988 26989 26990 26991 26992 26993 26994 26995 26996 26997 26998 26999 27000 27001 27002 27003 27004 27005 27006 27007 27008 27009 27010 27011 27012 27013 27014 27015 27016 27017 27018 27019 27020 27021 27022 27023 27024 27025 27026 27027 27028 27029 27030 27031 27032 27033 27034 27035 27036 27037 27038 27039 27040 27041 27042 27043 27044 27045 27046 27047 27048 27049 27050 27051 27052 27053 27054 27055 27056 27057 27058 27059 27060 27061 27062 27063 27064 27065 27066 27067 27068 27069 27070 27071 27072 27073 27074 27075 27076 27077 27078 27079 27080 27081 27082 27083 27084 27085 27086 27087 27088 27089 27090 27091 27092 27093 27094 27095 27096 27097 27098 27099 27100 27101 27102 27103 27104 27105 27106 27107 27108 27109 27110 27111 27112 27113 27114 27115 27116 27117 27118 27119 27120 27121 27122 27123 27124 27125 27126 27127 27128 27129 27130 27131 27132 27133 27134 27135 27136 27137 27138 27139 27140 27141 27142 27143 27144 27145 27146 27147 27148 27149 27150 27151 27152 27153 27154 27155 27156 27157 27158 27159 27160 27161 27162 27163 27164 27165 27166 27167 27168 27169 27170 27171 27172 27173 27174 27175 27176 27177 27178 27179 27180 27181 27182 27183 27184 27185 27186 27187 27188 27189 27190 27191 27192 27193 27194 27195 27196 27197 27198 27199 27200 27201 27202 27203 27204 27205 27206 27207 27208 27209 27210 27211 27212 27213 27214 27215 27216 27217 27218 27219 27220 27221 27222 27223 27224 27225 27226 27227 27228 27229 27230 27231 27232 27233 27234 27235 27236 27237 27238 27239 27240 27241 27242 27243 27244 27245 27246 27247 27248 27249 27250 27251 27252 27253 27254 27255 27256 27257 27258 27259 27260 27261 27262 27263 27264 27265 27266 27267 27268 27269 27270 27271 27272 27273 27274 27275 27276 27277 27278 27279 27280 27281 27282 27283 27284 27285 27286 27287 27288 27289 27290 27291 27292 27293 27294 27295 27296 27297 27298 27299 27300 27301 27302 27303 27304 27305 27306 27307 27308 27309 27310 27311 27312 27313 27314 27315 27316 27317 27318 27319 27320 27321 27322 27323 27324 27325 27326 27327 27328 27329 27330 27331 27332 27333 27334 27335 27336 27337 27338 27339 27340 27341 27342 27343 27344 27345 27346 27347 27348 27349 27350 27351 27352 27353 27354 27355 27356 27357 27358 27359 27360 27361 27362 27363 27364 27365 27366 27367 27368 27369 27370 27371 27372 27373 27374 27375 27376 27377 27378 27379 27380 27381 27382 27383 27384 27385 27386 27387 27388 27389 27390 27391 27392 27393 27394 27395 27396 27397 27398 27399 27400 27401 27402 27403 27404 27405 27406 27407 27408 27409 27410 27411 27412 27413 27414 27415 27416 27417 27418 27419 27420 27421 27422 27423 27424 27425 27426 27427 27428 27429 27430 27431 27432 27433 27434 27435 27436 27437 27438 27439 27440 27441 27442 27443 27444 27445 27446 27447 27448 27449 27450 27451 27452 27453 27454 27455 27456 27457 27458 27459 27460 27461 27462 27463 27464 27465 27466 27467 27468 27469 27470 27471 27472 27473 27474 27475 27476 27477 27478 27479 27480 27481 27482 27483 27484 27485 27486 27487 27488 27489 27490 27491 27492 27493 27494 27495 27496 27497 27498 27499 27500 27501 27502 27503 27504 27505 27506 27507 27508 27509 27510 27511 27512 27513 27514 27515 27516 27517 27518 27519 27520 27521 27522 27523 27524 27525 27526 27527 27528 27529 27530 27531 27532 27533 27534 27535 27536 27537 27538 27539 27540 27541 27542 27543 27544 27545 27546 27547 27548 27549 27550 27551 27552 27553 27554 27555 27556 27557 27558 27559 27560 27561 27562 27563 27564 27565 27566 27567 27568 27569 27570 27571 27572 27573 27574 27575 27576 27577 27578 27579 27580 27581 27582 27583 27584 27585 27586 27587 27588 27589 27590 27591 27592 27593 27594 27595 27596 27597 27598 27599 27600 27601 27602 27603 27604 27605 27606 27607 27608 27609 27610 27611 27612 27613 27614 27615 27616 27617 27618 27619 27620 27621 27622 27623 27624 27625 27626 27627 27628 27629 27630 27631 27632 27633 27634 27635 27636 27637 27638 27639 27640 27641 27642 27643 27644 27645 27646 27647 27648 27649 27650 27651 27652 27653 27654 27655 27656 27657 27658 27659 27660 27661 27662 27663 27664 27665 27666 27667 27668 27669 27670 27671 27672 27673 27674 27675 27676 27677 27678 27679 27680 27681 27682 27683 27684 27685 27686 27687 27688 27689 27690 27691 27692 27693 27694 27695 27696 27697 27698 27699 27700 27701 27702 27703 27704 27705 27706 27707 27708 27709 27710 27711 27712 27713 27714 27715 27716 27717 27718 27719 27720 27721 27722 27723 27724 27725 27726 27727 27728 27729 27730 27731 27732 27733 27734 27735 27736 27737 27738 27739 27740 27741 27742 27743 27744 27745 27746 27747 27748 27749 27750 27751 27752 27753 27754 27755 27756 27757 27758 27759 27760 27761 27762 27763 27764 27765 27766 27767 27768 27769 27770 27771 27772 27773 27774 27775 27776 27777 27778 27779 27780 27781 27782 27783 27784 27785 27786 27787 27788 27789 27790 27791 27792 27793 27794 27795 27796 27797 27798 27799 27800 27801 27802 27803 27804 27805 27806 27807 27808 27809 27810 27811 27812 27813 27814 27815 27816 27817 27818 27819 27820 27821 27822 27823 27824 27825 27826 27827 27828 27829 27830 27831 27832 27833 27834 27835 27836 27837 27838 27839 27840 27841 27842 27843 27844 27845 27846 27847 27848 27849 27850 27851 27852 27853 27854 27855 27856 27857 27858 27859 27860 27861 27862 27863 27864 27865 27866 27867 27868 27869 27870 27871 27872 27873 27874 27875 27876 27877 27878 27879 27880 27881 27882 27883 27884 27885 27886 27887 27888 27889 27890 27891 27892 27893 27894 27895 27896 27897 27898 27899 27900 27901 27902 27903 27904 27905 27906 27907 27908 27909 27910 27911 27912 27913 27914 27915 27916 27917 27918 27919 27920 27921 27922 27923 27924 27925 27926 27927 27928 27929 27930 27931 27932 27933 27934 27935 27936 27937 27938 27939 27940 27941 27942 27943 27944 27945 27946 27947 27948 27949 27950 27951 27952 27953 27954 27955 27956 27957 27958 27959 27960 27961 27962 27963 27964 27965 27966 27967 27968 27969 27970 27971 27972 27973 27974 27975 27976 27977 27978 27979 27980 27981 27982 27983 27984 27985 27986 27987 27988 27989 27990 27991 27992 27993 27994 27995 27996 27997 27998 27999 28000 28001 28002 28003 28004 28005 28006 28007 28008 28009 28010 28011 28012 28013 28014 28015 28016 28017 28018 28019 28020 28021 28022 28023 28024 28025 28026 28027 28028 28029 28030 28031 28032 28033 28034 28035 28036 28037 28038 28039 28040 28041 28042 28043 28044 28045 28046 28047 28048 28049 28050 28051 28052 28053 28054 28055 28056 28057 28058 28059 28060 28061 28062 28063 28064 28065 28066 28067 28068 28069 28070 28071 28072 28073 28074 28075 28076 28077 28078 28079 28080 28081 28082 28083 28084 28085 28086 28087 28088 28089 28090 28091 28092 28093 28094 28095 28096 28097 28098 28099 28100 28101 28102 28103 28104 28105 28106 28107 28108 28109 28110 28111 28112 28113 28114 28115 28116 28117 28118 28119 28120 28121 28122 28123 28124 28125 28126 28127 28128 28129 28130 28131 28132 28133 28134 28135 28136 28137 28138 28139 28140 28141 28142 28143 28144 28145 28146 28147 28148 28149 28150 28151 28152 28153 28154 28155 28156 28157 28158 28159 28160 28161 28162 28163 28164 28165 28166 28167 28168 28169 28170 28171 28172 28173 28174 28175 28176 28177 28178 28179 28180 28181 28182 28183 28184 28185 28186 28187 28188 28189 28190 28191 28192 28193 28194 28195 28196 28197 28198 28199 28200 28201 28202 28203 28204 28205 28206 28207 28208 28209 28210 28211 28212 28213 28214 28215 28216 28217 28218 28219 28220 28221 28222 28223 28224 28225 28226 28227 28228 28229 28230 28231 28232 28233 28234 28235 28236 28237 28238 28239 28240 28241 28242 28243 28244 28245 28246 28247 28248 28249 28250 28251 28252 28253 28254 28255 28256 28257 28258 28259 28260 28261 28262 28263 28264 28265 28266 28267 28268 28269 28270 28271 28272 28273 28274 28275 28276 28277 28278 28279 28280 28281 28282 28283 28284 28285 28286 28287 28288 28289 28290 28291 28292 28293 28294 28295 28296 28297 28298 28299 28300 28301 28302 28303 28304 28305 28306 28307 28308 28309 28310 28311 28312 28313 28314 28315 28316 28317 28318 28319 28320 28321 28322 28323 28324 28325 28326 28327 28328 28329 28330 28331 28332 28333 28334 28335 28336 28337 28338 28339 28340 28341 28342 28343 28344 28345 28346 28347 28348 28349 28350 28351 28352 28353 28354 28355 28356 28357 28358 28359 28360 28361 28362 28363 28364 28365 28366 28367 28368 28369 28370 28371 28372 28373 28374 28375 28376 28377 28378 28379 28380 28381 28382 28383 28384 28385 28386 28387 28388 28389 28390 28391 28392 28393 28394 28395 28396 28397 28398 28399 28400 28401 28402 28403 28404 28405 28406 28407 28408 28409 28410 28411 28412 28413 28414 28415 28416 28417 28418 28419 28420 28421 28422 28423 28424 28425 28426 28427 28428 28429 28430 28431 28432 28433 28434 28435 28436 28437 28438 28439 28440 28441 28442 28443 28444 28445 28446 28447 28448 28449 28450 28451 28452 28453 28454 28455 28456 28457 28458 28459 28460 28461 28462 28463 28464 28465 28466 28467 28468 28469 28470 28471 28472 28473 28474 28475 28476 28477 28478 28479 28480 28481 28482 28483 28484 28485 28486 28487 28488 28489 28490 28491 28492 28493 28494 28495 28496 28497 28498 28499 28500 28501 28502 28503 28504 28505 28506 28507 28508 28509 28510 28511 28512 28513 28514 28515 28516 28517 28518 28519 28520 28521 28522 28523 28524 28525 28526 28527 28528 28529 28530 28531 28532 28533 28534 28535 28536 28537 28538 28539 28540 28541 28542 28543 28544 28545 28546 28547 28548 28549 28550 28551 28552 28553 28554 28555 28556 28557 28558 28559 28560 28561 28562 28563 28564 28565 28566 28567 28568 28569 28570 28571 28572 28573 28574 28575 28576 28577 28578 28579 28580 28581 28582 28583 28584 28585 28586 28587 28588 28589 28590 28591 28592 28593 28594 28595 28596 28597 28598 28599 28600 28601 28602 28603 28604 28605 28606 28607 28608 28609 28610 28611 28612 28613 28614 28615 28616 28617 28618 28619 28620 28621 28622 28623 28624 28625 28626 28627 28628 28629 28630 28631 28632 28633 28634 28635 28636 28637 28638 28639 28640 28641 28642 28643 28644 28645 28646 28647 28648 28649 28650 28651 28652 28653 28654 28655 28656 28657 28658 28659 28660 28661 28662 28663 28664 28665 28666 28667 28668 28669 28670 28671 28672 28673 28674 28675 28676 28677 28678 28679 28680 28681 28682 28683 28684 28685 28686 28687 28688 28689 28690 28691 28692 28693 28694 28695 28696 28697 28698 28699 28700 28701 28702 28703 28704 28705 28706 28707 28708 28709 28710 28711 28712 28713 28714 28715 28716 28717 28718 28719 28720 28721 28722 28723 28724 28725 28726 28727 28728 28729 28730 28731 28732 28733 28734 28735 28736 28737 28738 28739 28740 28741 28742 28743 28744 28745 28746 28747 28748 28749 28750 28751 28752 28753 28754 28755 28756 28757 28758 28759 28760 28761 28762 28763 28764 28765 28766 28767 28768 28769 28770 28771 28772 28773 28774 28775 28776 28777 28778 28779 28780 28781 28782 28783 28784 28785 28786 28787 28788 28789 28790 28791 28792 28793 28794 28795 28796 28797 28798 28799 28800 28801 28802 28803 28804 28805 28806 28807 28808 28809 28810 28811 28812 28813 28814 28815 28816 28817 28818 28819 28820 28821 28822 28823 28824 28825 28826 28827 28828 28829 28830 28831 28832 28833 28834 28835 28836 28837 28838 28839 28840 28841 28842 28843 28844 28845 28846 28847 28848 28849 28850 28851 28852 28853 28854 28855 28856 28857 28858 28859 28860 28861 28862 28863 28864 28865 28866 28867 28868 28869 28870 28871 28872 28873 28874 28875 28876 28877 28878 28879 28880 28881 28882 28883 28884 28885 28886 28887 28888 28889 28890 28891 28892 28893 28894 28895 28896 28897 28898 28899 28900 28901 28902 28903 28904 28905 28906 28907 28908 28909 28910 28911 28912 28913 28914 28915 28916 28917 28918 28919 28920 28921 28922 28923 28924 28925 28926 28927 28928 28929 28930 28931 28932 28933 28934 28935 28936 28937 28938 28939 28940 28941 28942 28943 28944 28945 28946 28947 28948 28949 28950 28951 28952 28953 28954 28955 28956 28957 28958 28959 28960 28961 28962 28963 28964 28965 28966 28967 28968 28969 28970 28971 28972 28973 28974 28975 28976 28977 28978 28979 28980 28981 28982 28983 28984 28985 28986 28987 28988 28989 28990 28991 28992 28993 28994 28995 28996 28997 28998 28999 29000 29001 29002 29003 29004 29005 29006 29007 29008 29009 29010 29011 29012 29013 29014 29015 29016 29017 29018 29019 29020 29021 29022 29023 29024 29025 29026 29027 29028 29029 29030 29031 29032 29033 29034 29035 29036 29037 29038 29039 29040 29041 29042 29043 29044 29045 29046 29047 29048 29049 29050 29051 29052 29053 29054 29055 29056 29057 29058 29059 29060 29061 29062 29063 29064 29065 29066 29067 29068 29069 29070 29071 29072 29073 29074 29075 29076 29077 29078 29079 29080 29081 29082 29083 29084 29085 29086 29087 29088 29089 29090 29091 29092 29093 29094 29095 29096 29097 29098 29099 29100 29101 29102 29103 29104 29105 29106 29107 29108 29109 29110 29111 29112 29113 29114 29115 29116 29117 29118 29119 29120 29121 29122 29123 29124 29125 29126 29127 29128 29129 29130 29131 29132 29133 29134 29135 29136 29137 29138 29139 29140 29141 29142 29143 29144 29145 29146 29147 29148 29149 29150 29151 29152 29153 29154 29155 29156 29157 29158 29159 29160 29161 29162 29163 29164 29165 29166 29167 29168 29169 29170 29171 29172 29173 29174 29175 29176 29177 29178 29179 29180 29181 29182 29183 29184 29185 29186 29187 29188 29189 29190 29191 29192 29193 29194 29195 29196 29197 29198 29199 29200 29201 29202 29203 29204 29205 29206 29207 29208 29209 29210 29211 29212 29213 29214 29215 29216 29217 29218 29219 29220 29221 29222 29223 29224 29225 29226 29227 29228 29229 29230 29231 29232 29233 29234 29235 29236 29237 29238 29239 29240 29241 29242 29243 29244 29245 29246 29247 29248 29249 29250 29251 29252 29253 29254 29255 29256 29257 29258 29259 29260 29261 29262 29263 29264 29265 29266 29267 29268 29269 29270 29271 29272 29273 29274 29275 29276 29277 29278 29279 29280 29281 29282 29283 29284 29285 29286 29287 29288 29289 29290 29291 29292 29293 29294 29295 29296 29297 29298 29299 29300 29301 29302 29303 29304 29305 29306 29307 29308 29309 29310 29311 29312 29313 29314 29315 29316 29317 29318 29319 29320 29321 29322 29323 29324 29325 29326 29327 29328 29329 29330 29331 29332 29333 29334 29335 29336 29337 29338 29339 29340 29341 29342 29343 29344 29345 29346 29347 29348 29349 29350 29351 29352 29353 29354 29355 29356 29357 29358 29359 29360 29361 29362 29363 29364 29365 29366 29367 29368 29369 29370 29371 29372 29373 29374 29375 29376 29377 29378 29379 29380 29381 29382 29383 29384 29385 29386 29387 29388 29389 29390 29391 29392 29393 29394 29395 29396 29397 29398 29399 29400 29401 29402 29403 29404 29405 29406 29407 29408 29409 29410 29411 29412 29413 29414 29415 29416 29417 29418 29419 29420 29421 29422 29423 29424 29425 29426 29427 29428 29429 29430 29431 29432 29433 29434 29435 29436 29437 29438 29439 29440 29441 29442 29443 29444 29445 29446 29447 29448 29449 29450 29451 29452 29453 29454 29455 29456 29457 29458 29459 29460 29461 29462 29463 29464 29465 29466 29467 29468 29469 29470 29471 29472 29473 29474 29475 29476 29477 29478 29479 29480 29481 29482 29483 29484 29485 29486 29487 29488 29489 29490 29491 29492 29493 29494 29495 29496 29497 29498 29499 29500 29501 29502 29503 29504 29505 29506 29507 29508 29509 29510 29511 29512 29513 29514 29515 29516 29517 29518 29519 29520 29521 29522 29523 29524 29525 29526 29527 29528 29529 29530 29531 29532 29533 29534 29535 29536 29537 29538 29539 29540 29541 29542 29543 29544 29545 29546 29547 29548 29549 29550 29551 29552 29553 29554 29555 29556 29557 29558 29559 29560 29561 29562 29563 29564 29565 29566 29567 29568 29569 29570 29571 29572 29573 29574 29575 29576 29577 29578 29579 29580 29581 29582 29583 29584 29585 29586 29587 29588 29589 29590 29591 29592 29593 29594 29595 29596 29597 29598 29599 29600 29601 29602 29603 29604 29605 29606 29607 29608 29609 29610 29611 29612 29613 29614 29615 29616 29617 29618 29619 29620 29621 29622 29623 29624 29625 29626 29627 29628 29629 29630 29631 29632 29633 29634 29635 29636 29637 29638 29639 29640 29641 29642 29643 29644 29645 29646 29647 29648 29649 29650 29651 29652 29653 29654 29655 29656 29657 29658 29659 29660 29661 29662 29663 29664 29665 29666 29667 29668 29669 29670 29671 29672 29673 29674 29675 29676 29677 29678 29679 29680 29681 29682 29683 29684 29685 29686 29687 29688 29689 29690 29691 29692 29693 29694 29695 29696 29697 29698 29699 29700 29701 29702 29703 29704 29705 29706 29707 29708 29709 29710 29711 29712 29713 29714 29715 29716 29717 29718 29719 29720 29721 29722 29723 29724 29725 29726 29727 29728 29729 29730 29731 29732 29733 29734 29735 29736 29737 29738 29739 29740 29741 29742 29743 29744 29745 29746 29747 29748 29749 29750 29751 29752 29753 29754 29755 29756 29757 29758 29759 29760 29761 29762 29763 29764 29765 29766 29767 29768 29769 29770 29771 29772 29773 29774 29775 29776 29777 29778 29779 29780 29781 29782 29783 29784 29785 29786 29787 29788 29789 29790 29791 29792 29793 29794 29795 29796 29797 29798 29799 29800 29801 29802 29803 29804 29805 29806 29807 29808 29809 29810 29811 29812 29813 29814 29815 29816 29817 29818 29819 29820 29821 29822 29823 29824 29825 29826 29827 29828 29829 29830 29831 29832 29833 29834 29835 29836 29837 29838 29839 29840 29841 29842 29843 29844 29845 29846 29847 29848 29849 29850 29851 29852 29853 29854 29855 29856 29857 29858 29859 29860 29861 29862 29863 29864 29865 29866 29867 29868 29869 29870 29871 29872 29873 29874 29875 29876 29877 29878 29879 29880 29881 29882 29883 29884 29885 29886 29887 29888 29889 29890 29891 29892 29893 29894 29895 29896 29897 29898 29899 29900 29901 29902 29903 29904 29905 29906 29907 29908 29909 29910 29911 29912 29913 29914 29915 29916 29917 29918 29919 29920 29921 29922 29923 29924 29925 29926 29927 29928 29929 29930 29931 29932 29933 29934 29935 29936 29937 29938 29939 29940 29941 29942 29943 29944 29945 29946 29947 29948 29949 29950 29951 29952 29953 29954 29955 29956 29957 29958 29959 29960 29961 29962 29963 29964 29965 29966 29967 29968 29969 29970 29971 29972 29973 29974 29975 29976 29977 29978 29979 29980 29981 29982 29983 29984 29985 29986 29987 29988 29989 29990 29991 29992 29993 29994 29995 29996 29997 29998 29999 30000 30001 30002 30003 30004 30005 30006 30007 30008 30009 30010 30011 30012 30013 30014 30015 30016 30017 30018 30019 30020 30021 30022 30023 30024 30025 30026 30027 30028 30029 30030 30031 30032 30033 30034 30035 30036 30037 30038 30039 30040 30041 30042 30043 30044 30045 30046 30047 30048 30049 30050 30051 30052 30053 30054 30055 30056 30057 30058 30059 30060 30061 30062 30063 30064 30065 30066 30067 30068 30069 30070 30071 30072 30073 30074 30075 30076 30077 30078 30079 30080 30081 30082 30083 30084 30085 30086 30087 30088 30089 30090 30091 30092 30093 30094 30095 30096 30097 30098 30099 30100 30101 30102 30103 30104 30105 30106 30107 30108 30109 30110 30111 30112 30113 30114 30115 30116 30117 30118 30119 30120 30121 30122 30123 30124 30125 30126 30127 30128 30129 30130 30131 30132 30133 30134 30135 30136 30137 30138 30139 30140 30141 30142 30143 30144 30145 30146 30147 30148 30149 30150 30151 30152 30153 30154 30155 30156 30157 30158 30159 30160 30161 30162 30163 30164 30165 30166 30167 30168 30169 30170 30171 30172 30173 30174 30175 30176 30177 30178 30179 30180 30181 30182 30183 30184 30185 30186 30187 30188 30189 30190 30191 30192 30193 30194 30195 30196 30197 30198 30199 30200 30201 30202 30203 30204 30205 30206 30207 30208 30209 30210 30211 30212 30213 30214 30215 30216 30217 30218 30219 30220 30221 30222 30223 30224 30225 30226 30227 30228 30229 30230 30231 30232 30233 30234 30235 30236 30237 30238 30239 30240 30241 30242 30243 30244 30245 30246 30247 30248 30249 30250 30251 30252 30253 30254 30255 30256 30257 30258 30259 30260 30261 30262 30263 30264 30265 30266 30267 30268 30269 30270 30271 30272 30273 30274 30275 30276 30277 30278 30279 30280 30281 30282 30283 30284 30285 30286 30287 30288 30289 30290 30291 30292 30293 30294 30295 30296 30297 30298 30299 30300 30301 30302 30303 30304 30305 30306 30307 30308 30309 30310 30311 30312 30313 30314 30315 30316 30317 30318 30319 30320 30321 30322 30323 30324 30325 30326 30327 30328 30329 30330 30331 30332 30333 30334 30335 30336 30337 30338 30339 30340 30341 30342 30343 30344 30345 30346 30347 30348 30349 30350 30351 30352 30353 30354 30355 30356 30357 30358 30359 30360 30361 30362 30363 30364 30365 30366 30367 30368 30369 30370 30371 30372 30373 30374 30375 30376 30377 30378 30379 30380 30381 30382 30383 30384 30385 30386 30387 30388 30389 30390 30391 30392 30393 30394 30395 30396 30397 30398 30399 30400 30401 30402 30403 30404 30405 30406 30407 30408 30409 30410 30411 30412 30413 30414 30415 30416 30417 30418 30419 30420 30421 30422 30423 30424 30425 30426 30427 30428 30429 30430 30431 30432 30433 30434 30435 30436 30437 30438 30439 30440 30441 30442 30443 30444 30445 30446 30447 30448 30449 30450 30451 30452 30453 30454 30455 30456 30457 30458 30459 30460 30461 30462 30463 30464 30465 30466 30467 30468 30469 30470 30471 30472 30473 30474 30475 30476 30477 30478 30479 30480 30481 30482 30483 30484 30485 30486 30487 30488 30489 30490 30491 30492 30493 30494 30495 30496 30497 30498 30499 30500 30501 30502 30503 30504 30505 30506 30507 30508 30509 30510 30511 30512 30513 30514 30515 30516 30517 30518 30519 30520 30521 30522 30523 30524 30525 30526 30527 30528 30529 30530 30531 30532 30533 30534 30535 30536 30537 30538 30539 30540 30541 30542 30543 30544 30545 30546 30547 30548 30549 30550 30551 30552 30553 30554 30555 30556 30557 30558 30559 30560 30561 30562 30563 30564 30565 30566 30567 30568 30569 30570 30571 30572 30573 30574 30575 30576 30577 30578 30579 30580 30581 30582 30583 30584 30585 30586 30587 30588 30589 30590 30591 30592 30593 30594 30595 30596 30597 30598 30599 30600 30601 30602 30603 30604 30605 30606 30607 30608 30609 30610 30611 30612 30613 30614 30615 30616 30617 30618 30619 30620 30621 30622 30623 30624 30625 30626 30627 30628 30629 30630 30631 30632 30633 30634 30635 30636 30637 30638 30639 30640 30641 30642 30643 30644 30645 30646 30647 30648 30649 30650 30651 30652 30653 30654 30655 30656 30657 30658 30659 30660 30661 30662 30663 30664 30665 30666 30667 30668 30669 30670 30671 30672 30673 30674 30675 30676 30677 30678 30679 30680 30681 30682 30683 30684 30685 30686 30687 30688 30689 30690 30691 30692 30693 30694 30695 30696 30697 30698 30699 30700 30701 30702 30703 30704 30705 30706 30707 30708 30709 30710 30711 30712 30713 30714 30715 30716 30717 30718 30719 30720 30721 30722 30723 30724 30725 30726 30727 30728 30729 30730 30731 30732 30733 30734 30735 30736 30737 30738 30739 30740 30741 30742 30743 30744 30745 30746 30747 30748 30749 30750 30751 30752 30753 30754 30755 30756 30757 30758 30759 30760 30761 30762 30763 30764 30765 30766 30767 30768 30769 30770 30771 30772 30773 30774 30775 30776 30777 30778 30779 30780 30781 30782 30783 30784 30785 30786 30787 30788 30789 30790 30791 30792 30793 30794 30795 30796 30797 30798 30799 30800 30801 30802 30803 30804 30805 30806 30807 30808 30809 30810 30811 30812 30813 30814 30815 30816 30817 30818 30819 30820 30821 30822 30823 30824 30825 30826 30827 30828 30829 30830 30831 30832 30833 30834 30835 30836 30837 30838 30839 30840 30841 30842 30843 30844 30845 30846 30847 30848 30849 30850 30851 30852 30853 30854 30855 30856 30857 30858 30859 30860 30861 30862 30863 30864 30865 30866 30867 30868 30869 30870 30871 30872 30873 30874 30875 30876 30877 30878 30879 30880 30881 30882 30883 30884 30885 30886 30887 30888 30889 30890 30891 30892 30893 30894 30895 30896 30897 30898 30899 30900 30901 30902 30903 30904 30905 30906 30907 30908 30909 30910 30911 30912 30913 30914 30915 30916 30917 30918 30919 30920 30921 30922 30923 30924 30925 30926 30927 30928 30929 30930 30931 30932 30933 30934 30935 30936 30937 30938 30939 30940 30941 30942 30943 30944 30945 30946 30947 30948 30949 30950 30951 30952 30953 30954 30955 30956 30957 30958 30959 30960 30961 30962 30963 30964 30965 30966 30967 30968 30969 30970 30971 30972 30973 30974 30975 30976 30977 30978 30979 30980 30981 30982 30983 30984 30985 30986 30987 30988 30989 30990 30991 30992 30993 30994 30995 30996 30997 30998 30999 31000 31001 31002 31003 31004 31005 31006 31007 31008 31009 31010 31011 31012 31013 31014 31015 31016 31017 31018 31019 31020 31021 31022 31023 31024 31025 31026 31027 31028 31029 31030 31031 31032 31033 31034 31035 31036 31037 31038 31039 31040 31041 31042 31043 31044 31045 31046 31047 31048 31049 31050 31051 31052 31053 31054 31055 31056 31057 31058 31059 31060 31061 31062 31063 31064 31065 31066 31067 31068 31069 31070 31071 31072 31073 31074 31075 31076 31077 31078 31079 31080 31081 31082 31083 31084 31085 31086 31087 31088 31089 31090 31091 31092 31093 31094 31095 31096 31097 31098 31099 31100 31101 31102 31103 31104 31105 31106 31107 31108 31109 31110 31111 31112 31113 31114 31115 31116 31117 31118 31119 31120 31121 31122 31123 31124 31125 31126 31127 31128 31129 31130 31131 31132 31133 31134 31135 31136 31137 31138 31139 31140 31141 31142 31143 31144 31145 31146 31147 31148 31149 31150 31151 31152 31153 31154 31155 31156 31157 31158 31159 31160 31161 31162 31163 31164 31165 31166 31167 31168 31169 31170 31171 31172 31173 31174 31175 31176 31177 31178 31179 31180 31181 31182 31183 31184 31185 31186 31187 31188 31189 31190 31191 31192 31193 31194 31195 31196 31197 31198 31199 31200 31201 31202 31203 31204 31205 31206 31207 31208 31209 31210 31211 31212 31213 31214 31215 31216 31217 31218 31219 31220 31221 31222 31223 31224 31225 31226 31227 31228 31229 31230 31231 31232 31233 31234 31235 31236 31237 31238 31239 31240 31241 31242 31243 31244 31245 31246 31247 31248 31249 31250 31251 31252 31253 31254 31255 31256 31257 31258 31259 31260 31261 31262 31263 31264 31265 31266 31267 31268 31269 31270 31271 31272 31273 31274 31275 31276 31277 31278 31279 31280 31281 31282 31283 31284 31285 31286 31287 31288 31289 31290 31291 31292 31293 31294 31295 31296 31297 31298 31299 31300 31301 31302 31303 31304 31305 31306 31307 31308 31309 31310 31311 31312 31313 31314 31315 31316 31317 31318 31319 31320 31321 31322 31323 31324 31325 31326 31327 31328 31329 31330 31331 31332 31333 31334 31335 31336 31337 31338 31339 31340 31341 31342 31343 31344 31345 31346 31347 31348 31349 31350 31351 31352 31353 31354 31355 31356 31357 31358 31359 31360 31361 31362 31363 31364 31365 31366 31367 31368 31369 31370 31371 31372 31373 31374 31375 31376 31377 31378 31379 31380 31381 31382 31383 31384 31385 31386 31387 31388 31389 31390 31391 31392 31393 31394 31395 31396 31397 31398 31399 31400 31401 31402 31403 31404 31405 31406 31407 31408 31409 31410 31411 31412 31413 31414 31415 31416 31417 31418 31419 31420 31421 31422 31423 31424 31425 31426 31427 31428 31429 31430 31431 31432 31433 31434 31435 31436 31437 31438 31439 31440 31441 31442 31443 31444 31445 31446 31447 31448 31449 31450 31451 31452 31453 31454 31455 31456 31457 31458 31459 31460 31461 31462 31463 31464 31465 31466 31467 31468 31469 31470 31471 31472 31473 31474 31475 31476 31477 31478 31479 31480 31481 31482 31483 31484 31485 31486 31487 31488 31489 31490 31491 31492 31493 31494 31495 31496 31497 31498 31499 31500 31501 31502 31503 31504 31505 31506 31507 31508 31509 31510 31511 31512 31513 31514 31515 31516 31517 31518 31519 31520 31521 31522 31523 31524 31525 31526 31527 31528 31529 31530 31531 31532 31533 31534 31535 31536 31537 31538 31539 31540 31541 31542 31543 31544 31545 31546 31547 31548 31549 31550 31551 31552 31553 31554 31555 31556 31557 31558 31559 31560 31561 31562 31563 31564 31565 31566 31567 31568 31569 31570 31571 31572 31573 31574 31575 31576 31577 31578 31579 31580 31581 31582 31583 31584 31585 31586 31587 31588 31589 31590 31591 31592 31593 31594 31595 31596 31597 31598 31599 31600 31601 31602 31603 31604 31605 31606 31607 31608 31609 31610 31611 31612 31613 31614 31615 31616 31617 31618 31619 31620 31621 31622 31623 31624 31625 31626 31627 31628 31629 31630 31631 31632 31633 31634 31635 31636 31637 31638 31639 31640 31641 31642 31643 31644 31645 31646 31647 31648 31649 31650 31651 31652 31653 31654 31655 31656 31657 31658 31659 31660 31661 31662 31663 31664 31665 31666 31667 31668 31669 31670 31671 31672 31673 31674 31675 31676 31677 31678 31679 31680 31681 31682 31683 31684 31685 31686 31687 31688 31689 31690 31691 31692 31693 31694 31695 31696 31697 31698 31699 31700 31701 31702 31703 31704 31705 31706 31707 31708 31709 31710 31711 31712 31713 31714 31715 31716 31717 31718 31719 31720 31721 31722 31723 31724 31725 31726 31727 31728 31729 31730 31731 31732 31733 31734 31735 31736 31737 31738 31739 31740 31741 31742 31743 31744 31745 31746 31747 31748 31749 31750 31751 31752 31753 31754 31755 31756 31757 31758 31759 31760 31761 31762 31763 31764 31765 31766 31767 31768 31769 31770 31771 31772 31773 31774 31775 31776 31777 31778 31779 31780 31781 31782 31783 31784 31785 31786 31787 31788 31789 31790 31791 31792 31793 31794 31795 31796 31797 31798 31799 31800 31801 31802 31803 31804 31805 31806 31807 31808 31809 31810 31811 31812 31813 31814 31815 31816 31817 31818 31819 31820 31821 31822 31823 31824 31825 31826 31827 31828 31829 31830 31831 31832 31833 31834 31835 31836 31837 31838 31839 31840 31841 31842 31843 31844 31845 31846 31847 31848 31849 31850 31851 31852 31853 31854 31855 31856 31857 31858 31859 31860 31861 31862 31863 31864 31865 31866 31867 31868 31869 31870 31871 31872 31873 31874 31875 31876 31877 31878 31879 31880 31881 31882 31883 31884 31885 31886 31887 31888 31889 31890 31891 31892 31893 31894 31895 31896 31897 31898 31899 31900 31901 31902 31903 31904 31905 31906 31907 31908 31909 31910 31911 31912 31913 31914 31915 31916 31917 31918 31919 31920 31921 31922 31923 31924 31925 31926 31927 31928 31929 31930 31931 31932 31933 31934 31935 31936 31937 31938 31939 31940 31941 31942 31943 31944 31945 31946 31947 31948 31949 31950 31951 31952 31953 31954 31955 31956 31957 31958 31959 31960 31961 31962 31963 31964 31965 31966 31967 31968 31969 31970 31971 31972 31973 31974 31975 31976 31977 31978 31979 31980 31981 31982 31983 31984 31985 31986 31987 31988 31989 31990 31991 31992 31993 31994 31995 31996 31997 31998 31999 32000 32001 32002 32003 32004 32005 32006 32007 32008 32009 32010 32011 32012 32013 32014 32015 32016 32017 32018 32019 32020 32021 32022 32023 32024 32025 32026 32027 32028 32029 32030 32031 32032 32033 32034 32035 32036 32037 32038 32039 32040 32041 32042 32043 32044 32045 32046 32047 32048 32049 32050 32051 32052 32053 32054 32055 32056 32057 32058 32059 32060 32061 32062 32063 32064 32065 32066 32067 32068 32069 32070 32071 32072 32073 32074 32075 32076 32077 32078 32079 32080 32081 32082 32083 32084 32085 32086 32087 32088 32089 32090 32091 32092 32093 32094 32095 32096 32097 32098 32099 32100 32101 32102 32103 32104 32105 32106 32107 32108 32109 32110 32111 32112 32113 32114 32115 32116 32117 32118 32119 32120 32121 32122 32123 32124 32125 32126 32127 32128 32129 32130 32131 32132 32133 32134 32135 32136 32137 32138 32139 32140 32141 32142 32143 32144 32145 32146 32147 32148 32149 32150 32151 32152 32153 32154 32155 32156 32157 32158 32159 32160 32161 32162 32163 32164 32165 32166 32167 32168 32169 32170 32171 32172 32173 32174 32175 32176 32177 32178 32179 32180 32181 32182 32183 32184 32185 32186 32187 32188 32189 32190 32191 32192 32193 32194 32195 32196 32197 32198 32199 32200 32201 32202 32203 32204 32205 32206 32207 32208 32209 32210 32211 32212 32213 32214 32215 32216 32217 32218 32219 32220 32221 32222 32223 32224 32225 32226 32227 32228 32229 32230 32231 32232 32233 32234 32235 32236 32237 32238 32239 32240 32241 32242 32243 32244 32245 32246 32247 32248 32249 32250 32251 32252 32253 32254 32255 32256 32257 32258 32259 32260 32261 32262 32263 32264 32265 32266 32267 32268 32269 32270 32271 32272 32273 32274 32275 32276 32277 32278 32279 32280 32281 32282 32283 32284 32285 32286 32287 32288 32289 32290 32291 32292 32293 32294 32295 32296 32297 32298 32299 32300 32301 32302 32303 32304 32305 32306 32307 32308 32309 32310 32311 32312 32313 32314 32315 32316 32317 32318 32319 32320 32321 32322 32323 32324 32325 32326 32327 32328 32329 32330 32331 32332 32333 32334 32335 32336 32337 32338 32339 32340 32341 32342 32343 32344 32345 32346 32347 32348 32349 32350 32351 32352 32353 32354 32355 32356 32357 32358 32359 32360 32361 32362 32363 32364 32365 32366 32367 32368 32369 32370 32371 32372 32373 32374 32375 32376 32377 32378 32379 32380 32381 32382 32383 32384 32385 32386 32387 32388 32389 32390 32391 32392 32393 32394 32395 32396 32397 32398 32399 32400 32401 32402 32403 32404 32405 32406 32407 32408 32409 32410 32411 32412 32413 32414 32415 32416 32417 32418 32419 32420 32421 32422 32423 32424 32425 32426 32427 32428 32429 32430 32431 32432 32433 32434 32435 32436 32437 32438 32439 32440 32441 32442 32443 32444 32445 32446 32447 32448 32449 32450 32451 32452 32453 32454 32455 32456 32457 32458 32459 32460 32461 32462 32463 32464 32465 32466 32467 32468 32469 32470 32471 32472 32473 32474 32475 32476 32477 32478 32479 32480 32481 32482 32483 32484 32485 32486 32487 32488 32489 32490 32491 32492 32493 32494 32495 32496 32497 32498 32499 32500 32501 32502 32503 32504 32505 32506 32507 32508 32509 32510 32511 32512 32513 32514 32515 32516 32517 32518 32519 32520 32521 32522 32523 32524 32525 32526 32527 32528 32529 32530 32531 32532 32533 32534 32535 32536 32537 32538 32539 32540 32541 32542 32543 32544 32545 32546 32547 32548 32549 32550 32551 32552 32553 32554 32555 32556 32557 32558 32559 32560 32561 32562 32563 32564 32565 32566 32567 32568 32569 32570 32571 32572 32573 32574 32575 32576 32577 32578 32579 32580 32581 32582 32583 32584 32585 32586 32587 32588 32589 32590 32591 32592 32593 32594 32595 32596 32597 32598 32599 32600 32601 32602 32603 32604 32605 32606 32607 32608 32609 32610 32611 32612 32613 32614 32615 32616 32617 32618 32619 32620 32621 32622 32623 32624 32625 32626 32627 32628 32629 32630 32631 32632 32633 32634 32635 32636 32637 32638 32639 32640 32641 32642 32643 32644 32645 32646 32647 32648 32649 32650 32651 32652 32653 32654 32655 32656 32657 32658 32659 32660 32661 32662 32663 32664 32665 32666 32667 32668 32669 32670 32671 32672 32673 32674 32675 32676 32677 32678 32679 32680 32681 32682 32683 32684 32685 32686 32687 32688 32689 32690 32691 32692 32693 32694 32695 32696 32697 32698 32699 32700 32701 32702 32703 32704 32705 32706 32707 32708 32709 32710 32711 32712 32713 32714 32715 32716 32717 32718 32719 32720 32721 32722 32723 32724 32725 32726 32727 32728 32729 32730 32731 32732 32733 32734 32735 32736 32737 32738 32739 32740 32741 32742 32743 32744 32745 32746 32747 32748 32749 32750 32751 32752 32753 32754 32755 32756 32757 32758 32759 32760 32761 32762 32763 32764 32765 32766 32767 32768 32769 32770 32771 32772 32773 32774 32775 32776 32777 32778 32779 32780 32781 32782 32783 32784 32785 32786 32787 32788 32789 32790 32791 32792 32793 32794 32795 32796 32797 32798 32799 32800 32801 32802 32803 32804 32805 32806 32807 32808 32809 32810 32811 32812 32813 32814 32815 32816 32817 32818 32819 32820 32821 32822 32823 32824 32825 32826 32827 32828 32829 32830 32831 32832 32833 32834 32835 32836 32837 32838 32839 32840 32841 32842 32843 32844 32845 32846 32847 32848 32849 32850 32851 32852 32853 32854 32855 32856 32857 32858 32859 32860 32861 32862 32863 32864 32865 32866 32867 32868 32869 32870 32871 32872 32873 32874 32875 32876 32877 32878 32879 32880 32881 32882 32883 32884 32885 32886 32887 32888 32889 32890 32891 32892 32893 32894 32895 32896 32897 32898 32899 32900 32901 32902 32903 32904 32905 32906 32907 32908 32909 32910 32911 32912 32913 32914 32915 32916 32917 32918 32919 32920 32921 32922 32923 32924 32925 32926 32927 32928 32929 32930 32931 32932 32933 32934 32935 32936 32937 32938 32939 32940 32941 32942 32943 32944 32945 32946 32947 32948 32949 32950 32951 32952 32953 32954 32955 32956 32957 32958 32959 32960 32961 32962 32963 32964 32965 32966 32967 32968 32969 32970 32971 32972 32973 32974 32975 32976 32977 32978 32979 32980 32981 32982 32983 32984 32985 32986 32987 32988 32989 32990 32991 32992 32993 32994 32995 32996 32997 32998 32999 33000 33001 33002 33003 33004 33005 33006 33007 33008 33009 33010 33011 33012 33013 33014 33015 33016 33017 33018 33019 33020 33021 33022 33023 33024 33025 33026 33027 33028 33029 33030 33031 33032 33033 33034 33035 33036 33037 33038 33039 33040 33041 33042 33043 33044 33045 33046 33047 33048 33049 33050 33051 33052 33053 33054 33055 33056 33057 33058 33059 33060 33061 33062 33063 33064 33065 33066 33067 33068 33069 33070 33071 33072 33073 33074 33075 33076 33077 33078 33079 33080 33081 33082 33083 33084 33085 33086 33087 33088 33089 33090 33091 33092 33093 33094 33095 33096 33097 33098 33099 33100 33101 33102 33103 33104 33105 33106 33107 33108 33109 33110 33111 33112 33113 33114 33115 33116 33117 33118 33119 33120 33121 33122 33123 33124 33125 33126 33127 33128 33129 33130 33131 33132 33133 33134 33135 33136 33137 33138 33139 33140 33141 33142 33143 33144 33145 33146 33147 33148 33149 33150 33151 33152 33153 33154 33155 33156 33157 33158 33159 33160 33161 33162 33163 33164 33165 33166 33167 33168 33169 33170 33171 33172 33173 33174 33175 33176 33177 33178 33179 33180 33181 33182 33183 33184 33185 33186 33187 33188 33189 33190 33191 33192 33193 33194 33195 33196 33197 33198 33199 33200 33201 33202 33203 33204 33205 33206 33207 33208 33209 33210 33211 33212 33213 33214 33215 33216 33217 33218 33219 33220 33221 33222 33223 33224 33225 33226 33227 33228 33229 33230 33231 33232 33233 33234 33235 33236 33237 33238 33239 33240 33241 33242 33243 33244 33245 33246 33247 33248 33249 33250 33251 33252 33253 33254 33255 33256 33257 33258 33259 33260 33261 33262 33263 33264 33265 33266 33267 33268 33269 33270 33271 33272 33273 33274 33275 33276 33277 33278 33279 33280 33281 33282 33283 33284 33285 33286 33287 33288 33289 33290 33291 33292 33293 33294 33295 33296 33297 33298 33299 33300 33301 33302 33303 33304 33305 33306 33307 33308 33309 33310 33311 33312 33313 33314 33315 33316 33317 33318 33319 33320 33321 33322 33323 33324 33325 33326 33327 33328 33329 33330 33331 33332 33333 33334 33335 33336 33337 33338 33339 33340 33341 33342 33343 33344 33345 33346 33347 33348 33349 33350 33351 33352 33353 33354 33355 33356 33357 33358 33359 33360 33361 33362 33363 33364 33365 33366 33367 33368 33369 33370 33371 33372 33373 33374 33375 33376 33377 33378 33379 33380 33381 33382 33383 33384 33385 33386 33387 33388 33389 33390 33391 33392 33393 33394 33395 33396 33397 33398 33399 33400 33401 33402 33403 33404 33405 33406 33407 33408 33409 33410 33411 33412 33413 33414 33415 33416 33417 33418 33419 33420 33421 33422 33423 33424 33425 33426 33427 33428 33429 33430 33431 33432 33433 33434 33435 33436 33437 33438 33439 33440 33441 33442 33443 33444 33445 33446 33447 33448 33449 33450 33451 33452 33453 33454 33455 33456 33457 33458 33459 33460 33461 33462 33463 33464 33465 33466 33467 33468 33469 33470 33471 33472 33473 33474 33475 33476 33477 33478 33479 33480 33481 33482 33483 33484 33485 33486 33487 33488 33489 33490 33491 33492 33493 33494 33495 33496 33497 33498 33499 33500 33501 33502 33503 33504 33505 33506 33507 33508 33509 33510 33511 33512 33513 33514 33515 33516 33517 33518 33519 33520 33521 33522 33523 33524 33525 33526 33527 33528 33529 33530 33531 33532 33533 33534 33535 33536 33537 33538 33539 33540 33541 33542 33543 33544 33545 33546 33547 33548 33549 33550 33551 33552 33553 33554 33555 33556 33557 33558 33559 33560 33561 33562 33563 33564 33565 33566 33567 33568 33569 33570 33571 33572 33573 33574 33575 33576 33577 33578 33579 33580 33581 33582 33583 33584 33585 33586 33587 33588 33589 33590 33591 33592 33593 33594 33595 33596 33597 33598 33599 33600 33601 33602 33603 33604 33605 33606 33607 33608 33609 33610 33611 33612 33613 33614 33615 33616 33617 33618 33619 33620 33621 33622 33623 33624 33625 33626 33627 33628 33629 33630 33631 33632 33633 33634 33635 33636 33637 33638 33639 33640 33641 33642 33643 33644 33645 33646 33647 33648 33649 33650 33651 33652 33653 33654 33655 33656 33657 33658 33659 33660 33661 33662 33663 33664 33665 33666 33667 33668 33669 33670 33671 33672 33673 33674 33675 33676 33677 33678 33679 33680 33681 33682 33683 33684 33685 33686 33687 33688 33689 33690 33691 33692 33693 33694 33695 33696 33697 33698 33699 33700 33701 33702 33703 33704 33705 33706 33707 33708 33709 33710 33711 33712 33713 33714 33715 33716 33717 33718 33719 33720 33721 33722 33723 33724 33725 33726 33727 33728 33729 33730 33731 33732 33733 33734 33735 33736 33737 33738 33739 33740 33741 33742 33743 33744 33745 33746 33747 33748 33749 33750 33751 33752 33753 33754 33755 33756 33757 33758 33759 33760 33761 33762 33763 33764 33765 33766 33767 33768 33769 33770 33771 33772 33773 33774 33775 33776 33777 33778 33779 33780 33781 33782 33783 33784 33785 33786 33787 33788 33789 33790 33791 33792 33793 33794 33795 33796 33797 33798 33799 33800 33801 33802 33803 33804 33805 33806 33807 33808 33809 33810 33811 33812 33813 33814 33815 33816 33817 33818 33819 33820 33821 33822 33823 33824 33825 33826 33827 33828 33829 33830 33831 33832 33833 33834 33835 33836 33837 33838 33839 33840 33841 33842 33843 33844 33845 33846 33847 33848 33849 33850 33851 33852 33853 33854 33855 33856 33857 33858 33859 33860 33861 33862 33863 33864 33865 33866 33867 33868 33869 33870 33871 33872 33873 33874 33875 33876 33877 33878 33879 33880 33881 33882 33883 33884 33885 33886 33887 33888 33889 33890 33891 33892 33893 33894 33895 33896 33897 33898 33899 33900 33901 33902 33903 33904 33905 33906 33907 33908 33909 33910 33911 33912 33913 33914 33915 33916 33917 33918 33919 33920 33921 33922 33923 33924 33925 33926 33927 33928 33929 33930 33931 33932 33933 33934 33935 33936 33937 33938 33939 33940 33941 33942 33943 33944 33945 33946 33947 33948 33949 33950 33951 33952 33953 33954 33955 33956 33957 33958 33959 33960 33961 33962 33963 33964 33965 33966 33967 33968 33969 33970 33971 33972 33973 33974 33975 33976 33977 33978 33979 33980 33981 33982 33983 33984 33985 33986 33987 33988 33989 33990 33991 33992 33993 33994 33995 33996 33997 33998 33999 34000 34001 34002 34003 34004 34005 34006 34007 34008 34009 34010 34011 34012 34013 34014 34015 34016 34017 34018 34019 34020 34021 34022 34023 34024 34025 34026 34027 34028 34029 34030 34031 34032 34033 34034 34035 34036 34037 34038 34039 34040 34041 34042 34043 34044 34045 34046 34047 34048 34049 34050 34051 34052 34053 34054 34055 34056 34057 34058 34059 34060 34061 34062 34063 34064 34065 34066 34067 34068 34069 34070 34071 34072 34073 34074 34075 34076 34077 34078 34079 34080 34081 34082 34083 34084 34085 34086 34087 34088 34089 34090 34091 34092 34093 34094 34095 34096 34097 34098 34099 34100 34101 34102 34103 34104 34105 34106 34107 34108 34109 34110 34111 34112 34113 34114 34115 34116 34117 34118 34119 34120 34121 34122 34123 34124 34125 34126 34127 34128 34129 34130 34131 34132 34133 34134 34135 34136 34137 34138 34139 34140 34141 34142 34143 34144 34145 34146 34147 34148 34149 34150 34151 34152 34153 34154 34155 34156 34157 34158 34159 34160 34161 34162 34163 34164 34165 34166 34167 34168 34169 34170 34171 34172 34173 34174 34175 34176 34177 34178 34179 34180 34181 34182 34183 34184 34185 34186 34187 34188 34189 34190 34191 34192 34193 34194 34195 34196 34197 34198 34199 34200 34201 34202 34203 34204 34205 34206 34207 34208 34209 34210 34211 34212 34213 34214 34215 34216 34217 34218 34219 34220 34221 34222 34223 34224 34225 34226 34227 34228 34229 34230 34231 34232 34233 34234 34235 34236 34237 34238 34239 34240 34241 34242 34243 34244 34245 34246 34247 34248 34249 34250 34251 34252 34253 34254 34255 34256 34257 34258 34259 34260 34261 34262 34263 34264 34265 34266 34267 34268 34269 34270 34271 34272 34273 34274 34275 34276 34277 34278 34279 34280 34281 34282 34283 34284 34285 34286 34287 34288 34289 34290 34291 34292 34293 34294 34295 34296 34297 34298 34299 34300 34301 34302 34303 34304 34305 34306 34307 34308 34309 34310 34311 34312 34313 34314 34315 34316 34317 34318 34319 34320 34321 34322 34323 34324 34325 34326 34327 34328 34329 34330 34331 34332 34333 34334 34335 34336 34337 34338 34339 34340 34341 34342 34343 34344 34345 34346 34347 34348 34349 34350 34351 34352 34353 34354 34355 34356 34357 34358 34359 34360 34361 34362 34363 34364 34365 34366 34367 34368 34369 34370 34371 34372 34373 34374 34375 34376 34377 34378 34379 34380 34381 34382 34383 34384 34385 34386 34387 34388 34389 34390 34391 34392 34393 34394 34395 34396 34397 34398 34399 34400 34401 34402 34403 34404 34405 34406 34407 34408 34409 34410 34411 34412 34413 34414 34415 34416 34417 34418 34419 34420 34421 34422 34423 34424 34425 34426 34427 34428 34429 34430 34431 34432 34433 34434 34435 34436 34437 34438 34439 34440 34441 34442 34443 34444 34445 34446 34447 34448 34449 34450 34451 34452 34453 34454 34455 34456 34457 34458 34459 34460 34461 34462 34463 34464 34465 34466 34467 34468 34469 34470 34471 34472 34473 34474 34475 34476 34477 34478 34479 34480 34481 34482 34483 34484 34485 34486 34487 34488 34489 34490 34491 34492 34493 34494 34495 34496 34497 34498 34499 34500 34501 34502 34503 34504 34505 34506 34507 34508 34509 34510 34511 34512 34513 34514 34515 34516 34517 34518 34519 34520 34521 34522 34523 34524 34525 34526 34527 34528 34529 34530 34531 34532 34533 34534 34535 34536 34537 34538 34539 34540 34541 34542 34543 34544 34545 34546 34547 34548 34549 34550 34551 34552 34553 34554 34555 34556 34557 34558 34559 34560 34561 34562 34563 34564 34565 34566 34567 34568 34569 34570 34571 34572 34573 34574 34575 34576 34577 34578 34579 34580 34581 34582 34583 34584 34585 34586 34587 34588 34589 34590 34591 34592 34593 34594 34595 34596 34597 34598 34599 34600 34601 34602 34603 34604 34605 34606 34607 34608 34609 34610 34611 34612 34613 34614 34615 34616 34617 34618 34619 34620 34621 34622 34623 34624 34625 34626 34627 34628 34629 34630 34631 34632 34633 34634 34635 34636 34637 34638 34639 34640 34641 34642 34643 34644 34645 34646 34647 34648 34649 34650 34651 34652 34653 34654 34655 34656 34657 34658 34659 34660 34661 34662 34663 34664 34665 34666 34667 34668 34669 34670 34671 34672 34673 34674 34675 34676 34677 34678 34679 34680 34681 34682 34683 34684 34685 34686 34687 34688 34689 34690 34691 34692 34693 34694 34695 34696 34697 34698 34699 34700 34701 34702 34703 34704 34705 34706 34707 34708 34709 34710 34711 34712 34713 34714 34715 34716 34717 34718 34719 34720 34721 34722 34723 34724 34725 34726 34727 34728 34729 34730 34731 34732 34733 34734 34735 34736 34737 34738 34739 34740 34741 34742 34743 34744 34745 34746 34747 34748 34749 34750 34751 34752 34753 34754 34755 34756 34757 34758 34759 34760 34761 34762 34763 34764 34765 34766 34767 34768 34769 34770 34771 34772 34773 34774 34775 34776 34777 34778 34779 34780 34781 34782 34783 34784 34785 34786 34787 34788 34789 34790 34791 34792 34793 34794 34795 34796 34797 34798 34799 34800 34801 34802 34803 34804 34805 34806 34807 34808 34809 34810 34811 34812 34813 34814 34815 34816 34817 34818 34819 34820 34821 34822 34823 34824 34825 34826 34827 34828 34829 34830 34831 34832 34833 34834 34835 34836 34837 34838 34839 34840 34841 34842 34843 34844 34845 34846 34847 34848 34849 34850 34851 34852 34853 34854 34855 34856 34857 34858 34859 34860 34861 34862 34863 34864 34865 34866 34867 34868 34869 34870 34871 34872 34873 34874 34875 34876 34877 34878 34879 34880 34881 34882 34883 34884 34885 34886 34887 34888 34889 34890 34891 34892 34893 34894 34895 34896 34897 34898 34899 34900 34901 34902 34903 34904 34905 34906 34907 34908 34909 34910 34911 34912 34913 34914 34915 34916 34917 34918 34919 34920 34921 34922 34923 34924 34925 34926 34927 34928 34929 34930 34931 34932 34933 34934 34935 34936 34937 34938 34939 34940 34941 34942 34943 34944 34945 34946 34947 34948 34949 34950 34951 34952 34953 34954 34955 34956 34957 34958 34959 34960 34961 34962 34963 34964 34965 34966 34967 34968 34969 34970 34971 34972 34973 34974 34975 34976 34977 34978 34979 34980 34981 34982 34983 34984 34985 34986 34987 34988 34989 34990 34991 34992 34993 34994 34995 34996 34997 34998 34999 35000 35001 35002 35003 35004 35005 35006 35007 35008 35009 35010 35011 35012 35013 35014 35015 35016 35017 35018 35019 35020 35021 35022 35023 35024 35025 35026 35027 35028 35029 35030 35031 35032 35033 35034 35035 35036 35037 35038 35039 35040 35041 35042 35043 35044 35045 35046 35047 35048 35049 35050 35051 35052 35053 35054 35055 35056 35057 35058 35059 35060 35061 35062 35063 35064 35065 35066 35067 35068 35069 35070 35071 35072 35073 35074 35075 35076 35077 35078 35079 35080 35081 35082 35083 35084 35085 35086 35087 35088 35089 35090 35091 35092 35093 35094 35095 35096 35097 35098 35099 35100 35101 35102 35103 35104 35105 35106 35107 35108 35109 35110 35111 35112 35113 35114 35115 35116 35117 35118 35119 35120 35121 35122 35123 35124 35125 35126 35127 35128 35129 35130 35131 35132 35133 35134 35135 35136 35137 35138 35139 35140 35141 35142 35143 35144 35145 35146 35147 35148 35149 35150 35151 35152 35153 35154 35155 35156 35157 35158 35159 35160 35161 35162 35163 35164 35165 35166 35167 35168 35169 35170 35171 35172 35173 35174 35175 35176 35177 35178 35179 35180 35181 35182 35183 35184 35185 35186 35187 35188 35189 35190 35191 35192 35193 35194 35195 35196 35197 35198 35199 35200 35201 35202 35203 35204 35205 35206 35207 35208 35209 35210 35211 35212 35213 35214 35215 35216 35217 35218 35219 35220 35221 35222 35223 35224 35225 35226 35227 35228 35229 35230 35231 35232 35233 35234 35235 35236 35237 35238 35239 35240 35241 35242 35243 35244 35245 35246 35247 35248 35249 35250 35251 35252 35253 35254 35255 35256 35257 35258 35259 35260 35261 35262 35263 35264 35265 35266 35267 35268 35269 35270 35271 35272 35273 35274 35275 35276 35277 35278 35279 35280 35281 35282 35283 35284 35285 35286 35287 35288 35289 35290 35291 35292 35293 35294 35295 35296 35297 35298 35299 35300 35301 35302 35303 35304 35305 35306 35307 35308 35309 35310 35311 35312 35313 35314 35315 35316 35317 35318 35319 35320 35321 35322 35323 35324 35325 35326 35327 35328 35329 35330 35331 35332 35333 35334 35335 35336 35337 35338 35339 35340 35341 35342 35343 35344 35345 35346 35347 35348 35349 35350 35351 35352 35353 35354 35355 35356 35357 35358 35359 35360 35361 35362 35363 35364 35365 35366 35367 35368 35369 35370 35371 35372 35373 35374 35375 35376 35377 35378 35379 35380 35381 35382 35383 35384 35385 35386 35387 35388 35389 35390 35391 35392 35393 35394 35395 35396 35397 35398 35399 35400 35401 35402 35403 35404 35405 35406 35407 35408 35409 35410 35411 35412 35413 35414 35415 35416 35417 35418 35419 35420 35421 35422 35423 35424 35425 35426 35427 35428 35429 35430 35431 35432 35433 35434 35435 35436 35437 35438 35439 35440 35441 35442 35443 35444 35445 35446 35447 35448 35449 35450 35451 35452 35453 35454 35455 35456 35457 35458 35459 35460 35461 35462 35463 35464 35465 35466 35467 35468 35469 35470 35471 35472 35473 35474 35475 35476 35477 35478 35479 35480 35481 35482 35483 35484 35485 35486 35487 35488 35489 35490 35491 35492 35493 35494 35495 35496 35497 35498 35499 35500 35501 35502 35503 35504 35505 35506 35507 35508 35509 35510 35511 35512 35513 35514 35515 35516 35517 35518 35519 35520 35521 35522 35523 35524 35525 35526 35527 35528 35529 35530 35531 35532 35533 35534 35535 35536 35537 35538 35541 35542 35543 35544 35545 35546 35553 35554 35555 35556 35557 35559 35560 35561 35562 35563 35564 35565 35566 35567 35568 35569 35570 35571 35572 35573 35578 35579 35580 35582 35589 35590 35591 35592 35593 35595 35596 35597 35598 35599 35600 35601 35602 35603 35604 35605 35606 35607 35608 35609 35611 35612 35613 35614 35615 35622 35623 35624 35625 35626 35634 35635 35636 35637 35638 35639 35640 35642 35643 35644 35645 35646 35647 35651 35652 35653 35655 35661 35662 35663 35664 35665 35667 35668 35669 35670 35671 35672 35673 35674 35675 35676 35677 35678 35679 35680 35681 35682 35683 35684 35685 35687 35694 35695 35696 35697 35698 35699 35700 35701 35702 35703 35706 35707 35708 35709 35714 35715 35716 35718 35719 35720 35721 35722 35723 35724 35725 35726 35727 35728 35729 35730 35731 35732 35733 35734 35735 35736 35737 35738 35739 35740 35741 35746 35747 35749 35755 35756 35757 35758 35759 35760 35761 35762 35763 35764 35765 35766 35767 35768 35769 35770 35771 35772 35773 35774 35776 35777 35778 35780 35781 35785 35786 35787 35789 35790 35792 35793 35794 35795 35796 35797 35798 35799 35800 35801 35803 35804 35805 35806 35807 35808 35809 35810 35815 35816 35817 35819 35826 35827 35828 35829 35830 35831 35833 35834 35835 35836 35837 35838 35839 35840 35841 35842 35843 35845 35846 35847 35849 35850 35855 35856 35857 35858 35859 35860 35862 35863 35864 35865 35866 35867 35868 35869 35870 35871 35872 35873 35874 35875 35876 35877 35878 35879 35884 35885 35886 35888 35895 35896 35897 35898 35899 35900 35901 35902 35903 35904 35905 35906 35907 35908 35909 35910 35911 35912 35913 35914 35915 35919 35920 35921 35922 35923 35924 35927 35928 35929 35930 35931 35932 35933 35934 35935 35936 35937 35938 35939 35940 35941 35942 35943 35944 35945 35946 35947 35948 35949 35950 35951 35952 35953 35954 35955 35956 35957 35958 35959 35960 35961 35962 35963 35964 35965 35966 35967 35968 35969 35970 35971 35972 35973 35974 35975 35976 35977 35978 35979 35980 35981 35982 35983 35984 35985 35986 35987 35988 35989 35990 35991 35992 35993 35994 35995 35996 35997 35998 35999 36000 36001 36002 36003 36004 36005 36006 36007 36008 36009 36010 36011 36012 36013 36014 36015 36016 36017 36018 36019 36020 36021 36022 36023 36024 36025 36026 36027 36028 36029 36030 36031 36032 36033 36034 36035 36036 36037 36038 36039 36040 36041 36042 36043 36044 36045 36046 36047 36048 36049 36050 36051 36052 36053 36054 36055 36056 36057 36058 36059 36060 36061 36062 36063 36064 36065 36066 36067 36068 36069 36070 36071 36072 36073 36074 36075 36076 36077 36078 36079 36080 36081 36082 36083 36084 36085 36086 36087 36088 36089 36090 36091 36092 36093 36094 36095 36096 36097 36098 36099 36100 36101 36102 36103 36104 36105 36106 36107 36108 36109 36110 36111 36112 36113 36114 36115 36116 36117 36118 36119 36120 36121 36122 36123 36124 36125 36126 36127 36128 36129 36130 36131 36132 36133 36134 36135 36136 36137 36138 36139 36140 36141 36142 36143 36144 36145 36146 36147 36148 36149 36150 36151 36152 36153 36154 36155 36156 36157 36158 36159 36160 36161 36162 36163 36164 36165 36166 36172 36173 36174 36175 36176 36177 36178 36179 36180 36181 36182 36183 36184 36185 36186 36187 36188 36189 36190 36191 36192 36193 36194 36195 36196 36201 36202 36203 36204 36205 36210 36211 36213 36215 36216 36217 36218 36219 36220 36221 36223 36224 36225 36231 36232 36233 36234 36236 36240 36241 36243 36244 36245 36246 36247 36248 36249 36250 36251 36252 36253 36255 36256 36258 36263 36264 36265 36267 36273 36274 36275 36276 36277 36278 36279 36280 36281 36282 36283 36284 36285 36286 36290 36291 36293 36298 36299 36300 36301 36302 36303 36304 36305 36306 36307 36308 36309 36310 36311 36312 36313 36314 36315 36316 36317 36318 36319 36320 36321 36322 36323 36324 36325 36326 36327 36328 36329 36330 36331 36332 36333 36334 36335 36336 36337 36338 36339 36340 36341 36342 36343 36344 36345 36346 36347 36348 36349 36350 36351 36352 36353 36354 36355 36356 36357 36358 36359 36360 36361 36362 36363 36364 36365 36366 36367 36368 36369 36370 36371 36372 36373 36374 36375 36376 36377 36382 36383 36384 36385 36386 36387 36388 36389 36390 36391 36392 36393 36394 36395 36396 36397 36398 36399 36400 36401 36402 36403 36404 36405 36406 36407 36408 36409 36410 36411 36412 36413 36414 36415 36416 36417 36418 36419 36420 36421 36422 36423 36424 36425 36426 36427 36428 36429 36430 36431 36432 36433 36434 36435 36436 36437 36438 36439 36440 36441 36442 36443 36444 36445 36446 36447 36448 36449 36450 36451 36452 36453 36454 36455 36456 36457 36458 36459 36460 36461 36462 36463 36464 36465 36466 36467 36468 36469 36470 36471 36472 36473 36474 36475 36476 36477 36478 36479 36480 36481 36482 36483 36484 36485 36486 36487 36488 36489 36490 36491 36492 36493 36498 36499 36500 36501 36502 36503 36504 36505 36506 36507 36508 36509 36510 36511 36512 36513 36514 36515 36516 36517 36518 36519 36520 36521 36522 36523 36524 36525 36526 36527 36528 36529 36530 36532 36533 36534 36536 36547 36548 36549 36550 36551 36555 36556 36557 36558 36559 36560 36562 36563 36568 36569 36571 36572 36573 36574 36575 36576 36577 36578 36579 36580 36581 36582 36583 36584 36585 36586 36587 36588 36589 36590 36591 36592 36593 36594 36599 36600 36601 36602 36603 36604 36605 36606 36607 36608 36609 36610 36611 36612 36613 36614 36615 36616 36617 36618 36619 36620 36621 36622 36623 36624 36625 36626 36627 36628 36629 36630 36631 36632 36633 36634 36635 36636 36637 36638 36639 36640 36641 36642 36643 36644 36645 36646 36647 36648 36649 36650 36651 36652 36653 36654 36655 36656 36657 36658 36659 36660 36661 36662 36663 36664 36665 36666 36667 36668 36669 36670 36671 36672 36673 36674 36675 36676 36677 36678 36679 36680 36681 36682 36683 36684 36685 36686 36687 36688 36689 36690 36691 36692 36693 36694 36695 36696 36697 36698 36699 36700 36701 36702 36703 36704 36705 36706 36707 36708 36709 36710 36711 36712 36713 36714 36715 36716 36717 36718 36719 36720 36721 36722 36723 36724 36725 36726 36727 36728 36729 36730 36731 36732 36733 36734 36735 36736 36737 36738 36739 36740 36741 36742 36743 36744 36745 36746 36747 36748 36749 36750 36751 36752 36753 36754 36755 36756 36757 36758 36759 36760 36761 36762 36763 36764 36765 36766 36767 36768 36769 36770 36771 36772 36773 36774 36775 36776 36777 36778 36779 36780 36781 36782 36783 36784 36785 36786 36787 36788 36789 36790 36791 36792 36793 36794 36795 36796 36797 36798 36799 36800 36801 36802 36803 36804 36805 36806 36807 36808 36809 36810 36811 36812 36813 36814 36815 36816 36817 36818 36819 36820 36821 36822 36823 36824 36825 36826 36827 36828 36829 36830 36831 36832 36833 36834 36835 36836 36837 36838 36839 36840 36841 36842 36843 36844 36845 36846 36847 36848 36849 36850 36851 36852 36853 36854 36855 36856 36857 36858 36859 36860 36861 36862 36863 36864 36865 36866 36867 36868 36869 36870 36871 36872 36873 36874 36875 36876 36877 36878 36879 36880 36881 36882 36883 36884 36885 36886 36887 36888 36889 36890 36891 36892 36893 36894 36895 36896 36897 36898 36899 36900 36901 36902 36903 36904 36905 36906 36907 36908 36909 36910 36911 36912 36913 36914 36915 36916 36917 36918 36919 36920 36921 36922 36923 36924 36925 36926 36927 36928 36929 36930 36932 36934 36935 36936 36937 36938 36939 36948 36949 36950 36951 36952 36953 36956 36957 36958 36959 36961 36962 36963 36964 36965 36966 36967 36968 36969 36970 36972 36973 36974 36975 36977 36979 36980 36981 36982 36983 36985 36986 36987 36988 36989 36990 36991 36992 36993 36994 36996 36997 36998 36999 37000 37001 37004 37006 37008 37009 37011 37012 37013 37014 37015 37016 37017 37023 37024 37028 37029 37030 37032 37034 37035 37037 37038 37039 37040 37041 37042 37047 37048 37050 37052 37053 37054 37056 37057 37058 37059 37060 37061 37062 37063 37064 37066 37067 37068 37069 37072 37073 37074 37075 37076 37077 37078 37079 37083 37084 37087 37088 37089 37090 37091 37092 37102 37103 37104 37105 37106 37110 37111 37113 37114 37121 37122 37123 37124 37125 37126 37127 37128 37129 37133 37135 37136 37137 37138 37139 37141 37142 37144 37150 37151 37152 37153 37154 37156 37157 37158 37159 37161 37162 37166 37167 37168 37170 37171 37173 37179 37180 37181 37182 37183 37184 37185 37187 37189 37190 37191 37192 37194 37195 37197 37202 37203 37204 37205 37207 37208 37209 37210 37212 37216 37217 37218 37220 37221 37223 37230 37231 37232 37233 37234 37235 37236 37237 37240 37242 37243 37244 37245 37247 37249 37250 37254 37255 37256 37257 37259 37260 37261 37263 37266 37267 37268 37269 37270 37271 37273 37274 37275 37276 37278 37279 37280 37281 37282 37283 37284 37285 37287 37289 37290 37291 37292 37294 37295 37297 37298 37307 37308 37309 37310 37311 37314 37315 37316 37317 37318 37319 37320 37321 37322 37323 37324 37325 37326 37327 37328 37329 37330 37331 37332 37333 37334 37335 37336 37337 37338 37339 37340 37341 37342 37343 37344 37345 37346 37347 37348 37349 37350 37351 37352 37353 37354 37355 37356 37357 37358 37359 37360 37361 37362 37363 37364 37365 37366 37367 37368 37369 37370 37371 37372 37373 37374 37375 37376 37377 37378 37379 37380 37381 37382 37383 37384 37385 37386 37387 37388 37389 37390 37391 37392 37393 37394 37395 37396 37397 37398 37399 37400 37401 37402 37403 37404 37405 37406 37407 37408 37409 37410 37411 37412 37413 37414 37415 37416 37417 37418 37419 37420 37421 37422 37423 37424 37425 37426 37427 37428 37429 37430 37431 37432 37433 37434 37435 37436 37437 37438 37439 37440 37441 37442 37443 37444 37445 37446 37447 37448 37449 37450 37451 37452 37453 37454 37455 37456 37457 37458 37459 37460 37461 37462 37463 37464 37465 37466 37467 37468 37469 37470 37471 37472 37473 37474 37475 37476 37477 37478 37479 37480 37481 37482 37483 37484 37485 37486 37487 37488 37489 37490 37491 37492 37493 37494 37495 37496 37497 37498 37499 37500 37501 37502 37503 37504 37505 37506 37507 37508 37509 37510 37511 37512 37513 37514 37515 37516 37517 37518 37519 37520 37521 37522 37523 37524 37525 37526 37527 37528 37529 37530 37531 37532 37533 37534 37535 37536 37537 37538 37539 37540 37541 37542 37543 37544 37545 37546 37547 37548 37549 37550 37551 37552 37553 37554 37555 37556 37557 37558 37559 37560 37561 37562 37563 37564 37565 37566 37567 37568 37569 37570 37571 37572 37573 37574 37575 37576 37577 37578 37579 37580 37581 37582 37583 37584 37585 37586 37587 37588 37589 37590 37591 37592 37593 37594 37595 37596 37597 37598 37599 37600 37601 37602 37604 37605 37606 37607 37608 37609 37610 37611 37612 37613 37614 37616 37617 37618 37620 37622 37623 37624 37625 37626 37627 37628 37629 37630 37631 37632 37633 37634 37635 37636 37637 37638 37639 37640 37641 37642 37643 37644 37645 37646 37647 37648 37649 37650 37651 37652 37653 37654 37655 37656 37657 37658 37659 37660 37661 37662 37663 37664 37665 37666 37667 37668 37669 37670 37671 37672 37673 37674 37675 37676 37677 37678 37679 37680 37681 37682 37683 37684 37685 37686 37687 37688 37689 37690 37691 37692 37693 37694 37695 37696 37697 37698 37699 37700 37701 37702 37703 37704 37705 37706 37707 37708 37709 37710 37711 37712 37713 37714 37715 37716 37717 37718 37719 37720 37721 37722 37723 37724 37725 37726 37727 37728 37729 37730 37731 37732 37733 37734 37735 37736 37737 37738 37739 37740 37741 37742 37743 37744 37745 37746 37747 37748 37749 37750 37751 37752 37753 37754 37755 37756 37757 37758 37759 37760 37761 37762 37763 37764 37765 37766 37767 37768 37769 37770 37771 37772 37773 37774 37775 37776 37777 37778 37779 37780 37781 37782 37783 37784 37785 37786 37787 37788 37793 37795 37796 37798 37800 37801 37803 37804 37805 37806 37807 37808 37812 37813 37814 37815 37816 37817 37818 37819 37820 37821 37822 37823 37824 37825 37826 37827 37828 37829 37830 37831 37832 37833 37834 37835 37836 37837 37838 37839 37840 37841 37842 37843 37844 37845 37846 37847 37848 37849 37850 37851 37852 37853 37854 37855 37856 37857 37858 37859 37860 37861 37862 37863 37864 37865 37866 37867 37868 37869 37870 37871 37872 37873 37874 37875 37876 37877 37878 37879 37880 37881 37882 37883 37884 37885 37886 37887 37888 37889 37890 37891 37892 37893 37894 37895 37896 37897 37898 37899 37900 37901 37903 37904 37909 37910 37916 37917 37918 37919 37920 37921 37922 37923 37924 37925 37926 37927 37928 37929 37930 37931 37932 37933 37934 37935 37936 37937 37938 37939 37940 37941 37942 37946 37947 37948 37949 37953 37954 37955 37956 37957 37958 37959 37960 37961 37962 37963 37964 37965 37966 37967 37968 37969 37970 37971 37972 37973 37974 37975 37976 37977 37978 37979 37980 37981 37982 37983 37984 37985 37986 37987 37988 37989 37990 37991 37992 37993 37994 37995 37996 37997 37998 37999 38000 38001 38002 38003 38004 38005 38006 38007 38008 38009 38010 38011 38012 38013 38014 38015 38016 38017 38018 38019 38020 38021 38022 38023 38024 38025 38026 38027 38028 38029 38030 38031 38032 38033 38034 38035 38036 38037 38038 38039 38040 38041 38042 38043 38044 38045 38046 38047 38048 38049 38050 38051 38052 38053 38054 38055 38056 38057 38061 38062 38063 38064 38068 38069 38070 38071 38072 38073 38074 38075 38076 38077 38078 38079 38080 38081 38082 38083 38084 38085 38086 38087 38088 38089 38090 38091 38092 38093 38094 38095 38096 38097 38098 38129 38130 38131 38132 38133 38134 38135 38136 38137 38138 38139 38140 38141 38142 38143 38144 38145 38146 38147 38148 38149 38150 38151 38152 38153 38154 38155 38156 38157 38158 38159 38160 38161 38162 38163 38164 38165 38166 38167 38168 38169 38170 38171 38172 38173 38174 38175 38176 38177 38178 38179 38180 38181 38182 38183 38184 38185 38186 38187 38188 38189 38190 38191 38192 38193 38194 38195 38196 38197 38198 38199 38200 38201 38202 38203 38204 38205 38206 38207 38208 38209 38210 38211 38212 38213 38214 38216 38217 38218 38219 38220 38222 38223 38224 38225 38226 38227 38228 38229 38230 38231 38233 38235 38236 38237 38238 38265 38266 38267 38268 38269 38270 38271 38272 38273 38274 38275 38276 38277 38278 38279 38280 38281 38282 38283 38284 38285 38286 38287 38288 38289 38290 38291 38292 38293 38294 38295 38296 38297 38298 38299 38300 38301 38302 38303 38304 38305 38306 38307 38308 38309 38310 38311 38312 38313 38314 38315 38316 38317 38318 38319 38320 38321 38322 38323 38324 38325 38326 38327 38328 38329 38330 38331 38332 38333 38334 38335 38336 38337 38338 38339 38340 38341 38342 38343 38345 38346 38348 38349 38356 38357 38358 38359 38360 38361 38362 38363 38364 38368 38370 38371 38372 38373 38400 38401 38402 38403 38404 38405 38406 38407 38408 38409 38410 38411 38412 38413 38414 38415 38416 38417 38418 38419 38420 38421 38422 38423 38424 38425 38426 38427 38428 38429 38430 38431 38432 38433 38434 38435 38436 38437 38438 38439 38440 38441 38442 38443 38444 38445 38446 38447 38448 38449 38450 38451 38452 38453 38454 38455 38456 38457 38458 38459 38460 38461 38462 38463 38464 38465 38466 38467 38468 38469 38470 38471 38472 38473 38474 38475 38476 38489 38490 38491 38492 38494 38495 38496 38497 38504 38505 38506 38522 38524 38525 38530 38531 38532 38533 38534 38535 38536 38537 38538 38539 38540 38541 38542 38543 38544 38545 38546 38547 38548 38549 38550 38551 38552 38553 38554 38555 38556 38557 38558 38559 38560 38561 38562 38563 38564 38565 38566 38567 38568 38569 38570 38571 38572 38573 38574 38575 38576 38577 38578 38579 38580 38581 38582 38583 38584 38585 38586 38587 38588 38589 38590 38591 38592 38594 38595 38597 38598 38605 38606 38607 38608 38609 38610 38611 38612 38613 38617 38619 38620 38621 38622 38623 38624 38626 38627 38628 38629 38631 38632 38633 38634 38635 38636 38637 38638 38639 38640 38641 38642 38643 38644 38645 38646 38647 38648 38649 38650 38651 38652 38653 38654 38655 38656 38657 38658 38659 38660 38661 38662 38663 38664 38665 38666 38667 38668 38669 38670 38671 38672 38673 38674 38675 38676 38677 38678 38679 38680 38681 38682 38683 38684 38685 38686 38687 38688 38689 38690 38691 38692 38693 38694 38695 38696 38697 38698 38699 38700 38701 38702 38703 38704 38705 38706 38707 38708 38709 38710 38711 38712 38713 38714 38715 38716 38717 38718 38719 38720 38721 38722 38723 38724 38725 38726 38727 38728 38729 38730 38731 38732 38733 38734 38735 38736 38737 38738 38739 38740 38741 38742 38743 38744 38745 38746 38747 38748 38749 38750 38751 38752 38753 38754 38755 38756 38757 38758 38759 38760 38761 38762 38763 38765 38766 38767 38768 38769 38770 38771 38772 38773 38774 38775 38777 38778 38779 38780 38781 38782 38784 38785 38786 38788 38789 38790 38791 38792 38793 38794 38795 38797 38798 38799 38801 38802 38803 38804 38805 38806 38807 38808 38828 38833 38834 38836 38837 38838 38839 38840 38841 38842 38844 38845 38850 38851 38852 38853 38880 38881 38882 38883 38887 38889 38890 38891 38892 38893 38894 38895 38924 38926 38927 38928 38929 38931 38932 38937 38938 38942 38943 38944 38946 38947 38948 38949 38950 38951 38952 38953 38955 38956 38957 38958 38959 38960 38961 38962 38963 38965 38983 38988 38989 38990 38992 38993 38994 38995 38996 38997 38998 38999 39000 39001 39007 39008 39010 39011 39013 39050 39052 39053 39055 39056 39057 39061 39063 39064 39065 39067 39068 39069 39091 39092 39094 39095 39096 39097 39098 39099 39100 39102 39103 39108 39109 39110 39111 39113 39114 39115 39117 39118 39119 39120 39121 39122 39123 39124 39125 39126 39128 39129 39130 39132 39133 39134 39135 39136 39137 39140 39141 39142 39143 39148 39150 39153 39171 39174 39175 39176 39177 39179 39180 39182 39183 39184 39185 39186 39187 39188 39189 39191 39192 39193 39194 39195 39212 39213 39217 39218 39219 39221 39222 39226 39227 39228 39229 39230 39231 39232 39234 39235 39236 39237 39238 39239 39240 39241 39242 39243 39244 39245 39246 39247 39248 39249 39250 39251 39252 39253 39254 39255 39256 39257 39278 39279 39280 39282 39283 39284 39285 39289 39290 39291 39292 39294 39295 39297 39313 39314 39315 39316 39317 39318 39319 39320 39321 39322 39323 39324 39325 39326 39327 39328 39331 39332 39333 39338 39339 39340 39342 39343 39344 39345 39349 39350 39351 39366 39367 39368 39370 39371 39375 39376 39377 39378 39379 39380 39381 39382 39383 39401 39404 39406 39407 39408 39413 39415 39416 39419 39420 39441 39442 39443 39444 39445 39449 39450 39451 39452 39453 39454 39455 39456 39457 39458 39459 39460 39461 39462 39463 39484 39485 39486 39487 39488 39489 39490 39491 39492 39493 39494 39495 39496 39497 39498 39499 39500 39501 39502 39503 39504 39505 39506 39507 39508 39509 39510 39511 39512 39513 39514 39515 39516 39517 39518 39541 39542 39543 39548 39549 39550 39551 39554 39555 39557 39580 39581 39582 39583 39584 39585 39586 39587 39588 39589 39590 39591 39592 39593 39594 39595 39596 39597 39598 39611 39613 39614 39615 39617 39618 39620 39621 39622 39623 39624 39625 39626 39627 39628 39629 39630 39631 39632 39633 39634 39635 39636 39637 39638 39639 39640 39641 39642 39643 39644 39645 39646 39647 39648 39649 39650 39651 39652 39653 39654 39655 39656 39657 39658 39659 39660 39661 39662 39663 39664 39665 39666 39667 39668 39669 39670 39671 39672 39673 39674 39675 39676 39677 39678 39679 39680 39681 39682 39683 39684 39685 39686 39687 39688 39689 39690 39691 39692 39693 39694 39695 39696 39697 39698 39699 39700 39701 39702 39703 39704 39705 39706 39707 39708 39709 39710 39711 39712 39714 39716 39717 39718 39719 39720 39721 39722 39724 39725 39733 39734 39735 39736 39737 39738 39739 39740 39741 39742 39743 39744 39745 39746 39747 39748 39749 39750 39752 39753 39754 39755 39756 39757 39758 39759 39760 39761 39762 39763 39764 39765 39766 39776 39777 39779 39780 39781 39782 39786 39788 39789 39791 39793 39794 39796 39797 39798 39799 39800 39803 39804 39805 39806 39807 39808 39809 39810 39811 39812 39813 39814 39815 39816 39817 39818 39819 39820 39821 39822 39823 39824 39826 39827 39829 39831 39833 39834 39835 39836 39837 39838 39844 39848 39849 39850 39851 39852 39857 39858 39859 39860 39862 39866 39868 39869 39870 39871 39872 39890 39891 39898 39901 39903 39904 39905 39923 39924 39925 39927 39928 39929 39930 39931 39932 39933 39934 39935 39937 39938 39941 39942 39960 39961 39962 39963 39966 39967 39968 39969 39970 39971 39972 39973 39974 39975 39976 39977 39978 39979 39996 39997 39998 39999 40000 40001 40002 40003 40004 40005 40006 40007 40008 40009 40010 40011 40012 40013 40014 40015 40016 40017 40018 40019 40020 40021 40022 40023 40024 40025 40026 40027 40028 40029 40030 40031 40032 40033 40034 40035 40036 40037 40038 40039 40040 40041 40042 40043 40044 40045 40046 40047 40048 40049 40050 40051 40052 40053 40054 40055 40056 40057 40058 40059 40060 40061 40062 40063 40064 40065 40066 40067 40068 40069 40070 40071 40072 40073 40074 40075 40076 40077 40078 40079 40080 40081 40082 40083 40084 40085 40086 40087 40088 40089 40090 40091 40092 40093 40094 40095 40096 40097 40098 40099 40100 40101 40102 40103 40104 40105 40106 40107 40108 40109 40113 40114 40115 40117 40118 40119 40127 40128 40129 40151 40152 40156 40157 40158 40164 40165 40166 40167 40168 40169 40170 40171 40172 40173 40174 40175 40176 40177 40178 40179 40180 40181 40182 40183 40184 40185 40186 40187 40188 40189 40190 40191 40192 40193 40194 40195 40196 40197 40198 40199 40200 40201 40202 40203 40204 40205 40206 40207 40208 40209 40210 40211 40212 40213 40214 40215 40216 40217 40222 40223 40226 40227 40228 40229 40230 40231 40232 40233 40234 40235 40236 40237 40238 40239 40240 40241 40242 40243 40244 40245 40246 40247 40248 40249 40250 40251 40252 40253 40254 40255 40256 40257 40258 40259 40260 40261 40262 40263 40264 40265 40266 40267 40268 40269 40270 40271 40272 40273 40274 40275 40276 40277 40278 40279 40280 40281 40282 40283 40284 40285 40286 40287 40288 40289 40290 40291 40292 40293 40294 40295 40297 40298 40299 40300 40301 40302 40303 40304 40305 40306 40307 40308 40310 40311 40312 40313 40314 40315 40316 40317 40318 40319 40320 40321 40322 40323 40324 40325 40326 40327 40328 40329 40330 40331 40332 40333 40334 40335 40336 40337 40338 40339 40340 40341 40342 40343 40344 40345 40346 40347 40348 40349 40350 40351 40352 40353 40354 40355 40356 40357 40358 40359 40360 40361 40362 40363 40364 40365 40366 40367 40368 40369 40370 40371 40372 40373 40374 40375 40376 40377 40378 40379 40380 40381 40382 40383 40384 40385 40386 40387 40388 40389 40390 40391 40392 40393 40394 40395 40396 40397 40398 40399 40400 40401 40402 40403 40404 40405 40406 40407 40408 40409 40410 40411 40412 40413 40414 40415 40416 40417 40418 40419 40420 40421 40422 40423 40424 40425 40426 40427 40428 40429 40430 40431 40432 40433 40434 40435 40436 40437 40438 40439 40440 40441 40442 40443 40444 40445 40446 40447 40448 40449 40450 40451 40452 40453 40454 40455 40456 40457 40458 40459 40460 40461 40462 40463 40464 40465 40466 40467 40468 40469 40470 40471 40472 40473 40474 40475 40476 40477 40478 40479 40480 40481 40482 40483 40484 40485 40486 40487 40488 40489 40490 40491 40492 40493 40494 40495 40496 40497 40498 40499 40500 40501 40502 40503 40504 40505 40506 40507 40508 40509 40510 40511 40512 40513 40514 40515 40516 40518 40520 40521 40522 40523 40525 40526 40527 40528 40529 40530 40531 40533 40534 40535 40536 40537 40539 40540 40542 40543 40544 40546 40547 40548 40549 40550 40552 40557 40558 40559 40564 40565 40566 40574 40575 40576 40594 40595 40596 40598 40599 40611 40612 40633 40634 40635 40636 40637 40639 40640 40642 40643 40644 40645 40646 40647 40648 40649 40650 40651 40652 40653 40654 40655 40657 40660 40661 40662 40663 40664 40665 40666 40667 40669 40670 40675 40677 40678 40679 40680 40681 40683 40684 40685 40686 40690 40691 40692 40693 40694 40696 40697 40698 40699 40700 40701 40702 40703 40705 40706 40707 40708 40709 40717 40718 40722 40723 40724 40725 40726 40727 40728 40729 40730 40731 40732 40733 40734 40735 40736 40737 40738 40739 40740 40741 40742 40743 40744 40745 40746 40747 40748 40749 40750 40751 40752 40753 40754 40755 40756 40757 40758 40759 40760 40761 40762 40763 40764 40765 40766 40767 40768 40769 40770 40771 40772 40773 40774 40775 40776 40777 40778 40779 40780 40781 40782 40783 40784 40785 40786 40787 40788 40789 40790 40791 40792 40793 40794 40795 40796 40797 40798 40799 40800 40801 40802 40803 40804 40805 40806 40807 40808 40809 40810 40811 40812 40813 40814 40815 40816 40817 40818 40819 40820 40821 40822 40823 40824 40825 40826 40827 40828 40829 40830 40831 40832 40833 40834 40835 40836 40837 40838 40839 40840 40841 40842 40843 40844 40845 40846 40847 40848 40849 40850 40851 40852 40853 40854 40855 40856 40857 40858 40859 40860 40861 40862 40863 40864 40865 40866 40867 40868 40869 40870 40871 40872 40873 40874 40875 40876 40877 40878 40879 40880 40881 40882 40883 40884 40885 40886 40887 40888 40889 40890 40891 40892 40893 40894 40895 40896 40897 40898 40899 40900 40901 40902 40903 40904 40905 40906 40907 40908 40909 40910 40911 40912 40913 40914 40915 40916 40917 40918 40919 40920 40921 40922 40923 40924 40925 40926 40927 40928 40929 40930 40931 40932 40933 40934 40935 40936 40937 40938 40939 40940 40941 40942 40943 40944 40945 40946 40947 40948 40949 40950 40951 40952 40953 40954 40955 40956 40957 40958 40959 40960 40961 40962 40963 40964 40965 40966 40967 40968 40969 40970 40971 40972 40973 40974 40975 40976 40977 40978 40979 40980 40981 40982 40983 40984 40985 40986 40987 40988 40989 40990 40991 40992 40993 40994 40995 40996 40997 40998 40999 41000 41001 41002 41003 41004 41005 41006 41007 41008 41009 41010 41011 41012 41013 41014 41015 41016 41017 41018 41019 41020 41021 41022 41023 41024 41025 41026 41027 41028 41029 41030 41031 41032 41033 41034 41035 41036 41037 41038 41039 41040 41041 41042 41043 41044 41045 41046 41047 41048 41049 41050 41051 41052 41053 41054 41055 41056 41057 41058 41059 41060 41061 41062 41063 41064 41065 41066 41067 41068 41069 41070 41071 41072 41073 41074 41075 41076 41077 41078 41079 41080 41081 41082 41083 41084 41085 41086 41087 41088 41089 41090 41091 41092 41093 41094 41095 41096 41097 41098 41099 41100 41101 41102 41103 41104 41105 41106 41107 41108 41109 41110 41111 41112 41113 41114 41115 41116 41117 41118 41119 41120 41121 41122 41123 41124 41125 41126 41127 41128 41129 41130 41131 41132 41133 41134 41135 41136 41137 41138 41139 41140 41141 41142 41143 41144 41145 41146 41147 41148 41149 41150 41151 41152 41153 41154 41155 41156 41157 41158 41159 41160 41161 41162 41163 41164 41165 41166 41167 41168 41169 41170 41171 41172 41173 41174 41175 41176 41177 41178 41179 41180 41181 41182 41183 41184 41185 41186 41187 41188 41189 41190 41191 41192 41193 41194 41195 41196 41197 41198 41199 41200 41201 41202 41203 41204 41205 41206 41207 41208 41209 41210 41211 41212 41213 41214 41215 41216 41217 41218 41219 41220 41221 41222 41223 41224 41225 41226 41227 41228 41229 41230 41231 41232 41233 41234 41235 41236 41237 41238 41239 41240 41241 41242 41243 41244 41245 41246 41247 41248 41249 41250 41251 41252 41253 41254 41255 41256 41257 41258 41259 41260 41261 41262 41263 41264 41265 41266 41267 41268 41269 41270 41271 41272 41273 41274 41275 41276 41277 41278 41279 41280 41281 41282 41283 41284 41285 41286 41287 41288 41289 41290 41291 41292 41293 41294 41295 41296 41297 41298 41299 41300 41301 41302 41303 41304 41305 41306 41307 41308 41309 41310 41311 41312 41313 41314 41315 41316 41317 41318 41319 41320 41321 41322 41323 41324 41325 41326 41327 41328 41329 41330 41331 41332 41333 41334 41335 41336 41337 41338 41339 41340 41341 41342 41343 41344 41345 41346 41347 41348 41349 41350 41351 41352 41353 41354 41355 41356 41357 41358 41359 41360 41361 41362 41363 41364 41365 41366 41367 41368 41369 41370 41371 41372 41373 41374 41375 41376 41377 41378 41379 41380 41381 41382 41383 41384 41385 41386 41387 41388 41389 41390 41391 41392 41393 41394 41395 41396 41397 41398 41399 41400 41401 41402 41403 41404 41405 41406 41407 41408 41409 41410 41411 41412 41413 41414 41415 41416 41417 41418 41419 41420 41421 41422 41423 41424 41425 41426 41427 41428 41429 41430 41431 41432 41433 41434 41435 41436 41437 41438 41439 41440 41441 41442 41443 41444 41445 41446 41447 41448 41449 41450 41451 41452 41453 41454 41455 41456 41457 41458 41459 41460 41461 41462 41463 41464 41465 41466 41467 41468 41469 41470 41471 41472 41473 41474 41475 41476 41477 41478 41479 41480 41481 41482 41483 41484 41485 41486 41487 41488 41489 41490 41491 41492 41493 41494 41495 41496 41497 41498 41499 41500 41501 41502 41503 41504 41505 41506 41507 41508 41509 41510 41511 41512 41513 41514 41515 41516 41517 41518 41519 41520 41521 41522 41523 41524 41525 41526 41527 41528 41529 41530 41531 41532 41533 41534 41535 41536 41537 41538 41539 41540 41541 41542 41543 41544 41545 41546 41547 41548 41549 41550 41551 41552 41553 41554 41555 41556 41557 41558 41559 41560 41561 41562 41563 41564 41565 41566 41567 41568 41569 41570 41571 41572 41573 41574 41575 41576 41577 41578 41579 41580 41581 41582 41583 41584 41585 41586 41587 41588 41589 41590 41591 41592 41593 41594 41595 41596 41597 41598 41599 41600 41601 41602 41603 41604 41605 41606 41607 41608 41609 41610 41611 41612 41613 41614 41615 41616 41617 41618 41619 41620 41621 41622 41623 41624 41625 41626 41627 41628 41629 41630 41631 41632 41633 41634 41635 41636 41637 41638 41639 41640 41641 41642 41643 41644 41645 41646 41647 41648 41649 41650 41651 41652 41653 41654 41655 41656 41657 41658 41659 41660 41661 41662 41663 41664 41665 41666 41667 41668 41669 41670 41671 41672 41673 41674 41675 41676 41677 41678 41679 41680 41681 41682 41683 41684 41685 41686 41687 41688 41689 41690 41691 41692 41693 41694 41695 41696 41697 41698 41699 41700 41701 41702 41703 41704 41705 41706 41707 41708 41709 41710 41711 41712 41713 41714 41715 41716 41717 41718 41719 41720 41721 41722 41723 41724 41725 41726 41727 41728 41729 41730 41731 41732 41733 41734 41735 41736 41737 41738 41739 41740 41741 41742 41743 41744 41745 41746 41747 41748 41749 41750 41751 41752 41753 41754 41755 41756 41757 41758 41759 41760 41761 41762 41763 41764 41765 41766 41767 41768 41769 41770 41771 41772 41773 41774 41775 41776 41777 41778 41779 41780 41781 41782 41783 41784 41785 41786 41787 41788 41789 41790 41791 41792 41793 41794 41795 41796 41797 41798 41799 41800 41801 41802 41803 41804 41805 41806 41807 41808 41809 41810 41811 41812 41813 41814 41815 41816 41817 41818 41819 41820 41821 41822 41823 41824 41825 41826 41827 41828 41829 41830 41831 41832 41833 41834 41835 41836 41837 41838 41839 41840 41841 41842 41843 41844 41845 41846 41847 41848 41849 41850 41851 41852 41853 41854 41855 41856 41857 41858 41859 41860 41861 41862 41863 41864 41865 41866 41867 41868 41869 41870 41871 41872 41873 41874 41875 41876 41877 41878 41879 41880 41881 41882 41883 41884 41885 41886 41887 41888 41889 41890 41891 41892 41893 41894 41895 41896 41897 41898 41899 41900 41901 41902 41903 41904 41905 41906 41907 41908 41909 41910 41911 41912 41913 41914 41915 41916 41917 41918 41919 41920 41921 41922 41923 41924 41925 41926 41927 41928 41929 41930 41931 41932 41933 41934 41935 41936 41937 41938 41939 41940 41941 41942 41943 41944 41945 41946 41947 41948 41949 41950 41951 41952 41953 41954 41955 41956 41957 41958 41959 41960 41961 41962 41963 41964 41965 41966 41967 41968 41969 41970 41971 41972 41973 41974 41975 41976 41977 41978 41979 41980 41981 41982 41983 41984 41985 41986 41987 41988 41989 41990 41991 41992 41993 41994 41995 41996 41997 41998 41999 42000 42001 42002 42003 42004 42005 42006 42007 42008 42009 42010 42011 42012 42013 42014 42015 42016 42017 42018 42019 42020 42021 42022 42023 42024 42025 42026 42027 42028 42029 42030 42031 42032 42033 42034 42035 42036 42037 42038 42039 42040 42041 42042 42043 42044 42045 42046 42047 42048 42049 42050 42051 42052 42053 42054 42055 42056 42057 42058 42059 42060 42061 42062 42063 42064 42065 42066 42067 42068 42069 42070 42071 42072 42073 42074 42075 42076 42077 42078 42079 42080 42081 42082 42083 42084 42085 42086 42087 42088 42089 42090 42091 42092 42093 42094 42095 42096 42097 42098 42099 42100 42101 42102 42103 42104 42105 42106 42107 42108 42109 42110 42111 42112 42113 42114 42115 42116 42117 42118 42119 42120 42121 42122 42123 42124 42125 42126 42127 42128 42129 42130 42131 42132 42133 42134 42135 42136 42137 42138 42139 42140 42141 42142 42143 42144 42145 42146 42147 42148 42149 42150 42151 42152 42153 42154 42155 42156 42157 42158 42159 42160 42161 42162 42163 42164 42165 42166 42167 42168 42169 42170 42171 42172 42173 42174 42175 42176 42177 42178 42179 42180 42181 42182 42183 42184 42185 42186 42187 42188 42189 42190 42191 42192 42193 42194 42195 42196 42197 42198 42199 42200 42201 42202 42203 42204 42205 42206 42207 42208 42209 42210 42211 42212 42213 42214 42215 42216 42217 42218 42219 42220 42221 42222 42223 42224 42225 42226 42227 42228 42229 42230 42231 42232 42233 42234 42235 42236 42237 42238 42239 42240 42241 42242 42243 42244 42245 42246 42247 42248 42249 42250 42251 42252 42253 42254 42255 42256 42257 42258 42259 42260 42261 42262 42263 42264 42265 42266 42267 42268 42269 42270 42271 42272 42273 42274 42275 42276 42277 42278 42279 42280 42281 42282 42283 42284 42285 42286 42287 42288 42289 42290 42291 42292 42293 42294 42295 42296 42297 42298 42299 42300 42301 42302 42303 42304 42305 42306 42307 42308 42309 42310 42311 42312 42313 42314 42315 42316 42317 42318 42319 42320 42321 42322 42323 42324 42325 42326 42327 42328 42329 42330 42331 42332 42333 42334 42335 42336 42337 42338 42339 42340 42341 42342 42343 42344 42345 42346 42347 42348 42349 42350 42351 42352 42353 42354 42355 42356 42357 42358 42359 42360 42361 42362 42363 42364 42365 42366 42367 42368 42369 42370 42371 42372 42373 42374 42375 42376 42377 42378 42379 42380 42381 42382 42383 42384 42385 42386 42387 42388 42389 42390 42391 42392 42393 42394 42395 42396 42397 42398 42399 42400 42401 42402 42403 42404 42405 42406 42407 42408 42409 42410 42411 42412 42413 42414 42415 42416 42417 42418 42419 42420 42421 42422 42423 42424 42425 42426 42427 42428 42429 42430 42431 42432 42433 42434 42435 42436 42437 42438 42439 42440 42441 42442 42443 42444 42445 42446 42447 42448 42449 42450 42451 42452 42453 42454 42455 42456 42457 42458 42459 42460 42461 42462 42463 42464 42465 42466 42467 42468 42469 42470 42471 42472 42473 42474 42475 42476 42477 42478 42479 42480 42481 42482 42483 42484 42485 42486 42487 42488 42489 42490 42491 42492 42493 42494 42495 42496 42497 42498 42499 42500 42501 42502 42503 42504 42505 42506 42507 42508 42509 42510 42511 42512 42513 42514 42515 42516 42517 42518 42519 42520 42521 42522 42523 42524 42525 42526 42527 42528 42529 42530 42531 42532 42533 42534 42535 42536 42537 42538 42539 42540 42541 42542 42543 42544 42545 42546 42547 42548 42549 42550 42551 42552 42553 42554 42555 42556 42557 42558 42559 42560 42561 42562 42563 42564 42565 42566 42567 42568 42569 42570 42571 42572 42573 42574 42575 42576 42577 42578 42579 42580 42581 42582 42583 42584 42585 42586 42587 42588 42589 42590 42591 42592 42593 42594 42595 42596 42597 42598 42599 42600 42601 42602 42603 42604 42605 42606 42607 42608 42609 42610 42611 42612 42613 42614 42615 42616 42617 42618 42619 42620 42621 42622 42623 42624 42625 42626 42627 42628 42629 42630 42631 42632 42633 42634 42635 42636 42637 42638 42639 42640 42641 42642 42643 42644 42645 42646 42647 42648 42649 42650 42651 42652 42653 42654 42655 42656 42657 42658 42659 42660 42661 42662 42663 42664 42665 42666 42667 42668 42669 42670 42671 42672 42673 42674 42675 42676 42677 42678 42679 42680 42681 42682 42683 42684 42685 42686 42687 42688 42689 42690 42691 42692 42693 42694 42695 42696 42697 42698 42699 42700 42701 42702 42703 42704 42705 42706 42707 42708 42709 42710 42711 42712 42713 42714 42715 42716 42717 42718 42719 42720 42721 42722 42723 42724 42725 42726 42727 42728 42729 42730 42731 42732 42733 42734 42735 42736 42737 42738 42739 42740 42741 42742 42743 42744 42745 42746 42747 42748 42749 42750 42751 42752 42753 42754 42755 42756 42757 42758 42759 42760 42761 42762 42763 42764 42765 42766 42767 42768 42769 42770 42771 42772 42773 42774 42775 42776 42777 42778 42779 42780 42781 42782 42783 42784 42785 42786 42787 42788 42789 42790 42791 42792 42793 42794 42795 42796 42797 42798 42799 42800 42801 42802 42803 42804 42805 42806 42807 42808 42809 42810 42811 42812 42813 42814 42815 42816 42817 42818 42819 42820 42821 42822 42823 42824 42825 42826 42827 42828 42829 42830 42831 42832 42833 42834 42835 42836 42837 42838 42839 42840 42841 42842 42843 42844 42845 42846 42847 42848 42849 42850 42851 42852 42853 42854 42855 42856 42857 42858 42859 42860 42861 42862 42863 42864 42865 42866 42867 42868 42869 42870 42871 42872 42873 42874 42875 42876 42877 42878 42879 42880 42881 42882 42883 42884 42885 42886 42887 42888 42889 42890 42891 42892 42893 42894 42895 42896 42897 42898 42899 42900 42901 42902 42903 42904 42905 42906 42907 42908 42909 42910 42911 42912 42913 42914 42915 42916 42917 42918 42919 42920 42921 42922 42923 42924 42925 42926 42927 42928 42929 42930 42931 42932 42933 42934 42935 42936 42937 42938 42939 42940 42941 42942 42943 42944 42945 42946 42947 42948 42949 42950 42951 42952 42953 42954 42955 42956 42957 42958 42959 42960 42961 42962 42963 42964 42965 42966 42967 42968 42969 42970 42971 42972 42973 42974 42975 42976 42977 42978 42979 42980 42981 42982 42983 42984 42985 42986 42987 42988 42989 42990 42991 42992 42993 42994 42995 42996 42997 42998 42999 43000 43001 43002 43003 43004 43005 43006 43007 43008 43009 43010 43011 43012 43013 43014 43015 43016 43017 43018 43019 43020 43021 43022 43023 43024 43025 43026 43027 43028 43029 43030 43031 43032 43033 43034 43035 43036 43037 43038 43039 43040 43041 43042 43043 43044 43045 43046 43047 43048 43049 43050 43051 43052 43053 43054 43055 43056 43057 43058 43059 43060 43061 43062 43063 43064 43065 43066 43067 43068 43069 43070 43071 43072 43073 43074 43075 43076 43077 43078 43079 43080 43081 43082 43083 43084 43085 43086 43087 43088 43089 43090 43091 43092 43093 43094 43095 43096 43097 43098 43099 43100 43101 43102 43103 43104 43105 43106 43107 43108 43109 43110 43111 43112 43113 43114 43115 43116 43117 43118 43119 43120 43121 43122 43123 43124 43125 43126 43127 43128 43129 43130 43131 43132 43133 43134 43135 43136 43137 43138 43139 43140 43141 43142 43143 43144 43145 43146 43147 43148 43149 43150 43151 43152 43153 43154 43155 43156 43157 43158 43159 43160 43161 43162 43163 43164 43165 43166 43167 43168 43169 43170 43171 43172 43173 43174 43175 43176 43177 43178 43179 43180 43181 43182 43183 43184 43185 43186 43187 43188 43189 43190 43191 43192 43193 43194 43195 43196 43197 43198 43199 43200 43201 43202 43203 43204 43205 43206 43207 43208 43209 43210 43211 43212 43213 43214 43215 43216 43217 43218 43219 43220 43221 43222 43223 43224 43225 43226 43227 43228 43229 43230 43231 43232 43233 43234 43235 43236 43237 43238 43239 43240 43241 43242 43243 43244 43245 43246 43247 43248 43249 43250 43251 43252 43253 43254 43255 43256 43257 43258 43259 43260 43261 43262 43263 43264 43265 43266 43267 43268 43269 43270 43271 43272 43273 43274 43275 43276 43277 43278 43279 43280 43281 43282 43283 43284 43285 43286 43287 43288 43289 43290 43291 43292 43293 43294 43295 43296 43297 43298 43299 43300 43301 43302 43303 43304 43305 43306 43307 43308 43309 43310 43311 43312 43313 43314 43315 43316 43317 43318 43319 43320 43321 43322 43323 43324 43325 43326 43327 43328 43329 43330 43331 43332 43333 43334 43335 43336 43337 43338 43339 43340 43341 43342 43343 43344 43345 43346 43347 43348 43349 43350 43351 43352 43353 43354 43355 43356 43357 43358 43359 43360 43361 43362 43363 43364 43365 43366 43367 43368 43369 43370 43371 43372 43373 43374 43375 43376 43377 43378 43379 43380 43381 43382 43383 43384 43385 43386 43387 43388 43389 43390 43391 43392 43393 43394 43395 43396 43397 43398 43399 43400 43401 43402 43403 43404 43405 43406 43407 43408 43409 43410 43411 43412 43413 43414 43415 43416 43417 43418 43419 43420 43421 43422 43423 43424 43425 43426 43427 43428 43429 43430 43431 43432 43433 43434 43435 43436 43437 43438 43439 43440 43441 43442 43443 43444 43445 43446 43447 43448 43449 43450 43451 43452 43453 43454 43455 43456 43457 43458 43459 43460 43461 43462 43463 43464 43465 43466 43467 43468 43469 43470 43471 43472 43473 43474 43475 43476 43477 43478 43479 43480 43481 43482 43483 43484 43485 43486 43487 43488 43489 43490 43491 43492 43493 43494 43495 43496 43497 43498 43499 43500 43501 43502 43503 43504 43505 43506 43507 43508 43509 43510 43511 43512 43513 43514 43515 43516 43517 43518 43519 43520 43521 43522 43523 43524 43525 43526 43527 43528 43529 43530 43531 43532 43533 43534 43535 43536 43537 43538 43539 43540 43541 43542 43543 43544 43545 43546 43547 43548 43549 43550 43551 43552 43553 43554 43555 43556 43557 43558 43559 43560 43561 43562 43563 43564 43565 43566 43567 43568 43569 43570 43571 43572 43573 43574 43575 43576 43577 43578 43579 43580 43581 43582 43583 43584 43585 43586 43587 43588 43589 43590 43591 43592 43593 43594 43595 43596 43597 43598 43599 43600 43601 43602 43603 43604 43605 43606 43607 43608 43609 43610 43611 43612 43613 43614 43615 43616 43617 43618 43619 43620 43621 43622 43623 43624 43625 43626 43627 43628 43629 43630 43631 43632 43633 43634 43635 43636 43637 43638 43639 43640 43641 43642 43643 43644 43645 43646 43647 43648 43649 43650 43651 43652 43653 43654 43655 43656 43657 43658 43659 43660 43661 43662 43663 43664 43665 43666 43667 43668 43669 43670 43671 43672 43673 43674 43675 43676 43677 43678 43679 43680 43681 43682 43683 43684 43685 43686 43687 43688 43689 43690 43691 43692 43693 43694 43695 43696 43697 43698 43699 43700 43701 43702 43703 43704 43705 43706 43707 43708 43709 43710 43711 43712 43713 43714 43715 43716 43717 43718 43719 43720 43721 43722 43723 43724 43725 43726 43727 43728 43729 43730 43731 43732 43733 43734 43735 43736 43737 43738 43739 43740 43741 43742 43743 43744 43745 43746 43747 43748 43749 43750 43751 43752 43753 43754 43755 43756 43757 43758 43759 43760 43761 43762 43763 43764 43765 43766 43767 43768 43769 43770 43771 43772 43773 43774 43775 43776 43777 43778 43779 43780 43781 43782 43783 43784 43785 43786 43787 43788 43789 43790 43791 43792 43793 43794 43795 43796 43797 43798 43799 43800 43801 43802 43803 43804 43805 43806 43807 43808 43809 43810 43811 43812 43813 43814 43815 43816 43817 43818 43819 43820 43821 43822 43823 43824 43825 43826 43827 43828 43829 43830 43831 43832 43833 43834 43835 43836 43837 43838 43839 43840 43841 43842 43843 43844 43845 43846 43847 43848 43849 43850 43851 43852 43853 43854 43855 43856 43857 43858 43859 43860 43861 43862 43863 43864 43865 43866 43867 43868 43869 43870 43871 43872 43873 43874 43875 43876 43877 43878 43879 43880 43881 43882 43883 43884 43885 43886 43887 43888 43889 43890 43891 43892 43893 43894 43895 43896 43897 43898 43899 43900 43901 43902 43903 43904 43905 43906 43907 43908 43909 43910 43911 43912 43913 43914 43915 43916 43917 43918 43919 43920 43921 43922 43923 43924 43925 43926 43927 43928 43929 43930 43931 43932 43933 43934 43935 43936 43937 43938 43939 43940 43941 43942 43943 43944 43945 43946 43947 43948 43949 43950 43951 43952 43953 43954 43955 43956 43957 43958 43959 43960 43961 43962 43963 43964 43965 43966 43967 43968 43969 43970 43971 43972 43973 43974 43975 43976 43977 43978 43979 43980 43981 43982 43983 43984 43985 43986 43987 43988 43989 43990 43991 43992 43993 43994 43995 43996 43997 43998 43999 44000 44001 44002 44003 44004 44005 44006 44007 44008 44009 44010 44011 44012 44013 44014 44015 44016 44017 44018 44019 44020 44021 44022 44023 44024 44025 44026 44027 44028 44029 44030 44031 44032 44033 44034 44035 44036 44037 44038 44039 44040 44041 44042 44043 44044 44045 44046 44047 44048 44049 44050 44051 44052 44053 44054 44055 44056 44057 44058 44059 44060 44061 44062 44063 44064 44065 44066 44067 44068 44069 44070 44071 44072 44073 44074 44075 44076 44077 44078 44079 44080 44081 44082 44083 44084 44085 44086 44087 44088 44089 44090 44091 44092 44093 44094 44095 44096 44097 44098 44099 44100 44101 44102 44103 44104 44105 44106 44107 44108 44109 44110 44111 44112 44113 44114 44115 44116 44117 44118 44119 44120 44121 44122 44123 44124 44125 44126 44127 44128 44129 44130 44131 44132 44133 44134 44135 44136 44137 44138 44139 44140 44141 44142 44143 44144 44145 44146 44147 44148 44149 44150 44151 44152 44153 44154 44155 44156 44157 44158 44159 44160 44161 44162 44163 44164 44165 44166 44167 44168 44169 44170 44171 44172 44173 44174 44175 44176 44177 44178 44179 44180 44181 44182 44183 44184 44185 44186 44187 44188 44189 44190 44191 44192 44193 44194 44195 44196 44197 44198 44199 44200 44201 44202 44203 44204 44205 44206 44207 44208 44209 44210 44211 44212 44213 44214 44215 44216 44217 44218 44219 44220 44221 44222 44223 44224 44225 44226 44227 44228 44229 44230 44231 44232 44233 44234 44235 44236 44237 44238 44239 44240 44241 44242 44243 44244 44245 44246 44247 44248 44249 44250 44251 44252 44253 44254 44255 44256 44257 44258 44259 44260 44261 44262 44263 44264 44265 44266 44267 44268 44269 44270 44271 44272 44273 44274 44275 44276 44277 44278 44279 44280 44281 44282 44283 44284 44285 44286 44287 44288 44289 44290 44291 44292 44293 44294 44295 44296 44297 44298 44299 44300 44301 44302 44303 44304 44305 44306 44307 44308 44309 44310 44311 44312 44313 44314 44315 44316 44317 44318 44319 44320 44321 44322 44323 44324 44325 44326 44327 44328 44329 44330 44331 44332 44333 44334 44335 44336 44337 44338 44339 44340 44341 44342 44343 44344 44345 44346 44347 44348 44349 44350 44351 44352 44353 44354 44355 44356 44357 44358 44359 44360 44361 44362 44363 44364 44365 44366 44367 44368 44369 44370 44371 44372 44373 44374 44375 44376 44377 44378 44379 44380 44381 44382 44383 44384 44385 44386 44387 44388 44389 44390 44391 44392 44393 44394 44395 44396 44397 44398 44399 44400 44401 44402 44403 44404 44405 44406 44407 44408 44409 44410 44411 44412 44413 44414 44415 44416 44417 44418 44419 44420 44421 44422 44423 44424 44425 44426 44427 44428 44429 44430 44431 44432 44433 44434 44435 44436 44437 44438 44439 44440 44441 44442 44443 44444 44445 44446 44447 44448 44449 44450 44451 44452 44453 44454 44455 44456 44457 44458 44459 44460 44461 44462 44463 44464 44465 44466 44467 44468 44469 44470 44471 44472 44473 44474 44475 44476 44477 44478 44479 44480 44481 44482 44483 44484 44485 44486 44487 44488 44489 44490 44491 44492 44493 44494 44495 44496 44497 44498 44499 44500 44501 44502 44503 44504 44505 44506 44507 44508 44509 44510 44511 44512 44513 44514 44515 44516 44517 44518 44519 44520 44521 44522 44523 44524 44525 44526 44527 44528 44529 44530 44531 44532 44533 44534 44535 44536 44537 44538 44539 44540 44541 44542 44543 44544 44545 44546 44547 44548 44549 44550 44551 44552 44553 44554 44555 44556 44557 44558 44559 44560 44561 44562 44563 44564 44565 44566 44567 44568 44569 44570 44571 44572 44573 44574 44575 44576 44577 44578 44579 44580 44581 44582 44583 44584 44585 44586 44587 44588 44589 44590 44591 44592 44593 44594 44595 44596 44597 44598 44599 44600 44601 44602 44603 44604 44605 44606 44607 44608 44609 44610 44611 44612 44613 44614 44615 44616 44617 44618 44619 44620 44621 44622 44623 44624 44625 44626 44627 44628 44629 44630 44631 44632 44633 44634 44635 44636 44637 44638 44639 44640 44641 44642 44643 44644 44645 44646 44647 44648 44649 44650 44651 44652 44653 44654 44655 44656 44657 44658 44659 44660 44661 44662 44663 44664 44665 44666 44667 44668 44669 44670 44671 44672 44673 44674 44675 44676 44677 44678 44679 44680 44681 44682 44683 44684 44685 44686 44687 44688 44689 44690 44691 44692 44693 44694 44695 44696 44697 44698 44699 44700 44701 44702 44703 44704 44705 44706 44707 44708 44709 44710 44711 44712 44713 44714 44715 44716 44717 44718 44719 44720 44721 44722 44723 44724 44725 44726 44727 44728 44729 44730 44731 44732 44733 44734 44735 44736 44737 44738 44739 44740 44741 44742 44743 44744 44745 44746 44747 44748 44749 44750 44751 44752 44753 44754 44755 44756 44757 44758 44759 44760 44761 44762 44763 44764 44765 44766 44767 44768 44769 44770 44771 44772 44773 44774 44775 44776 44777 44778 44779 44780 44781 44782 44783 44784 44785 44786 44787 44788 44789 44790 44791 44792 44793 44794 44795 44796 44797 44798 44799 44800 44801 44802 44803 44804 44805 44806 44807 44808 44809 44810 44811 44812 44813 44814 44815 44816 44817 44818 44819 44820 44821 44822 44823 44824 44825 44826 44827 44828 44829 44830 44831 44832 44833 44834 44835 44836 44837 44838 44839 44840 44841 44842 44843 44844 44845 44846 44847 44848 44849 44850 44851 44852 44853 44854 44855 44856 44857 44858 44859 44860 44861 44862 44863 44864 44865 44866 44867 44868 44869 44870 44871 44872 44873 44874 44875 44876 44877 44878 44879 44880 44881 44882 44883 44884 44885 44886 44887 44888 44889 44890 44891 44892 44893 44894 44895 44896 44897 44898 44899 44900 44901 44902 44903 44904 44905 44906 44907 44908 44909 44910 44911 44912 44913 44914 44915 44916 44917 44918 44919 44920 44921 44922 44923 44924 44925 44926 44927 44928 44929 44930 44931 44932 44933 44934 44935 44936 44937 44938 44939 44940 44941 44942 44943 44944 44945 44946 44947 44948 44949 44950 44951 44952 44953 44954 44955 44956 44957 44958 44959 44960 44961 44962 44963 44964 44965 44966 44967 44968 44969 44970 44971 44972 44973 44974 44975 44976 44977 44978 44979 44980 44981 44982 44983 44984 44985 44986 44987 44988 44989 44990 44991 44992 44993 44994 44995 44996 44997 44998 44999 45000 45001 45002 45003 45004 45005 45006 45007 45008 45009 45010 45011 45012 45013 45014 45015 45016 45017 45018 45019 45020 45021 45022 45023 45024 45025 45026 45027 45028 45029 45030 45031 45032 45033 45034 45035 45036 45037 45038 45039 45040 45041 45042 45043 45044 45045 45046 45047 45048 45049 45050 45051 45052 45053 45054 45055 45056 45057 45058 45059 45060 45061 45062 45063 45064 45065 45066 45067 45068 45069 45070 45071 45072 45073 45074 45075 45076 45077 45078 45079 45080 45081 45082 45083 45084 45085 45086 45087 45088 45089 45090 45091 45092 45093 45094 45095 45096 45097 45098 45099 45100 45101 45102 45103 45104 45105 45106 45107 45108 45109 45110 45111 45112 45113 45114 45115 45116 45117 45118 45119 45120 45121 45122 45123 45124 45125 45126 45127 45128 45129 45130 45131 45132 45133 45134 45135 45136 45137 45138 45139 45140 45141 45142 45143 45144 45145 45146 45147 45148 45149 45150 45151 45152 45153 45154 45155 45156 45157 45158 45159 45160 45161 45162 45163 45164 45165 45166 45167 45168 45169 45170 45171 45172 45173 45174 45175 45176 45177 45178 45179 45180 45181 45182 45183 45184 45185 45186 45187 45188 45189 45190 45191 45192 45193 45194 45195 45196 45197 45198 45199 45200 45201 45202 45203 45204 45205 45206 45207 45208 45209 45210 45211 45212 45213 45214 45215 45216 45217 45218 45219 45220 45221 45222 45223 45224 45225 45226 45227 45228 45229 45230 45231 45232 45233 45234 45235 45236 45237 45238 45239 45240 45241 45242 45243 45244 45245 45246 45247 45248 45249 45250 45251 45252 45253 45254 45255 45256 45257 45258 45259 45260 45261 45262 45263 45264 45265 45266 45267 45268 45269 45270 45271 45272 45273 45274 45275 45276 45277 45278 45279 45280 45281 45282 45283 45284 45285 45286 45287 45288 45289 45290 45291 45292 45293 45294 45295 45296 45297 45298 45299 45300 45301 45302 45303 45304 45305 45306 45307 45308 45309 45310 45311 45312 45313 45314 45315 45316 45317 45318 45319 45320 45321 45322 45323 45324 45325 45326 45327 45328 45329 45330 45331 45332 45333 45334 45335 45336 45337 45338 45339 45340 45341 45342 45343 45344 45345 45346 45347 45348 45349 45350 45351 45352 45353 45354 45355 45356 45357 45358 45359 45360 45361 45362 45363 45364 45365 45366 45367 45368 45369 45370 45371 45372 45373 45374 45375 45376 45377 45378 45379 45380 45381 45382 45383 45384 45385 45386 45387 45388 45389 45390 45391 45392 45393 45394 45395 45396 45397 45398 45399 45400 45401 45402 45403 45404 45405 45406 45407 45408 45409 45410 45411 45412 45413 45414 45415 45416 45417 45418 45419 45420 45421 45422 45423 45424 45425 45426 45427 45428 45429 45430 45431 45432 45433 45434 45435 45436 45437 45438 45439 45440 45441 45442 45443 45444 45445 45446 45447 45448 45449 45450 45451 45452 45453 45454 45455 45456 45457 45458 45459 45460 45461 45462 45463 45464 45465 45466 45467 45468 45469 45470 45471 45472 45473 45474 45475 45476 45477 45478 45479 45480 45481 45482 45483 45484 45485 45486 45487 45488 45489 45490 45491 45492 45493 45494 45495 45496 45497 45498 45499 45500 45501 45502 45503 45504 45505 45506 45507 45508 45509 45510 45511 45512 45513 45514 45515 45516 45517 45518 45519 45520 45521 45522 45523 45524 45525 45526 45527 45528 45529 45530 45531 45532 45533 45534 45535 45536 45537 45538 45539 45540 45541 45542 45543 45544 45545 45546 45547 45548 45549 45550 45551 45552 45553 45554 45555 45556 45557 45558 45559 45560 45561 45562 45563 45564 45565 45566 45567 45568 45569 45570 45571 45572 45573 45574 45575 45576 45577 45578 45579 45580 45581 45582 45583 45584 45585 45586 45587 45588 45589 45590 45591 45592 45593 45594 45595 45596 45597 45598 45599 45600 45601 45602 45603 45604 45605 45606 45607 45608 45609 45610 45611 45612 45613 45614 45615 45616 45617 45618 45619 45620 45621 45622 45623 45624 45625 45626 45627 45628 45629 45630 45631 45632 45633 45634 45635 45636 45637 45638 45639 45640 45641 45642 45643 45644 45645 45646 45647 45648 45649 45650 45651 45652 45653 45654 45655 45656 45657 45658 45659 45660 45661 45662 45663 45664 16989 17075 18806 18807 19050 19136 19226 -19232 -19233 -19234 35539 35540 35558 35581 35594 35610 35627 35641 35654 35666 35686 35704 35705 35717 35748 35775 35779 35788 35791 35802 35818 35832 35844 35848 35861 35887 35925 35926 -36169 -36170 -36171 -36198 -36200 36212 36214 36222 -36226 -36228 -36229 36235 -36237 36242 36254 36257 36266 36292 -36379 -36380 -36381 -36495 -36496 -36497 36531 36535 -36538 -36540 -36541 -36543 -36546 36561 36570 -36597 -36598 36931 36933 -36940 -36942 -36943 -36944 -36947 36960 36971 36976 36978 36984 36995 37002 37003 37005 37007 37010 -37019 37027 37031 37033 37036 -37044 37051 37055 37065 37070 37071 37085 37086 -37093 -37097 -37098 -37101 37109 37112 -37116 37120 -37132 37134 37140 37143 -37145 -37148 -37149 37155 37160 -37165 37169 37172 -37175 37178 37188 37193 37196 -37198 37206 37211 37219 37222 -37225 -37226 -37228 37229 -37239 37241 37246 37248 -37251 37258 37262 -37265 37272 37277 37286 37288 37293 37296 -37300 -37302 -37304 -37305 -37306 37603 37615 37619 37621 -37789 37794 37797 37799 37802 -37810 37902 37911 -37950 -37952 -38059 -38060 -38112 -38113 -38121 -38125 -38127 38215 38221 38232 38234 -38242 38344 38347 -38351 38355 38369 -38377 -38393 -38397 -38479 -38482 38488 38493 -38503 -38507 -38508 -38510 -38513 -38517 -38521 38523 -38526 -38529 38593 38596 -38600 38604 38618 38625 38630 38764 38776 38783 38787 38796 38800 -38811 -38814 -38815 -38818 -38819 -38822 -38829 38835 38843 -38846 -38862 -38870 -38875 -38876 -38879 -38884 38888 -38920 -38923 38925 38930 -38940 38945 38954 38964 -38966 -38970 -38974 38991 -39002 -39003 39009 39012 -39035 39049 39051 39054 39062 -39066 -39075 -39087 39093 39101 -39104 39116 39127 39131 39138 39139 -39144 39149 39151 39152 -39156 -39159 -39160 -39166 -39169 39173 39178 39181 -39197 -39199 -39200 -39202 -39203 -39207 -39209 -39210 -39214 -39215 39216 39220 -39224 39233 -39262 -39271 -39274 -39275 -39277 39281 -39286 -39287 39293 39296 39329 39330 39337 39341 -39348 -39355 -39364 39365 39369 -39373 39400 39402 39403 39405 39414 -39422 -39446 -39447 -39467 -39468 -39474 -39478 -39479 -39481 -39482 -39483 -39536 -39537 -39539 39540 -39545 39556 -39561 -39572 -39574 -39576 -39578 -39601 -39602 -39606 -39608 -39609 -39610 39612 39616 39619 39713 39715 39723 -39727 -39730 -39732 39751 -39768 -39770 -39772 -39773 -39775 39778 -39783 39787 39790 39792 39795 39825 39828 39830 39832 -39840 -39842 -39843 -39846 39847 -39853 39856 39861 -39863 39867 39889 -39896 39899 39900 39902 39926 39936 39939 39940 -39952 -39954 -39957 -39964 -39965 -39984 -39987 -39990 -39994 -39995 40112 40116 -40123 -40124 -40126 -40138 -40144 -40147 -40148 40150 40155 -40161 -40162 -40163 -40219 40221 -40224 -40225 40296 40309 40517 40519 40524 40532 40538 40541 40545 40551 40556 40563 -40569 -40570 -40573 40593 40597 -40605 -40608 -40610 -40615 -40625 -40626 -40627 -40628 -40631 40638 40656 -40658 40668 -40671 -40672 40676 40682 -40687 -40689 40695 40704 -40712 -40714 -40716 -40719 -40720 -40721 ) // ************************************************************************* //
dd78b330df5a06e4895dfd384cedc541717ed69c
7bbaf7ec0f5838a7cf77a90f6815b765eb1a0c1f
/4.灰度变换/STDAFX.CPP
c7a65c0f305b9646ea8fc495c41e49a3488df187
[]
no_license
five-20/DIP
e92d066bb55d740fe5b6521905748d54128949d6
8763b7b9473f8cd7b14e666840ea79592db830ca
refs/heads/master
2023-03-21T17:29:46.231447
2020-01-14T15:02:40
2020-01-14T15:20:08
null
0
0
null
null
null
null
UTF-8
C++
false
false
204
cpp
// stdafx.cpp : source file that includes just the standard includes // DSplit.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h"
3a6cb164ce56f31a168a8453b6d4a67326061dda
92ebaf7ce3022a38f8ae6bb57f6f8ee4ce6d267c
/tek2/CPP_Pool/cpp_rush3/modules/Task.cpp
1c4d2829852601385724698cc3bd63d8f2596916
[]
no_license
CyrilGrosjean/Epitech
d69d6c448214c9ea17c9837fb03e0e166a73afc4
dde6bc229dcef73d66c422e98bd300cee6d19502
refs/heads/master
2023-04-28T17:32:08.333950
2021-05-20T00:12:33
2021-05-20T00:12:33
228,628,449
0
0
null
2023-04-14T17:18:22
2019-12-17T13:59:00
C++
UTF-8
C++
false
false
1,009
cpp
/* ** EPITECH PROJECT, 2021 ** B-CPP-300-MPL-3-1-CPPrush3-louis.boulet ** File description: ** Task */ #include "Task.hpp" int Task::getNbTasks() const { return (this->_nbtask); } void Task::defineNbTasks(int tasksNb) { this->_nbtask = tasksNb; } Task::Task() { this->_isEnabled = true; this->_moduleType = TASK; this->_nbtask = 0; } void Task::refresh(void) { DIR* dir; if(!(dir = opendir("/proc"))) throw std::runtime_error(std::strerror(errno)); std::size_t count = 0; while(dirent* dirp = readdir(dir)) { if(dirp->d_type != DT_DIR) continue; if(!std::all_of(dirp->d_name, dirp->d_name + std::strlen(dirp->d_name), [](char c){ return std::isdigit(c); })) continue; ++count; } if(closedir(dir)) throw std::runtime_error(std::strerror(errno)); defineNbTasks(count / 2 + 47 ); } void Task::switchModule(void) { this->_isEnabled = !this->_isEnabled; } Task::~Task() { }
4895e15ac9202b6da3dc31ea51047f2d63a2d242
c6b4b35ba7512725a6a80920ae07174abf97309d
/tutorials/Stefan/0.01/phi
8a916948723f950ba7b07218dd697cbad9eb2a6f
[]
no_license
starykov/interThermalPhaseFoam
f822d9271077e4fb21687b21bc590eb839d72534
1a10e44f8404897a45bd181705c8843d8bf4693b
refs/heads/master
2023-02-21T16:39:40.821744
2021-01-24T23:11:30
2021-01-24T23:18:54
332,575,421
0
0
null
null
null
null
UTF-8
C++
false
false
2,803
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2012 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class surfaceScalarField; location "0.01"; object phi; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 3 -1 0 0 0 0]; oriented oriented; internalField nonuniform List<scalar> 99 ( -4.95906e-13 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 -1.13011e-08 ) ; boundaryField { BotWall { type calculated; value uniform 1.00678e-15; } FreeStream { type calculated; value uniform -1.13011e-08; } FrontNBack { type empty; value nonuniform List<scalar> 0(); } LeftSide { type symmetryPlane; value uniform 0; } RightSide { type symmetryPlane; value uniform 0; } } // ************************************************************************* //
102c7fec89a9676725beb530a9fa23d1c43db287
0bdcd4ae4cfd2f1e99ef4441f4bb074f42ea4202
/greeter/person.hpp
474b556b5b7cb28a35a5bf5180199a0a733c63d9
[]
no_license
Morfiniusz/cmake
806662171eab8e8eb1164b364993389f10577482
a5a7a1a6e65fa4f5449f526181c462acee896f6c
refs/heads/master
2023-08-01T00:15:13.639450
2021-09-20T09:34:41
2021-09-20T09:34:41
null
0
0
null
null
null
null
UTF-8
C++
false
false
273
hpp
#pragma once #include <string> class Person { std::string firstName_ = {}; std::string lastName_ = {}; public: Person(const std::string & firstName, const std::string & lastName); Person(const Person & other) = delete; std::string getName() const; };
bea8f7cf2a5a1e9bf785eb12e9faac1986333c23
b39b0652150a981c9e08d63b78a5b8d57197601e
/doom_py/src/lib/boost/process/posix/initializers/notify_io_service.hpp
d94f674c81aa59f9a1df985a074b5dfddb584e35
[ "MIT" ]
permissive
jaekyeom/doom-py
476026afd7dad6ecd47cf2633c745e3b09fa5c9c
a7d08a0f2e92b0ba4be538e182791be4c5a11a1b
refs/heads/master
2020-03-06T18:52:38.651857
2018-04-05T14:28:14
2018-04-05T14:28:14
127,015,715
1
0
MIT
2018-03-27T16:29:10
2018-03-27T16:29:10
null
UTF-8
C++
false
false
1,560
hpp
// Copyright (c) 2006, 2007 Julio M. Merino Vidal // Copyright (c) 2008 Ilya Sokolov, Boris Schaeling // Copyright (c) 2009 Boris Schaeling // Copyright (c) 2010 Felipe Tanus, Boris Schaeling // Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PROCESS_POSIX_INITIALIZERS_NOTIFY_IO_SERVICE_HPP #define BOOST_PROCESS_POSIX_INITIALIZERS_NOTIFY_IO_SERVICE_HPP #include <boost/process/config.hpp> #include <boost/process/posix/initializers/initializer_base.hpp> namespace boost { namespace process { namespace posix { namespace initializers { template <class IOService> class notify_io_service_ : public initializer_base { public: explicit notify_io_service_(IOService &io_service) : io_service_(io_service) {} template <class PosixExecutor> void on_fork_setup(PosixExecutor&) const { io_service_.notify_fork(IOService::fork_prepare); } template <class PosixExecutor> void on_fork_success(PosixExecutor&) const { io_service_.notify_fork(IOService::fork_parent); } template <class PosixExecutor> void on_exec_setup(PosixExecutor&) const { io_service_.notify_fork(IOService::fork_child); } private: IOService &io_service_; }; template <class IOService> notify_io_service_<IOService> notify_io_service(IOService &io_service) { return notify_io_service_<IOService>(io_service); } }}}} #endif
ecd2204124a22f4634c67973c09f3acc2d66b431
191bf92db1a9f6df7c30e37a8f0a14d1c220a3bd
/FINDSHOES.cpp
fdf149e037f3559277f6fa47406d7311262442b8
[]
no_license
doomsday861/Allofit
958fa379296e1a4c9a78b25ab0fd7c222bb1f81a
94d644e52a64ff2949ea731c569478e721fc71bf
refs/heads/master
2023-01-04T12:35:10.447467
2022-12-28T09:30:18
2022-12-28T09:30:18
250,110,669
0
1
null
2021-01-11T09:20:21
2020-03-25T22:59:54
C++
UTF-8
C++
false
false
546
cpp
/** * FINDSHOES **/ #include<bits/stdc++.h> #define ll long long #define testcase ll t;cin>>t;while(t--) #define pb push_back #define fi first #define se second #define vll vector<ll> #define for0(i, n) for (ll i = 0; i < (ll)(n); ++i) #define for1(i, n) for (ll i = 1; i <= (ll)(n); ++i) #define run ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define endl '\n' #define bend(x) x.begin(),x.end() using namespace std; int main() { run testcase { ll n,m; cin>>n>>m; ll req = 2*n; } return 0; }
1dfcb554baf87a3e43a79ea952a83384977cf096
d077ef980958bc40d4f8e6c382b9da3c174d6280
/tdt4102_spring2020_exam-handout_59247384_1590159254391/tdt4102_spring2020_exam-handout/source_of_life/damsim.h
8355964ca745caf3bd50c5b0c16fe7c65a2c99e6
[]
no_license
josteinklogetvedt/OOP
22ba31978b7907c3ee9637df9072236cf6b97f01
8c9ee7f55c5ba6bb420121a68481e83046804355
refs/heads/main
2023-05-29T07:13:18.343159
2021-06-16T12:30:34
2021-06-16T12:30:34
377,485,638
0
0
null
null
null
null
UTF-8
C++
false
false
1,492
h
/** damsim.h This file is part of the handout for the TDT4102 spring 2020 exam. You do not need to understand or change this file in order to complete the assignment. This file is the heaer for damsim.h. **/ #ifndef _DAMSIM_H #define _DAMSIM_H #include <fstream> #include <map> #include <memory> #include "csv.h" #include "dam.h" #include "plotter.h" #include "sensors.h" // Exceptions class UndefinedDam : public exception { }; template <typename SensorProvider> class DamSim { // Path to CSV file containing dam definitions const string dam_def_file; // Stream for writing measurement outputs ofstream output_file; // Path to CSV output file const string output_file_name; // Are we verbose? const bool verbose; // The current simulation timestep unsigned long cur_timestep; // The number of timesteps to simulate for const unsigned long num_timesteps; // Sensor reading instance SensorProvider sensors; // Map for maintaining dam instances map<string, unique_ptr<Dam>> dams; // Should we show the plot window? const bool plotter; // Handle to the plotting window unique_ptr<Plotter> plot_win; public: DamSim(const string dam_def_file, const string measurement_file, const string output_file, const bool verbose, const unsigned long timesteps, const bool plotter); void start(); private: void init_dams(); void write_data(Dam &v, int cur_timestep); void do_timesteps(); }; #endif //_DAMSIM_H
b3413dac7ef5c1f45cd6f8892762454b6bb385cf
f039dc41ab63912b21bd36997a33d62f0dd236b5
/TilSys/MeshTunnel.cpp
7943fc201afec7374737823705a31351b01d649c
[]
no_license
bruce-leng/TFGIS
69b41b60083c536d96db76215e21b183dd944c6d
dc5233f5566b68e30c18cf2185da8a6e4e640cb9
refs/heads/master
2021-01-12T15:59:19.786347
2016-09-27T07:12:53
2016-09-27T07:12:53
69,328,803
2
0
null
null
null
null
GB18030
C++
false
false
59,277
cpp
// MeshTunnel.cpp: implementation of the CMeshTunnel class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "tilsys.h" #include "MeshTunnel.h" #include "TilComFunction.h" #include "MathComput.h" #include <float.h> #include "SpaceRelation.h" #include "triangle.h" #include "Graph\Polygon.h" #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif #define MESH_SCALE 0.000641 ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// CMeshTunnel::CMeshTunnel() { m_lStartDK = 0; m_lEndDK = 0; CTilCanvasMgr* pMgr = GetCanvasMgr(); int nSize = pMgr->Size(); if (nSize > 0) { CString strStartPath = pMgr->GetCanvasByIdx(0)->GetGraph()->GetPathName(); CString strEndPath = pMgr->GetCanvasByIdx(nSize-1)->GetGraph()->GetPathName(); m_lStartDK = get_std_mileage(strStartPath); m_lEndDK = get_std_mileage(strEndPath); } } CMeshTunnel::~CMeshTunnel() { } void CMeshTunnel::SetRangeDK(const long& lStartDK, const long& lEndDK) { m_lStartDK = lStartDK; m_lEndDK = lEndDK; } void CMeshTunnel::GetRangeDK(long& lStartDK, long& lEndDK) { lStartDK = m_lStartDK; lEndDK = m_lEndDK; } // 判断是否所有设定的里程范围内的隧道断面图形都已输入 BOOL CMeshTunnel::IsTunArcParaInputed() { CString strPathName; CTilCanvasMgr* pMgr = GetCanvasMgr(); // 如果都为0,则认为判断的是所有的隧道断面图形是否已输入 for (int i=0; i<pMgr->Size(); i++) { CTilGraph* pGraphMgr = pMgr->GetCanvasByIdx(i)->GetGraph(); strPathName = pGraphMgr->GetPathName(); long lDK = get_std_mileage(strPathName); // 如果下面的不等式成立,则lDK在m_lStartDK和m_lEndDK之间 if ((m_lStartDK-lDK)*(m_lEndDK-lDK)<=0) { CGraph* pGraph = pGraphMgr->GetGraphByIdx(GRAPH_LAYER_TUNARC); if (pGraph->Size()==0) return FALSE; } } return TRUE; } // 创建隧道拱形面片 void CMeshTunnel::CreateTunArc(CSceneGraph3d& scene) { CTilCanvasMgr* pMgr = GetCanvasMgr(); int nCanvasNum = pMgr->Size(); if (nCanvasNum <= 0) return; // 创建网络并将网格对象添加到场景 CMesh3d* pMesh = new CMesh3d; pMesh->SetMeshType(SIDE_FACE); pMesh->SetTextureIndex(0); scene.Add(pMesh); // 设置网格中顶点个数和三角片个数 pMesh->SetNbVertex(0); pMesh->SetNbFace(0); // 取得隧道中心点的图像坐标作为三维坐标原点 int i,j; POINT_3F pt1[40], pt2[40]; int nNum1, nNum2; int nFaceIdx = 0; int nVerIdx = 0; // 设置贴图坐标偏移 CTilCanvas* pCanvas = pMgr->GetCanvasByIdx(0); int nWidth = pCanvas->GetWidth(); CGraph* pTunArc = pCanvas->GetGraph()->GetGraphByIdx(GRAPH_LAYER_TUNARC); // pMesh->SetLockOffset(-ptImgCenter.x*MESH_SCALE, -ptImgCenter.y*MESH_SCALE); nNum1 = pTunArc->GetUnitByIdx(0)->GetPointNum(); for (j=0; j<nNum1; j++) { // 取得第0个目标即隧道断面轮廓层目标上的点 POINT2DF pt = pTunArc->GetUnitByIdx(0)->GetPoint(j); // 设置以中心点为中心的各点坐标 pt1[j].x = pt.x/nWidth; pt1[j].y = pt.y/nWidth; pt1[j].z = 0.0; } // 计算两拱形在三维视图中的位置 float fDist = 0.0; long lK1, lK2; lK1 = get_std_mileage(pMgr->GetCanvasByIdx(0)->GetGraph()->GetPathName()); for (i=1; i<nCanvasNum; i++) { pCanvas = pMgr->GetCanvasByIdx(i); pTunArc = pCanvas->GetGraph()->GetGraphByIdx(GRAPH_LAYER_TUNARC); if (pTunArc->Size()==0) continue; nNum2 = pTunArc->GetUnitByIdx(0)->GetPointNum(); lK2 = get_std_mileage(pMgr->GetCanvasByIdx(i)->GetGraph()->GetPathName()); fDist += abs(lK2-lK1)*100*MESH_SCALE; lK1 = lK2; //调整坐标,原点位于锚点的位置 for (j=0; j<nNum2; j++) { POINT2DF pt = pTunArc->GetUnitByIdx(0)->GetPoint(j); pt2[j].x = pt.x/nWidth; pt2[j].y = pt.y/nWidth; pt2[j].z = fDist; } ConstructRockMass(scene,pMesh,pt1,nNum1,pt2,nNum2,i,i); // ConstructSidePlaneA(scene, pMesh, ARC_FACE, pt1, nNum1, pt2, nNum2, i, i); for (j=0; j<nNum2; j++) { pt1[j] = pt2[j]; } nNum1 = nNum2; } pMesh->Rebuild(); } // 创建隧道掌子面(09.06.07) void CMeshTunnel::CreateTunFace(CSceneGraph3d& scene) { /* CTilCanvasMgr* pMgr = GetCanvasMgr(); // 创建网络并将网格对象添加到场景 CMesh3d* pMesh = new CMesh3d; pMesh->SetMeshType(MESH_FACE); pMesh->SetTextureIndex(7); scene.Add(pMesh); // 设置网格中顶点个数和三角片个数 pMesh->SetNbVertex(0); pMesh->SetNbFace(0); // 取得隧道中心点的图像坐标作为三维坐标原点 int i,j; POINT_3F pt1[40], pt2[40]; int nNum1, nNum2; int nFaceIdx = 0; int nVerIdx = 0; // 设置贴图坐标偏移 CTilCanvas* pCanvas = pMgr->GetCanvasByIdx(0); int nWidth = pCanvas->GetWidth(); CGraph* pTunArc = pCanvas->GetGraph()->GetGraphByIdx(GRAPH_LAYER_TUNARC); // pMesh->SetLockOffset(-ptImgCenter.x*MESH_SCALE, -ptImgCenter.y*MESH_SCALE); nNum1 = pTunArc->GetUnitByIdx(0)->GetPointNum(); for (j=0; j<nNum1; j++) { // 取得第0个目标即隧道断面轮廓层目标上的点 POINT2DF pt = pTunArc->GetUnitByIdx(0)->GetPoint(j); // 设置以中心点为中心的各点坐标 pt1[j].x = pt.x/nWidth; pt1[j].y = pt.y/nWidth; pt1[j].z = 0.0; } // 计算两拱形在三维视图中的位置 float fDist = 0.0; long lK1, lK2; lK1 = get_std_mileage(pMgr->GetCanvasByIdx(0)->GetGraph()->GetPathName()); for (i=1; i<nCanvasNum; i++) { pCanvas = pMgr->GetCanvasByIdx(i); pTunArc = pCanvas->GetGraph()->GetGraphByIdx(GRAPH_LAYER_TUNARC); if (pTunArc->Size()==0) continue; nNum2 = pTunArc->GetUnitByIdx(0)->GetPointNum(); lK2 = get_std_mileage(pMgr->GetCanvasByIdx(i)->GetGraph()->GetPathName()); fDist += abs(lK2-lK1)*100*MESH_SCALE; lK1 = lK2; //调整坐标,原点位于锚点的位置 for (j=0; j<nNum2; j++) { POINT2DF pt = pTunArc->GetUnitByIdx(0)->GetPoint(j); pt2[j].x = pt.x/nWidth; pt2[j].y = pt.y/nWidth; pt2[j].z = fDist; } // ConstructRockMass(scene,pMesh,pt1,nNum1,pt2,nNum2,i,i); ConstructSidePlaneA(scene, pMesh, ARC_FACE, pt1, nNum1, pt2, nNum2, i, i); for (j=0; j<nNum2; j++) { pt1[j] = pt2[j]; } nNum1 = nNum2; } pMesh->Rebuild(); */ } // 创建隧道结构面 void CMeshTunnel::CreateStructures(CSceneGraph3d& scene) { int nCanvasNum = GetCanvasMgr()->Size(); // 释放掉以前的所有顶点 scene.FreeVertext(); POINT_3F ptCenter; POINT2DF ptImgCenter; POINT_3F pt1[400], pt2[400]; int nNum1, nNum2, i, k, m; int nLink, m1, k1; long lK1, lK2; CTilCanvasMgr* pMgr = GetCanvasMgr(); CTilCanvas* pCanvas1 = pMgr->GetCanvasByIdx(0); int nWidth = pCanvas1->GetWidth(); CGraph* pGraph1 = pCanvas1->GetGraph()->GetGraphByIdx(GRAPH_LAYER_TUNARC); lK1 = get_std_mileage(pCanvas1->GetGraph()->GetPathName()); float fDist1, fDist2; for (int nIdx=1; nIdx<3; nIdx++) for (m=0; m<nCanvasNum; m++) { CTilCanvas* pCanvas1 = GetCanvasMgr()->GetCanvasByIdx(m); // 里程为米,乘以100后换算成厘米,再与相乘MESH_SCALE换算 lK1 = get_std_mileage(pCanvas1->GetGraph()->GetPathName()); fDist1 = abs(lK1-m_lStartDK)*100*MESH_SCALE; // 取得岩层目标层中岩层的数目 CGraph* pGraph1 = pCanvas1->GetGraph()->GetGraphByIdx(nIdx); int nRockNum = pGraph1->Size(); for (k=0; k<nRockNum; k++) { CUnit* pUnit1 = pGraph1->GetUnitByIdx(k); // 若前向链接为-1,则该目标已经在前面被处理过了,故这里不能为-1 // int nPreLnk = pUnit1->GetPreLink(); // int nNxtLnk = pUnit1->GetNextLink(); if (pUnit1->GetPreLink()!=-1 || pUnit1->GetNextLink()==-1) continue; // 创建网格对象并将其添加到场景 CMesh3d* pMesh = new CMesh3d; scene.Add(pMesh); pMesh->SetTextureIndex(m); // 设置网格中顶点个数和三角片个数 pMesh->SetMeshID(m, k); pMesh->SetNbVertex(0); pMesh->SetNbFace(0); m1 = m; //切片号 k1 = k; //切片中的对象号 // 为前后两个对应的目标创建连接 nLink = pUnit1->GetNextLink(); if (nLink != -1) { // 获得中心点 nNum1 = pUnit1->GetPointNum(); for (i=0; i<nNum1; i++) { POINT2DF pt = pUnit1->GetPoint(i); pt1[i].x = pt.x/nWidth; pt1[i].y = pt.y/nWidth; pt1[i].z = fDist1; } } while (nLink != -1) { // 得到下一画布被连接的目标的顶点数 CTilCanvas* pCanvas2 = pMgr->GetCanvasByIdx(m1+1); CGraph* pGraph2 = pCanvas2->GetGraph()->GetGraphByIdx(nIdx); CUnit* pUnit2 = pGraph2->GetUnitByIdx(nLink); // 根据文件名取得掌子面里程 lK2 = get_std_mileage(pCanvas2->GetGraph()->GetPathName()); fDist2 = abs(lK2-m_lStartDK)*100*MESH_SCALE; nNum2 = pUnit2->GetPointNum(); for (i=0; i<nNum2; i++) { POINT2DF pt = pUnit2->GetPoint(i); pt2[i].x = pt.x/nWidth; pt2[i].y = pt.y/nWidth; pt2[i].z = fDist2; } if (!pUnit1->IsPolyClose()) ConstructSidePlaneA(scene, pMesh, STRUCT_FACE, pt1, nNum1, pt2, nNum2, m1, m1); else { pMesh->SetMeshType(TOP_FACE); pMesh->SetTextureIndex(8); // ConstructRockMass(scene,pMesh,pt1,nNum1,pt2,nNum2,m1,m1); // ConstructSidePlaneA(scene, pMesh, STRUCT_FACE, pt1, nNum1, pt2, nNum2, m1+1, m1+1); ConstructFace(scene, MESH_FACE, pt1, nNum1, m1, m1); ConstructFace(scene, MESH_FACE, pt2, nNum2, m1+1, m1+1); } nNum1 = nNum2; for (i=0; i<nNum2; i++) pt1[i] = pt2[i]; m1 = m1+1; k1 = nLink; nLink = pUnit2->GetNextLink(); pUnit1 = pUnit2; pCanvas1 = pCanvas2; lK1 = lK2; } } } } // 截取横截面剖面图形 // lDK: 横剖面里程 BOOL CMeshTunnel::NormalSection(long lDK, CTilGraph& graphMgr) { CTilCanvasMgr* pMgr = GetCanvasMgr(); // 如果下面的不等式成立,则lDK不在m_lStartDK和m_lEndDK之间 if ((m_lStartDK-lDK)*(m_lEndDK-lDK)>0) return FALSE; int i,j,k,m,n; float fDist, fDist1, fDist2; POINT_3F pt1[40], pt2[40]; int nNum1, nNum2; long lDK1, lDK2; int nNextLnkIdx; CTilGraph *pGraphMgr1, *pGraphMgr2; pGraphMgr1 = pMgr->GetCanvasByIdx(0)->GetGraph(); CString strPathName1 = pGraphMgr1->GetPathName(); lDK1 = get_std_mileage(strPathName1); for (i=1; i<pMgr->Size(); i++) { pGraphMgr2 = pMgr->GetCanvasByIdx(i)->GetGraph(); CString strPathName2 = pGraphMgr2->GetPathName(); lDK2 = get_std_mileage(strPathName2); // 如果lDK在lDK1、lDK2之间 if ((lDK1-lDK)*(lDK2-lDK)<=0) { // 取得i-1和i幅掌子面的数据 // 取得岩层目标层中岩层的数目 int nRockNum = pGraphMgr1->Size(); for (j=0; j<3; j++) { // 将隧道断面尺寸及相关的第1层数据加入 if (j==0) { // 输入第1层数据 CUnit* pSrcTunArc = pGraphMgr1->GetGraphByIdx(0)->GetUnitByIdx(0); CGraph* pGraph = new CGraph; CUnit* pUnit = new CPolygon; pUnit->m_pPointList->Append(*pSrcTunArc->m_pPointList); pGraph->PushBackUnit(pUnit); graphMgr.PushBackGraph(pGraph); // 输入隧道断面尺寸 CTilTunArc* pTunArc = pGraphMgr1->GetTunArc(); POINT2DF ptImgCenter1 = pTunArc->GetImgCenter(); graphMgr.GetTunArc()->SetImgCenter(ptImgCenter1); vector<PTUNARC_UNIT>* pTunSrcUnits = pTunArc->GetTunArcUnits(); vector<PTUNARC_UNIT>* pTunDstUnits = graphMgr.GetTunArc()->GetTunArcUnits(); for (k=0; k<pTunSrcUnits->size(); k++) { PTUNARC_UNIT pUnits = new TUNARC_UNIT; *pUnits = *((*pTunSrcUnits)[k]); pTunDstUnits->insert(pTunDstUnits->begin(), pUnits); } } CGraph* pGraph = new CGraph; CGraph* pGraph1 = pGraphMgr1->GetGraphByIdx(j); int nUnitNum1 =pGraph1->Size(); for (k=0; k<nUnitNum1; k++) { CUnit* pUnit1 = pGraph1->GetUnitByIdx(k); nNextLnkIdx = pUnit1->GetNextLink(); if (pUnit1->GetNextLink() < 0) continue; // 取得原点 fDist1 = (lDK1-m_lStartDK)*100; // 取得目标1的点数,因为下一个链接目标存在,故直接认为该目标为多段线 nNum1 = pUnit1->GetPointNum(); for (m=0; m<nNum1; m++) { POINT2DF pt = pUnit1->GetPoint(m); pt1[m].x = pt.x; pt1[m].y = pt.y; pt1[m].z = fDist1; } // 取得下一链接目标的点 fDist2 = (lDK2-m_lStartDK)*100; CUnit* pUnit2 = pGraphMgr2->GetGraphByIdx(j)->GetUnitByIdx(nNextLnkIdx); // 取得目标1的点数,因为下一个链接目标存在,故直接认为该目标为多段线 nNum2 = pUnit2->GetPointNum(); for (m=0; m<nNum2; m++) { POINT2DF pt = pUnit2->GetPoint(m); pt2[m].x = pt.x; pt2[m].y = pt.y; pt2[m].z = fDist2; } // 链接对应点 PPPOINT_3F ppLink21; int *pNum21; if (pUnit1->IsPolyClose()) link_faces(pt1, nNum1, pt2, nNum2, &ppLink21, &pNum21); else link_line_segments(pt1, nNum1, pt2, nNum2, &ppLink21, &pNum21); // 取得横剖面图形 PPOINT_3F pPredFace; int nNum; fDist = (lDK-m_lStartDK)*100; float fFace[4] = {0, 0, 1, -fDist}; predict_inner_face(ppLink21, pNum21, nNum2, fFace, &pPredFace, nNum); // 将预测的横断面层存入图形中 CUnit* pUnit = new CPolygon; pUnit->SetPolyClose(pUnit1->IsPolyClose()); for (m=0; m<nNum; m++) { POINT2DF pt; pt.x = pPredFace[m].x; pt.y = pPredFace[m].y; pUnit->m_pPointList->Add(pt); } pGraph->PushBackUnit(pUnit); for (n=0; n<nNum2; n++) delete ppLink21[n]; delete [] ppLink21; delete [] pNum21; delete [] pPredFace; } graphMgr.PushBackGraph(pGraph); } return TRUE; } lDK1 = lDK2; pGraphMgr1 = pGraphMgr2; } // 如果给的lDK不在已知的里程范围内,则进行外部预测,默认在最后一个里程后面 // // 倒数第2张画布 // pGraphMgr1 = pMgr->GetCanvasByIdx(pMgr->Size()-2)->GetGraph(); // strPathName1 = pGraphMgr1->GetPathName(); // // // 找到文件路径 // CString strPath; // for (i=strPathName1.GetLength()-1; i>=0; i--) // { // if (strPathName1.GetAt(i)=='\')) // strPath = strPathName1.Left(i+1); // } // // // 建立一个新的画布、新的图像、图形 // CTilImage* pImageMgr = NULL; // CTilGraph* pGraphMgr = NULL; // CString strPathImage, strPathGraph; // // // 创建图像文件对象 // strPathImage = strPath + lDK + '.' + EXT_IMAGE; // CImage image; // image. // ::CopyFile(str, strPathImage, TRUE); // // pImageMgr = new CTilImage(strPathImage); // // // 创建图形文件对象 // strPathGraph = get_path_graph(str); // HANDLE hHandle = ::CreateFile(strPathGraph, 0, 0, NULL, OPEN_ALWAYS, // FILE_ATTRIBUTE_NORMAL, NULL); // ::CloseHandle(hHandle); // // pGraphMgr = new CTilGraph(strPathGraph); // if (pMgr->PushBackCanvas(new CTilCanvas(strPathImage, strPathGraph))) // LogInfo("装载切片文件 "+str+" 成功!"); // // CTilCanvas* pCanvas = new CTilCanvas(); // pMgr->PushBackCanvas(pCanvas); // CTilGraph* pGraphLayer = new CTilGraph(); // pGraphLayer-> return FALSE; } // 截取纵剖面图形 // lStartDK: 纵剖面起始里程 // lEndDK: 纵剖面起始里程 BOOL CMeshTunnel::Profile(long& lStartDK, long& lEndDK, CTilGraph& graphMgr) { if (lStartDK==0 && lEndDK==0) { lStartDK = m_lStartDK; lEndDK = m_lEndDK; } // 规定输入起始、结束里程必须在给定里程范围内 ASSERT((lStartDK-m_lStartDK)*(lStartDK-m_lEndDK)<=0); ASSERT((lEndDK-m_lStartDK)*(lEndDK-m_lEndDK)<=0); CTilCanvasMgr* pMgr = GetCanvasMgr(); // 若输入都为0,则默认为所有里程范围内的纵剖面 if (lStartDK==lEndDK && lStartDK==0) { lStartDK = m_lStartDK; lEndDK = m_lEndDK; } // 求与显示里程有关的前后两个切片的序号 int i,k,m,n,nIdx1, nIdx2; long lK1, lK2; CTilCanvas* pCanvas1 = pMgr->GetCanvasByIdx(0); CGraph* pGraph1 = pCanvas1->GetGraph()->GetGraphByIdx(GRAPH_LAYER_TUNARC); lK1 = get_std_mileage(pCanvas1->GetGraph()->GetPathName()); for (i=1; i<pMgr->Size(); i++) { CTilCanvas* pCanvas2 = pMgr->GetCanvasByIdx(i); CGraph* pGraph2 = pCanvas2->GetGraph()->GetGraphByIdx(GRAPH_LAYER_TUNARC); lK2 = get_std_mileage(pCanvas2->GetGraph()->GetPathName()); if ((lK1-lStartDK)*(lK2-lStartDK)<=0) nIdx1 = i-1; else if ((lK1-lEndDK)*(lK2-lEndDK)<=0) nIdx2 = i; lK1 = lK2; } // 取得根据掌子面断面尺寸得到的纵剖面图形 CGraph* pGraph=new CGraph; CUnit* pUnit1 = new CPolygon; CUnit* pUnit2 = new CPolygon; for (i=nIdx1; i<=nIdx2; i++) { CTilGraph* pGraphMgr = pMgr->GetCanvasByIdx(i)->GetGraph(); long lK = get_std_mileage(pGraphMgr->GetPathName()); POINT2DF ptImgCenter = pGraphMgr->GetTunArc()->GetImgCenter(); CGraph* pGraph = pGraphMgr->GetGraphByIdx(GRAPH_LAYER_TUNARC); if (pGraph->Size()==0) continue; CUnit* pTunUnit = pGraph->GetUnitByIdx(0); CRect rect = pTunUnit->GetPolyRect(); POINT2DF pt; pt.x = (lK-m_lStartDK)*100; pt.y = rect.top-ptImgCenter.y; pUnit1->m_pPointList->Add(pt); pt.y = rect.bottom-ptImgCenter.y; pUnit2->m_pPointList->Add(pt); } for (i=pUnit2->GetPointNum()-1; i>=0; i--) { POINT2DF pt = pUnit2->m_pPointList->GetAt(i); pUnit1->m_pPointList->Add(pt); } pUnit1->SetPolyClose(TRUE); pGraph->PushBackUnit(pUnit1); graphMgr.PushBackGraph(pGraph); delete pUnit2; POINT_3F ptCenter; POINT2DF ptImgCenter; POINT_3F pt1[40], pt2[40]; int nNum1, nNum2; int nLink, m1, k1; pCanvas1 = pMgr->GetCanvasByIdx(0); pGraph1 = pCanvas1->GetGraph()->GetGraphByIdx(GRAPH_LAYER_TUNARC); lK1 = get_std_mileage(pCanvas1->GetGraph()->GetPathName()); float fDist1, fDist2; deque< deque<POINT_3F> > ddProfile; for (int nIdx=2; i<3; i++) for (m=nIdx1; m<=nIdx2; m++) { CTilCanvas* pCanvas1 = GetCanvasMgr()->GetCanvasByIdx(m); CGraph* pGraph1 = pCanvas1->GetGraph()->GetGraphByIdx(nIdx); // 里程为米,乘以100后换算成厘米,再与相乘MESH_SCALE换算 lK1 = get_std_mileage(pCanvas1->GetGraph()->GetPathName()); fDist1 = abs(lK1-m_lStartDK)*100; int nRockNum = pGraph1->Size(); for (k=0; k<nRockNum; k++) { CUnit* pUnit1 = pGraph1->GetUnitByIdx(k); // 若前向链接为-1,则该目标已经在前面被处理过了,故这里不能为-1 int nPreLnk = pUnit1->GetPreLink(); int nNxtLnk = pUnit1->GetNextLink(); if (pUnit1->GetPreLink()!=-1 || pUnit1->GetNextLink()==-1) continue; m1 = m; // 切片号 k1 = k; // 切片中的对象号 // 为前后两个对应的目标创建连接 nLink = pUnit1->GetNextLink(); if (nLink != -1) { // 获得中心点 ptImgCenter = pCanvas1->GetGraph()->GetTunArc()->GetImgCenter(); // TRACE("\n"); nNum1 = pUnit1->GetPointNum(); for (i=0; i<nNum1; i++) { POINT2DF pt = pUnit1->GetPoint(i); pt1[i].x = pt.x; pt1[i].y = pt.y; pt1[i].z = fDist1; // TRACE("pt[%d](%4.3f,%4.3f,%4.3f)\n", m1, pt.x, pt.y, pt1[i].z); // TRACE("pt[%d](%4.3f,%4.3f,%4.3f)\n", m1, pt1[i].x, pt1[i].y, pt1[i].z); pt1[i].x = ptImgCenter.x-pt1[i].x; pt1[i].y -= ptImgCenter.y; } } while (nLink != -1) { // 得到下一画布被连接的目标的顶点数 CTilCanvas* pCanvas2 = pMgr->GetCanvasByIdx(m1+1); CGraph* pGraph2 = pCanvas2->GetGraph()->GetGraphByIdx(nIdx); CUnit* pUnit2 = pGraph2->GetUnitByIdx(nLink); // 根据文件名取得掌子面里程 lK2 = get_std_mileage(pCanvas2->GetGraph()->GetPathName()); fDist2 = abs(lK2-m_lStartDK)*100; // 获得中心点 ptImgCenter = pCanvas2->GetGraph()->GetTunArc()->GetImgCenter(); nNum2 = pUnit2->GetPointNum(); for (i=0; i<nNum2; i++) { POINT2DF pt = pUnit2->GetPoint(i); pt2[i].x = pt.x; pt2[i].y = pt.y; pt2[i].z = fDist2; // TRACE("pt[%d](%4.3f,%4.3f,%4.3f)\n", m1+1, pt.x, pt.y, pt2[i].z); // TRACE("pt[%d](%4.3f,%4.3f, %4.3f)\n", m1+1, pt2[i].x, pt2[i].y, pt2[i].z); pt2[i].x = ptImgCenter.x-pt2[i].x; pt2[i].y -= ptImgCenter.y; } // 链接对应点 PPPOINT_3F ppLink21; int *pNum21; if (pUnit1->IsPolyClose()) link_faces(pt1, nNum1, pt2, nNum2, &ppLink21, &pNum21); else link_line_segments(pt1, nNum1, pt2, nNum2, &ppLink21, &pNum21); // 取得纵剖面图形 deque< deque<POINT_3F> > ddLines; float fFace[4] = {1, 0, 0, 0}; predict_profile_face(ppLink21, pNum21, nNum2, fFace, ddLines); // 将纵剖面存储 for (n=0; n<ddLines.size(); n++) ddProfile.push_back(ddLines[n]); for (n=0; n<nNum2; n++) delete ppLink21[n]; delete [] ppLink21; delete [] pNum21; nNum1 = nNum2; for (n=0; n<nNum2; n++) pt1[n] = pt2[n]; m1 = m1+1; k1 = nLink; nLink = pUnit2->GetNextLink(); pUnit1 = pUnit2; pCanvas1 = pCanvas2; lK1 = lK2; } } } // 合并所有多段线 merge_line_segments(ddProfile); // 将获得的各段纵剖面线段合并 pGraph = new CGraph; for (m=0; m<ddProfile.size(); m++) { CUnit* pUnit = new CPolygon; pUnit->SetPolyClose(FALSE); for (n=0; n<ddProfile[m].size(); n++) { POINT2DF pt; pt.x = ddProfile[m][n].z; // 因为是纵剖面,故将z坐标变成平面x坐标值 pt.y = ddProfile[m][n].y; pUnit->m_pPointList->Add(pt); } pGraph->PushBackUnit(pUnit); } graphMgr.PushBackGraph(pGraph); return FALSE; } // 预测里程lDK的掌子面图形 BOOL CMeshTunnel::PreNormalSection(long lDK) { return TRUE; } // 创建三维岩体侧面结构面 void CMeshTunnel::ConstructSidePlaneA(CSceneGraph3d &scene, CMesh3d* pMesh, MESH_TYPE type, PPOINT_3F pObj1, int nNum1, // 第一个多段线或多边形 PPOINT_3F pObj2, int nNum2, // 第二个多段线或多边形 int nTextureIdx, int nCanvasIdx) { int nVerNum = pMesh->NbVertex(); CArray3d<CVertex3d> *pArrayVertex = pMesh->GetArrayVertex(); CArray3d<CFace3d> *pArrayFace = pMesh->GetArrayFace(); pMesh->SetMeshType(type); //设置锚点偏移,调整纹理坐标 CTilCanvasMgr* pMgr = GetCanvasMgr(); CTilTunArc* pTunArc = pMgr->GetCanvasByIdx(nCanvasIdx)->GetGraph()->GetTunArc(); POINT2DF ptImgCenter = pTunArc->GetImgCenter(); int i,j; int* pNum21; PPPOINT_3F ppLink21; // 如果是完整岩体 if (type==SIDE_FACE || type==ARC_FACE || type==TOP_FACE || type==MESH_ARC || type==MESH_ROCK) { clock_wise(pObj1,nNum1); clock_wise(pObj2,nNum2); link_faces(pObj1, nNum1, pObj2, nNum2, &ppLink21, &pNum21); } // 如果是结构面 else if (type == STRUCT_FACE) link_line_segments(pObj1, nNum1, pObj2, nNum2, &ppLink21, &pNum21); else return; // 添加顶点 for (i=0; i<nNum2; ++i) pArrayVertex->Add(new CVertex3d(pObj2[i].x, pObj2[i].y, pObj2[i].z)); for (i=0; i<nNum1; ++i) pArrayVertex->Add(new CVertex3d(pObj1[i].x, pObj1[i].y, pObj1[i].z)); int nIdx = pMesh->NbFace(); CVertex3d** ppData = pArrayVertex->GetData(); CVertex3d** ppVertex2 = &ppData[nVerNum]; CVertex3d** ppVertex1 = &ppData[nVerNum+nNum2]; int nIdx1 = 0; CVertex3d *pV1, *pV2, *pV3; // 设置三角面片 pV1 = ppVertex2[0]; pV2 = ppVertex1[nIdx1++]; for (i = 0; i < nNum2; i ++) { for (j = 2; j < pNum21[i]; j ++) { pV3 = ppVertex1[nIdx1++]; CFace3d* pFace = new CFace3d(pV1, pV2, pV3); pArrayFace->SetAtGrow(nIdx++,pFace); pV2 = pV3; nIdx1 %= nNum1; } if (i+1 < nNum2) { pV3 = ppVertex2[i+1]; CFace3d* pFace = new CFace3d(pV1, pV2, pV3); pArrayFace->SetAtGrow(nIdx++,pFace); pV1 = pV3; } else { // 如果是封闭岩体而非结构面 if (type==SIDE_FACE || type==TOP_FACE || type==ARC_FACE || type==MESH_ARC || type==MESH_ROCK) { pV3 = ppVertex2[0]; CFace3d* pFace = new CFace3d(pV1, pV2, pV3); pArrayFace->SetAtGrow(nIdx++,pFace); } } } ////////////////////////////////////////////////////////////////////////// // 预测前方地质情况 /* if (type!=ARC_FACE && nCanvasIdx==6) { float fFace[] = {0, 0, 1, -35*100*MESH_SCALE}; PPOINT_3F pObj3; int nNum3; predict_outer_face(ppLink21, pNum21, nNum2, fFace, &pObj3, nNum3); int* pNum32; PPPOINT_3F ppLink32; // 如果是完整岩体 if (type == SIDE_FACE) link_faces(pObj2, nNum2, pObj3, nNum3, &ppLink32, &pNum32); // 如果是完整结构面 else if (type == STRUCT_FACE) link_line_segments(pObj2, nNum2, pObj3, nNum3, &ppLink32, &pNum32); else return; // 添加顶点 for (i=0; i<nNum3; ++i) pArrayVertex->Add(new CVertex3d(pObj3[i].x, pObj3[i].y, pObj3[i].z)); for (i=0; i<nNum2; ++i) pArrayVertex->Add(new CVertex3d(pObj2[i].x, pObj2[i].y, pObj2[i].z)); nIdx = pMesh->NbFace(); ppData = pArrayVertex->GetData(); CVertex3d** ppVertex3 = &ppData[nVerNum]; ppVertex2 = &ppData[nVerNum+nNum2]; nIdx1 = 0; // 设置三角面片 pV1 = ppVertex3[0]; pV2 = ppVertex2[nIdx1++]; for (i = 0; i < nNum3; i ++) { for (j = 2; j < pNum32[i]; j ++) { pV3 = ppVertex2[nIdx1++]; CFace3d* pFace = new CFace3d(pV1, pV2, pV3); pArrayFace->SetAtGrow(nIdx++,pFace); pV2 = pV3; nIdx1 %= nNum2; } if (i+1 < nNum3) { pV3 = ppVertex3[i+1]; CFace3d* pFace = new CFace3d(pV1, pV2, pV3); pArrayFace->SetAtGrow(nIdx++,pFace); pV1 = pV3; } else { // 如果是封闭岩体而非结构面 if (type == SIDE_FACE) { pV3 = ppVertex3[0]; CFace3d* pFace = new CFace3d(pV1, pV2, pV3); pArrayFace->SetAtGrow(nIdx++,pFace); } } } delete [] pObj3; for (i=0; i<nNum3; i++) delete [] ppLink32[i]; delete [] ppLink32; delete [] pNum32; } */ for (i=0; i<nNum2; i++) delete [] ppLink21[i]; delete [] ppLink21; delete [] pNum21; } // 创建三维岩体在掌子面上的岩层剖面 void CMeshTunnel::ConstructFace(CSceneGraph3d& scene, MESH_TYPE type, PPOINT_3F pObj, int nNum, int nTextureIdx, int nCanvasIdx) { int i; CMesh3d* pMesh = new CMesh3d;//创建网格对象 pMesh->SetMeshType(type); scene.Add(pMesh);//将网格对象添加到场景 pMesh->SetNbVertex(nNum);//设置网格中顶点个数 pMesh->SetNbFace(0);//设置网格中三角片个数 //设置锚点偏移,调整纹理坐标 // CTilCanvasMgr* pMgr = GetCanvasMgr(); // CTilTunArc* pTunArc = pMgr->GetCanvasByIdx(nCanvasIdx)->GetGraph()->GetTunArc(); // POINT2DF ptImgCenter = pTunArc->GetImgCenter(); // pMesh->SetLockOffset(ptImgCenter.x*MESH_SCALE, ptImgCenter.y*MESH_SCALE); pMesh->SetTextureIndex(nTextureIdx); // 添加网络顶点 CArray3d<CVertex3d> *pArrayVertex = pMesh->GetArrayVertex(); for (i = 0; i < nNum; ++i) { pArrayVertex->SetAt(i,new CVertex3d(pObj[i].x, pObj[i].y, pObj[i].z)); } // 提取网格中三角片 CArray3d<CFace3d> *pArrayFace = pMesh->GetArrayFace(); CTriFace faceTop(pArrayFace, pArrayVertex, 0); Vector3F* pVC = new Vector3F [nNum]; for (i=0; i<nNum; ++i) { pVC[i][0] = pObj[i].x; pVC[i][1] = pObj[i].y; pVC[i][2] = pObj[i].z; } Vector3F vcNorm(0,0,1); faceTop.Triangulate(pVC, vcNorm, nNum); pMesh->Rebuild(); delete [] pVC; } // 将两个不同面上的多边形的顶点对应连接起来 // PPOINT_3F pPolygon1, int nNum1, : 第一个掌子面顶点坐标及顶点数 // PPOINT_3F pPolygon2, int nNum2, : 第二个掌子面顶点坐标及顶点数 // PPPOINT_3F ppLink21, int* pNum21 : 第一、二个掌子面的对应点连接 // 注意: ppPolygon二级指针分配了内存,里面的一级指针没有分配内存 void CMeshTunnel::link_faces(PPOINT_3F pPolygon1, int nNum1, PPOINT_3F pPolygon2, int nNum2, POINT_3F*** pppLink21, int** ppNum21) { // 全部转化成顺时针方向 clock_wise(pPolygon1, nNum1); clock_wise(pPolygon2, nNum2); float MinLen, fMinTemp; int MinNum; int i; PROPERTY pro1, pro2, proMean, proDiff; CalProperty(pPolygon1, nNum1, pro1, 1, 1); CalProperty(pPolygon2, nNum2, pro2, 1, 1); proMean.fArea = (pro1.fArea + pro2.fArea) / 2; proMean.ptMean.x = (pro1.ptMean.x + pro2.ptMean.x) / 2; proMean.ptMean.y = (pro1.ptMean.y + pro2.ptMean.y) / 2; proDiff.fArea = pro2.fArea - pro1.fArea; proDiff.ptMean.x = pro2.ptMean.x - pro1.ptMean.x; proDiff.ptMean.y = pro2.ptMean.y - pro1.ptMean.y; if(pro1.fArea < 0.000001) return; if (fabs(pro1.right - pro1.left) < 0.000001 && fabs(pro1.bottom - pro1.top) < 0.000001) return; float fscale = float(pro2.fArea / pro1.fArea); float fscalex = float(fabs(pro2.right - pro2.left) / fabs(pro1.right - pro1.left)); float fscaley = float(fabs(pro2.bottom - pro2.top) / fabs(pro1.bottom - pro1.top)); MinLen = FLT_MAX; MinNum = 0; // 求出离第一个点距离最短的点并标出来 for(i = 0;i<nNum1;i++) { fMinTemp = fabs(pPolygon2[0].x - pro2.ptMean.x-(pPolygon1[i].x - pro1.ptMean.x) * fscalex) + fabs(pPolygon2[0].y - pro2.ptMean.y - (pPolygon1[i].y - pro1.ptMean.y)* fscaley); if(MinLen>fMinTemp) { MinLen=fMinTemp; MinNum=i; } } float fCX, fCY, fCZ; float fLen1, fLen2; float fWeight = 0.5; int nNextWeight = 0; int nLocalFace = 0; int nIdx1, nIdx2; *pppLink21 = new PPOINT_3F [nNum2]; *ppNum21 = new int [nNum2]; PPOINT_3F pTemp = new POINT_3F [3 * (nNum1 + nNum2)]; int nPtNum = 0; bool flag1, flag2; flag1 = false; flag2 = false; nIdx2 = 0; nIdx1 = MinNum; pTemp[0] = pPolygon2[0]; pTemp[1] = pPolygon1[MinNum]; nPtNum = 2; while (1) { fCX = ((pPolygon2[nIdx2%nNum2].x - pro2.ptMean.x) + (pPolygon1[nIdx1%nNum1].x - pro1.ptMean.x) * fscalex) / 2.0; fCY = ((pPolygon2[nIdx2%nNum2].y - pro2.ptMean.y) + (pPolygon1[nIdx1%nNum1].y - pro1.ptMean.y) * fscaley) / 2.0; fCZ = (pPolygon2[nIdx2%nNum2].z + pPolygon1[nIdx1%nNum1].z) / 2.0; // 线段1-2的中点距3,4的距离 fLen2 = fabs(fCX - (pPolygon2[(nIdx2+1)%nNum2].x - pro2.ptMean.x)) + fabs(fCY - (pPolygon2[(nIdx2+1)%nNum2].y - pro2.ptMean.y)); fLen1 = fabs(fCX - (pPolygon1[(nIdx1+1)%nNum1].x - pro1.ptMean.x) * fscalex) + fabs(fCY - (pPolygon1[(nIdx1+1)%nNum1].y - pro1.ptMean.y) * fscaley); if (nNextWeight == 2) fLen1 *= fWeight; if (nNextWeight == 1) fLen2 *= fWeight; // 如果中点距3更近 if (fLen1 < fLen2) { nNextWeight = 1; pTemp[nPtNum ++] = pPolygon1[(nIdx1+1)%nNum1]; nIdx1 ++; nIdx1 %= nNum1; flag1 = true; } else { nNextWeight = 2; (*pppLink21)[nIdx2] = new POINT_3F [nPtNum]; memcpy((*pppLink21)[nIdx2], pTemp, sizeof(POINT_3F)*nPtNum); (*ppNum21)[nIdx2 ++] = nPtNum; nIdx2 %= nNum2; pTemp[0] = pPolygon2[nIdx2]; pTemp[1] = pTemp[nPtNum-1]; nPtNum = 2; flag2 = true; } // 三角面片数量增加1 ++nLocalFace; #if 1 if (flag1 && flag2) { if (nIdx1 == MinNum) { (*pppLink21)[nIdx2] = new POINT_3F [nPtNum]; memcpy((*pppLink21)[nIdx2], pTemp, sizeof(POINT_3F)*nPtNum); (*ppNum21)[nIdx2 ++] = nPtNum; for (i = nIdx2; i < nNum2; i ++) { (*pppLink21)[i] = new POINT_3F [2]; (*pppLink21)[i][0] = pPolygon2[i]; (*pppLink21)[i][1] = pPolygon1[MinNum]; (*ppNum21)[i] = 2; } break; } else if (nIdx2 == 0) { // 将后续点拷贝到第一点的存储位置 pTemp[0] = (*pppLink21)[0][0]; nPtNum = 1; while (nIdx1 != MinNum) { pTemp[nPtNum ++] = pPolygon1[nIdx1 ++]; nIdx1 %= nNum1; } memcpy(pTemp+nPtNum, (*pppLink21)[0]+1, sizeof(POINT_3F)*((*ppNum21)[0]-1)); delete [] (*pppLink21)[0]; (*ppNum21)[0] += nPtNum-1; (*pppLink21)[0] = new POINT_3F [ (*ppNum21)[0] ]; memcpy((*pppLink21)[0], pTemp, sizeof(POINT_3F)*(*ppNum21)[0]); break; } } #else // 如果下一个计算的当前12层点对是第一次计算的12层点对 if (nIdx2 == 0 && nIdx1 == MinNum) { if (pTemp[0] == ppLink21[0][0]) { memcpy(pTemp+nPtNum, (*pppLink21)[0]+1, sizeof(POINT_3F)*(pNum21[0]-1)); delete [] (*pppLink21)[0]; pNum21[0] += nPtNum-1; (*pppLink21)[0] = new POINT_3F [ pNum21[0] ]; memcpy((*pppLink21)[0], pTemp, sizeof(POINT_3F)*pNum21[0]); } break; } #endif if (nLocalFace >= 3 * (nNum1 + nNum2)) break; } delete [] pTemp; } // 将两个不同面上的多段线的顶点对应连接起来 void CMeshTunnel::link_line_segments(PPOINT_3F pPolygon1, int nNum1, PPOINT_3F pPolygon2, int nNum2, POINT_3F*** pppLink21, int** ppNum21) { if (nNum1<=0 || nNum2<=0) return; int i; PROPERTY pro1, pro2, proMean, proDiff; CalProperty(pPolygon1, nNum1, pro1, 1, 1); CalProperty(pPolygon2, nNum2, pro2, 1, 1); proMean.fArea = (pro1.fArea + pro2.fArea) / 2; proMean.ptMean.x = (pro1.ptMean.x + pro2.ptMean.x) / 2; proMean.ptMean.y = (pro1.ptMean.y + pro2.ptMean.y) / 2; proDiff.fArea = pro2.fArea - pro1.fArea; proDiff.ptMean.x = pro2.ptMean.x - pro1.ptMean.x; proDiff.ptMean.y = pro2.ptMean.y - pro1.ptMean.y; if(pro1.fArea < 0.000001) return; if (fabs(pro1.right - pro1.left) < 0.000001 && fabs(pro1.bottom - pro1.top) < 0.000001) return; float fscale = float(pro2.fArea / pro1.fArea); float fscalex = float(fabs(pro2.right - pro2.left) / fabs(pro1.right - pro1.left)); float fscaley = float(fabs(pro2.bottom - pro2.top) / fabs(pro1.bottom - pro1.top)); float fCX, fCY, fCZ; float fLen1, fLen2; float fWeight = 0.5; int nNextWeight = 0; int nIdx1, nIdx2; *ppNum21 = new int [nNum2]; *pppLink21 = new PPOINT_3F [nNum2]; PPOINT_3F pTemp = new POINT_3F [nNum1+nNum2]; int nPtNum = 0; nIdx2 = 0; nIdx1 = 0; pTemp[0] = pPolygon2[0]; pTemp[1] = pPolygon1[0]; nPtNum = 2; while (1) { fCX = ((pPolygon2[nIdx2].x - pro2.ptMean.x) + (pPolygon1[nIdx1].x - pro1.ptMean.x) * fscalex) / 2.0; fCY = ((pPolygon2[nIdx2].y - pro2.ptMean.y) + (pPolygon1[nIdx1].y - pro1.ptMean.y) * fscaley) / 2.0; fCZ = (pPolygon2[nIdx2].z + pPolygon1[nIdx1].z) / 2.0; // 线段1-2的中点距3,4的距离 fLen2 = fabs(fCX - (pPolygon2[nIdx2+1].x - pro2.ptMean.x)) + fabs(fCY - (pPolygon2[nIdx2+1].y - pro2.ptMean.y)); fLen1 = fabs(fCX - (pPolygon1[nIdx1+1].x - pro1.ptMean.x) * fscalex) + fabs(fCY - (pPolygon1[nIdx1+1].y - pro1.ptMean.y) * fscaley); if (nNextWeight == 2) fLen1 *= fWeight; if (nNextWeight == 1) fLen2 *= fWeight; // 如果中点距3更近 if (fLen1 < fLen2) { nNextWeight = 1; pTemp[nPtNum ++] = pPolygon1[nIdx1+1]; nIdx1 ++; } else { nNextWeight = 2; (*pppLink21)[nIdx2] = new POINT_3F [nPtNum]; memcpy((*pppLink21)[nIdx2], pTemp, sizeof(POINT_3F)*nPtNum); (*ppNum21)[nIdx2 ++] = nPtNum; pTemp[0] = pPolygon2[nIdx2]; pTemp[1] = pTemp[nPtNum-1]; nPtNum = 2; } // 如果第一条多段线到头了 if (nIdx1 == nNum1-1) { (*pppLink21)[nIdx2] = new POINT_3F [nPtNum]; memcpy((*pppLink21)[nIdx2], pTemp, sizeof(POINT_3F)*nPtNum); (*ppNum21)[nIdx2 ++] = nPtNum; for (i = nIdx2; i < nNum2; i ++) { (*pppLink21)[i] = new POINT_3F [2]; (*pppLink21)[i][0] = pPolygon2[i]; (*pppLink21)[i][1] = pPolygon1[nNum1-1]; (*ppNum21)[i] = 2; } break; } // 如果第二条多段线到头了 else if (nIdx2 == nNum2-1) { for (i=nIdx1+1; i<nNum1; i++) { pTemp[nPtNum++] = pPolygon1[i]; } (*pppLink21)[nNum2-1] = new POINT_3F [nPtNum]; memcpy((*pppLink21)[nNum2-1], pTemp, sizeof(POINT_3F)*nPtNum); (*ppNum21)[nIdx2] = nPtNum; break; } } delete [] pTemp; } // 根据两个掌子面预测下一个掌子面 // PPPOINT_3F ppLinkFace12, int nNum12 : 两个掌子面的对应点连接 // double* pFace3, : 预测面 // PPOINT_3F pPolygon3, int& nNum3: 输出预测面上的多这形 void CMeshTunnel::predict_outer_face(PPPOINT_3F ppLink21, int* pNum21, int nNum2, float* pFace3, PPPOINT_3F ppPolygon3, int& nNum) { POINT_3F point; float fFaceA[4], fFaceB[4]; nNum = 0; *ppPolygon3 = new POINT_3F [nNum2]; for (int i = 2; i < nNum2; i ++) { // 当为结构面时取得直线与预测面的交点 if (i==2) { get_line_face_interpoint(ppLink21[i-2][0], ppLink21[i-2][1], pFace3, point); (*ppPolygon3)[nNum ++] = point; } get_a_face(ppLink21[i-2][0], ppLink21[i-1][0], ppLink21[i-1][1], fFaceA); get_a_face(ppLink21[i-1][0], ppLink21[i][0], ppLink21[i][1], fFaceB); get_3faces_interpoint(fFaceA, fFaceB, pFace3, point); (*ppPolygon3)[nNum ++] = point; if (i==nNum2-1) { get_line_face_interpoint(ppLink21[i][0], ppLink21[i][pNum21[i]-1], pFace3, point); (*ppPolygon3)[nNum ++] = point; } } // get_a_face(ppLink21[i-2][0], ppLink21[i-1][0], ppLink21[i-1][1], fFaceA); // get_a_face(ppLink21[i-1][0], ppLink21[0][0], ppLink21[0][1], fFaceB); // get_3faces_interpoint(fFaceA, fFaceB, pFace3, point); // (*ppPolygon3)[nNum ++] = point; // // get_a_face(ppLink21[i-1][0], ppLink21[0][0], ppLink21[0][1], fFaceA); // get_a_face(ppLink21[0][0], ppLink21[1][0], ppLink21[1][1], fFaceB); // get_3faces_interpoint(fFaceA, fFaceB, pFace3, point); // (*ppPolygon3)[nNum ++] = point; } // 预测两个掌子面之间的另一掌子面 // PPPOINT_3F ppLink13, int nNum13 : 两个掌子面的对应点连接 // double* pFace2, : 预测面 // PPOINT_3F pPolygon2, int& nNum2: 输出预测面上的多边形*/ void CMeshTunnel::predict_inner_face(PPPOINT_3F ppLink31, int* pNum31, int nNum3, float* pFace2, PPPOINT_3F ppPolygon2, int& nNum2) { int i, j, nIdx; POINT_3F point; nNum2 = 0; for (i = 0; i < nNum3; i ++) nNum2 += pNum31[i]-1; // 如果最后一个点是第一 *ppPolygon2 = new POINT_3F [nNum2]; nIdx = 0; for (i = 0; i < nNum3; i ++) { for (j = 1; j < pNum31[i]; j ++) { get_line_face_interpoint(ppLink31[i][0], ppLink31[i][j], pFace2, point); (*ppPolygon2)[nIdx ++] = point; } } nNum2 = nIdx; } // 预测两个掌子面之后的另一横剖面掌子面 // PPPOINT_3F ppLinkFace12, int nNum1, : 一、二个面之间的点的连接 // double* pFace2 : // PPOINT_3F pPolygon2, int& nNum: 输出预测面上的多段线 void predict_outer_face(PPPOINT_3F ppLink12, int* pNum12, int nNum1, float* pFace2, PPPOINT_3F ppPolygon2, int& nNum2) { } // 预测三个掌子面之后的下一个掌子面 // PPPOINT_3F ppLinkFace12, int nNum1, : 一、二个面之间的点的连接 // PPPOINT_3F ppLinkFace23, int nNum2, : 二、三个面之间的点的连接 // double* pFace4, : // PPOINT_3F pPolygon4, int& nNum void CMeshTunnel::predict_outer_face(PPPOINT_3F ppLink21, int* pNum21, int nNum2, PPPOINT_3F ppLink32, int* pNum32, int nNum3, double* pFace4, PPPOINT_3F ppPolygon4, int& nNum4) { } // 预测两个掌子面之间的另一纵剖面 // PPPOINT_3F ppLink31, int* pNum31, int nNum3 : 两个掌子面的对应点连接 // double* pFace2 : 预测纵剖面 // PPOINT_3F pPolygon2, int& nNum2: 输出预测面上的多这形 void CMeshTunnel::predict_profile_face(PPPOINT_3F ppLink31, int* pNum31, int nNum3, float* pFace2, deque< deque<POINT_3F> >& ddPts31) { ASSERT(nNum3>0); int i, j; BOOL bIsClosed = FALSE; // 分配空间存储平面与各三角面片的交点 POINT_3F pt[3]; PPOINT_3F pPt=NULL; int nNum; for (i=0; i<nNum3; i++) { pt[0] = ppLink31[i][0]; for (j=2; j<pNum31[i]; j++) { pt[1] = ppLink31[i][j-1]; pt[2] = ppLink31[i][j]; get_faces_intersections(pFace2, pt, 3, &pPt, nNum); if (nNum==2) { deque<POINT_3F> dPt; dPt.push_back(pPt[0]); dPt.push_back(pPt[1]); ddPts31.push_back(dPt); } delete pPt; pPt = NULL; } } // 计算第3条边上各线段所在三角面片与平面的交点 for (i=1; i<nNum3; i++) { pt[0] = ppLink31[i-1][0]; pt[1] = ppLink31[i][1]; pt[2] = ppLink31[i][0]; get_faces_intersections(pFace2, pt, 3, &pPt, nNum); if (nNum==2) { deque<POINT_3F> dPt; dPt.push_back(pPt[0]); dPt.push_back(pPt[1]); ddPts31.push_back(dPt); } delete pPt; pPt = NULL; } // 如果是封闭曲线,则计算第一点和最后一点间的线段所在三角面片与平面的交点 // 若下面的等式成立,则说明是封闭曲线 if (ppLink31[0][1] == ppLink31[nNum3-1][ pNum31[nNum3-1]-1 ]) { bIsClosed = TRUE; pt[0] = ppLink31[nNum3-1][0]; pt[1] = ppLink31[0][1]; pt[2] = ppLink31[0][0]; get_faces_intersections(pFace2, pt, 3, &pPt, nNum); // 如果有2个交点,即有交线段,才保存 if (nNum==2) { deque<POINT_3F> dPt; dPt.push_back(pPt[0]); dPt.push_back(pPt[1]); ddPts31.push_back(dPt); } delete pPt; pPt = NULL; } // 将所有的线段合并在一起形成剖面线 merge_line_segments(ddPts31); // 将所有剖面线第1点设置为在第3边界线上的点 int nLines = ddPts31.size(); for (i=0; i<nLines; i++) { POINT_3F pt, pt1, pt2; pt = ddPts31[i][0]; for (j=1; j<nNum3; j++) { pt1 = ppLink31[j-1][0]; pt2 = ppLink31[j][0]; if (point_in_line(pt, pt1, pt2)==POINT_IN_LINE) { goto step; } } // 如果是封闭曲线,则分析第1点与最后一点间的线段 if (bIsClosed) { pt1 = ppLink31[0][0]; pt2 = ppLink31[nNum3-1][0]; if (point_in_line(pt, pt1, pt2)==POINT_IN_LINE) { goto step; } } // 如果剖面线第1点没有在第3边界线上,则将剖面线中点的存储顺序反向 reverse(ddPts31[i].begin(), ddPts31[i].end()); step: continue; } } // 将具有相同端点的线段或多段线合并 void CMeshTunnel::merge_line_segments(deque< deque<POINT_3F> >& ddPts) { // 将所有的线段合并在一起形成剖面线 int nLines, nLines1; while (1) { nLines1 = ddPts.size(); nLines = nLines1; for (int i=0; i<nLines; i++) { for (int j=nLines-1; j>i; j--) { // 如果某端点相同,则将前面端点反向后压入队头 if (ddPts[i][0]==ddPts[j][0]) { reverse(ddPts[j].begin(), ddPts[j].end()); ddPts[i].insert(ddPts[i].begin(), ddPts[j].begin(), ddPts[j].end()-1); ddPts.erase(ddPts.begin()+j); } // 如果与另一端点相同,则将前面端点压入队头 else if (ddPts[i][0]==ddPts[j][1]) { ddPts[i].insert(ddPts[i].begin(), ddPts[j].begin(), ddPts[j].end()-1); ddPts.erase(ddPts.begin()+j); } // 如果另一端点与第1个端点相同,则在队尾压入后继端点 else if (ddPts[i][ddPts[i].size()-1]==ddPts[j][0]) { ddPts[i].insert(ddPts[i].end(), ddPts[j].begin()+1, ddPts[j].end()); ddPts.erase(ddPts.begin()+j); } // 如果另一端点与第2个端点相同,则在队尾压入第1点 else if (ddPts[i][ddPts[i].size()-1]==ddPts[j][1]) { reverse(ddPts[j].begin(), ddPts[j].end()); ddPts[i].insert(ddPts[i].end(), ddPts[j].begin()+1, ddPts[j].end()); ddPts.erase(ddPts.begin()+j); } } nLines = ddPts.size(); } // 如果下式相等,则说明所有剖面线合并完毕 if (nLines1==nLines) break; } } float CMeshTunnel::clock_wise(PPOINT2DF pPts, int nNum) { float fArea = 0.0; for (int i=1; i<nNum; i++) { fArea += pPts[i-1].x*pPts[i].y-pPts[i-1].y*pPts[i].x; } fArea += pPts[i-1].x*pPts[0].y-pPts[i-1].y*pPts[0].x; if (fArea < 0) { fArea = -fArea; // 反向 for (i=0; i<nNum/2; i++) { POINT2DF pt; pt = pPts[i]; pPts[i] = pPts[nNum-i-1]; pPts[nNum-i-1] = pt; } } return fArea; } // 将平面中的多段线上的关键点按顺时针存储 // 注意:此处默认z坐标相同 float CMeshTunnel::clock_wise(PPOINT_3F pPts, int nNum) { float fArea = 0.0; for (int i=1; i<nNum; i++) { fArea += pPts[i-1].x*pPts[i].y-pPts[i-1].y*pPts[i].x; } fArea += pPts[i-1].x*pPts[0].y-pPts[i-1].y*pPts[0].x; if (fArea < 0) { fArea = -fArea; // 反向 for (i=0; i<nNum/2; i++) { POINT_3F pt; pt = pPts[i]; pPts[i] = pPts[nNum-i-1]; pPts[nNum-i-1] = pt; } } return fArea; } // 建立给定点间的对应关系, // 注意,函数给的是特例,不能普遍使用 BOOL CMeshTunnel::VirtualGeoDrill(CSceneGraph3d& scene, /*PPOINT_3F pPts, int nNum, */float fRadius) { // ASSERT(nNum > 0); int nNum = 2; POINT_3F pPts[2]; // 硬性加入给定点坐标 pPts[0].x = 750; pPts[0].y = 450; pPts[0].z = 0; pPts[1].x = 750; pPts[1].y = 450; pPts[1].z = 4000; int nDividNum = 10; PPOINT2DF pDivdPts; divide_circle(fRadius, nDividNum, pDivdPts); for (int i=0; i<nDividNum; i++) { pDivdPts[i].x += pPts[0].x; pDivdPts[i].y += pPts[0].y; } // 求得第一个圆的边界点 PPOINT_3F pPt0 = new POINT_3F [nDividNum]; for (i=0; i<nDividNum; i++) { pPt0[i].x = pDivdPts[i].x; pPt0[i].y = pDivdPts[i].y; pPt0[i].z = pPts[0].z; } // 求第2个椭圆的边界点(设椭圆面与第1个圆面的夹角为45度) PPOINT_3F pPt1 = new POINT_3F [nDividNum]; for (i=0; i<nDividNum; i++) { pPt1[i].x = pPt0[i].x; pPt1[i].y = pPt0[i].y; pPt1[i].z = (pPts[1].z-pPts[0].z); } TRACE("\n"); for (i=0; i<nDividNum; i++) { pPt0[i].x *= MESH_SCALE; pPt0[i].y *= MESH_SCALE; pPt0[i].z *= MESH_SCALE; pPt1[i].x *= MESH_SCALE; pPt1[i].y *= MESH_SCALE; pPt1[i].z *= MESH_SCALE; } // 创建网格对象并将其添加到场景 CMesh3d* pMesh = new CMesh3d; scene.Add(pMesh); pMesh->SetTextureIndex(0); ConstructSidePlaneA(scene, pMesh, MESH_ROCK, pPt0, nDividNum, pPt1, nDividNum, 0, 0); delete [] pPt0; delete [] pPt1; delete [] pDivdPts; pMesh->Rebuild(); return TRUE; } // 将圆按角度平分,计算每条平分点的坐标,并依次存储 void CMeshTunnel::divide_circle(float fRadius, int nNum, PPOINT2DF& pPts) { ASSERT(nNum > 0); double dbAngle = 2*PI/nNum; pPts = new POINT2DF [nNum]; for (int i=0; i<nNum; i ++) { double dbAngle1 =dbAngle*i; POINT2DF pt; pt.x = fRadius*cos(dbAngle1); pt.y = fRadius*sin(dbAngle1); pPts[i] = pt; } } void CMeshTunnel::divide_circle(POINT2DF ptCenter, float fRadius, int nNum, PPOINT2DF& pPts) { ASSERT(nNum > 0); double dbAngle = 2*PI/nNum; pPts = new POINT2DF [nNum]; for (int i=0; i<nNum; i ++) { double dbAngle1 =dbAngle*i; pPts[i].x = fRadius*cos(dbAngle1); pPts[i].y = fRadius*sin(dbAngle1); pPts[i].x += ptCenter.x; pPts[i].y += ptCenter.y; } } // 分割圆弧,将圆弧以弧上平均分割的端点连接表示 // 沿顺时针方向,两个端点均有存储 void CMeshTunnel::divide_arc(const POINT2DF& pt1, const POINT2DF& pt2, const POINT2DF& ptCenter, PPOINT2DF& pPts, int& nNum) { float fRadius = sqrt(pt1.x*pt1.x+pt1.y*pt1.y); float fAngle = get_angle(pt1,ptCenter,pt2); float fArea = 0; fArea += pt1.x*pt2.y-pt1.y*pt2.x; fArea += pt2.x*ptCenter.y-pt2.y*ptCenter.x; fArea += ptCenter.x*pt1.y-ptCenter.y*pt1.x; // 按面积分析逆时针和顺时针情况 if (fArea<0) { fAngle = 2*PI-fAngle; } // 段数及平均角度 nNum = fAngle/AVE_ANGLE+0.5; nNum = (nNum<2)?2:nNum; float fAveAngle = fAngle/nNum; // 计算旋转fAveAngle角度后的点 pPts = new POINT2DF [nNum]; POINT2DF pt = pt1; float fAngle1 = 0; pPts[0] = pt1; for (int i=1; i<nNum; i++) { get_arc_point(pt, ptCenter, -fAveAngle, pPts[i]); pt = pPts[i]; } // pPts[i] = pt2; } // 求虚拟钻孔与各结构面间的交集 /* ================================================================== * 函数名称: CMeshTunnel::VirtualGeoDrill() * 作者: [Leng] * 创建于: [2009-4-24 12:04:30] * 参数列表: [CSceneGraph3d& scene] - [In] [POINT2DF ptCenter] - [In] 中心点坐标,单位为厘米 [ float fRadius] - [In] 地质钻孔半径 注释 : ==================================================================*/ void CMeshTunnel::VirtualGeoDrill(CSceneGraph3d& scene, POINT2DF ptCenter, float fRadius) { int i,j,k,m,nIdx; int nMeshNum, nFaceNum, nVerNum; // deque<PCROSSPOINT> dSection; PPOINT_3F pObj = NULL; // 参数转化 ptCenter.x *= MESH_SCALE; ptCenter.y *= MESH_SCALE; fRadius *= MESH_SCALE; CMesh3d* pMesh = new CMesh3d; nMeshNum = scene.NbObject(); for (i=0; i<nMeshNum; i++) { CMesh3d* pMesh = (CMesh3d*)scene.GetAt(i); nFaceNum = pMesh->NbFace(); for (j=0; j<nFaceNum; j++) { CFace3d* pFace = pMesh->GetFace(j); nVerNum = pFace->NbVertex(); POINT2DF* pPts = new POINT2DF [nVerNum]; // TRACE("\n"); for (k=0; k<nVerNum; k++) { CVertex3d* pVertex = pFace->v(k); pPts[k].x =pVertex->x(); pPts[k].y =pVertex->y(); // TRACE("%9.6f,%9.6f\n",pPts[k].x, pPts[k].y); } clock_wise(pPts, nVerNum); // 求多边形与圆的交集 PCROSSPOINT pCrossPt = poly_circle_section(ptCenter,fRadius,pPts,nVerNum); if (pCrossPt == NULL) { if (pt_in_polygon(ptCenter,pPts,nVerNum)) { pCrossPt = new CROSSPOINT; pCrossPt->nS = 3; pCrossPt->x = ptCenter.x; pCrossPt->y = ptCenter.y; pCrossPt->r = fRadius; pCrossPt->next = NULL; // dSection.push_back(pCrossPt); } // 如果没有交集,则返回继续循环 else { delete [] pPts; continue; } } // 求得面片所在平面的方程 PPOINT_3F pPolygon = new POINT_3F [nVerNum]; for (k=0; k<nVerNum; k++) { CVertex3d* pVertex = pFace->v(k); pPolygon[k].x = pVertex->x(); pPolygon[k].y = pVertex->y(); pPolygon[k].z = pVertex->z(); } float fFace[4]; get_a_face(pPolygon,nVerNum,fFace); delete [] pPolygon; // 根据求得的边界点建立取得三维坐标 PCROSSPOINT p, p1; p = pCrossPt; while (p != NULL) { p->z = -(fFace[0]*p->x+fFace[1]*p->y+fFace[3])/fFace[2]; p = p->next; } // 将坐标转化成顶点进行存储 // 将圆面边界转化成顶点 p = pCrossPt; if (p!=NULL && p->next==NULL) { PPOINT2DF pRoundPts; divide_circle(ptCenter, fRadius, 10, pRoundPts); pObj = new POINT_3F [10]; for (m=0; m<10; m++) { pObj[m].x = pRoundPts[m].x; pObj[m].y = pRoundPts[m].y; pObj[m].z = -(fFace[0]*pObj[m].x+fFace[1]*pObj[m].y+fFace[3])/fFace[2]; } nIdx = 10; delete [] pRoundPts; } else { nIdx = 0; p = p1 = pCrossPt; pObj = new POINT_3F [100]; while (p != NULL) { p1 = p->next; if (p1 != NULL) { // 如果是一条线段 if (p->nS==0 || p->nS==2) { pObj[nIdx].x = p->x; pObj[nIdx].y = p->y; pObj[nIdx].z = p->z; nIdx ++; } // 如果是一段弧,则将弧分段后保存 else if (p->nS==1) { int nNum; POINT2DF pt1, pt2,*pArcPts; pt1.x = p->x; pt1.y = p->y; pt2.x = p1->x; pt2.y = p1->y; divide_arc(pt1,pt2,ptCenter,pArcPts,nNum); for (m=0; m<nNum; m++) { pObj[nIdx].x = pArcPts[m].x; pObj[nIdx].y = pArcPts[m].y; pObj[nIdx].z = -(fFace[0]*pArcPts[m].x+fFace[1]*pArcPts[m].y+fFace[3])/fFace[2]; nIdx ++; } delete [] pArcPts; } p = p1; } else break; } // 分析最后一点与第一点之间的边线 // 如果是线段 if (p->nS==0 || p->nS==2) { pObj[nIdx].x = p->x; pObj[nIdx].y = p->y; pObj[nIdx].z = p->z; nIdx ++; } // 如果是圆弧,则将圆弧分段后保存 else if (p->nS==1) { int nNum; POINT2DF pt1, pt2,*pArcPts; pt1.x = p->x; pt1.y = p->y; pt2.x = pCrossPt->x; pt2.y = pCrossPt->y; divide_arc(pt1,pt2,ptCenter,pArcPts,nNum); for (m=0; m<nNum; m++) { pObj[nIdx].x = pArcPts[m].x; pObj[nIdx].y = pArcPts[m].y; pObj[nIdx].z = -(fFace[0]*pArcPts[m].x+fFace[1]*pArcPts[m].y+fFace[3])/fFace[2]; nIdx ++; } delete [] pArcPts; } } // clock_wise(pObj, nIdx); if (nIdx==3) { CVertex3d* pV1 = new CVertex3d(pObj[0].x,pObj[0].y,pObj[0].z); CVertex3d* pV2 = new CVertex3d(pObj[1].x,pObj[1].y,pObj[1].z); CVertex3d* pV3 = new CVertex3d(pObj[2].x,pObj[2].y,pObj[2].z); CFace3d* pFace = new CFace3d(pV1,pV2,pV3); CMesh3d* pMesh = new CMesh3d(); pMesh->AddFace(pFace); pMesh->AddVertex(pV1); pMesh->AddVertex(pV2); pMesh->AddVertex(pV3); pMesh->SetMeshType(TOP_FACE); pMesh->SetTextureIndex(0); scene.Add(pMesh); } else ConstructFace(scene,MESH_ROCK,pObj,nIdx,4,4); p = p1 = pCrossPt; while (p != NULL) { p1 = p->next; delete p; p = p1; } delete [] pObj; delete [] pPts; } } scene.Add(pMesh); } void CMeshTunnel::ConstructRockMass(CSceneGraph3d &pSceneGraph, CMesh3d* pMesh, PPOINT_3F pObj1, int nNum1, PPOINT_3F pObj2, int nNum2, int nTextureIdx, int nCurSliceIdx) { clock_wise(pObj1,nNum1); clock_wise(pObj2,nNum2); float MinLen, fMinTemp; int MinNum; int i, j; PROPERTY pro1, pro2, proMean, prodiff; CalProperty(pObj1, nNum1, pro1, 1, 1); CalProperty(pObj2, nNum2, pro2, 1, 1); proMean.fArea = (pro1.fArea + pro2.fArea) / 2; proMean.ptMean.x = (pro1.ptMean.x + pro2.ptMean.x) / 2; proMean.ptMean.y = (pro1.ptMean.y + pro2.ptMean.y) / 2; prodiff.fArea = pro1.fArea - pro2.fArea; prodiff.ptMean.x = pro1.ptMean.x - pro2.ptMean.x; prodiff.ptMean.y = pro1.ptMean.y - pro2.ptMean.y; // prodiff.ptMean.x = prodiff.ptMean.y =0; if(pro2.fArea < 0.000001) return; if (fabs(pro2.right - pro2.left) < 0.000001 && fabs(pro2.bottom - pro2.top) < 0.000001) return; float fscale = pro1.fArea / pro2.fArea; float fscalex = fabs(pro1.right - pro1.left) / fabs(pro2.right - pro2.left); float fscaley = fabs(pro1.bottom - pro1.top) / fabs(pro2.bottom - pro2.top); MinLen = FLT_MAX; MinNum = 0; for(i = 0;i<nNum2;i++) //求出离第一个点距离最短的点并标出来 { // fMinTemp = fabs(pObj1[0].x-(pObj2[i].x + prodiff.ptMean.x)* fscalex) + fabs(pObj1[0].y-(pObj2[i].y + prodiff.ptMean.y)* fscaley); fMinTemp = fabs(pObj1[0].x - pro1.ptMean.x-(pObj2[i].x - pro2.ptMean.x) * fscalex) + fabs(pObj1[0].y - pro1.ptMean.x - (pObj2[i].y - pro2.ptMean.y)* fscaley); if(MinLen>fMinTemp) { MinLen=fMinTemp; MinNum=i; } } int nVerNum = pMesh->NbVertex(); CArray3d<CVertex3d> *pArrayVertex = pMesh->GetArrayVertex();//提取网格中顶点个数 CArray3d<CFace3d> *pArrayFace = pMesh->GetArrayFace();//提取网格中三角片个数 for (i = 0; i < nNum1; ++i)//添加顶点 { pArrayVertex->Add(new CVertex3d(pObj1[i].x, pObj1[i].y, pObj1[i].z)); } for (i=0; i<nNum2; ++i) { pArrayVertex->Add(new CVertex3d(pObj2[(i + MinNum) % nNum2].x, pObj2[(i + MinNum) % nNum2].y, pObj2[(i + MinNum) % nNum2].z)); } ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // 侧向边的绘制 CVertex3d** pOne = new CVertex3d*[nNum1]; CVertex3d** pTwo = new CVertex3d*[nNum2]; CVertex3d** pV; pV = pArrayVertex->GetData(); for(i = 0;i<nNum1;i++) pOne[i] = pV[nVerNum + i]; //即把前nNum1个附给第一个切片 for(j = 0;j<nNum2;j++) //把后nNum1到nNum1+nNum2附给第二个切片 pTwo[j] = pV[nVerNum + j + nNum1]; int nIdx1 = 0,nIdx2 = 0; CVertex3d* pStart1 = pOne[0]; CVertex3d* pStart2 = pTwo[0]; CVertex3d* p1 = pStart1; CVertex3d* p2 = pStart2; CVertex3d* p3 = pOne[++nIdx1]; CVertex3d* p4 = pTwo[++nIdx2]; float fCX, fCY, fCZ; //中点坐标 float fLen1, fLen2; i = pMesh->NbFace(); //这儿i必须重置为0 int nNextWeight = 0; float fWeight = 0.5; int nLocalFace = 0; while(1) { fCZ = (p1->z() + p2->z()) / 2.0; fCX = ((p1->x() - pro1.ptMean.x) + (p2->x() - pro2.ptMean.x)* fscalex) / 2.0; fCY = ((p1->y() - pro1.ptMean.y) + (p2->y() - pro2.ptMean.y)* fscalex) / 2.0; fLen1 = fabs(fCX - (p3->x() - pro1.ptMean.x)) + fabs(fCY - (p3->y() - pro1.ptMean.y)); fLen2 = fabs(fCX - (p4->x() - pro2.ptMean.x) * fscalex) + fabs(fCY - (p4->y() - pro2.ptMean.y) * fscaley); if (nNextWeight == 2) fLen1 *= fWeight; if (nNextWeight == 1) fLen2 *= fWeight; CFace3d* pFace = new CFace3d; if(fLen1 < fLen2) { nNextWeight = 1; // pFace->Set(p1, p3, p2); p1 = p3; p3 = pOne[(++nIdx1)%nNum1]; } else { nNextWeight = 2; pFace->Set(p1, p4, p2); p2 = p4; p4 = pTwo[(++nIdx2)%nNum2]; } // pArrayFace->SetAtGrow(i++,pFace); ++nLocalFace; if(DWORD(p1) == DWORD(pStart1) && DWORD(p2) == DWORD(pStart2)) break; if(nLocalFace >= 3 * (nNum1 + nNum2)) break; } delete [] pOne; delete [] pTwo; // 侧向边绘制结束 ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // //三角化上表面,形成一个三维平面,这样可以进行纹理贴图 { CMesh3d* pMesh1 = new CMesh3d;//创建网格对象 pMesh1->SetMeshType(MESH_FACE); pSceneGraph.Add(pMesh1);//将网格对象添加到场景 ////////////////////////////////////////////////////////////////////////// //设置锚点偏移,调整纹理坐标 // // pMesh->SetLockOffset(x[0] / nWidth, y[0] / nHeight); ////////////////////////////////////////////////////////////////////////// pMesh1->SetNbVertex(nNum1);//设置网格中顶点个数 pMesh1->SetNbFace(0);//设置网格中三角片个数 CArray3d<CVertex3d> *pArrayVertex = pMesh1->GetArrayVertex();//提取网格中顶点个数 CArray3d<CFace3d> *pArrayFace = pMesh1->GetArrayFace();//提取网格中三角片个数 for (i = 0; i < nNum1; ++i)//添加顶点 { pArrayVertex->SetAt(i,new CVertex3d(pObj1[i].x, pObj1[i].y, pObj1[i].z)); } pMesh1->SetTextureIndex(nTextureIdx-1); CTriFace faceTop(pArrayFace, pArrayVertex, 0); Vector3F* pVC = new Vector3F [nNum1]; for(i = 0; i < nNum1; ++i) { pVC[i][0] = pObj1[i].x; pVC[i][1] = pObj1[i].y; pVC[i][2] = pObj1[i].z; } Vector3F vcNorm(0,0,1); faceTop.Triangulate(pVC, vcNorm, nNum1); delete [] pVC; pMesh1->Rebuild();//计算法线(相邻顶点,每个三角片,每个顶点) } /* //三角化上表面,形成一个三维平面,这样可以进行纹理贴图 { CMesh3d* pMesh2 = new CMesh3d;//创建网格对象 pMesh2->SetMeshType(MESH_FACE); pSceneGraph.Add(pMesh2);//将网格对象添加到场景 pMesh2->SetNbVertex(nNum2);//设置网格中顶点个数 pMesh2->SetNbFace(0);//设置网格中三角片个数 ////////////////////////////////////////////////////////////////////////// //设置锚点偏移,调整纹理坐标 // pMesh2->SetLockOffset(x[0] / nWidth, y[0] / nHeight); CArray3d<CVertex3d> *pArrayVertex = pMesh2->GetArrayVertex();//提取网格中顶点个数 CArray3d<CFace3d> *pArrayFace = pMesh2->GetArrayFace();//提取网格中三角片个数 for (i = 0; i < nNum2; ++i)//添加顶点 { pArrayVertex->SetAt(i,new CVertex3d(pObj2[i].x, pObj2[i].y, pObj2[i].z)); } pMesh2->SetTextureIndex(nTextureIdx); CTriFace faceTop(pArrayFace, pArrayVertex, 0); Vector3F* pVC = new Vector3F [nNum2]; for(i = 0; i < nNum2; ++i) { pVC[i][0] = pObj2[i].x; pVC[i][1] = pObj2[i].y; pVC[i][2] = pObj2[i].z; } Vector3F vcNorm(0,0,1); faceTop.Triangulate(pVC, vcNorm, nNum2); delete [] pVC; pMesh2->Rebuild();//计算法线(相邻顶点,每个三角片,每个顶点) } */ pMesh->Rebuild();//计算法线(相邻顶点,每个三角片,每个顶点) } // 分析当前点在边墙中的环向相对位置 float CMeshTunnel::get_ratio(PPOINT_3F pObj, int nNum, POINT_3F pt) { if (pt==pObj[0]) return 0; float fSum, fLen; fSum = fLen = 0; for (int i=1; i<nNum; i++) { fSum += get_distance(pObj[i-1],pObj[i]); if (pt==pObj[i]) fLen = fSum; } return fLen/fSum; }
fcf8b2d8f49d08185f819e2d2c014a2c613b1226
3bffc602f613a75aa26c408b18a3e7afeb472c2b
/Src/console.cpp
3555066e24cb1452e31a4a7dc35111ea6926005c
[]
no_license
gallmd-3D-Printer/Mother-Board-Firmware
cf482e96a62d44b8fbc02acddd5d2d2c17a2e2dd
f59929d016c9604ad592750913300c1d2b4c4e51
refs/heads/master
2021-09-10T22:12:22.599818
2021-09-07T20:14:41
2021-09-07T20:14:41
215,673,728
0
0
null
null
null
null
UTF-8
C++
false
false
2,027
cpp
#include "console.h" void Console::processConsole() { if (usbUsart.hasData) { uint8_t messageLength = usbUsart.messageLengths.get(); uint8_t header = usbUsart.rxBuffer.get(); uint8_t bytesRead = 1; switch (header) { case 'V': case 'v': boardPins->statusLED3.toggle(); break; case 'A': case 'a': printArray(ledToggleMessage); uint8_t ledNumber; ledNumber = usbUsart.rxBuffer.get(); bytesRead++; usbUsart.sendBytes(ledNumber); delay(0x4FF); usbUsart.sendBytes('\n'); switch (ledNumber) { case '0': boardPins->statusLED.toggle(); break; case '1': boardPins->statusLED1.toggle(); break; case '2': boardPins->statusLED2.toggle(); break; case '3': boardPins->statusLED3.toggle(); break; case '4': boardPins->statusLED4.toggle(); break; case '5': boardPins->statusLED5.toggle(); break; case '6': boardPins->statusLED6.toggle(); break; } break; case 'B': case 'b': uint8_t registerAddress; registerAddress = usbUsart.rxBuffer.get(); bytesRead++; i2cCommand.sendBytes[0] = 0x00; i2cCommand.sendBytes[1] = registerAddress-48; i2cPtr->sendCommand(&i2cCommand); delay(0xFFFFF); usbUsart.sendBytes(i2cCommand.recvBytes[0]); delay(0xFF); usbUsart.sendBytes(i2cCommand.recvBytes[1]); break; case '?': printMenu(); break; } //Read any excess data for (int i = 0; i < messageLength - bytesRead; i++) { usbUsart.rxBuffer.get(); } usbUsart.hasData = false; } } void Console::sayHello() { uint8_t testString[6] = { 'H', 'E', 'L', 'L', 'O', '\n' }; for (int i = 0; i <= 5; i++) { usbUsart.sendBytes(testString[i]); delay(0xFFF); } } void Console::delay(__IO uint32_t nCount) { while (nCount--) { } } void Console::printMenu() { printArray(headerline); printArray(optionA); printArray(reprint); } void Console::printArray(menuLine line) { for (auto &character : line) { usbUsart.sendBytes(character); delay(0x4FF); } }
65ceb0d65caf724cd556f4f5ead0da04350790c1
d169e82c3ee924a7db0746d9e6403d4a22c7f37f
/target.h
1ae4415b79f663a156ab11822d1bcb9385bffabb
[]
no_license
ChristianDen/DuolosSC_Tutorial
7b27831811b7b1dbe34b9fc3f8a8aea4cc83efa4
43be27f7f52b2a6ffa77f2cad4c058ab3554270c
refs/heads/master
2023-03-15T01:41:19.012897
2021-03-22T12:56:06
2021-03-22T12:56:06
349,423,109
0
0
null
null
null
null
UTF-8
C++
false
false
3,012
h
// // Created by denker on 3/17/21. // #ifndef DUOLOSSC_TUTORIAL_TARGET_H #define DUOLOSSC_TUTORIAL_TARGET_H #define SC_INCLUDE_DYNAMIC_PROCESSES #include "systemc" using namespace sc_core; using namespace sc_dt; using namespace std; #include "tlm.h" #include "tlm_utils/simple_target_socket.h" struct Memory: sc_module { tlm_utils::simple_target_socket<Memory> socket; enum { SIZE = 256 }; int mem[SIZE]; const sc_time LATENCY; SC_CTOR(Memory) : socket("socket"), LATENCY(10, SC_NS) { socket.register_b_transport(this, &Memory::b_transport); socket.register_get_direct_mem_ptr(this, &Memory::get_direct_mem_ptr); socket.register_transport_dbg(this, &Memory::transport_dbg); for (int i = 0; i < SIZE; i++) mem[i] = 0xAA000000 | (rand() % 256); } virtual void b_transport( tlm::tlm_generic_payload& trans, sc_time& delay ) { tlm::tlm_command cmd = trans.get_command(); sc_dt::uint64 adr = trans.get_address() / 4; unsigned char* ptr = trans.get_data_ptr(); unsigned int len = trans.get_data_length(); unsigned char* byt = trans.get_byte_enable_ptr(); unsigned int wid = trans.get_streaming_width(); if (adr >= sc_dt::uint64(SIZE)) { trans.set_response_status(tlm::TLM_ADDRESS_ERROR_RESPONSE); return; } else if (byt != 0) { trans.set_response_status(tlm::TLM_BYTE_ENABLE_ERROR_RESPONSE); return; } else if (len >4 || wid < len) { trans.set_response_status(tlm::TLM_BURST_ERROR_RESPONSE); return; } if ( cmd == tlm::TLM_READ_COMMAND ) memcpy(ptr, &mem[adr], len); else if ( cmd == tlm::TLM_WRITE_COMMAND ) memcpy(&mem[adr], ptr, len); trans.set_response_status( tlm::TLM_OK_RESPONSE ); trans.set_dmi_allowed(true); } virtual bool get_direct_mem_ptr(tlm::tlm_generic_payload &trans, tlm::tlm_dmi &dmi_data) { dmi_data.allow_read_write(); dmi_data.set_dmi_ptr(reinterpret_cast<unsigned char*>(&mem[0])); dmi_data.set_start_address(0); dmi_data.set_end_address(SIZE*4-1); dmi_data.set_read_latency(LATENCY); dmi_data.set_write_latency(LATENCY); return true; } virtual unsigned int transport_dbg(tlm::tlm_generic_payload &trans) { tlm::tlm_command cmd = trans.get_command(); sc_dt::uint64 adr = trans.get_address() / 4; unsigned char *ptr = trans.get_data_ptr(); unsigned int len = trans.get_data_length(); unsigned int num_bytes = (len < SIZE - adr) ? len : SIZE - adr; if (cmd == tlm::TLM_READ_COMMAND) memcpy(ptr, &mem[adr], num_bytes); else if (cmd == tlm::TLM_WRITE_COMMAND) memcpy(&mem[adr], ptr, num_bytes); return num_bytes; } }; #endif //DUOLOSSC_TUTORIAL_TARGET_H
1f06cb3350f83dd4be4a64d8d98906860c15b174
7074dd0000cba956eac84fd4cd9f6e80dd6a8efa
/TresholdFilter.h
a51a9a871b62eb0be4369c972cd460e1256e7b16
[]
no_license
zhenyatos-burial-ground/cppimagefilterbase
d82b83b80b564ae166174f8f13dd81602e907beb
8b5077618f6206a89cab46aa277909c0c6ac2e44
refs/heads/master
2022-04-03T04:56:59.066326
2019-12-08T16:33:28
2019-12-08T16:33:28
null
0
0
null
null
null
null
UTF-8
C++
false
false
349
h
#pragma once #include "LocalityFilter.h" const int TRESHOLD_SIZE = 5; class ThresholdFilter : public LocalityFilter { private: bool lessThanMedian(const stbi_uc* point, int i, int j, stbi_uc* locality, int comp); public: ThresholdFilter(int t, int l, int b, int r); void apply(png_toolkit& tool) final; ~ThresholdFilter() { }; };
63903ae2473a30ae704d8ec1208b9e4441a27832
1302a788aa73d8da772c6431b083ddd76eef937f
/WORKING_DIRECTORY/hardware/qcom/media/msmcobalt/mm-video-v4l2/vidc/venc/src/omx_swvenc_mpeg4.cpp
52d5340c9709fe5e02bbc37e63710d24c772876f
[ "MIT", "Apache-2.0" ]
permissive
rockduan/androidN-android-7.1.1_r28
b3c1bcb734225aa7813ab70639af60c06d658bf6
10bab435cd61ffa2e93a20c082624954c757999d
refs/heads/master
2021-01-23T03:54:32.510867
2017-03-30T07:17:08
2017-03-30T07:17:08
86,135,431
2
1
null
null
null
null
UTF-8
C++
false
false
98,566
cpp
/*-------------------------------------------------------------------------- Copyright (c) 2014-2016, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation 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, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------*/ #include "omx_swvenc_mpeg4.h" /* def: StoreMetaDataInBuffersParams */ #include <media/hardware/HardwareAPI.h> /* def: VENUS_BUFFER_SIZE, VENUS_Y_STRIDE etc */ #include <media/msm_media_info.h> /* def: private_handle_t*/ #include <gralloc_priv.h> /*---------------------------------------------------------------------------- * Preprocessor Definitions and Constants * -------------------------------------------------------------------------*/ #define OMX_SPEC_VERSION 0x00000101 #define OMX_INIT_STRUCT(_s_, _name_) \ memset((_s_), 0x0, sizeof(_name_)); \ (_s_)->nSize = sizeof(_name_); \ (_s_)->nVersion.nVersion = OMX_SPEC_VERSION #define ENTER_FUNC() DEBUG_PRINT_HIGH("ENTERING: %s",__FUNCTION__) #define EXIT_FUNC() DEBUG_PRINT_HIGH("EXITING: %s",__FUNCTION__) #define RETURN(x) EXIT_FUNC(); return x; #define ALIGN(value,alignment) (((value) + (alignment-1)) & (~(alignment-1))) #define BUFFER_LOG_LOC "/data/misc/media" /* factory function executed by the core to create instances */ void *get_omx_component_factory_fn(void) { RETURN((new omx_venc)); } omx_venc::omx_venc() { ENTER_FUNC(); char property_value[PROPERTY_VALUE_MAX] = {0}; memset(&m_debug,0,sizeof(m_debug)); property_value[0] = '\0'; property_get("vidc.debug.level", property_value, "1"); debug_level = atoi(property_value); property_value[0] = '\0'; property_get("vidc.enc.log.in", property_value, "0"); m_debug.in_buffer_log = atoi(property_value); property_value[0] = '\0'; property_get("vidc.enc.log.out", property_value, "0"); m_debug.out_buffer_log = atoi(property_value); snprintf(m_debug.log_loc, PROPERTY_VALUE_MAX, "%s", BUFFER_LOG_LOC); property_value[0] = '\0'; property_get("vidc.log.loc", property_value, ""); if (*property_value) { strlcpy(m_debug.log_loc, property_value, PROPERTY_VALUE_MAX); } memset(meta_buffer_hdr,0,sizeof(meta_buffer_hdr)); meta_mode_enable = false; memset(meta_buffer_hdr,0,sizeof(meta_buffer_hdr)); memset(meta_buffers,0,sizeof(meta_buffers)); memset(opaque_buffer_hdr,0,sizeof(opaque_buffer_hdr)); mUseProxyColorFormat = false; get_syntaxhdr_enable = false; m_bSeqHdrRequested = false; format_set = false; EXIT_FUNC(); } omx_venc::~omx_venc() { ENTER_FUNC(); get_syntaxhdr_enable = false; EXIT_FUNC(); } OMX_ERRORTYPE omx_venc::component_init(OMX_STRING role) { ENTER_FUNC(); OMX_ERRORTYPE eRet = OMX_ErrorNone; SWVENC_STATUS Ret = SWVENC_S_SUCCESS; SWVENC_CALLBACK callBackInfo; OMX_VIDEO_CODINGTYPE codec_type; SWVENC_PROPERTY Prop; int fds[2]; strlcpy((char *)m_nkind,role,OMX_MAX_STRINGNAME_SIZE); secure_session = false; if (!strncmp( (char *)m_nkind,"OMX.qcom.video.encoder.mpeg4sw", OMX_MAX_STRINGNAME_SIZE)) { strlcpy((char *)m_cRole, "video_encoder.mpeg4",\ OMX_MAX_STRINGNAME_SIZE); codec_type = OMX_VIDEO_CodingMPEG4; m_codec = SWVENC_CODEC_MPEG4; } else if (!strncmp( (char *)m_nkind,"OMX.qcom.video.encoder.h263sw", OMX_MAX_STRINGNAME_SIZE)) { strlcpy((char *)m_cRole, "video_encoder.h263",\ OMX_MAX_STRINGNAME_SIZE); codec_type = OMX_VIDEO_CodingH263; m_codec = SWVENC_CODEC_H263; } else { DEBUG_PRINT_ERROR("ERROR: Unknown Component"); eRet = OMX_ErrorInvalidComponentName; RETURN(eRet); } #ifdef ENABLE_GET_SYNTAX_HDR get_syntaxhdr_enable = true; DEBUG_PRINT_HIGH("Get syntax header enabled"); #endif callBackInfo.pfn_empty_buffer_done = swvenc_empty_buffer_done_cb; callBackInfo.pfn_fill_buffer_done = swvenc_fill_buffer_done_cb; callBackInfo.pfn_event_notification = swvenc_handle_event_cb; callBackInfo.p_client = (void*)this; SWVENC_STATUS sRet = swvenc_init(&m_hSwVenc, m_codec, &callBackInfo); if (sRet != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("swvenc_init returned %d, ret insufficient resources", sRet); RETURN(OMX_ErrorInsufficientResources); } m_stopped = true; //Intialise the OMX layer variables memset(&m_pCallbacks,0,sizeof(OMX_CALLBACKTYPE)); OMX_INIT_STRUCT(&m_sPortParam, OMX_PORT_PARAM_TYPE); m_sPortParam.nPorts = 0x2; m_sPortParam.nStartPortNumber = (OMX_U32) PORT_INDEX_IN; OMX_INIT_STRUCT(&m_sPortParam_audio, OMX_PORT_PARAM_TYPE); m_sPortParam_audio.nPorts = 0; m_sPortParam_audio.nStartPortNumber = 0; OMX_INIT_STRUCT(&m_sPortParam_img, OMX_PORT_PARAM_TYPE); m_sPortParam_img.nPorts = 0; m_sPortParam_img.nStartPortNumber = 0; OMX_INIT_STRUCT(&m_sParamBitrate, OMX_VIDEO_PARAM_BITRATETYPE); m_sParamBitrate.nPortIndex = (OMX_U32) PORT_INDEX_OUT; m_sParamBitrate.eControlRate = OMX_Video_ControlRateVariableSkipFrames; m_sParamBitrate.nTargetBitrate = 64000; OMX_INIT_STRUCT(&m_sConfigBitrate, OMX_VIDEO_CONFIG_BITRATETYPE); m_sConfigBitrate.nPortIndex = (OMX_U32) PORT_INDEX_OUT; m_sConfigBitrate.nEncodeBitrate = 64000; OMX_INIT_STRUCT(&m_sConfigFramerate, OMX_CONFIG_FRAMERATETYPE); m_sConfigFramerate.nPortIndex = (OMX_U32) PORT_INDEX_OUT; m_sConfigFramerate.xEncodeFramerate = 30 << 16; OMX_INIT_STRUCT(&m_sConfigIntraRefreshVOP, OMX_CONFIG_INTRAREFRESHVOPTYPE); m_sConfigIntraRefreshVOP.nPortIndex = (OMX_U32) PORT_INDEX_OUT; m_sConfigIntraRefreshVOP.IntraRefreshVOP = OMX_FALSE; OMX_INIT_STRUCT(&m_sConfigFrameRotation, OMX_CONFIG_ROTATIONTYPE); m_sConfigFrameRotation.nPortIndex = (OMX_U32) PORT_INDEX_IN; m_sConfigFrameRotation.nRotation = 0; OMX_INIT_STRUCT(&m_sSessionQuantization, OMX_VIDEO_PARAM_QUANTIZATIONTYPE); m_sSessionQuantization.nPortIndex = (OMX_U32) PORT_INDEX_OUT; m_sSessionQuantization.nQpI = 9; m_sSessionQuantization.nQpP = 6; m_sSessionQuantization.nQpB = 2; OMX_INIT_STRUCT(&m_sSessionQPRange, OMX_QCOM_VIDEO_PARAM_QPRANGETYPE); m_sSessionQPRange.nPortIndex = (OMX_U32) PORT_INDEX_OUT; m_sSessionQPRange.minQP = 2; OMX_INIT_STRUCT(&m_sParamProfileLevel, OMX_VIDEO_PARAM_PROFILELEVELTYPE); m_sParamProfileLevel.nPortIndex = (OMX_U32) PORT_INDEX_OUT; OMX_INIT_STRUCT(&m_sIntraperiod, QOMX_VIDEO_INTRAPERIODTYPE); m_sIntraperiod.nPortIndex = (OMX_U32) PORT_INDEX_OUT; m_sIntraperiod.nPFrames = (m_sConfigFramerate.xEncodeFramerate * 2) - 1; OMX_INIT_STRUCT(&m_sErrorCorrection, OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE); m_sErrorCorrection.nPortIndex = (OMX_U32) PORT_INDEX_OUT; m_sErrorCorrection.bEnableDataPartitioning = OMX_FALSE; m_sErrorCorrection.bEnableHEC = OMX_FALSE; m_sErrorCorrection.bEnableResync = OMX_FALSE; m_sErrorCorrection.bEnableRVLC = OMX_FALSE; m_sErrorCorrection.nResynchMarkerSpacing = 0; OMX_INIT_STRUCT(&m_sIntraRefresh, OMX_VIDEO_PARAM_INTRAREFRESHTYPE); m_sIntraRefresh.nPortIndex = (OMX_U32) PORT_INDEX_OUT; m_sIntraRefresh.eRefreshMode = OMX_VIDEO_IntraRefreshMax; if (codec_type == OMX_VIDEO_CodingMPEG4) { m_sParamProfileLevel.eProfile = (OMX_U32) OMX_VIDEO_MPEG4ProfileSimple; m_sParamProfileLevel.eLevel = (OMX_U32) OMX_VIDEO_MPEG4Level0; } else if (codec_type == OMX_VIDEO_CodingH263) { m_sParamProfileLevel.eProfile = (OMX_U32) OMX_VIDEO_H263ProfileBaseline; m_sParamProfileLevel.eLevel = (OMX_U32) OMX_VIDEO_H263Level10; } /* set the profile and level */ Ret = swvenc_set_profile_level(m_sParamProfileLevel.eProfile, m_sParamProfileLevel.eLevel); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_set_rc_mode failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUndefined); } // Initialize the video parameters for input port OMX_INIT_STRUCT(&m_sInPortDef, OMX_PARAM_PORTDEFINITIONTYPE); m_sInPortDef.nPortIndex= (OMX_U32) PORT_INDEX_IN; m_sInPortDef.bEnabled = OMX_TRUE; m_sInPortDef.bPopulated = OMX_FALSE; m_sInPortDef.eDomain = OMX_PortDomainVideo; m_sInPortDef.eDir = OMX_DirInput; m_sInPortDef.format.video.cMIMEType = (char *)"YUV420"; m_sInPortDef.format.video.nFrameWidth = OMX_CORE_QCIF_WIDTH; m_sInPortDef.format.video.nFrameHeight = OMX_CORE_QCIF_HEIGHT; m_sInPortDef.format.video.nStride = OMX_CORE_QCIF_WIDTH; m_sInPortDef.format.video.nSliceHeight = OMX_CORE_QCIF_HEIGHT; m_sInPortDef.format.video.nBitrate = 64000; m_sInPortDef.format.video.xFramerate = 15 << 16; m_sInPortDef.format.video.eColorFormat = (OMX_COLOR_FORMATTYPE) QOMX_COLOR_FORMATYUV420PackedSemiPlanar32m; m_sInPortDef.format.video.eCompressionFormat = OMX_VIDEO_CodingUnused; /* set the frame size */ Prop.id = SWVENC_PROPERTY_ID_FRAME_SIZE; Prop.info.frame_size.height = m_sInPortDef.format.video.nFrameHeight; Prop.info.frame_size.width = m_sInPortDef.format.video.nFrameWidth; Ret = swvenc_setproperty(m_hSwVenc, &Prop); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_setproperty failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUnsupportedSetting); } /* set the frame attributes */ Prop.id = SWVENC_PROPERTY_ID_FRAME_ATTRIBUTES; Prop.info.frame_attributes.stride_luma = m_sInPortDef.format.video.nStride; Prop.info.frame_attributes.stride_chroma = m_sInPortDef.format.video.nStride; Prop.info.frame_attributes.offset_luma = 0; Prop.info.frame_attributes.offset_chroma = (m_sInPortDef.format.video.nSliceHeight * m_sInPortDef.format.video.nStride); Prop.info.frame_attributes.size = (Prop.info.frame_attributes.offset_chroma * 3) >> 1; Ret = swvenc_setproperty(m_hSwVenc, &Prop); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_setproperty failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUndefined); } Ret = swvenc_get_buffer_req(&m_sInPortDef.nBufferCountMin, &m_sInPortDef.nBufferCountActual, &m_sInPortDef.nBufferSize, &m_sInPortDef.nBufferAlignment, PORT_INDEX_IN); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("ERROR: %s, swvenc_get_buffer_req failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUndefined); } // Initialize the video parameters for output port OMX_INIT_STRUCT(&m_sOutPortDef, OMX_PARAM_PORTDEFINITIONTYPE); m_sOutPortDef.nPortIndex = (OMX_U32) PORT_INDEX_OUT; m_sOutPortDef.bEnabled = OMX_TRUE; m_sOutPortDef.bPopulated = OMX_FALSE; m_sOutPortDef.eDomain = OMX_PortDomainVideo; m_sOutPortDef.eDir = OMX_DirOutput; m_sOutPortDef.format.video.nFrameWidth = OMX_CORE_QCIF_WIDTH; m_sOutPortDef.format.video.nFrameHeight = OMX_CORE_QCIF_HEIGHT; m_sOutPortDef.format.video.nBitrate = 64000; m_sOutPortDef.format.video.xFramerate = 15 << 16; m_sOutPortDef.format.video.eColorFormat = OMX_COLOR_FormatUnused; if (codec_type == OMX_VIDEO_CodingMPEG4) { m_sOutPortDef.format.video.eCompressionFormat = OMX_VIDEO_CodingMPEG4; } else if (codec_type == OMX_VIDEO_CodingH263) { m_sOutPortDef.format.video.eCompressionFormat = OMX_VIDEO_CodingH263; } Ret = swvenc_get_buffer_req(&m_sOutPortDef.nBufferCountMin, &m_sOutPortDef.nBufferCountActual, &m_sOutPortDef.nBufferSize, &m_sOutPortDef.nBufferAlignment, PORT_INDEX_OUT); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("ERROR: %s, swvenc_get_buffer_req failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUndefined); } // Initialize the video color format for input port OMX_INIT_STRUCT(&m_sInPortFormat, OMX_VIDEO_PARAM_PORTFORMATTYPE); m_sInPortFormat.nPortIndex = (OMX_U32) PORT_INDEX_IN; m_sInPortFormat.nIndex = 0; m_sInPortFormat.eColorFormat = (OMX_COLOR_FORMATTYPE) QOMX_COLOR_FORMATYUV420PackedSemiPlanar32m; m_sInPortFormat.eCompressionFormat = OMX_VIDEO_CodingUnused; // Initialize the compression format for output port OMX_INIT_STRUCT(&m_sOutPortFormat, OMX_VIDEO_PARAM_PORTFORMATTYPE); m_sOutPortFormat.nPortIndex = (OMX_U32) PORT_INDEX_OUT; m_sOutPortFormat.nIndex = 0; m_sOutPortFormat.eColorFormat = OMX_COLOR_FormatUnused; if (codec_type == OMX_VIDEO_CodingMPEG4) { m_sOutPortFormat.eCompressionFormat = OMX_VIDEO_CodingMPEG4; } else if (codec_type == OMX_VIDEO_CodingH263) { m_sOutPortFormat.eCompressionFormat = OMX_VIDEO_CodingH263; } // mandatory Indices for kronos test suite OMX_INIT_STRUCT(&m_sPriorityMgmt, OMX_PRIORITYMGMTTYPE); OMX_INIT_STRUCT(&m_sInBufSupplier, OMX_PARAM_BUFFERSUPPLIERTYPE); m_sInBufSupplier.nPortIndex = (OMX_U32) PORT_INDEX_IN; OMX_INIT_STRUCT(&m_sOutBufSupplier, OMX_PARAM_BUFFERSUPPLIERTYPE); m_sOutBufSupplier.nPortIndex = (OMX_U32) PORT_INDEX_OUT; OMX_INIT_STRUCT(&m_sParamInitqp, QOMX_EXTNINDEX_VIDEO_INITIALQP); m_sParamInitqp.nPortIndex = (OMX_U32) PORT_INDEX_OUT; // mp4 specific init OMX_INIT_STRUCT(&m_sParamMPEG4, OMX_VIDEO_PARAM_MPEG4TYPE); m_sParamMPEG4.nPortIndex = (OMX_U32) PORT_INDEX_OUT; m_sParamMPEG4.eProfile = OMX_VIDEO_MPEG4ProfileSimple; m_sParamMPEG4.eLevel = OMX_VIDEO_MPEG4Level0; m_sParamMPEG4.nSliceHeaderSpacing = 0; m_sParamMPEG4.bSVH = OMX_FALSE; m_sParamMPEG4.bGov = OMX_FALSE; // 2 second intra period for default outport fps m_sParamMPEG4.nPFrames = (m_sOutPortFormat.xFramerate * 2 - 1); m_sParamMPEG4.bACPred = OMX_TRUE; // delta = 2 @ 15 fps m_sParamMPEG4.nTimeIncRes = 30; // pframe and iframe m_sParamMPEG4.nAllowedPictureTypes = 2; // number of video packet headers per vop m_sParamMPEG4.nHeaderExtension = 1; m_sParamMPEG4.bReversibleVLC = OMX_FALSE; // h263 specific init OMX_INIT_STRUCT(&m_sParamH263, OMX_VIDEO_PARAM_H263TYPE); m_sParamH263.nPortIndex = (OMX_U32) PORT_INDEX_OUT; // 2 second intra period for default outport fps m_sParamH263.nPFrames = (m_sOutPortFormat.xFramerate * 2 - 1); m_sParamH263.nBFrames = 0; m_sParamH263.eProfile = OMX_VIDEO_H263ProfileBaseline; m_sParamH263.eLevel = OMX_VIDEO_H263Level10; m_sParamH263.bPLUSPTYPEAllowed = OMX_FALSE; m_sParamH263.nAllowedPictureTypes = 2; m_sParamH263.bForceRoundingTypeToZero = OMX_TRUE; m_sParamH263.nPictureHeaderRepetition = 0; m_sParamH263.nGOBHeaderInterval = 1; m_state = OMX_StateLoaded; m_sExtraData = 0; m_capability.max_height = OMX_CORE_FWVGA_HEIGHT; m_capability.max_width = OMX_CORE_FWVGA_WIDTH; m_capability.min_height = 32; m_capability.min_width = 32; if (eRet == OMX_ErrorNone) { if (pipe(fds)) { DEBUG_PRINT_ERROR("ERROR: pipe creation failed"); eRet = OMX_ErrorInsufficientResources; } else { if ((fds[0] == 0) || (fds[1] == 0)) { if (pipe(fds)) { DEBUG_PRINT_ERROR("ERROR: pipe creation failed"); eRet = OMX_ErrorInsufficientResources; } } if (eRet == OMX_ErrorNone) { m_pipe_in = fds[0]; m_pipe_out = fds[1]; } } if (pthread_create(&msg_thread_id,0, message_thread_enc, this) < 0) { eRet = OMX_ErrorInsufficientResources; msg_thread_created = false; } else { msg_thread_created = true; } } DEBUG_PRINT_HIGH("Component_init return value = 0x%x", eRet); EXIT_FUNC(); RETURN(eRet); } OMX_ERRORTYPE omx_venc::set_parameter ( OMX_IN OMX_HANDLETYPE hComp, OMX_IN OMX_INDEXTYPE paramIndex, OMX_IN OMX_PTR paramData ) { ENTER_FUNC(); OMX_ERRORTYPE eRet = OMX_ErrorNone; SWVENC_STATUS Ret = SWVENC_S_SUCCESS; SWVENC_PROPERTY Prop; bool bResult; unsigned int stride, scanlines; (void)hComp; if (m_state == OMX_StateInvalid) { DEBUG_PRINT_ERROR("ERROR: Set Param in Invalid State"); RETURN(OMX_ErrorInvalidState); } if (paramData == NULL) { DEBUG_PRINT_ERROR("ERROR: Get Param in Invalid paramData"); RETURN(OMX_ErrorBadParameter); } /* set_parameter can be called in loaded state or disabled port */ if ( (m_state == OMX_StateLoaded) || (m_sInPortDef.bEnabled == OMX_FALSE) || (m_sOutPortDef.bEnabled == OMX_FALSE) ) { DEBUG_PRINT_LOW("Set Parameter called in valid state"); } else { DEBUG_PRINT_ERROR("ERROR: Set Parameter called in Invalid State"); RETURN(OMX_ErrorIncorrectStateOperation); } switch ((int)paramIndex) { case OMX_IndexParamPortDefinition: { OMX_PARAM_PORTDEFINITIONTYPE *portDefn; portDefn = (OMX_PARAM_PORTDEFINITIONTYPE *) paramData; DEBUG_PRINT_LOW("set_parameter: OMX_IndexParamPortDefinition H= %d, W = %d", (int)portDefn->format.video.nFrameHeight, (int)portDefn->format.video.nFrameWidth); if (PORT_INDEX_IN == portDefn->nPortIndex) { if (!dev_is_video_session_supported(portDefn->format.video.nFrameWidth, portDefn->format.video.nFrameHeight)) { DEBUG_PRINT_ERROR("video session not supported"); omx_report_unsupported_setting(); RETURN(OMX_ErrorUnsupportedSetting); } DEBUG_PRINT_LOW("i/p actual cnt requested = %u", portDefn->nBufferCountActual); DEBUG_PRINT_LOW("i/p min cnt requested = %u", portDefn->nBufferCountMin); DEBUG_PRINT_LOW("i/p buffersize requested = %u", portDefn->nBufferSize); if (portDefn->nBufferCountMin > portDefn->nBufferCountActual) { DEBUG_PRINT_ERROR("ERROR: (In_PORT) Min buffers (%u) > actual count (%u)", portDefn->nBufferCountMin, portDefn->nBufferCountActual); RETURN(OMX_ErrorUnsupportedSetting); } /* set the frame size */ Prop.id = SWVENC_PROPERTY_ID_FRAME_SIZE; Prop.info.frame_size.height = portDefn->format.video.nFrameHeight; Prop.info.frame_size.width = portDefn->format.video.nFrameWidth; Ret = swvenc_setproperty(m_hSwVenc, &Prop); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_setproperty failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUnsupportedSetting); } /* set the input frame-rate */ if (portDefn->format.video.xFramerate != 0) { Ret = swvenc_set_frame_rate(portDefn->format.video.xFramerate >> 16); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_set_frame_rate failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUnsupportedSetting); } } /* set the frame attributes */ stride = VENUS_Y_STRIDE(COLOR_FMT_NV12, portDefn->format.video.nFrameWidth); scanlines = VENUS_Y_SCANLINES(COLOR_FMT_NV12, portDefn->format.video.nSliceHeight); Prop.id = SWVENC_PROPERTY_ID_FRAME_ATTRIBUTES; Prop.info.frame_attributes.stride_luma = stride; Prop.info.frame_attributes.stride_chroma = stride; Prop.info.frame_attributes.offset_luma = 0; Prop.info.frame_attributes.offset_chroma = scanlines * stride; Prop.info.frame_attributes.size = VENUS_BUFFER_SIZE(COLOR_FMT_NV12, portDefn->format.video.nFrameWidth, portDefn->format.video.nFrameHeight); Ret = swvenc_setproperty(m_hSwVenc, &Prop); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_setproperty failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUnsupportedSetting); } DEBUG_PRINT_LOW("i/p previous actual cnt = %u", m_sInPortDef.nBufferCountActual); DEBUG_PRINT_LOW("i/p previous min cnt = %u", m_sInPortDef.nBufferCountMin); DEBUG_PRINT_LOW("i/p previous buffersize = %u", m_sInPortDef.nBufferSize); memcpy(&m_sInPortDef, portDefn,sizeof(OMX_PARAM_PORTDEFINITIONTYPE)); /* update the input buffer requirement */ Ret = swvenc_get_buffer_req(&m_sInPortDef.nBufferCountMin, &m_sInPortDef.nBufferCountActual, &m_sInPortDef.nBufferSize, &m_sInPortDef.nBufferAlignment, portDefn->nPortIndex); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("ERROR: %s, swvenc_get_buffer_req failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUndefined); } if (portDefn->nBufferCountActual > m_sInPortDef.nBufferCountActual) { m_sInPortDef.nBufferCountActual = portDefn->nBufferCountActual; } if (portDefn->nBufferSize > m_sInPortDef.nBufferSize) { m_sInPortDef.nBufferSize = portDefn->nBufferSize; } DEBUG_PRINT_LOW("i/p new actual cnt = %u", m_sInPortDef.nBufferCountActual); DEBUG_PRINT_LOW("i/p new min cnt = %u", m_sInPortDef.nBufferCountMin); DEBUG_PRINT_LOW("i/p new buffersize = %u", m_sInPortDef.nBufferSize); } else if (PORT_INDEX_OUT == portDefn->nPortIndex) { DEBUG_PRINT_LOW("o/p actual cnt requested = %u", portDefn->nBufferCountActual); DEBUG_PRINT_LOW("o/p min cnt requested = %u", portDefn->nBufferCountMin); DEBUG_PRINT_LOW("o/p buffersize requested = %u", portDefn->nBufferSize); if (portDefn->nBufferCountMin > portDefn->nBufferCountActual) { DEBUG_PRINT_ERROR("ERROR: (Out_PORT) Min buffers (%u) > actual count (%u)", portDefn->nBufferCountMin, portDefn->nBufferCountActual); RETURN(OMX_ErrorUnsupportedSetting); } /* set the output bit-rate */ Ret = swvenc_set_bit_rate(portDefn->format.video.nBitrate); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_set_bit_rate failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUnsupportedSetting); } DEBUG_PRINT_LOW("o/p previous actual cnt = %u", m_sOutPortDef.nBufferCountActual); DEBUG_PRINT_LOW("o/p previous min cnt = %u", m_sOutPortDef.nBufferCountMin); DEBUG_PRINT_LOW("o/p previous buffersize = %u", m_sOutPortDef.nBufferSize); /* set the buffer requirement */ bResult = dev_set_buf_req(&portDefn->nBufferCountMin, &portDefn->nBufferCountActual, &portDefn->nBufferSize, portDefn->nPortIndex); if (bResult != true) { DEBUG_PRINT_ERROR("%s, dev_set_buf_req failed", __FUNCTION__); RETURN(OMX_ErrorUnsupportedSetting); } memcpy(&m_sOutPortDef, portDefn,sizeof(OMX_PARAM_PORTDEFINITIONTYPE)); /* update the output buffer requirement */ Ret = swvenc_get_buffer_req(&m_sOutPortDef.nBufferCountMin, &m_sOutPortDef.nBufferCountActual, &m_sOutPortDef.nBufferSize, &m_sOutPortDef.nBufferAlignment, portDefn->nPortIndex); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("ERROR: %s, swvenc_get_buffer_req failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUndefined); } if (portDefn->nBufferCountActual > m_sOutPortDef.nBufferCountActual) { m_sOutPortDef.nBufferCountActual = portDefn->nBufferCountActual; } if (portDefn->nBufferSize > m_sOutPortDef.nBufferSize) { m_sOutPortDef.nBufferSize = portDefn->nBufferSize; } DEBUG_PRINT_LOW("o/p new actual cnt = %u", m_sOutPortDef.nBufferCountActual); DEBUG_PRINT_LOW("o/p new min cnt = %u", m_sOutPortDef.nBufferCountMin); DEBUG_PRINT_LOW("o/p new buffersize = %u", m_sOutPortDef.nBufferSize); } else { DEBUG_PRINT_ERROR("ERROR: Set_parameter: Bad Port idx %d", (int)portDefn->nPortIndex); eRet = OMX_ErrorBadPortIndex; } m_sConfigFramerate.xEncodeFramerate = portDefn->format.video.xFramerate; m_sConfigBitrate.nEncodeBitrate = portDefn->format.video.nBitrate; m_sParamBitrate.nTargetBitrate = portDefn->format.video.nBitrate; break; } case OMX_IndexParamVideoPortFormat: { OMX_VIDEO_PARAM_PORTFORMATTYPE *portFmt = (OMX_VIDEO_PARAM_PORTFORMATTYPE *)paramData; DEBUG_PRINT_LOW("set_parameter: OMX_IndexParamVideoPortFormat %d", portFmt->eColorFormat); SWVENC_COLOR_FORMAT color_format; /* set the driver with the corresponding values */ if (PORT_INDEX_IN == portFmt->nPortIndex) { if (portFmt->eColorFormat == ((OMX_COLOR_FORMATTYPE) QOMX_COLOR_FormatAndroidOpaque)) { /* meta_mode = 2 (kMetadataBufferTypeGrallocSource) */ m_sInPortFormat.eColorFormat = (OMX_COLOR_FORMATTYPE) QOMX_COLOR_FormatYVU420SemiPlanar; color_format = SWVENC_COLOR_FORMAT_NV21; if (!mUseProxyColorFormat) { if (!c2d_conv.init()) { DEBUG_PRINT_ERROR("C2D init failed"); return OMX_ErrorUnsupportedSetting; } DEBUG_PRINT_ERROR("C2D init is successful"); } mUseProxyColorFormat = true; m_input_msg_id = OMX_COMPONENT_GENERATE_ETB_OPQ; } else { m_sInPortFormat.eColorFormat = portFmt->eColorFormat; if ((portFmt->eColorFormat == OMX_COLOR_FormatYUV420SemiPlanar) || (portFmt->eColorFormat == ((OMX_COLOR_FORMATTYPE) QOMX_COLOR_FORMATYUV420PackedSemiPlanar32m))) { color_format = SWVENC_COLOR_FORMAT_NV12; } else if (portFmt->eColorFormat == ((OMX_COLOR_FORMATTYPE) QOMX_COLOR_FormatYVU420SemiPlanar)) { color_format = SWVENC_COLOR_FORMAT_NV21; } else { DEBUG_PRINT_ERROR("%s: OMX_IndexParamVideoPortFormat %d invalid", __FUNCTION__, portFmt->eColorFormat); RETURN(OMX_ErrorBadParameter); } m_input_msg_id = OMX_COMPONENT_GENERATE_ETB; mUseProxyColorFormat = false; } DEBUG_PRINT_LOW("set_parameter: OMX_IndexParamVideoPortFormat %d", portFmt->eColorFormat); m_sInPortDef.format.video.eColorFormat = m_sInPortFormat.eColorFormat; /* set the input color format */ Prop.id = SWVENC_PROPERTY_ID_COLOR_FORMAT; Prop.info.color_format = color_format; Ret = swvenc_setproperty(m_hSwVenc, &Prop); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_setproperty failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUnsupportedSetting); } /* set the input frame-rate */ if (portFmt->xFramerate != 0) { Ret = swvenc_set_frame_rate(portFmt->xFramerate >> 16); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_set_frame_rate failed (%d)", __FUNCTION__, Ret); //RETURN(OMX_ErrorUnsupportedSetting); } m_sInPortFormat.xFramerate = portFmt->xFramerate; } } break; } case OMX_IndexParamVideoInit: { OMX_PORT_PARAM_TYPE* pParam = (OMX_PORT_PARAM_TYPE*)(paramData); DEBUG_PRINT_LOW("Set OMX_IndexParamVideoInit called"); break; } case OMX_IndexParamVideoBitrate: { OMX_VIDEO_PARAM_BITRATETYPE* pParam = (OMX_VIDEO_PARAM_BITRATETYPE*)paramData; DEBUG_PRINT_LOW("set_parameter: OMX_IndexParamVideoBitrate"); if (m_max_allowed_bitrate_check) { //TBD: to add bitrate check } /* set the output bit-rate */ Ret = swvenc_set_bit_rate(pParam->nTargetBitrate); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_set_bit_rate failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUnsupportedSetting); } /* set the RC-mode */ Ret = swvenc_set_rc_mode(pParam->eControlRate); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_set_rc_mode failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUnsupportedSetting); } m_sParamBitrate.nTargetBitrate = pParam->nTargetBitrate; m_sParamBitrate.eControlRate = pParam->eControlRate; m_sConfigBitrate.nEncodeBitrate = pParam->nTargetBitrate; m_sInPortDef.format.video.nBitrate = pParam->nTargetBitrate; m_sOutPortDef.format.video.nBitrate = pParam->nTargetBitrate; DEBUG_PRINT_LOW("bitrate = %u", m_sOutPortDef.format.video.nBitrate); break; } case OMX_IndexParamVideoMpeg4: { OMX_VIDEO_PARAM_MPEG4TYPE* pParam = (OMX_VIDEO_PARAM_MPEG4TYPE*)paramData; DEBUG_PRINT_LOW("set_parameter: OMX_IndexParamVideoMpeg4"); if (pParam->nBFrames) { DEBUG_PRINT_ERROR("Warning: B frames not supported"); } /* set the intra period */ Ret = swvenc_set_intra_period(pParam->nPFrames,pParam->nBFrames); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_set_intra_period failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUnsupportedSetting); } memcpy(&m_sParamMPEG4,pParam, sizeof(struct OMX_VIDEO_PARAM_MPEG4TYPE)); m_sIntraperiod.nPFrames = m_sParamMPEG4.nPFrames; m_sIntraperiod.nBFrames = m_sParamMPEG4.nBFrames; break; } case OMX_IndexParamVideoH263: { OMX_VIDEO_PARAM_H263TYPE* pParam = (OMX_VIDEO_PARAM_H263TYPE*)paramData; DEBUG_PRINT_LOW("set_parameter: OMX_IndexParamVideoH263"); /* set the intra period */ Ret = swvenc_set_intra_period(pParam->nPFrames,pParam->nBFrames); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_set_intra_period failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUnsupportedSetting); } memcpy(&m_sParamH263,pParam, sizeof(struct OMX_VIDEO_PARAM_H263TYPE)); m_sIntraperiod.nPFrames = m_sParamH263.nPFrames; m_sIntraperiod.nBFrames = m_sParamH263.nBFrames; break; } case OMX_IndexParamVideoProfileLevelCurrent: { OMX_VIDEO_PARAM_PROFILELEVELTYPE* pParam = (OMX_VIDEO_PARAM_PROFILELEVELTYPE*)paramData; DEBUG_PRINT_LOW("set_parameter: OMX_IndexParamVideoProfileLevelCurrent"); /* set the profile and level */ Ret = swvenc_set_profile_level(pParam->eProfile,pParam->eLevel); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_set_rc_mode failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUnsupportedSetting); } m_sParamProfileLevel.eProfile = pParam->eProfile; m_sParamProfileLevel.eLevel = pParam->eLevel; if (SWVENC_CODEC_MPEG4 == m_codec) { m_sParamMPEG4.eProfile = (OMX_VIDEO_MPEG4PROFILETYPE)m_sParamProfileLevel.eProfile; m_sParamMPEG4.eLevel = (OMX_VIDEO_MPEG4LEVELTYPE)m_sParamProfileLevel.eLevel; DEBUG_PRINT_LOW("MPEG4 profile = %d, level = %d", m_sParamMPEG4.eProfile, m_sParamMPEG4.eLevel); } else if (SWVENC_CODEC_H263 == m_codec) { m_sParamH263.eProfile = (OMX_VIDEO_H263PROFILETYPE)m_sParamProfileLevel.eProfile; m_sParamH263.eLevel = (OMX_VIDEO_H263LEVELTYPE)m_sParamProfileLevel.eLevel; DEBUG_PRINT_LOW("H263 profile = %d, level = %d", m_sParamH263.eProfile, m_sParamH263.eLevel); } break; } case OMX_IndexParamStandardComponentRole: { OMX_PARAM_COMPONENTROLETYPE *comp_role; comp_role = (OMX_PARAM_COMPONENTROLETYPE *) paramData; DEBUG_PRINT_LOW("set_parameter: OMX_IndexParamStandardComponentRole %s", comp_role->cRole); if ((m_state == OMX_StateLoaded)&& !BITMASK_PRESENT(&m_flags,OMX_COMPONENT_IDLE_PENDING)) { DEBUG_PRINT_LOW("Set Parameter called in valid state"); } else { DEBUG_PRINT_ERROR("Set Parameter called in Invalid State"); RETURN(OMX_ErrorIncorrectStateOperation); } if (SWVENC_CODEC_MPEG4 == m_codec) { if (!strncmp((const char*)comp_role->cRole,"video_encoder.mpeg4",OMX_MAX_STRINGNAME_SIZE)) { strlcpy((char*)m_cRole,"video_encoder.mpeg4",OMX_MAX_STRINGNAME_SIZE); } else { DEBUG_PRINT_ERROR("ERROR: Setparameter: unknown Index %s", comp_role->cRole); eRet = OMX_ErrorUnsupportedSetting; } } else if (SWVENC_CODEC_H263 == m_codec) { if (!strncmp((const char*)comp_role->cRole,"video_encoder.h263",OMX_MAX_STRINGNAME_SIZE)) { strlcpy((char*)m_cRole,"video_encoder.h263",OMX_MAX_STRINGNAME_SIZE); } else { DEBUG_PRINT_ERROR("ERROR: Setparameter: unknown Index %s", comp_role->cRole); eRet =OMX_ErrorUnsupportedSetting; } } else { DEBUG_PRINT_ERROR("ERROR: Setparameter: unknown param %s", m_nkind); eRet = OMX_ErrorInvalidComponentName; } break; } case OMX_IndexParamPriorityMgmt: { DEBUG_PRINT_LOW("set_parameter: OMX_IndexParamPriorityMgmt"); if (m_state != OMX_StateLoaded) { DEBUG_PRINT_ERROR("ERROR: Set Parameter called in Invalid State"); RETURN(OMX_ErrorIncorrectStateOperation); } OMX_PRIORITYMGMTTYPE *priorityMgmtype = (OMX_PRIORITYMGMTTYPE*) paramData; DEBUG_PRINT_LOW("set_parameter: OMX_IndexParamPriorityMgmt %u", priorityMgmtype->nGroupID); DEBUG_PRINT_LOW("set_parameter: priorityMgmtype %u", priorityMgmtype->nGroupPriority); m_sPriorityMgmt.nGroupID = priorityMgmtype->nGroupID; m_sPriorityMgmt.nGroupPriority = priorityMgmtype->nGroupPriority; break; } case OMX_IndexParamCompBufferSupplier: { DEBUG_PRINT_LOW("set_parameter: OMX_IndexParamCompBufferSupplier"); OMX_PARAM_BUFFERSUPPLIERTYPE *bufferSupplierType = (OMX_PARAM_BUFFERSUPPLIERTYPE*) paramData; DEBUG_PRINT_LOW("set_parameter: OMX_IndexParamCompBufferSupplier %d", bufferSupplierType->eBufferSupplier); if ( (bufferSupplierType->nPortIndex == 0) || (bufferSupplierType->nPortIndex ==1) ) { m_sInBufSupplier.eBufferSupplier = bufferSupplierType->eBufferSupplier; } else { eRet = OMX_ErrorBadPortIndex; } break; } case OMX_IndexParamVideoQuantization: { // this is applicable only for RC-off case DEBUG_PRINT_LOW("set_parameter: OMX_IndexParamVideoQuantization"); OMX_VIDEO_PARAM_QUANTIZATIONTYPE *session_qp = (OMX_VIDEO_PARAM_QUANTIZATIONTYPE*) paramData; if (session_qp->nPortIndex == PORT_INDEX_OUT) { Prop.id = SWVENC_PROPERTY_ID_QP; Prop.info.qp.qp_i = session_qp->nQpI; Prop.info.qp.qp_p = session_qp->nQpP; Prop.info.qp.qp_b = session_qp->nQpB; Ret = swvenc_setproperty(m_hSwVenc, &Prop); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_setproperty failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUnsupportedSetting); } m_sSessionQuantization.nQpI = session_qp->nQpI; m_sSessionQuantization.nQpP = session_qp->nQpP; m_sSessionQuantization.nQpB = session_qp->nQpB; } else { DEBUG_PRINT_ERROR("ERROR: Unsupported port Index for Session QP setting"); eRet = OMX_ErrorBadPortIndex; } break; } case OMX_QcomIndexParamVideoQPRange: { DEBUG_PRINT_LOW("set_parameter: OMX_QcomIndexParamVideoQPRange"); OMX_QCOM_VIDEO_PARAM_QPRANGETYPE *qp_range = (OMX_QCOM_VIDEO_PARAM_QPRANGETYPE*) paramData; if (qp_range->nPortIndex == PORT_INDEX_OUT) { if ( (qp_range->minQP > 255) || (qp_range->maxQP > 255) ) { DEBUG_PRINT_ERROR("ERROR: Out of range QP"); eRet = OMX_ErrorBadParameter; } Prop.id = SWVENC_PROPERTY_ID_QP_RANGE; Prop.info.qp_range.min_qp_packed = (qp_range->minQP << 16) | (qp_range->minQP) | (qp_range->minQP << 8); Prop.info.qp_range.max_qp_packed = (qp_range->maxQP << 16) | (qp_range->maxQP) | (qp_range->maxQP << 8); Ret = swvenc_setproperty(m_hSwVenc, &Prop); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_setproperty failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUnsupportedSetting); } m_sSessionQPRange.minQP= qp_range->minQP; m_sSessionQPRange.maxQP= qp_range->maxQP; } else { DEBUG_PRINT_ERROR("ERROR: Unsupported port Index for QP range setting"); eRet = OMX_ErrorBadPortIndex; } break; } case OMX_QcomIndexPortDefn: { OMX_QCOM_PARAM_PORTDEFINITIONTYPE* pParam = (OMX_QCOM_PARAM_PORTDEFINITIONTYPE*)paramData; DEBUG_PRINT_LOW("set_parameter: OMX_QcomIndexPortDefn"); if (pParam->nPortIndex == (OMX_U32)PORT_INDEX_IN) { if (pParam->nMemRegion > OMX_QCOM_MemRegionInvalid && pParam->nMemRegion < OMX_QCOM_MemRegionMax) { m_use_input_pmem = OMX_TRUE; } else { m_use_input_pmem = OMX_FALSE; } } else if (pParam->nPortIndex == (OMX_U32)PORT_INDEX_OUT) { if (pParam->nMemRegion > OMX_QCOM_MemRegionInvalid && pParam->nMemRegion < OMX_QCOM_MemRegionMax) { m_use_output_pmem = OMX_TRUE; } else { m_use_output_pmem = OMX_FALSE; } } else { DEBUG_PRINT_ERROR("ERROR: SetParameter called on unsupported Port Index for QcomPortDefn"); RETURN(OMX_ErrorBadPortIndex); } break; } case OMX_IndexParamVideoErrorCorrection: { DEBUG_PRINT_LOW("OMX_IndexParamVideoErrorCorrection"); OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE* pParam = (OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE*)paramData; /* HEC */ if (m_codec == SWVENC_CODEC_MPEG4) { Prop.id = SWVENC_PROPERTY_ID_MPEG4_HEC; Prop.info.mpeg4_hec = pParam->bEnableHEC; Ret = swvenc_setproperty(m_hSwVenc, &Prop); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_setproperty failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUndefined); } /* Data partitioning */ Prop.id = SWVENC_PROPERTY_ID_MPEG4_DP; Prop.info.mpeg4_dp = pParam->bEnableDataPartitioning; Ret = swvenc_setproperty(m_hSwVenc, &Prop); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_setproperty failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUndefined); } } /* RVLC */ if (pParam->bEnableRVLC) { DEBUG_PRINT_ERROR("%s, RVLC not support", __FUNCTION__); } /* Re-sync Marker */ Prop.id = SWVENC_PROPERTY_ID_SLICE_CONFIG; if ( (m_codec != SWVENC_CODEC_H263) && (pParam->bEnableDataPartitioning) ) { DEBUG_PRINT_ERROR("DataPartioning are not Supported for this codec"); break; } if ( (m_codec != SWVENC_CODEC_H263) && (pParam->nResynchMarkerSpacing) ) { Prop.info.slice_config.mode = SWVENC_SLICE_MODE_BYTE; Prop.info.slice_config.size = pParam->nResynchMarkerSpacing; } else if ( (SWVENC_CODEC_H263 == m_codec) && (pParam->bEnableResync) ) { Prop.info.slice_config.mode = SWVENC_SLICE_MODE_GOB; Prop.info.slice_config.size = 0; Ret = swvenc_setproperty(m_hSwVenc, &Prop); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_setproperty failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUndefined); } } else { Prop.info.slice_config.mode = SWVENC_SLICE_MODE_OFF; Prop.info.slice_config.size = 0; } memcpy(&m_sErrorCorrection,pParam, sizeof(m_sErrorCorrection)); break; } case OMX_IndexParamVideoIntraRefresh: { DEBUG_PRINT_LOW("set_param:OMX_IndexParamVideoIntraRefresh"); OMX_VIDEO_PARAM_INTRAREFRESHTYPE* pParam = (OMX_VIDEO_PARAM_INTRAREFRESHTYPE*)paramData; Ret = swvenc_set_intra_refresh(pParam); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_set_intra_refresh failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUnsupportedSetting); } memcpy(&m_sIntraRefresh, pParam, sizeof(m_sIntraRefresh)); break; } case OMX_QcomIndexParamVideoMetaBufferMode: { StoreMetaDataInBuffersParams *pParam = (StoreMetaDataInBuffersParams*)paramData; DEBUG_PRINT_HIGH("set_parameter:OMX_QcomIndexParamVideoMetaBufferMode: " "port_index = %u, meta_mode = %d", pParam->nPortIndex, pParam->bStoreMetaData); if (pParam->nPortIndex == PORT_INDEX_IN) { if (pParam->bStoreMetaData != meta_mode_enable) { meta_mode_enable = pParam->bStoreMetaData; if (!meta_mode_enable) { Ret = swvenc_get_buffer_req(&m_sOutPortDef.nBufferCountMin, &m_sOutPortDef.nBufferCountActual, &m_sOutPortDef.nBufferSize, &m_sOutPortDef.nBufferAlignment, m_sOutPortDef.nPortIndex); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("ERROR: %s, swvenc_get_buffer_req failed (%d)", __FUNCTION__, Ret); eRet = OMX_ErrorUndefined; break; } } } } else if (pParam->nPortIndex == PORT_INDEX_OUT && secure_session) { if (pParam->bStoreMetaData != meta_mode_enable) { meta_mode_enable = pParam->bStoreMetaData; } } else { if (pParam->bStoreMetaData) { DEBUG_PRINT_ERROR("set_parameter: metamode is " "valid for input port only"); eRet = OMX_ErrorUnsupportedIndex; } } } break; case OMX_QcomIndexParamIndexExtraDataType: { DEBUG_PRINT_HIGH("set_parameter: OMX_QcomIndexParamIndexExtraDataType"); QOMX_INDEXEXTRADATATYPE *pParam = (QOMX_INDEXEXTRADATATYPE *)paramData; OMX_U32 mask = 0; if (pParam->nIndex == (OMX_INDEXTYPE)OMX_ExtraDataVideoEncoderSliceInfo) { if (pParam->nPortIndex == PORT_INDEX_OUT) { mask = VEN_EXTRADATA_SLICEINFO; DEBUG_PRINT_HIGH("SliceInfo extradata %s", ((pParam->bEnabled == OMX_TRUE) ? "enabled" : "disabled")); } else { DEBUG_PRINT_ERROR("set_parameter: Slice information is " "valid for output port only"); eRet = OMX_ErrorUnsupportedIndex; break; } } else if (pParam->nIndex == (OMX_INDEXTYPE)OMX_ExtraDataVideoEncoderMBInfo) { if (pParam->nPortIndex == PORT_INDEX_OUT) { mask = VEN_EXTRADATA_MBINFO; DEBUG_PRINT_HIGH("MBInfo extradata %s", ((pParam->bEnabled == OMX_TRUE) ? "enabled" : "disabled")); } else { DEBUG_PRINT_ERROR("set_parameter: MB information is " "valid for output port only"); eRet = OMX_ErrorUnsupportedIndex; break; } } else { DEBUG_PRINT_ERROR("set_parameter: unsupported extrdata index (%x)", pParam->nIndex); eRet = OMX_ErrorUnsupportedIndex; break; } if (pParam->bEnabled == OMX_TRUE) { m_sExtraData |= mask; } else { m_sExtraData &= ~mask; } #if 0 // TBD: add setprop to swvenc once the support is added if (handle->venc_set_param((OMX_PTR)!!(m_sExtraData & mask), (OMX_INDEXTYPE)pParam->nIndex) != true) { DEBUG_PRINT_ERROR("ERROR: Setting Extradata (%x) failed", pParam->nIndex); RETURN(OMX_ErrorUnsupportedSetting); } else #endif { m_sOutPortDef.nPortIndex = PORT_INDEX_OUT; bResult = dev_get_buf_req(&m_sOutPortDef.nBufferCountMin, &m_sOutPortDef.nBufferCountActual, &m_sOutPortDef.nBufferSize, m_sOutPortDef.nPortIndex); if (false == bResult) { DEBUG_PRINT_ERROR("dev_get_buf_req failed"); eRet = OMX_ErrorUndefined; break; } DEBUG_PRINT_HIGH("updated out_buf_req: buffer cnt=%u, " "count min=%u, buffer size=%u", m_sOutPortDef.nBufferCountActual, m_sOutPortDef.nBufferCountMin, m_sOutPortDef.nBufferSize); } break; } case OMX_QcomIndexParamVideoMaxAllowedBitrateCheck: { QOMX_EXTNINDEX_PARAMTYPE* pParam = (QOMX_EXTNINDEX_PARAMTYPE*)paramData; if (pParam->nPortIndex == PORT_INDEX_OUT) { m_max_allowed_bitrate_check = ((pParam->bEnable == OMX_TRUE) ? true : false); DEBUG_PRINT_HIGH("set_parameter: max allowed bitrate check %s", ((pParam->bEnable == OMX_TRUE) ? "enabled" : "disabled")); } else { DEBUG_PRINT_ERROR("ERROR: OMX_QcomIndexParamVideoMaxAllowedBitrateCheck " " called on wrong port(%u)", pParam->nPortIndex); RETURN(OMX_ErrorBadPortIndex); } break; } case OMX_QcomIndexEnableSliceDeliveryMode: { QOMX_EXTNINDEX_PARAMTYPE* pParam = (QOMX_EXTNINDEX_PARAMTYPE*)paramData; if (pParam->nPortIndex == PORT_INDEX_OUT) { //TBD: add setprop to swvenc once the support is added #if 0 if (!handle->venc_set_param(paramData, (OMX_INDEXTYPE)OMX_QcomIndexEnableSliceDeliveryMode)) { DEBUG_PRINT_ERROR("ERROR: Request for setting slice delivery mode failed"); RETURN( OMX_ErrorUnsupportedSetting; } #endif { DEBUG_PRINT_ERROR("ERROR: Request for setting slice delivery mode failed"); RETURN(OMX_ErrorUnsupportedSetting); } } else { DEBUG_PRINT_ERROR("ERROR: OMX_QcomIndexEnableSliceDeliveryMode " "called on wrong port(%u)", pParam->nPortIndex); RETURN(OMX_ErrorBadPortIndex); } break; } case OMX_QcomIndexEnableH263PlusPType: { QOMX_EXTNINDEX_PARAMTYPE* pParam = (QOMX_EXTNINDEX_PARAMTYPE*)paramData; DEBUG_PRINT_LOW("OMX_QcomIndexEnableH263PlusPType"); if (pParam->nPortIndex == PORT_INDEX_OUT) { DEBUG_PRINT_ERROR("ERROR: Request for setting PlusPType failed"); RETURN(OMX_ErrorUnsupportedSetting); } else { DEBUG_PRINT_ERROR("ERROR: OMX_QcomIndexEnableH263PlusPType " "called on wrong port(%u)", pParam->nPortIndex); RETURN(OMX_ErrorBadPortIndex); } break; } case OMX_QcomIndexParamPeakBitrate: { DEBUG_PRINT_ERROR("ERROR: Setting peak bitrate"); RETURN(OMX_ErrorUnsupportedSetting); break; } case QOMX_IndexParamVideoInitialQp: { // TBD: applicable to RC-on case only DEBUG_PRINT_ERROR("ERROR: Setting Initial QP for RC-on case"); RETURN(OMX_ErrorNone); break; } case OMX_QcomIndexParamSetMVSearchrange: { DEBUG_PRINT_ERROR("ERROR: Setting Searchrange"); RETURN(OMX_ErrorUnsupportedSetting); break; } default: { DEBUG_PRINT_ERROR("ERROR: Setparameter: unknown param %d", paramIndex); eRet = OMX_ErrorUnsupportedIndex; break; } } RETURN(eRet); } OMX_ERRORTYPE omx_venc::set_config ( OMX_IN OMX_HANDLETYPE hComp, OMX_IN OMX_INDEXTYPE configIndex, OMX_IN OMX_PTR configData ) { ENTER_FUNC(); SWVENC_STATUS SwStatus; (void)hComp; if (configData == NULL) { DEBUG_PRINT_ERROR("ERROR: param is null"); RETURN(OMX_ErrorBadParameter); } if (m_state == OMX_StateInvalid) { DEBUG_PRINT_ERROR("ERROR: config called in Invalid state"); RETURN(OMX_ErrorIncorrectStateOperation); } switch ((int)configIndex) { case OMX_IndexConfigVideoBitrate: { OMX_VIDEO_CONFIG_BITRATETYPE* pParam = reinterpret_cast<OMX_VIDEO_CONFIG_BITRATETYPE*>(configData); DEBUG_PRINT_HIGH("set_config(): OMX_IndexConfigVideoBitrate (%u)", pParam->nEncodeBitrate); if (pParam->nPortIndex == PORT_INDEX_OUT) { SwStatus = swvenc_set_bit_rate(pParam->nEncodeBitrate); if (SwStatus != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_set_bit_rate failed (%d)", __FUNCTION__, SwStatus); RETURN(OMX_ErrorUnsupportedSetting); } m_sConfigBitrate.nEncodeBitrate = pParam->nEncodeBitrate; m_sParamBitrate.nTargetBitrate = pParam->nEncodeBitrate; m_sOutPortDef.format.video.nBitrate = pParam->nEncodeBitrate; } else { DEBUG_PRINT_ERROR("ERROR: Unsupported port index: %u", pParam->nPortIndex); RETURN(OMX_ErrorBadPortIndex); } break; } case OMX_IndexConfigVideoFramerate: { OMX_CONFIG_FRAMERATETYPE* pParam = reinterpret_cast<OMX_CONFIG_FRAMERATETYPE*>(configData); DEBUG_PRINT_HIGH("set_config(): OMX_IndexConfigVideoFramerate (0x%x)", pParam->xEncodeFramerate); if (pParam->nPortIndex == PORT_INDEX_OUT) { SwStatus = swvenc_set_frame_rate(pParam->xEncodeFramerate >> 16); if (SwStatus != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_set_frame_rate failed (%d)", __FUNCTION__, SwStatus); RETURN(OMX_ErrorUnsupportedSetting); } m_sConfigFramerate.xEncodeFramerate = pParam->xEncodeFramerate; m_sOutPortDef.format.video.xFramerate = pParam->xEncodeFramerate; m_sOutPortFormat.xFramerate = pParam->xEncodeFramerate; } else { DEBUG_PRINT_ERROR("ERROR: Unsupported port index: %u", pParam->nPortIndex); RETURN(OMX_ErrorBadPortIndex); } break; } case QOMX_IndexConfigVideoIntraperiod: { QOMX_VIDEO_INTRAPERIODTYPE* pParam = reinterpret_cast<QOMX_VIDEO_INTRAPERIODTYPE*>(configData); DEBUG_PRINT_HIGH("set_config(): QOMX_IndexConfigVideoIntraperiod"); if (pParam->nPortIndex == PORT_INDEX_OUT) { if (pParam->nBFrames > 0) { DEBUG_PRINT_ERROR("B frames not supported"); RETURN(OMX_ErrorUnsupportedSetting); } DEBUG_PRINT_HIGH("Old: P/B frames = %u/%u, New: P/B frames = %u/%u", m_sIntraperiod.nPFrames, m_sIntraperiod.nBFrames, pParam->nPFrames, pParam->nBFrames); if (m_sIntraperiod.nBFrames != pParam->nBFrames) { DEBUG_PRINT_HIGH("Dynamically changing B-frames not supported"); RETURN(OMX_ErrorUnsupportedSetting); } /* set the intra period */ SwStatus = swvenc_set_intra_period(pParam->nPFrames,pParam->nBFrames); if (SwStatus != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_set_intra_period failed (%d)", __FUNCTION__, SwStatus); RETURN(OMX_ErrorUnsupportedSetting); } m_sIntraperiod.nPFrames = pParam->nPFrames; m_sIntraperiod.nBFrames = pParam->nBFrames; m_sIntraperiod.nIDRPeriod = pParam->nIDRPeriod; if (m_sOutPortFormat.eCompressionFormat == OMX_VIDEO_CodingMPEG4) { m_sParamMPEG4.nPFrames = pParam->nPFrames; if (m_sParamMPEG4.eProfile != OMX_VIDEO_MPEG4ProfileSimple) { m_sParamMPEG4.nBFrames = pParam->nBFrames; } else { m_sParamMPEG4.nBFrames = 0; } } else if (m_sOutPortFormat.eCompressionFormat == OMX_VIDEO_CodingH263) { m_sParamH263.nPFrames = pParam->nPFrames; } } else { DEBUG_PRINT_ERROR("ERROR: (QOMX_IndexConfigVideoIntraperiod) Unsupported port index: %u", pParam->nPortIndex); RETURN(OMX_ErrorBadPortIndex); } break; } case OMX_IndexConfigVideoIntraVOPRefresh: { OMX_CONFIG_INTRAREFRESHVOPTYPE* pParam = reinterpret_cast<OMX_CONFIG_INTRAREFRESHVOPTYPE*>(configData); DEBUG_PRINT_HIGH("set_config(): OMX_IndexConfigVideoIntraVOPRefresh"); if (pParam->nPortIndex == PORT_INDEX_OUT) { SWVENC_PROPERTY Prop; Prop.id = SWVENC_PROPERTY_ID_IFRAME_REQUEST; SwStatus = swvenc_setproperty(m_hSwVenc, &Prop); if (SwStatus != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_setproperty failed (%d)", __FUNCTION__, SwStatus); RETURN(OMX_ErrorUnsupportedSetting); } m_sConfigIntraRefreshVOP.IntraRefreshVOP = pParam->IntraRefreshVOP; } else { DEBUG_PRINT_ERROR("ERROR: Unsupported port index: %u", pParam->nPortIndex); RETURN(OMX_ErrorBadPortIndex); } break; } case OMX_IndexConfigCommonRotate: { DEBUG_PRINT_ERROR("ERROR: OMX_IndexConfigCommonRotate not supported"); RETURN(OMX_ErrorUnsupportedSetting); break; } default: DEBUG_PRINT_ERROR("ERROR: unsupported index %d", (int) configIndex); RETURN(OMX_ErrorUnsupportedSetting); break; } EXIT_FUNC(); RETURN(OMX_ErrorNone); } OMX_ERRORTYPE omx_venc::component_deinit(OMX_IN OMX_HANDLETYPE hComp) { ENTER_FUNC(); OMX_U32 i = 0; DEBUG_PRINT_HIGH("omx_venc(): Inside component_deinit()"); (void)hComp; if (OMX_StateLoaded != m_state) { DEBUG_PRINT_ERROR("WARNING:Rxd DeInit,OMX not in LOADED state %d", m_state); } if (m_out_mem_ptr) { DEBUG_PRINT_LOW("Freeing the Output Memory"); for (i=0; i< m_sOutPortDef.nBufferCountActual; i++ ) { free_output_buffer (&m_out_mem_ptr[i]); } free(m_out_mem_ptr); m_out_mem_ptr = NULL; } /* Check if the input buffers have to be cleaned up */ if ( m_inp_mem_ptr && !meta_mode_enable ) { DEBUG_PRINT_LOW("Freeing the Input Memory"); for (i=0; i<m_sInPortDef.nBufferCountActual; i++) { free_input_buffer (&m_inp_mem_ptr[i]); } free(m_inp_mem_ptr); m_inp_mem_ptr = NULL; } /* Reset counters in msg queues */ m_ftb_q.m_size=0; m_cmd_q.m_size=0; m_etb_q.m_size=0; m_ftb_q.m_read = m_ftb_q.m_write =0; m_cmd_q.m_read = m_cmd_q.m_write =0; m_etb_q.m_read = m_etb_q.m_write =0; /* Clear the strong reference */ DEBUG_PRINT_HIGH("Calling m_heap_ptr.clear()"); m_heap_ptr.clear(); DEBUG_PRINT_HIGH("Calling swvenc_deinit()"); swvenc_deinit(m_hSwVenc); DEBUG_PRINT_HIGH("OMX_Venc:Component Deinit"); RETURN(OMX_ErrorNone); } OMX_U32 omx_venc::dev_stop(void) { ENTER_FUNC(); SWVENC_STATUS Ret; if (false == m_stopped) { Ret = swvenc_stop(m_hSwVenc); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_stop failed (%d)", __FUNCTION__, Ret); RETURN(-1); } format_set = false; m_stopped = true; /* post STOP_DONE event as start is synchronus */ post_event (0, OMX_ErrorNone, OMX_COMPONENT_GENERATE_STOP_DONE); } RETURN(0); } OMX_U32 omx_venc::dev_pause(void) { ENTER_FUNC(); // nothing to be done for sw encoder RETURN(true); } OMX_U32 omx_venc::dev_resume(void) { ENTER_FUNC(); // nothing to be done for sw encoder RETURN(true); } OMX_U32 omx_venc::dev_start(void) { ENTER_FUNC(); SWVENC_STATUS Ret; Ret = swvenc_start(m_hSwVenc); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_start failed (%d)", __FUNCTION__, Ret); RETURN(-1); } m_stopped = false; RETURN(0); } OMX_U32 omx_venc::dev_flush(unsigned port) { ENTER_FUNC(); SWVENC_STATUS Ret; (void)port; Ret = swvenc_flush(m_hSwVenc); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_flush failed (%d)", __FUNCTION__, Ret); RETURN(-1); } RETURN(0); } OMX_U32 omx_venc::dev_start_done(void) { ENTER_FUNC(); /* post START_DONE event as start is synchronus */ post_event (0, OMX_ErrorNone, OMX_COMPONENT_GENERATE_START_DONE); RETURN(0); } OMX_U32 omx_venc::dev_set_message_thread_id(pthread_t tid) { ENTER_FUNC(); // nothing to be done for sw encoder (void)tid; RETURN(true); } bool omx_venc::dev_use_buf(void *buf_addr,unsigned port,unsigned index) { ENTER_FUNC(); (void)buf_addr; (void)port; (void)index; RETURN(true); } bool omx_venc::dev_free_buf(void *buf_addr,unsigned port) { ENTER_FUNC(); (void)buf_addr; (void)port; RETURN(true); } bool omx_venc::dev_empty_buf ( void *buffer, void *pmem_data_buf, unsigned index, unsigned fd ) { ENTER_FUNC(); SWVENC_STATUS Ret; SWVENC_IPBUFFER ipbuffer; OMX_BUFFERHEADERTYPE *bufhdr = (OMX_BUFFERHEADERTYPE *)buffer; unsigned int size = 0, filled_length, offset = 0; SWVENC_COLOR_FORMAT color_format; SWVENC_PROPERTY prop; (void)pmem_data_buf; (void)index; if (meta_mode_enable) { LEGACY_CAM_METADATA_TYPE *meta_buf = NULL; meta_buf = (LEGACY_CAM_METADATA_TYPE *)bufhdr->pBuffer; if(!meta_buf) { if (!bufhdr->nFilledLen && (bufhdr->nFlags & OMX_BUFFERFLAG_EOS)) { ipbuffer.p_buffer= bufhdr->pBuffer; ipbuffer.size = bufhdr->nAllocLen; ipbuffer.filled_length = bufhdr->nFilledLen; DEBUG_PRINT_LOW("dev_empty_buf: empty EOS buffer"); } else { return false; } } else { if (meta_buf->buffer_type == LEGACY_CAM_SOURCE) { offset = meta_buf->meta_handle->data[1]; size = meta_buf->meta_handle->data[2]; if (!format_set && (meta_buf->meta_handle->numFds + meta_buf->meta_handle->numInts > 5)) { format_set = true; if (((OMX_COLOR_FORMATTYPE) meta_buf->meta_handle->data[5]) != m_sInPortFormat.eColorFormat) { return false; } } ipbuffer.p_buffer = (unsigned char *)mmap(NULL, size, PROT_READ|PROT_WRITE,MAP_SHARED, fd, offset); if (ipbuffer.p_buffer == MAP_FAILED) { DEBUG_PRINT_ERROR("mmap() failed for fd %d of size %d",fd,size); RETURN(OMX_ErrorBadParameter); } ipbuffer.size = size; ipbuffer.filled_length = size; } else if (meta_buf->buffer_type == kMetadataBufferTypeGrallocSource) { VideoGrallocMetadata *meta_buf = (VideoGrallocMetadata *)bufhdr->pBuffer; private_handle_t *handle = (private_handle_t *)meta_buf->pHandle; size = handle->size; if(!format_set) { format_set = true; DEBUG_PRINT_LOW("color format = 0x%x",handle->format); if (((OMX_COLOR_FORMATTYPE)handle->format) != m_sInPortFormat.eColorFormat) { if(handle->format == HAL_PIXEL_FORMAT_NV12_ENCODEABLE) { m_sInPortFormat.eColorFormat = (OMX_COLOR_FORMATTYPE) QOMX_COLOR_FORMATYUV420PackedSemiPlanar32m; color_format = SWVENC_COLOR_FORMAT_NV12; m_sInPortDef.format.video.eColorFormat = m_sInPortFormat.eColorFormat; prop.id = SWVENC_PROPERTY_ID_COLOR_FORMAT; prop.info.color_format = color_format; Ret = swvenc_setproperty(m_hSwVenc, &prop); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_setproperty failed (%d)", __FUNCTION__, Ret); RETURN(OMX_ErrorUnsupportedSetting); } } else { DEBUG_PRINT_ERROR("%s: OMX_IndexParamVideoPortFormat 0x%x invalid", __FUNCTION__,handle->format); RETURN(OMX_ErrorBadParameter); } } } ipbuffer.p_buffer = (unsigned char *)mmap(NULL, size, PROT_READ|PROT_WRITE,MAP_SHARED, fd, offset); if (ipbuffer.p_buffer == MAP_FAILED) { DEBUG_PRINT_ERROR("mmap() failed for fd %d of size %d",fd,size); RETURN(OMX_ErrorBadParameter); } ipbuffer.size = size; ipbuffer.filled_length = size; } else { //handles the use case for surface encode ipbuffer.p_buffer = bufhdr->pBuffer; ipbuffer.size = bufhdr->nAllocLen; ipbuffer.filled_length = bufhdr->nFilledLen; } } } else { ipbuffer.p_buffer = bufhdr->pBuffer; ipbuffer.size = bufhdr->nAllocLen; ipbuffer.filled_length = bufhdr->nFilledLen; } ipbuffer.flags = 0; if (bufhdr->nFlags & OMX_BUFFERFLAG_EOS) { ipbuffer.flags |= SWVENC_FLAG_EOS; } ipbuffer.timestamp = bufhdr->nTimeStamp; ipbuffer.p_client_data = (unsigned char *)bufhdr; DEBUG_PRINT_LOW("ETB: p_buffer (%p) size (%d) filled_len (%d) flags (0x%X) timestamp (%lld) clientData (%p)", ipbuffer.p_buffer, ipbuffer.size, ipbuffer.filled_length, (unsigned int)ipbuffer.flags, ipbuffer.timestamp, ipbuffer.p_client_data); Ret = swvenc_emptythisbuffer(m_hSwVenc, &ipbuffer); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_emptythisbuffer failed (%d)", __FUNCTION__, Ret); RETURN(false); } if (m_debug.in_buffer_log) { swvenc_input_log_buffers((const char*)ipbuffer.p_buffer, ipbuffer.filled_length); } RETURN(true); } bool omx_venc::dev_fill_buf ( void *buffer, void *pmem_data_buf, unsigned index, unsigned fd ) { ENTER_FUNC(); SWVENC_STATUS Ret; SWVENC_OPBUFFER opbuffer; OMX_BUFFERHEADERTYPE *bufhdr = (OMX_BUFFERHEADERTYPE *)buffer; (void)pmem_data_buf; (void)index; (void)fd; opbuffer.p_buffer = bufhdr->pBuffer; opbuffer.size = bufhdr->nAllocLen; opbuffer.filled_length = bufhdr->nFilledLen; opbuffer.flags = bufhdr->nFlags; opbuffer.p_client_data = (unsigned char *)bufhdr; DEBUG_PRINT_LOW("FTB: p_buffer (%p) size (%d) filled_len (%d) flags (0x%X) timestamp (%lld) clientData (%p)", opbuffer.p_buffer, opbuffer.size, opbuffer.filled_length, opbuffer.flags, opbuffer.timestamp, opbuffer.p_client_data); if ( false == m_bSeqHdrRequested) { if (dev_get_seq_hdr(opbuffer.p_buffer, opbuffer.size, &opbuffer.filled_length) == 0) { bufhdr->nFilledLen = opbuffer.filled_length; bufhdr->nOffset = 0; bufhdr->nTimeStamp = 0; bufhdr->nFlags = OMX_BUFFERFLAG_CODECCONFIG; DEBUG_PRINT_LOW("sending FBD with codec config"); m_bSeqHdrRequested = true; post_event ((unsigned long)bufhdr,0,OMX_COMPONENT_GENERATE_FBD); } else { DEBUG_PRINT_ERROR("ERROR: couldn't get sequence header"); post_event(OMX_EventError,OMX_ErrorUndefined,OMX_COMPONENT_GENERATE_EVENT); } } else { Ret = swvenc_fillthisbuffer(m_hSwVenc, &opbuffer); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_fillthisbuffer failed (%d)", __FUNCTION__, Ret); RETURN(false); } } RETURN(true); } bool omx_venc::dev_get_seq_hdr ( void *buffer, unsigned size, unsigned *hdrlen ) { ENTER_FUNC(); SWVENC_STATUS Ret; SWVENC_OPBUFFER Buffer; Buffer.p_buffer = (unsigned char*) buffer; Buffer.size = size; Ret = swvenc_getsequenceheader(m_hSwVenc, &Buffer); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_flush failed (%d)", __FUNCTION__, Ret); RETURN(-1); } *hdrlen = Buffer.filled_length; RETURN(0); } bool omx_venc::dev_get_capability_ltrcount ( OMX_U32 *min, OMX_U32 *max, OMX_U32 *step_size ) { ENTER_FUNC(); (void)min; (void)max; (void)step_size; DEBUG_PRINT_ERROR("Get Capability LTR Count is not supported"); RETURN(false); } bool omx_venc::dev_get_performance_level(OMX_U32 *perflevel) { ENTER_FUNC(); (void)perflevel; DEBUG_PRINT_ERROR("Get performance level is not supported"); RETURN(false); } bool omx_venc::dev_get_vui_timing_info(OMX_U32 *enabled) { ENTER_FUNC(); (void)enabled; DEBUG_PRINT_ERROR("Get vui timing information is not supported"); RETURN(false); } bool omx_venc::dev_get_vqzip_sei_info(OMX_U32 *enabled) { ENTER_FUNC(); (void)enabled; DEBUG_PRINT_ERROR("Get vqzip sei info is not supported"); RETURN(false); } bool omx_venc::dev_get_peak_bitrate(OMX_U32 *peakbitrate) { //TBD: store the peak bitrate in class and return here; ENTER_FUNC(); (void)peakbitrate; DEBUG_PRINT_ERROR("Get peak bitrate is not supported"); RETURN(false); } bool omx_venc::dev_get_batch_size(OMX_U32 *size) { ENTER_FUNC(); (void)size; DEBUG_PRINT_ERROR("Get batch size is not supported"); RETURN(false); } bool omx_venc::dev_loaded_start() { ENTER_FUNC(); RETURN(true); } bool omx_venc::dev_loaded_stop() { ENTER_FUNC(); RETURN(true); } bool omx_venc::dev_loaded_start_done() { ENTER_FUNC(); RETURN(true); } bool omx_venc::dev_loaded_stop_done() { ENTER_FUNC(); RETURN(true); } bool omx_venc::dev_get_buf_req(OMX_U32 *min_buff_count, OMX_U32 *actual_buff_count, OMX_U32 *buff_size, OMX_U32 port) { ENTER_FUNC(); bool bRet = true; OMX_PARAM_PORTDEFINITIONTYPE *PortDef; if (PORT_INDEX_IN == port) { PortDef = &m_sInPortDef; } else if (PORT_INDEX_OUT == port) { PortDef = &m_sOutPortDef; } else { DEBUG_PRINT_ERROR("ERROR: %s, Unsupported parameter", __FUNCTION__); bRet = false; } if (true == bRet) { *min_buff_count = PortDef->nBufferCountMin; *actual_buff_count = PortDef->nBufferCountActual; *buff_size = PortDef->nBufferSize; } RETURN(true); } bool omx_venc::dev_set_buf_req ( OMX_U32 const *min_buff_count, OMX_U32 const *actual_buff_count, OMX_U32 const *buff_size, OMX_U32 port ) { ENTER_FUNC(); SWVENC_STATUS Ret; OMX_PARAM_PORTDEFINITIONTYPE *PortDef; (void)min_buff_count; if (PORT_INDEX_IN == port) { PortDef = &m_sInPortDef; } else if (PORT_INDEX_OUT == port) { PortDef = &m_sOutPortDef; } else { DEBUG_PRINT_ERROR("ERROR: %s, Unsupported parameter", __FUNCTION__); RETURN(false); } if (*actual_buff_count < PortDef->nBufferCountMin) { DEBUG_PRINT_ERROR("ERROR: %s, (actual,min) buffer count (%d, %d)", __FUNCTION__, *actual_buff_count, PortDef->nBufferCountMin); RETURN(false); } if (false == meta_mode_enable) { if (*buff_size < PortDef->nBufferSize) { DEBUG_PRINT_ERROR("ERROR: %s, (new,old) buffer count (%d, %d)", __FUNCTION__, *actual_buff_count, PortDef->nBufferCountMin); RETURN(false); } } RETURN(true); } bool omx_venc::dev_is_video_session_supported(OMX_U32 width, OMX_U32 height) { ENTER_FUNC(); if ( (width * height < m_capability.min_width * m_capability.min_height) || (width * height > m_capability.max_width * m_capability.max_height) ) { DEBUG_PRINT_ERROR( "Unsupported Resolution WxH = (%u)x(%u) Supported Range = min (%d)x(%d) - max (%d)x(%d)", width, height, m_capability.min_width, m_capability.min_height, m_capability.max_width, m_capability.max_height); RETURN(false); } RETURN(true); } bool omx_venc::dev_buffer_ready_to_queue(OMX_BUFFERHEADERTYPE *buffer) { ENTER_FUNC(); (void)buffer; RETURN(true); } int omx_venc::dev_handle_output_extradata(void *buffer, int fd) { ENTER_FUNC(); (void)buffer; (void)fd; RETURN(true); } int omx_venc::dev_handle_input_extradata(void *buffer, int fd, int index) { ENTER_FUNC(); (void)buffer; (void)fd; (void)index; RETURN(true); } void omx_venc::dev_set_extradata_cookie(void *buffer) { ENTER_FUNC(); (void)buffer; } int omx_venc::dev_set_format(int color) { ENTER_FUNC(); (void)color; RETURN(true); //return handle->venc_set_format(color); } bool omx_venc::dev_color_align(OMX_BUFFERHEADERTYPE *buffer, OMX_U32 width, OMX_U32 height) { ENTER_FUNC(); (void)buffer; (void)width; (void)height; if(secure_session) { DEBUG_PRINT_ERROR("Cannot align colors in secure session."); RETURN(OMX_FALSE); } RETURN(true); //return handle->venc_color_align(buffer, width,height); } bool omx_venc::is_secure_session() { ENTER_FUNC(); RETURN(secure_session); } bool omx_venc::dev_get_output_log_flag() { ENTER_FUNC(); RETURN(m_debug.out_buffer_log == 1); } int omx_venc::dev_output_log_buffers(const char *buffer, int bufferlen) { ENTER_FUNC(); if (m_debug.out_buffer_log && !m_debug.outfile) { int size = 0; int width = m_sInPortDef.format.video.nFrameWidth; int height = m_sInPortDef.format.video.nFrameHeight; if(SWVENC_CODEC_MPEG4 == m_codec) { size = snprintf(m_debug.outfile_name, PROPERTY_VALUE_MAX, "%s/output_enc_%d_%d_%p.m4v", m_debug.log_loc, width, height, this); } else if(SWVENC_CODEC_H263 == m_codec) { size = snprintf(m_debug.outfile_name, PROPERTY_VALUE_MAX, "%s/output_enc_%d_%d_%p.263", m_debug.log_loc, width, height, this); } if ((size > PROPERTY_VALUE_MAX) || (size < 0)) { DEBUG_PRINT_ERROR("Failed to open output file: %s for logging as size:%d", m_debug.outfile_name, size); RETURN(-1); } DEBUG_PRINT_LOW("output filename = %s", m_debug.outfile_name); m_debug.outfile = fopen(m_debug.outfile_name, "ab"); if (!m_debug.outfile) { DEBUG_PRINT_ERROR("Failed to open output file: %s for logging errno:%d", m_debug.outfile_name, errno); m_debug.outfile_name[0] = '\0'; RETURN(-1); } } if (m_debug.outfile && buffer && bufferlen) { DEBUG_PRINT_LOW("%s buffer length: %d", __func__, bufferlen); fwrite(buffer, bufferlen, 1, m_debug.outfile); } RETURN(0); } int omx_venc::swvenc_input_log_buffers(const char *buffer, int bufferlen) { int width = m_sInPortDef.format.video.nFrameWidth; int height = m_sInPortDef.format.video.nFrameHeight; int stride = VENUS_Y_STRIDE(COLOR_FMT_NV12, width); int scanlines = VENUS_Y_SCANLINES(COLOR_FMT_NV12, height); char *temp = (char*)buffer; if (!m_debug.infile) { int size = snprintf(m_debug.infile_name, PROPERTY_VALUE_MAX, "%s/input_enc_%d_%d_%p.yuv", m_debug.log_loc, width, height, this); if ((size > PROPERTY_VALUE_MAX) || (size < 0)) { DEBUG_PRINT_ERROR("Failed to open input file: %s for logging size:%d", m_debug.infile_name, size); RETURN(-1); } DEBUG_PRINT_LOW("input filename = %s", m_debug.infile_name); m_debug.infile = fopen (m_debug.infile_name, "ab"); if (!m_debug.infile) { DEBUG_PRINT_HIGH("Failed to open input file: %s for logging", m_debug.infile_name); m_debug.infile_name[0] = '\0'; RETURN(-1); } } if (m_debug.infile && buffer && bufferlen) { DEBUG_PRINT_LOW("%s buffer length: %d", __func__, bufferlen); for (int i = 0; i < height; i++) { fwrite(temp, width, 1, m_debug.infile); temp += stride; } for(int i = 0; i < height/2; i++) { fwrite(temp, width, 1, m_debug.infile); temp += stride; } } RETURN(0); } int omx_venc::dev_extradata_log_buffers(char *buffer) { ENTER_FUNC(); (void)buffer; RETURN(true); //return handle->venc_extradata_log_buffers(buffer); } SWVENC_STATUS omx_venc::swvenc_get_buffer_req ( OMX_U32 *min_buff_count, OMX_U32 *actual_buff_count, OMX_U32 *buff_size, OMX_U32 *buff_alignment, OMX_U32 port ) { ENTER_FUNC(); SWVENC_PROPERTY Prop; SWVENC_STATUS Ret; OMX_PARAM_PORTDEFINITIONTYPE *PortDef; Prop.id = SWVENC_PROPERTY_ID_BUFFER_REQ; if (PORT_INDEX_IN == port) { Prop.info.buffer_req.type = SWVENC_BUFFER_INPUT; } else if (PORT_INDEX_OUT == port) { Prop.info.buffer_req.type = SWVENC_BUFFER_OUTPUT; } else { DEBUG_PRINT_ERROR("ERROR: %s, Unsupported parameter", __FUNCTION__); RETURN(SWVENC_S_INVALID_PARAMETERS); } Ret = swvenc_getproperty(m_hSwVenc, &Prop); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("ERROR: %s, swvenc_setproperty failed (%d)", __FUNCTION__, Ret); RETURN(SWVENC_S_INVALID_PARAMETERS); } *buff_size = Prop.info.buffer_req.size; *min_buff_count = Prop.info.buffer_req.mincount; *actual_buff_count = Prop.info.buffer_req.mincount; *buff_alignment = Prop.info.buffer_req.alignment; RETURN(Ret); } SWVENC_STATUS omx_venc::swvenc_empty_buffer_done_cb ( SWVENC_HANDLE swvenc, SWVENC_IPBUFFER *p_ipbuffer, void *p_client ) { ENTER_FUNC(); (void)swvenc; SWVENC_STATUS eRet = SWVENC_S_SUCCESS; omx_venc *omx = reinterpret_cast<omx_venc*>(p_client); if (p_ipbuffer == NULL) { eRet = SWVENC_S_FAILURE; } else { omx->swvenc_empty_buffer_done(p_ipbuffer); } return eRet; } SWVENC_STATUS omx_venc::swvenc_empty_buffer_done ( SWVENC_IPBUFFER *p_ipbuffer ) { SWVENC_STATUS eRet = SWVENC_S_SUCCESS; OMX_ERRORTYPE error = OMX_ErrorNone; OMX_BUFFERHEADERTYPE* omxhdr = NULL; //omx_video *omx = reinterpret_cast<omx_video*>(p_client); omxhdr = (OMX_BUFFERHEADERTYPE*)p_ipbuffer->p_client_data; DEBUG_PRINT_LOW("EBD: clientData (%p)", p_ipbuffer->p_client_data); if ( (omxhdr == NULL) || ( ((OMX_U32)(omxhdr - m_inp_mem_ptr) >m_sInPortDef.nBufferCountActual) && ((OMX_U32)(omxhdr - meta_buffer_hdr) >m_sInPortDef.nBufferCountActual) ) ) { omxhdr = NULL; error = OMX_ErrorUndefined; } if (omxhdr != NULL) { // unmap the input buffer->pBuffer omx_release_meta_buffer(omxhdr); #ifdef _ANDROID_ICS_ if (meta_mode_enable) { LEGACY_CAM_METADATA_TYPE *meta_buf = NULL; unsigned int size = 0; meta_buf = (LEGACY_CAM_METADATA_TYPE *)omxhdr->pBuffer; if (meta_buf) { if (meta_buf->buffer_type == LEGACY_CAM_SOURCE) { size = meta_buf->meta_handle->data[2]; } else if (meta_buf->buffer_type == kMetadataBufferTypeGrallocSource) { VideoGrallocMetadata *meta_buf = (VideoGrallocMetadata *)omxhdr->pBuffer; private_handle_t *handle = (private_handle_t *)meta_buf->pHandle; size = handle->size; } } int status = munmap(p_ipbuffer->p_buffer, size); DEBUG_PRINT_HIGH("Unmapped pBuffer <%p> size <%d> status <%d>", p_ipbuffer->p_buffer, size, status); } #endif post_event ((unsigned long)omxhdr,error,OMX_COMPONENT_GENERATE_EBD); } RETURN(eRet); } SWVENC_STATUS omx_venc::swvenc_fill_buffer_done_cb ( SWVENC_HANDLE swvenc, SWVENC_OPBUFFER *p_opbuffer, void *p_client ) { ENTER_FUNC(); SWVENC_STATUS eRet = SWVENC_S_SUCCESS; OMX_ERRORTYPE error = OMX_ErrorNone; OMX_BUFFERHEADERTYPE* omxhdr = NULL; omx_video *omx = reinterpret_cast<omx_video*>(p_client); (void)swvenc; if (p_opbuffer != NULL) { omxhdr = (OMX_BUFFERHEADERTYPE*)p_opbuffer->p_client_data; } if ( (p_opbuffer != NULL) && ((OMX_U32)(omxhdr - omx->m_out_mem_ptr) < omx->m_sOutPortDef.nBufferCountActual) ) { DEBUG_PRINT_LOW("FBD: clientData (%p) buffer (%p) filled_lengh (%d) flags (0x%x) ts (%lld)", p_opbuffer->p_client_data, p_opbuffer->p_buffer, p_opbuffer->filled_length, p_opbuffer->flags, p_opbuffer->timestamp); if (p_opbuffer->filled_length <= omxhdr->nAllocLen) { omxhdr->pBuffer = p_opbuffer->p_buffer; omxhdr->nFilledLen = p_opbuffer->filled_length; omxhdr->nOffset = 0; omxhdr->nTimeStamp = p_opbuffer->timestamp; omxhdr->nFlags = 0; if (SWVENC_FRAME_TYPE_I == p_opbuffer->frame_type) { omxhdr->nFlags |= OMX_BUFFERFLAG_SYNCFRAME; } if (SWVENC_FLAG_EOS & p_opbuffer->flags) { omxhdr->nFlags |= OMX_BUFFERFLAG_EOS; } if(omxhdr->nFilledLen) { omxhdr->nFlags |= OMX_BUFFERFLAG_ENDOFFRAME; } DEBUG_PRINT_LOW("o/p flag = 0x%x", omxhdr->nFlags); /* Use buffer case */ if (omx->output_use_buffer && !omx->m_use_output_pmem) { DEBUG_PRINT_LOW("memcpy() for o/p Heap UseBuffer"); memcpy( omxhdr->pBuffer, (p_opbuffer->p_buffer), p_opbuffer->filled_length ); } } else { omxhdr->nFilledLen = 0; } } else { omxhdr = NULL; error = OMX_ErrorUndefined; } omx->post_event ((unsigned long)omxhdr,error,OMX_COMPONENT_GENERATE_FBD); RETURN(eRet); } SWVENC_STATUS omx_venc::swvenc_handle_event_cb ( SWVENC_HANDLE swvenc, SWVENC_EVENT event, void *p_client ) { ENTER_FUNC(); SWVENC_STATUS eRet = SWVENC_S_SUCCESS; omx_video *omx = reinterpret_cast<omx_video*>(p_client); OMX_BUFFERHEADERTYPE* omxhdr = NULL; (void)swvenc; if (omx == NULL || p_client == NULL) { DEBUG_PRINT_ERROR("ERROR: %s invalid i/p params", __FUNCTION__); RETURN(SWVENC_S_NULL_POINTER); } DEBUG_PRINT_LOW("swvenc_handle_event_cb - event = %d", event); switch (event) { case SWVENC_EVENT_FLUSH_DONE: { DEBUG_PRINT_ERROR("SWVENC_EVENT_FLUSH_DONE input_flush_progress %d output_flush_progress %d", omx->input_flush_progress, omx->output_flush_progress); if (omx->input_flush_progress) { omx->post_event ((unsigned)NULL, SWVENC_S_SUCCESS, OMX_COMPONENT_GENERATE_EVENT_INPUT_FLUSH); } if (omx->output_flush_progress) { omx->post_event ((unsigned)NULL, SWVENC_S_SUCCESS, OMX_COMPONENT_GENERATE_EVENT_OUTPUT_FLUSH); } break; } case SWVENC_EVENT_FATAL_ERROR: { DEBUG_PRINT_ERROR("ERROR: SWVENC_EVENT_FATAL_ERROR"); omx->omx_report_error(); break; } default: DEBUG_PRINT_HIGH("Unknown event received : %d", event); break; } RETURN(eRet); } SWVENC_STATUS omx_venc::swvenc_set_rc_mode ( OMX_VIDEO_CONTROLRATETYPE eControlRate ) { ENTER_FUNC(); SWVENC_STATUS Ret = SWVENC_S_SUCCESS; SWVENC_RC_MODE rc_mode; SWVENC_PROPERTY Prop; switch (eControlRate) { case OMX_Video_ControlRateDisable: rc_mode = SWVENC_RC_MODE_NONE; break; case OMX_Video_ControlRateVariableSkipFrames: rc_mode = SWVENC_RC_MODE_VBR_VFR; break; case OMX_Video_ControlRateVariable: rc_mode = SWVENC_RC_MODE_VBR_CFR; break; case OMX_Video_ControlRateConstantSkipFrames: rc_mode = SWVENC_RC_MODE_CBR_VFR; break; case OMX_Video_ControlRateConstant: rc_mode = SWVENC_RC_MODE_CBR_CFR; break; default: DEBUG_PRINT_ERROR("ERROR: UNKNOWN RC MODE"); Ret = SWVENC_S_FAILURE; break; } if (SWVENC_S_SUCCESS == Ret) { Prop.id = SWVENC_PROPERTY_ID_RC_MODE; Prop.info.rc_mode = rc_mode; Ret = swvenc_setproperty(m_hSwVenc, &Prop); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_setproperty failed (%d)", __FUNCTION__, Ret); RETURN(SWVENC_S_FAILURE); } } RETURN(Ret); } SWVENC_STATUS omx_venc::swvenc_set_profile_level ( OMX_U32 eProfile, OMX_U32 eLevel ) { ENTER_FUNC(); SWVENC_STATUS Ret = SWVENC_S_SUCCESS; SWVENC_PROPERTY Prop; SWVENC_PROFILE Profile; SWVENC_LEVEL Level; /* set the profile */ if (SWVENC_CODEC_MPEG4 == m_codec) { switch (eProfile) { case OMX_VIDEO_MPEG4ProfileSimple: Profile.mpeg4 = SWVENC_PROFILE_MPEG4_SIMPLE; break; case OMX_VIDEO_MPEG4ProfileAdvancedSimple: Profile.mpeg4 = SWVENC_PROFILE_MPEG4_ADVANCED_SIMPLE; break; default: DEBUG_PRINT_ERROR("ERROR: UNKNOWN PROFILE"); Ret = SWVENC_S_FAILURE; break; } switch (eLevel) { case OMX_VIDEO_MPEG4Level0: Level.mpeg4 = SWVENC_LEVEL_MPEG4_0; break; case OMX_VIDEO_MPEG4Level0b: Level.mpeg4 = SWVENC_LEVEL_MPEG4_0B; break; case OMX_VIDEO_MPEG4Level1: Level.mpeg4 = SWVENC_LEVEL_MPEG4_1; break; case OMX_VIDEO_MPEG4Level2: Level.mpeg4 = SWVENC_LEVEL_MPEG4_2; break; case OMX_VIDEO_MPEG4Level3: Level.mpeg4 = SWVENC_LEVEL_MPEG4_3; break; case OMX_VIDEO_MPEG4Level4: Level.mpeg4 = SWVENC_LEVEL_MPEG4_4; break; case OMX_VIDEO_MPEG4Level4a: Level.mpeg4 = SWVENC_LEVEL_MPEG4_4A; break; case OMX_VIDEO_MPEG4Level5: Level.mpeg4 = SWVENC_LEVEL_MPEG4_5; break; default: DEBUG_PRINT_ERROR("ERROR: UNKNOWN LEVEL"); Ret = SWVENC_S_FAILURE; break; } } else if (SWVENC_CODEC_H263 == m_codec) { switch (eProfile) { case OMX_VIDEO_H263ProfileBaseline: Profile.h263 = SWVENC_PROFILE_H263_BASELINE; break; default: DEBUG_PRINT_ERROR("ERROR: UNKNOWN PROFILE"); Ret = SWVENC_S_FAILURE; break; } switch (eLevel) { case OMX_VIDEO_H263Level10: Level.h263 = SWVENC_LEVEL_H263_10; break; case OMX_VIDEO_H263Level20: Level.h263 = SWVENC_LEVEL_H263_20; break; case OMX_VIDEO_H263Level30: Level.h263 = SWVENC_LEVEL_H263_30; break; case OMX_VIDEO_H263Level40: Level.h263 = SWVENC_LEVEL_H263_40; break; case OMX_VIDEO_H263Level50: Level.h263 = SWVENC_LEVEL_H263_50; break; case OMX_VIDEO_H263Level60: Level.h263 = SWVENC_LEVEL_H263_60; break; case OMX_VIDEO_H263Level70: Level.h263 = SWVENC_LEVEL_H263_70; break; default: DEBUG_PRINT_ERROR("ERROR: UNKNOWN LEVEL"); Ret = SWVENC_S_FAILURE; break; } } else { DEBUG_PRINT_ERROR("ERROR: UNSUPPORTED CODEC"); Ret = SWVENC_S_FAILURE; } if (SWVENC_S_SUCCESS == Ret) { Prop.id = SWVENC_PROPERTY_ID_PROFILE; Prop.info.profile = Profile; /* set the profile */ Ret = swvenc_setproperty(m_hSwVenc, &Prop); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_setproperty failed (%d)", __FUNCTION__, Ret); RETURN(SWVENC_S_FAILURE); } /* set the level */ Prop.id = SWVENC_PROPERTY_ID_LEVEL; Prop.info.level = Level; Ret = swvenc_setproperty(m_hSwVenc, &Prop); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_setproperty failed (%d)", __FUNCTION__, Ret); RETURN(SWVENC_S_FAILURE); } } RETURN(Ret); } SWVENC_STATUS omx_venc::swvenc_set_intra_refresh ( OMX_VIDEO_PARAM_INTRAREFRESHTYPE *IntraRefresh ) { ENTER_FUNC(); SWVENC_STATUS Ret = SWVENC_S_SUCCESS; SWVENC_IR_CONFIG ir_config; SWVENC_PROPERTY Prop; switch (IntraRefresh->eRefreshMode) { case OMX_VIDEO_IntraRefreshCyclic: Prop.info.ir_config.mode = SWVENC_IR_MODE_CYCLIC; break; case OMX_VIDEO_IntraRefreshAdaptive: Prop.info.ir_config.mode = SWVENC_IR_MODE_ADAPTIVE; break; case OMX_VIDEO_IntraRefreshBoth: Prop.info.ir_config.mode = SWVENC_IR_MODE_CYCLIC_ADAPTIVE; break; case OMX_VIDEO_IntraRefreshRandom: Prop.info.ir_config.mode = SWVENC_IR_MODE_RANDOM; break; default: DEBUG_PRINT_ERROR("ERROR: UNKNOWN INTRA REFRESH MODE"); Ret = SWVENC_S_FAILURE; break; } if (SWVENC_S_SUCCESS == Ret) { Prop.id = SWVENC_PROPERTY_ID_IR_CONFIG; Prop.info.ir_config.cir_mbs = IntraRefresh->nCirMBs; Ret = swvenc_setproperty(m_hSwVenc, &Prop); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_setproperty failed (%d)", __FUNCTION__, Ret); Ret = SWVENC_S_FAILURE; } } RETURN(Ret); } SWVENC_STATUS omx_venc::swvenc_set_frame_rate ( OMX_U32 nFrameRate ) { ENTER_FUNC(); SWVENC_STATUS Ret = SWVENC_S_SUCCESS; SWVENC_PROPERTY Prop; Prop.id = SWVENC_PROPERTY_ID_FRAME_RATE; Prop.info.frame_rate = nFrameRate; Ret = swvenc_setproperty(m_hSwVenc, &Prop); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_setproperty failed (%d)", __FUNCTION__, Ret); Ret = SWVENC_S_FAILURE; } RETURN(Ret); } SWVENC_STATUS omx_venc::swvenc_set_bit_rate ( OMX_U32 nTargetBitrate ) { ENTER_FUNC(); SWVENC_STATUS Ret = SWVENC_S_SUCCESS; SWVENC_PROPERTY Prop; Prop.id = SWVENC_PROPERTY_ID_TARGET_BITRATE; Prop.info.target_bitrate = nTargetBitrate; Ret = swvenc_setproperty(m_hSwVenc, &Prop); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_setproperty failed (%d)", __FUNCTION__, Ret); Ret = SWVENC_S_FAILURE; } RETURN(Ret); } SWVENC_STATUS omx_venc::swvenc_set_intra_period ( OMX_U32 nPFrame, OMX_U32 nBFrame ) { ENTER_FUNC(); SWVENC_STATUS Ret = SWVENC_S_SUCCESS; SWVENC_PROPERTY Prop; Prop.id = SWVENC_PROPERTY_ID_INTRA_PERIOD; Prop.info.intra_period.pframes = nPFrame; Prop.info.intra_period.bframes = nBFrame; Ret = swvenc_setproperty(m_hSwVenc, &Prop); if (Ret != SWVENC_S_SUCCESS) { DEBUG_PRINT_ERROR("%s, swvenc_setproperty failed (%d)", __FUNCTION__, Ret); Ret = SWVENC_S_FAILURE; } RETURN(Ret); }
b2b2689fb446483a584ac6adbc6f67f2076f75b3
fc6e841ca6347fea0f5c78102d97718ee6297362
/Code/Prototypes/EORE Controller - Tigger R2/src/print/print.cpp
2ff1a48b8c1b92d2271c9af3b21f9231ac4a5fb5
[]
no_license
fake-name/EORE
8f9a11dceab240f99f72a04608eb808232db8b89
7aa12ee6d03b75f3d58444e58cc1ff896d9d8c9b
refs/heads/master
2020-12-26T20:10:18.794749
2016-06-06T04:49:47
2016-06-06T04:49:47
25,186,140
0
1
null
2014-11-05T02:41:01
2014-10-14T02:03:18
C
UTF-8
C++
false
false
2,274
cpp
#include "print/print.hpp" #include <stdarg.h> #include <asf.h> // #include <inttypes.h> // #include <string.h> // ######################################################### // Ring Buffer // ######################################################### #define RX_BUFFER_SIZE 128 struct ring_buffer { unsigned char buffer[RX_BUFFER_SIZE]; int head; int tail; }; ring_buffer rx_buffer = { { 0 }, 0, 0 }; inline void store_char(unsigned char c) { int i = (rx_buffer.head + 1) % RX_BUFFER_SIZE; // if we should be storing the received character into the location // just before the tail (meaning that the head would advance to the // current location of the tail), we're about to overflow the buffer // and so we don't write the character or advance the head. if (i != rx_buffer.tail) { rx_buffer.buffer[rx_buffer.head] = c; rx_buffer.head = i; } } int rxRead(void) { // if the head isn't ahead of the tail, we don't have any characters if (rx_buffer.head != rx_buffer.tail) { unsigned char c = rx_buffer.buffer[rx_buffer.tail]; rx_buffer.tail = (rx_buffer.tail + 1) % RX_BUFFER_SIZE; return c; } return -1; } int rxAvailable(void) { return (RX_BUFFER_SIZE + rx_buffer.head - rx_buffer.tail) % RX_BUFFER_SIZE; } // ######################################################### // The actual Interrupt // ######################################################### void DEBUG_UART_ISR_HANDLER(void) { uint32_t dw_status = usart_get_status(DEBUG_UART); if (dw_status & US_CSR_RXRDY) { uint32_t received_byte; usart_read(DEBUG_UART, &received_byte); store_char(received_byte); } } // ######################################################### // Public functions // ######################################################### void USARTWriteStr(char const *data) { while( *data != '\0' ) { usart_putchar(DEBUG_UART, *data++); } } void USARTWriteStrLn(char const *data) { while( *data != '\0' ) { usart_putchar(DEBUG_UART, *data++); } usart_putchar(DEBUG_UART, '\r'); usart_putchar(DEBUG_UART, '\n'); } void debugUnique(char const *fmt, ... ) { char buf[128]; // resulting string limited to 128 chars va_list args; va_start (args, fmt ); vsnprintf(buf, 128, fmt, args); va_end (args); USARTWriteStrLn(buf); }
0860256eb73f98ea9364186a8f0785d780647868
a35b30a7c345a988e15d376a4ff5c389a6e8b23a
/boost/function_types/detail/components_impl/arity30_0.hpp
9d8b88705ccfe38fb96fdc2162f5b48dfce884d4
[]
no_license
huahang/thirdparty
55d4cc1c8a34eff1805ba90fcbe6b99eb59a7f0b
07a5d64111a55dda631b7e8d34878ca5e5de05ab
refs/heads/master
2021-01-15T14:29:26.968553
2014-02-06T07:35:22
2014-02-06T07:35:22
null
0
0
null
null
null
null
UTF-8
C++
false
false
93
hpp
#include "thirdparty/boost_1_55_0/boost/function_types/detail/components_impl/arity30_0.hpp"
acdcee98250b9e144fb212c21de1c5cebf7147e0
9d6ddfd83695934114d281deeb634e05b2f3d441
/src/services/TTMATServiceHandler.cpp
cd0b63aa33d7c3abdbb948a18ad008d456f08489
[ "Apache-2.0" ]
permissive
treadstoneproject/tracethreat-nrml
b88df2e818b7089f5626be2c5806022f9800cad9
bcf666b01c20f7da4234fed018dad3b2cf4d3d28
refs/heads/master
2020-04-05T23:14:00.069081
2017-01-18T05:34:00
2017-01-18T05:34:00
39,619,039
6
6
null
null
null
null
UTF-8
C++
false
false
2,463
cpp
/* * Copyright 2015 Chatsiri Rattana. * * 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. */ /* Titles Authors Date * - TTMATServiceHandler support message from TTMAT R.Chatsiri */ #include <rocksdb/db.h> #include <rocksdb/slice.h> #include <rocksdb/options.h> //#include <rapidjson/document.h> #include <glog/logging.h> #include "utils/flags.hpp" #include "services/TTMATServiceHandler.hpp" namespace service{ void TTMATServiceHandler::getMailboxTTMAT(ttmat::MailboxTTMAT& mbTTMATReturn, const ::authentication::User& user, const std::string& date){ LOG(INFO) << "Get message from TT-MAT..."; /* //Get path dbPath = utils::rocksDBPath(); if (dbPath.empty()) LOG(INFO) << "Path is empty"; rocksDBConnector.kDBPath(utils::rocksDBPath().c_str()); rocksdb::Status status = rocksDBConnector.connection(); if (!status.ok()){ LOG(INFO) << " Login cannot connection to database"; LOG(INFO) << " Status result : " << status.code(); //return false; } rocksdb::DB * db = rocksDBConnector.getDB(); std::string ttmatMessageError; // get user & pwd. status = db->Get(rocksdb::ReadOptions(), std::string("ttmat-message-mailbox") .append("-") .append(date),//Date (Not include time) &ttmatMessageError); LOG(INFO) << "Result get mailbox : " << ttmatMessageError; //Message format of TTMAT ttmat::MessageTTMAT msgTTMAT; /*[-] Convert message to json. if (!ttmatMessageError.empty()){ folly::dynamic jsonTTMATMessageError = ttmatMessageError; std::string subject = jsonTTMATMessageError.at() msgTTMAT.__set_subject }*/ //[-] Convert message to struct. /* //Push back information to container std::vector<ttmat::MessageTTMAT> messageTTMAT; messageTTMAT.push_back(msgTTMAT); //setMessage before return message to external mbTTMATReturn.__set_messageTTMAT(messageTTMAT); delete db; */ } }
b3aed649d1da07e2e4e95d22c747676dd564a05e
eb8602f18c95771bf3535dc5c5e1de4cf065e1ff
/src/lib/include/diderot/diderot.hxx
d11ae6e5a78df042fdde4d159048e197f44a3dcd
[ "MIT" ]
permissive
cchiw/Diderot-Dev
78251286ce1e7a6a8f2b070152bd35a681b4926f
92c2b57a59003a3dde80b04626f53edc11f750f3
refs/heads/master
2021-04-03T14:01:52.325622
2018-06-21T22:01:41
2018-06-21T22:01:41
125,242,676
0
1
null
null
null
null
UTF-8
C++
false
false
1,007
hxx
/*! \file diderot.hxx * * This header file pulls in all the various headers used in the Diderot library code. * It is meant to be included in the generated code produced by the Diderot compiler. * * \author John Reppy */ /* * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu) * * COPYRIGHT (c) 2016 The University of Chicago * All rights reserved. */ #ifndef _DIDEROT_DIDEROT_HXX_ #define _DIDEROT_DIDEROT_HXX_ #include "base.hxx" #include "util.hxx" #include "options.hxx" #include "tensor.hxx" #include "image.hxx" #include "dynseq.hxx" #include "femptr.hxx" #include "femptr_multiple.hxx" #ifdef DIDEROT_HAS_STRAND_COMMUNICATION # ifdef DIDEROT_NO_SPACE_PARTITION # include "brute-force-query.hxx" # else # include "kdtree.hxx" # endif // DIDEROT_NO_SPACE_PARTITION #endif // DIDEROT_HAS_STRAND_COMMUNICATION #include "world.hxx" #include "eigen.hxx" #ifdef DIDEROT_TARGET_PARALLEL #include "parallel.hxx" #endif #endif // !_DIDEROT_DIDEROT_HXX_
6152d09f642a3e1c12ad724c867fb9c128b6b855
41fafc0c79d31ab9abb8be3956a086c67b633dc2
/kernel/debug/Common.hpp
94822b21b5d75eff08598b4986f949a068fd944a
[]
no_license
GuillaumeGas/LtMicros
4832be94733792e56cc6808a22aac8fd02d8061d
c389c04316df02283d4f7f880078d1b9d51bf4d1
refs/heads/master
2020-05-27T16:55:13.463086
2020-02-09T11:04:37
2020-02-09T11:04:37
188,711,579
1
0
null
null
null
null
UTF-8
C++
false
false
1,294
hpp
#pragma once #include <kernel/lib/Types.hpp> #include "LtDbgCommands.hpp" /// @file /// @addgroup Debug Debug group /// @{ enum KeDebugStatus { DBG_STATUS_SUCCESS, DBG_STATUS_FAILURE, DBG_STATUS_ALREADY_CONNECTED, DBG_STATUS_BREAKPOINT_REACHED, DBG_STATUS_WRONG_PARAMETER, DBG_STATUS_MEMORY_UNAVAILABLE } typedef KeDebugStatus; enum BpState { BP_ENABLED, BP_DISABLED } typedef BpState; struct KeDebugContext { u32 cr3, cr2, cr0; u32 gs, fs, es, ds, ss; u32 edi, esi, ebp, esp, ebx, edx, ecx, eax; u32 eip; u16 cs; u32 eflags; } typedef KeDebugContext; struct KeBreakpoint { u32 addr; BpState state; u8 savedInstByte; int id; } typedef KeBreakpoint; struct KeDebugPacket { unsigned int size; u8 * content; // KeDebugRequest ou KeDebugResponse } typedef KeDebugPacket; struct KeDebugRequest { CommandId command; unsigned int paramSize; char * param; } typedef KeDebugRequest; struct KeDebugResponseHeader { CommandId command; KeDebugStatus status; KeDebugContext context; char processName[512]; unsigned int dataSize; } typedef KeDebugResponseHeader; struct KeDebugResponse { KeDebugResponseHeader header; char * data; } typedef KeDebugResponse; /// @}
f20862d357fdb6160c383d896680a09c0ae53a4d
469d3bf96df9abdd50a7c2cafbcc312610da16a5
/C语言/实验/程序/1064.加密字符.cpp
7c90a62b868af485dfdaf6b5230b4b783b187501
[]
no_license
myqcxy/Freshman
f104b0158ff2fa1248b6e5cf34cfdd37fce122a7
c998b2e49a51784e5254afa280c1350497edfc0b
refs/heads/master
2020-03-16T02:59:29.457006
2018-05-07T15:11:27
2018-05-07T15:11:27
132,477,767
0
0
null
null
null
null
UTF-8
C++
false
false
300
cpp
#include<stdio.h> int main() { char a[10000]; int j, i; for(i=0;scanf("%c", &a[i]),a[i]!='@';i++) { if(a[i]<='Z'&&a[i]>='A') a[i]+=32; if(a[i]<'z'&&a[i]>='a') { a[i]=a[i]+1; } else if(a[i]=='z') { a[i]='a'; } } for(j=0;j<i;j++) { printf("%c", a[j]); } return 0; }
799bf68931294de0d1e72dd4574ecb72ec6b62ee
c67cbd22f9bc3c465fd763fdf87172f2c8ec77d4
/Desktop/Please Work/build/Android/Preview/app/src/main/jni/Uno.Net.Http.g.cpp
0a38029629964cf93305e36f99970f24f986441c
[]
no_license
AzazelMoreno/Soteria-project
7c58896d6bf5a9ad919bde6ddc2a30f4a07fa0d4
04fdb71065941176867fb9007ecf38bbf851ad47
refs/heads/master
2020-03-11T16:33:22.153713
2018-04-19T19:47:55
2018-04-19T19:47:55
130,120,337
0
0
null
null
null
null
UTF-8
C++
false
false
90,502
cpp
// This file was generated based on '(multiple files)'. // WARNING: Changes might be lost if you edit this file directly. #include <Android.Base.JNI.h> #include <Android.Base.Wrappers.JWrapper.h> #include <Android.Base.Wrappers-90b493fe.h> #include <Android.com.fuse.Expe-9d584358.h> #include <Uno.Action.h> #include <Uno.Action1-1.h> #include <Uno.Action2-2.h> #include <Uno.Action4-4.h> #include <Uno.ArgumentNullException.h> #include <Uno.Bool.h> #include <Uno.Byte.h> #include <Uno.Collections.Dictionary-2.h> #include <Uno.Collections.IDictionary-2.h> #include <Uno.Collections.List-1.h> #include <Uno.Collections.List--251bdc7d.h> #include <Uno.Delegate.h> #include <Uno.Diagnostics.Debug.h> #include <Uno.Diagnostics.Debug-5d778620.h> #include <Uno.Exception.h> #include <Uno.GC.h> #include <Uno.Int.h> #include <Uno.Long.h> #include <Uno.Net.Http.HttpDefa-b19f5e55.h> #include <Uno.Net.Http.HttpMess-1d2e0b2f.h> #include <Uno.Net.Http.HttpMess-2de79056.h> #include <Uno.Net.Http.HttpMess-56ba8d01.h> #include <Uno.Net.Http.HttpMess-8a5feb56.h> #include <Uno.Net.Http.HttpMessageCache.h> #include <Uno.Net.Http.HttpMess-b09aa232.h> #include <Uno.Net.Http.HttpMess-db3b7805.h> #include <Uno.Net.Http.HttpRequestState.h> #include <Uno.Net.Http.HttpResponseType.h> #include <Uno.Net.Http.HttpStat-138f9460.h> #include <Uno.Net.Http.Implemen-5e623127.h> #include <Uno.Net.Http.Implemen-c964dca9.h> #include <Uno.Net.Http.InvalidR-d0abcd6.h> #include <Uno.Net.Http.InvalidS-7f541f1c.h> #include <Uno.Object.h> #include <Uno.ObjectDisposedException.h> #include <Uno.Platform.Applicat-bf686309.h> #include <Uno.Platform.ApplicationState.h> #include <Uno.Platform.CoreApp.h> #include <Uno.String.h> #include <Uno.Threading.IDispatcher.h> static uString* STRINGS[44]; static uType* TYPES[3]; namespace g{ namespace Uno{ namespace Net{ namespace Http{ // C:\Users\rudy0\AppData\Local\Fusetools\Packages\Uno.Net.Http\1.8.0\HttpMessageHandlerRequest.uno // ------------------------------------------------------------------------------------------------ // private sealed class HttpMessageHandlerRequest.DispatchClosure :138 // { static void HttpMessageHandlerRequest__DispatchClosure_build(uType* type) { type->SetFields(0, ::g::Uno::Action1_typeof()->MakeType(::g::Uno::Net::Http::HttpMessageHandlerRequest_typeof(), NULL), offsetof(HttpMessageHandlerRequest__DispatchClosure, _action), 0, ::g::Uno::Net::Http::HttpMessageHandlerRequest_typeof(), offsetof(HttpMessageHandlerRequest__DispatchClosure, _arg), 0, ::g::Uno::Net::Http::HttpRequestState_typeof(), offsetof(HttpMessageHandlerRequest__DispatchClosure, _state), 0); } uType* HttpMessageHandlerRequest__DispatchClosure_typeof() { static uSStrong<uType*> type; if (type != NULL) return type; uTypeOptions options; options.FieldCount = 3; options.ObjectSize = sizeof(HttpMessageHandlerRequest__DispatchClosure); options.TypeSize = sizeof(uType); type = uClassType::New("Uno.Net.Http.HttpMessageHandlerRequest.DispatchClosure", options); type->fp_build_ = HttpMessageHandlerRequest__DispatchClosure_build; return type; } // public DispatchClosure(Uno.Net.Http.HttpRequestState state, Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest> action, Uno.Net.Http.HttpMessageHandlerRequest arg) :144 void HttpMessageHandlerRequest__DispatchClosure__ctor__fn(HttpMessageHandlerRequest__DispatchClosure* __this, int32_t* state, uDelegate* action, ::g::Uno::Net::Http::HttpMessageHandlerRequest* arg) { __this->ctor_(*state, action, arg); } // public DispatchClosure New(Uno.Net.Http.HttpRequestState state, Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest> action, Uno.Net.Http.HttpMessageHandlerRequest arg) :144 void HttpMessageHandlerRequest__DispatchClosure__New1_fn(int32_t* state, uDelegate* action, ::g::Uno::Net::Http::HttpMessageHandlerRequest* arg, HttpMessageHandlerRequest__DispatchClosure** __retval) { *__retval = HttpMessageHandlerRequest__DispatchClosure::New1(*state, action, arg); } // public void Run() :151 void HttpMessageHandlerRequest__DispatchClosure__Run_fn(HttpMessageHandlerRequest__DispatchClosure* __this) { __this->Run(); } // public DispatchClosure(Uno.Net.Http.HttpRequestState state, Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest> action, Uno.Net.Http.HttpMessageHandlerRequest arg) [instance] :144 void HttpMessageHandlerRequest__DispatchClosure::ctor_(int32_t state, uDelegate* action, ::g::Uno::Net::Http::HttpMessageHandlerRequest* arg) { _action = action; _arg = arg; _state = state; } // public void Run() [instance] :151 void HttpMessageHandlerRequest__DispatchClosure::Run() { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest.DispatchClosure", "Run()"); if (uPtr(_arg)->IsComplete()) return; uPtr(_arg)->State(_state); uPtr(_action)->InvokeVoid(_arg); uPtr(_arg)->CompleteRequest(); } // public DispatchClosure New(Uno.Net.Http.HttpRequestState state, Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest> action, Uno.Net.Http.HttpMessageHandlerRequest arg) [static] :144 HttpMessageHandlerRequest__DispatchClosure* HttpMessageHandlerRequest__DispatchClosure::New1(int32_t state, uDelegate* action, ::g::Uno::Net::Http::HttpMessageHandlerRequest* arg) { HttpMessageHandlerRequest__DispatchClosure* obj1 = (HttpMessageHandlerRequest__DispatchClosure*)uNew(HttpMessageHandlerRequest__DispatchClosure_typeof()); obj1->ctor_(state, action, arg); return obj1; } // } // C:\Users\rudy0\AppData\Local\Fusetools\Packages\Uno.Net.Http\1.8.0\HttpMessageHandlerRequest.uno // ------------------------------------------------------------------------------------------------ // private sealed class HttpMessageHandlerRequest.DispatchClosure<TArg1> :161 // { static void HttpMessageHandlerRequest__DispatchClosure1_build(uType* type) { type->SetFields(0, ::g::Uno::Action2_typeof()->MakeType(::g::Uno::Net::Http::HttpMessageHandlerRequest_typeof(), type->T(0), NULL), offsetof(HttpMessageHandlerRequest__DispatchClosure1, _action), 0, ::g::Uno::Net::Http::HttpMessageHandlerRequest_typeof(), offsetof(HttpMessageHandlerRequest__DispatchClosure1, _arg0), 0, type->T(0), (uintptr_t)0, uFieldFlagsConstrained, ::g::Uno::Net::Http::HttpRequestState_typeof(), offsetof(HttpMessageHandlerRequest__DispatchClosure1, _state), 0); } uType* HttpMessageHandlerRequest__DispatchClosure1_typeof() { static uSStrong<uType*> type; if (type != NULL) return type; uTypeOptions options; options.FieldCount = 4; options.GenericCount = 1; options.ObjectSize = sizeof(HttpMessageHandlerRequest__DispatchClosure1); options.TypeSize = sizeof(uType); type = uClassType::New("Uno.Net.Http.HttpMessageHandlerRequest.DispatchClosure`1", options); type->fp_build_ = HttpMessageHandlerRequest__DispatchClosure1_build; return type; } // public DispatchClosure(Uno.Net.Http.HttpRequestState state, Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest, TArg1> action, Uno.Net.Http.HttpMessageHandlerRequest arg0, TArg1 arg1) :168 void HttpMessageHandlerRequest__DispatchClosure1__ctor__fn(HttpMessageHandlerRequest__DispatchClosure1* __this, int32_t* state, uDelegate* action, ::g::Uno::Net::Http::HttpMessageHandlerRequest* arg0, void* arg1) { int32_t state_ = *state; __this->_action = action; __this->_arg0 = arg0; __this->_arg1() = arg1; __this->_state = state_; } // public DispatchClosure New(Uno.Net.Http.HttpRequestState state, Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest, TArg1> action, Uno.Net.Http.HttpMessageHandlerRequest arg0, TArg1 arg1) :168 void HttpMessageHandlerRequest__DispatchClosure1__New1_fn(uType* __type, int32_t* state, uDelegate* action, ::g::Uno::Net::Http::HttpMessageHandlerRequest* arg0, void* arg1, HttpMessageHandlerRequest__DispatchClosure1** __retval) { int32_t state_ = *state; HttpMessageHandlerRequest__DispatchClosure1* obj1 = (HttpMessageHandlerRequest__DispatchClosure1*)uNew(__type); HttpMessageHandlerRequest__DispatchClosure1__ctor__fn(obj1, uCRef<int32_t>(state_), action, arg0, arg1); return *__retval = obj1, void(); } // public void Run() :176 void HttpMessageHandlerRequest__DispatchClosure1__Run_fn(HttpMessageHandlerRequest__DispatchClosure1* __this) { __this->Run(); } // public void Run() [instance] :176 void HttpMessageHandlerRequest__DispatchClosure1::Run() { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest.DispatchClosure`1", "Run()"); if (uPtr(_arg0)->IsComplete()) return; uPtr(_arg0)->State(_state); uPtr(_action)->Invoke(2, (::g::Uno::Net::Http::HttpMessageHandlerRequest*)_arg0, (void*)_arg1()); uPtr(_arg0)->CompleteRequest(); } // } // C:\Users\rudy0\AppData\Local\Fusetools\Packages\Uno.Net.Http\1.8.0\HttpDefaultDispatcher.uno // -------------------------------------------------------------------------------------------- // internal sealed class HttpDefaultDispatcher :6 // { static void HttpDefaultDispatcher_build(uType* type) { type->SetInterfaces( ::g::Uno::Threading::IDispatcher_typeof(), offsetof(HttpDefaultDispatcher_type, interface0)); } HttpDefaultDispatcher_type* HttpDefaultDispatcher_typeof() { static uSStrong<HttpDefaultDispatcher_type*> type; if (type != NULL) return type; uTypeOptions options; options.InterfaceCount = 1; options.ObjectSize = sizeof(HttpDefaultDispatcher); options.TypeSize = sizeof(HttpDefaultDispatcher_type); type = (HttpDefaultDispatcher_type*)uClassType::New("Uno.Net.Http.HttpDefaultDispatcher", options); type->fp_build_ = HttpDefaultDispatcher_build; type->fp_ctor_ = (void*)HttpDefaultDispatcher__New1_fn; type->interface0.fp_Invoke = (void(*)(uObject*, uDelegate*))HttpDefaultDispatcher__Invoke_fn; return type; } // public HttpDefaultDispatcher() :8 void HttpDefaultDispatcher__ctor__fn(HttpDefaultDispatcher* __this) { __this->ctor_(); } // public void Invoke(Uno.Action action) :13 void HttpDefaultDispatcher__Invoke_fn(HttpDefaultDispatcher* __this, uDelegate* action) { __this->Invoke(action); } // public HttpDefaultDispatcher New() :8 void HttpDefaultDispatcher__New1_fn(HttpDefaultDispatcher** __retval) { *__retval = HttpDefaultDispatcher::New1(); } // public HttpDefaultDispatcher() [instance] :8 void HttpDefaultDispatcher::ctor_() { } // public void Invoke(Uno.Action action) [instance] :13 void HttpDefaultDispatcher::Invoke(uDelegate* action) { uStackFrame __("Uno.Net.Http.HttpDefaultDispatcher", "Invoke(Uno.Action)"); uPtr(action)->InvokeVoid(); } // public HttpDefaultDispatcher New() [static] :8 HttpDefaultDispatcher* HttpDefaultDispatcher::New1() { HttpDefaultDispatcher* obj1 = (HttpDefaultDispatcher*)uNew(HttpDefaultDispatcher_typeof()); obj1->ctor_(); return obj1; } // } // C:\Users\rudy0\AppData\Local\Fusetools\Packages\Uno.Net.Http\1.8.0\HttpMessageCache.uno // --------------------------------------------------------------------------------------- // public static class HttpMessageCache :3 // { // static HttpMessageCache() :34 static void HttpMessageCache__cctor__fn(uType* __type) { ::g::Uno::Platform::CoreApp_typeof()->Init(); ::g::Uno::Platform::CoreApp::add_Started(uDelegate::New(::TYPES[0/*Uno.Platform.ApplicationStateTransitionHandler*/], (void*)HttpMessageCache__OnApplicationStarted_fn)); } static void HttpMessageCache_build(uType* type) { ::STRINGS[0] = uString::Const("Uno.Net.Http.HttpMessageCache: Changes to IsCacheEnabled are ignored after initialization."); ::STRINGS[1] = uString::Const("C:/Users/rudy0/AppData/Local/Fusetools/Packages/Uno.Net.Http/1.8.0/HttpMessageCache.uno"); ::TYPES[0] = ::g::Uno::Platform::ApplicationStateTransitionHandler_typeof(); type->SetDependencies( ::g::Uno::Platform::CoreApp_typeof(), ::g::Uno::Diagnostics::Debug_typeof()); type->SetFields(0, ::g::Uno::Bool_typeof(), (uintptr_t)&HttpMessageCache::_isInitialized_, uFieldFlagsStatic, ::g::Uno::Bool_typeof(), (uintptr_t)&HttpMessageCache::_isCacheDisabled_, uFieldFlagsStatic, ::g::Uno::Long_typeof(), (uintptr_t)&HttpMessageCache::_maxCacheSizeInBytes_, uFieldFlagsStatic); type->Reflection.SetFunctions(3, new uFunction("Init", NULL, (void*)HttpMessageCache__Init_fn, 0, true, uVoid_typeof(), 0), new uFunction("get_IsCacheEnabled", NULL, (void*)HttpMessageCache__get_IsCacheEnabled_fn, 0, true, ::g::Uno::Bool_typeof(), 0), new uFunction("set_IsCacheEnabled", NULL, (void*)HttpMessageCache__set_IsCacheEnabled_fn, 0, true, uVoid_typeof(), 1, ::g::Uno::Bool_typeof())); } uClassType* HttpMessageCache_typeof() { static uSStrong<uClassType*> type; if (type != NULL) return type; uTypeOptions options; options.FieldCount = 3; options.DependencyCount = 2; options.TypeSize = sizeof(uClassType); type = uClassType::New("Uno.Net.Http.HttpMessageCache", options); type->fp_build_ = HttpMessageCache_build; type->fp_cctor_ = HttpMessageCache__cctor__fn; return type; } // public static void Init() :45 void HttpMessageCache__Init_fn() { HttpMessageCache::Init(); } // public static bool get_IsCacheEnabled() :11 void HttpMessageCache__get_IsCacheEnabled_fn(bool* __retval) { *__retval = HttpMessageCache::IsCacheEnabled(); } // public static void set_IsCacheEnabled(bool value) :12 void HttpMessageCache__set_IsCacheEnabled_fn(bool* value) { HttpMessageCache::IsCacheEnabled(*value); } // private static void OnApplicationStarted(Uno.Platform.ApplicationState state) :40 void HttpMessageCache__OnApplicationStarted_fn(int32_t* state) { HttpMessageCache::OnApplicationStarted(*state); } bool HttpMessageCache::_isInitialized_; bool HttpMessageCache::_isCacheDisabled_; int64_t HttpMessageCache::_maxCacheSizeInBytes_; // public static void Init() [static] :45 void HttpMessageCache::Init() { uStackFrame __("Uno.Net.Http.HttpMessageCache", "Init()"); HttpMessageCache_typeof()->Init(); if (HttpMessageCache::_isInitialized_) return; HttpMessageCache::_isInitialized_ = true; ::g::Uno::Platform::CoreApp::remove_Started(uDelegate::New(::TYPES[0/*Uno.Platform.ApplicationStateTransitionHandler*/], (void*)HttpMessageCache__OnApplicationStarted_fn)); if (!HttpMessageCache::IsCacheEnabled()) return; int64_t cacheSize = (HttpMessageCache::_maxCacheSizeInBytes_ != 0LL) ? HttpMessageCache::_maxCacheSizeInBytes_ : 20971520LL; ::g::Android::com::fuse::ExperimentalHttp::HttpRequest::InstallCache((uObject*)::g::Android::Base::JNI::GetWrappedActivityObject(), cacheSize); } // private static void OnApplicationStarted(Uno.Platform.ApplicationState state) [static] :40 void HttpMessageCache::OnApplicationStarted(int32_t state) { uStackFrame __("Uno.Net.Http.HttpMessageCache", "OnApplicationStarted(Uno.Platform.ApplicationState)"); HttpMessageCache_typeof()->Init(); HttpMessageCache::Init(); } // public static bool get_IsCacheEnabled() [static] :11 bool HttpMessageCache::IsCacheEnabled() { HttpMessageCache_typeof()->Init(); return !HttpMessageCache::_isCacheDisabled_; } // public static void set_IsCacheEnabled(bool value) [static] :12 void HttpMessageCache::IsCacheEnabled(bool value) { uStackFrame __("Uno.Net.Http.HttpMessageCache", "set_IsCacheEnabled(bool)"); HttpMessageCache_typeof()->Init(); if (HttpMessageCache::_isInitialized_) ::g::Uno::Diagnostics::Debug::Log3(::STRINGS[0/*"Uno.Net.Htt...*/], 0, ::STRINGS[1/*"C:/Users/ru...*/], 15); else HttpMessageCache::_isCacheDisabled_ = !value; } // } // C:\Users\rudy0\AppData\Local\Fusetools\Packages\Uno.Net.Http\1.8.0\HttpMessageHandler.uno // ----------------------------------------------------------------------------------------- // public sealed class HttpMessageHandler :8 // { static void HttpMessageHandler_build(uType* type) { type->SetDependencies( ::g::Uno::Net::Http::HttpMessageCache_typeof(), HttpMessageHandler__StaticData_typeof()); type->SetInterfaces( ::g::Uno::IDisposable_typeof(), offsetof(HttpMessageHandler_type, interface0)); type->SetFields(0, ::g::Uno::Collections::List_typeof()->MakeType(::g::Uno::Net::Http::HttpMessageHandlerRequest_typeof(), NULL), offsetof(HttpMessageHandler, _pendingRequests), 0, ::g::Uno::Threading::IDispatcher_typeof(), offsetof(HttpMessageHandler, _defaultDispatcher), 0); type->Reflection.SetFunctions(5, new uFunction("AbortPendingRequests", NULL, (void*)HttpMessageHandler__AbortPendingRequests_fn, 0, false, uVoid_typeof(), 0), new uFunction("CreateRequest", NULL, (void*)HttpMessageHandler__CreateRequest_fn, 0, false, ::g::Uno::Net::Http::HttpMessageHandlerRequest_typeof(), 2, ::g::Uno::String_typeof(), ::g::Uno::String_typeof()), new uFunction("CreateRequest", NULL, (void*)HttpMessageHandler__CreateRequest1_fn, 0, false, ::g::Uno::Net::Http::HttpMessageHandlerRequest_typeof(), 3, ::g::Uno::String_typeof(), ::g::Uno::String_typeof(), ::g::Uno::Threading::IDispatcher_typeof()), new uFunction("Dispose", NULL, (void*)HttpMessageHandler__Dispose_fn, 0, false, uVoid_typeof(), 0), new uFunction(".ctor", NULL, (void*)HttpMessageHandler__New1_fn, 0, true, type, 0)); } HttpMessageHandler_type* HttpMessageHandler_typeof() { static uSStrong<HttpMessageHandler_type*> type; if (type != NULL) return type; uTypeOptions options; options.FieldCount = 2; options.InterfaceCount = 1; options.DependencyCount = 2; options.ObjectSize = sizeof(HttpMessageHandler); options.TypeSize = sizeof(HttpMessageHandler_type); type = (HttpMessageHandler_type*)uClassType::New("Uno.Net.Http.HttpMessageHandler", options); type->fp_build_ = HttpMessageHandler_build; type->fp_ctor_ = (void*)HttpMessageHandler__New1_fn; type->interface0.fp_Dispose = (void(*)(uObject*))HttpMessageHandler__Dispose_fn; return type; } // public HttpMessageHandler() :51 void HttpMessageHandler__ctor__fn(HttpMessageHandler* __this) { __this->ctor_(); } // public void AbortPendingRequests() :71 void HttpMessageHandler__AbortPendingRequests_fn(HttpMessageHandler* __this) { __this->AbortPendingRequests(); } // internal void CompleteRequest(Uno.Net.Http.HttpMessageHandlerRequest request) :102 void HttpMessageHandler__CompleteRequest_fn(HttpMessageHandler* __this, ::g::Uno::Net::Http::HttpMessageHandlerRequest* request) { __this->CompleteRequest(request); } // public Uno.Net.Http.HttpMessageHandlerRequest CreateRequest(string method, string url) :78 void HttpMessageHandler__CreateRequest_fn(HttpMessageHandler* __this, uString* method, uString* url, ::g::Uno::Net::Http::HttpMessageHandlerRequest** __retval) { *__retval = __this->CreateRequest(method, url); } // public Uno.Net.Http.HttpMessageHandlerRequest CreateRequest(string method, string url, Uno.Threading.IDispatcher dispatcher) :83 void HttpMessageHandler__CreateRequest1_fn(HttpMessageHandler* __this, uString* method, uString* url, uObject* dispatcher, ::g::Uno::Net::Http::HttpMessageHandlerRequest** __retval) { *__retval = __this->CreateRequest1(method, url, dispatcher); } // public void Dispose() :62 void HttpMessageHandler__Dispose_fn(HttpMessageHandler* __this) { __this->Dispose(); } // public HttpMessageHandler New() :51 void HttpMessageHandler__New1_fn(HttpMessageHandler** __retval) { *__retval = HttpMessageHandler::New1(); } // public HttpMessageHandler() [instance] :51 void HttpMessageHandler::ctor_() { uStackFrame __("Uno.Net.Http.HttpMessageHandler", ".ctor()"); ::g::Uno::Net::Http::HttpMessageCache::Init(); _pendingRequests = ((::g::Uno::Collections::List*)::g::Uno::Collections::List::New1(::g::Uno::Collections::List_typeof()->MakeType(::g::Uno::Net::Http::HttpMessageHandlerRequest_typeof(), NULL))); _defaultDispatcher = (uObject*)::g::Uno::Net::Http::HttpDefaultDispatcher::New1(); } // public void AbortPendingRequests() [instance] :71 void HttpMessageHandler::AbortPendingRequests() { uStackFrame __("Uno.Net.Http.HttpMessageHandler", "AbortPendingRequests()"); ::g::Uno::Collections::List__Enumerator<uStrong< ::g::Uno::Net::Http::HttpMessageHandlerRequest*> > ret4; ::g::Uno::Collections::List__Enumerator<uStrong< ::g::Uno::Net::Http::HttpMessageHandlerRequest*> > enum2 = (::g::Uno::Collections::List__GetEnumerator_fn(uPtr(_pendingRequests), &ret4), ret4); { try { { while (enum2.MoveNext(::g::Uno::Collections::List__Enumerator_typeof()->MakeType(::g::Uno::Net::Http::HttpMessageHandlerRequest_typeof(), NULL))) { ::g::Uno::Net::Http::HttpMessageHandlerRequest* request = enum2.Current(::g::Uno::Collections::List__Enumerator_typeof()->MakeType(::g::Uno::Net::Http::HttpMessageHandlerRequest_typeof(), NULL)); if (request != NULL) uPtr(request)->Abort(); } } } catch (const uThrowable& __t) { { enum2.Dispose(::g::Uno::Collections::List__Enumerator_typeof()->MakeType(::g::Uno::Net::Http::HttpMessageHandlerRequest_typeof(), NULL)); } throw __t; goto __after_finally_0; } { enum2.Dispose(::g::Uno::Collections::List__Enumerator_typeof()->MakeType(::g::Uno::Net::Http::HttpMessageHandlerRequest_typeof(), NULL)); } __after_finally_0:; } } // internal void CompleteRequest(Uno.Net.Http.HttpMessageHandlerRequest request) [instance] :102 void HttpMessageHandler::CompleteRequest(::g::Uno::Net::Http::HttpMessageHandlerRequest* request) { uStackFrame __("Uno.Net.Http.HttpMessageHandler", "CompleteRequest(Uno.Net.Http.HttpMessageHandlerRequest)"); ::g::Uno::Net::Http::HttpMessageHandlerRequest* ret5; for (int32_t i = 0; i < uPtr(_pendingRequests)->Count(); ++i) if ((::g::Uno::Collections::List__get_Item_fn(uPtr(_pendingRequests), uCRef<int32_t>(i), &ret5), ret5) == request) { ::g::Uno::Collections::List__set_Item_fn(uPtr(_pendingRequests), uCRef<int32_t>(i), NULL); HttpMessageHandler__StaticData::DecrementPendingRequests(); break; } } // public Uno.Net.Http.HttpMessageHandlerRequest CreateRequest(string method, string url) [instance] :78 ::g::Uno::Net::Http::HttpMessageHandlerRequest* HttpMessageHandler::CreateRequest(uString* method, uString* url) { uStackFrame __("Uno.Net.Http.HttpMessageHandler", "CreateRequest(string,string)"); return CreateRequest1(method, url, _defaultDispatcher); } // public Uno.Net.Http.HttpMessageHandlerRequest CreateRequest(string method, string url, Uno.Threading.IDispatcher dispatcher) [instance] :83 ::g::Uno::Net::Http::HttpMessageHandlerRequest* HttpMessageHandler::CreateRequest1(uString* method, uString* url, uObject* dispatcher) { uStackFrame __("Uno.Net.Http.HttpMessageHandler", "CreateRequest(string,string,Uno.Threading.IDispatcher)"); ::g::Uno::Net::Http::HttpMessageHandlerRequest* ret6; HttpMessageHandler__StaticData::IncrementPendingRequests(); ::g::Uno::Net::Http::HttpMessageHandlerRequest* request = ::g::Uno::Net::Http::HttpMessageHandlerRequest::New1(this, method, url, dispatcher); for (int32_t i = 0; i < uPtr(_pendingRequests)->Count(); ++i) if ((::g::Uno::Collections::List__get_Item_fn(uPtr(_pendingRequests), uCRef<int32_t>(i), &ret6), ret6) == NULL) { ::g::Uno::Collections::List__set_Item_fn(uPtr(_pendingRequests), uCRef<int32_t>(i), request); return request; } ::g::Uno::Collections::List__Add_fn(uPtr(_pendingRequests), request); return request; } // public void Dispose() [instance] :62 void HttpMessageHandler::Dispose() { uStackFrame __("Uno.Net.Http.HttpMessageHandler", "Dispose()"); ::g::Uno::Collections::List__Enumerator<uStrong< ::g::Uno::Net::Http::HttpMessageHandlerRequest*> > ret7; ::g::Uno::Collections::List__Enumerator<uStrong< ::g::Uno::Net::Http::HttpMessageHandlerRequest*> > enum1 = (::g::Uno::Collections::List__GetEnumerator_fn(uPtr(_pendingRequests), &ret7), ret7); { try { { while (enum1.MoveNext(::g::Uno::Collections::List__Enumerator_typeof()->MakeType(::g::Uno::Net::Http::HttpMessageHandlerRequest_typeof(), NULL))) { ::g::Uno::Net::Http::HttpMessageHandlerRequest* request = enum1.Current(::g::Uno::Collections::List__Enumerator_typeof()->MakeType(::g::Uno::Net::Http::HttpMessageHandlerRequest_typeof(), NULL)); if (request != NULL) uPtr(request)->Dispose(); } } } catch (const uThrowable& __t) { { enum1.Dispose(::g::Uno::Collections::List__Enumerator_typeof()->MakeType(::g::Uno::Net::Http::HttpMessageHandlerRequest_typeof(), NULL)); } throw __t; goto __after_finally_1; } { enum1.Dispose(::g::Uno::Collections::List__Enumerator_typeof()->MakeType(::g::Uno::Net::Http::HttpMessageHandlerRequest_typeof(), NULL)); } __after_finally_1:; } _pendingRequests = NULL; } // public HttpMessageHandler New() [static] :51 HttpMessageHandler* HttpMessageHandler::New1() { HttpMessageHandler* obj3 = (HttpMessageHandler*)uNew(HttpMessageHandler_typeof()); obj3->ctor_(); return obj3; } // } // C:\Users\rudy0\AppData\Local\Fusetools\Packages\Uno.Net.Http\1.8.0\HttpMessageHandlerRequest.uno // ------------------------------------------------------------------------------------------------ // public sealed class HttpMessageHandlerRequest :8 // { // ~HttpMessageHandlerRequest() :65 static void HttpMessageHandlerRequest__Finalize_fn(HttpMessageHandlerRequest* __this) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "Finalize()"); if (__this->_httpRequest == NULL) return; __this->Dispose(); } static void HttpMessageHandlerRequest_build(uType* type) { type->SetInterfaces( ::g::Uno::IDisposable_typeof(), offsetof(HttpMessageHandlerRequest_type, interface0)); type->SetFields(0, ::g::Uno::Net::Http::HttpMessageHandler_typeof(), offsetof(HttpMessageHandlerRequest, _httpMessageHandler), 0, ::g::Uno::Net::Http::Implementation::IHttpRequest_typeof(), offsetof(HttpMessageHandlerRequest, _httpRequest), 0, ::g::Uno::Threading::IDispatcher_typeof(), offsetof(HttpMessageHandlerRequest, _dispatcher), 0, ::g::Uno::String_typeof(), offsetof(HttpMessageHandlerRequest, _method), 0, ::g::Uno::String_typeof(), offsetof(HttpMessageHandlerRequest, _url), 0, ::g::Uno::Net::Http::HttpRequestState_typeof(), offsetof(HttpMessageHandlerRequest, _state), 0, ::g::Uno::Net::Http::HttpResponseType_typeof(), offsetof(HttpMessageHandlerRequest, _responseType), 0, ::g::Uno::Byte_typeof()->Array(), offsetof(HttpMessageHandlerRequest, _optionalPayloadCache), 0, ::g::Uno::Action1_typeof()->MakeType(type, NULL), offsetof(HttpMessageHandlerRequest, Aborted1), 0, ::g::Uno::Action1_typeof()->MakeType(type, NULL), offsetof(HttpMessageHandlerRequest, Done1), 0, ::g::Uno::Action2_typeof()->MakeType(type, ::g::Uno::String_typeof(), NULL), offsetof(HttpMessageHandlerRequest, Error1), 0, ::g::Uno::Action4_typeof()->MakeType(type, ::g::Uno::Int_typeof(), ::g::Uno::Int_typeof(), ::g::Uno::Bool_typeof(), NULL), offsetof(HttpMessageHandlerRequest, Progress1), 0, ::g::Uno::Action1_typeof()->MakeType(type, NULL), offsetof(HttpMessageHandlerRequest, StateChanged1), 0, ::g::Uno::Action1_typeof()->MakeType(type, NULL), offsetof(HttpMessageHandlerRequest, Timeout1), 0); type->Reflection.SetFunctions(30, new uFunction("Abort", NULL, (void*)HttpMessageHandlerRequest__Abort_fn, 0, false, uVoid_typeof(), 0), new uFunction("add_Aborted", NULL, (void*)HttpMessageHandlerRequest__add_Aborted_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::Action1_typeof()->MakeType(type, NULL)), new uFunction("remove_Aborted", NULL, (void*)HttpMessageHandlerRequest__remove_Aborted_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::Action1_typeof()->MakeType(type, NULL)), new uFunction("Dispose", NULL, (void*)HttpMessageHandlerRequest__Dispose_fn, 0, false, uVoid_typeof(), 0), new uFunction("add_Done", NULL, (void*)HttpMessageHandlerRequest__add_Done_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::Action1_typeof()->MakeType(type, NULL)), new uFunction("remove_Done", NULL, (void*)HttpMessageHandlerRequest__remove_Done_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::Action1_typeof()->MakeType(type, NULL)), new uFunction("EnableCache", NULL, (void*)HttpMessageHandlerRequest__EnableCache_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::Bool_typeof()), new uFunction("add_Error", NULL, (void*)HttpMessageHandlerRequest__add_Error_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::Action2_typeof()->MakeType(type, ::g::Uno::String_typeof(), NULL)), new uFunction("remove_Error", NULL, (void*)HttpMessageHandlerRequest__remove_Error_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::Action2_typeof()->MakeType(type, ::g::Uno::String_typeof(), NULL)), new uFunction("GetResponseContentByteArray", NULL, (void*)HttpMessageHandlerRequest__GetResponseContentByteArray_fn, 0, false, ::g::Uno::Byte_typeof()->Array(), 0), new uFunction("GetResponseContentString", NULL, (void*)HttpMessageHandlerRequest__GetResponseContentString_fn, 0, false, ::g::Uno::String_typeof(), 0), new uFunction("GetResponseHeader", NULL, (void*)HttpMessageHandlerRequest__GetResponseHeader_fn, 0, false, ::g::Uno::String_typeof(), 1, ::g::Uno::String_typeof()), new uFunction("GetResponseHeaders", NULL, (void*)HttpMessageHandlerRequest__GetResponseHeaders_fn, 0, false, ::g::Uno::String_typeof(), 0), new uFunction("GetResponseStatus", NULL, (void*)HttpMessageHandlerRequest__GetResponseStatus_fn, 0, false, ::g::Uno::Int_typeof(), 0), new uFunction("get_HttpResponseType", NULL, (void*)HttpMessageHandlerRequest__get_HttpResponseType_fn, 0, false, ::g::Uno::Net::Http::HttpResponseType_typeof(), 0), new uFunction("set_HttpResponseType", NULL, (void*)HttpMessageHandlerRequest__set_HttpResponseType_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::Net::Http::HttpResponseType_typeof()), new uFunction("get_Method", NULL, (void*)HttpMessageHandlerRequest__get_Method_fn, 0, false, ::g::Uno::String_typeof(), 0), new uFunction("add_Progress", NULL, (void*)HttpMessageHandlerRequest__add_Progress_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::Action4_typeof()->MakeType(type, ::g::Uno::Int_typeof(), ::g::Uno::Int_typeof(), ::g::Uno::Bool_typeof(), NULL)), new uFunction("remove_Progress", NULL, (void*)HttpMessageHandlerRequest__remove_Progress_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::Action4_typeof()->MakeType(type, ::g::Uno::Int_typeof(), ::g::Uno::Int_typeof(), ::g::Uno::Bool_typeof(), NULL)), new uFunction("SendAsync", NULL, (void*)HttpMessageHandlerRequest__SendAsync_fn, 0, false, uVoid_typeof(), 0), new uFunction("SendAsync", NULL, (void*)HttpMessageHandlerRequest__SendAsync1_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::Byte_typeof()->Array()), new uFunction("SendAsync", NULL, (void*)HttpMessageHandlerRequest__SendAsync2_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::String_typeof()), new uFunction("SetHeader", NULL, (void*)HttpMessageHandlerRequest__SetHeader_fn, 0, false, uVoid_typeof(), 2, ::g::Uno::String_typeof(), ::g::Uno::String_typeof()), new uFunction("SetResponseType", NULL, (void*)HttpMessageHandlerRequest__SetResponseType_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::Net::Http::HttpResponseType_typeof()), new uFunction("SetTimeout", NULL, (void*)HttpMessageHandlerRequest__SetTimeout_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::Int_typeof()), new uFunction("get_State", NULL, (void*)HttpMessageHandlerRequest__get_State_fn, 0, false, ::g::Uno::Net::Http::HttpRequestState_typeof(), 0), new uFunction("add_StateChanged", NULL, (void*)HttpMessageHandlerRequest__add_StateChanged_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::Action1_typeof()->MakeType(type, NULL)), new uFunction("remove_StateChanged", NULL, (void*)HttpMessageHandlerRequest__remove_StateChanged_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::Action1_typeof()->MakeType(type, NULL)), new uFunction("add_Timeout", NULL, (void*)HttpMessageHandlerRequest__add_Timeout_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::Action1_typeof()->MakeType(type, NULL)), new uFunction("remove_Timeout", NULL, (void*)HttpMessageHandlerRequest__remove_Timeout_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::Action1_typeof()->MakeType(type, NULL))); } HttpMessageHandlerRequest_type* HttpMessageHandlerRequest_typeof() { static uSStrong<HttpMessageHandlerRequest_type*> type; if (type != NULL) return type; uTypeOptions options; options.FieldCount = 14; options.InterfaceCount = 1; options.ObjectSize = sizeof(HttpMessageHandlerRequest); options.TypeSize = sizeof(HttpMessageHandlerRequest_type); type = (HttpMessageHandlerRequest_type*)uClassType::New("Uno.Net.Http.HttpMessageHandlerRequest", options); type->fp_build_ = HttpMessageHandlerRequest_build; type->fp_Finalize = (void(*)(uObject*))HttpMessageHandlerRequest__Finalize_fn; type->interface0.fp_Dispose = (void(*)(uObject*))HttpMessageHandlerRequest__Dispose_fn; return type; } // internal HttpMessageHandlerRequest(Uno.Net.Http.HttpMessageHandler handler, string method, string url, Uno.Threading.IDispatcher dispatcher) :22 void HttpMessageHandlerRequest__ctor__fn(HttpMessageHandlerRequest* __this, ::g::Uno::Net::Http::HttpMessageHandler* handler, uString* method, uString* url, uObject* dispatcher) { __this->ctor_(handler, method, url, dispatcher); } // public void Abort() :373 void HttpMessageHandlerRequest__Abort_fn(HttpMessageHandlerRequest* __this) { __this->Abort(); } // public generated void add_Aborted(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest> value) :131 void HttpMessageHandlerRequest__add_Aborted_fn(HttpMessageHandlerRequest* __this, uDelegate* value) { __this->add_Aborted(value); } // public generated void remove_Aborted(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest> value) :131 void HttpMessageHandlerRequest__remove_Aborted_fn(HttpMessageHandlerRequest* __this, uDelegate* value) { __this->remove_Aborted(value); } // private void CheckDisposed() :73 void HttpMessageHandlerRequest__CheckDisposed_fn(HttpMessageHandlerRequest* __this) { __this->CheckDisposed(); } // internal void CompleteRequest() :90 void HttpMessageHandlerRequest__CompleteRequest_fn(HttpMessageHandlerRequest* __this) { __this->CompleteRequest(); } // public void Dispose() :79 void HttpMessageHandlerRequest__Dispose_fn(HttpMessageHandlerRequest* __this) { __this->Dispose(); } // public generated void add_Done(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest> value) :134 void HttpMessageHandlerRequest__add_Done_fn(HttpMessageHandlerRequest* __this, uDelegate* value) { __this->add_Done(value); } // public generated void remove_Done(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest> value) :134 void HttpMessageHandlerRequest__remove_Done_fn(HttpMessageHandlerRequest* __this, uDelegate* value) { __this->remove_Done(value); } // public void EnableCache(bool enableCache) :264 void HttpMessageHandlerRequest__EnableCache_fn(HttpMessageHandlerRequest* __this, bool* enableCache) { __this->EnableCache(*enableCache); } // public generated void add_Error(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest, string> value) :132 void HttpMessageHandlerRequest__add_Error_fn(HttpMessageHandlerRequest* __this, uDelegate* value) { __this->add_Error(value); } // public generated void remove_Error(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest, string> value) :132 void HttpMessageHandlerRequest__remove_Error_fn(HttpMessageHandlerRequest* __this, uDelegate* value) { __this->remove_Error(value); } // private void FireSetHeadersReceived() :252 void HttpMessageHandlerRequest__FireSetHeadersReceived_fn(HttpMessageHandlerRequest* __this) { __this->FireSetHeadersReceived(); } // public byte[] GetResponseContentByteArray() :435 void HttpMessageHandlerRequest__GetResponseContentByteArray_fn(HttpMessageHandlerRequest* __this, uArray** __retval) { *__retval = __this->GetResponseContentByteArray(); } // public string GetResponseContentString() :421 void HttpMessageHandlerRequest__GetResponseContentString_fn(HttpMessageHandlerRequest* __this, uString** __retval) { *__retval = __this->GetResponseContentString(); } // public string GetResponseHeader(string name) :398 void HttpMessageHandlerRequest__GetResponseHeader_fn(HttpMessageHandlerRequest* __this, uString* name, uString** __retval) { *__retval = __this->GetResponseHeader(name); } // public string GetResponseHeaders() :409 void HttpMessageHandlerRequest__GetResponseHeaders_fn(HttpMessageHandlerRequest* __this, uString** __retval) { *__retval = __this->GetResponseHeaders(); } // public int GetResponseStatus() :387 void HttpMessageHandlerRequest__GetResponseStatus_fn(HttpMessageHandlerRequest* __this, int32_t* __retval) { *__retval = __this->GetResponseStatus(); } // public Uno.Net.Http.HttpResponseType get_HttpResponseType() :101 void HttpMessageHandlerRequest__get_HttpResponseType_fn(HttpMessageHandlerRequest* __this, int32_t* __retval) { *__retval = __this->HttpResponseType(); } // public void set_HttpResponseType(Uno.Net.Http.HttpResponseType value) :102 void HttpMessageHandlerRequest__set_HttpResponseType_fn(HttpMessageHandlerRequest* __this, int32_t* value) { __this->HttpResponseType(*value); } // private bool IsComplete() :215 void HttpMessageHandlerRequest__IsComplete_fn(HttpMessageHandlerRequest* __this, bool* __retval) { *__retval = __this->IsComplete(); } // private static bool IsHeaderValid(string name, string value) :450 void HttpMessageHandlerRequest__IsHeaderValid_fn(uString* name, uString* value, bool* __retval) { *__retval = HttpMessageHandlerRequest::IsHeaderValid(name, value); } // public string get_Method() :96 void HttpMessageHandlerRequest__get_Method_fn(HttpMessageHandlerRequest* __this, uString** __retval) { *__retval = __this->Method(); } // internal HttpMessageHandlerRequest New(Uno.Net.Http.HttpMessageHandler handler, string method, string url, Uno.Threading.IDispatcher dispatcher) :22 void HttpMessageHandlerRequest__New1_fn(::g::Uno::Net::Http::HttpMessageHandler* handler, uString* method, uString* url, uObject* dispatcher, HttpMessageHandlerRequest** __retval) { *__retval = HttpMessageHandlerRequest::New1(handler, method, url, dispatcher); } // internal void OnAborted() :220 void HttpMessageHandlerRequest__OnAborted_fn(HttpMessageHandlerRequest* __this) { __this->OnAborted(); } // internal void OnDone() :241 void HttpMessageHandlerRequest__OnDone_fn(HttpMessageHandlerRequest* __this) { __this->OnDone(); } // internal void OnError(string platformspesificErrorMessage) :227 void HttpMessageHandlerRequest__OnError_fn(HttpMessageHandlerRequest* __this, uString* platformspesificErrorMessage) { __this->OnError(platformspesificErrorMessage); } // internal void OnHeadersReceived() :248 void HttpMessageHandlerRequest__OnHeadersReceived_fn(HttpMessageHandlerRequest* __this) { __this->OnHeadersReceived(); } // internal void OnProgress(int current, int total, bool hasTotal) :257 void HttpMessageHandlerRequest__OnProgress_fn(HttpMessageHandlerRequest* __this, int32_t* current, int32_t* total, bool* hasTotal) { __this->OnProgress(*current, *total, *hasTotal); } // internal void OnStateChanged() :118 void HttpMessageHandlerRequest__OnStateChanged_fn(HttpMessageHandlerRequest* __this) { __this->OnStateChanged(); } // internal void OnTimeout() :234 void HttpMessageHandlerRequest__OnTimeout_fn(HttpMessageHandlerRequest* __this) { __this->OnTimeout(); } // public generated void add_Progress(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest, int, int, bool> value) :136 void HttpMessageHandlerRequest__add_Progress_fn(HttpMessageHandlerRequest* __this, uDelegate* value) { __this->add_Progress(value); } // public generated void remove_Progress(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest, int, int, bool> value) :136 void HttpMessageHandlerRequest__remove_Progress_fn(HttpMessageHandlerRequest* __this, uDelegate* value) { __this->remove_Progress(value); } // public void SendAsync() :360 void HttpMessageHandlerRequest__SendAsync_fn(HttpMessageHandlerRequest* __this) { __this->SendAsync(); } // public void SendAsync(byte[] data) :314 void HttpMessageHandlerRequest__SendAsync1_fn(HttpMessageHandlerRequest* __this, uArray* data) { __this->SendAsync1(data); } // public void SendAsync(string data) :342 void HttpMessageHandlerRequest__SendAsync2_fn(HttpMessageHandlerRequest* __this, uString* data) { __this->SendAsync2(data); } // public void SetHeader(string name, string value) :276 void HttpMessageHandlerRequest__SetHeader_fn(HttpMessageHandlerRequest* __this, uString* name, uString* value) { __this->SetHeader(name, value); } // public void SetResponseType(Uno.Net.Http.HttpResponseType responseType) :299 void HttpMessageHandlerRequest__SetResponseType_fn(HttpMessageHandlerRequest* __this, int32_t* responseType) { __this->SetResponseType(*responseType); } // public void SetTimeout(int timeoutInMilliseconds) :289 void HttpMessageHandlerRequest__SetTimeout_fn(HttpMessageHandlerRequest* __this, int32_t* timeoutInMilliseconds) { __this->SetTimeout(*timeoutInMilliseconds); } // public Uno.Net.Http.HttpRequestState get_State() :107 void HttpMessageHandlerRequest__get_State_fn(HttpMessageHandlerRequest* __this, int32_t* __retval) { *__retval = __this->State(); } // private void set_State(Uno.Net.Http.HttpRequestState value) :108 void HttpMessageHandlerRequest__set_State_fn(HttpMessageHandlerRequest* __this, int32_t* value) { __this->State(*value); } // public generated void add_StateChanged(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest> value) :135 void HttpMessageHandlerRequest__add_StateChanged_fn(HttpMessageHandlerRequest* __this, uDelegate* value) { __this->add_StateChanged(value); } // public generated void remove_StateChanged(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest> value) :135 void HttpMessageHandlerRequest__remove_StateChanged_fn(HttpMessageHandlerRequest* __this, uDelegate* value) { __this->remove_StateChanged(value); } // public generated void add_Timeout(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest> value) :133 void HttpMessageHandlerRequest__add_Timeout_fn(HttpMessageHandlerRequest* __this, uDelegate* value) { __this->add_Timeout(value); } // public generated void remove_Timeout(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest> value) :133 void HttpMessageHandlerRequest__remove_Timeout_fn(HttpMessageHandlerRequest* __this, uDelegate* value) { __this->remove_Timeout(value); } // internal HttpMessageHandlerRequest(Uno.Net.Http.HttpMessageHandler handler, string method, string url, Uno.Threading.IDispatcher dispatcher) [instance] :22 void HttpMessageHandlerRequest::ctor_(::g::Uno::Net::Http::HttpMessageHandler* handler, uString* method, uString* url, uObject* dispatcher) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", ".ctor(Uno.Net.Http.HttpMessageHandler,string,string,Uno.Threading.IDispatcher)"); if (handler == NULL) U_THROW(::g::Uno::ArgumentNullException::New6(uString::Const("handler"))); if (::g::Uno::String::op_Equality(method, NULL)) U_THROW(::g::Uno::ArgumentNullException::New6(uString::Const("method"))); if (::g::Uno::String::op_Equality(url, NULL)) U_THROW(::g::Uno::ArgumentNullException::New6(uString::Const("url"))); if (dispatcher == NULL) U_THROW(::g::Uno::ArgumentNullException::New6(uString::Const("dispatcher"))); method = ::g::Uno::String::ToUpper(uPtr(method)); _httpRequest = (uObject*)::g::Uno::Net::Http::Implementation::AndroidHttpRequest::New3(this, method, url); _httpMessageHandler = handler; _method = method; _url = url; _dispatcher = dispatcher; State(1); } // public void Abort() [instance] :373 void HttpMessageHandlerRequest::Abort() { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "Abort()"); CheckDisposed(); if (State() >= 5) return; ::g::Uno::Net::Http::Implementation::IHttpRequest::Abort(uInterface(uPtr(_httpRequest), ::g::Uno::Net::Http::Implementation::IHttpRequest_typeof())); OnAborted(); } // public generated void add_Aborted(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest> value) [instance] :131 void HttpMessageHandlerRequest::add_Aborted(uDelegate* value) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "add_Aborted(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest>)"); Aborted1 = uCast<uDelegate*>(::g::Uno::Delegate::Combine(Aborted1, value), ::g::Uno::Action1_typeof()->MakeType(__type, NULL)); } // public generated void remove_Aborted(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest> value) [instance] :131 void HttpMessageHandlerRequest::remove_Aborted(uDelegate* value) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "remove_Aborted(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest>)"); Aborted1 = uCast<uDelegate*>(::g::Uno::Delegate::Remove(Aborted1, value), ::g::Uno::Action1_typeof()->MakeType(__type, NULL)); } // private void CheckDisposed() [instance] :73 void HttpMessageHandlerRequest::CheckDisposed() { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "CheckDisposed()"); if (_httpRequest == NULL) U_THROW(::g::Uno::ObjectDisposedException::New4(uString::Const("HttpMessageHandlerRequest"))); } // internal void CompleteRequest() [instance] :90 void HttpMessageHandlerRequest::CompleteRequest() { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "CompleteRequest()"); uPtr(_httpMessageHandler)->CompleteRequest(this); _httpMessageHandler = NULL; } // public void Dispose() [instance] :79 void HttpMessageHandlerRequest::Dispose() { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "Dispose()"); ::g::Uno::IDisposable::Dispose(uInterface(uPtr(_httpRequest), ::g::Uno::IDisposable_typeof())); _httpRequest = NULL; _optionalPayloadCache = NULL; ::g::Uno::GC::SuppressFinalize(this); } // public generated void add_Done(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest> value) [instance] :134 void HttpMessageHandlerRequest::add_Done(uDelegate* value) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "add_Done(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest>)"); Done1 = uCast<uDelegate*>(::g::Uno::Delegate::Combine(Done1, value), ::g::Uno::Action1_typeof()->MakeType(__type, NULL)); } // public generated void remove_Done(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest> value) [instance] :134 void HttpMessageHandlerRequest::remove_Done(uDelegate* value) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "remove_Done(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest>)"); Done1 = uCast<uDelegate*>(::g::Uno::Delegate::Remove(Done1, value), ::g::Uno::Action1_typeof()->MakeType(__type, NULL)); } // public void EnableCache(bool enableCache) [instance] :264 void HttpMessageHandlerRequest::EnableCache(bool enableCache) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "EnableCache(bool)"); CheckDisposed(); if (State() != 1) U_THROW(::g::Uno::Net::Http::InvalidStateException::New4()); ::g::Uno::Net::Http::Implementation::IHttpRequest::EnableCache(uInterface(uPtr(_httpRequest), ::g::Uno::Net::Http::Implementation::IHttpRequest_typeof()), enableCache); } // public generated void add_Error(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest, string> value) [instance] :132 void HttpMessageHandlerRequest::add_Error(uDelegate* value) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "add_Error(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest, string>)"); Error1 = uCast<uDelegate*>(::g::Uno::Delegate::Combine(Error1, value), ::g::Uno::Action2_typeof()->MakeType(__type, ::g::Uno::String_typeof(), NULL)); } // public generated void remove_Error(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest, string> value) [instance] :132 void HttpMessageHandlerRequest::remove_Error(uDelegate* value) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "remove_Error(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest, string>)"); Error1 = uCast<uDelegate*>(::g::Uno::Delegate::Remove(Error1, value), ::g::Uno::Action2_typeof()->MakeType(__type, ::g::Uno::String_typeof(), NULL)); } // private void FireSetHeadersReceived() [instance] :252 void HttpMessageHandlerRequest::FireSetHeadersReceived() { State(3); } // public byte[] GetResponseContentByteArray() [instance] :435 uArray* HttpMessageHandlerRequest::GetResponseContentByteArray() { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "GetResponseContentByteArray()"); uArray* ind2; CheckDisposed(); if (HttpResponseType() != 1) U_THROW(::g::Uno::Net::Http::InvalidResponseTypeException::New4()); if ((State() < 4) || (State() > 5)) return uArray::New(::g::Uno::Byte_typeof()->Array(), 0); ind2 = ::g::Uno::Net::Http::Implementation::IHttpRequest::GetResponseContentByteArray(uInterface(uPtr(_httpRequest), ::g::Uno::Net::Http::Implementation::IHttpRequest_typeof())); return (ind2 != NULL) ? ind2 : uArray::New(::g::Uno::Byte_typeof()->Array(), 0); } // public string GetResponseContentString() [instance] :421 uString* HttpMessageHandlerRequest::GetResponseContentString() { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "GetResponseContentString()"); uString* ind1; CheckDisposed(); if (HttpResponseType() != 0) U_THROW(::g::Uno::Net::Http::InvalidResponseTypeException::New4()); if ((State() < 4) || (State() > 5)) return uString::Const(""); ind1 = ::g::Uno::Net::Http::Implementation::IHttpRequest::GetResponseContentString(uInterface(uPtr(_httpRequest), ::g::Uno::Net::Http::Implementation::IHttpRequest_typeof())); return (ind1 != NULL) ? ind1 : uString::Const(""); } // public string GetResponseHeader(string name) [instance] :398 uString* HttpMessageHandlerRequest::GetResponseHeader(uString* name) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "GetResponseHeader(string)"); CheckDisposed(); if ((State() < 3) || (State() > 5)) return uString::Const(""); return ::g::Uno::Net::Http::Implementation::IHttpRequest::GetResponseHeader(uInterface(uPtr(_httpRequest), ::g::Uno::Net::Http::Implementation::IHttpRequest_typeof()), name); } // public string GetResponseHeaders() [instance] :409 uString* HttpMessageHandlerRequest::GetResponseHeaders() { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "GetResponseHeaders()"); CheckDisposed(); if ((State() < 3) || (State() > 5)) return uString::Const(""); return ::g::Uno::Net::Http::Implementation::IHttpRequest::GetResponseHeaders(uInterface(uPtr(_httpRequest), ::g::Uno::Net::Http::Implementation::IHttpRequest_typeof())); } // public int GetResponseStatus() [instance] :387 int32_t HttpMessageHandlerRequest::GetResponseStatus() { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "GetResponseStatus()"); CheckDisposed(); if ((State() < 3) || (State() > 5)) return 0; return ::g::Uno::Net::Http::Implementation::IHttpRequest::GetResponseStatus(uInterface(uPtr(_httpRequest), ::g::Uno::Net::Http::Implementation::IHttpRequest_typeof())); } // public Uno.Net.Http.HttpResponseType get_HttpResponseType() [instance] :101 int32_t HttpMessageHandlerRequest::HttpResponseType() { return _responseType; } // public void set_HttpResponseType(Uno.Net.Http.HttpResponseType value) [instance] :102 void HttpMessageHandlerRequest::HttpResponseType(int32_t value) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "set_HttpResponseType(Uno.Net.Http.HttpResponseType)"); SetResponseType(value); } // private bool IsComplete() [instance] :215 bool HttpMessageHandlerRequest::IsComplete() { return State() >= 5; } // public string get_Method() [instance] :96 uString* HttpMessageHandlerRequest::Method() { return _method; } // internal void OnAborted() [instance] :220 void HttpMessageHandlerRequest::OnAborted() { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "OnAborted()"); uDelegate* handler = Aborted1; if (::g::Uno::Delegate::op_Inequality(handler, NULL)) ::g::Uno::Threading::IDispatcher::Invoke(uInterface(uPtr(_dispatcher), ::g::Uno::Threading::IDispatcher_typeof()), uDelegate::New(::g::Uno::Action_typeof(), (void*)HttpMessageHandlerRequest__DispatchClosure__Run_fn, HttpMessageHandlerRequest__DispatchClosure::New1(6, handler, this))); } // internal void OnDone() [instance] :241 void HttpMessageHandlerRequest::OnDone() { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "OnDone()"); uDelegate* handler = Done1; if (::g::Uno::Delegate::op_Inequality(handler, NULL)) ::g::Uno::Threading::IDispatcher::Invoke(uInterface(uPtr(_dispatcher), ::g::Uno::Threading::IDispatcher_typeof()), uDelegate::New(::g::Uno::Action_typeof(), (void*)HttpMessageHandlerRequest__DispatchClosure__Run_fn, HttpMessageHandlerRequest__DispatchClosure::New1(5, handler, this))); } // internal void OnError(string platformspesificErrorMessage) [instance] :227 void HttpMessageHandlerRequest::OnError(uString* platformspesificErrorMessage) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "OnError(string)"); HttpMessageHandlerRequest__DispatchClosure1* ret4; uDelegate* handler = Error1; if (::g::Uno::Delegate::op_Inequality(handler, NULL)) ::g::Uno::Threading::IDispatcher::Invoke(uInterface(uPtr(_dispatcher), ::g::Uno::Threading::IDispatcher_typeof()), uDelegate::New(::g::Uno::Action_typeof(), (void*)HttpMessageHandlerRequest__DispatchClosure1__Run_fn, (HttpMessageHandlerRequest__DispatchClosure1__New1_fn(HttpMessageHandlerRequest__DispatchClosure1_typeof()->MakeType(::g::Uno::String_typeof(), NULL), uCRef<int32_t>(7), handler, this, platformspesificErrorMessage, &ret4), ret4))); } // internal void OnHeadersReceived() [instance] :248 void HttpMessageHandlerRequest::OnHeadersReceived() { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "OnHeadersReceived()"); ::g::Uno::Threading::IDispatcher::Invoke(uInterface(uPtr(_dispatcher), ::g::Uno::Threading::IDispatcher_typeof()), uDelegate::New(::g::Uno::Action_typeof(), (void*)HttpMessageHandlerRequest__FireSetHeadersReceived_fn, this)); } // internal void OnProgress(int current, int total, bool hasTotal) [instance] :257 void HttpMessageHandlerRequest::OnProgress(int32_t current, int32_t total, bool hasTotal) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "OnProgress(int,int,bool)"); uDelegate* handler = Progress1; if (::g::Uno::Delegate::op_Inequality(handler, NULL)) ::g::Uno::Threading::IDispatcher::Invoke(uInterface(uPtr(_dispatcher), ::g::Uno::Threading::IDispatcher_typeof()), uDelegate::New(::g::Uno::Action_typeof(), (void*)HttpMessageHandlerRequest__ProgressClosure__Run_fn, HttpMessageHandlerRequest__ProgressClosure::New1(4, handler, this, current, total, hasTotal))); } // internal void OnStateChanged() [instance] :118 void HttpMessageHandlerRequest::OnStateChanged() { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "OnStateChanged()"); if (State() > 5) return; uDelegate* handler = StateChanged1; if (::g::Uno::Delegate::op_Inequality(handler, NULL)) uPtr(handler)->InvokeVoid(this); } // internal void OnTimeout() [instance] :234 void HttpMessageHandlerRequest::OnTimeout() { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "OnTimeout()"); uDelegate* handler = Timeout1; if (::g::Uno::Delegate::op_Inequality(handler, NULL)) ::g::Uno::Threading::IDispatcher::Invoke(uInterface(uPtr(_dispatcher), ::g::Uno::Threading::IDispatcher_typeof()), uDelegate::New(::g::Uno::Action_typeof(), (void*)HttpMessageHandlerRequest__DispatchClosure__Run_fn, HttpMessageHandlerRequest__DispatchClosure::New1(8, handler, this))); } // public generated void add_Progress(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest, int, int, bool> value) [instance] :136 void HttpMessageHandlerRequest::add_Progress(uDelegate* value) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "add_Progress(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest, int, int, bool>)"); Progress1 = uCast<uDelegate*>(::g::Uno::Delegate::Combine(Progress1, value), ::g::Uno::Action4_typeof()->MakeType(__type, ::g::Uno::Int_typeof(), ::g::Uno::Int_typeof(), ::g::Uno::Bool_typeof(), NULL)); } // public generated void remove_Progress(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest, int, int, bool> value) [instance] :136 void HttpMessageHandlerRequest::remove_Progress(uDelegate* value) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "remove_Progress(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest, int, int, bool>)"); Progress1 = uCast<uDelegate*>(::g::Uno::Delegate::Remove(Progress1, value), ::g::Uno::Action4_typeof()->MakeType(__type, ::g::Uno::Int_typeof(), ::g::Uno::Int_typeof(), ::g::Uno::Bool_typeof(), NULL)); } // public void SendAsync() [instance] :360 void HttpMessageHandlerRequest::SendAsync() { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "SendAsync()"); CheckDisposed(); if (State() != 1) U_THROW(::g::Uno::Net::Http::InvalidStateException::New4()); _state = 2; ::g::Uno::Net::Http::Implementation::IHttpRequest::SendAsync(uInterface(uPtr(_httpRequest), ::g::Uno::Net::Http::Implementation::IHttpRequest_typeof())); OnStateChanged(); } // public void SendAsync(byte[] data) [instance] :314 void HttpMessageHandlerRequest::SendAsync1(uArray* data) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "SendAsync(byte[])"); CheckDisposed(); if (State() != 1) U_THROW(::g::Uno::Net::Http::InvalidStateException::New4()); _state = 2; if (((::g::Uno::String::op_Equality(Method(), uString::Const("GET")) || ::g::Uno::String::op_Equality(Method(), uString::Const("HEAD"))) || (data == NULL)) || (uPtr(data)->Length() == 0)) ::g::Uno::Net::Http::Implementation::IHttpRequest::SendAsync(uInterface(uPtr(_httpRequest), ::g::Uno::Net::Http::Implementation::IHttpRequest_typeof())); else { _optionalPayloadCache = data; ::g::Uno::Net::Http::Implementation::IHttpRequest::SendAsync1(uInterface(uPtr(_httpRequest), ::g::Uno::Net::Http::Implementation::IHttpRequest_typeof()), data); } OnStateChanged(); } // public void SendAsync(string data) [instance] :342 void HttpMessageHandlerRequest::SendAsync2(uString* data) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "SendAsync(string)"); CheckDisposed(); if (State() != 1) U_THROW(::g::Uno::Net::Http::InvalidStateException::New4()); _state = 2; if (((::g::Uno::String::op_Equality(Method(), uString::Const("GET")) || ::g::Uno::String::op_Equality(Method(), uString::Const("HEAD"))) || ::g::Uno::String::op_Equality(data, NULL)) || ::g::Uno::String::op_Equality(data, uString::Const(""))) ::g::Uno::Net::Http::Implementation::IHttpRequest::SendAsync(uInterface(uPtr(_httpRequest), ::g::Uno::Net::Http::Implementation::IHttpRequest_typeof())); else ::g::Uno::Net::Http::Implementation::IHttpRequest::SendAsync2(uInterface(uPtr(_httpRequest), ::g::Uno::Net::Http::Implementation::IHttpRequest_typeof()), data); OnStateChanged(); } // public void SetHeader(string name, string value) [instance] :276 void HttpMessageHandlerRequest::SetHeader(uString* name, uString* value) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "SetHeader(string,string)"); CheckDisposed(); if (State() != 1) U_THROW(::g::Uno::Net::Http::InvalidStateException::New4()); if (!HttpMessageHandlerRequest::IsHeaderValid(name, value)) U_THROW(::g::Uno::Exception::New2(::g::Uno::String::op_Addition2(::g::Uno::String::op_Addition2(uString::Const("Not allowed to set header \""), name), uString::Const("\" on this target.")))); ::g::Uno::Net::Http::Implementation::IHttpRequest::SetHeader(uInterface(uPtr(_httpRequest), ::g::Uno::Net::Http::Implementation::IHttpRequest_typeof()), name, value); } // public void SetResponseType(Uno.Net.Http.HttpResponseType responseType) [instance] :299 void HttpMessageHandlerRequest::SetResponseType(int32_t responseType) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "SetResponseType(Uno.Net.Http.HttpResponseType)"); CheckDisposed(); if (State() >= 4) U_THROW(::g::Uno::Net::Http::InvalidStateException::New4()); _responseType = responseType; uPtr(uAs< ::g::Uno::Net::Http::Implementation::AndroidHttpRequest*>(_httpRequest, ::g::Uno::Net::Http::Implementation::AndroidHttpRequest_typeof()))->SetResponseType1(responseType); } // public void SetTimeout(int timeoutInMilliseconds) [instance] :289 void HttpMessageHandlerRequest::SetTimeout(int32_t timeoutInMilliseconds) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "SetTimeout(int)"); CheckDisposed(); if (State() != 1) U_THROW(::g::Uno::Net::Http::InvalidStateException::New4()); ::g::Uno::Net::Http::Implementation::IHttpRequest::SetTimeout(uInterface(uPtr(_httpRequest), ::g::Uno::Net::Http::Implementation::IHttpRequest_typeof()), timeoutInMilliseconds); } // public Uno.Net.Http.HttpRequestState get_State() [instance] :107 int32_t HttpMessageHandlerRequest::State() { return _state; } // private void set_State(Uno.Net.Http.HttpRequestState value) [instance] :108 void HttpMessageHandlerRequest::State(int32_t value) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "set_State(Uno.Net.Http.HttpRequestState)"); if (_state == value) return; _state = value; OnStateChanged(); } // public generated void add_StateChanged(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest> value) [instance] :135 void HttpMessageHandlerRequest::add_StateChanged(uDelegate* value) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "add_StateChanged(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest>)"); StateChanged1 = uCast<uDelegate*>(::g::Uno::Delegate::Combine(StateChanged1, value), ::g::Uno::Action1_typeof()->MakeType(__type, NULL)); } // public generated void remove_StateChanged(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest> value) [instance] :135 void HttpMessageHandlerRequest::remove_StateChanged(uDelegate* value) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "remove_StateChanged(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest>)"); StateChanged1 = uCast<uDelegate*>(::g::Uno::Delegate::Remove(StateChanged1, value), ::g::Uno::Action1_typeof()->MakeType(__type, NULL)); } // public generated void add_Timeout(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest> value) [instance] :133 void HttpMessageHandlerRequest::add_Timeout(uDelegate* value) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "add_Timeout(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest>)"); Timeout1 = uCast<uDelegate*>(::g::Uno::Delegate::Combine(Timeout1, value), ::g::Uno::Action1_typeof()->MakeType(__type, NULL)); } // public generated void remove_Timeout(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest> value) [instance] :133 void HttpMessageHandlerRequest::remove_Timeout(uDelegate* value) { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest", "remove_Timeout(Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest>)"); Timeout1 = uCast<uDelegate*>(::g::Uno::Delegate::Remove(Timeout1, value), ::g::Uno::Action1_typeof()->MakeType(__type, NULL)); } // private static bool IsHeaderValid(string name, string value) [static] :450 bool HttpMessageHandlerRequest::IsHeaderValid(uString* name, uString* value) { return true; } // internal HttpMessageHandlerRequest New(Uno.Net.Http.HttpMessageHandler handler, string method, string url, Uno.Threading.IDispatcher dispatcher) [static] :22 HttpMessageHandlerRequest* HttpMessageHandlerRequest::New1(::g::Uno::Net::Http::HttpMessageHandler* handler, uString* method, uString* url, uObject* dispatcher) { HttpMessageHandlerRequest* obj3 = (HttpMessageHandlerRequest*)uNew(HttpMessageHandlerRequest_typeof()); obj3->ctor_(handler, method, url, dispatcher); return obj3; } // } // C:\Users\rudy0\AppData\Local\Fusetools\Packages\Uno.Net.Http\1.8.0\HttpRequestState.uno // --------------------------------------------------------------------------------------- // public enum HttpRequestState :3 uEnumType* HttpRequestState_typeof() { static uSStrong<uEnumType*> type; if (type != NULL) return type; type = uEnumType::New("Uno.Net.Http.HttpRequestState", ::g::Uno::Int_typeof(), 10); type->SetLiterals( "Uninitialized", 0LL, "Opened", 1LL, "Sent", 2LL, "HeadersReceived", 3LL, "Loading", 4LL, "Done", 5LL, "Aborted", 6LL, "Errored", 7LL, "TimedOut", 8LL, "Unsent", 0LL); return type; } // C:\Users\rudy0\AppData\Local\Fusetools\Packages\Uno.Net.Http\1.8.0\HttpResponseType.uno // --------------------------------------------------------------------------------------- // public enum HttpResponseType :3 uEnumType* HttpResponseType_typeof() { static uSStrong<uEnumType*> type; if (type != NULL) return type; type = uEnumType::New("Uno.Net.Http.HttpResponseType", ::g::Uno::Int_typeof(), 3); type->SetLiterals( "None", -1LL, "String", 0LL, "ByteArray", 1LL); return type; } // C:\Users\rudy0\AppData\Local\Fusetools\Packages\Uno.Net.Http\1.8.0\HttpStatusReasonPhrase.uno // --------------------------------------------------------------------------------------------- // public static class HttpStatusReasonPhrase :5 // { // static generated HttpStatusReasonPhrase() :5 static void HttpStatusReasonPhrase__cctor__fn(uType* __type) { ::g::Uno::Collections::Dictionary* collection5; ::g::Uno::Collections::Dictionary* collection4; ::g::Uno::Collections::Dictionary* collection3; ::g::Uno::Collections::Dictionary* collection2; ::g::Uno::Collections::Dictionary* collection1; HttpStatusReasonPhrase::Informational_ = (uObject*)(collection5 = (::g::Uno::Collections::Dictionary*)::g::Uno::Collections::Dictionary::New1(::TYPES[1/*Uno.Collections.Dictionary<int, string>*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection5), uCRef<int32_t>(100), ::STRINGS[2/*"Continue"*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection5), uCRef<int32_t>(101), ::STRINGS[3/*"Switching P...*/]), collection5); HttpStatusReasonPhrase::Success_ = (uObject*)(collection4 = (::g::Uno::Collections::Dictionary*)::g::Uno::Collections::Dictionary::New1(::TYPES[1/*Uno.Collections.Dictionary<int, string>*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection4), uCRef<int32_t>(200), ::STRINGS[4/*"OK"*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection4), uCRef<int32_t>(201), ::STRINGS[5/*"Created"*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection4), uCRef<int32_t>(202), ::STRINGS[6/*"Accepted"*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection4), uCRef<int32_t>(203), ::STRINGS[7/*"Non-Authori...*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection4), uCRef<int32_t>(204), ::STRINGS[8/*"No Content"*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection4), uCRef<int32_t>(205), ::STRINGS[9/*"Reset Content"*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection4), uCRef<int32_t>(206), ::STRINGS[10/*"Partial Con...*/]), collection4); HttpStatusReasonPhrase::Redirection_ = (uObject*)(collection3 = (::g::Uno::Collections::Dictionary*)::g::Uno::Collections::Dictionary::New1(::TYPES[1/*Uno.Collections.Dictionary<int, string>*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection3), uCRef<int32_t>(300), ::STRINGS[11/*"Multiple Ch...*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection3), uCRef<int32_t>(301), ::STRINGS[12/*"Moved Perma...*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection3), uCRef<int32_t>(302), ::STRINGS[13/*"Found"*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection3), uCRef<int32_t>(303), ::STRINGS[14/*"See Other"*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection3), uCRef<int32_t>(304), ::STRINGS[15/*"Not Modified"*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection3), uCRef<int32_t>(305), ::STRINGS[16/*"Use Proxy"*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection3), uCRef<int32_t>(307), ::STRINGS[17/*"Temporary R...*/]), collection3); HttpStatusReasonPhrase::ClientErrors_ = (uObject*)(collection2 = (::g::Uno::Collections::Dictionary*)::g::Uno::Collections::Dictionary::New1(::TYPES[1/*Uno.Collections.Dictionary<int, string>*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection2), uCRef<int32_t>(400), ::STRINGS[18/*"Bad Request"*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection2), uCRef<int32_t>(401), ::STRINGS[19/*"Unauthorized"*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection2), uCRef<int32_t>(402), ::STRINGS[20/*"Payment Req...*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection2), uCRef<int32_t>(403), ::STRINGS[21/*"Forbidden"*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection2), uCRef<int32_t>(404), ::STRINGS[22/*"Not Found"*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection2), uCRef<int32_t>(405), ::STRINGS[23/*"Method Not ...*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection2), uCRef<int32_t>(406), ::STRINGS[24/*"Not Accepta...*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection2), uCRef<int32_t>(407), ::STRINGS[25/*"Proxy Authe...*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection2), uCRef<int32_t>(408), ::STRINGS[26/*"Request Tim...*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection2), uCRef<int32_t>(409), ::STRINGS[27/*"Conflict"*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection2), uCRef<int32_t>(410), ::STRINGS[28/*"Gone"*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection2), uCRef<int32_t>(411), ::STRINGS[29/*"Length Requ...*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection2), uCRef<int32_t>(412), ::STRINGS[30/*"Preconditio...*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection2), uCRef<int32_t>(413), ::STRINGS[31/*"Request Ent...*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection2), uCRef<int32_t>(414), ::STRINGS[32/*"Request-URI...*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection2), uCRef<int32_t>(415), ::STRINGS[33/*"Unsupported...*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection2), uCRef<int32_t>(416), ::STRINGS[34/*"Requested r...*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection2), uCRef<int32_t>(417), ::STRINGS[35/*"Expectation...*/]), collection2); HttpStatusReasonPhrase::ServerErrors_ = (uObject*)(collection1 = (::g::Uno::Collections::Dictionary*)::g::Uno::Collections::Dictionary::New1(::TYPES[1/*Uno.Collections.Dictionary<int, string>*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection1), uCRef<int32_t>(500), ::STRINGS[36/*"Internal Se...*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection1), uCRef<int32_t>(501), ::STRINGS[37/*"Not Impleme...*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection1), uCRef<int32_t>(502), ::STRINGS[38/*"Bad Gateway"*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection1), uCRef<int32_t>(503), ::STRINGS[39/*"Service Una...*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection1), uCRef<int32_t>(504), ::STRINGS[40/*"Gateway Tim...*/]), ::g::Uno::Collections::Dictionary__Add_fn(uPtr(collection1), uCRef<int32_t>(505), ::STRINGS[41/*"HTTP Versio...*/]), collection1); } static void HttpStatusReasonPhrase_build(uType* type) { ::STRINGS[2] = uString::Const("Continue"); ::STRINGS[3] = uString::Const("Switching Protocols"); ::STRINGS[4] = uString::Const("OK"); ::STRINGS[5] = uString::Const("Created"); ::STRINGS[6] = uString::Const("Accepted"); ::STRINGS[7] = uString::Const("Non-Authoritative Information"); ::STRINGS[8] = uString::Const("No Content"); ::STRINGS[9] = uString::Const("Reset Content"); ::STRINGS[10] = uString::Const("Partial Content"); ::STRINGS[11] = uString::Const("Multiple Choices"); ::STRINGS[12] = uString::Const("Moved Permanently"); ::STRINGS[13] = uString::Const("Found"); ::STRINGS[14] = uString::Const("See Other"); ::STRINGS[15] = uString::Const("Not Modified"); ::STRINGS[16] = uString::Const("Use Proxy"); ::STRINGS[17] = uString::Const("Temporary Redirect"); ::STRINGS[18] = uString::Const("Bad Request"); ::STRINGS[19] = uString::Const("Unauthorized"); ::STRINGS[20] = uString::Const("Payment Required"); ::STRINGS[21] = uString::Const("Forbidden"); ::STRINGS[22] = uString::Const("Not Found"); ::STRINGS[23] = uString::Const("Method Not Allowed"); ::STRINGS[24] = uString::Const("Not Acceptable"); ::STRINGS[25] = uString::Const("Proxy Authentication Required"); ::STRINGS[26] = uString::Const("Request Time-out"); ::STRINGS[27] = uString::Const("Conflict"); ::STRINGS[28] = uString::Const("Gone"); ::STRINGS[29] = uString::Const("Length Required"); ::STRINGS[30] = uString::Const("Precondition Failed"); ::STRINGS[31] = uString::Const("Request Entity Too Large"); ::STRINGS[32] = uString::Const("Request-URI Too Large"); ::STRINGS[33] = uString::Const("Unsupported Media Type"); ::STRINGS[34] = uString::Const("Requested range not satisfiable"); ::STRINGS[35] = uString::Const("Expectation Failed"); ::STRINGS[36] = uString::Const("Internal Server Error"); ::STRINGS[37] = uString::Const("Not Implemented"); ::STRINGS[38] = uString::Const("Bad Gateway"); ::STRINGS[39] = uString::Const("Service Unavailable"); ::STRINGS[40] = uString::Const("Gateway Time-out"); ::STRINGS[41] = uString::Const("HTTP Version not supported"); ::TYPES[1] = ::g::Uno::Collections::Dictionary_typeof()->MakeType(::g::Uno::Int_typeof(), ::g::Uno::String_typeof(), NULL); ::TYPES[2] = ::g::Uno::Collections::IDictionary_typeof()->MakeType(::g::Uno::Int_typeof(), ::g::Uno::String_typeof(), NULL); type->SetFields(0, ::TYPES[2/*Uno.Collections.IDictionary<int, string>*/], (uintptr_t)&HttpStatusReasonPhrase::Informational_, uFieldFlagsStatic, ::TYPES[2/*Uno.Collections.IDictionary<int, string>*/], (uintptr_t)&HttpStatusReasonPhrase::Success_, uFieldFlagsStatic, ::TYPES[2/*Uno.Collections.IDictionary<int, string>*/], (uintptr_t)&HttpStatusReasonPhrase::Redirection_, uFieldFlagsStatic, ::TYPES[2/*Uno.Collections.IDictionary<int, string>*/], (uintptr_t)&HttpStatusReasonPhrase::ClientErrors_, uFieldFlagsStatic, ::TYPES[2/*Uno.Collections.IDictionary<int, string>*/], (uintptr_t)&HttpStatusReasonPhrase::ServerErrors_, uFieldFlagsStatic); type->Reflection.SetFields(5, new uField("ClientErrors", 3), new uField("Informational", 0), new uField("Redirection", 2), new uField("ServerErrors", 4), new uField("Success", 1)); type->Reflection.SetFunctions(1, new uFunction("GetFromStatusCode", NULL, (void*)HttpStatusReasonPhrase__GetFromStatusCode_fn, 0, true, ::g::Uno::String_typeof(), 1, ::g::Uno::Int_typeof())); } uClassType* HttpStatusReasonPhrase_typeof() { static uSStrong<uClassType*> type; if (type != NULL) return type; uTypeOptions options; options.FieldCount = 5; options.TypeSize = sizeof(uClassType); type = uClassType::New("Uno.Net.Http.HttpStatusReasonPhrase", options); type->fp_build_ = HttpStatusReasonPhrase_build; type->fp_cctor_ = HttpStatusReasonPhrase__cctor__fn; return type; } // public static string GetFromStatusCode(int statusCode) :72 void HttpStatusReasonPhrase__GetFromStatusCode_fn(int32_t* statusCode, uString** __retval) { *__retval = HttpStatusReasonPhrase::GetFromStatusCode(*statusCode); } uSStrong<uObject*> HttpStatusReasonPhrase::Informational_; uSStrong<uObject*> HttpStatusReasonPhrase::Success_; uSStrong<uObject*> HttpStatusReasonPhrase::Redirection_; uSStrong<uObject*> HttpStatusReasonPhrase::ClientErrors_; uSStrong<uObject*> HttpStatusReasonPhrase::ServerErrors_; // public static string GetFromStatusCode(int statusCode) [static] :72 uString* HttpStatusReasonPhrase::GetFromStatusCode(int32_t statusCode) { uStackFrame __("Uno.Net.Http.HttpStatusReasonPhrase", "GetFromStatusCode(int)"); HttpStatusReasonPhrase_typeof()->Init(); bool ret6; bool ret7; bool ret8; bool ret9; bool ret10; uString* description; if ((::g::Uno::Collections::IDictionary::TryGetValue_ex(uInterface(uPtr(HttpStatusReasonPhrase::Informational_), ::TYPES[2/*Uno.Collections.IDictionary<int, string>*/]), uCRef<int32_t>(statusCode), (void**)(&description), &ret6), ret6)) return description; if ((::g::Uno::Collections::IDictionary::TryGetValue_ex(uInterface(uPtr(HttpStatusReasonPhrase::Success_), ::TYPES[2/*Uno.Collections.IDictionary<int, string>*/]), uCRef<int32_t>(statusCode), (void**)(&description), &ret7), ret7)) return description; if ((::g::Uno::Collections::IDictionary::TryGetValue_ex(uInterface(uPtr(HttpStatusReasonPhrase::Redirection_), ::TYPES[2/*Uno.Collections.IDictionary<int, string>*/]), uCRef<int32_t>(statusCode), (void**)(&description), &ret8), ret8)) return description; if ((::g::Uno::Collections::IDictionary::TryGetValue_ex(uInterface(uPtr(HttpStatusReasonPhrase::ClientErrors_), ::TYPES[2/*Uno.Collections.IDictionary<int, string>*/]), uCRef<int32_t>(statusCode), (void**)(&description), &ret9), ret9)) return description; if ((::g::Uno::Collections::IDictionary::TryGetValue_ex(uInterface(uPtr(HttpStatusReasonPhrase::ServerErrors_), ::TYPES[2/*Uno.Collections.IDictionary<int, string>*/]), uCRef<int32_t>(statusCode), (void**)(&description), &ret10), ret10)) return description; return NULL; } // } // C:\Users\rudy0\AppData\Local\Fusetools\Packages\Uno.Net.Http\1.8.0\HttpMessageHandlerRequest.uno // ------------------------------------------------------------------------------------------------ // public sealed class InvalidResponseTypeException :496 // { static void InvalidResponseTypeException_build(uType* type) { ::STRINGS[42] = uString::Const("Response type is invalid."); type->SetFields(4); type->Reflection.SetFunctions(1, new uFunction(".ctor", NULL, (void*)InvalidResponseTypeException__New4_fn, 0, true, type, 0)); } ::g::Uno::Exception_type* InvalidResponseTypeException_typeof() { static uSStrong< ::g::Uno::Exception_type*> type; if (type != NULL) return type; uTypeOptions options; options.BaseDefinition = ::g::Uno::Exception_typeof(); options.FieldCount = 4; options.ObjectSize = sizeof(InvalidResponseTypeException); options.TypeSize = sizeof(::g::Uno::Exception_type); type = (::g::Uno::Exception_type*)uClassType::New("Uno.Net.Http.InvalidResponseTypeException", options); type->fp_build_ = InvalidResponseTypeException_build; type->fp_ctor_ = (void*)InvalidResponseTypeException__New4_fn; return type; } // public InvalidResponseTypeException() :498 void InvalidResponseTypeException__ctor_3_fn(InvalidResponseTypeException* __this) { __this->ctor_3(); } // public InvalidResponseTypeException New() :498 void InvalidResponseTypeException__New4_fn(InvalidResponseTypeException** __retval) { *__retval = InvalidResponseTypeException::New4(); } // public InvalidResponseTypeException() [instance] :498 void InvalidResponseTypeException::ctor_3() { ctor_1(::STRINGS[42/*"Response ty...*/]); } // public InvalidResponseTypeException New() [static] :498 InvalidResponseTypeException* InvalidResponseTypeException::New4() { InvalidResponseTypeException* obj1 = (InvalidResponseTypeException*)uNew(InvalidResponseTypeException_typeof()); obj1->ctor_3(); return obj1; } // } // C:\Users\rudy0\AppData\Local\Fusetools\Packages\Uno.Net.Http\1.8.0\HttpMessageHandlerRequest.uno // ------------------------------------------------------------------------------------------------ // public sealed class InvalidStateException :502 // { static void InvalidStateException_build(uType* type) { ::STRINGS[43] = uString::Const("The object is in an invalid state."); type->SetFields(4); type->Reflection.SetFunctions(2, new uFunction(".ctor", NULL, (void*)InvalidStateException__New4_fn, 0, true, type, 0), new uFunction(".ctor", NULL, (void*)InvalidStateException__New5_fn, 0, true, type, 1, ::g::Uno::String_typeof())); } ::g::Uno::Exception_type* InvalidStateException_typeof() { static uSStrong< ::g::Uno::Exception_type*> type; if (type != NULL) return type; uTypeOptions options; options.BaseDefinition = ::g::Uno::Exception_typeof(); options.FieldCount = 4; options.ObjectSize = sizeof(InvalidStateException); options.TypeSize = sizeof(::g::Uno::Exception_type); type = (::g::Uno::Exception_type*)uClassType::New("Uno.Net.Http.InvalidStateException", options); type->fp_build_ = InvalidStateException_build; type->fp_ctor_ = (void*)InvalidStateException__New4_fn; return type; } // public InvalidStateException() :504 void InvalidStateException__ctor_3_fn(InvalidStateException* __this) { __this->ctor_3(); } // public InvalidStateException(string message) :507 void InvalidStateException__ctor_4_fn(InvalidStateException* __this, uString* message) { __this->ctor_4(message); } // public InvalidStateException New() :504 void InvalidStateException__New4_fn(InvalidStateException** __retval) { *__retval = InvalidStateException::New4(); } // public InvalidStateException New(string message) :507 void InvalidStateException__New5_fn(uString* message, InvalidStateException** __retval) { *__retval = InvalidStateException::New5(message); } // public InvalidStateException() [instance] :504 void InvalidStateException::ctor_3() { ctor_1(::STRINGS[43/*"The object ...*/]); } // public InvalidStateException(string message) [instance] :507 void InvalidStateException::ctor_4(uString* message) { ctor_1(message); } // public InvalidStateException New() [static] :504 InvalidStateException* InvalidStateException::New4() { InvalidStateException* obj1 = (InvalidStateException*)uNew(InvalidStateException_typeof()); obj1->ctor_3(); return obj1; } // public InvalidStateException New(string message) [static] :507 InvalidStateException* InvalidStateException::New5(uString* message) { InvalidStateException* obj2 = (InvalidStateException*)uNew(InvalidStateException_typeof()); obj2->ctor_4(message); return obj2; } // } // C:\Users\rudy0\AppData\Local\Fusetools\Packages\Uno.Net.Http\1.8.0\HttpMessageHandlerRequest.uno // ------------------------------------------------------------------------------------------------ // private sealed class HttpMessageHandlerRequest.ProgressClosure :186 // { static void HttpMessageHandlerRequest__ProgressClosure_build(uType* type) { type->SetFields(0, ::g::Uno::Action4_typeof()->MakeType(::g::Uno::Net::Http::HttpMessageHandlerRequest_typeof(), ::g::Uno::Int_typeof(), ::g::Uno::Int_typeof(), ::g::Uno::Bool_typeof(), NULL), offsetof(HttpMessageHandlerRequest__ProgressClosure, _action), 0, ::g::Uno::Net::Http::HttpMessageHandlerRequest_typeof(), offsetof(HttpMessageHandlerRequest__ProgressClosure, _request), 0, ::g::Uno::Int_typeof(), offsetof(HttpMessageHandlerRequest__ProgressClosure, _current), 0, ::g::Uno::Int_typeof(), offsetof(HttpMessageHandlerRequest__ProgressClosure, _total), 0, ::g::Uno::Bool_typeof(), offsetof(HttpMessageHandlerRequest__ProgressClosure, _hasTotal), 0, ::g::Uno::Net::Http::HttpRequestState_typeof(), offsetof(HttpMessageHandlerRequest__ProgressClosure, _state), 0); } uType* HttpMessageHandlerRequest__ProgressClosure_typeof() { static uSStrong<uType*> type; if (type != NULL) return type; uTypeOptions options; options.FieldCount = 6; options.ObjectSize = sizeof(HttpMessageHandlerRequest__ProgressClosure); options.TypeSize = sizeof(uType); type = uClassType::New("Uno.Net.Http.HttpMessageHandlerRequest.ProgressClosure", options); type->fp_build_ = HttpMessageHandlerRequest__ProgressClosure_build; return type; } // public ProgressClosure(Uno.Net.Http.HttpRequestState state, Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest, int, int, bool> action, Uno.Net.Http.HttpMessageHandlerRequest request, int current, int total, bool hasTotal) :195 void HttpMessageHandlerRequest__ProgressClosure__ctor__fn(HttpMessageHandlerRequest__ProgressClosure* __this, int32_t* state, uDelegate* action, ::g::Uno::Net::Http::HttpMessageHandlerRequest* request, int32_t* current, int32_t* total, bool* hasTotal) { __this->ctor_(*state, action, request, *current, *total, *hasTotal); } // public ProgressClosure New(Uno.Net.Http.HttpRequestState state, Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest, int, int, bool> action, Uno.Net.Http.HttpMessageHandlerRequest request, int current, int total, bool hasTotal) :195 void HttpMessageHandlerRequest__ProgressClosure__New1_fn(int32_t* state, uDelegate* action, ::g::Uno::Net::Http::HttpMessageHandlerRequest* request, int32_t* current, int32_t* total, bool* hasTotal, HttpMessageHandlerRequest__ProgressClosure** __retval) { *__retval = HttpMessageHandlerRequest__ProgressClosure::New1(*state, action, request, *current, *total, *hasTotal); } // public void Run() :205 void HttpMessageHandlerRequest__ProgressClosure__Run_fn(HttpMessageHandlerRequest__ProgressClosure* __this) { __this->Run(); } // public ProgressClosure(Uno.Net.Http.HttpRequestState state, Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest, int, int, bool> action, Uno.Net.Http.HttpMessageHandlerRequest request, int current, int total, bool hasTotal) [instance] :195 void HttpMessageHandlerRequest__ProgressClosure::ctor_(int32_t state, uDelegate* action, ::g::Uno::Net::Http::HttpMessageHandlerRequest* request, int32_t current, int32_t total, bool hasTotal) { _action = action; _request = request; _current = current; _total = total; _hasTotal = hasTotal; _state = state; } // public void Run() [instance] :205 void HttpMessageHandlerRequest__ProgressClosure::Run() { uStackFrame __("Uno.Net.Http.HttpMessageHandlerRequest.ProgressClosure", "Run()"); if (uPtr(_request)->IsComplete()) return; uPtr(_request)->State(_state); uPtr(_action)->Invoke(4, (::g::Uno::Net::Http::HttpMessageHandlerRequest*)_request, uCRef<int32_t>(_current), uCRef<int32_t>(_total), uCRef(_hasTotal)); } // public ProgressClosure New(Uno.Net.Http.HttpRequestState state, Uno.Action<Uno.Net.Http.HttpMessageHandlerRequest, int, int, bool> action, Uno.Net.Http.HttpMessageHandlerRequest request, int current, int total, bool hasTotal) [static] :195 HttpMessageHandlerRequest__ProgressClosure* HttpMessageHandlerRequest__ProgressClosure::New1(int32_t state, uDelegate* action, ::g::Uno::Net::Http::HttpMessageHandlerRequest* request, int32_t current, int32_t total, bool hasTotal) { HttpMessageHandlerRequest__ProgressClosure* obj1 = (HttpMessageHandlerRequest__ProgressClosure*)uNew(HttpMessageHandlerRequest__ProgressClosure_typeof()); obj1->ctor_(state, action, request, current, total, hasTotal); return obj1; } // } // C:\Users\rudy0\AppData\Local\Fusetools\Packages\Uno.Net.Http\1.8.0\HttpMessageHandler.uno // ----------------------------------------------------------------------------------------- // internal static class HttpMessageHandler.StaticData :10 // { // static generated StaticData() :10 static void HttpMessageHandler__StaticData__cctor__fn(uType* __type) { HttpMessageHandler__StaticData::_syncLock_ = ::g::Uno::Object::New(); } static void HttpMessageHandler__StaticData_build(uType* type) { type->SetFields(0, uObject_typeof(), (uintptr_t)&HttpMessageHandler__StaticData::_syncLock_, uFieldFlagsStatic); } uClassType* HttpMessageHandler__StaticData_typeof() { static uSStrong<uClassType*> type; if (type != NULL) return type; uTypeOptions options; options.FieldCount = 1; options.TypeSize = sizeof(uClassType); type = uClassType::New("Uno.Net.Http.HttpMessageHandler.StaticData", options); type->fp_build_ = HttpMessageHandler__StaticData_build; type->fp_cctor_ = HttpMessageHandler__StaticData__cctor__fn; return type; } // internal static void DecrementPendingRequests() :27 void HttpMessageHandler__StaticData__DecrementPendingRequests_fn() { HttpMessageHandler__StaticData::DecrementPendingRequests(); } // internal static void IncrementPendingRequests() :15 void HttpMessageHandler__StaticData__IncrementPendingRequests_fn() { HttpMessageHandler__StaticData::IncrementPendingRequests(); } uSStrong<uObject*> HttpMessageHandler__StaticData::_syncLock_; // internal static void DecrementPendingRequests() [static] :27 void HttpMessageHandler__StaticData::DecrementPendingRequests() { HttpMessageHandler__StaticData_typeof()->Init(); } // internal static void IncrementPendingRequests() [static] :15 void HttpMessageHandler__StaticData::IncrementPendingRequests() { HttpMessageHandler__StaticData_typeof()->Init(); } // } }}}} // ::g::Uno::Net::Http
7b818b8d0107736bede135da27ffb0e3a1f25a5b
0eff74b05b60098333ad66cf801bdd93becc9ea4
/second/download/httpd/gumtree/httpd_function_469.cpp
ff0a3e38120047d963beba8f4dd4eabed665d7a1
[]
no_license
niuxu18/logTracker-old
97543445ea7e414ed40bdc681239365d33418975
f2b060f13a0295387fe02187543db124916eb446
refs/heads/master
2021-09-13T21:39:37.686481
2017-12-11T03:36:34
2017-12-11T03:36:34
null
0
0
null
null
null
null
UTF-8
C++
false
false
329
cpp
static void register_hooks(apr_pool_t *p) { ap_register_output_filter("MOD_EXPIRES", expires_filter, NULL, AP_FTYPE_CONTENT_SET); ap_hook_insert_error_filter(expires_insert_filter, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_insert_filter(expires_insert_filter, NULL, NULL, APR_HOOK_MIDDLE); }
4cded08fb3dad9b314f2d00ddcd83b79e3fe1839
7064361eb0e3f0b38b25e9bdb6bdcf84014f1c4d
/cocos2dx_playground/Classes/step_rain_of_chaos_game_SpawnProcessor_MultipleShot_01_CircularSector.cpp
be7fb148b0512a3a1868f4e6fcddb994230507ad
[ "Apache-2.0" ]
permissive
isoundy000/cocos2dx_playground
c034a8b215fa89d34a2af8f2d4a01ec34607c247
464e227d0798999321d045905929519e57ed8252
refs/heads/master
2022-12-12T22:54:40.754584
2020-09-06T22:42:42
2020-09-06T22:42:42
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,432
cpp
#include "step_rain_of_chaos_game_SpawnProcessor_MultipleShot_01_CircularSector.h" #include <algorithm> #include "step_rain_of_chaos_game_StageConfig.h" USING_NS_CC; namespace { enum eStep { Fire, Sleep }; } namespace step_rain_of_chaos { namespace game { SpawnProcessor_MultipleShot_01_CircularSector::SpawnProcessor_MultipleShot_01_CircularSector( const StageConfig& stage_config , const SpawnProcessorConfig& spawn_processor_config , const float degree_per_cycle , const int bullets_per_cycle , const int repeat_count , const float sleep_per_cycle ) : iSpawnProcessor( stage_config, spawn_processor_config ) , mHalfRadianPerCycle( CC_DEGREES_TO_RADIANS( degree_per_cycle * 0.5f ) ) , mBulletsPerCycle( std::max( 2, bullets_per_cycle ) ) , mRequiredCycle( std::max( 1, repeat_count ) ) , mRadianPerBullet( CC_DEGREES_TO_RADIANS( degree_per_cycle / std::max( 1, mBulletsPerCycle - 1 ) ) ) , mSleepPerCycle( sleep_per_cycle ) , mStep( eStep::Fire ) , mStartPosition() , mTargetPosition() , mFireStartDirection() , mCurrentFireCycle( 0 ) , mElapsedTime4Sleep( 0.f ) {} SpawnProcessorUp SpawnProcessor_MultipleShot_01_CircularSector::Create( const StageConfig& stage_config , const SpawnProcessorConfig& spawn_processor_config , const float degree_per_cycle , const int bullets_per_cycle , const int repeat_count , const float sleep_per_cycle ) { SpawnProcessorUp ret( new ( std::nothrow ) SpawnProcessor_MultipleShot_01_CircularSector( stage_config , spawn_processor_config , degree_per_cycle, bullets_per_cycle , repeat_count , sleep_per_cycle ) ); ret->init(); return ret; } void SpawnProcessor_MultipleShot_01_CircularSector::Enter( const Vec2& start_position, const Vec2& target_position ) { mStep = eStep::Fire; mStartPosition = start_position; mTargetPosition = target_position; mFireStartDirection = mTargetPosition - mStartPosition; mFireStartDirection.normalize(); mFireStartDirection.rotate( Vec2::ZERO, -mHalfRadianPerCycle ); mCurrentFireCycle = 0; } bool SpawnProcessor_MultipleShot_01_CircularSector::Update( const float dt, const Vec2& start_position, const Vec2& target_position, SpawnInfoContainer* out_spawn_info_container ) { if( eStep::Fire == mStep ) { if( mSpawnProcessorConfig.UpdateStartPosition ) { mStartPosition = start_position; } if( mSpawnProcessorConfig.UpdateTargetPosition ) { mTargetPosition = target_position; } if( mSpawnProcessorConfig.UpdateStartPosition || mSpawnProcessorConfig.UpdateTargetPosition ) { mFireStartDirection = mTargetPosition - mStartPosition; mFireStartDirection.normalize(); mFireStartDirection.rotate( Vec2::ZERO, -mHalfRadianPerCycle ); } Vec2 temp_fire_direction; for( int i = 0; mBulletsPerCycle > i; ++i ) { temp_fire_direction = mFireStartDirection; temp_fire_direction.rotate( Vec2::ZERO, mRadianPerBullet * i ); out_spawn_info_container->push_back( SpawnInfo{ mStartPosition , temp_fire_direction } ); } ++mCurrentFireCycle; mStep = eStep::Sleep; mElapsedTime4Sleep = 0.f; } else { mElapsedTime4Sleep += dt; if( mSleepPerCycle <= mElapsedTime4Sleep ) { mStep = eStep::Fire; } } return mRequiredCycle > mCurrentFireCycle; } } }
eb7eef67cd08f3e875790dcc4b3cf5ff9ea05535
640e15962f4515026818683cb846c2ad43a1a67b
/src/date_parser.cpp
42df3a1d63557b56399778e5a27e1038eac28d07
[ "ISC" ]
permissive
aerilon/bpistats
59c5488d453529f1764acdb5a8baa182e6ae47c3
2c53509cea3a84d87c0ae97c3622c6175fe5fd8c
refs/heads/master
2021-05-01T12:23:08.197767
2018-02-17T08:01:45
2018-02-17T08:01:45
121,065,386
0
1
null
null
null
null
UTF-8
C++
false
false
739
cpp
#include <utility> #include <regex> #include <date_parser.hpp> namespace bpi { date_parser::date_parser(): date_parser("%Y-%m-%d") { } date_parser::date_parser(const std::string& format) { // XXX al - pointer freed by std::~locale() this->ss.imbue(std::locale(std::locale(), new boost::posix_time::time_input_facet(format.c_str()))); } std::pair<bool, boost::posix_time::ptime> date_parser::operator()(const std::string& text) { boost::posix_time::ptime pt; std::regex regex("^([0-9]{4})-[0-9]{2}-[0-9]{2}$"); std::smatch match; if (!std::regex_match(text, match, regex)) { return { false, pt }; } this->ss.clear(); this->ss.str(""); this->ss << text; ss >> pt; return { !pt.is_not_a_date_time(), pt }; } }
b7cd828dc72aebdd56ed9f631278190081023056
f379fc4bf399049f99ca9c0c04eeddf78e994223
/Skybox.h
ecdb2ea714e27b78dc852d5539e22d3976d7fc55
[]
no_license
ktzhang/First-Person-Shooter
82b796ed60d78b8908737d4f859936388a6f0369
c40f8a885c83217db471032a2a4bb38ab8166455
refs/heads/master
2020-04-06T16:35:20.250108
2014-12-19T11:29:20
2014-12-19T11:29:20
28,125,159
3
0
null
2014-12-18T13:03:51
2014-12-17T06:51:14
C
UTF-8
C++
false
false
246
h
#ifndef _SKYBOX_H_ #define _SKYBOX_H_ #include "Geode.h" #include "Matrix4.h" using namespace std; class Skybox : public Geode { public: static const double SIDELEN; Skybox() {}; void render(); //void prerender(); ~Skybox() {}; }; #endif
f4a0cd77a4706427d0456b0be481ac1f3412a328
e327b5985730cdf34f26c116b32345b3df65557a
/Code/8.13/f.cpp
366f670470d10a3e944d410da8f508f5621d6216
[]
no_license
footoredo/Gungnir
ea2461382e81d618d45e3c4ca974f8f4666aa336
f22a2271a43e758f0d2c8e0f5b1806b586f67a99
refs/heads/master
2020-05-22T00:04:03.308372
2016-11-23T14:14:16
2016-11-23T14:14:16
64,023,622
6
3
null
null
null
null
UTF-8
C++
false
false
1,786
cpp
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int MAXN = 111111; int adj[MAXN], L[MAXN], R[MAXN], dep[MAXN], fa[MAXN], n, Q, cnt, DFN, u; pair<int, int> tr[MAXN << 2]; char str[111]; struct edge { int v, nxt; } e[MAXN << 2]; inline void addedge(int x, int y) { e[++cnt].v = y; e[cnt].nxt = adj[x]; adj[x] = cnt; } inline int getnode(int l, int r) { return (l + r) | (l != r); } inline void buildtree(int l, int r) { int k = getnode(l, r); tr[k] = make_pair(1, 1); if (l == r) return; int mid = l + r >> 1; buildtree(l, mid); buildtree(mid + 1, r); } inline void modify(int l, int r, int a, int b, pair<int, int> x) { int k = getnode(l, r); if (l == a && b == r) { tr[k] = max(tr[k], x); return; } int mid = l + r >> 1; if (a > mid) modify(mid + 1, r, a, b, x); else if (b <= mid) modify(l, mid, a, b, x); else { modify(l, mid, a, mid, x); modify(mid + 1, r, mid + 1, b, x); } } inline pair<int, int> query(int l, int r, int pos) { int k = getnode(l, r); if (l == r) return tr[k]; int mid = l + r >> 1; pair<int, int> tmp = (pos > mid) ? query(mid + 1, r, pos) : query(l, mid, pos); return max(tmp, tr[k]); } inline void dfs(int u) { L[u] = ++DFN; dep[u] = dep[fa[u]] + 1; for (int p = adj[u]; p; p = e[p].nxt) dfs(e[p].v); R[u] = DFN; } int main() { while (scanf("%d%d", &n, &Q), n && Q) { memset(adj, 0, sizeof(*adj) * (n + 1)); cnt = 0; for (int i = 2; i <= n; ++i) { scanf("%d", &fa[i]); addedge(fa[i], i); } buildtree(1, n); DFN = dep[0] = fa[1] = 0; dfs(1); LL ans = 0; for (; Q; --Q) { scanf("%s%d", str, &u); if (str[0] == 'Q') { ans += query(1, n, L[u]).second; } else { modify(1, n, L[u], R[u], make_pair(dep[u], u)); } } cout << ans << endl; } }
0e25c363fe50ade79f287c9c72ae3157612e39d4
72921c3f248897556bf953c010543140b3a27bbc
/verilog/analysis/checkers/signal_name_style_rule_test.cc
7d6b68ebf6f836e9aa52621c462695d94c4e4b23
[ "Apache-2.0" ]
permissive
G-ram/verible
75ffe84de2aac327a0e020d2f8b22ccc3921eba3
5f735fe286a28adf7d1ac4174d07de8b13b714d0
refs/heads/master
2020-11-27T21:26:25.810971
2019-12-27T19:34:23
2019-12-27T19:34:23
229,607,210
0
0
null
2019-12-22T17:47:53
2019-12-22T17:47:52
null
UTF-8
C++
false
false
4,040
cc
// Copyright 2017-2019 The Verible Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #include "verilog/analysis/checkers/signal_name_style_rule.h" #include <initializer_list> #include "gtest/gtest.h" #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" #include "common/text/symbol.h" #include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" namespace verilog { namespace analysis { namespace { using verible::LintTestCase; using verible::RunLintTestCases; TEST(SignalNameStyleRuleTest, ModulePortTests) { constexpr int kToken = SymbolIdentifier; const std::initializer_list<LintTestCase> kTestCases = { {""}, // Tests for module ports {"module foo(input logic b_a_r); endmodule"}, {"module foo(input wire hello_world1); endmodule"}, {"module foo(wire ", {kToken, "HelloWorld"}, "); endmodule"}, {"module foo(input logic ", {kToken, "_bar"}, "); endmodule"}, {"module foo(input logic [3:0] ", {kToken, "Foo_bar"}, "); endmodule"}, {"module foo(input logic b_a_r [3:0]); endmodule"}, {"module foo(input logic [3:0] ", {kToken, "Bar"}, ", input logic ", {kToken, "Bar2"}, " [4]); endmodule"}, {"module foo(input logic hello_world, input bar); endmodule"}, {"module foo(input logic hello_world, input ", {kToken, "b_A_r"}, "); endmodule"}, {"module foo(input logic ", {kToken, "HelloWorld"}, ", output ", {kToken, "Bar"}, "); endmodule"}, {"module foo(input logic ", {kToken, "hello_World"}, ", wire b_a_r = 1); endmodule"}, {"module foo(input hello_world, output b_a_r, input wire bar2); " "endmodule"}, {"module foo(input hello_world, output b_a_r, input wire ", {kToken, "Bad"}, "); " "endmodule"}, // Tests for nets {"module foo; wire single_net; endmodule"}, {"module foo; wire first_net, second_net; endmodule"}, {"module foo; " "wire ", {kToken, "SingleNet"}, "; endmodule"}, {"module foo; " "wire ", {kToken, "FirstNet"}, ";" "wire second_net; endmodule"}, {"module foo; " "wire ", {kToken, "FirstNet"}, ";" "wire ", {kToken, "SecondNet"}, "; endmodule"}, {"module foo; " "wire ", {kToken, "FirstNet"}, ", ", {kToken, "SecondNet"}, "; endmodule"}, {"module foo; wire first_net, ", {kToken, "SecondNet"}, "; endmodule"}, {"module foo; wire ", {kToken, "FirstNet"}, ", second_net; endmodule"}, // Tests for data {"module foo; logic okay_name; endmodule"}, {"module foo; logic ", {kToken, "NotOkayName"}, "; endmodule"}, {"module foo; logic m_ultiple, o_kay, n_ames; endmodule"}, {"module foo; " "logic the_middle, ", {kToken, "NameIs"}, ", not_okay; endmodule"}, {"module foo; logic a = 1, b = 0, c = 1; endmodule"}, {"module foo; logic a = 1, ", {kToken, "B"}, "= 0, c = 1; endmodule"}, {"module top; foo baz(0); endmodule"}, {"module top; foo ba_x(0), ba_y(1), ba_z(0); endmodule"}, {"module top; foo ", {kToken, "Baz"}, "(0); endmodule"}, {"module top; foo ba_x(0), ", {kToken, "BaY"}, "(1); endmodule"}, }; RunLintTestCases<VerilogAnalyzer, SignalNameStyleRule>(kTestCases); } } // namespace } // namespace analysis } // namespace verilog
f1b48eb88ac37b5457246a76aca04f2e36ddc5da
49f156e57699114b7fc7fc184b9bf8450c656b82
/Source/GameSWF/gameswf_parser.cpp
85e8f1cb041a59c74eb783b944e7eb5afe7592ad
[]
no_license
PSP-Archive/SWFPlayer
9e8d5cf8149f7c525efb0bf23cfd9cd44796942b
74870f8105a9c0ed89928177c5d0146fb8530778
refs/heads/main
2023-04-06T08:58:06.202008
2021-04-25T03:06:07
2021-04-25T03:06:07
361,318,515
3
0
null
null
null
null
UTF-8
C++
false
false
13,929
cpp
// gameswf_parser.cpp -- Willem Kokke 2003 // This source code has been donated to the Public Domain. Do // whatever you want with it. // A program to parse SWF files into text output. #include "base/tu_file.h" #include "base/zlib_adapter.h" #include "base/image.h" #include "base/jpeg.h" #include "gameswf_stream.h" #include "gameswf_log.h" #include "gameswf.h" #define TWIPS_TO_PIXELS(x) ((x) / 20.f) #define PIXELS_TO_TWIPS(x) ((x) * 20.f) using gameswf::stream; using gameswf::log_msg; namespace parser { static int ident = 0; static int current_frame = 0; tu_file* out; typedef void (*loader_function)(stream* input, int tag_type); static hash<int, loader_function> tag_loaders; void register_tag_loader(int tag_type, loader_function lf) { assert(tag_loaders.get(tag_type, NULL) == false); assert(lf != NULL); tag_loaders.add(tag_type, lf); } void log_callback(bool error, const char* message) { static char buf[512]; strcpy(buf,""); for (int i=0; i<ident; i++) { strcat(buf," "); } strcat(buf,message); //out->write_string(buf); fputs(buf,stdout); } // parse a matrix struct matrix { static float m_[2][3]; static bool has_scale, has_rotate; static void parse(stream* in) { in->align(); memset(&m_[0], 0, sizeof(m_)); m_[0][0] = 1; m_[1][1] = 1; int has_scale = in->read_uint(1); if (has_scale) { int scale_nbits = in->read_uint(5); m_[0][0] = in->read_sint(scale_nbits) / 65536.0f; m_[1][1] = in->read_sint(scale_nbits) / 65536.0f; } int has_rotate = in->read_uint(1); if (has_rotate) { int rotate_nbits = in->read_uint(5); m_[1][0] = in->read_sint(rotate_nbits) / 65536.0f; m_[0][1] = in->read_sint(rotate_nbits) / 65536.0f; } int translate_nbits = in->read_uint(5); if (translate_nbits > 0) { m_[0][2] = (float) in->read_sint(translate_nbits); m_[1][2] = (float) in->read_sint(translate_nbits); } } static void write() { ident++; log_msg("has_scale = %d, has_rotate = %d\n", has_scale, has_rotate); log_msg("| %4.4f %4.4f %4.4f |\n", m_[0][0], m_[0][1], TWIPS_TO_PIXELS(m_[0][2])); log_msg("| %4.4f %4.4f %4.4f |\n", m_[1][0], m_[1][1], TWIPS_TO_PIXELS(m_[1][2])); ident--; } }; float matrix::m_[2][3]; bool matrix::has_scale, matrix::has_rotate; struct rect { static Uint32 x_min,x_max,y_min,y_max; static void parse(stream* in) { in->align(); int nbits = in->read_uint(5); x_min = in->read_sint(nbits); x_max = in->read_sint(nbits); y_min = in->read_sint(nbits); y_max = in->read_sint(nbits); } static void write() { ident++; log_msg("x_min: %i, x_max: %i, width: %i twips, %4.0f pixels\n", x_min, x_max, x_max - x_min, TWIPS_TO_PIXELS(x_max - x_min)); log_msg("y_min: %i, y_max: %i, height: %i twips, %4.0f pixels\n", y_min, y_max, y_max - y_min, TWIPS_TO_PIXELS(y_max - y_min)); ident--; } }; Uint32 rect::x_min; Uint32 rect::y_min; Uint32 rect::x_max; Uint32 rect::y_max; struct rgb { static Uint8 m_r, m_g, m_b; static void parse(stream* in) { m_r = in->read_u8(); m_g = in->read_u8(); m_b = in->read_u8(); } static void write() { ident++; log_msg("rgb: %d %d %d \n", m_r, m_g, m_b); ident--; } }; Uint8 rgb::m_r; Uint8 rgb::m_g; Uint8 rgb::m_b; struct rgba { static Uint8 m_r, m_g, m_b, m_a; static void parse(stream* in) { m_r = in->read_u8(); m_g = in->read_u8(); m_b = in->read_u8(); m_a = in->read_u8(); } static void write() { ident++; log_msg("rgba: %d %d %d %d\n", m_r, m_g, m_b, m_a); ident--; } }; Uint8 rgba::m_r; Uint8 rgba::m_g; Uint8 rgba::m_b; Uint8 rgba::m_a; struct cxform { static float m_[4][2]; static bool has_add, has_mult; static void parse_rgb(stream* in) { in->align(); int has_add = in->read_uint(1); int has_mult = in->read_uint(1); int nbits = in->read_uint(4); if (has_mult) { m_[0][0] = in->read_sint(nbits) / 255.0f; m_[1][0] = in->read_sint(nbits) / 255.0f; m_[2][0] = in->read_sint(nbits) / 255.0f; m_[3][0] = 1; } else { for (int i = 0; i < 4; i++) { m_[i][0] = 1; } } if (has_add) { m_[0][1] = (float) in->read_sint(nbits); m_[1][1] = (float) in->read_sint(nbits); m_[2][1] = (float) in->read_sint(nbits); m_[3][1] = 1; } else { for (int i = 0; i < 4; i++) { m_[i][1] = 0; } } } static void parse_rgba(stream* in) { in->align(); int has_add = in->read_uint(1); int has_mult = in->read_uint(1); int nbits = in->read_uint(4); if (has_mult) { m_[0][0] = in->read_sint(nbits) / 255.0f; m_[1][0] = in->read_sint(nbits) / 255.0f; m_[2][0] = in->read_sint(nbits) / 255.0f; m_[3][0] = in->read_sint(nbits) / 255.0f; } else { for (int i = 0; i < 4; i++) { m_[i][0] = 1; } } if (has_add) { m_[0][1] = (float) in->read_sint(nbits); m_[1][1] = (float) in->read_sint(nbits); m_[2][1] = (float) in->read_sint(nbits); m_[3][1] = (float) in->read_sint(nbits); } else { for (int i = 0; i < 4; i++) { m_[i][1] = 0; } } } static void write() { ident++; log_msg("cxform:\n"); log_msg("has_add = %d, has_mult = %d\n", has_add, has_mult); log_msg("| %4.4f %4.4f |\n", m_[0][0], m_[0][1]); log_msg("| %4.4f %4.4f |\n", m_[1][0], m_[1][1]); log_msg("| %4.4f %4.4f |\n", m_[2][0], m_[2][1]); log_msg("| %4.4f %4.4f |\n", m_[3][0], m_[3][1]); ident--; } }; float cxform::m_[4][2]; bool cxform::has_add; bool cxform::has_mult; // tag 0 void parse_end_movie(stream* input, int tag_type) { assert(tag_type == 0); ident--; log_msg("\n"); log_msg("Movie ended\n\n"); } // tag 1 void parse_show_frame(stream* input, int tag_type) { assert(tag_type == 1); ident--; current_frame++; log_msg("\n"); log_msg("show frame %i\n\n", current_frame); ident++; } // tag 2, 22, 32 void parse_define_shape123(stream* input, int tag_type) { assert(tag_type == 2 || tag_type == 22 || tag_type == 32); if(tag_type == 2) log_msg("define_shape:\n"); if(tag_type == 22) log_msg("define_shape2:\n"); if(tag_type == 32) log_msg("define_shape3:\n"); ident++; log_msg("character ID: %i\n", input->read_u16()); ident--; } // tag 4, 26 void parse_place_object12(stream* input, int tag_type) { assert(tag_type == 4 || tag_type == 26); if (tag_type == 4) { log_msg("place_object:\n"); ident++; log_msg("character ID: %i\n",input->read_u16()); log_msg("depth: %i\n",input->read_u16()); log_msg("matrix:\n"); matrix::parse(input); matrix::write(); if (input->get_position() < input->get_tag_end_position()) { log_msg("color transform:\n"); cxform::parse_rgb(input); cxform::write(); } ident--; } else if (tag_type == 26) { input->align(); log_msg("place_object2:\n"); ident++; bool has_actions = input->read_uint(1) ? true : false; bool has_clip_depth = input->read_uint(1) ? true : false; bool has_name = input->read_uint(1) ? true : false; bool has_ratio = input->read_uint(1) ? true : false; bool has_cxform = input->read_uint(1) ? true : false; bool has_matrix = input->read_uint(1) ? true : false; bool has_char = input->read_uint(1) ? true : false; bool flag_move = input->read_uint(1) ? true : false; UNUSED(has_actions); log_msg("depth: %i\n",input->read_u16()); if (has_char) { log_msg("character ID: %i\n",input->read_u16()); } if (has_matrix) { log_msg("matrix:\n"); matrix::parse(input); matrix::write(); } if (has_cxform) { log_msg("color transform:"); cxform::parse_rgba(input); cxform::write(); } if (has_ratio) { log_msg("ratio: %i\n",input->read_u16()); } if (has_name) { log_msg("name: %s\n",input->read_string()); } if (has_clip_depth) { log_msg("clipdepth: %i\n",input->read_u16()); } if (has_clip_depth) { log_msg("has_actions: to be implemented\n"); } if (has_char == true && flag_move == true) { log_msg("replacing a character previously at this depth\n"); } else if (has_char == false && flag_move == true) { log_msg("moving a character previously at this depth\n"); } else if (has_char == true && flag_move == false) { log_msg("placing a character first time at this depth\n"); } ident--; } } // tag 5, 28 void parse_remove_object12(stream* input, int tag_type) { assert(tag_type == 5 || tag_type == 28); if (tag_type==5) { log_msg("remove_object\n"); ident++; log_msg("character ID: %i\n", input->read_u16()); log_msg("depth: %i\n", input->read_u16()); ident--; } if (tag_type==28) { log_msg("remove_object_2\n"); ident++; log_msg("depth: %i\n", input->read_u16()); ident--; } } // tag 46 void parse_define_shape_morph(stream *input, int tag_type) { assert(tag_type == 46); log_msg("define_shape_morph\n"); ident++; log_msg("character ID: %i\n", input->read_u16()); ident--; } // tag 6 void parse_define_bits(stream* input, int tag_type) { assert(tag_type==6); log_msg("define jpeg bits\n"); ident++; log_msg("character ID: %i\n", input->read_u16()); ident--; } void parse_jpeg_tables(stream* input, int tag_type) { assert(tag_type==8); log_msg("define jpeg table\n\n"); } void parse_set_background_color(stream* input, int tag_type) { assert(tag_type==9); rgb::parse(input); log_msg("set background color to:\n"); rgb::write(); } void parse_do_action(stream* input, int tag_type) { assert(tag_type==12); log_msg("do action:\n"); ident++; log_msg("to be implemented\n"); ident--; } void parse_define_sprite(stream* input, int tag_type) { assert(tag_type==39); log_msg("define a new sprite:\n"); ident++; int tag_end = input->get_tag_end_position(); Uint32 char_id = input->read_u16(); Uint32 sprite_frame_count = input->read_u16(); log_msg("character ID: %i\n", char_id); log_msg("frame count of sprite: %i\n", sprite_frame_count); Uint32 old_current_frame = current_frame; current_frame = 0; ident++; log_msg("\n"); log_msg("starting frame 0\n\n"); ident++; while ((Uint32) input->get_position() < (Uint32) tag_end) { int tag_type = input->open_tag(); loader_function lf = NULL; if (tag_type == 0) { ident--; ident--; ident--; log_msg("end of sprite definition\n\n"); } else if (tag_loaders.get(tag_type, &lf)) { (*lf)(input, tag_type); } else { log_msg("warning: no tag loader for tag_type %d\n", tag_type); } input->close_tag(); } current_frame = old_current_frame; } void parse_set_framelabel(stream* input, int tag_type) { assert(tag_type==43); log_msg("current framelabel:\n"); ident++; char* str = input->read_string(); log_msg("%s\n",str); delete str; if (input->get_position() < input->get_tag_end_position()) { //TODOm_color_transform.read_rgb(in); } ident--; } void parse_swf(tu_file* file) { register_tag_loader(0,parse_end_movie); register_tag_loader(1,parse_show_frame); register_tag_loader(2,parse_define_shape123); register_tag_loader(4,parse_place_object12); register_tag_loader(5,parse_remove_object12); register_tag_loader(6,parse_define_bits); register_tag_loader(8,parse_jpeg_tables); register_tag_loader(9,parse_set_background_color); register_tag_loader(12,parse_do_action); register_tag_loader(22,parse_define_shape123); register_tag_loader(26,parse_place_object12); register_tag_loader(28,parse_remove_object12); register_tag_loader(32,parse_define_shape123); register_tag_loader(39,parse_define_sprite); register_tag_loader(43,parse_set_framelabel); register_tag_loader(46,parse_define_shape_morph); ident = 1; Uint32 header = file->read_le32(); Uint32 file_length = file->read_le32(); Uint32 version = (header >> 24) & 255; if ((header & 0x0FFFFFF) != 0x00535746 && (header & 0x0FFFFFF) != 0x00535743) { log_msg("\nNo valid SWF file, header is incorrect!\n"); return; } bool compressed = (header & 255) == 'C'; tu_file* original_file = NULL; log_msg("\nSWF version %i, file length = %i bytes\n", version, file_length); if (compressed) { log_msg("file is compressed.\n"); original_file = file; file = zlib_adapter::make_inflater(original_file); file_length -= 8; } stream str(file); rect::parse(&str); float frame_rate = str.read_u16() / 256.0f; int frame_count = str.read_u16(); log_msg("viewport:\n"); rect::write(); log_msg("frame rate = %f, number of frames = %d\n", frame_rate, frame_count); log_msg("\n"); log_msg("starting frame 0\n\n"); ident++; while ((Uint32) str.get_position() < file_length) { int tag_type = str.open_tag(); loader_function lf = NULL; if (tag_loaders.get(tag_type, &lf)) { (*lf)(&str, tag_type); } else { log_msg("warning: no tag loader for tag_type %d\n", tag_type); } str.close_tag(); if (tag_type == 0) { if ((unsigned int)str.get_position() != file_length) { log_msg("warning: end of file tag found, while not at the end of the file, aborting\n"); break; } } } if (out) { delete out; } if (original_file) { delete file; } exit(0); } } int main(int argc, char *argv[]) { const char* infile = argv[1]; gameswf::register_log_callback(parser::log_callback); if (infile == NULL) { log_msg("pass a filename as a parameter"); exit(1); } tu_file* in = new tu_file(infile, "rb"); if (in->get_error()) { log_msg("can't open '%s' for input\n", infile); delete in; exit(1); } parser::parse_swf(in); return(0); } // Local Variables: // mode: C++ // c-basic-offset: 8 // tab-width: 8 // indent-tabs-mode: t // End:
cb6c009856ff5ff6a460ae646531d917d162d7be
3b9b4049a8e7d38b49e07bb752780b2f1d792851
/src/chrome/browser/policy/test/local_policy_test_server.cc
db03d3436918fd73ec71176e0965bef3ba97d298
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
webosce/chromium53
f8e745e91363586aee9620c609aacf15b3261540
9171447efcf0bb393d41d1dc877c7c13c46d8e38
refs/heads/webosce
2020-03-26T23:08:14.416858
2018-08-23T08:35:17
2018-09-20T14:25:18
145,513,343
0
2
Apache-2.0
2019-08-21T22:44:55
2018-08-21T05:52:31
null
UTF-8
C++
false
false
9,657
cc
// Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/policy/test/local_policy_test_server.h" #include <ctype.h> #include <stdint.h> #include <algorithm> #include <vector> #include "base/base_paths.h" #include "base/files/file_util.h" #include "base/json/json_writer.h" #include "base/path_service.h" #include "base/strings/stringprintf.h" #include "build/build_config.h" #include "components/policy/core/common/cloud/cloud_policy_constants.h" #include "crypto/rsa_private_key.h" #include "net/test/python_utils.h" namespace policy { namespace { // Filename in the temporary directory storing the policy data. const base::FilePath::CharType kPolicyFileName[] = FILE_PATH_LITERAL("policy"); // Private signing key file within the temporary directory. const base::FilePath::CharType kSigningKeyFileName[] = FILE_PATH_LITERAL("signing_key"); // Private signing key signature file within the temporary directory. const base::FilePath::CharType kSigningKeySignatureFileName[] = FILE_PATH_LITERAL("signing_key.sig"); // The file containing client definitions to be passed to the server. const base::FilePath::CharType kClientStateFileName[] = FILE_PATH_LITERAL("clients"); // Dictionary keys for the client state file. Needs to be kept in sync with // policy_testserver.py. const char kClientStateKeyAllowedPolicyTypes[] = "allowed_policy_types"; const char kClientStateKeyDeviceId[] = "device_id"; const char kClientStateKeyDeviceToken[] = "device_token"; const char kClientStateKeyMachineName[] = "machine_name"; const char kClientStateKeyMachineId[] = "machine_id"; // Checks whether a given character should be replaced when constructing a file // name. To keep things simple, this is a bit over-aggressive. Needs to be kept // in sync with policy_testserver.py. bool IsUnsafeCharacter(char c) { return !(isalnum(c) || c == '.' || c == '@' || c == '-'); } } // namespace LocalPolicyTestServer::LocalPolicyTestServer() : net::LocalTestServer(net::BaseTestServer::TYPE_HTTP, net::BaseTestServer::kLocalhost, base::FilePath()) { CHECK(server_data_dir_.CreateUniqueTempDir()); config_file_ = server_data_dir_.path().Append(kPolicyFileName); } LocalPolicyTestServer::LocalPolicyTestServer(const base::FilePath& config_file) : net::LocalTestServer(net::BaseTestServer::TYPE_HTTP, net::BaseTestServer::kLocalhost, base::FilePath()), config_file_(config_file) {} LocalPolicyTestServer::LocalPolicyTestServer(const std::string& test_name) : net::LocalTestServer(net::BaseTestServer::TYPE_HTTP, net::BaseTestServer::kLocalhost, base::FilePath()) { // Read configuration from a file in chrome/test/data/policy. base::FilePath source_root; CHECK(PathService::Get(base::DIR_SOURCE_ROOT, &source_root)); config_file_ = source_root .AppendASCII("chrome") .AppendASCII("test") .AppendASCII("data") .AppendASCII("policy") .AppendASCII(base::StringPrintf("policy_%s.json", test_name.c_str())); } LocalPolicyTestServer::~LocalPolicyTestServer() {} bool LocalPolicyTestServer::SetSigningKeyAndSignature( const crypto::RSAPrivateKey* key, const std::string& signature) { CHECK(server_data_dir_.IsValid()); std::vector<uint8_t> signing_key_bits; if (!key->ExportPrivateKey(&signing_key_bits)) return false; policy_key_ = server_data_dir_.path().Append(kSigningKeyFileName); int bytes_written = base::WriteFile( policy_key_, reinterpret_cast<const char*>(signing_key_bits.data()), signing_key_bits.size()); if (bytes_written != static_cast<int>(signing_key_bits.size())) return false; // Write the signature data. base::FilePath signature_file = server_data_dir_.path().Append( kSigningKeySignatureFileName); bytes_written = base::WriteFile( signature_file, signature.c_str(), signature.size()); return bytes_written == static_cast<int>(signature.size()); } void LocalPolicyTestServer::RegisterClient(const std::string& dm_token, const std::string& device_id) { CHECK(server_data_dir_.IsValid()); std::unique_ptr<base::DictionaryValue> client_dict( new base::DictionaryValue()); client_dict->SetString(kClientStateKeyDeviceId, device_id); client_dict->SetString(kClientStateKeyDeviceToken, dm_token); client_dict->SetString(kClientStateKeyMachineName, std::string()); client_dict->SetString(kClientStateKeyMachineId, std::string()); // Allow all policy types for now. std::unique_ptr<base::ListValue> types(new base::ListValue()); types->AppendString(dm_protocol::kChromeDevicePolicyType); types->AppendString(dm_protocol::kChromeUserPolicyType); types->AppendString(dm_protocol::kChromePublicAccountPolicyType); types->AppendString(dm_protocol::kChromeExtensionPolicyType); client_dict->Set(kClientStateKeyAllowedPolicyTypes, types.release()); clients_.Set(dm_token, client_dict.release()); } bool LocalPolicyTestServer::UpdatePolicy(const std::string& type, const std::string& entity_id, const std::string& policy) { CHECK(server_data_dir_.IsValid()); std::string selector = GetSelector(type, entity_id); base::FilePath policy_file = server_data_dir_.path().AppendASCII( base::StringPrintf("policy_%s.bin", selector.c_str())); return base::WriteFile(policy_file, policy.c_str(), policy.size()) == static_cast<int>(policy.size()); } bool LocalPolicyTestServer::UpdatePolicyData(const std::string& type, const std::string& entity_id, const std::string& data) { CHECK(server_data_dir_.IsValid()); std::string selector = GetSelector(type, entity_id); base::FilePath data_file = server_data_dir_.path().AppendASCII( base::StringPrintf("policy_%s.data", selector.c_str())); return base::WriteFile(data_file, data.c_str(), data.size()) == static_cast<int>(data.size()); } GURL LocalPolicyTestServer::GetServiceURL() const { return GetURL("device_management"); } bool LocalPolicyTestServer::SetPythonPath() const { if (!net::LocalTestServer::SetPythonPath()) return false; // Add the net/tools/testserver directory to the path. base::FilePath net_testserver_path; if (!LocalTestServer::GetTestServerPath(&net_testserver_path)) { LOG(ERROR) << "Failed to get net testserver path."; return false; } AppendToPythonPath(net_testserver_path.DirName()); // We need protobuf python bindings. base::FilePath third_party_dir; if (!PathService::Get(base::DIR_SOURCE_ROOT, &third_party_dir)) { LOG(ERROR) << "Failed to get DIR_SOURCE_ROOT"; return false; } AppendToPythonPath(third_party_dir .AppendASCII("third_party") .AppendASCII("protobuf") .AppendASCII("python")); // Add the generated python protocol buffer bindings. base::FilePath pyproto_dir; if (!GetPyProtoPath(&pyproto_dir)) { LOG(ERROR) << "Cannot find pyproto dir for generated code."; return false; } AppendToPythonPath(pyproto_dir .AppendASCII("policy") .AppendASCII("proto")); #if defined(OS_CHROMEOS) AppendToPythonPath(pyproto_dir .AppendASCII("chrome") .AppendASCII("browser") .AppendASCII("chromeos") .AppendASCII("policy") .AppendASCII("proto")); #endif return true; } bool LocalPolicyTestServer::GetTestServerPath( base::FilePath* testserver_path) const { base::FilePath source_root; if (!PathService::Get(base::DIR_SOURCE_ROOT, &source_root)) { LOG(ERROR) << "Failed to get DIR_SOURCE_ROOT"; return false; } *testserver_path = source_root .AppendASCII("chrome") .AppendASCII("browser") .AppendASCII("policy") .AppendASCII("test") .AppendASCII("policy_testserver.py"); return true; } bool LocalPolicyTestServer::GenerateAdditionalArguments( base::DictionaryValue* arguments) const { if (!net::LocalTestServer::GenerateAdditionalArguments(arguments)) return false; arguments->SetString("config-file", config_file_.AsUTF8Unsafe()); if (!policy_key_.empty()) arguments->SetString("policy-key", policy_key_.AsUTF8Unsafe()); if (server_data_dir_.IsValid()) { arguments->SetString("data-dir", server_data_dir_.path().AsUTF8Unsafe()); if (!clients_.empty()) { std::string json; base::JSONWriter::Write(clients_, &json); base::FilePath client_state_file = server_data_dir_.path().Append(kClientStateFileName); if (base::WriteFile(client_state_file, json.c_str(), json.size()) != static_cast<int>(json.size())) { return false; } arguments->SetString("client-state", client_state_file.AsUTF8Unsafe()); } } return true; } std::string LocalPolicyTestServer::GetSelector(const std::string& type, const std::string& entity_id) { std::string selector = type; if (!entity_id.empty()) selector = base::StringPrintf("%s/%s", type.c_str(), entity_id.c_str()); std::replace_if(selector.begin(), selector.end(), IsUnsafeCharacter, '_'); return selector; } } // namespace policy
fd45ba8eb1606fcf3d348b40de41629b677090cb
e1606c0e46d16bf496ecd18eb86a358f7c0042e4
/boost_1_41_0/libs/spirit/example/qi/mini_xml3.cpp
6a36c4318c24e04c96a653ce01b29c655ef77368
[ "BSL-1.0" ]
permissive
GunioRobot/scribe-dependencies
8d3b5520220e2e00aadbc44c6196f9db7a6172dc
4da79674cea60143a77e100e0c8b631d26c94e61
refs/heads/master
2021-01-23T13:18:21.298469
2010-03-17T17:11:37
2010-03-17T17:11:37
null
0
0
null
null
null
null
UTF-8
C++
false
false
7,436
cpp
/*============================================================================= Copyright (c) 2001-2009 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ /////////////////////////////////////////////////////////////////////////////// // // A mini XML-like parser // // [ JDG March 25, 2007 ] spirit2 // /////////////////////////////////////////////////////////////////////////////// #include <boost/config/warning_disable.hpp> #include <boost/spirit/include/qi.hpp> #include <boost/spirit/include/phoenix_core.hpp> #include <boost/spirit/include/phoenix_operator.hpp> #include <boost/spirit/include/phoenix_fusion.hpp> #include <boost/spirit/include/phoenix_stl.hpp> #include <boost/spirit/include/phoenix_object.hpp> #include <boost/fusion/include/adapt_struct.hpp> #include <boost/variant/recursive_variant.hpp> #include <boost/foreach.hpp> #include <iostream> #include <fstream> #include <string> #include <vector> namespace client { namespace fusion = boost::fusion; namespace phoenix = boost::phoenix; namespace qi = boost::spirit::qi; namespace ascii = boost::spirit::ascii; /////////////////////////////////////////////////////////////////////////// // Our mini XML tree representation /////////////////////////////////////////////////////////////////////////// struct mini_xml; typedef boost::variant< boost::recursive_wrapper<mini_xml> , std::string > mini_xml_node; struct mini_xml { std::string name; // tag name std::vector<mini_xml_node> children; // children }; } // We need to tell fusion about our mini_xml struct // to make it a first-class fusion citizen BOOST_FUSION_ADAPT_STRUCT( client::mini_xml, (std::string, name) (std::vector<client::mini_xml_node>, children) ) namespace client { /////////////////////////////////////////////////////////////////////////// // Print out the mini xml tree /////////////////////////////////////////////////////////////////////////// int const tabsize = 4; void tab(int indent) { for (int i = 0; i < indent; ++i) std::cout << ' '; } struct mini_xml_printer { mini_xml_printer(int indent = 0) : indent(indent) { } void operator()(mini_xml const& xml) const; int indent; }; struct mini_xml_node_printer : boost::static_visitor<> { mini_xml_node_printer(int indent = 0) : indent(indent) { } void operator()(mini_xml const& xml) const { mini_xml_printer(indent+tabsize)(xml); } void operator()(std::string const& text) const { tab(indent+tabsize); std::cout << "text: \"" << text << '"' << std::endl; } int indent; }; void mini_xml_printer::operator()(mini_xml const& xml) const { tab(indent); std::cout << "tag: " << xml.name << std::endl; tab(indent); std::cout << '{' << std::endl; BOOST_FOREACH(mini_xml_node const& node, xml.children) { boost::apply_visitor(mini_xml_node_printer(indent), node); } tab(indent); std::cout << '}' << std::endl; } /////////////////////////////////////////////////////////////////////////// // Our mini XML grammar definition /////////////////////////////////////////////////////////////////////////// //[tutorial_xml3_grammar template <typename Iterator> struct mini_xml_grammar : qi::grammar<Iterator, mini_xml(), qi::locals<std::string>, ascii::space_type> { mini_xml_grammar() : mini_xml_grammar::base_type(xml, "xml") { using qi::lit; using qi::lexeme; using qi::on_error; using qi::fail; using ascii::char_; using ascii::string; using namespace qi::labels; using phoenix::construct; using phoenix::val; text %= lexeme[+(char_ - '<')]; node %= xml | text; start_tag %= '<' >> !lit('/') > lexeme[+(char_ - '>')] > '>' ; end_tag = "</" > string(_r1) > '>' ; xml %= start_tag[_a = _1] > *node > end_tag(_a) ; xml.name("xml"); node.name("node"); text.name("text"); start_tag.name("start_tag"); end_tag.name("end_tag"); on_error<fail> ( xml , std::cout << val("Error! Expecting ") << _4 // what failed? << val(" here: \"") << construct<std::string>(_3, _2) // iterators to error-pos, end << val("\"") << std::endl ); } qi::rule<Iterator, mini_xml(), qi::locals<std::string>, ascii::space_type> xml; qi::rule<Iterator, mini_xml_node(), ascii::space_type> node; qi::rule<Iterator, std::string(), ascii::space_type> text; qi::rule<Iterator, std::string(), ascii::space_type> start_tag; qi::rule<Iterator, void(std::string), ascii::space_type> end_tag; }; //] } /////////////////////////////////////////////////////////////////////////////// // Main program /////////////////////////////////////////////////////////////////////////////// int main(int argc, char **argv) { char const* filename; if (argc > 1) { filename = argv[1]; } else { std::cerr << "Error: No input file provided." << std::endl; return 1; } std::ifstream in(filename, std::ios_base::in); if (!in) { std::cerr << "Error: Could not open input file: " << filename << std::endl; return 1; } std::string storage; // We will read the contents here. in.unsetf(std::ios::skipws); // No white space skipping! std::copy( std::istream_iterator<char>(in), std::istream_iterator<char>(), std::back_inserter(storage)); typedef client::mini_xml_grammar<std::string::const_iterator> mini_xml_grammar; mini_xml_grammar xml; // Our grammar client::mini_xml ast; // Our tree using boost::spirit::ascii::space; std::string::const_iterator iter = storage.begin(); std::string::const_iterator end = storage.end(); bool r = phrase_parse(iter, end, xml, space, ast); if (r && iter == end) { std::cout << "-------------------------\n"; std::cout << "Parsing succeeded\n"; std::cout << "-------------------------\n"; client::mini_xml_printer printer; printer(ast); return 0; } else { std::cout << "-------------------------\n"; std::cout << "Parsing failed\n"; std::cout << "-------------------------\n"; return 1; } }
6f6bf0ccfe18efa4530e280ce078296c02bb991d
ed69b9054e162373475eb28cf9387750f26f4612
/crane_x7_control_kyun/include/crane_x7_control_kyun/dxlport_control.h
3ab961c89a42756859aeb20ca76a6b909c3b7fb1
[]
no_license
n2m2ng/ros_playground
07781537077827be354daa896abe1a524ffa59f0
c455b9e2f639d6ba83e2eae97d5657917acba94c
refs/heads/master
2020-09-16T00:14:04.928165
2020-02-06T07:39:10
2020-02-06T07:39:10
223,593,785
2
0
null
2020-02-06T07:39:11
2019-11-23T13:35:01
C++
UTF-8
C++
false
false
4,680
h
#ifndef DXLPORT_CONTROL_H #define DXLPORT_CONTROL_H #include <map> #include <string> #include <vector> #include <queue> #include <ros/ros.h> #include <hardware_interface/joint_command_interface.h> #include <hardware_interface/joint_state_interface.h> #include <hardware_interface/robot_hw.h> #include <dynamixel_sdk/dynamixel_sdk.h> #include <crane_x7_control_kyun/joint_control.h> #include <crane_x7_control_kyun/control_setting.h> // Motion data typedef struct HOME_MOTION_DATA { uint16_t home; double home_rad; uint16_t start; double start_rad; uint16_t step; double step_rad; } ST_HOME_MOTION_DATA; // Dynamixel protocol serial port class class DXLPORT_CONTROL : public hardware_interface::RobotHW { public: DXLPORT_CONTROL( ros::NodeHandle handle, CONTROL_SETTING &setting ); ~DXLPORT_CONTROL(); ros::Time getTime() const { return ros::Time::now(); } ros::Duration getDuration( ros::Time t ) const { return (ros::Time::now() - t); } bool read( ros::Time, ros::Duration ); void readPos( ros::Time, ros::Duration ); void readCurrent( ros::Time, ros::Duration ); void readTemp( ros::Time, ros::Duration ); void readVel( ros::Time, ros::Duration ); void write( ros::Time, ros::Duration ); void set_torque_all( bool torque ); bool set_torque( uint8_t dxl_id, bool torque ); void set_watchdog( uint8_t dxl_id, uint8_t value ); void set_watchdog_all( uint8_t value ); void startup_motion( void ); void set_gain_all( uint16_t gain ); void set_gain( uint8_t dxl_id, uint16_t gain ); void set_goal_current_all( uint16_t current ); void set_goal_current( uint8_t dxl_id, uint16_t current ); bool get_init_stat( void ){ return init_stat; } uint8_t get_joint_num( void ){ return joint_num; } std::string self_check( void ); void effort_limitter( void ); void init_joint_params( ST_JOINT_PARAM &param, int table_id, int value ); void set_param_delay_time( uint8_t dxl_id, int val ); void set_param_drive_mode( uint8_t dxl_id, int val ); void set_param_ope_mode( uint8_t dxl_id, int val ); void set_param_home_offset( uint8_t dxl_id, int val ); void set_param_moving_threshold( uint8_t dxl_id, int val ); void set_param_temp_limit( uint8_t dxl_id, int val ); void set_param_vol_limit( uint8_t dxl_id, int max, int min ); void set_param_current_limit( uint8_t dxl_id, int val ); void set_param_vel_gain( uint8_t dxl_id, int p, int i ); void set_param_pos_gain( uint8_t dxl_id, int p, int i, int d ); bool is_change_positions( void ); std::string::size_type get_error( std::string& errorlog ); uint32_t tempCount; std::vector<JOINT_CONTROL> joints; private: uint8_t joint_num; bool port_stat; dynamixel::PacketHandler *packetHandler; dynamixel::PortHandler *portHandler; hardware_interface::JointStateInterface joint_stat_if; hardware_interface::PositionJointInterface joint_pos_if; hardware_interface::EffortJointInterface joint_eff_if; joint_limits_interface::PositionJointSoftLimitsInterface joint_limits_if; dynamixel::GroupBulkRead *readTempGroup; dynamixel::GroupBulkRead *readMovementGroup; dynamixel::GroupBulkWrite *writeGoalGroup; bool init_stat; uint32_t rx_err; uint32_t tx_err; ros::Time tempTime; std::queue<std::string> error_queue; bool check_servo_param( uint8_t dxl_id, uint32_t test_addr, uint8_t equal, uint8_t& read_val ); bool check_servo_param( uint8_t dxl_id, uint32_t test_addr, uint16_t equal, uint16_t& read_val ); bool check_servo_param( uint8_t dxl_id, uint32_t test_addr, uint32_t equal, uint32_t& read_val ); }; #endif /* DXLPORT_CONTROL_H */
5edaecc88f102e1fad708b2d5b098b96eb05dead
26de8ddf113f8497af0ea3664f623e460a50ded4
/Wolfeinstein_clone/RL/Model3D.cpp
faef310bd1332d7a07ab082d5db87684e36ee8d9
[]
no_license
scrounchtike/LumaxEngine
3f2f22dd845bb8714a36c1818969eb2ccdb0c64b
7c350622fe6b33caf9ec5ec315fe6375b736b152
refs/heads/master
2020-03-16T09:54:27.680618
2019-02-15T00:15:03
2019-02-15T00:15:03
132,625,220
1
0
null
null
null
null
UTF-8
C++
false
false
8,917
cpp
#include "Model3D.hpp" #include <cassert> #ifdef _USE_OPENGL #include "models3D/Model3DGL.hpp" #elif defined _USE_DIRECTX11 #include "models3D/Model3DDX11.hpp" #endif Model3D::Model3D(const float* vertices, int numVertices) : ID(genID()){ #ifdef _USE_OPENGL model = new Model3DGL(vertices, numVertices); #elif defined _USE_DIRECTX11 model = new Model3DDX11(vertices, numVertices); #endif } Model3D::Model3D(const float* vertices, int numVertices, const float* texCoords) : ID(genID()){ #ifdef _USE_OPENGL model = new Model3DGL(vertices, numVertices, texCoords); #elif defined _USE_DIRECTX11 model = new Model3DDX11(vertices, numVertices, texCoords); #endif } Model3D::Model3D(const float* vertices, int numVertices, const float* texCoords, const float* normals) : ID(genID()){ #ifdef _USE_OPENGL model = new Model3DGL(vertices, numVertices, texCoords, normals); #elif defined _USE_DIRECTX11 model = new Model3DDX11(vertices, numVertices, texCoords, normals); #endif } Model3D::Model3D(const float* vertices, int numVertices, const float* texCoords, const float* normals, const float* tangents) : ID(genID()){ #ifdef _USE_OPENGL model = new Model3DGL(vertices, numVertices, texCoords, normals, tangents); #elif defined _USE_DIRECTX11 model = new Model3DDX11(vertices, numVertices, texCoords, normals, tangents); #endif } Model3D::Model3D(const float* vertices, int numVertices, const int* indices, int numIndices) : ID(genID()){ #ifdef _USE_OPENGL model = new Model3DGL(vertices, numVertices, indices, numIndices); #elif defined _USE_DIRECTX11 model = new Model3DDX11(vertices, numVertices, indices, numIndices); #endif } Model3D::Model3D(const float* vertices, int numVertices, const int* indices, int numIndices, const float* texCoords) : ID(genID()){ #ifdef _USE_OPENGL model = new Model3DGL(vertices, numVertices, indices, numIndices, texCoords); #elif defined _USE_DIRECTX11 model = new Model3DDX11(vertices, numVertices, indices, numIndices, texCoords); #endif } Model3D::Model3D(const float* vertices, int numVertices, const int* indices, int numIndices, const float* texCoords, const float* normals) : ID(genID()){ #ifdef _USE_OPENGL model = new Model3DGL(vertices, numVertices, indices, numIndices, texCoords, normals); #elif defined _USE_DIRECTX11 model = new Model3DDX11(vertices, numVertices, indices, numIndices, texCoords, normals); #endif } Model3D::Model3D(const float* vertices, int numVertices, const int* indices, int numIndices, const float* texCoords, const float* normals, const float* tangents) : ID(genID()) { #ifdef _USE_OPENGL model = new Model3DGL(vertices, numVertices, indices, numIndices, texCoords, normals, tangents); #elif defined _USE_DIRECTX11 model = new Model3DDX11(vertices, numVertices, indices, numIndices, texCoords, normals, tangents); #endif } // Terrain models Model3D::Model3D(const float* vertices, int numVertices, const float* texCoords, const float* normals, const float* slopes, bool terrain) : ID(genID()) { #ifdef _USE_OPENGL model = new Model3DGL(vertices, numVertices, texCoords, normals, slopes, terrain); #elif defined _USE_DIRECTX11 model = new Model3DDX11(vertices, numVertices, texCoords, normals, slopes, terrain); #endif } Model3D::Model3D(const float* vertices, int numVertices, const int* indices, int numIndices, const float* texCoords, const float* normals, const float* slopes, bool terrain) : ID(genID()) { #ifdef _USE_OPENGL model = new Model3DGL(vertices, numVertices, indices, numIndices, texCoords, normals, slopes, terrain); #elif defined _USE_DIRECTX11 model = new Model3DDX11(vertices, numVertices, indices, numIndices, texCoords, normals, slopes, terrain); #endif } Model3D::Model3D(const std::vector<float>& vertices) : ID(genID()){ #ifdef _USE_OPENGL model = new Model3DGL(&vertices[0], vertices.size()/3.0); #elif defined _USE_DIRECTX11 model = new Model3DDX11(&vertices[0], vertices.size()/3.0); #endif } Model3D::Model3D(const std::vector<float>& vertices, const std::vector<float>& texCoords) : ID(genID()){ #ifdef _USE_OPENGL model = new Model3DGL(&vertices[0], vertices.size()/3.0, &texCoords[0]); #elif defined _USE_DIRECTX11 model = new Model3DDX11(&vertices[0], vertices.size()/3.0, &texCoords[0]); #endif } Model3D::Model3D(const std::vector<float>& vertices, const std::vector<float>& texCoords, const std::vector<float>& normals) : ID(genID()){ #ifdef _USE_OPENGL model = new Model3DGL(&vertices[0], vertices.size()/3.0, &texCoords[0], &normals[0]); #elif defined _USE_DIRECTX11 model = new Model3DDX11(&vertices[0], vertices.size()/3.0, &texCoords[0], &normals[0]); #endif } Model3D::Model3D(const std::vector<float>& vertices, const std::vector<float>& texCoords, const std::vector<float>& normals, const std::vector<float>& tangents) : ID(genID()){ #ifdef _USE_OPENGL model = new Model3DGL(&vertices[0], vertices.size()/3.0, &texCoords[0], &normals[0], &tangents[0]); #elif defined _USE_DIRECTX11 model = new Model3DDX11(&vertices[0], vertices.size()/3.0, &texCoords[0], &normals[0], &tangents[0]); #endif } Model3D::Model3D(const std::vector<float>& vertices, const std::vector<int>& indices) : ID(genID()){ #ifdef _USE_OPENGL model = new Model3DGL(&vertices[0], vertices.size()/3.0, &indices[0], indices.size()); #elif defined _USE_DIRECTX11 model = new Model3DDX11(&vertices[0], vertices.size()/3.0, &indices[0], indices.size()); #endif } Model3D::Model3D(const std::vector<float>& vertices, const std::vector<int>& indices, const std::vector<float>& texCoords) : ID(genID()){ #ifdef _USE_OPENGL model = new Model3DGL(&vertices[0], vertices.size()/3.0, &indices[0], indices.size(), &texCoords[0]); #elif defined _USE_DIRECTX11 model = new Model3DDX11(&vertices[0], vertices.size()/3.0, &indices[0], indices.size(), &texCoords[0]); #endif } Model3D::Model3D(const std::vector<float>& vertices, const std::vector<int>& indices, const std::vector<float>& texCoords, const std::vector<float>& normals) : ID(genID()){ #ifdef _USE_OPENGL model = new Model3DGL(&vertices[0], vertices.size()/3.0, &indices[0], indices.size(), &texCoords[0], &normals[0]); #elif defined _USE_DIRECTX11 model = new Model3DDX11(&vertices[0], vertices.size()/3.0, &indices[0], indices.size(), &texCoords[0], &normals[0]); #endif } Model3D::Model3D(const std::vector<float>& vertices, const std::vector<int>& indices, const std::vector<float>& texCoords, const std::vector<float>& normals, const std::vector<float>& tangents) : ID(genID()){ #ifdef _USE_OPENGL model = new Model3DGL(&vertices[0], vertices.size()/3.0, &indices[0], indices.size(), &texCoords[0], &normals[0], &tangents[0]); #elif defined _USE_DIRECTX11 model = new Model3DDX11(&vertices[0], vertices.size()/3.0, &indices[0], indices.size(), &texCoords[0], &normals[0], &tangents[0]); #endif } // Terrain models Model3D::Model3D(const std::vector<float>& vertices, const std::vector<float>& texCoords, const std::vector<float>& normals, const std::vector<float>& slopes, bool terrain) : ID(genID()) { #ifdef _USE_OPENGL model = new Model3DGL(&vertices[0], vertices.size()/3.0, &texCoords[0], &normals[0], &slopes[0], terrain); #elif defined _USE_DIRECTX11 model = new Model3DDX11(&vertices[0], vertices.size()/3.0, &texCoords[0], &normals[0], &slopes[0], terrain); #endif } Model3D::Model3D(const std::vector<float>& vertices, const std::vector<int>& indices, const std::vector<float>& texCoords, const std::vector<float>& normals, const std::vector<float>& slopes, bool terrain) : ID(genID()) { #ifdef _USE_OPENGL model = new Model3DGL(&vertices[0], vertices.size()/3.0, &indices[0], indices.size(), &texCoords[0], &normals[0], &slopes[0], terrain); #elif defined _USE_DIRECTX11 model = new Model3DDX11(&vertices[0], vertices.size()/3.0, &indices[0], indices.size(), &texCoords[0], &normals[0], &slopes[0], terrain); #endif } Model3D::~Model3D() { delete model; } void Model3D::addAnimationWeights(const float *boneIDs, const float *weights, unsigned int numWeights){ #ifdef _USE_OPENGL model->addAnimationWeights(boneIDs, weights, numWeights); #elif defined _USE_DIRECTX11 // TODO: Support animation for DX11 3D models #endif } bool Model3D::isIndexed() const { return model->isIndexed; } bool Model3D::isTextured() const { return model->isTextured; } bool Model3D::hasNormals() const { return model->hasNormals; } bool Model3D::hasTangents() const { return model->hasTangents; } bool Model3D::isAnimated() const { return model->isAnimated; } unsigned int Model3D::getNumVertices() const { return model->numVertices; } unsigned int Model3D::getNumIndices() const { return model->numIndices; } void Model3D::update() { model->update(); } void Model3D::render() const { assert(model); model->render(); } void Model3D::bindForRender() const { model->bindForRender(); } void Model3D::renderBuffersOnly() const { model->renderBuffersOnly(); } void Model3D::unbindForRender() const { model->unbindForRender(); }
f0ad2562bf08b7b00489b3bb02fabc6046818838
3c9622405af2b183f438f9e655ffb6d42b282540
/ofx/22_08_19/src/ofApp.h
94ae8c65109ea95eef68620808c3af63ebfbd735
[]
no_license
EggOetgen/sketchbook
24d322cb6d106f8aeafac645272b7e9af372c824
ccc0da12646f668e89ef0d7c48903234541721b6
refs/heads/master
2022-12-25T15:18:40.270303
2020-10-01T18:27:29
2020-10-01T18:27:29
198,201,655
0
0
null
null
null
null
UTF-8
C++
false
false
801
h
#pragma once #include "ofMain.h" class ofApp : public ofBaseApp{ public: void setup(); void update(); void draw(); void keyPressed(int key); void keyReleased(int key); void mouseMoved(int x, int y); void mouseDragged(int x, int y, int button); void mousePressed(int x, int y, int button); void mouseReleased(int x, int y, int button); void windowResized(int w, int h); void dragEvent(ofDragInfo dragInfo); void gotMessage(ofMessage msg); ofShader shader; ofVec3f cols[6] = { ofVec3f(0.251, 0.471, 0.6), ofVec3f(0.886, 0.753, 0.267), ofVec3f(0.792, 0.082, 0.318), ofVec3f(0.059, 1.0, 0.584), ofVec3f(105./255., 98./255., 109./255.),ofVec3f(212./255., 242./255., 219./255.)}; int col = 0;; float mD, fD, sQ, mO, mW, mX, mY, lE, rE, eX, eY; };
68dc8c35cb6972ea7b0711092d8162dc9d5a8428
3d193be5bcbc0823c91fdb2504beef631d6da709
/chrome/browser/notifications/fullscreen_notification_blocker.cc
094e72f9d047b126622fc257d10de443a7f1fa45
[ "BSD-3-Clause" ]
permissive
a402539/highweb-webcl-html5spec
7a4285a729fdf98b5eea7c19a288d26d4759d7cc
644216ea0c2db67af15471b42753d76e35082759
refs/heads/master
2020-03-22T14:01:34.091922
2016-04-26T05:06:00
2016-05-03T12:58:17
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,608
cc
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/notifications/fullscreen_notification_blocker.h" #include "base/time/time.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/fullscreen.h" #include "content/public/browser/notification_service.h" #if defined(USE_ASH) #include "ash/root_window_controller.h" #include "ash/shell.h" #include "ash/system/system_notifier.h" #include "ash/wm/window_state.h" #include "ash/wm/window_state_aura.h" #include "ui/aura/window.h" #include "ui/aura/window_event_dispatcher.h" #endif namespace { bool DoesFullscreenModeBlockNotifications() { #if defined(USE_ASH) if (ash::Shell::HasInstance()) { ash::RootWindowController* controller = ash::RootWindowController::ForTargetRootWindow(); // During shutdown |controller| can be NULL. if (!controller) return false; // Block notifications if the shelf is hidden because of a fullscreen // window. const aura::Window* fullscreen_window = controller->GetWindowForFullscreenMode(); if (!fullscreen_window) return false; return ash::wm::GetWindowState(fullscreen_window)-> hide_shelf_when_fullscreen(); } #endif return IsFullScreenMode(); } } // namespace FullscreenNotificationBlocker::FullscreenNotificationBlocker( message_center::MessageCenter* message_center) : NotificationBlocker(message_center), is_fullscreen_mode_(false) { registrar_.Add(this, chrome::NOTIFICATION_FULLSCREEN_CHANGED, content::NotificationService::AllSources()); } FullscreenNotificationBlocker::~FullscreenNotificationBlocker() { } void FullscreenNotificationBlocker::CheckState() { bool was_fullscreen_mode = is_fullscreen_mode_; is_fullscreen_mode_ = DoesFullscreenModeBlockNotifications(); if (is_fullscreen_mode_ != was_fullscreen_mode) NotifyBlockingStateChanged(); } bool FullscreenNotificationBlocker::ShouldShowNotificationAsPopup( const message_center::NotifierId& notifier_id) const { bool enabled = !is_fullscreen_mode_; #if defined(USE_ASH) if (ash::Shell::HasInstance()) enabled = enabled || ash::system_notifier::ShouldAlwaysShowPopups( notifier_id); #endif return enabled; } void FullscreenNotificationBlocker::Observe( int type, const content::NotificationSource& source, const content::NotificationDetails& details) { DCHECK_EQ(chrome::NOTIFICATION_FULLSCREEN_CHANGED, type); CheckState(); }
4d664a0c73e2b555115957ee8f38653a9d447e3d
8505ebec13dc8a0ac7185fb878c4da0678f50145
/Lista5/CNodeStatic.cpp
6be5b34897eeba4ce8dca0b8678bf6557f1591d6
[]
no_license
JWojcieszonek/TEP-Lista5
b818a2ca7b009f58e61a7be22757af9468e40fae
cb9a84d6bc78d7dc550d20b782f47ebfca2b509b
refs/heads/master
2020-12-29T05:40:32.587879
2020-02-05T14:53:21
2020-02-05T14:53:21
238,475,561
0
0
null
null
null
null
UTF-8
C++
false
false
1,521
cpp
#include "CNodeStatic.h" CNodeStatic::~CNodeStatic() { //pc_parent_node = NULL; //v_children.clear(); } void CNodeStatic::vAddNewChild() { CNodeStatic cChild = CNodeStatic(); cChild.pc_parent_node = this; cChild.i_index = v_children.size(); v_children.push_back(cChild); } void CNodeStatic::vAddNewChild(CNodeStatic * pcNewChild) { pcNewChild->i_index = v_children.size(); v_children.push_back(*pcNewChild); } CNodeStatic * CNodeStatic::pcGetChild(int iChildOffset) { if (iChildOffset >= 0 && iChildOffset < v_children.size()) { return &v_children[iChildOffset]; } else return nullptr; } void CNodeStatic::vSetIndex(int iIndex) { i_index = iIndex; } void CNodeStatic::vPrintAllBelow() { vPrint(); if (!v_children.empty()) { for (vector<CNodeStatic>::iterator it = v_children.begin(); it != v_children.end(); it++) { (*it).vPrintAllBelow(); } } } void CNodeStatic::vPrintUp() { vPrint(); if(pc_parent_node!=NULL) pc_parent_node->vPrintUp(); else cout<<endl; } void CNodeStatic::vSetParent(CNodeStatic * newParent) { pc_parent_node = newParent; } CNodeStatic * CNodeStatic::pcGetParent() { return pc_parent_node; } bool CNodeStatic::bDeleteChild(int iIndex) { if (iIndex >= 0 && iIndex < v_children.size()) { v_children.erase(v_children.begin() + iIndex); for (vector<CNodeStatic>::iterator it = v_children.begin(); it != v_children.end(); it++) { (*it).vSetIndex(std::distance(v_children.begin(), it)); } return true; } else return false; }
138356d42de4b487debbabdbf2f5525c49b6a3e5
7a4640a884d513dc60e66617802e95be9fe9b3f5
/Unity/Temp/il2cppOutput/il2cppOutput/System_System_Text_RegularExpressions_Syntax_Assert324477170.h
349d950146dd35149198ee3e839d5b241ca1bc7a
[]
no_license
eray-z/Game-Engine-Benchmarks
40e455c9eb04463fef1c9d11fdea80ecad4a6404
2b427d02a801a2c2c4fb496601a458634e646c8d
refs/heads/master
2020-12-25T14:13:36.908703
2016-06-03T16:05:24
2016-06-03T16:05:24
60,355,376
5
0
null
null
null
null
UTF-8
C++
false
false
575
h
#pragma once #include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <stdint.h> #include "System_System_Text_RegularExpressions_Syntax_Compo3952301679.h" #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Text.RegularExpressions.Syntax.Assertion struct Assertion_t324477170 : public CompositeExpression_t3952301679 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif
7172fbbe9b628773dc5ed72dbb09627f27e4e963
8bd30da01c1f22f9c360153311b429b7ce65980b
/IUI/Control/ControlCore/RichTextBox/RichEditSrc/tomrange.cpp
4745af2b5f2a5cf40239cac8a3aa1da67587b438
[ "BSD-2-Clause" ]
permissive
jiaojian8063868/portsip-softphone-windows
33adf93c21b97a684219d4cc3bf5cad3ea14b008
df1b6391ff5d074cbc98cb559e52b181ef8e1b17
refs/heads/master
2022-11-19T20:22:40.519351
2020-07-24T04:06:23
2020-07-24T04:06:23
282,122,371
1
2
BSD-2-Clause
2020-07-24T04:26:24
2020-07-24T04:26:23
null
UTF-8
C++
false
false
86,349
cpp
#include "stdafx.h" #include "_common.h" #include "_select.h" #include "_edit.h" #include "_line.h" #include "_frunptr.h" #include "_tomfmt.h" #include "_disp.h" #include "_objmgr.h" #include "_callmgr.h" ASSERTDATA #define DEBUG_CLASSNAME CTxtRange #include "_invar.h" HRESULT QueryInterface(REFIID riid, REFIID riid1, IUnknown *punk, void **ppv, BOOL fZombie); BOOL SameVtables(IUnknown *punk1, IUnknown *punk2); //----------------- CTxtRange (ITextRange) PUBLIC methods ---------------------------------- //----------------------- CTxtRange IUnknown Methods ------------------------------------- /* * CTxtRange::QueryInterface (riid, ppv) * * @mfunc * IUnknown method * * @rdesc * HRESULT = (!ppv) ? E_INVALIDARG : * (interface found) ? NOERROR : E_NOINTERFACE */ STDMETHODIMP CTxtRange::QueryInterface( REFIID riid, // @parm Reference to requested interface ID void **ppv) // @parm Out parm to receive interface ptr { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::QueryInterface"); REFIID riid1 = _fSel && IsEqualIID(riid, IID_ITextSelection) ? IID_ITextSelection : IID_ITextRange; return ::QueryInterface(riid, riid1, this, ppv, IsZombie()); } /* * CTxtRange::AddRef() * * @mfunc * IUnknown method * * @rdesc * ULONG - incremented reference count */ STDMETHODIMP_(ULONG) CTxtRange::AddRef() { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::AddRef"); return ++_cRefs; } /* * CTxtRange::Release() * * @mfunc * IUnknown method * * @rdesc * ULONG - decremented reference count */ STDMETHODIMP_(ULONG) CTxtRange::Release() { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::Release"); _cRefs--; if (!_cRefs) { delete this; return 0; } Assert(_cRefs > 0); return _cRefs; } //------------------------ CTxtRange IDispatch Methods ------------------------------------- /* * CTxtRange::GetTypeInfoCount(pcTypeInfo) * * @mfunc * Get the number of TYPEINFO elements (1) * * @rdesc * HRESULT */ STDMETHODIMP CTxtRange::GetTypeInfoCount( UINT *pcTypeInfo) //@parm Out parm to receive type-info count { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::GetTypeInfoCount"); if (!pcTypeInfo) { return E_INVALIDARG; } *pcTypeInfo = 1; return NOERROR; } /* * CTxtRange::GetTypeInfo(iTypeInfo, lcid, ppTypeInfo) * * @mfunc * Return ptr to type information object for ITextSelection interface * * @rdesc * HRESULT */ STDMETHODIMP CTxtRange::GetTypeInfo( UINT iTypeInfo, //@parm Index of type info to return LCID lcid, //@parm Local ID of type info ITypeInfo **ppTypeInfo) //@parm Out parm to receive type info { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::GetTypeInfo"); return ::GetTypeInfo(iTypeInfo, g_pTypeInfoSel, ppTypeInfo); } /* * CTxtRange::GetIDsOfNames(riid, rgszNames, cNames, lcid, rgdispid) * * @mfunc * Get DISPIDs for methods in the ITextSelection, ITextRange, ITextFont, * and ITextPara interfaces * * @rdesc * HRESULT * * @devnote * If the ITextFont and ITextPara ever offer more methods than exposed * in their type libraries, the code should delegate to the corresponding * GetIDsOfNames. The current code only gets DISPIDs for the methods in * type libraries, thereby not having to instantiate the objects. */ STDMETHODIMP CTxtRange::GetIDsOfNames( REFIID riid, //@parm Interface ID to interpret names for OLECHAR **rgszNames, //@parm Array of names to be mapped UINT cNames, //@parm Count of names to be mapped LCID lcid, //@parm Local ID to use for interpretation DISPID *rgdispid) //@parm Out parm to receive name mappings { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::GetIDsOfNames"); HRESULT hr = GetTypeInfoPtrs(); // Ensure TypeInfo ptrs are OK if (hr != NOERROR) { return hr; } if (g_pTypeInfoSel->GetIDsOfNames(rgszNames, cNames, rgdispid) == NOERROR) { return NOERROR; } if (g_pTypeInfoFont->GetIDsOfNames(rgszNames, cNames, rgdispid) == NOERROR) { return NOERROR; } return g_pTypeInfoPara->GetIDsOfNames(rgszNames, cNames, rgdispid); } /* * CTxtRange::Invoke(dispidMember, riid, lcid, wFlags, pdispparams, * pvarResult, pexcepinfo, puArgError) * @mfunc * Invoke methods for the ITextRange and ITextSelection objects, as * well as for ITextFont and ITextPara interfaces on those objects. * * @rdesc * HRESULT */ STDMETHODIMP CTxtRange::Invoke( DISPID dispidMember, //@parm Identifies member function REFIID riid, //@parm Pointer to interface ID LCID lcid, //@parm Locale ID for interpretation USHORT wFlags, //@parm Flags describing context of call DISPPARAMS *pdispparams, //@parm Ptr to method arguments VARIANT *pvarResult, //@parm Out parm for result (if not NULL) EXCEPINFO *pexcepinfo, //@parm Out parm for exception info UINT *puArgError) //@parm Out parm for error { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::Invoke"); HRESULT hr = GetTypeInfoPtrs(); // Ensure TypeInfo ptrs are OK if (hr != NOERROR) { return hr; } if (IsZombie()) { return CO_E_RELEASED; } IDispatch *pDispatch; ITypeInfo *pTypeInfo; if ((DWORD)dispidMember <= 0x2ff) // Include default (0), selection, { // and range DISPIDs pTypeInfo = g_pTypeInfoSel; pDispatch = this; AddRef(); // Compensate for Release() below } else if ((DWORD)dispidMember <= 0x3ff) // 0x300 to 0x3ff: DISPIDs { // reserved for ITextFont pTypeInfo = g_pTypeInfoFont; hr = GetFont((ITextFont **)&pDispatch); } else if ((DWORD)dispidMember <= 0x4ff) // 0x400 to 0x4ff: DISPIDs { // reserved for ITextPara pTypeInfo = g_pTypeInfoPara; hr = GetPara((ITextPara **)&pDispatch); } else // dispidMember is negative or { return DISP_E_MEMBERNOTFOUND; // > 0x4ff, i.e., not TOM } if (hr != NOERROR) // Couldn't instantiate ITextFont { return hr; // or ITextPara } hr = pTypeInfo->Invoke(pDispatch, dispidMember, wFlags, pdispparams, pvarResult, pexcepinfo, puArgError); pDispatch->Release(); return hr; } //----------------------- ITextRange Methods/Properties ------------------------ /* * CTxtRange::CanEdit (pB) * * @mfunc * Set *<p pB> = tomTrue iff this range can be edited and * pB isn't NULL * * @rdesc * HRESULT = (can edit) ? NOERROR : S_FALSE */ STDMETHODIMP CTxtRange::CanEdit( long *pB) //@parm Out parm to receive boolean value { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::CanEdit"); CCallMgr callmgr(GetPed()); return IsTrue(!WriteAccessDenied(), pB); } /* * CTxtRange::CanPaste (pVar, long Format, pB) * * @mfunc * Set *<p pB> = tomTrue iff the data object <p pVar>->punkVal can be * pasted into this range and pB isn't NULL. If <p pVar> is NULL, * use the clipboard instead. * * @rdesc * HRESULT = (can paste) ? NOERROR : S_FALSE */ STDMETHODIMP CTxtRange::CanPaste( VARIANT *pVar, //@parm Data object to paste long Format, //@parm Desired clipboard format long *pB) //@parm Out parm to receive boolean value { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::CanPaste"); CCallMgr callmgr(GetPed()); HRESULT hr; IDataObject *pdo = NULL; // Default clipboard if (pVar && pVar->vt == VT_UNKNOWN) { pVar->punkVal->QueryInterface(IID_IDataObject, (void **)&pdo); } hr = IsTrue(!WriteAccessDenied() && (GetPed()->GetDTE()->CanPaste(pdo, (CLIPFORMAT)Format, RECO_PASTE)), pB); if (pdo) { pdo->Release(); } return hr; } /* * ITextRange::ChangeCase (long Type) * * @mfunc * Change the case of letters in this range according to Type: * * tomSentenceCase = 0: capitalize first letter of each sentence * tomLowerCase = 1: change all letters to lower case * tomUpperCase = 2: change all letters to upper case * tomTitleCase = 3: capitalize the first letter of each word * tomToggleCase = 4: toggle the case of each letter * * @rdesc * HRESULT = (WriteAccessDenied) ? E_ACCESSDENIED : * (if change) ? NOERROR : S_FALSE */ STDMETHODIMP CTxtRange::ChangeCase( long Type) //@parm Type of case change. Default value: tomLower { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::ChangeCase"); if (IsZombie()) { return CO_E_RELEASED; } CCallMgr callmgr(GetPed()); if (WriteAccessDenied()) { return E_ACCESSDENIED; } CGenUndoBuilder undobldr(GetPed(), UB_AUTOCOMMIT); LONG cpMin, cpMax; LONG cch = GetRange(cpMin, cpMax); CRchTxtPtr rtp(*this); undobldr.StopGroupTyping(); rtp.SetCp(cpMin); return (rtp.ChangeCase(cch, Type, &undobldr)) ? NOERROR : S_FALSE; } /* * CTxtRange::Collapse (bStart) * * @mfunc * Collapse this range into a degenerate point either at the * the start (<p bStart> is nonzero or the end (<p bStart> = 0) * * @rdesc * HRESULT = (if change) ? NOERROR : S_FALSE */ STDMETHODIMP CTxtRange::Collapse( long bStart) //@parm Flag specifying end to collapse at { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::Collapse"); if (IsZombie()) { return CO_E_RELEASED; } CCallMgr callmgr(GetPed()); if (!_cch) // Already collapsed { return S_FALSE; // Signal that no change occurred } Collapser(bStart); Update(TRUE); // Update selection return NOERROR; // Signal that change occurred } /* * CTxtRange::Copy (pVar) * * @mfunc * Copy the plain and/or rich text to a data object and return the * object ptr in <p pVar>. If <p pVar> is null, copy to the clipboard. * * @rdesc * HRESULT = (if success) ? NOERROR : E_OUTOFMEMORY */ STDMETHODIMP CTxtRange::Copy( VARIANT *pVar) //@parm Out parm for data object { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::Copy"); if (IsZombie()) { return CO_E_RELEASED; } CLightDTEngine *pldte = &GetPed()->_ldte; if (pVar && pVar->vt == (VT_UNKNOWN | VT_BYREF)) { return pldte->RangeToDataObject(this, SF_TEXT | SF_RTF, (IDataObject **)pVar->ppunkVal); } return pldte->CopyRangeToClipboard(this); } /* * CTxtRange::Cut (pVar) * * @mfunc * Cut the plain and/or rich text to a data object and return the * object ptr in <p pVar>. If <p pVar> is null, * cut to the clipboard. * * @rdesc * HRESULT = (if success) ? NOERROR : E_OUTOFMEMORY */ STDMETHODIMP CTxtRange::Cut( VARIANT *pVar) //@parm Out parm for data object { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::Cut"); if (IsZombie()) { return CO_E_RELEASED; } CCallMgr callmgr(GetPed()); if (WriteAccessDenied()) { return E_ACCESSDENIED; } HRESULT hr = Copy(pVar); Replacer(0, NULL); return hr; } /* * CTxtRange::Delete (Unit, Count, pDelta) * * @mfunc * If this range is nondegenerate, delete it along with |Count| - 1 Units * in the direction specified by the sign of Count. If this range is * degenerate, delete Count Units. * * @rdesc * HRESULT = (WriteAccessDenied) ? E_ACCESSDENIED : * (all requested Units deleted) ? NOERROR : S_FALSE */ STDMETHODIMP CTxtRange::Delete( long Unit, //@parm Unit to use long Count, //@parm Number of chars to delete long *pDelta) //@parm Out parm to receive count of units deleted { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::Delete"); if (pDelta) { *pDelta = 0; } if (IsZombie()) { return CO_E_RELEASED; } CCallMgr callmgr(GetPed()); if (WriteAccessDenied()) { return E_ACCESSDENIED; } LONG cchSave = _cch; // Remember initial count LONG cchText = GetAdjustedTextLength(); LONG CountOrg = Count; LONG cpMin, cpMost; LONG cUnit = 0; // Default no Units MOVES Mode = (Count >= 0) ? MOVE_END : MOVE_START; GetRange(cpMin, cpMost); if (cpMost > cchText) // Can't delete final CR. To get { // *pDelta right, handle here Set(cpMin, cpMin - cchText); // Backup before CR & set active if (Count > 0) // end at cpMin since there's { // nothing to delete forward Count = 0; if (!_cch) // Only collapsed selection of { Mode = MOVE_IP; // final CR: set up nothing } } // deleted (MOVE_IP = 0) } if (Count) { if ((_cch ^ Mode) < 0) // Be sure active end is in { FlipRange(); // deletion direction } if (cchSave) // Deleting nondegenerate range { Count -= Mode; // counts as one unit } if (Mover(Unit, Count, &cUnit, Mode) // Try to expand range for == E_INVALIDARG) // remaining Count Units { if (pDelta) { *pDelta = 0; } return E_INVALIDARG; } if (GetCp() > cchText && cUnit > 0) // Range includes final CR, which { // cannot be deleted. Reduce if (Unit == tomCharacter) // counts for some Units { cUnit -= GetTextLength() - cchText; } else if (Unit == tomWord) { cUnit--; // An EOP qualifies as a tomWord } } } if (cchSave) // Deleting nondegenerate range { cUnit += Mode; // counts as a Unit } if (pDelta) { *pDelta = cUnit; } if (_cch) // Mover() may have changed _cch { // Replacer handles undo and sends Replacer(0, NULL); // all notifications. Since if (cUnit == CountOrg || // _cch != 0, Delete(Unit,0,0) cUnit == 1 && !CountOrg) // deletes one "Unit", namely { // what's selected return NOERROR; // Signal everything deleted as } // requested } else if (cchSave) // Collapsed selection of final CR { // but didn't delete anything Update(TRUE); // Selection highlighting changed } return S_FALSE; // Less deleted than requested } /* * CTxtRange::EndOf (Unit, Extend, pDelta) * * @mfunc * Move this range end(s) to end of the first overlapping Unit in * the range. * * @rdesc * HRESULT = (if change) ? NOERROR : * (if Unit supported) ? S_FALSE : E_NOTIMPL */ STDMETHODIMP CTxtRange::EndOf( long Unit, //@parm Unit to use long Extend, //@parm If true, leave other end alone long *pDelta) //@parm Count of chars that End is moved { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::EndOf"); CCallMgr callmgr(GetPed()); LONG cpMost; HRESULT hr = Expander(Unit, Extend, pDelta, NULL, &cpMost); if (hr == NOERROR) { Update(TRUE); // Update selection } return hr; } /* * CTxtRange::Expand (Unit, pDelta) * * @mfunc * Expand this range so that any partial Units it contains are * completely contained. If this range consists of one or more full * Units, no change is made. If this range is an insertion point at * the beginning or within a Unit, Expand() expands this range to include * that Unit. If this range is an insertion point at the end of the * story, Expand() tries to set this range to include the last Unit in * the story. The active end is always cpMost except for the last case. * * @rdesc * HRESULT = (if change) ? NOERROR : * (if Unit supported) ? S_FALSE : E_NOTIMPL */ STDMETHODIMP CTxtRange::Expand( long Unit, //@parm Unit to expand range to long *pDelta) //@parm Out parm to receive count of chars added { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::Expand"); CCallMgr callmgr(GetPed()); LONG cpMin, cpMost; HRESULT hr = Expander(Unit, TRUE, pDelta, &cpMin, &cpMost); if (hr == NOERROR) { Update(TRUE); // Update selection } return hr; } /* * CTxtRange::FindText (bstr, cch, Flags, pLength) * * @mfunc * If this range isn't an insertion point already, convert it into an * insertion point at its End if <p cch> <gt> 0 and at its Start if * <p cch> <lt> 0. Then search up to <p cch> characters of the range * looking for the string <p bstr> subject to the compare flags * <p Flags>. If <p cch> <gt> 0, the search is forward and if <p cch> * <lt> 0 the search is backward. If the string is found, the range * limits are changed to be those of the matched string and *<p pLength> * is set equal to the length of the string. If the string isn't found, * the range remains unchanged and *<p pLength> is set equal to 0. * * @rdesc * HRESULT = (if <p bstr> found) ? NOERROR : S_FALSE * * @devnote * Argument validation of the three Find methods is done by the helper * function CTxtRange::Finder(bstr, cch, dwFlags, pDelta, fExtend, fFlip) */ STDMETHODIMP CTxtRange::FindText( BSTR bstr, //@parm String to find long Count, //@parm Max count of chars to search long Flags, //@parm Flags governing compares long *pDelta) //@parm Out parm to receive count of chars moved { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::FindText"); return Finder(bstr, Count, Flags, pDelta, MOVE_IP); } /* * CTxtRange::FindTextEnd (bstr, cch, Flags, pLength) * * @mfunc * Starting from this range's End, search up to <p cch> characters * looking for the string <p bstr> subject to the compare flags * <p Flags>. If <p cch> <gt> 0, the search is forward and if <p cch> * <lt> 0 the search is backward. If the string is found, the range * limits are changed to be those of the matched string and *<p pLength> * is set equal to the length of the string. If the string isn't found, * the range remains unchanged and *<p pLength> is set equal to 0. * * @rdesc * HRESULT = (if <p bstr> found) ? NOERROR : S_FALSE */ STDMETHODIMP CTxtRange::FindTextEnd( BSTR bstr, //@parm String to find long Count, //@parm Max count of chars to search long Flags, //@parm Flags governing compares long *pDelta) //@parm Out parm to receive count of chars moved { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::FindTextEnd"); return Finder(bstr, Count, Flags, pDelta, MOVE_END); } /* * CTxtRange::FindTextStart (bstr, cch, Flags, pDelta) * * @mfunc * Starting from this range's Start, search up to <p cch> characters * looking for the string <p bstr> subject to the compare flags * <p Flags>. If <p cch> <gt> 0, the search is forward and if <p cch> * <lt> 0 the search is backward. If the string is found, the range * limits are changed to be those of the matched string and *<p pLength> * is set equal to the length of the string. If the string isn't found, * the range remains unchanged and *<p pLength> is set equal to 0. * * @rdesc * HRESULT = (if <p bstr> found) ? NOERROR : S_FALSE */ STDMETHODIMP CTxtRange::FindTextStart( BSTR bstr, //@parm String to find long Count, //@parm Max count of chars to search long Flags, //@parm Flags governing compares long *pDelta) //@parm Out parm to receive count of chars moved { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::FindTextStart"); return Finder(bstr, Count, Flags, pDelta, MOVE_START); } /* * CTxtRange::GetChar (pChar) * * @mfunc * Set *<p pChar> equal to the character at cpFirst * * @rdesc * HRESULT = (<p pChar>) NOERROR ? E_INVALIDARG * * @devnote * This method is very handy for walking a range character by character * from the Start. Accordingly, it's desirable that the active end * is at the Start. We set this up for a range, since the API doesn't * care which range end is active. But we can't do this for a selection, * since the selection API depends on the active end. */ STDMETHODIMP CTxtRange::GetChar( long *pChar) //@parm Out parm for char { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::GetChar"); HRESULT hr = GetLong(0, pChar); if (hr != NOERROR) { return hr; } if (_cch > 0) // Active end at cpMost (End) { if (_fSel) { CTxtPtr tp(_rpTX); // For selection, can't change tp.AdvanceCp(-_cch); // active end *pChar = (long)(tp.GetChar()); return NOERROR; } FlipRange(); // For range, it's more efficient } // to work from cpFirst and API *(DWORD *)pChar = _rpTX.GetChar(); // doesn't expose RichEdit active // end return NOERROR; } /* * CTxtRange::GetDuplicate (ppRange) * * @mfunc * Get a clone of this range object. For example, you may want to * create an insertion point to traverse a range, so you clone the * range and then set the clone's cpLim equal to its cpFirst. A range * is characterized by its cpFirst, cpLim, and the story it belongs to. * * @rdesc * HRESULT = (if success) ? NOERROR : * (<p ppRange>) ? E_OUTOFMEMORY : E_INVALIDARG * * @comm * Even if this range is a selection, the clone returned is still only * a range. */ STDMETHODIMP CTxtRange::GetDuplicate( ITextRange **ppRange) //@parm Out parm to receive duplicate of range { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::GetDuplicate"); HRESULT hr = GetLong(NULL, (LONG *)ppRange); if (hr != NOERROR) { return hr; } ITextRange *prg = new CTxtRange(*this); if (prg) { *ppRange = prg; prg->AddRef(); return NOERROR; } return E_OUTOFMEMORY; } /* * ITextRange::GetEmbeddedObject (ppV) * * @mfunc * Property get method that gets a ptr to the object at cpFirst * * @rdesc * HRESULT = (!ppV) ? E_INVALIDARG : * (object found) ? NOERROR : S_FALSE */ STDMETHODIMP CTxtRange::GetEmbeddedObject( IUnknown **ppV) //@parm Out parm to receive embedded object { HRESULT hr = GetLong(NULL, (LONG *)ppV); if (hr != NOERROR) { return hr; } if (GetObjectCount()) { COleObject *pobj = GetPed()->_pobjmgr->GetObjectFromCp(GetCpMin()); if (pobj && (*ppV = pobj->GetIUnknown()) != NULL) { (*ppV)->AddRef(); return NOERROR; } } return S_FALSE; } /* * CTxtRange::GetEnd (pcpLim) * * @mfunc * Get this range's End (cpMost) cp * * @rdesc * HRESULT = (<p pcpLim>) ? NOERROR : E_INVALIDARG */ STDMETHODIMP CTxtRange::GetEnd( long *pcpLim) //@parm Out parm to receive End cp value { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::GetEnd"); return GetLong(GetCpMost(), pcpLim); } /* * CTxtRange::GetFont (ppFont) * * @mfunc * Get an ITextFont object with the character attributes of this range * * @rdesc * HRESULT = <p ppFont> ? NOERROR : E_INVALIDARG */ STDMETHODIMP CTxtRange::GetFont( ITextFont **ppFont) //@parm Out parm to receive ITextFont object { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::GetFont"); HRESULT hr = GetLong(NULL, (LONG *)ppFont); if (hr != NOERROR) { return hr; } *ppFont = (ITextFont *) new CTxtFont(this); return *ppFont ? NOERROR : E_OUTOFMEMORY; } /* * CTxtRange::GetFormattedText (ppRange) * * @mfunc * Retrieves an ITextRange with this range's formatted text. * If <p ppRange> is NULL, the clipboard is the target. * * @rdesc * HRESULT = (if success) ? NOERROR : * (<p ppRange>) ? E_OUTOFMEMORY : E_INVALIDARG */ STDMETHODIMP CTxtRange::GetFormattedText( ITextRange **ppRange) //@parm Out parm to receive formatted text { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::GetFormattedText"); return GetDuplicate(ppRange); } /* * CTxtRange::GetIndex (Unit, pIndex) * * @mfunc * Set *<p pIndex> equal to the Unit number at this range's cpFirst * * @rdesc * HRESULT = (!<p pIndex>) ? E_INVALIDARG : * (Unit not implemented) ? E_NOTIMPL : * (Unit available) ? NOERROR : S_FALSE * @future * implement tomWindow? */ STDMETHODIMP CTxtRange::GetIndex( long Unit, //@parm Unit to index long *pIndex) //@parm Out parm to receive index value { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::GetIndex"); HRESULT hr = GetLong(0, pIndex); if (hr != NOERROR) { return hr; } LONG cp; LONG cUnit = tomBackward; CTxtRange rg(*this); hr = rg.Expander(Unit, FALSE, NULL, // Go to Start of Unit; else &cp, NULL); // UnitCounter gives 1 extra if (FAILED(hr)) { return hr; // Unit not recognized } LONG cch = rg.UnitCounter(Unit, cUnit, 0); if (cch == tomForward) // UnitCounter() doesn't know { return E_NOTIMPL; // Unit } if (cch == tomBackward) // Unit not in story { return S_FALSE; } *pIndex = -cUnit + 1; // Make count positive and // 1-based return NOERROR; } /* * CTxtRange::GetPara (ppPara) * * @mfunc * Get an ITextPara object with the paragraph attributes of this range * * @rdesc * HRESULT = <p ppPara> ? NOERROR : E_INVALIDARG */ STDMETHODIMP CTxtRange::GetPara( ITextPara **ppPara) //@parm Out parm to receive ITextPara object { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::GetPara"); HRESULT hr = GetLong(NULL, (LONG *)ppPara); if (hr != NOERROR) { return hr; } *ppPara = (ITextPara *) new CTxtPara(this); return *ppPara ? NOERROR : E_OUTOFMEMORY; } /* * CTxtRange::GetPoint (px, py, Type) * * @mfunc * Get point for selection Start or End and intraline position * as determined by <p Type>. * * @rdesc * HRESULT = (!<p px> or !<p py>) ? E_INVALIDARG : * (if success) ? NOERROR : S_FALSE */ STDMETHODIMP CTxtRange::GetPoint( long Type, //@parm Type of point long *px, //@parm Out parm for x coordinate long *py) //@parm Out parm for y coordinate { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtSelection::GetPoint"); if (!px || !py) { return E_INVALIDARG; } *px = *py = 0; if (IsZombie()) { return CO_E_RELEASED; } LONG ili; BOOL fAtEnd = _cch > 0; // Default value for IP POINT pt; CRchTxtPtr tp(*this); // Default active end CTxtEdit *ped = GetPed(); CDisplay *pdp = ped->_pdp; // Save indirections if (!pdp || !ped->fInplaceActive()) { return E_FAIL; // No display or not active } // then we can do nothing. if (fAtEnd ^ !(Type & tomStart)) // Move tp to active end { tp.Advance(-_cch); } ili = pdp->PointFromTp(tp, NULL, fAtEnd, pt, NULL, Type & 0x1f); RECT rcView; // Verify return value makes // sense since PointFromTp // will return values outside // client rect. pdp->GetViewRect(rcView, NULL); if ((ili >= 0) // Function succeeded && ((pt.x <= rcView.right) && (pt.x >= rcView.left)) && ((pt.y <= rcView.bottom) && (pt.y >= rcView.top))) { ped->TxClientToScreen(&pt); *px = pt.x; *py = pt.y; return NOERROR; } return S_FALSE; // Function failed } /* * CTxtRange::GetStart (pcpFirst) * * @mfunc * Get this range's Start (cpMin) cp * * @rdesc * HRESULT = (<p pcpFirst>) ? NOERROR : E_INVALIDARG */ STDMETHODIMP CTxtRange::GetStart( long *pcpFirst) //@parm Out parm to receive Start cp value { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::GetStart"); return GetLong(GetCpMin(), pcpFirst); } /* * CTxtRange::GetStoryLength (pcch) * * @mfunc * Set *<p pcch> = count of chars in this range's story * * @rdesc * HRESULT = (<p pcch>) ? NOERROR : E_INVALIDARG */ STDMETHODIMP CTxtRange::GetStoryLength( long *pcch) //@parm Out parm to get length of this range's story { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::GetStoryLength"); return GetLong(GetTextLength(), pcch); } /* * ITextRange::GetStoryType (pValue) * * @mfunc * Property get method that gets the type of this range's * story. * * @rdesc * HRESULT = (pValue) NOERROR ? E_INVALIDARG */ STDMETHODIMP CTxtRange::GetStoryType( long *pValue) //@parm Out parm to get type of this range's story { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::GetStoryType"); return GetLong(tomUnknownStory, pValue); } /* * CTxtRange::GetText (pbstr) * * @mfunc * Get plain text in this range. The Text property is the default * property for ITextRange. * * @rdesc * HRESULT = (if success) ? NOERROR : * (!<p pbstr>) ? E_INVALIDARG : E_OUTOFMEMORY */ STDMETHODIMP CTxtRange::GetText( BSTR *pbstr) //@parm Out parm to receive bstr { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::GetText"); HRESULT hr = GetLong(NULL, (LONG *)pbstr); if (hr != NOERROR) { return hr; } if (!GetCch()) { return NOERROR; } LONG cpMin, cpMost; LONG cch = GetRange(cpMin, cpMost); *pbstr = SysAllocStringLen(NULL, cch); if (!*pbstr) { return E_OUTOFMEMORY; } CTxtPtr tp(_rpTX); tp.SetCp(cpMin); #ifdef MACPORT CStrInW strinw(*pbstr); // tp.GetText(cch, strinw); tp.GetText(wcslen(strinw), strinw); WideCharToMultiByte(CP_ACP, 0, strinw, cch, *pbstr, cch + 1, NULL, NULL); *(((char *)*pbstr) + cch) = NULL; // insure trialing null #else tp.GetText(cch, (TCHAR *) * pbstr); #endif return NOERROR; } /* * CTxtRange::InRange (pRange, pB) * * @mfunc * Returns *<p pB> = tomTrue iff this range points within or at the same * text as <p pRange> does * * @rdesc * HRESULT = (within range) ? NOERROR : S_FALSE */ STDMETHODIMP CTxtRange::InRange( ITextRange *pRange, //@parm ITextRange to compare with long *pB) //@parm Out parm for comparison result { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::InRange"); return IsTrue(Comparer(pRange), pB); } /* * CTxtRange::InStory (pRange, pB) * * @mfunc * Return *pB = tomTrue iff this range's story is the same as * <p pRange>'s * * @rdesc * HRESULT = (in story) ? NOERROR : S_FALSE * * @future * If RichEdit acquires the ability to have multiple stories and * therefore ranges get a _story member, then compare that member * instead of calling _rpTX.SameRuns(). */ STDMETHODIMP CTxtRange::InStory( ITextRange *pRange, //@parm ITextRange to query for private interface long *pB) //@parm Out parm to receive tomBool result { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::InStory"); return IsTrue(SameVtables(this, pRange) && // Same vtables, _rpTX.SameRuns(&((CTxtRange *)pRange)->_rpTX), // same Runs pB); } /* * CTxtRange::IsEqual (pRange, pB) * * @mfunc * Returns *<p pB> = tomTrue iff this range points at the same text (cp's * and story) as <p pRange> does and pB isn't NULL. * * @rdesc * HRESULT = (equal objects) ? NOERROR : S_FALSE */ STDMETHODIMP CTxtRange::IsEqual( ITextRange *pRange, //@parm ITextRange to compare with long *pB) //@parm Out parm for comparison result { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::IsEqual"); return IsTrue(Comparer(pRange) < 0, pB); } /* * CTxtRange::Move (Unit, Count, pDelta) * * @mfunc * Move end(s) <p Count> <p Unit>'s, returning *<p pDelta> = # units * actually moved. In general, this method converts a range into an * insertion point if it isn't already, and moves the insertion point. * If <p Count> <gt> 0, motion is forward toward the end of the story; * if <p Count> <lt> 0, motion is backward toward the beginning. * <p Count> = 0 moves cpFirst to the beginning of the <p Unit> * containing cpFirst. * * @rdesc * HRESULT = (if change) ? NOERROR : * (if Unit supported) ? S_FALSE : E_NOTIMPL * @devnote * Argument validation of the three Move methods is done by the helper * function CTxtRange::Mover(Unit, Count, pDelta, Mode) */ STDMETHODIMP CTxtRange::Move( long Unit, //@parm Unit to use long Count, //@parm Number of Units to move long *pDelta) //@parm Out parm to receive actual count of // Units end is moved { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::Move"); CCallMgr callmgr(GetPed()); return Mover(Unit, Count, pDelta, MOVE_IP); } /* * CTxtRange::MoveEnd (Unit, Count, pDelta) * * @mfunc * Move End end <p Count> <p Unit>'s, returning *<p pDelta> = # units * actually moved * * @rdesc * HRESULT = (if change) ? NOERROR : * (if Unit supported) ? S_FALSE : E_NOTIMPL */ STDMETHODIMP CTxtRange::MoveEnd( long Unit, //@parm Unit to use long Count, //@parm Number of Units to move long *pDelta) //@parm Out parm to receive actual count of // Units end is moved { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::MoveEnd"); CCallMgr callmgr(GetPed()); return Mover(Unit, Count, pDelta, MOVE_END); } /* * CTxtRange::MoveEndUntil (Cset, Count, pDelta) * * @mfunc * Move the End just past all contiguous characters that are not found * in the set of characters specified by the VARIANT <p Cset> parameter. * * @rdesc * HRESULT = (if change) ? NOERROR : * (if <p Cset> valid) ? S_FALSE : E_INVALIDARG */ STDMETHODIMP CTxtRange::MoveEndUntil( VARIANT *Cset, //@parm Character match set to use long Count, //@parm Max number of characters to move past long *pDelta) //@parm Out parm to receive actual count of // characters end is moved { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::MoveEndUntil"); return Matcher(Cset, Count, pDelta, MOVE_END, MATCH_UNTIL); } /* * CTxtRange::MoveEndWhile (Cset, Count, pDelta) * * @mfunc * Move the End just past all contiguous characters that are found in * the set of characters specified by the VARIANT <p Cset> parameter. * * @rdesc * HRESULT = (if change) ? NOERROR : * (if <p Cset> valid) ? S_FALSE : E_INVALIDARG */ STDMETHODIMP CTxtRange::MoveEndWhile( VARIANT *Cset, //@parm Character match set to use long Count, //@parm Max number of characters to move past long *pDelta) //@parm Out parm to receive actual count of // characters end is moved { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::MoveEndWhile"); return Matcher(Cset, Count, pDelta, MOVE_END, MATCH_WHILE); } /* * CTxtRange::MoveStart (Unit, Count, pDelta) * * @mfunc * Move Start end <p Count> <p Unit>'s, returning *<p pDelta> = # units * actually moved * * @rdesc * HRESULT = (if change) ? NOERROR : * (if Unit supported) ? S_FALSE : E_NOTIMPL */ STDMETHODIMP CTxtRange::MoveStart( long Unit, //@parm Unit to use long Count, //@parm Number of Units to move long *pDelta) //@parm Out parm to receive actual count of // Units end is moved { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::MoveStart"); CCallMgr callmgr(GetPed()); return Mover(Unit, Count, pDelta, MOVE_START); } /* * CTxtRange::MoveStartUntil (Cset, Count, pDelta) * * @mfunc * Move the Start just past all contiguous characters that are not found * in the set of characters specified by the VARIANT <p Cset> parameter. * * @rdesc * HRESULT = (if change) ? NOERROR : * (if <p Cset> valid) ? S_FALSE : E_INVALIDARG */ STDMETHODIMP CTxtRange::MoveStartUntil( VARIANT *Cset, //@parm Character match set to use long Count, //@parm Max number of characters to move past long *pDelta) //@parm Out parm to receive actual count of // characters end is moved { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::MoveStartUntil"); return Matcher(Cset, Count, pDelta, MOVE_START, MATCH_UNTIL); } /* * CTxtRange::MoveStartWhile (Cset, Count, pDelta) * * @mfunc * Move the Start just past all contiguous characters that are found in * the set of characters specified by the VARIANT <p Cset> parameter. * * @rdesc * HRESULT = (if change) ? NOERROR : * (if <p Cset> valid) ? S_FALSE : E_INVALIDARG */ STDMETHODIMP CTxtRange::MoveStartWhile( VARIANT *Cset, //@parm Character match set to use long Count, //@parm Max number of characters to move past long *pDelta) //@parm Out parm to receive actual count of // characters end is moved { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::MoveStartWhile"); return Matcher(Cset, Count, pDelta, MOVE_START, MATCH_WHILE); } /* * CTxtRange::MoveUntil (Cset,Count, pDelta) * * @mfunc * Convert this range into an insertion point if it isn't already, * and keep moving the insertion point until encountering any * character in the set of characters specified by the VARIANT cset * parameter. * * @rdesc * HRESULT = (if change) ? NOERROR : * (if <p Cset> valid) ? S_FALSE : E_INVALIDARG */ STDMETHODIMP CTxtRange::MoveUntil( VARIANT *Cset, //@parm Character match set to use long Count, //@parm Max number of characters to move past long *pDelta) //@parm Out parm to receive actual count of // characters end is moved { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::MoveUntil"); return Matcher(Cset, Count, pDelta, MOVE_IP, MATCH_UNTIL); } /* * CTxtRange::MoveWhile (Cset, Count, pDelta) * * @mfunc * Convert this range into an insertion point if it isn't already, * and keep moving the insertion point so long as (while) the * characters past by are found in set of characters specified by * the VARIANT cset parameter. Such a contiguous set of characters * is known as a span of characters. The magnitude of the <p Count> * parameter gives the maximum number of characters to move past and * the sign of <p Count> specifies the direction to move in. * * @rdesc * HRESULT = (if change) ? NOERROR : * (if <p Cset> valid) ? S_FALSE : E_INVALIDARG * * @devnote * Argument validation of the MoveWhile and MoveUntil methods is done by * the helper CTxtRange::Matcher (Cset, Count, pDelta, fExtend, fSpan) */ STDMETHODIMP CTxtRange::MoveWhile( VARIANT *Cset, //@parm Character match set to use long Count, //@parm Max number of characters to move past long *pDelta) //@parm Out parm to receive actual count of // characters end is moved { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::MoveWhile"); return Matcher(Cset, Count, pDelta, MOVE_IP, MATCH_WHILE); } /* * CTxtRange::Paste (pVar, ClipboardFormat) * * @mfunc * Paste the data object <p pVar> into this range. If * <p pVar> is null, paste from the clipboard. * * @rdesc * HRESULT = (WriteAccessDenied) ? E_ACCESSDENIED : * (if success) ? NOERROR : E_OUTOFMEMORY */ STDMETHODIMP CTxtRange::Paste( VARIANT *pVar, //@parm Data object to paste long ClipboardFormat) //@parm Desired clipboard format { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::Paste"); if (IsZombie()) { return CO_E_RELEASED; } CCallMgr callmgr(GetPed()); HRESULT hr; IDataObject *pdo = NULL; // Default clipboard CGenUndoBuilder undobldr(GetPed(), UB_AUTOCOMMIT); if (WriteAccessDenied()) { return E_ACCESSDENIED; } if (pVar) if (pVar->vt == VT_UNKNOWN) { pVar->punkVal->QueryInterface(IID_IDataObject, (void **)&pdo); } else if (pVar->vt == (VT_UNKNOWN | VT_BYREF)) { pdo = (IDataObject *)(*pVar->ppunkVal); } hr = GetPed()->PasteDataObjectToRange(pdo, this, (WORD)ClipboardFormat, NULL, &undobldr, PDOR_NONE); if (pdo && pVar->vt == VT_UNKNOWN) { pdo->Release(); } Update(TRUE); // Update selection return hr; } /* * ITextRange::ScrollIntoView(long Code) * * @mfunc * Method that scrolls this range into view according to the * code Code defined below. * * @rdesc * HRESULT = (if success) ? NOERROR : S_FALSE */ STDMETHODIMP CTxtRange::ScrollIntoView( long Code) //@parm Scroll code { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::ScrollIntoView"); // Validate parameter if (Code != tomStart && Code != tomEnd) { return E_INVALIDARG; } if (IsZombie()) { return CO_E_RELEASED; } // Get local copy of ped to save some indirections. CTxtEdit *ped = GetPed(); if (!ped->fInplaceActive()) { // If the control is not active, we can't get the information // because no one knows what our client rect is. return E_FAIL; } // Get a local copy of display to save some indirections. CDisplay *pdp = ped->_pdp; LONG cpStart; LONG cpForEnd; GetRange(cpStart, cpForEnd); // Get the view rectangle so we can compute the absolute x/y RECT rcView; pdp->GetViewRect(rcView, NULL); // Set up tp for PointFromTp call CRchTxtPtr tp(ped, cpStart); // Values used for making returned point locations absolute since // PointFromTp adjusts the point returned to be relative to the // display. const LONG xScrollAdj = pdp->GetXScroll() - rcView.left; const LONG yScrollAdj = pdp->GetYScroll() - rcView.top; // Get the left/top for the start CLinePtr rpStart(pdp); POINT ptStart; LONG iliStart = pdp->PointFromTp(tp, NULL, TRUE, ptStart, &rpStart, TA_TOP + TA_LEFT); ptStart.x += xScrollAdj; ptStart.y += yScrollAdj; // Get the right/bottom for the end CLinePtr rpEnd(pdp); POINT ptEnd; tp.SetCp(cpForEnd); LONG iliEnd = pdp->PointFromTp(tp, NULL, TRUE, ptEnd, &rpEnd, TA_BOTTOM + TA_RIGHT); ptEnd.x += xScrollAdj; ptEnd.y += yScrollAdj; // // Calculate the yScroll // // The basic idea is to display both the start and the end if possible. But // if it is not possible then display the requested end based on the input // parameter. LONG yHeightView = pdp->GetViewHeight(); LONG yScroll; if (tomStart == Code) { // Scroll the Start cp to the top of the view yScroll = ptStart.y; } else { // Scroll the End cp to the bottom of the view yScroll = ptEnd.y - yHeightView; } // // Calculate the X Scroll // // Default scroll to beginning of the line LONG xScroll = 0; // Make view local to save a number of indirections LONG xWidthView = pdp->GetViewWidth(); if (iliStart == iliEnd) { // Entire selection is on the same line so we want to display as // much of it as is possible. LONG xWidthSel = ptEnd.x - ptStart.x; if (xWidthSel > xWidthView) { // Selection length is greater than display width if (tomStart == Code) { // Show Start requested - just start from beginning // of selection xScroll = ptStart.x; } else { // Show end requested - show as much of selection as // possible, ending with last character in the // selection. xScroll = ptEnd.x - xWidthView; } } else if (ptEnd.x > xWidthView) { // End of selection is outside the view starting // at 0 so display as much as possible ending with // End. xScroll = ptEnd.x - xWidthView; } } else { // Multiline selection. Display as much as possible of the requested // end's line. // Calc width of line LONG xWidthLine = (tomStart == Code) ? rpStart->_xWidth + rpStart->_xLeft : rpEnd->_xWidth + rpEnd->_xLeft; // If line width is less than or equal to view, start at // 0 otherwise we need to adjust starting position to // show as much of the requested end's selection line // as possible. if (xWidthLine > xWidthView) { if (tomStart == Code) { // Start end to be displayed if (xWidthLine - ptStart.x > xWidthView) { // Selection is bigger than the view // so start at the beginning and display // as much as possible. xScroll = ptStart.x; } else { // Remember that this is a multiline selection so the // selection on this line goes from ptStart.x to the // end of line. Since the selection width is less than // the width of the view, we just back up the width // of view to show the entire selection. xScroll = xWidthLine - xWidthView; } } else { // Show the end of the selection. In the multiline case, // this goes from the beginning of the line to End. So // we only have to adjust if the End is beyond the view. if (ptEnd.x > xWidthView) { // End beyond the view. Show as much as possible // of the selection. xScroll = ptEnd.x - xWidthView; } } } } // Do the scroll pdp->ScrollView(xScroll, yScroll, FALSE, FALSE); return S_OK; } /* * CTxtRange::Select () * * @mfunc * Copy this range's cp's and story ptr to the active selection. * * @rdesc * HRESULT = (if selection exists) ? NOERROR : S_FALSE */ STDMETHODIMP CTxtRange::Select() { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::Select"); if (IsZombie()) { return CO_E_RELEASED; } LONG cpMin, cpMost; CTxtSelection *pSel = GetPed()->GetSel(); if (pSel) { GetRange(cpMin, cpMost); return pSel->SetRange(cpMin, cpMost); } return S_FALSE; } /* * CTxtRange::SetChar (Char) * * @mfunc * Set char at cpFirst = <p Char> * * @rdesc * HRESULT = (WriteAccessDenied) ? E_ACCESSDENIED : * (char stored) ? NOERROR : S_FALSE * * @devnote * Special cases could be much faster, e.g., just overtype the plain- * text backing store unless at EOD or EOR. Code below uses a cloned * range to handle all cases easily and preserve undo capability. */ STDMETHODIMP CTxtRange::SetChar( long Char) //@parm New value for char at cpFirst { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::SetChar"); if (IsZombie()) { return CO_E_RELEASED; } CTxtEdit *ped = GetPed(); CCallMgr callmgr(ped); TCHAR ch = (TCHAR)Char; // Avoid endian problems CTxtRange rg(*this); CGenUndoBuilder undobldr(ped, UB_AUTOCOMMIT); if (WriteAccessDenied()) { return E_ACCESSDENIED; } if (!ped->TxGetMultiLine() && IsEOP(Char)) // EOPs are not allowed in { return FALSE; // single-line edit controls } undobldr.StopGroupTyping(); rg.Collapser(tomStart); // Collapse at cpMin rg.SetExtend(TRUE); // Setup to select rg.Advance(1); // Try to select char at IP if (rg.ReplaceRange(1, &ch, &undobldr, SELRR_REMEMBERRANGE)) { Update(TRUE); // Update selection return NOERROR; } return S_FALSE; } /* * CTxtRange::SetEnd (cp) * * @mfunc * Set this range's End cp * * @rdesc * HRESULT = (if change) ? NOERROR : S_FALSE * * @comm * Note that setting this range's cpMost to <p cp> also sets cpMin to * <p cp> if <p cp> < cpMin. */ STDMETHODIMP CTxtRange::SetEnd( long cp) //@parm Desired new End cp { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::SetEnd"); if (IsZombie()) { return CO_E_RELEASED; } LONG cpMin = GetCpMin(); ValidateCp(cp); return SetRange(min(cpMin, cp), cp); // Active end is End } /* * CTxtRange::SetFont (pFont) * * @mfunc * Set this range's character attributes to those given by <p pFont>. * This method is a "character format painter". * * @rdesc * HRESULT = (!pFont) ? E_INVALIDARG : * (if success) ? NOERROR : * (protected) ? E_ACCESSDENIED : E_OUTOFMEMORY */ STDMETHODIMP CTxtRange::SetFont( ITextFont *pFont) //@parm Font object with desired character formatting { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::SetFont"); if (!pFont) { return E_INVALIDARG; } if (IsZombie()) { return CO_E_RELEASED; } ITextFont *pFontApply = (ITextFont *) new CTxtFont(this); if (!pFontApply) { return E_OUTOFMEMORY; } HRESULT hr = (*(LONG *)pFontApply == *(LONG *)pFont) // If same vtable, use ? CharFormatSetter(&((CTxtFont *)pFont)->_CF) // its _CF; else copy : pFontApply->SetDuplicate(pFont); // to clone and apply pFontApply->Release(); return hr; } /* * CTxtRange::SetFormattedText (pRange) * * @mfunc * Replace this range's text with formatted text given by <p pRange>. * If <p pRange> is NULL, paste from the clipboard. * * @rdesc * HRESULT = (WriteAccessDenied) ? E_ACCESSDENIED : * (if success) ? NOERROR : E_OUTOFMEMORY * * @FUTURE * Do this more efficiently if pRange points at a RichEdit range. This * would also help with RichEdit D&D to RichEdit targets */ STDMETHODIMP CTxtRange::SetFormattedText( ITextRange *pRange) //@parm Formatted text to replace this // range's text { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::SetFormattedText"); if (IsZombie()) { return CO_E_RELEASED; } CCallMgr callmgr(GetPed()); LONG cpMin = GetCpMin(); HRESULT hr; IUnknown *pdo = NULL; VARIANT vr; if (!pRange) { return NOERROR; // Nothing to paste } if (WriteAccessDenied()) { return E_ACCESSDENIED; } VariantInit(&vr); vr.vt = VT_UNKNOWN | VT_BYREF; vr.ppunkVal = &pdo; hr = pRange->Copy(&vr); if (hr == NOERROR) { hr = Paste(&vr, 0); pdo->Release(); // Release the data object _cch = GetCp() - cpMin; // Select the new text } return hr; } /* * CTxtRange::SetIndex (Unit, Index, Extend) * * @mfunc * If <p Extend> is zero, convert this range into an insertion point * at the start of the <p Index>th <p Unit> in the current story. If * <p Extend> is nonzero, set this range to consist of this unit. The * start of the story corresponds to <p Index> = 0 for all units. * * Positive indices are 1-based and index relative to the beginning of * the story. Negative indices are -1-based and index relative to the * end of the story. So an index of 1 refers to the first Unit in the * story and an index of -1 refers to the last Unit in the story. * * @rdesc * HRESULT = (invalid index) ? E_INVALIDARG : * (Unit not supported) ? E_NOTIMPL : * (change) ? NOERROR : S_FALSE * * @devnote * Currently moves out <p Index> <p Unit>s from the start of the story. * Might be faster to move from current position, but would need to know * the current index. */ STDMETHODIMP CTxtRange::SetIndex( long Unit, //@parm Unit to index long Index, //@parm Index value to use long Extend) //@parm if nonzero, set range to <p Unit> { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::SetIndex"); if (IsZombie()) { return CO_E_RELEASED; } if (!Index) { return E_INVALIDARG; } CCallMgr callmgr(GetPed()); LONG cchText = GetTextLength(); CTxtRange rg(GetPed()); // Create IP at cp = 0 if (Index > 0) // Index going forward First { Index--; // Unit is at start of story } else // Index from end of story { rg.Set(cchText, cchText); // selecting whole story } LONG cUnit; HRESULT hr = rg.Mover(Unit, Index, &cUnit, MOVE_END); if (FAILED(hr)) { return hr; } if (Index != cUnit || rg.GetCp() == cchText) // No such index in story { return E_INVALIDARG; } rg._cch = 0; // Collapse at active end // namely at cpMost LONG cpMin, cpMost; if (Extend) // Select Index'th Unit { rg.Expander(Unit, TRUE, NULL, &cpMin, &cpMost); } if (Set(rg.GetCp(), rg._cch)) // Something changed { Update(TRUE); return NOERROR; } return S_FALSE; } /* * CTxtRange::SetPara (pPara) * * @mfunc * Set this range's paragraph attributes to those given by <p pPara> * This method is a "Paragraph format painter". * * @rdesc * HRESULT = (!pPara) ? E_INVALIDARG : * (if success) ? NOERROR : * (protected) ? E_ACCESSDENIED : E_OUTOFMEMORY */ STDMETHODIMP CTxtRange::SetPara( ITextPara *pPara) //@parm Paragraph object with desired paragraph { // formatting TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::SetPara"); if (!pPara) { return E_INVALIDARG; } if (IsZombie()) { return CO_E_RELEASED; } ITextPara *pParaApply = (ITextPara *) new CTxtPara(this); if (!pParaApply) { return E_OUTOFMEMORY; } HRESULT hr = (*(LONG *)pParaApply == *(LONG *)pPara) // If same vtable, use ? ParaFormatSetter(&((CTxtPara *)pPara)->_PF) // its _PF; else copy : pParaApply->SetDuplicate(pPara); // to clone and apply pParaApply->Release(); return hr; } /* * CTxtRange::SetPoint (x, y, Extend) * * @mfunc * Select text at or up through (depending on <p Extend>) the point * (<p x>, <p y>). * * @rdesc * HRESULT = NOERROR */ STDMETHODIMP CTxtRange::SetPoint( long x, //@parm Horizontal coord of point to select long y, //@parm Vertical coord of point to select long Type, //@parm Defines the end to extend if Extend != 0. long Extend) //@parm Whether to extend selection to point { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::SetPoint"); if (IsZombie()) { return CO_E_RELEASED; } // Copy the ped locally once to save some indirections CTxtEdit *ped = GetPed(); CCallMgr callmgr(ped); if ((Type != tomStart) && (Type != tomEnd)) { return E_INVALIDARG; } if (!ped->fInplaceActive()) { // If we aren't inplace active we can't get a DC to // calculate the cp. return OLE_E_NOT_INPLACEACTIVE; } LONG cchForSel = 0; POINT pt = {x, y}; LONG cpSel; LONG cpMin; LONG cpMost; // Convert x, y from screen coordinates to client coordinates if (!ped->TxScreenToClient(&pt)) { // It is unexpected for this to happen return E_FAIL; } // Get the cp for the x,y if ((cpSel = ped->_pdp->CpFromPoint(pt, NULL, NULL, NULL, TRUE)) == -1) { // It is highly unexpected for this to fail. return E_FAIL; } // Extend the range as requested. if (Extend) { GetRange(cpMin, cpMost); if (Type == tomStart) { cchForSel = cpSel - cpMin; } else { cchForSel = cpSel - cpMost; } } // Update the range Set(cpSel, cchForSel); return S_OK; } /* * CTxtRange::SetRange (cp1, cp2) * * @mfunc * Set this range's ends * * @rdesc * HRESULT = (cp1 > cp2) ? E_INVALIDARG * : (if change) ? NOERROR : S_FALSE */ STDMETHODIMP CTxtRange::SetRange( long cp1, //@parm Char position for Start end long cp2) //@parm Char position for End end { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::SetRange"); if (IsZombie()) { return CO_E_RELEASED; } CCallMgr callmgr(GetPed()); LONG cpMin, cpMost; // Save starting cp's for // change determination GetRange(cpMin, cpMost); ValidateCp(cp1); ValidateCp(cp2); Set(cp2, cp2 - cp1); GetRange(cp1, cp2); // See if either range end changed if (cp1 != cpMin || cp2 != cpMost) // (independent of active end) { Update(TRUE); // Update selection return NOERROR; } return S_FALSE; } /* * CTxtRange::SetStart (cp) * * @mfunc * Set this range's Start cp * * @rdesc * HRESULT = (if change) ? NOERROR : S_FALSE * * @comm * Note that setting this range's cpMin to <p cp> also sets cpMost to * <p cp> if <p cp> > cpMost. */ STDMETHODIMP CTxtRange::SetStart( long cp) //@parm Desired new Start cp { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::SetStart"); if (IsZombie()) { return CO_E_RELEASED; } LONG cpMost = GetCpMost(); ValidateCp(cp); return SetRange(max(cpMost, cp), cp); // Active end is Start } /* * CTxtRange::SetText (bstr) * * @mfunc * Replace text in this range by that given by <p bstr>. If <p bstr> * is NULL, delete text in range. * * @rdesc * HRESULT = (WriteAccessDenied) ? E_ACCESSDENIED : * (if success) ? NOERROR : S_FALSE * */ STDMETHODIMP CTxtRange::SetText( BSTR bstr) //@parm Text to replace text in this range by { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::SetText"); if (IsZombie()) { return CO_E_RELEASED; } CCallMgr callmgr(GetPed()); if (WriteAccessDenied()) { return E_ACCESSDENIED; } LONG cchNew = bstr ? SysStringLen(bstr) : 0; #ifdef MACPORT CStrInW strinw(bstr); MultiByteToWideChar(CP_ACP, 0, bstr, cchNew + 1, strinw, cchNew); _cch = Replacer(wcslen(strinw), strinw); // Select the new text #else _cch = Replacer(cchNew, (TCHAR *)bstr); // Select the new text #endif GetPed()->TxSetMaxToMaxText(); return _cch == cchNew ? NOERROR : S_FALSE; } /* * CTxtRange::StartOf (Unit, Extend, pDelta) * * @mfunc * Move this range end(s) to start of the first overlapping Unit in * the range. * * @rdesc * HRESULT = (if change) ? NOERROR : * (if <p Unit> valid) ? S_FALSE : E_INVALIDARG */ STDMETHODIMP CTxtRange::StartOf( long Unit, //@parm Unit to use long Extend, //@parm If true, leave other end alone long *pDelta) //@parm Out parm to get count of chars that // StartOf moved { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::StartOf"); CCallMgr callmgr(GetPed()); LONG cpMin; HRESULT hr = Expander(Unit, Extend, pDelta, &cpMin, NULL); if (hr == NOERROR) { Update(TRUE); // Update selection } return hr; } //---------------------- CTxtRange ITextSelection stubs ----------------------------- // Dummy CTxtRange routines to simplify CTxtSelection inheritance hierarchy STDMETHODIMP CTxtRange::GetFlags(long *pFlags) { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::GetFlags"); return E_NOTIMPL; } STDMETHODIMP CTxtRange::SetFlags(long Flags) { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::SetFlags"); return E_NOTIMPL; } STDMETHODIMP CTxtRange::GetType(long *pType) { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::GetType"); return E_NOTIMPL; } STDMETHODIMP CTxtRange::MoveLeft(long Unit, long Count, long Extend, long *pDelta) { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::Left"); return E_NOTIMPL; } STDMETHODIMP CTxtRange::MoveRight(long Unit, long Count, long Extend, long *pDelta) { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::Right"); return E_NOTIMPL; } STDMETHODIMP CTxtRange::MoveUp(long Unit, long Count, long Extend, long *pDelta) { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::Up"); return E_NOTIMPL; } STDMETHODIMP CTxtRange::MoveDown(long Unit, long Count, long Extend, long *pDelta) { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::Down"); return E_NOTIMPL; } STDMETHODIMP CTxtRange::HomeKey(long Unit, long Extend, long *pDelta) { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::HomeKey"); return E_NOTIMPL; } STDMETHODIMP CTxtRange::EndKey(long Unit, long Extend, long *pDelta) { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::EndKey"); return E_NOTIMPL; } STDMETHODIMP CTxtRange::TypeText(BSTR bstr) { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEEXTERN, "CTxtRange::TypeText"); return E_NOTIMPL; } //--------------------- ITextRange Private Helper Methods ----------------------------- /* * @doc INTERNAL * * CTxtRange::Collapser (bStart) * * @mfunc * Internal routine to collapse this range into a degenerate point * either at the the start (<p bStart> is nonzero or the end * (<p bStart> = 0) */ void CTxtRange::Collapser( long bStart) //@parm Flag specifying end to collapse at { TRACEBEGIN(TRCSUBSYSRANG, TRCSCOPEEXTERN, "CTxtRange::Collapser"); if (bStart) // Collapse to Start { if (_cch > 0) { FlipRange(); // Move active end to range Start } } else // Collapse to End { if (_cch < 0) { FlipRange(); // Move active end to range End } const LONG cchText = GetAdjustedTextLength(); if (GetCp() > cchText) // IP can't follow final CR { Set(cchText, 0); // so move it before } } _cch = 0; // Collapse this range if (_fSel) // Notify if selection changed { GetPed()->GetCallMgr()->SetSelectionChanged(); } Update_iFormat(-1); // Make sure format is up to date } /* * CTxtRange::Comparer(pRange) * * @mfunc * helper function for CTxtRange::InRange() and IsEqual() * * @rdesc * 0 if not same story or if this range isn't contained by <p pRange>; * -1 if ranges are equal; 1 if this range wholely contained in * <p pRange>. * * @comm * Note that if this range is degenerate and *pRange is nondegenerate, * this range is not included in *pRange if it's located at pRange's * End position. */ LONG CTxtRange::Comparer( ITextRange *pRange) //@parm ITextRange to compare with { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEINTERN, "CTxtRange::Comparer"); LONG cpMin, cpMost; LONG Start, End; if (InStory(pRange, NULL) != NOERROR) // If this range doesn't point at { return 0; // same story as pRange's, } // return 0 GetRange(cpMin, cpMost); // Get this range's cp's pRange->GetStart(&Start); // Get pRange's cp's pRange->GetEnd(&End); if (cpMin == Start && cpMost == End) // Exact match { return -1; } return cpMin >= Start && cpMost <= End && cpMin < End; } /* * CTxtRange::Expander (Unit, fExtend, pDelta, pcpMin, pcpMost) * * @mfunc * Helper function that expands this range so that partial Units it * contains are completely contained according to the out parameters * pcpMin and pcpMost. If pcpMin is not NULL, the range is expanded to * the beginning of the Unit. Similarly, if pcpMost is not NULL, the * range is expanded to the end of the Unit. <p pDelta> is an out * parameter that receives the number of chars added to the range. * * @rdesc * HRESULT = (if change) ? NOERROR : * (if Unit valid) ? S_FALSE : E_INVALIDARG * * @devnote * Used by ITextRange::Expand(), StartOf(), and EndOf(). Both pcpMin and * pcpMost are nonNULL for Expand(). pcpMin is NULL for EndOf() and * pcpMost is NULL for StartOf(). * * @future * Discontiguous Units. Expander should expand only to end of Unit, * rather than to start of next Unit. */ HRESULT CTxtRange::Expander( long Unit, //@parm Unit to expand range to BOOL fExtend, //@parm Expand this range if TRUE LONG *pDelta, //@parm Out parm that receives chars added LONG *pcpMin, //@parm Out parm that receives new cpMin LONG *pcpMost) //@parm Out parm that receives new cpMost { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEINTERN, "CTxtRange::Expander"); if (IsZombie()) { return CO_E_RELEASED; } LONG cch = 0; // Default no chars added LONG cchRange; LONG cchAdjustedText = GetAdjustedTextLength(); LONG cchText = GetTextLength(); LONG cp; LONG cpMin, cpMost; BOOL fUnitFound = TRUE; // Most Units can be found LONG cchCollapse; CDisplay *pdp; // but tomObject maybe not GetRange(cpMin, cpMost); // Save starting cp's if (pcpMin) // Default no change { *pcpMin = cpMin; AssertSz(!pcpMost || fExtend, "CTxtRange::Expander should extend if both pcpMin and pcpMost != 0"); } if (pcpMost) { *pcpMost = cpMost; } if (pDelta) { *pDelta = 0; } switch (Unit) // Calculate new cp's { case tomObject: fUnitFound = FindObject(pcpMin, pcpMost); break; case tomCharacter: if (pcpMost && cpMin == cpMost && // EndOf/Expand insertion point cpMost < cchText && // with at least 1 more char (!cpMost || pcpMin)) // at beginning of story or { // Expand(), then (*pcpMost)++; // expand by one char } break; case tomCharFormat: _rpCF.FindRun(pcpMin, pcpMost, cpMin, _cch, cchText); break; case tomParaFormat: _rpPF.FindRun(pcpMin, pcpMost, cpMin, _cch, cchText); break; case tomWord: FindWord(pcpMin, pcpMost, FW_INCLUDE_TRAILING_WHITESPACE); break; case tomSentence: FindSentence(pcpMin, pcpMost); break; case tomLine: pdp = GetPed()->_pdp; if (pdp) // If this story has a display { // use line array CLinePtr rp(pdp); cp = GetCp(); pdp->WaitForRecalc(cp, -1); rp.RpSetCp(cp, FALSE); rp.FindRun(pcpMin, pcpMost, cpMin, _cch, cchText); break; } // Else fall thru to tomPara case tomParagraph: FindParagraph(pcpMin, pcpMost); break; case tomWindow: fUnitFound = FindVisibleRange(pcpMin, pcpMost); break; case tomStory: if (pcpMin) { *pcpMin = 0; } if (pcpMost) { *pcpMost = cchText; } break; default: return E_NOTIMPL; } if (!fUnitFound) { return S_FALSE; } cchCollapse = !fExtend && _cch; // Collapse counts as a char // Note: Expand() has fExtend = 0 if (pcpMin) { cch = cpMin - *pcpMin; // Default positive cch for Expand cpMin = *pcpMin; } if (pcpMost) // EndOf() and Expand() { if (!fExtend) // Will be IP if not already { if (cpMost > cchAdjustedText) // If we collapse (EndOf only), { cchCollapse = -cchCollapse; // it'll be before the final CR } else { *pcpMost = min(*pcpMost, cchAdjustedText); } } cch += *pcpMost - cpMost; cp = cpMost = *pcpMost; } else // StartOf() { cch = -cch; // Invert count cp = cpMin; // Active end at cpMin cchCollapse = -cchCollapse; // Backward collapses count as -1 } cch += cchCollapse; // Collapse counts as a char if (cch) // One or both ends changed { cchRange = cpMost - cpMin; // cch for EndOf() and Expand() if (!pcpMost) // Make negative for StartOf() { cchRange = -cchRange; } if (!fExtend) // We're not expanding (EndOf() { cchRange = 0; // or StartOf() call) } if (Set(cp, cchRange)) // Set active end and signed cch { // Something changed if (pDelta) // Report cch if caller cares { *pDelta = cch; } return NOERROR; } } return S_FALSE; // Report Unit found but no change } /* * CTxtRange::Finder (bstr, Count, dwFlags, pDelta, Mode) * * @mfunc * Helper find function that moves active end up to <p cch> characters * subject to compare flags <p Flags> and the <p Mode>, which has the * following possible values: * * 1: set this range's cpMost = cpMost of matched string * 0: set this range's cp's equal to those of matched string * -1: set this range's cpMin = cpMin of matched string * * Return *<p pDelta> = # characters past. * * @rdesc * HRESULT = (if <p bstr> found) ? NOERROR : S_FALSE * * @devnote * Used by ITextRange::FindText(), FindTextStart() and FindTextEnd() */ HRESULT CTxtRange::Finder( BSTR bstr, //@parm String to find long Count, //@parm Max count of chars to search long Flags, //@parm Flags governing compares LONG *pDelta, //@parm Out parm to receive count of chars moved MOVES Mode) //@parm Governs setting of range wrt matched string { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEINTERN, "CTxtRange::Finder"); if (!bstr) { return S_FALSE; } if (IsZombie()) { return CO_E_RELEASED; } CCallMgr callmgr(GetPed()); LONG cpMin, cpMost; LONG cch = GetRange(cpMin, cpMost); // Get this range's cp's LONG cchBstr = SysStringLen(bstr); LONG cchSave = _cch; LONG cp, cpMatch, cpSave; LONG cpStart = cpMost; // Default Start cp to range CRchTxtPtr rtp(*this); // End if (Mode == MOVE_IP) // FindText(): Count = 0 is { // treated specially: if IP, if (!Count) // compare string at IP; else { Count = cch ? cch : cchBstr; // confine search to range } if (Count > 0) // Forward searches start from { cpStart = cpMin; // beginning of range } } else // FindTextStart() or { // FindTextEnd() if (!Count) // Compare string at IP; else { Count = cch ? -Mode * cch : cchBstr; // confine search to range } if (Mode < 0) // Find from Start { cpStart = cpMin; } } cpSave = cpStart; // Save starting cp cp = cpStart + Count; // cp = limiting cp. Can be on cp = max(cp, 0); // either side of cpStart Flags &= ~FR_DOWN; // Default search backward if (Count >= 0) // It's forward, so set { Flags |= FR_DOWN; // downward search bit } find: rtp.SetCp(cpStart); // Move to start of search #ifdef MACPORT CStrInW strinw(bstr); //cpMatch = rtp.FindText(cp, Flags, strinw, wcslen(strinw)); cpMatch = rtp.FindText(cp, Flags, strinw, cchBstr); WideCharToMultiByte(CP_ACP, 0, strinw, wcslen(strinw), bstr, wcslen(strinw) + 1, NULL, NULL); #else cpMatch = rtp.FindText(cp, Flags, bstr, cchBstr); #endif if (Mode == MOVE_IP && cpMatch == cpMin && // Ordinary Find matched rtp.GetCp() == cpMost) // current range { Assert(cpStart == cpSave); // (Can't loop twice) cpStart += Count > 0 ? 1 : -1; // Move over one char goto find; // and try again } if (cpMatch < 0) // Match failed { if (pDelta) // Return match string length { *pDelta = 0; // = 0 } return S_FALSE; // Signal no match } // Match succeeded: set new cp and cch for range, update selection (if // this range is a selection), send notifications, and return NOERROR cp = rtp.GetCp(); // cp = cpMost of match string if (pDelta) // Return match string length { *pDelta = cchBstr; // if caller wants to know } cch = cp - cpMatch; // Default to select matched // string (for MOVE_IP) if (Mode != MOVE_IP) // MOVE_START or MOVE_END { if (Mode == MOVE_START) // MOVE_START moves to start { cp = cpMatch; // of matched string } cch = cp - cpSave; // Distance end moved if (!cchSave && (Mode ^ cch) < 0) // If crossed ends of initial { cch = 0; // IP, use an IP } else if (cchSave) // Initially nondegenerate { // range if ((cchSave ^ Mode) < 0) // If wrong end is active, { cchSave = -cchSave; // fake a FlipRange to get } cch += cchSave; // new length if ((cch ^ cchSave) < 0) // If ends would cross, { cch = 0; // convert to insertion point } } } if ((cp != GetCp() || cch != _cch) // Active end and/or length of && Set(cp, cch)) // range changed { // Use the new values Update(TRUE); // Update selection } return NOERROR; } /* * CTxtRange::Matcher (Cset, Count, pDelta, fExtend, Match) * * @mfunc * Helper function to move active end up to <p cch> characters past * all contiguous characters that are (<p Match> ? in : not in) the cset * *<p pvar>. If <p fExtend>, extend the range to include the characters * past by. Return *<p pDelta> = # characters past by. * * @rdesc * HRESULT = (if change) ? NOERROR : * (if <p Cset> valid) ? S_FALSE : E_INVALIDARG */ HRESULT CTxtRange::Matcher( VARIANT *Cset, //@parm Character match set long Count, //@parm Max cch to match long *pDelta, //@parm Out parm for cch moved MOVES Mode, //@parm MOVE_START (-1), MOVE_IP (0), MOVE_END (1) MATCHES Match) //@parm MATCH_WHILE spans Cset; else break on Cset { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEINTERN, "CTxtRange::Matcher"); // This (and other) code assumes the following conditions: Assert(MOVE_START == -1 && MOVE_IP == 0 && MOVE_END == 1); Assert(MATCH_UNTIL == 0 && MATCH_WHILE == 1); Assert(sizeof(WORD) == 2); // 16-bit WORDs if (!Cset) { return E_INVALIDARG; } if (IsZombie()) { return CO_E_RELEASED; } CCallMgr callmgr(GetPed()); LONG cch; // For cch moved TCHAR ch; // Current char LONG count = Count; // Count down variable LONG cpSave; // To save initial cp WORD ctype; // CT_TYPEx info for ch long Delta; // Value for *pDelta BOOL fInCset; // TRUE iff ch in Cset UINT i, j; // Handy indices LONG iDir = (Count > 0) ? 1 : -1; // Count increment long lVal = Cset->lVal; TCHAR *pch; // Used to walk BSTR Cset CTxtPtr tp(_rpTX); // tp to walk text with LONG vt = Cset->vt; if (pDelta) // Default neither motion { *pDelta = 0; // nor match } if (Mode == MOVE_IP && (_cch ^ Count) < 0 || // Wrong active end: Mode != MOVE_IP && (_cch ^ Mode) < 0) { tp.AdvanceCp(-_cch); // go to other end } cpSave = tp.GetCp(); // Save cp for checks if (Count > 0) // If matching forward, { // get current char ch = tp.GetChar(); count--; // One less char to match } else // If matching backward, { ch = tp.NextCharCount(count); // start at previous char } if (!ch) // At one end or other, so { return S_FALSE; // signal no match } // Process built-in and explicit character sets if (vt & VT_BYREF) // VB passes VT_BYREF { // unless args are lVal = *Cset->plVal; // enclosed in ()'s vt &= ~ VT_BYREF; } if (vt == VT_I2) // Should be VT_I4, but { lVal &= 0xffff; // facilitate common cases } // Built-in char set: either Unicode range or CT_CTYPEx if (vt == VT_I4 || vt == VT_I2) { i = lVal & 0xffff; // First code or CT mask j = lVal >> 16; // Size of range if (lVal < 0) // Unicode range Cset { // (sign bit is set) j &= 0x7fff; // Kill sign bit while ((Match ^ (ch - i > j)) && // ch in range or not (ch = tp.NextCharCount(count))) // Another char available ; // Note: count is passed } // by reference else // CT_CTYPEx Cset { // CT_CTYPEx is given by if (!j) // upper WORD of lVal { j = CT_CTYPE1; // 0 defaults to CT_CTYPE1 } do { ctype = 0; // For each char, get // string type info GetStringTypeEx(0, j, &ch, 1, &ctype); // Loop (up to |Count| - 1 times) as long as the characters // encountered are in the Cset (Match = MATCH_WHILE (=1)), // or as long as they are not (Match = MATCH_UNTIL (=0)). fInCset = (j == CT_CTYPE2) // CT_CTYPE2 values are ? (ctype == i) // mutually exclusive; : (ctype & i) != 0; // others can be combos } while ((Match ^ fInCset) == 0 && (ch = tp.NextCharCount(count)) != 0); } // End of built-in Csets } // End of Cset VT_I4 // Explicit char set given by chars in Cset->bstrVal else if (Cset->vt == VT_BSTR) { if ((DWORD)Cset->bstrVal < 0xfffff) // Don't get fooled by { return E_INVALIDARG; // invalid vt values } j = SysStringLen(Cset->bstrVal); do { // Set i = 0 if ch isn't #ifdef MACPORT CStrInW strinw(Cset->bstrVal); pch = strinw; // in set; this stops #else pch = Cset->bstrVal; // in set; this stops #endif for (i = j; // movement i && ((ch == *pch++) ^ Match); // Match = TRUE iff i--) ; // MoveWhileX } while (i && (ch = tp.NextCharCount(count))); // Break if no more chars } // or ch not in set else { return E_INVALIDARG; } /* If MoveWhile, leave tp immediately after last matched char going * forward and at that char going backward (helps to think of tp * pointing in between chars). If MoveUntil, leave tp at the char * going forward and just after that char going backward. * * E.g.: the code * * r.MoveUntil (C1_DIGIT, tomForward, NULL) * r.MoveEndWhile(C1_DIGIT, tomForward, NULL) * * breaks at the first digit and selects the number going forward. * Similarly * * r.MoveUntil (C1_DIGIT, tomBackward, NULL) * r.MoveStartWhile(C1_DIGIT, tomBackward, NULL) * * selects the number going backward. */ count = (Match == MATCH_WHILE && !ch) // If MoveWhile, move past ? iDir : 0; // last matched char if (Count < 0) { count++; } tp.AdvanceCp(count); Delta = cch = 0; // Suppress motion unless if (Match == MATCH_WHILE || ch) // match occurred { Delta = cch = tp.GetCp() - cpSave; // Calculate distance moved if (Match == MATCH_UNTIL) // For MoveUntil methods, { Delta += iDir; // match counts as a char } } if (pDelta) // Report motion to caller { *pDelta = Delta; // if it wants to know } // Handle cases for which range is changed if (cch || (Delta && _cch && Mode == MOVE_IP)) { if (Mode == MOVE_IP || // If move IP or asked to !_cch && (Mode ^ Count) < 0) // cross ends of initial { // IP, use an IP cch = 0; } else if (_cch) // Initially nondegenerate { // range if ((_cch ^ Mode) < 0) // If wrong end is active, { _cch = -_cch; // fake a FlipRange (will } cch += _cch; // set cp shortly) if ((cch ^ _cch) < 0) // If ends crossed, convert { cch = 0; // to insertion point } } if (Set(tp.GetCp(), cch)) // Set new range cp and cch { Update(TRUE); // Update selection return NOERROR; // Signal match occurred } return S_FALSE; } // No change in range. Return NOERROR iff match occurred for MOVE_UNTIL return Delta ? NOERROR : S_FALSE; } /* * CTxtRange::Mover (Unit, Count, pDelta, Mode) * * @mfunc * Helper function to move end(s) <p Count> <p Unit>s, which end(s) * depending on Mode = MOVE_IP, MOVE_START, and MOVE_END. Collapsing * the range by using MOVE_IP counts as a Unit. * * Extends range from End if <p Mode> = MOVE_END and from Start if * <p Mode> = MOVE_START; else (MOVE_IP) it collapses range to Start if * <p Count> <lt>= 0 and to End if <p Count> <gt> 0. * * Sets *<p pDelta> = count of Units moved * * Used by ITextRange::Delete(), Move(), MoveStart(), MoveEnd(), * and SetIndex() * * @rdesc * HRESULT = (if change) ? NOERROR : * (if <p Unit> valid) ? S_FALSE : E_INVALIDARG */ HRESULT CTxtRange::Mover( long Unit, //@parm Unit to use for moving active end long Count, //@parm Count of units to move active end long *pDelta, //@parm Out parm for count of units moved MOVES Mode) //@parm MOVE_START (-1), MOVE_IP (0), MOVE_END (1) { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEINTERN, "CTxtRange::Mover"); if (pDelta) { *pDelta = 0; // Default no units moved } if (IsZombie()) { return CO_E_RELEASED; } LONG cch; LONG cchAdj = GetAdjustedTextLength(); LONG cchMax = 0; // Default full story limits LONG cp; LONG cpMost = GetCpMost(); LONG cUnitCollapse = 0; HRESULT hr = NOERROR; CTxtRange rg(*this); // Use a copy to look around if (pDelta) { *pDelta = 0; // Default no units moved } if (_cch && Count) // Nondegenerate range { if (Mode == MOVE_IP) // Insertion point: will { // collapse range if Unit is if ((Count ^ rg._cch) < 0) // defined. Go to correct end { rg.FlipRange(); } if (Count > 0) { if (cpMost > cchAdj) { cUnitCollapse = -1; // Collapse before final CR Count = 0; // No more motion } else { // Extend pDelta pcpMin pcpMost hr = rg.Expander(Unit, FALSE, NULL, NULL, &cp); cUnitCollapse = 1; // Collapse counts as a Unit Count--; // One less Unit to count } } else { hr = rg.Expander(Unit, FALSE, NULL, &cp, NULL); cUnitCollapse = -1; Count++; } if (FAILED(hr)) { return hr; } } else if ((Mode ^ rg._cch) < 0) // MOVE_START or MOVE_END { rg.FlipRange(); // Go to Start or End } } if (Count > 0 && Mode != MOVE_END) // Moving IP or Start forward { cchMax = cchAdj - rg.GetCp(); // Can't pass final CR if (cchMax <= 0) // Already at or past it { // Only count comes from Count = cUnitCollapse; // possible collapse cp = cchAdj; // Put active end at cchAdj cch = (Mode == MOVE_START && cpMost > cchAdj) ? cp - cpMost : 0; goto set2; } } cch = rg.UnitCounter(Unit, Count, cchMax); // Count off Count Units if (cch == tomForward) // Unit not implemented { return E_NOTIMPL; } if (cch == tomBackward) // Unit not available, e.g., { return S_FALSE; // tomObject and no objects } Count += cUnitCollapse; // Add a Unit if collapse if (!Count) // Nothing changed, so quit { return S_FALSE; } if (Mode == MOVE_IP || // MOVE_IP or !_cch && (Mode ^ Count) < 0) // initial IP end cross { cch = 0; // New range is degenerate } else if (_cch) // MOVE_START or MOVE_END { // with nondegenerate range if ((_cch ^ Mode) < 0) // Make _cch correspond to end { _cch = -_cch; // that moved } cch += _cch; // Possible new range length if ((cch ^ _cch) < 0) // Nondegenerate end cross { cch = 0; // Use IP } } cp = rg.GetCp(); set2: if (Set(cp, cch)) // Attempt to set new range { // Something changed if (pDelta) // Report count of units { *pDelta = Count; // advanced } Update(TRUE); // Update selection return NOERROR; } return S_FALSE; } /* * * CTxtRange::Replacer (cchNew, *pch) * * @mfunc * Replace this range's using CHARFORMAT _iFormat and updating other * text runs as needed. * * Same as CTxtRange::CleanseAndReplaceRange(cchNew, *pch, publdr), * except creates its own undo builder. * * @rdesc * cch of text actually pasted * * @devnote * moves this text pointer to end of replaced text and * may move text block and formatting arrays */ LONG CTxtRange::Replacer( LONG cchNew, // @parm Length of replacement text TCHAR const *pch) // @parm Replacement text { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEINTERN, "CTxtRange::Replacer"); if (IsZombie()) { return CO_E_RELEASED; } CGenUndoBuilder undobldr(GetPed(), UB_AUTOCOMMIT); undobldr.StopGroupTyping(); // Note: we don't check the limit on text here. Right now, this // is only called by Delete and SetText so this is OK. However, // we might want to reinvestigate this latter if this is called // by anything else. return CleanseAndReplaceRange(cchNew, pch, FALSE, &undobldr); } /* * CTxtRange::CharFormatSetter (pCF) * * @mfunc * Helper function that's the same as CTxtRange::SetCharFormat(), but * adds undo building, and notification. * * @rdesc * HRESULT = (if success) ? NOERROR : S_FALSE * (protected) ? E_ACCESSDENIED : E_OUTOFMEMORY */ HRESULT CTxtRange::CharFormatSetter( const CCharFormat *pCF) // @parm CCharFormat to fill with results { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEINTERN, "CTxtRange::CharFormatSetter"); if (IsZombie()) { return CO_E_RELEASED; } CTxtEdit *ped = GetPed(); CCallMgr callmgr(ped); CGenUndoBuilder undobldr(ped, UB_AUTOCOMMIT); if (WriteAccessDenied()) { return E_ACCESSDENIED; } undobldr.StopGroupTyping(); return SetCharFormat(pCF, FALSE, &undobldr); } /* * CTxtRange::ParaFormatSetter (pPF) * * @mfunc * Helper function that's the same as CTxtRange::SetParaFormat(), but * adds protection checking, undo building, and notification. * * @rdesc * HRESULT = (if success) ? NOERROR : S_FALSE * (protected) ? E_ACCESSDENIED : E_OUTOFMEMORY */ HRESULT CTxtRange::ParaFormatSetter( const CParaFormat *pPF) // @parm CParaFormat to fill with results { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEINTERN, "CTxtRange::ParaFormatSetter"); if (IsZombie()) { return CO_E_RELEASED; } CTxtEdit *ped = GetPed(); CCallMgr callmgr(ped); CGenUndoBuilder undobldr(ped, UB_AUTOCOMMIT); if (WriteAccessDenied()) { return E_ACCESSDENIED; } undobldr.StopGroupTyping(); return SetParaFormat(pPF, &undobldr); } /* * CTxtRange::WriteAccessDenied() * * @mfunc * Returns TRUE iff at least part of the range is protected and the * owner chooses to enforce it * * @rdesc * TRUE iff write access to range is denied */ BOOL CTxtRange::WriteAccessDenied() { TRACEBEGIN(TRCSUBSYSTOM, TRCSCOPEINTERN, "CTxtRange::WriteAccessDenied"); int iProt; CTxtEdit *ped = GetPed(); if (ped && ped->TxGetReadOnly() || ped->IsProtectionCheckingEnabled() && ((iProt = IsProtected(-1)) == PROTECTED_YES || (iProt == PROTECTED_ASK && ped->QueryUseProtection(this, 0, 0, 0)))) // N.B. the preceding if statement assumes that IsProtected returns a tri-value { return TRUE; } return FALSE; } /* * CTxtRange::IsTrue (f, pB) * * @mfunc * Return *<p pB> = tomTrue iff <p f> is nonzero and pB isn't NULL * * @rdesc * HRESULT = (f) ? NOERROR : S_FALSE */ HRESULT CTxtRange::IsTrue(BOOL f, long *pB) { if (pB) { *pB = tomFalse; } if (IsZombie()) { return CO_E_RELEASED; } if (f) { if (pB) { *pB = tomTrue; } return NOERROR; } return S_FALSE; } /* * CTxtRange::GetLong (lValue, pLong) * * @mfunc * Return *pLong = lValue provided pLong isn't NULL and this range * isn't a zombie * * @rdesc * HRESULT = (zombie) ? CO_E_RELEASED : * (pLong) ? NOERROR : E_INVALIDARG */ HRESULT CTxtRange::GetLong( LONG lValue, //@parm Long value to return long *pLong) //@parm Out parm to receive long value { _TEST_INVARIANT_ if (!pLong) { return E_INVALIDARG; } *pLong = lValue; if (IsZombie()) { return CO_E_RELEASED; } return NOERROR; } /* * SameVtables (punk1, punk2) * * @mfunc * Returns true if punk1 has same vtable as punk2 * * @rdesc * TRUE iff punk1 has same vtable as punk2 */ BOOL SameVtables(IUnknown *punk1, IUnknown *punk2) { return punk1 && punk2 && *(LONG *)punk1 == *(LONG *)punk2; } /* * FPPTS_TO_TWIPS (x) * * @mfunc * Returns 20*x, i.e., the number of twips corresponding to * x given in floating-point points. The value is rounded. * * @rdesc * x converted to twips */ long FPPTS_TO_TWIPS( float x) { return 20 * x + ((x >= 0) ? 0.5 : -0.5); }
be711cdd0831ba1ccbaa99315dcb4a3e7a27c192
cbc49ab614d9e2da825bbc45f2ae86d2088fce29
/src/gzrosrcs/src/gazebo.cpp
477480b2d802d037c83ed629e3da37edd35c1453
[]
no_license
johnmichaloski/gzgwendolen
ef442ac7f0af9507c251fbf39ab1c30a5737ddf5
5186694a52ade82db206bcf0b3d25737011f8aee
refs/heads/main
2023-01-04T07:44:46.821304
2020-11-04T17:50:31
2020-11-04T17:50:31
304,719,185
0
0
null
null
null
null
UTF-8
C++
false
false
17,575
cpp
/* * DISCLAIMER: * This software was produced by the National Institute of Standards * and Technology (NIST), an agency of the U.S. government, and by statute is * not subject to copyright in the United States. Recipients of this software * assume all responsibility associated with its operation, modification, * maintenance, and subsequent redistribution. * * See NIST Administration Manual 4.09.07 b and Appendix I. */ #include "aprs_headers/Debug.h" #include "gzrosrcs/gazebo.h" #include "gzrosrcs/Globals.h" #include "gzrosrcs/Shape.h" #include "aprs_headers/Config.h" // static definitions gazebo::transport::NodePtr CGazebo::_node; bool CGazebo::_bInited=false; std::string CGazebo::_inifile; std::string CGazebo::_robotname; // extern global definitions CGazebo gz; static Nist::Config gzconfig; //////////////////////////////////////////////////////////////////////////////// CGazebo::CGazebo() { } //////////////////////////////////////////////////////////////////////////////// std::string CGazebo::init(std::string robotname, std::string inifile) { _inifile=inifile; _robotname=robotname; if(!gzconfig.loadFile(CGazebo::_inifile)) return "ini file " + inifile + "did not open"; int argc=1; char* argv[1]; argv[0]=(char *) getexepath().c_str(); // Wait for gazebo server to be running - gzserver program std::cout << "Connecting to gazebo server"; while( Globals.procFind("gzserver") < 0) { Globals.sleep(1000); std::cout << "." << std::flush; } std::cout << "\n" << std::flush; Globals.sleep(1000); // Load gazebo #if GAZEBO_MAJOR_VERSION < 6 gazebo::setupClient(argc, argv); #else gazebo::client::setup(argc, argv); #endif // Create our node for communication _node= gazebo::transport::NodePtr(new gazebo::transport::Node()); _node->Init(); _bInited=true; return ""; } //////////////////////////////////////////////////////////////////////////////// void CGazebo::stop() { _node=nullptr; // Make sure to shut everything down. #if GAZEBO_MAJOR_VERSION < 6 gazebo::shutdown(); #else gazebo::client::shutdown(); #endif } ///////////////////////////////////////////////////////////////////////////// /// CGzModelReader ///////////////////////////////////////////////////////////////////////////// std::map<std::string, long> CGzModelReader::gzModelName2Id; std::map<std::string, long> CGzModelReader::gzLinkName2Id; #if GAZEBO_MAJOR_VERSION >= 8 std::map<std::string, ignition::math::Vector3d> CGzModelReader::gzModelBoundingBox; #endif CGzModelReader::CGzModelReader() { _modeltopicname="/gazebo/default/ariac/model"; } std::string CGzModelReader::init() { _modeltopicname = gzconfig.getSymbolValue<std::string>("gazebo.modeltopicname","ERROR"); if(_modeltopicname=="ERROR") return "Bad model topic name"; return ""; } ///////////////////////////////////////////////////////////////////////////// void CGzModelReader::reset() { #if GAZEBO_MAJOR_VERSION >= 8 std::lock_guard<std::mutex> guard(_mymutex); gazebo::msgs::Model msg; for(gearit= _gearStartingPoses.begin(); gearit!=_gearStartingPoses.end(); ++gearit) { msg.set_name((*gearit).first); gazebo::msgs::Set(msg.mutable_pose(), gazebo::msgs::ConvertIgn((*gearit).second)); modelPub->Publish(msg); } #endif } void CGzModelReader::onModelUpdate(ConstModelPtr &_msg) { std::string name = _msg->name(); std::cout << name << std::endl; } ///////////////////////////////////////////////////////////////////////////// void CGzModelReader::start() { _sub = CGazebo::_node->Subscribe<gazebo::msgs::Model>(_modeltopicname, &CGzModelReader::onUpdate,this); modelPub = CGazebo::_node->Advertise<gazebo::msgs::Model>("~/model/modify"); // This only seems to report non-static models // _modelsub = CGazebo::_node->Subscribe<gazebo::msgs::Model>("/gazebo/default/model/info", &CGzModelReader::onModelUpdate,this); Globals.sleep(1000); std::cout << "Gazebo model reader subscriber" << _sub << "started\n"; } ///////////////////////////////////////////////////////////////////////////// void CGzModelReader::stop() { if(_sub.get()!=nullptr) _sub->Unsubscribe(); if(modelPub.get()!=nullptr) modelPub->Fini(); // want to kill gazebo update of model callback if(_sub.get()!=nullptr) _sub.reset(); std::cout << "Gazebo model reader subscriber stopped\n"; } #include <sys/stat.h> #include "aprs_headers/Config.h" #include <algorithm> ///////////////////////////////////////////////////////////////////////////// void CGzModelReader::onUpdate(ConstModelPtr &_msg) { std::string name = _msg->name(); // only save links for gear related models. if(name.find("sku")==std::string::npos) return; //ignition::math::Pose3d pose = gazebo::msgs::ConvertIgn(_msg->pose()); const ::gazebo::msgs::Pose pose = _msg->pose(); const ::gazebo::msgs::Quaternion& q = _msg->pose().orientation(); const ::gazebo::msgs::Vector3d& p = _msg->pose().position(); const tf::Pose tfpose(tf::Quaternion(q.x(), q.y(), q.z(), q.w()), tf::Vector3(p.x(), p.y(), p.z())); #if 0 //"model://gear_support/meshes/new_big_gear_Rotatex_Centered_ZeroZmin.stl" std::string meshfile; // std::cout << _msg->DebugString(); if(_msg->link_size()>0) { CLEANSTORE(meshfile, _msg->link(0).visual(0).geometry().mesh().filename(), "") ; double x,y,z; CLEANSTORE(x, _msg->link(0).visual(0).geometry().mesh().scale().x(), -1) ; CLEANSTORE(y, _msg->link(0).visual(0).geometry().mesh().scale().y(), -1) ; CLEANSTORE(z, _msg->link(0).visual(0).geometry().mesh().scale().z(), -1) ; tf::Vector3 scale(x,y,z); } #else std::string meshfile; tf::Vector3 scale(1.,1.,1.); #endif // Lock updates of instance and model link to id std::lock_guard<std::mutex> guard(_mymutex); ShapeModel::instances.storeInstance(name, tfpose, meshfile, scale); if(Globals.bReadAllInstances!=true) if(name.find("part")!=std::string::npos) _gearStartingPoses[name]=pose; // const google::protobuf::Message *prototype = // google::protobuf::MessageFactory::generated_factory()->GetPrototype( // _msg->GetDescriptor()); // std::unique_ptr<google::protobuf::Message> payload(prototype->New()); // // payload->ParseFromString(response->serialized_data()); // payload->ParseFromString(_msg->SerializeAsString()); // std::cout << payload->DebugString() << std::endl; // std::cout << _msg->DebugString() << std::endl; // Dont really for link id after all models are read once. if(Globals.bReadAllInstances) return; #if 0 ignition::math::Vector3d bbox(0,0,0); if(_msg->visual_size()>0) { const gazebo::msgs::Visual visual ( _msg->visual(0)); gazebo::msgs::Geometry g; gazebo::msgs::BoxGeom *bg; gazebo::msgs::Vector3d v; // these macros catch null pointer access VALIDSTORE(g, visual.geometry()) ; VALIDSTORE(bg, g.mutable_box()) ; VALIDSTORE(v, bg->size()) ; bbox.Set( v.x(), v.y(), v.z()); } gzModelBoundingBox[name]=bbox; gzModelName2Id[name]=_msg->id(); for(size_t j=0; j<_msg->link_size(); j++) { const ::gazebo::msgs::Link& link (_msg->link(0)); std::string fullyInstantiatedName = name + "::" + link.name(); gzLinkName2Id[fullyInstantiatedName] =link.id(); } #endif } ////////////////////////////////////////////////////////////////////////////// /// CGzRobotHandler ///////////////////////configure/////////////////////////////////////////////////////// std::string CGzRobotHandler::init(std::string robotName //std::string gzRobotJointPrefix, //std::string gzRobotCmdTopicName, //std::string gzRobotStatusTopicName ) { // Robot joint name prefix, which is a mess _mGzRobotJointPrefix = gzconfig.getSymbolValue<std::string>("gazebo."+robotName+".gzJointPrefix","ERROR"); if(_mGzRobotJointPrefix=="ERROR") return "Bad CGzRobotHandler Joint Prefix name. i.e., gazebo."+robotName+".gzJointPrefix"; _mGzRobotCmdTopicName = gzconfig.getSymbolValue<std::string>("gazebo."+robotName+".gzRobotCmdTopicName","ERROR"); _mGzRobotStatusTopicName = gzconfig.getSymbolValue<std::string>("gazebo."+robotName+".gzRobotStatusTopicName","ERROR"); if(_mGzRobotCmdTopicName=="ERROR" || _mGzRobotStatusTopicName == "ERROR") return "Bad CGzRobotHandler topic(s) name. Either gazebo."+robotName+".gzRobotCmdTopicName or gazebo."+robotName+".gzRobotStatusTopicName"; return ""; } ///////////////////////////////////////////////////////////////////////////// void CGzRobotHandler::start(std::vector<std::string> robotnames, std::vector<std::string> fingernames) { _bRunning=true; _robotCmdJoints.name=robotnames; _gripperJoints.name = fingernames; this->_robotStatusJoints.name=robotnames; this->_robotStatusJoints.position.resize(robotnames.size(), 0.0); this->_robotStatusJoints.velocity.resize(robotnames.size(), 0.0); this->_robotStatusJoints.effort.resize(robotnames.size(), 0.0); // create publish gazebo connection if(!_mGzRobotCmdTopicName.empty()) { _robotCmdPub= CGazebo::_node->Advertise<message::JointsComm>(_mGzRobotCmdTopicName); } if(!_mGzRobotStatusTopicName.empty()) { _robotStatusSub= CGazebo::_node->Subscribe<message::JointsComm>(_mGzRobotStatusTopicName, &CGzRobotHandler::OnStatusUpdate,this); } } ///////////////////////////////////////////////////////////////////////////// void CGzRobotHandler::stop() { _bRunning=false; } ///////////////////////////////////////////////////////////////////////////// bool CGzRobotHandler::updateRobot(double dTime, sensor_msgs::JointState joints) { _writeCycles++; // if same joints do not update if(_robotCmdJoints.position==joints.position && _robotCmdJoints.name==joints.name) return false; // Copy and save robot joint position values. { std::lock_guard<std::mutex> guard(_mymutex); _robotCmdJoints.name=joints.name; _robotCmdJoints.position=joints.position; } message::JointsComm jnts; for(size_t i=0; i< _robotCmdJoints.name.size(); i++) { jnts.add_name(_mGzRobotJointPrefix+ _robotCmdJoints.name[i].c_str()); if(i >= _robotCmdJoints.position.size()) { std::cerr << "Wrong number of joints in CGzJointCmdWriter\n"; continue; } jnts.add_position(joints.position[i]); } _robotCmdPub->Publish(jnts); return true; } ////////////////////////////////////////////////////////////////////////////// void CGzRobotHandler::OnStatusUpdate(ConstRobotCmdPtr &_msg) { std::lock_guard<std::mutex> guard(_mymutex); _readCycles++; if(_msg->name_size() == 0) { std::cout << "Problem with on robot status update\n"; return; } this->_robotStatusJoints.name.clear(); this->_robotStatusJoints.position.clear(); this->_robotStatusJoints.velocity.clear(); this->_robotStatusJoints.effort.clear(); for (size_t i=0; i< _msg->name_size(); i++) { _robotStatusJoints.name.push_back(_msg->name(i)); if(i< _msg->position_size()) _robotStatusJoints.position.push_back(_msg->position(i)); if(i< _msg->velocity_size()) _robotStatusJoints.velocity.push_back(_msg->velocity(i)); if(i< _msg->effort_size()) _robotStatusJoints.effort.push_back(_msg->effort(i)); } } ////////////////////////////////////////////////////////////////////////////// bool CGzRobotHandler::updateGripper(double dTime, sensor_msgs::JointState joints) { if(joints.position.size()>0) { _gripperJoints.velocity.clear(); // allow change of velocity if(_gripperJoints.position==joints.position) return false; _gripperJoints.position=joints.position; _gripperJoints.name=joints.name; for(size_t i=0; i< _gripperJoints.name.size(); i++) { // Convert to a Gazebo JointCmd message gazebo::msgs::JointCmd msg; msg.set_name(_mGzRobotJointPrefix+ _gripperJoints.name[i].c_str()); double val=joints.position[i]; ::gazebo::msgs::PID * position = new ::gazebo::msgs::PID(); position->set_target(val); // Be careful: delete position_; // minor leak. msg.set_allocated_position(position); _robotCmdPub->Publish(msg); } } else if(joints.velocity.size()>0) { _gripperJoints.position.clear(); // allow change of position if(_gripperJoints.velocity==joints.velocity) return false; _gripperJoints.velocity=joints.velocity; _gripperJoints.effort=joints.effort; _gripperJoints.name=joints.name; for(size_t i=0; i< _gripperJoints.name.size(); i++) { // Convert to a Gazebo JointCmd message gazebo::msgs::JointCmd msg; msg.set_name(_mGzRobotJointPrefix+ _gripperJoints.name[i].c_str()); double val=joints.velocity[i]; ::gazebo::msgs::PID * velocity = new ::gazebo::msgs::PID(); velocity->set_target(val); // Be careful: delete velocity; // minor leak. msg.set_allocated_velocity(velocity); msg.set_force(_gripperJoints.effort[i]); // max force _robotCmdPub->Publish(msg); } } else if(joints.effort.size()>0) { _gripperJoints.position.clear(); // allow change of position if(_gripperJoints.effort==joints.effort) return false; _gripperJoints.effort=joints.effort; _gripperJoints.name=joints.name; for(size_t i=0; i< _gripperJoints.name.size(); i++) { // Convert to a Gazebo JointCmd message gazebo::msgs::JointCmd msg; msg.set_name(_mGzRobotJointPrefix+ _gripperJoints.name[i].c_str()); double val=10.; // dummy for now ::gazebo::msgs::PID * velocity = new ::gazebo::msgs::PID(); velocity->set_target(val); msg.set_allocated_velocity(velocity); msg.set_force(_gripperJoints.effort[i]); // max force _robotCmdPub->Publish(msg); } } return true; } ////////////////////////////////////////////////////////////////////////////// /// CGzParallelGripper ////////////////////////////////////////////////////////////////////////////// std::string CGzParallelGripper::init(std::string robotName) { // gazebo communication topic names - from config.ini gazebo section _mGzGripperCmdTopicName = gzconfig.getSymbolValue<std::string>("gazebo."+robotName+".gzGripperCmdTopicName","ERROR"); _mGzGripperStatusTopicName = gzconfig.getSymbolValue<std::string>("gazebo."+robotName+".gzGripperStatusTopicName","ERROR"); if(_mGzGripperCmdTopicName=="ERROR"|| _mGzGripperStatusTopicName =="ERROR") return "Bad model topic(s) name. Either gazebo."+robotName+".gzGripperCmdTopicName or gazebo."+robotName+".gzGripperStatusTopicName"; _mEE=-1; return ""; } ///////////////////////////////////////////////////////////////////////////// void CGzParallelGripper::start() { _bRunning=true; if(Globals.bGzGripperPlugin && !_mGzGripperCmdTopicName.empty()) { _gripperpub = CGazebo::_node->Advertise<message::GripCommand>(_mGzGripperCmdTopicName); } if(Globals.bGzGripperPlugin && !_mGzGripperStatusTopicName.empty()) { _grippersub=CGazebo::_node->Subscribe<message::GripCommand>(_mGzGripperStatusTopicName.c_str(), &CGzParallelGripper::OnStatusUpdate,this);; } } ///////////////////////////////////////////////////////////////////////////// void CGzParallelGripper::stop() { _bRunning=false; } ///////////////////////////////////////////////////////////////////////////// void CGzParallelGripper::OnStatusUpdate(ConstGripperCmdPtr &_msg) { std::lock_guard<std::mutex> guard(_mymutex); _readCycles++; this->_nGripperState=_msg->state(); } ///////////////////////////////////////////////////////////////////////////// int CGzParallelGripper::isGrasping() { std::lock_guard<std::mutex> guard(_mymutex); return this->_nGripperState; } ///////////////////////////////////////////////////////////////////////////// bool CGzParallelGripper::updateGripper(double time, double eepercent) { if(!Globals.bGzGripperPlugin) { std::cerr << "updating Pavel gripper plugin but not enabled\n"; return false; } // check to see if sent last time. If so, skip. if(_mEE == eepercent) return false; // Convert to a Gazebo Custom GripCommand message message::GripCommand msg; if(eepercent>0.0) msg.set_enable(false); else msg.set_enable(true); _gripperpub->Publish(msg); _mEE = eepercent; return true; }
2265e82c4b834d2f56b384c825775f2bafeb1c17
cf8ddfc720bf6451c4ef4fa01684327431db1919
/SDK/ARKSurvivalEvolved_Xenomorph_Character_BP_Male_Gen2_functions.cpp
05a187b5a1b2ce70492947afd7f30e58969b08ea
[ "MIT" ]
permissive
git-Charlie/ARK-SDK
75337684b11e7b9f668da1f15e8054052a3b600f
c38ca9925309516b2093ad8c3a70ed9489e1d573
refs/heads/master
2023-06-20T06:30:33.550123
2021-07-11T13:41:45
2021-07-11T13:41:45
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,694
cpp
// ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_Xenomorph_Character_BP_Male_Gen2_parameters.hpp" namespace sdk { //--------------------------------------------------------------------------- //Functions //--------------------------------------------------------------------------- // Function Xenomorph_Character_BP_Male_Gen2.Xenomorph_Character_BP_Male_Gen2_C.UserConstructionScript // () void AXenomorph_Character_BP_Male_Gen2_C::UserConstructionScript() { static auto fn = UObject::FindObject<UFunction>("Function Xenomorph_Character_BP_Male_Gen2.Xenomorph_Character_BP_Male_Gen2_C.UserConstructionScript"); AXenomorph_Character_BP_Male_Gen2_C_UserConstructionScript_Params params; auto flags = fn->FunctionFlags; UObject::ProcessEvent(fn, &params); fn->FunctionFlags = flags; } // Function Xenomorph_Character_BP_Male_Gen2.Xenomorph_Character_BP_Male_Gen2_C.ExecuteUbergraph_Xenomorph_Character_BP_Male_Gen2 // () // Parameters: // int EntryPoint (Parm, ZeroConstructor, IsPlainOldData) void AXenomorph_Character_BP_Male_Gen2_C::ExecuteUbergraph_Xenomorph_Character_BP_Male_Gen2(int EntryPoint) { static auto fn = UObject::FindObject<UFunction>("Function Xenomorph_Character_BP_Male_Gen2.Xenomorph_Character_BP_Male_Gen2_C.ExecuteUbergraph_Xenomorph_Character_BP_Male_Gen2"); AXenomorph_Character_BP_Male_Gen2_C_ExecuteUbergraph_Xenomorph_Character_BP_Male_Gen2_Params params; params.EntryPoint = EntryPoint; auto flags = fn->FunctionFlags; UObject::ProcessEvent(fn, &params); fn->FunctionFlags = flags; } } #ifdef _MSC_VER #pragma pack(pop) #endif
1edca3615eee8252730bcde583dba22ae470fb11
812483619228582d4227680715b6c430f409fd56
/src/query/analyser/ExpressionOptimizer.cpp
954d6b38755acde76888648583d71f8c42102a13
[]
no_license
alexandervanrenen/Gamera-Database
dc309be4f74a9edbe6e6701f63e78ba3b5f089b6
77e519bb95a3d9be5d4930c969ce2525442da2bd
refs/heads/master
2021-06-13T19:47:39.964140
2017-02-19T21:17:29
2017-02-19T21:17:29
8,671,726
1
0
null
null
null
null
UTF-8
C++
false
false
1,276
cpp
#include "ExpressionOptimizer.hpp" #include "harriet/Expression.hpp" #include "query/util/GlobalRegister.hpp" using namespace std; namespace dbi { namespace qgen { unique_ptr<harriet::Expression> ExpressionOptimizer::fullOptimization(const harriet::Expression& expression, qopt::GlobalRegister& globalRegister, harriet::Environment& environment) { harriet::Expression* ptr = expression.createCopy().release(); substitute(&ptr, globalRegister); substitute(&ptr, environment); optimize(&ptr); return unique_ptr<harriet::Expression>(ptr); } void ExpressionOptimizer::substitute(harriet::Expression** expression, qopt::GlobalRegister& globalRegister) const { vector<harriet::Expression**> freeVariables = (*expression)->getAllVariables(expression); for(auto iter : freeVariables) { if(globalRegister.hasColumn((*iter)->identifier)) { uint32_t columnIndex = globalRegister.getColumnIndex((*iter)->identifier); delete *iter; *iter = harriet::Expression::createValueReferenceExpression(&globalRegister.getSlotValue(columnIndex)).release(); } } } void ExpressionOptimizer::substitute(harriet::Expression**, harriet::Environment&) const { } void ExpressionOptimizer::optimize(harriet::Expression**) const { } } }
8d2683d2aae2eb48bffd401ef73adb8c975fc165
ea62a03b1abc9ef65ac6773228f996c91c224ab6
/Required Libraries/CleO/CleO35/Tutorials/Tutorials16-Camera/a.CameraPreview/a.CameraPreview.ino
b65ceb2719e4737bc2c266b76815eff063d74676
[]
no_license
aa-w/CleoCom
6ec9276f18b7fb31fe5cd0a79aff3dbc87a94565
acd8a6ccb5ac48b51e2c530f26f1c18fae87ad75
refs/heads/master
2020-07-26T13:28:16.225832
2019-10-12T23:38:21
2019-10-12T23:38:21
208,659,299
0
0
null
null
null
null
UTF-8
C++
false
false
849
ino
/* (C) Copyright Bridgetek Pte Ltd. * ============================================================================ * * This source code ("the Software") is provided by Bridgetek Pte Ltd * ("Bridgetek") subject to the licence terms set out * http://brtchip.com/BRTSourceCodeLicenseAgreement/ ("the Licence Terms"). * You must read the Licence Terms before downloading or using the Software. * By installing or using the Software you agree to the Licence Terms. If you * do not agree to the Licence Terms then do not download or use the Software. */ /** Sketch: Tutorials16-CameraPreview.ino Purpose: To desmonstrate using Camera command */ #include <SPI.h> #include <CleO.h> void setup() { Serial.begin(115200); CleO.begin(); /* Display Camera Recorder*/ CleO.RecorderPreview(); } void loop() {}
a61a0747b76b555a0b4bb9f981b243ba1ff1e45e
d442e34d7e8eded28e5a4ab111b7cac002e9950d
/StivenPrata/2/5.cpp
215c850a800df611f5b4300b66f6e3aa80568f62
[]
no_license
bzz13/cplusplus
1b4e24d6a119688a0a7f91b85c19a25a6a2a7c16
cf69811e6d001325fbd781f167fe6ed0a7954e50
refs/heads/master
2020-04-06T06:04:35.161002
2017-02-28T10:29:32
2017-02-28T10:29:32
46,825,518
0
1
null
null
null
null
UTF-8
C++
false
false
330
cpp
#include <iostream> using namespace std; float celsiusToFahrenheit(int degrees) { return degrees * 1.8 + 32; } int main() { cout << "Please enter s Celsius value: "; int degrees; cin >> degrees; cout << degrees << " degrees Celsius is " << celsiusToFahrenheit(degrees) << " degrees Fahrenheit" << endl; return 0; }
86cd1f2973ff8d959722b6bdbc090903c60cdf2e
311bca02634b791b17a1cd6e2258d858c5ee8b70
/src/rpc/server.h
a40b354f4a5e2b1df9543604d8fd40268e26a9c2
[ "MIT" ]
permissive
ed-ro0t/C-Bit
65359b8eb1efbf3762d9c0375acd971e2352b38f
73bc5652564d344af6847eefde6d386225d4ad02
refs/heads/master
2020-03-09T06:57:08.468887
2017-09-04T00:40:41
2017-09-04T00:40:41
null
0
0
null
null
null
null
UTF-8
C++
false
false
6,067
h
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The C-Bit Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_RPCSERVER_H #define BITCOIN_RPCSERVER_H #include "amount.h" #include "rpc/protocol.h" #include "uint256.h" #include <list> #include <map> #include <stdint.h> #include <string> #include <boost/function.hpp> #include <univalue.h> static const unsigned int DEFAULT_RPC_SERIALIZE_VERSION = 1; class CRPCCommand; namespace RPCServer { void OnStarted(boost::function<void ()> slot); void OnStopped(boost::function<void ()> slot); void OnPreCommand(boost::function<void (const CRPCCommand&)> slot); void OnPostCommand(boost::function<void (const CRPCCommand&)> slot); } class CBlockIndex; class CNetAddr; /** Wrapper for UniValue::VType, which includes typeAny: * Used to denote don't care type. Only used by RPCTypeCheckObj */ struct UniValueType { UniValueType(UniValue::VType _type) : typeAny(false), type(_type) {} UniValueType() : typeAny(true) {} bool typeAny; UniValue::VType type; }; class JSONRequest { public: UniValue id; std::string strMethod; UniValue params; JSONRequest() { id = NullUniValue; } void parse(const UniValue& valRequest); }; /** Query whether RPC is running */ bool IsRPCRunning(); /** * Set the RPC warmup status. When this is done, all RPC calls will error out * immediately with RPC_IN_WARMUP. */ void SetRPCWarmupStatus(const std::string& newStatus); /* Mark warmup as done. RPC calls will be processed from now on. */ void SetRPCWarmupFinished(); /* returns the current warmup state. */ bool RPCIsInWarmup(std::string *statusOut); /** * Type-check arguments; throws JSONRPCError if wrong type given. Does not check that * the right number of arguments are passed, just that any passed are the correct type. */ void RPCTypeCheck(const UniValue& params, const std::list<UniValue::VType>& typesExpected, bool fAllowNull=false); /* Check for expected keys/value types in an Object. */ void RPCTypeCheckObj(const UniValue& o, const std::map<std::string, UniValueType>& typesExpected, bool fAllowNull = false, bool fStrict = false); /** Opaque base class for timers returned by NewTimerFunc. * This provides no methods at the moment, but makes sure that delete * cleans up the whole state. */ class RPCTimerBase { public: virtual ~RPCTimerBase() {} }; /** * RPC timer "driver". */ class RPCTimerInterface { public: virtual ~RPCTimerInterface() {} /** Implementation name */ virtual const char *Name() = 0; /** Factory function for timers. * RPC will call the function to create a timer that will call func in *millis* milliseconds. * @note As the RPC mechanism is backend-neutral, it can use different implementations of timers. * This is needed to cope with the case in which there is no HTTP server, but * only GUI RPC console, and to break the dependency of pcserver on httprpc. */ virtual RPCTimerBase* NewTimer(boost::function<void(void)>& func, int64_t millis) = 0; }; /** Set the factory function for timers */ void RPCSetTimerInterface(RPCTimerInterface *iface); /** Set the factory function for timer, but only, if unset */ void RPCSetTimerInterfaceIfUnset(RPCTimerInterface *iface); /** Unset factory function for timers */ void RPCUnsetTimerInterface(RPCTimerInterface *iface); /** * Run func nSeconds from now. * Overrides previous timer <name> (if any). */ void RPCRunLater(const std::string& name, boost::function<void(void)> func, int64_t nSeconds); typedef UniValue(*rpcfn_type)(const UniValue& params, bool fHelp); class CRPCCommand { public: std::string category; std::string name; rpcfn_type actor; bool okSafeMode; }; /** * Bitcoin RPC command dispatcher. */ class CRPCTable { private: std::map<std::string, const CRPCCommand*> mapCommands; public: CRPCTable(); const CRPCCommand* operator[](const std::string& name) const; std::string help(const std::string& name) const; /** * Execute a method. * @param method Method to execute * @param params UniValue Array of arguments (JSON objects) * @returns Result of the call. * @throws an exception (UniValue) when an error happens. */ UniValue execute(const std::string &method, const UniValue &params) const; /** * Returns a list of registered commands * @returns List of registered commands. */ std::vector<std::string> listCommands() const; /** * Appends a CRPCCommand to the dispatch table. * Returns false if RPC server is already running (dump concurrency protection). * Commands cannot be overwritten (returns false). */ bool appendCommand(const std::string& name, const CRPCCommand* pcmd); }; extern CRPCTable tableRPC; /** * Utilities: convert hex-encoded Values * (throws error if not hex). */ extern uint256 ParseHashV(const UniValue& v, std::string strName); extern uint256 ParseHashO(const UniValue& o, std::string strKey); extern std::vector<unsigned char> ParseHexV(const UniValue& v, std::string strName); extern std::vector<unsigned char> ParseHexO(const UniValue& o, std::string strKey); extern int64_t nWalletUnlockTime; extern CAmount AmountFromValue(const UniValue& value); extern UniValue ValueFromAmount(const CAmount& amount); extern double GetDifficulty(const CBlockIndex* blockindex = NULL); extern std::string HelpRequiringPassphrase(); extern std::string HelpExampleCli(const std::string& methodname, const std::string& args); extern std::string HelpExampleRpc(const std::string& methodname, const std::string& args); extern void EnsureWalletIsUnlocked(); bool StartRPC(); void InterruptRPC(); void StopRPC(); std::string JSONRPCExecBatch(const UniValue& vReq); // Retrieves any serialization flags requested in command line argument int RPCSerializationFlags(); #endif // BITCOIN_RPCSERVER_H
e32b16a15f83889c8b9c9a019efc7dd92fee93a3
355a7aba0d4ed1e00665ac2d06179fb6811b78c9
/PIVX-5.2.0.1/PIVX-5.2.0.1/src/qt/posante/posantegui.cpp
871c7382f0a40ca60f56f545f56129c3f7806f9f
[ "MIT" ]
permissive
posante-org/Posante
613cb94c0a86f02fffa72e180c10194cc2a4743a
564b45e1e2d6815afb5efa93fbb0cb7ed36f569e
refs/heads/main
2023-08-24T04:07:48.289481
2021-09-15T18:42:45
2021-09-15T18:42:45
406,454,701
0
0
null
null
null
null
UTF-8
C++
false
false
22,567
cpp
// Copyright (c) 2019-2020 The PIVX developers // Copyright (c) 2021 The Posante developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "qt/posante/posantegui.h" #ifdef Q_OS_MAC #include "macdockiconhandler.h" #endif #include "clientmodel.h" #include "guiinterface.h" #include "interfaces/handler.h" #include "networkstyle.h" #include "notificator.h" #include "optionsmodel.h" #include "qt/guiutil.h" #include "qt/posante/defaultdialog.h" #include "qt/posante/qtutils.h" #include "init.h" #include "util.h" #include <QApplication> #include <QColor> #include <QFont> #include <QFontDatabase> #include <QHBoxLayout> #include <QKeySequence> #include <QScreen> #include <QShortcut> #include <QWindowStateChangeEvent> #define BASE_WINDOW_WIDTH 1200 #define BASE_WINDOW_HEIGHT 740 #define BASE_WINDOW_MIN_HEIGHT 620 #define BASE_WINDOW_MIN_WIDTH 1100 const QString PosanteGUI::DEFAULT_WALLET = "~Default"; PosanteGUI::PosanteGUI(const NetworkStyle* networkStyle, QWidget* parent) : QMainWindow(parent), clientModel(0) { /* Open CSS when configured */ this->setStyleSheet(GUIUtil::loadStyleSheet()); this->setMinimumSize(BASE_WINDOW_MIN_WIDTH, BASE_WINDOW_MIN_HEIGHT); // Adapt screen size QRect rec = QGuiApplication::primaryScreen()->geometry(); int adaptedHeight = (rec.height() < BASE_WINDOW_HEIGHT) ? BASE_WINDOW_MIN_HEIGHT : BASE_WINDOW_HEIGHT; int adaptedWidth = (rec.width() < BASE_WINDOW_WIDTH) ? BASE_WINDOW_MIN_WIDTH : BASE_WINDOW_WIDTH; GUIUtil::restoreWindowGeometry( "nWindow", QSize(adaptedWidth, adaptedHeight), this); QFont notoSans(":/fonts/notosans_font"); QFontDatabase::addApplicationFont(":/fonts/notosans_font"); #ifdef ENABLE_WALLET /* if compiled with wallet support, -disablewallet can still disable the wallet */ enableWallet = !gArgs.GetBoolArg("-disablewallet", false); #else enableWallet = false; #endif // ENABLE_WALLET QString windowTitle = QString::fromStdString(gArgs.GetArg("-windowtitle", "")); if (windowTitle.isEmpty()) { windowTitle = tr("Posante Core") + " - "; windowTitle += ((enableWallet) ? tr("Wallet") : tr("Node")); } windowTitle += " " + networkStyle->getTitleAddText(); setWindowTitle(windowTitle); QApplication::setWindowIcon(networkStyle->getAppIcon()); setWindowIcon(networkStyle->getAppIcon()); #ifdef ENABLE_WALLET // Create wallet frame if (enableWallet) { QFrame* centralWidget = new QFrame(this); this->setMinimumWidth(BASE_WINDOW_MIN_WIDTH); this->setMinimumHeight(BASE_WINDOW_MIN_HEIGHT); QHBoxLayout* centralWidgetLayouot = new QHBoxLayout(); centralWidget->setLayout(centralWidgetLayouot); centralWidgetLayouot->setContentsMargins(0, 0, 0, 0); centralWidgetLayouot->setSpacing(0); centralWidget->setProperty("cssClass", "container"); centralWidget->setFont(notoSans); centralWidget->setStyleSheet("padding:0px; border:none; margin:0px;"); // First the nav navMenu = new NavMenuWidget(this); centralWidgetLayouot->addWidget(navMenu); this->setCentralWidget(centralWidget); this->setContentsMargins(0, 0, 0, 0); QFrame* container = new QFrame(centralWidget); container->setContentsMargins(0, 0, 0, 0); centralWidgetLayouot->addWidget(container); // Then topbar + the stackedWidget QVBoxLayout* baseScreensContainer = new QVBoxLayout(this); baseScreensContainer->setMargin(0); baseScreensContainer->setSpacing(0); baseScreensContainer->setContentsMargins(0, 0, 0, 0); container->setLayout(baseScreensContainer); // Insert the topbar topBar = new TopBar(this); topBar->setContentsMargins(0, 0, 0, 0); baseScreensContainer->addWidget(topBar); // Now stacked widget stackedContainer = new QStackedWidget(this); QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); stackedContainer->setSizePolicy(sizePolicy); stackedContainer->setContentsMargins(0, 0, 0, 0); baseScreensContainer->addWidget(stackedContainer); // Init dashboard = new DashboardWidget(this); sendWidget = new SendWidget(this); receiveWidget = new ReceiveWidget(this); addressesWidget = new AddressesWidget(this); masterNodesWidget = new MasterNodesWidget(this); coldStakingWidget = new ColdStakingWidget(this); settingsWidget = new SettingsWidget(this); // Add to parent stackedContainer->addWidget(dashboard); stackedContainer->addWidget(sendWidget); stackedContainer->addWidget(receiveWidget); stackedContainer->addWidget(addressesWidget); stackedContainer->addWidget(masterNodesWidget); stackedContainer->addWidget(coldStakingWidget); stackedContainer->addWidget(settingsWidget); stackedContainer->setCurrentWidget(dashboard); } else #endif { // When compiled without wallet or -disablewallet is provided, // the central widget is the rpc console. rpcConsole = new RPCConsole(enableWallet ? this : 0); setCentralWidget(rpcConsole); } // Create actions for the toolbar, menu bar and tray/dock icon createActions(networkStyle); // Create system tray icon and notification createTrayIcon(networkStyle); // Connect events connectActions(); // TODO: Add event filter?? // // Install event filter to be able to catch status tip events (QEvent::StatusTip) // this->installEventFilter(this); // Subscribe to notifications from core subscribeToCoreSignals(); } void PosanteGUI::createActions(const NetworkStyle* networkStyle) { toggleHideAction = new QAction(networkStyle->getAppIcon(), tr("&Show / Hide"), this); toggleHideAction->setStatusTip(tr("Show or hide the main Window")); quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this); quitAction->setStatusTip(tr("Quit application")); quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); quitAction->setMenuRole(QAction::QuitRole); connect(toggleHideAction, &QAction::triggered, this, &PosanteGUI::toggleHidden); connect(quitAction, &QAction::triggered, qApp, &QApplication::quit); } /** * Here add every event connection */ void PosanteGUI::connectActions() { QShortcut* consoleShort = new QShortcut(this); consoleShort->setKey(QKeySequence(SHORT_KEY + Qt::Key_C)); connect(consoleShort, &QShortcut::activated, [this]() { navMenu->selectSettings(); settingsWidget->showDebugConsole(); goToSettings(); }); connect(topBar, &TopBar::showHide, this, &PosanteGUI::showHide); connect(topBar, &TopBar::onShowHideColdStakingChanged, navMenu, &NavMenuWidget::onShowHideColdStakingChanged); connect(settingsWidget, &SettingsWidget::showHide, this, &PosanteGUI::showHide); connect(sendWidget, &SendWidget::showHide, this, &PosanteGUI::showHide); connect(receiveWidget, &ReceiveWidget::showHide, this, &PosanteGUI::showHide); connect(addressesWidget, &AddressesWidget::showHide, this, &PosanteGUI::showHide); connect(masterNodesWidget, &MasterNodesWidget::showHide, this, &PosanteGUI::showHide); connect(masterNodesWidget, &MasterNodesWidget::execDialog, this, &PosanteGUI::execDialog); connect(coldStakingWidget, &ColdStakingWidget::showHide, this, &PosanteGUI::showHide); connect(coldStakingWidget, &ColdStakingWidget::execDialog, this, &PosanteGUI::execDialog); connect(settingsWidget, &SettingsWidget::execDialog, this, &PosanteGUI::execDialog); } void PosanteGUI::createTrayIcon(const NetworkStyle* networkStyle) { #ifndef Q_OS_MAC trayIcon = new QSystemTrayIcon(this); QString toolTip = tr("Posante Core client") + " " + networkStyle->getTitleAddText(); trayIcon->setToolTip(toolTip); trayIcon->setIcon(networkStyle->getAppIcon()); trayIcon->hide(); #endif notificator = new Notificator(QApplication::applicationName(), trayIcon, this); } PosanteGUI::~PosanteGUI() { // Unsubscribe from notifications from core unsubscribeFromCoreSignals(); GUIUtil::saveWindowGeometry("nWindow", this); if (trayIcon) // Hide tray icon, as deleting will let it linger until quit (on Ubuntu) trayIcon->hide(); #ifdef Q_OS_MAC MacDockIconHandler::cleanup(); #endif } /** Get restart command-line parameters and request restart */ void PosanteGUI::handleRestart(QStringList args) { if (!ShutdownRequested()) Q_EMIT requestedRestart(args); } void PosanteGUI::setClientModel(ClientModel* _clientModel) { this->clientModel = _clientModel; if (this->clientModel) { // Create system tray menu (or setup the dock menu) that late to prevent users from calling actions, // while the client has not yet fully loaded createTrayIconMenu(); topBar->setClientModel(clientModel); dashboard->setClientModel(clientModel); sendWidget->setClientModel(clientModel); settingsWidget->setClientModel(clientModel); // Receive and report messages from client model connect(clientModel, &ClientModel::message, this, &PosanteGUI::message); connect(clientModel, &ClientModel::alertsChanged, [this](const QString& _alertStr) { message(tr("Alert!"), _alertStr, CClientUIInterface::MSG_WARNING); }); connect(topBar, &TopBar::walletSynced, dashboard, &DashboardWidget::walletSynced); connect(topBar, &TopBar::walletSynced, coldStakingWidget, &ColdStakingWidget::walletSynced); // Get restart command-line parameters and handle restart connect(settingsWidget, &SettingsWidget::handleRestart, [this](QStringList arg) { handleRestart(arg); }); if (rpcConsole) { rpcConsole->setClientModel(clientModel); } if (trayIcon) { trayIcon->show(); } } else { // Disable possibility to show main window via action toggleHideAction->setEnabled(false); if (trayIconMenu) { // Disable context menu on tray icon trayIconMenu->clear(); } } } void PosanteGUI::createTrayIconMenu() { #ifndef Q_OS_MAC // return if trayIcon is unset (only on non-macOSes) if (!trayIcon) return; trayIconMenu = new QMenu(this); trayIcon->setContextMenu(trayIconMenu); connect(trayIcon, &QSystemTrayIcon::activated, this, &PosanteGUI::trayIconActivated); #else // Note: On macOS, the Dock icon is used to provide the tray's functionality. MacDockIconHandler* dockIconHandler = MacDockIconHandler::instance(); connect(dockIconHandler, &MacDockIconHandler::dockIconClicked, this, &PosanteGUI::macosDockIconActivated); trayIconMenu = new QMenu(this); trayIconMenu->setAsDockMenu(); #endif // Configuration of the tray icon (or Dock icon) icon menu trayIconMenu->addAction(toggleHideAction); trayIconMenu->addSeparator(); #ifndef Q_OS_MAC // This is built-in on macOS trayIconMenu->addSeparator(); trayIconMenu->addAction(quitAction); #endif } #ifndef Q_OS_MAC void PosanteGUI::trayIconActivated(QSystemTrayIcon::ActivationReason reason) { if (reason == QSystemTrayIcon::Trigger) { // Click on system tray icon triggers show/hide of the main window toggleHidden(); } } #else void PosanteGUI::macosDockIconActivated() { show(); activateWindow(); } #endif void PosanteGUI::changeEvent(QEvent* e) { QMainWindow::changeEvent(e); #ifndef Q_OS_MAC // Ignored on Mac if (e->type() == QEvent::WindowStateChange) { if (clientModel && clientModel->getOptionsModel() && clientModel->getOptionsModel()->getMinimizeToTray()) { QWindowStateChangeEvent* wsevt = static_cast<QWindowStateChangeEvent*>(e); if (!(wsevt->oldState() & Qt::WindowMinimized) && isMinimized()) { QTimer::singleShot(0, this, &PosanteGUI::hide); e->ignore(); } else if ((wsevt->oldState() & Qt::WindowMinimized) && !isMinimized()) { QTimer::singleShot(0, this, &PosanteGUI::show); e->ignore(); } } } #endif } void PosanteGUI::closeEvent(QCloseEvent* event) { #ifndef Q_OS_MAC // Ignored on Mac if (clientModel && clientModel->getOptionsModel()) { if (!clientModel->getOptionsModel()->getMinimizeOnClose()) { QApplication::quit(); } else { QMainWindow::showMinimized(); event->ignore(); } } #else QMainWindow::closeEvent(event); #endif } void PosanteGUI::messageInfo(const QString& text) { if (!this->snackBar) this->snackBar = new SnackBar(this, this); this->snackBar->setText(text); this->snackBar->resize(this->width(), snackBar->height()); openDialog(this->snackBar, this); } void PosanteGUI::message(const QString& title, const QString& message, unsigned int style, bool* ret) { QString strTitle = tr("Posante Core"); // default title // Default to information icon int nNotifyIcon = Notificator::Information; QString msgType; // Prefer supplied title over style based title if (!title.isEmpty()) { msgType = title; } else { switch (style) { case CClientUIInterface::MSG_ERROR: msgType = tr("Error"); break; case CClientUIInterface::MSG_WARNING: msgType = tr("Warning"); break; case CClientUIInterface::MSG_INFORMATION: msgType = tr("Information"); break; default: msgType = tr("System Message"); break; } } // Check for error/warning icon if (style & CClientUIInterface::ICON_ERROR) { nNotifyIcon = Notificator::Critical; } else if (style & CClientUIInterface::ICON_WARNING) { nNotifyIcon = Notificator::Warning; } // Display message if (style & CClientUIInterface::MODAL) { // Check for buttons, use OK as default, if none was supplied int r = 0; showNormalIfMinimized(); if (style & CClientUIInterface::BTN_MASK) { r = openStandardDialog( (title.isEmpty() ? strTitle : title), message, "OK", "CANCEL"); } else { r = openStandardDialog((title.isEmpty() ? strTitle : title), message, "OK"); } if (ret != NULL) *ret = r; } else if (style & CClientUIInterface::MSG_INFORMATION_SNACK) { messageInfo(message); } else { // Append title to "Posante - " if (!msgType.isEmpty()) strTitle += " - " + msgType; notificator->notify(static_cast<Notificator::Class>(nNotifyIcon), strTitle, message); } } bool PosanteGUI::openStandardDialog(QString title, QString body, QString okBtn, QString cancelBtn) { DefaultDialog* dialog; if (isVisible()) { showHide(true); dialog = new DefaultDialog(this); dialog->setText(title, body, okBtn, cancelBtn); dialog->adjustSize(); openDialogWithOpaqueBackground(dialog, this); } else { dialog = new DefaultDialog(); dialog->setText(title, body, okBtn); dialog->setWindowTitle(tr("Posante Core")); dialog->adjustSize(); dialog->raise(); dialog->exec(); } bool ret = dialog->isOk; dialog->deleteLater(); return ret; } void PosanteGUI::showNormalIfMinimized(bool fToggleHidden) { if (!clientModel) return; if (!isHidden() && !isMinimized() && !GUIUtil::isObscured(this) && fToggleHidden) { hide(); } else { GUIUtil::bringToFront(this); } } void PosanteGUI::toggleHidden() { showNormalIfMinimized(true); } void PosanteGUI::detectShutdown() { if (ShutdownRequested()) { if (rpcConsole) rpcConsole->hide(); qApp->quit(); } } void PosanteGUI::goToDashboard() { if (stackedContainer->currentWidget() != dashboard) { stackedContainer->setCurrentWidget(dashboard); topBar->showBottom(); } } void PosanteGUI::goToSend() { showTop(sendWidget); } void PosanteGUI::goToAddresses() { showTop(addressesWidget); } void PosanteGUI::goToMasterNodes() { showTop(masterNodesWidget); } void PosanteGUI::goToColdStaking() { showTop(coldStakingWidget); } void PosanteGUI::goToSettings() { showTop(settingsWidget); } void PosanteGUI::goToSettingsInfo() { navMenu->selectSettings(); settingsWidget->showInformation(); goToSettings(); } void PosanteGUI::goToReceive() { showTop(receiveWidget); } void PosanteGUI::openNetworkMonitor() { settingsWidget->openNetworkMonitor(); } void PosanteGUI::showTop(QWidget* view) { if (stackedContainer->currentWidget() != view) { stackedContainer->setCurrentWidget(view); topBar->showTop(); } } void PosanteGUI::changeTheme(bool isLightTheme) { QString css = GUIUtil::loadStyleSheet(); this->setStyleSheet(css); // Update style updateStyle(this); } void PosanteGUI::resizeEvent(QResizeEvent* event) { // Parent.. QMainWindow::resizeEvent(event); // background showHide(opEnabled); // Notify Q_EMIT windowResizeEvent(event); } bool PosanteGUI::execDialog(QDialog* dialog, int xDiv, int yDiv) { return openDialogWithOpaqueBackgroundY(dialog, this); } void PosanteGUI::showHide(bool show) { if (!op) op = new QLabel(this); if (!show) { op->setVisible(false); opEnabled = false; } else { QColor bg("#000000"); bg.setAlpha(200); if (!isLightTheme()) { bg = QColor("#00000000"); bg.setAlpha(150); } QPalette palette; palette.setColor(QPalette::Window, bg); op->setAutoFillBackground(true); op->setPalette(palette); op->setWindowFlags(Qt::CustomizeWindowHint); op->move(0, 0); op->show(); op->activateWindow(); op->resize(width(), height()); op->setVisible(true); opEnabled = true; } } int PosanteGUI::getNavWidth() { return this->navMenu->width(); } void PosanteGUI::openFAQ(SettingsFaqWidget::Section section) { showHide(true); SettingsFaqWidget* dialog = new SettingsFaqWidget(this); dialog->setSection(section); openDialogWithOpaqueBackgroundFullScreen(dialog, this); dialog->deleteLater(); } #ifdef ENABLE_WALLET bool PosanteGUI::addWallet(const QString& name, WalletModel* walletModel) { // Single wallet supported for now.. if (!stackedContainer || !clientModel || !walletModel) return false; // set the model for every view navMenu->setWalletModel(walletModel); dashboard->setWalletModel(walletModel); topBar->setWalletModel(walletModel); receiveWidget->setWalletModel(walletModel); sendWidget->setWalletModel(walletModel); addressesWidget->setWalletModel(walletModel); masterNodesWidget->setWalletModel(walletModel); coldStakingWidget->setWalletModel(walletModel); settingsWidget->setWalletModel(walletModel); // Connect actions.. connect(walletModel, &WalletModel::message, this, &PosanteGUI::message); connect(masterNodesWidget, &MasterNodesWidget::message, this, &PosanteGUI::message); connect(coldStakingWidget, &ColdStakingWidget::message, this, &PosanteGUI::message); connect(topBar, &TopBar::message, this, &PosanteGUI::message); connect(sendWidget, &SendWidget::message, this, &PosanteGUI::message); connect(receiveWidget, &ReceiveWidget::message, this, &PosanteGUI::message); connect(addressesWidget, &AddressesWidget::message, this, &PosanteGUI::message); connect(settingsWidget, &SettingsWidget::message, this, &PosanteGUI::message); // Pass through transaction notifications connect(dashboard, &DashboardWidget::incomingTransaction, this, &PosanteGUI::incomingTransaction); return true; } bool PosanteGUI::setCurrentWallet(const QString& name) { // Single wallet supported. return true; } void PosanteGUI::removeAllWallets() { // Single wallet supported. } void PosanteGUI::incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address) { // Only send notifications when not disabled if (!bdisableSystemnotifications) { // On new transaction, make an info balloon message((amount) < 0 ? (pwalletMain->fMultiSendNotify == true ? tr("Sent MultiSend transaction") : tr("Sent transaction")) : tr("Incoming transaction"), tr("Date: %1\n" "Amount: %2\n" "Type: %3\n" "Address: %4\n") .arg(date) .arg(BitcoinUnits::formatWithUnit(unit, amount, true)) .arg(type) .arg(address), CClientUIInterface::MSG_INFORMATION); pwalletMain->fMultiSendNotify = false; } } #endif // ENABLE_WALLET static bool ThreadSafeMessageBox(PosanteGUI* gui, const std::string& message, const std::string& caption, unsigned int style) { bool modal = (style & CClientUIInterface::MODAL); // The SECURE flag has no effect in the Qt GUI. // bool secure = (style & CClientUIInterface::SECURE); style &= ~CClientUIInterface::SECURE; bool ret = false; std::cout << "thread safe box: " << message << std::endl; // In case of modal message, use blocking connection to wait for user to click a button QMetaObject::invokeMethod(gui, "message", modal ? GUIUtil::blockingGUIThreadConnection() : Qt::QueuedConnection, Q_ARG(QString, QString::fromStdString(caption)), Q_ARG(QString, QString::fromStdString(message)), Q_ARG(unsigned int, style), Q_ARG(bool*, &ret)); return ret; } void PosanteGUI::subscribeToCoreSignals() { // Connect signals to client m_handler_message_box = interfaces::MakeHandler(uiInterface.ThreadSafeMessageBox.connect(std::bind(ThreadSafeMessageBox, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3))); } void PosanteGUI::unsubscribeFromCoreSignals() { // Disconnect signals from client m_handler_message_box->disconnect(); }
b48d4b7c7f27fa61db4ca3baced2c44c728ee366
6782ec3a9dd5d48fa3bf6bb729ed163f308303b9
/DataStructure/L.cpp
bbb97c4b363ba5e39c18fffce525a7e079080293
[]
no_license
NealChalmers/course-project
69f5e8d37c05457681d438a24ab3b3e72a5f2d1a
73870104b7864d52bc2285e48e6e45873cbed473
refs/heads/master
2020-04-11T06:14:23.842738
2019-12-26T07:23:46
2019-12-26T07:23:46
161,575,295
0
0
null
null
null
null
UTF-8
C++
false
false
1,508
cpp
#include <iostream> #include <string> #include <stack> using namespace std; typedef struct node { string s; int f; node *left,*right; node(const string ss):s(ss),f(0),left(NULL),right(NULL) {}; } node; node* grow(node *n,string s); int through(node *n); int main() { string c; while(cin>>c) { node *h=new node(c); grow(h,c); cout<<"="<<through(h); delete h; cout<<endl; } } //+ 13 # # * 5 # # 9 # # //* + 13 # # 5 # # 9 # # node* grow(node *n,string s) { if(n==NULL) n=new node(s); cin>>s; if(s!="#") n->left=grow(n->left,s); cin>>s; if(s!="#") n->right=grow(n->right,s); return n; } int ssttoi(string s) { int re=0; for(int i=0;i!=s.size();++i) { char c=s[i]; re=re*10+c-'0'; } return re; } int cal(int a,int b,char c) { if(c=='+') return a+b; else if(c=='-') return a-b; else if(c=='*') return a*b; else if(c=='/') return a/b; } int through(node *n) { bool in=1; if(n==NULL) return -1; if(n->s=="+"||n->s=="-"||n->s=="*"||n->s=="/") { cout<<"("; in=0; } int a=through(n->left); delete n->left; cout<<n->s; int b=through(n->right); delete n->right; if(n->s=="+"||n->s=="-"||n->s=="*"||n->s=="/") { cout<<")"; in=0; } if(in) return ssttoi(n->s); else return cal(a,b,n->s[0]); }
8639bf0975ffdb31c5bc8fc3b7e9443f2daf2c87
8085f16eaf5133bebb45aeeabb9b172ae3db4176
/poj/2109.cpp
11e8bb5f423f651f4840254df6be52c23770e3c0
[]
no_license
EyciaZhou/acm
ff0dd40971424f338369eca8507e8c339497f946
50121929dc658be717b8fa6076ec28dea915ce97
refs/heads/master
2020-05-01T08:57:48.118961
2015-06-09T06:48:53
2015-06-09T06:48:53
35,026,832
0
0
null
null
null
null
UTF-8
C++
false
false
171
cpp
#include <stdio.h> #include <math.h> int main() { double n,p; while(scanf("%lf%lf",&n,&p)!=EOF) { printf("%.0lf\n",pow(p,1/n)); } return 0; }
59865a01db670a3dbe2034c281e5c33980ecc128
bd6547aa8d6a4bf6c251a75fd04bf1ff413655d2
/Robot/TCD/FrameTaskDman/DMCore/Agents/DialogAgents/DiscourseAgents/DAHelp.h
926f286ca8eaf04cf362f0cce3bd98f836bf1854
[]
no_license
semanticparsing/navigation_code
8c324f9ef6bb96d0fce013c08e44481d2019214e
1a7388f24dfe3f194643be316de5d92bfc213c71
refs/heads/master
2020-03-25T08:12:45.956783
2018-07-13T10:03:38
2018-07-13T10:03:38
null
0
0
null
null
null
null
UTF-8
C++
false
false
464
h
// Author : lzy // Email : [email protected] // Date : 2017-08-26 15:36 // Description: #ifndef _DA_HELP_H__ #define _DA_HELP_H__ #include "Robot/TCD/FrameTaskDman/DMCore/Core.h" #include "Robot/TCD/FrameTaskDman/DMCore/Agents/AllAgents.h" namespace TrioTDM { void RegisterHelpAgent(); void RegisterHelpGetTipsAgent(); void RegisterHelpEstablishContextAgent(); void RegisterHelpWhatCanISayAgent(); void RegisterHelpSystemCapabilitiesAgent(); } #endif
2f824837680a446d6bd8b439ff39c69e7a28563d
d05174cfc67cdf43d085ed631a3ef239766b3eec
/person_profiler/db/save.cpp
e49bcf313b0dacaaabccb252f1e14f173ca5b7d5
[]
no_license
crastinus/person_profiler
483a62c3d7e3349bab6393631aad5c87d12b8af6
01392591d041a4563f0d75a450b8ebdf8fa2632d
refs/heads/master
2020-04-08T02:10:41.324457
2019-01-14T04:48:02
2019-01-14T04:48:02
158,925,471
0
0
null
null
null
null
UTF-8
C++
false
false
7,913
cpp
#include "save.hpp" #include "db.hpp" #include "cache.hpp" #include "measure.hpp" int save(value const& v) { if (v.id == 0) { SQLite::Statement value_insert(db(), "INSERT INTO value(value, day_id, estimation_id) VALUES (:value, :day_id, :estimation_id)"); value_insert.bind(":value", v.val); value_insert.bind(":day_id", v.day.id); value_insert.bind(":estimation_id", v.estimation.id); value_insert.exec(); SQLite::Statement get_max_int(db(), "SELECT max(id) from value"); get_max_int.executeStep(); return get_max_int.getColumn(0); } cache().del(v); // update without ids SQLite::Statement value_update(db(), "UPDATE value SET value = :value, estimation_id = :estimation_id WHERE id = :id"); value_update.bind(":value", v.val); value_update.bind(":id", v.id); value_update.bind(":estimation_id", v.estimation.id); value_update.exec(); return v.id; } int save(day const& d) { if (d.id == 0) { SQLite::Statement day_insert(db(), "INSERT INTO day(day, comment) VALUES(:date, :comment)"); day_insert.bind(":date", d.day_timestamp); day_insert.bind(":comment", d.comment.c_str()); day_insert.exec(); SQLite::Statement get_max_day_id(db(), "SELECT max(id) from day"); get_max_day_id.executeStep(); return get_max_day_id.getColumn(0); } cache().del(d); SQLite::Statement day_upd(db(), "UPDATE day SET comment = :comment WHERE id = :id"); day_upd.bind(":id", d.id); day_upd.bind(":comment", d.comment.c_str()); day_upd.exec(); // nothing can change return d.id; } int save(day_type const & d) { if (d.id == 0) { SQLite::Statement day_insert(db(), "INSERT INTO day_type(name, active) VALUES(:name, :active)"); day_insert.bind(":name", d.name.c_str()); day_insert.bind(":active", d.active); day_insert.exec(); SQLite::Statement get_max_day_id(db(), "SELECT max(id) from day_type"); get_max_day_id.executeStep(); return get_max_day_id.getColumn(0); } cache().del(d); SQLite::Statement day_upd(db(), "UPDATE day_type SET name = :name, active=:active WHERE id = :id"); day_upd.bind(":id", d.id); day_upd.bind(":name", d.name.c_str()); day_upd.bind(":active", d.active); day_upd.exec(); // nothing can change return d.id; } void save(day_type_day const & dtd) { SQLite::Statement check(db(), "select count(*) from day_type_day where day_id = :day_id"); check.bind(":day_id", dtd.day_id.id); check.executeStep(); int count = check.getColumn(0); std::string result_query = (count == 0 ? "INSERT INTO day_type_day(day_id, day_type_id) VALUES(:day_id, :day_type_id)" : "UPDATE day_type_day SET day_type_id = :day_type_id WHERE day_id = :day_id"); SQLite::Statement stmt(db(), result_query); stmt.bind(":day_id", dtd.day_id.id); stmt.bind(":day_type_id", dtd.day_type_id.id); stmt.exec(); } int save(estimation const& e) { if (e.id == 0) { SQLite::Statement estim_insert(db(), "INSERT INTO estimation(started, expired, active, weight, border, reverse, measure_id, next, day_type_id) VALUES(:started, :expired, :active, :weight, :border, :reverse, :measure_id, :next, :day_type_id)"); estim_insert.bind(":started", e.started); estim_insert.bind(":expired", e.expired); estim_insert.bind(":active", (int)e.active); estim_insert.bind(":weight", e.weight); estim_insert.bind(":border", e.border); estim_insert.bind(":reverse", e.reverse); estim_insert.bind(":measure_id", e.measure.id); estim_insert.bind(":next", e.next.id); estim_insert.bind(":day_type_id", e.day_type.id); estim_insert.exec(); SQLite::Statement get_max_id(db(), "SELECT max(id) from estimation"); get_max_id.executeStep(); return get_max_id.getColumn(0); } cache().del(e); // cannot update next element. It crushes all sequence SQLite::Statement estim_update(db(), "UPDATE estimation SET started = :started, expired = :expired, active = :active, weight = :weight, border = :border, reverse = :reverse WHERE id = :id"); estim_update.bind(":started", e.started); estim_update.bind(":expired", e.expired); estim_update.bind(":active", (int)e.active); estim_update.bind(":weight", e.weight); estim_update.bind(":border", e.border); estim_update.bind(":reverse", e.reverse); estim_update.bind(":id", e.id); estim_update.exec(); return e.id; } int save(measure const& m) { if (m.id == 0) { SQLite::Statement meas_insrt(db(), "INSERT INTO measure(name, type, measure_group_id, comment) VALUES(:name, :type, :measure_group_id, :comment)"); meas_insrt.bind(":name", m.name.c_str()); meas_insrt.bind(":type", static_cast<int>(m.type)); meas_insrt.bind(":measure_group_id", m.measure_group.id); meas_insrt.bind(":comment", m.comment.c_str()); meas_insrt.exec(); SQLite::Statement get_max_id(db(), "SELECT max(id) from measure"); get_max_id.executeStep(); return get_max_id.getColumn(0); } cache().del(m); if (!m.active && !have_dependencies(m)) { SQLite::Statement delq(db(), "DELETE FROM measure WHERE id = :id"); SQLite::Statement delqe(db(), "DELETE FROM estimation WHERE measure_id = :id"); delqe.bind(":id", m.id); delq.bind(":id", m.id); delqe.exec(); delq.exec(); return 0; } // disabled type update SQLite::Statement meas_updt(db(), "UPDATE measure SET name = :name, comment = :comment WHERE id = :id"); meas_updt.bind(":name", m.name.c_str()); meas_updt.bind(":comment", m.comment.c_str()); meas_updt.bind(":id", m.id); meas_updt.exec(); // nothing can change return m.id; } int save(measure_group const & mg) { if (mg.id == 0) { SQLite::Statement insert(db(), "INSERT INTO measure_group(name, weight, active) VALUES(:name,:weight, :active)"); insert.bind(":name", mg.name.c_str()); insert.bind(":active", mg.active); insert.bind(":weight", mg.weight); insert.exec(); SQLite::Statement get_max_id(db(), "SELECT max(id) from measure_group"); get_max_id.executeStep(); return get_max_id.getColumn(0); } cache().del(mg); SQLite::Statement update(db(), "UPDATE measure_group SET name = :name, active = :active, weight = :weight WHERE id = :id"); update.bind(":id", mg.id); update.bind(":name", mg.name.c_str()); update.bind(":weight", mg.weight); update.bind(":active", mg.active); update.exec(); // nothing can change return mg.id; } void save(measure_comment const & comment) { SQLite::Statement select(db(), "SELECT count(*) FROM measure_comment WHERE day_id = :day_id and measure_id = :measure_id"); select.bind(":measure_id", comment.measure.id); select.bind(":day_id", comment.day.id); select.executeStep(); int count = select.getColumn(0); if (count == 0) { SQLite::Statement insert(db(), "INSERT INTO measure_comment(comment, day_id, measure_id) VALUES(:comment, :day_id, :measure_id)") ; insert.bind(":measure_id", comment.measure.id); insert.bind(":day_id", comment.day.id); insert.bind(":comment", comment.comment_text.c_str()); insert.executeStep(); } else { SQLite::Statement update(db(), "UPDATE measure_comment SET comment = :comment WHERE day_id = :day_id and measure_id = :measure_id"); update.bind(":measure_id", comment.measure.id); update.bind(":day_id", comment.day.id); update.bind(":comment", comment.comment_text.c_str()); update.executeStep(); } }
121e1a6548eb3ce588a998f395e93c360059df48
355b7cf3e75a0c99511caa8cb33be3127bd2f10d
/Data Structures/Graphs/07-Bipartite_BFS.cpp
81a6a14a559364f7ffb715f1aa0faa0c204436b0
[]
no_license
techyharshit123/DSA
462a332fd6a28665747d050a8350422bdcaafac6
d747d70138f701490678f78de52c1aad50b6659d
refs/heads/master
2023-06-23T13:37:49.540134
2021-07-17T16:36:35
2021-07-17T16:36:35
342,550,636
0
0
null
null
null
null
UTF-8
C++
false
false
1,359
cpp
#include<bits/stdc++.h> using namespace std; class Graph { public: int vertices; vector<int>*adj; Graph(int V) { vertices = V; adj = new vector<int>[V]; } void addEdge(int u, int v) { adj[u].push_back(v); adj[v].push_back(u); } void printadj() { for (int i = 0; i < vertices; i++) { cout << "Adjacency List of vertex " << i << " is := "; for (auto neighbour : adj[i]) cout << neighbour << " -> "; cout << endl; } } bool isBipartite() { vector<int>colour(vertices, -1); for (int i = 0; i < vertices; i++) // if any of the components is not bipartite then the entire graph is not bipartite { if (colour[i] == -1) { colour[i] = 0; //colouring intial node with colour 0 queue<int>q; q.push(i); while (q.size()) { int currentnode = q.front(); q.pop(); for (auto neighbour : adj[currentnode]) { if (colour[neighbour] == -1) { colour[neighbour] = !colour[currentnode]; q.push(neighbour); } else { if (colour[neighbour] == colour[currentnode]) return false; } } } } } return true; } } int main() { Graph g(5); g.addEdge(0, 1); g.addEdge(1, 3); g.addEdge(1, 2); g.addEdge(0, 2); g.addEdge(2, 4); g.addEdge(3, 4); g.addEdge(2, 3); g.printadj(); cout << g.isCycle() << endl; }
597009c602090c0c908f3c4472ac21be11e3fec4
ec68c973b7cd3821dd70ed6787497a0f808e18e1
/Cpp/SDK/Zone_3_8_classes.h
ec12980146d7ce73a6ab010c0dabc2e984e7a00b
[]
no_license
Hengle/zRemnant-SDK
05be5801567a8cf67e8b03c50010f590d4e2599d
be2d99fb54f44a09ca52abc5f898e665964a24cb
refs/heads/main
2023-07-16T04:44:43.113226
2021-08-27T14:26:40
2021-08-27T14:26:40
null
0
0
null
null
null
null
UTF-8
C++
false
false
754
h
#pragma once // Name: Remnant, Version: 1.0 /*!!DEFINE!!*/ /*!!HELPER_DEF!!*/ /*!!HELPER_INC!!*/ #ifdef _MSC_VER #pragma pack(push, 0x01) #endif namespace CG { //--------------------------------------------------------------------------- // Classes //--------------------------------------------------------------------------- // BlueprintGeneratedClass Zone_3_8.City_Street_END_Transition_PocketDungeon_01_C // 0x0000 class ACity_Street_END_Transition_PocketDungeon_01_C : public ALevelScriptActorGunfire { public: static UClass* StaticClass() { static auto ptr = UObject::FindClass("BlueprintGeneratedClass Zone_3_8.City_Street_END_Transition_PocketDungeon_01_C"); return ptr; } }; } #ifdef _MSC_VER #pragma pack(pop) #endif
37876a8d3f5fcd7f8d41fac5acc4587763f9f1ad
1e43cfad3db496ee4715a8b2296cb7aa10288484
/C++/Iteration 2 Drone Project/src/drone_type.h
96518c32d3226f035215687d5f863c5b3e77cda6
[]
no_license
AlexandraBarrett24/Projects_Public
b40979e9120b50850a1a0d8eeea600397174c42d
80dab483e506c13067947e90176060e120ef1a64
refs/heads/master
2021-02-06T02:04:42.809429
2020-12-03T04:27:40
2020-12-03T04:27:40
243,863,892
0
0
null
null
null
null
UTF-8
C++
false
false
1,468
h
/** * @file drone_type.h */ #ifndef CSCI3081_DRONE_TYPE_H #define CSCI3081_DRONE_TYPE_H #include <string> namespace csci3081 { /** * @brief A class that records a type of drone specified in project/data/planet-x.csv */ class DroneType { public: /// Constructor from data DroneType(std::string model, float mass, float max_speed, float acceleration, float weight_cap, float battery_cap) { model_ = model; mass_ = mass; max_speed_ = max_speed; acceleration_ = acceleration; weight_cap_ = weight_cap; battery_cap_ = battery_cap; } /// Returns name of model std::string GetModel() { return model_; } /// Returns mass of this model of drone, in kg float GetMass() { return mass_; } /// Returns the max speed of this model of drone, in m/s float GetMaxSpeed() { return max_speed_; } /// Returns acceleration this model of drone can generate, in m/s^2 float GetAcceleration() { return acceleration_; } /// Returns the maximum amount of weight this model can carry, in kg float GetWeightCapacity() { return weight_cap_; } /// Returns how long this drone can operate before running of battery, in seconds float GetBatteryCapacity() { return battery_cap_; } private: std::string model_; float mass_; float max_speed_; float acceleration_; float weight_cap_; float battery_cap_; }; } // namespace csci3081 #endif // CSCI3081_DRONE_TYPE_H
6b0d2fe2f623dd76fb989179bf333c85deb7333c
c690537ba968e144f76a0156ab815c88fad7d1d7
/codebase/apps/radar/src/Iq2Dsr/BeamReader.hh
3fa8509964c434e0b62c2314942b571bce2f0404
[ "BSD-3-Clause" ]
permissive
paulyc/lrose-core
52e9d6f7ae32e6292c0300a252772286f91949e2
84cdbbdd94126f6ea43bd69939d0801c7776e997
refs/heads/master
2022-08-22T14:08:23.238033
2020-05-23T23:50:43
2020-05-23T23:50:43
265,976,676
1
0
NOASSERTION
2020-05-23T23:50:45
2020-05-21T23:54:39
null
UTF-8
C++
false
false
8,297
hh
// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* // ** Copyright UCAR (c) 1990 - 2016 // ** University Corporation for Atmospheric Research (UCAR) // ** National Center for Atmospheric Research (NCAR) // ** Boulder, Colorado, USA // ** BSD licence applies - redistribution and use in source and binary // ** forms, with or without modification, are permitted provided that // ** the following conditions are met: // ** 1) If the software is modified to produce derivative works, // ** such modified software should be clearly marked, so as not // ** to confuse it with the version available from UCAR. // ** 2) Redistributions of source code must retain the above copyright // ** notice, this list of conditions and the following disclaimer. // ** 3) 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. // ** 4) Neither the name of UCAR nor the names of its contributors, // ** if any, may be used to endorse or promote products derived from // ** this software without specific prior written permission. // ** DISCLAIMER: THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS // ** OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED // ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. // *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* ///////////////////////////////////////////////////////////// // BeamReader.hh // // Mike Dixon, RAP, NCAR // P.O.Box 3000, Boulder, CO, 80307-3000, USA // // August 2007 // /////////////////////////////////////////////////////////////// #ifndef BeamReader_hh #define BeamReader_hh #include <pthread.h> #include <string> #include <vector> #include <deque> #include <radar/IwrfTsInfo.hh> #include <radar/IwrfTsPulse.hh> #include <radar/IwrfTsReader.hh> #include <radar/AtmosAtten.hh> #include "ArrayDeque.hh" #include "Params.hh" #include "Args.hh" #include "Beam.hh" #include "MomentsMgr.hh" using namespace std; //////////////////////// // This class class BeamReader { public: // constructor BeamReader(const string &prog_name, const Params &params, const Args &args, deque<Beam *> &beamRecyclePool, pthread_mutex_t &beamRecyclePoolMutex, vector<const MomentsMgr *> &momentsMgrArray); // destructor ~BeamReader(); // constructor OK? bool constructorOK; // get the next beam // returns Beam object pointer on success, NULL on failure // caller must free beam Beam *getNextBeam(); // if end of vol is encountered in time series, the _endOfVol flag // will be set. Similarly for end of sweep. // the flags are cleared when a new beam is created. bool getEndOfSweepFlag() const { return _endOfSweepFlag; } bool getEndOfVolFlag() const { return _endOfVolFlag; } // get ops info const IwrfTsInfo &getOpsInfo() const { return _pulseReader->getOpsInfo(); } bool isOpsInfoNew() const { return _pulseReader->isOpsInfoNew(); } Beam::scan_type_t getScanType() const { return _scanType; } protected: private: string _progName; const Params &_params; const Args &_args; // beam pool - so that beam objects can be recycled deque<Beam *> &_beamRecyclePool; pthread_mutex_t &_beamRecyclePoolMutex; // moments manager vector<const MomentsMgr *> _momentsMgrArray; const MomentsMgr *_momentsMgr; int _mgrIndex; int _missMgrCount; // Pulse reader IwrfTsReader *_pulseReader; // start/end times - archive mode time_t _startTime; time_t _endTime; // end of sweep and vol flags bool _endOfSweepFlag; bool _endOfVolFlag; // active pulse queue si64 _pulseSeqNum; si64 _prevPulseSeqNum; IwrfTsPulse *_prevPulse; IwrfTsPulse *_latestPulse; deque<IwrfTsPulse *> _pulseQueue; deque<IwrfTsPulse *> _pulseCache; int _pulseCount; int _pulseCountSinceStatus; // pulse queue for interpolating antenna angles deque<IwrfTsPulse *> _interpQueue; bool _interpReady; // angles have been interpolated and are ready for use bool _interpOverflow; double _prevAzInterp, _prevElInterp; // Pulse recycle pool. // The pulse pool holds previously used pulse objects, // so that they may be re-used. This saves continual allocation // and de-allocation of memory. deque<IwrfTsPulse *> _pulseRecyclePool; // phase coding static const int _maxTrips = 4; static const int _maxBins = 3092; static const int _maxGates = _maxBins * _maxTrips; static const int _nSamplesSz = 64; IwrfTsPulse::burst_phase_t _burstPhases; // beam identification si64 _beamCount; int _midIndex, _startIndex, _endIndex; si64 _prevBeamPulseSeqNum; // pulse after center of beam vector<const IwrfTsPulse *> _beamPulses; // beam properties Beam::scan_type_t _scanType; int _nGates; int _nSamples; double _az; double _el; double _prt; double _meanPrf; double _pulseWidthUs; // pulse-to-pulse HV alternating mode bool _isAlternating; bool _startsOnHoriz; // staggered PRT and dual PRT bool _isStaggeredPrt; bool _startsOnPrtShort; double _prtShort; double _prtLong; int _nGatesPrtShort; int _nGatesPrtLong; bool _isDualPrt; bool _isDualReady; int _dualPrtIndexStart; int _dualPrtIndexEnd; // beam location/rate in azimuth - PPI mode int _azIndex; int _prevAzIndex; // beam location/rate in elevation - RHI mode int _elIndex; int _prevElIndex; // antenna rate bool _azRateInitialized; double _prevTimeForAzRate; double _prevAzForRate; double _progressiveAzRate; double _beamAzRate; bool _rotationClockwise; bool _elRateInitialized; double _prevTimeForElRate; double _prevElForRate; double _progressiveElRate; double _beamElRate; bool _rotationUpwards; // index the beams bool _indexTheBeams; double _indexedResolution; double _beamAngleDeg; // window 90% factors // this is the fraction of the window width, centered, which // accounts for 90 percent of the power double _windowFactorRect; double _windowFactorVonhann; double _windowFactorBlackman; double _windowFactorBlackmanNuttall; // atmospheric attenuation AtmosAtten _atmosAtten; // private functions int _initializeQueue(); int _readDualPrtBeam(); int _readNonIndexedBeam(); int _readConstantSteeringAngleBeam(); int _readIndexedBeam(); int _findPrevIndexedBeam(); int _findNextIndexedBeam(); int _finalizeNonIndexedBeam(); int _checkStartConditions(); void _constrainPulsesToWithinDwell(); IwrfTsPulse *_getNextPulse(); IwrfTsPulse *_readNextPulse(); IwrfTsPulse *_doReadNextPulse(); IwrfTsPulse *_readNextPulseWithInterp(); IwrfTsPulse *_pushOntoInterpQueue(); IwrfTsPulse *_popFromInterpQueue(); bool _beamOk(); void _addPulseToQueue(IwrfTsPulse *pulse); void _cacheLatestPulse(); void _clearPulseQueue(); void _recyclePulses(); void _addPulseToRecyclePool(IwrfTsPulse *pulse); IwrfTsPulse *_getPulseFromRecyclePool(); void _interpAzAngles(); void _interpElevAngles(); void _initPpiMode(); void _initRhiMode(); void _initVertMode(); void _setPrt(); int _findBeamCenterPpi(); int _findBeamCenterRhi(); int _computeMinNGates(); int _computeNSamplesIndexed(); int _computeNSamplesEffective(int nSamples); void _checkIsAlternating(); void _checkAlternatingStartsOnH(); void _checkIsStaggeredPrt(); void _checkStaggeredStartsOnShort(); double _conditionAz(double az); double _conditionEl(double el); void _computeProgressiveAzRate(const IwrfTsPulse *pulse); void _computeProgressiveElRate(const IwrfTsPulse *pulse); void _computeBeamAzRate(int endIndex, int nSamples); void _computeBeamElRate(int endIndex, int nSamples); void _checkQueueStatus(); void _computeWindowFactors(); }; #endif
d735613500a2da11640cc3110c72df815d5e9f84
ed4f0ae5cfc032012cc21fc6ab2a80459825db77
/odd even.cpp
c6a97e6fec6354eb242ca3dba848dd0731a91110
[]
no_license
ZainArif/C-program-practices
5cb88cb422256cd35ce92ae81521124b3502a266
21047c2c6a01339c4582c40f28c43304ac59b2d3
refs/heads/master
2020-04-08T18:34:19.712748
2018-11-29T06:05:50
2018-11-29T06:05:50
159,614,341
0
0
null
null
null
null
UTF-8
C++
false
false
159
cpp
#include<conio.h> #include<stdio.h> int main() { int num; printf("Enter a number:"); scanf("%d",&num); if(num%2 == 0) printf("even"); else printf("Odd"); }
d631b00c965e3d22d4730f78bee2181161dfbc36
6fee31ef3f6c3707de20a5956b2d96575fdf0aac
/znd/dev/src/gui/3rdparty/Charts/2.0/Src/src/charts/splinechart/qsplineseries.h
d3810757878b343bb28d0310ef5333a883fab3e1
[]
no_license
hilockman/cim2ddl
605b05e5c67acde1f9b0c93e6b0a227dd27519a6
78ec9a3b4136710ac659fa40e3da28c9bb57c10f
refs/heads/master
2021-01-01T17:50:55.311126
2019-01-03T05:35:47
2019-01-03T05:35:47
98,163,859
3
6
null
null
null
null
UTF-8
C++
false
false
1,319
h
/**************************************************************************** ** ** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.io ** ** This file is part of the Qt Charts module. ** ** Licensees holding valid commercial license for Qt may use this file in ** accordance with the Qt License Agreement provided with the Software ** or, alternatively, in accordance with the terms contained in a written ** agreement between you and Digia. ** ** If you have questions regarding the use of this file, please use ** contact form at http://qt.io ** ****************************************************************************/ #ifndef QSPLINESERIES_H #define QSPLINESERIES_H #include <QtCharts/QChartGlobal> #include <QtCharts/qlineseries.h> #include <QtCore/QList> #include <QtCore/QPointF> #include <QtCore/QtGlobal> QT_CHARTS_BEGIN_NAMESPACE class QSplineSeriesPrivate; class QT_CHARTS_EXPORT QSplineSeries : public QLineSeries { Q_OBJECT public: explicit QSplineSeries(QObject *parent = 0); ~QSplineSeries(); QAbstractSeries::SeriesType type() const; private: Q_DECLARE_PRIVATE(QSplineSeries) Q_DISABLE_COPY(QSplineSeries) friend class SplineChartItem; }; QT_CHARTS_END_NAMESPACE #endif // QSPLINESERIES_H
9ba664de1c3fa3f7e69c296a411e280f0f55fe1e
9d438ddba9a3386176d356e58a5556db2b620693
/commands/motion/CapN.cpp
5f5322575c7aa772ceeb50a104977bde03503c6d
[]
no_license
padamchopra/vm
887587ca0991cbd3494e40f76610f51fefa91ccd
401ec3c5a033ac89bb2430b5b2814bc06403b429
refs/heads/main
2023-02-01T00:32:17.558355
2020-12-15T11:04:30
2020-12-15T11:04:30
318,401,297
0
0
null
null
null
null
UTF-8
C++
false
false
288
cpp
#include "CapN.h" #include "../../model/VMModel.h" #include "N.h" VM::CapN::CapN() { commandSequence.push_back('N'); } void VM::CapN::executeFor(VM::VMModel &model, int times) {} void VM::CapN::execute(VM::VMModel &model, int times) { N n{true}; n.execute(model, times); }
83a5aefeeec2293cae8d2cda224027d0d77823bb
0d6e5ab2933fda48e97c7d596b27589e8a54d19b
/Source/AdobeMobile/Public/IAdobeMobile.h
71c5b7500fd653e665bc80d3071196d5d616facd
[]
no_license
piandpower/AdobeMobile
e592ba13a00d02a50f8e05795a6e12b76c3fe13f
592459b6ce22d57e2647cb45863af245c5bf49b6
refs/heads/master
2021-01-22T06:27:56.360619
2016-10-13T21:19:40
2016-10-13T21:19:40
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,091
h
// // Created by Robert Segal on 2016-02-04. // Copyright (c) 2016 Get Set Games Inc. All rights reserved. // #pragma once #include "ModuleManager.h" /** * The public interface to this module. In most cases, this interface is only public to sibling modules * within this plugin. */ class IAdobeMobile: public IModuleInterface { public: /** * Singleton-like access to this module's interface. This is just for convenience! * Beware of calling this during the shutdown phase, though. Your module might have been unloaded already. * * @return Returns singleton instance, loading the module on demand if needed */ static inline IAdobeMobile& Get() { return FModuleManager::LoadModuleChecked< IAdobeMobile >( "AdobeMobile" ); } /** * Checks to see if this module is loaded and ready. It is only valid to call Get() if IsAvailable() returns true. * * @return True if the module is loaded and ready to use */ static inline bool IsAvailable() { return FModuleManager::Get().IsModuleLoaded( "AdobeMobile" ); } };
0fb480c9c0a51b2a4ff6842780087e859cbc901b
e7398e4cde92533ca44687bd0a2460a718ca8be6
/viewer/Projection.cpp
8ad6a934255f24892b668a98e748bd8cf6cf57ab
[]
no_license
jang5497/shpviewer
eacef02ea16b6476a8e0848c06007a8314317efb
23a2186df1f743a03cb77e3f166308684cef7151
refs/heads/master
2020-03-27T19:43:16.028008
2018-09-01T15:25:59
2018-09-01T15:25:59
147,002,599
0
0
null
null
null
null
UTF-8
C++
false
false
2,579
cpp
// Projection.cpp: implementation of the CProjection class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "shpviewer.h" #include "Projection.h" #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// CProjection::CProjection() { } CProjection::~CProjection() { } // Molodensky Datum Transformation function for general datum transformation. void CProjection::DatumTrans(double irmaj, // input major double irmin, // input major double ilon, // input longitude double ilat, // input latitude double ih, // z value(only different ellipsoid) double ormaj, double ormin, double *olon, double *olat, double *oh, int dx, int dy, int dz) { double dmaj, df, dlat, dlon, dh; // differeces between input ellipsoid and output ellipsoid like major axis and flattening. As is ouput - input double rm, rn; //'radius of curvature in the meridian and radius of curvature in the prime vertical double temp, es_temp, f; temp = irmin / irmaj; f = 1 - temp; // flattening es_temp = 1 - temp * temp; // e2 dmaj = ormaj - irmaj; // output major axis - input major axis df = irmin / irmaj - ormin / ormaj; // output Flattening - input flattening rm = irmaj * (1 - es_temp) / pow(1 - es_temp * sin(ilat) * sin(ilat), 1.5); rn = irmaj / pow(1 - es_temp * sin(ilat) * sin(ilat), .5); dlat = ((((-dx * sin(ilat) * cos(ilon) - dy * sin(ilat) * cos(ilon)) + dz * cos(ilat)) + dmaj * rn * es_temp * sin(ilat) * cos(ilat) / irmaj) + df * (rm / temp + rn * temp) * sin(ilat) * cos(ilat)) / (rm + ih); dlon = (-dx * sin(ilon) + dy * cos(ilon)) / ((rn + ih) * cos(ilat)); dh = dx * cos(ilat) * cos(ilon) + dy * cos(ilat) * sin(ilon) + dz * sin(ilat) - dmaj * irmaj / rn + df * temp * rn * sin(ilat) * sin(ilat); *olat = ilat + dlat; *olon = ilon + dlon; *oh = ih + dh; } void CProjection::D2DMS(double _lon, double _lat, int& _lonD, int& _lonM, double& _lonS, int& _latD, int& _latM, double& _latS) { _lonD = (int)_lon; _lonM = (int)((_lon - _lonD) * 60); _lonS = ((_lon - _lonD) * 60 - _lonM) * 60; _latD = (int)_lat; _latM = (int)((_lat - _latD) * 60); _latS = ((_lat - _latD) * 60 - _latM) * 60; }
99aeff22b0ee00f8a7e04c1fe5f8af6618f8b0ff
907843f7d8c0871eec2850b95a5d2077c14c182a
/solvers/PulseWaveSolver/EquationSystems/LymphaticPressureArea.cpp
a20ae7d61e93afdc2561615a294cf1250d0d53df
[ "MIT" ]
permissive
li12242/nektar
4792c4f8f88992875ecefb590e804e850887ae19
a31e519cdde5d58d2fa23e0eaedd54ce3ed9fb72
refs/heads/master
2020-05-29T12:21:41.203547
2015-07-29T14:15:38
2015-07-29T14:15:38
65,020,427
1
0
null
2016-08-05T13:26:59
2016-08-05T13:26:58
null
UTF-8
C++
false
false
2,526
cpp
/////////////////////////////////////////////////////////////////////////////// // // File CommMpi.cpp // // For more information, please see: http://www.nektar.info // // The MIT License // // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA), // Department of Aeronautics, Imperial College London (UK), and Scientific // Computing and Imaging Institute, University of Utah (USA). // // License for the specific language governing rights and limitations under // 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. // // Description: ROuflow class // /////////////////////////////////////////////////////////////////////////////// #include <PulseWaveSolver/EquationSystems/LymphaticPressureArea.h> namespace Nektar { std::string LymphaticPressureArea::className = GetPressureAreaFactory().RegisterCreatorFunction( "Lymphatic", LymphaticPressureArea::create, "Pressure area relationship for the lymphatic system"); /** * */ LymphaticPressureArea::LymphaticPressureArea(Array<OneD, MultiRegions::ExpListSharedPtr> pVessel, const LibUtilities::SessionReaderSharedPtr pSession) : PulseWavePressureArea(pVessel,pSession) { } /** * */ LymphaticPressureArea::~LymphaticPressureArea() { } void LymphaticPressureArea::v_DoPressure() { cout<<"lymphatic pressure area"<<endl; } }
e9ce1b6d9fc61f7ec3b2ea104e541e3ec0ba03b3
0add59d26484550789f42e67f21f44e2abbe8ec2
/src/qt/bitcoingui.cpp
0e079410f224900593809de203f01838f6d1fde5
[ "MIT" ]
permissive
zer0coin/zer0coin
6d60dc22dc3c80db8381b858ccaa90bb585933a8
ad1346239295546298a1a5cd1f829ba4b1e633f4
refs/heads/master
2021-01-19T03:19:42.873673
2013-08-11T14:22:13
2013-08-11T14:22:13
null
0
0
null
null
null
null
UTF-8
C++
false
false
34,690
cpp
/* * Qt4 bitcoin GUI. * * W.J. van der Laan 2011-2012 * The Bitcoin Developers 2011-2012 * The Litecoin Developers 201-2013 */ #include "bitcoingui.h" #include "transactiontablemodel.h" #include "addressbookpage.h" #include "sendcoinsdialog.h" #include "signverifymessagedialog.h" #include "optionsdialog.h" #include "aboutdialog.h" #include "clientmodel.h" #include "walletmodel.h" #include "editaddressdialog.h" #include "optionsmodel.h" #include "transactiondescdialog.h" #include "addresstablemodel.h" #include "transactionview.h" #include "overviewpage.h" #include "miningpage.h" #include "bitcoinunits.h" #include "guiconstants.h" #include "askpassphrasedialog.h" #include "notificator.h" #include "guiutil.h" #include "rpcconsole.h" #ifdef Q_WS_MAC #include "macdockiconhandler.h" #endif #include <QApplication> #include <QMainWindow> #include <QMenuBar> #include <QMenu> #include <QIcon> #include <QTabWidget> #include <QVBoxLayout> #include <QToolBar> #include <QStatusBar> #include <QLabel> #include <QLineEdit> #include <QPushButton> #include <QLocale> #include <QMessageBox> #include <QProgressBar> #include <QStackedWidget> #include <QDateTime> #include <QMovie> #include <QFileDialog> #include <QDesktopServices> #include <QTimer> #include <QDragEnterEvent> #include <QUrl> #include <iostream> BitcoinGUI::BitcoinGUI(QWidget *parent): QMainWindow(parent), clientModel(0), walletModel(0), encryptWalletAction(0), changePassphraseAction(0), aboutQtAction(0), trayIcon(0), notificator(0), rpcConsole(0) { resize(850, 550); setWindowTitle(tr("Zer0coin") + " - " + tr("Wallet")); #ifndef Q_WS_MAC qApp->setWindowIcon(QIcon(":icons/bitcoin")); setWindowIcon(QIcon(":icons/bitcoin")); #else setUnifiedTitleAndToolBarOnMac(true); QApplication::setAttribute(Qt::AA_DontShowIconsInMenus); #endif // Accept D&D of URIs setAcceptDrops(true); // Create actions for the toolbar, menu bar and tray/dock icon createActions(); // Create application menu bar createMenuBar(); // Create the toolbars createToolBars(); // Create the tray icon (or setup the dock icon) createTrayIcon(); // Create tabs overviewPage = new OverviewPage(); miningPage = new MiningPage(this); transactionsPage = new QWidget(this); QVBoxLayout *vbox = new QVBoxLayout(); transactionView = new TransactionView(this); vbox->addWidget(transactionView); transactionsPage->setLayout(vbox); addressBookPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab); receiveCoinsPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab); sendCoinsPage = new SendCoinsDialog(this); signVerifyMessageDialog = new SignVerifyMessageDialog(this); centralWidget = new QStackedWidget(this); centralWidget->addWidget(overviewPage); centralWidget->addWidget(miningPage); centralWidget->addWidget(transactionsPage); centralWidget->addWidget(addressBookPage); centralWidget->addWidget(receiveCoinsPage); centralWidget->addWidget(sendCoinsPage); #ifdef FIRST_CLASS_MESSAGING centralWidget->addWidget(signVerifyMessageDialog); #endif setCentralWidget(centralWidget); // Create status bar statusBar(); // Status bar notification icons QFrame *frameBlocks = new QFrame(); frameBlocks->setContentsMargins(0,0,0,0); frameBlocks->setMinimumWidth(73); frameBlocks->setMaximumWidth(73); QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks); frameBlocksLayout->setContentsMargins(3,0,3,0); frameBlocksLayout->setSpacing(3); labelEncryptionIcon = new QLabel(); labelMiningIcon = new QLabel(); labelConnectionsIcon = new QLabel(); labelBlocksIcon = new QLabel(); frameBlocksLayout->addStretch(); frameBlocksLayout->addWidget(labelEncryptionIcon); frameBlocksLayout->addStretch(); frameBlocksLayout->addWidget(labelMiningIcon); frameBlocksLayout->addStretch(); frameBlocksLayout->addWidget(labelConnectionsIcon); frameBlocksLayout->addStretch(); frameBlocksLayout->addWidget(labelBlocksIcon); frameBlocksLayout->addStretch(); // Progress bar and label for blocks download progressBarLabel = new QLabel(); progressBarLabel->setVisible(false); progressBar = new QProgressBar(); progressBar->setAlignment(Qt::AlignCenter); progressBar->setVisible(false); statusBar()->addWidget(progressBarLabel); statusBar()->addWidget(progressBar); statusBar()->addPermanentWidget(frameBlocks); syncIconMovie = new QMovie(":/movies/update_spinner", "mng", this); // Clicking on a transaction on the overview page simply sends you to transaction history page connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), this, SLOT(gotoHistoryPage())); connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), transactionView, SLOT(focusTransaction(QModelIndex))); // Doubleclicking on a transaction on the transaction history page shows details connect(transactionView, SIGNAL(doubleClicked(QModelIndex)), transactionView, SLOT(showDetails())); rpcConsole = new RPCConsole(this); connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(show())); // Clicking on "Verify Message" in the address book sends you to the verify message tab connect(addressBookPage, SIGNAL(verifyMessage(QString)), this, SLOT(gotoVerifyMessageTab(QString))); // Clicking on "Sign Message" in the receive coins page sends you to the sign message tab connect(receiveCoinsPage, SIGNAL(signMessage(QString)), this, SLOT(gotoSignMessageTab(QString))); gotoOverviewPage(); } BitcoinGUI::~BitcoinGUI() { if(trayIcon) // Hide tray icon, as deleting will let it linger until quit (on Ubuntu) trayIcon->hide(); #ifdef Q_WS_MAC delete appMenuBar; #endif } void BitcoinGUI::createActions() { QActionGroup *tabGroup = new QActionGroup(this); overviewAction = new QAction(QIcon(":/icons/overview"), tr("&Overview"), this); overviewAction->setToolTip(tr("Show general overview of wallet")); overviewAction->setCheckable(true); overviewAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_1)); tabGroup->addAction(overviewAction); miningAction = new QAction(QIcon(":/icons/mining"), tr("&Mining"), this); miningAction->setToolTip(tr("Configure mining")); miningAction->setCheckable(true); tabGroup->addAction(miningAction); historyAction = new QAction(QIcon(":/icons/history"), tr("&Transactions"), this); historyAction->setToolTip(tr("Browse transaction history")); historyAction->setCheckable(true); historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4)); tabGroup->addAction(historyAction); addressBookAction = new QAction(QIcon(":/icons/address-book"), tr("&Address Book"), this); addressBookAction->setToolTip(tr("Edit the list of stored addresses and labels")); addressBookAction->setCheckable(true); addressBookAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5)); tabGroup->addAction(addressBookAction); receiveCoinsAction = new QAction(QIcon(":/icons/receiving_addresses"), tr("&Receive coins"), this); receiveCoinsAction->setToolTip(tr("Show the list of addresses for receiving payments")); receiveCoinsAction->setCheckable(true); receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3)); tabGroup->addAction(receiveCoinsAction); sendCoinsAction = new QAction(QIcon(":/icons/send"), tr("&Send coins"), this); sendCoinsAction->setToolTip(tr("Send coins to a Zer0coin address")); sendCoinsAction->setCheckable(true); sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2)); tabGroup->addAction(sendCoinsAction); signMessageAction = new QAction(QIcon(":/icons/edit"), tr("Sign &message..."), this); signMessageAction->setToolTip(tr("Sign a message to prove you own a Bitcoin address")); tabGroup->addAction(signMessageAction); verifyMessageAction = new QAction(QIcon(":/icons/transaction_0"), tr("&Verify message..."), this); verifyMessageAction->setToolTip(tr("Verify a message to ensure it was signed with a specified Bitcoin address")); tabGroup->addAction(verifyMessageAction); #ifdef FIRST_CLASS_MESSAGING firstClassMessagingAction = new QAction(QIcon(":/icons/edit"), tr("S&ignatures"), this); firstClassMessagingAction->setToolTip(signMessageAction->toolTip() + QString(". / ") + verifyMessageAction->toolTip() + QString(".")); firstClassMessagingAction->setCheckable(true); tabGroup->addAction(firstClassMessagingAction); #endif connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage())); connect(miningAction, SIGNAL(triggered()), this, SLOT(gotoMiningPage())); connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage())); connect(addressBookAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(addressBookAction, SIGNAL(triggered()), this, SLOT(gotoAddressBookPage())); connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage())); connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage())); connect(signMessageAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(signMessageAction, SIGNAL(triggered()), this, SLOT(gotoSignMessageTab())); connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(gotoVerifyMessageTab())); #ifdef FIRST_CLASS_MESSAGING connect(firstClassMessagingAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); // Always start with the sign message tab for FIRST_CLASS_MESSAGING connect(firstClassMessagingAction, SIGNAL(triggered()), this, SLOT(gotoSignMessageTab())); #endif quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this); quitAction->setToolTip(tr("Quit application")); quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); quitAction->setMenuRole(QAction::QuitRole); aboutAction = new QAction(QIcon(":/icons/bitcoin"), tr("&About Zer0coin"), this); aboutAction->setToolTip(tr("Show information about Zer0coin")); aboutAction->setMenuRole(QAction::AboutRole); aboutQtAction = new QAction(tr("About &Qt"), this); aboutQtAction->setToolTip(tr("Show information about Qt")); aboutQtAction->setMenuRole(QAction::AboutQtRole); optionsAction = new QAction(QIcon(":/icons/options"), tr("&Options..."), this); optionsAction->setToolTip(tr("Modify configuration options for Zer0coin")); optionsAction->setMenuRole(QAction::PreferencesRole); toggleHideAction = new QAction(QIcon(":/icons/bitcoin"), tr("Show/Hide &Zer0coin"), this); toggleHideAction->setToolTip(tr("Show or hide the Zer0coin window")); exportAction = new QAction(QIcon(":/icons/export"), tr("&Export..."), this); exportAction->setToolTip(tr("Export the data in the current tab to a file")); encryptWalletAction = new QAction(QIcon(":/icons/lock_closed"), tr("&Encrypt Wallet..."), this); encryptWalletAction->setToolTip(tr("Encrypt or decrypt wallet")); encryptWalletAction->setCheckable(true); backupWalletAction = new QAction(QIcon(":/icons/filesave"), tr("&Backup Wallet..."), this); backupWalletAction->setToolTip(tr("Backup wallet to another location")); changePassphraseAction = new QAction(QIcon(":/icons/key"), tr("&Change Passphrase..."), this); changePassphraseAction->setToolTip(tr("Change the passphrase used for wallet encryption")); openRPCConsoleAction = new QAction(QIcon(":/icons/debugwindow"), tr("&Debug window"), this); openRPCConsoleAction->setToolTip(tr("Open debugging and diagnostic console")); connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked())); connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked())); connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt())); connect(toggleHideAction, SIGNAL(triggered()), this, SLOT(toggleHidden())); connect(encryptWalletAction, SIGNAL(triggered(bool)), this, SLOT(encryptWallet(bool))); connect(backupWalletAction, SIGNAL(triggered()), this, SLOT(backupWallet())); connect(changePassphraseAction, SIGNAL(triggered()), this, SLOT(changePassphrase())); } void BitcoinGUI::createMenuBar() { #ifdef Q_WS_MAC // Create a decoupled menu bar on Mac which stays even if the window is closed appMenuBar = new QMenuBar(); #else // Get the main window's menu bar on other platforms appMenuBar = menuBar(); #endif // Configure the menus QMenu *file = appMenuBar->addMenu(tr("&File")); file->addAction(backupWalletAction); file->addAction(exportAction); #ifndef FIRST_CLASS_MESSAGING file->addAction(signMessageAction); file->addAction(verifyMessageAction); #endif file->addSeparator(); file->addAction(quitAction); QMenu *settings = appMenuBar->addMenu(tr("&Settings")); settings->addAction(encryptWalletAction); settings->addAction(changePassphraseAction); settings->addSeparator(); settings->addAction(optionsAction); QMenu *help = appMenuBar->addMenu(tr("&Help")); help->addAction(openRPCConsoleAction); help->addSeparator(); help->addAction(aboutAction); help->addAction(aboutQtAction); } void BitcoinGUI::createToolBars() { QToolBar *toolbar = addToolBar(tr("Tabs toolbar")); toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); toolbar->addAction(overviewAction); toolbar->addAction(sendCoinsAction); toolbar->addAction(receiveCoinsAction); toolbar->addAction(historyAction); toolbar->addAction(addressBookAction); toolbar->addAction(miningAction); #ifdef FIRST_CLASS_MESSAGING toolbar->addAction(firstClassMessagingAction); #endif QToolBar *toolbar2 = addToolBar(tr("Actions toolbar")); toolbar2->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); toolbar2->addAction(exportAction); } void BitcoinGUI::setClientModel(ClientModel *clientModel) { this->clientModel = clientModel; if(clientModel) { // Replace some strings and icons, when using the testnet if(clientModel->isTestNet()) { setWindowTitle(windowTitle() + QString(" ") + tr("[testnet]")); #ifndef Q_WS_MAC qApp->setWindowIcon(QIcon(":icons/bitcoin_testnet")); setWindowIcon(QIcon(":icons/bitcoin_testnet")); #else MacDockIconHandler::instance()->setIcon(QIcon(":icons/bitcoin_testnet")); #endif if(trayIcon) { trayIcon->setToolTip(tr("Zer0coin client") + QString(" ") + tr("[testnet]")); trayIcon->setIcon(QIcon(":/icons/toolbar_testnet")); toggleHideAction->setIcon(QIcon(":/icons/toolbar_testnet")); } aboutAction->setIcon(QIcon(":/icons/toolbar_testnet")); } // Keep up to date with client setNumConnections(clientModel->getNumConnections()); connect(clientModel, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int))); setNumBlocks(clientModel->getNumBlocks(), clientModel->getNumBlocksOfPeers()); connect(clientModel, SIGNAL(numBlocksChanged(int,int)), this, SLOT(setNumBlocks(int,int))); setMining(false, 0); connect(clientModel, SIGNAL(miningChanged(bool,int)), this, SLOT(setMining(bool,int))); // Report errors from network/worker thread connect(clientModel, SIGNAL(error(QString,QString,bool)), this, SLOT(error(QString,QString,bool))); rpcConsole->setClientModel(clientModel); addressBookPage->setOptionsModel(clientModel->getOptionsModel()); receiveCoinsPage->setOptionsModel(clientModel->getOptionsModel()); } } void BitcoinGUI::setWalletModel(WalletModel *walletModel) { this->walletModel = walletModel; if(walletModel) { // Report errors from wallet thread connect(walletModel, SIGNAL(error(QString,QString,bool)), this, SLOT(error(QString,QString,bool))); // Put transaction list in tabs transactionView->setModel(walletModel); overviewPage->setModel(walletModel); addressBookPage->setModel(walletModel->getAddressTableModel()); receiveCoinsPage->setModel(walletModel->getAddressTableModel()); sendCoinsPage->setModel(walletModel); signVerifyMessageDialog->setModel(walletModel); miningPage->setModel(clientModel); setEncryptionStatus(walletModel->getEncryptionStatus()); connect(walletModel, SIGNAL(encryptionStatusChanged(int)), this, SLOT(setEncryptionStatus(int))); // Balloon popup for new transaction connect(walletModel->getTransactionTableModel(), SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(incomingTransaction(QModelIndex,int,int))); // Ask for passphrase if needed connect(walletModel, SIGNAL(requireUnlock()), this, SLOT(unlockWallet())); } } void BitcoinGUI::createTrayIcon() { QMenu *trayIconMenu; #ifndef Q_WS_MAC trayIcon = new QSystemTrayIcon(this); trayIconMenu = new QMenu(this); trayIcon->setContextMenu(trayIconMenu); trayIcon->setToolTip(tr("Zer0coin client")); trayIcon->setIcon(QIcon(":/icons/toolbar")); connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(trayIconActivated(QSystemTrayIcon::ActivationReason))); trayIcon->show(); #else // Note: On Mac, the dock icon is used to provide the tray's functionality. MacDockIconHandler *dockIconHandler = MacDockIconHandler::instance(); trayIconMenu = dockIconHandler->dockMenu(); #endif // Configuration of the tray icon (or dock icon) icon menu trayIconMenu->addAction(toggleHideAction); trayIconMenu->addSeparator(); trayIconMenu->addAction(sendCoinsAction); trayIconMenu->addAction(receiveCoinsAction); #ifndef FIRST_CLASS_MESSAGING trayIconMenu->addSeparator(); #endif trayIconMenu->addAction(signMessageAction); trayIconMenu->addAction(verifyMessageAction); trayIconMenu->addSeparator(); trayIconMenu->addAction(optionsAction); trayIconMenu->addAction(openRPCConsoleAction); #ifndef Q_WS_MAC // This is built-in on Mac trayIconMenu->addSeparator(); trayIconMenu->addAction(quitAction); #endif notificator = new Notificator(qApp->applicationName(), trayIcon); } #ifndef Q_WS_MAC void BitcoinGUI::trayIconActivated(QSystemTrayIcon::ActivationReason reason) { if(reason == QSystemTrayIcon::Trigger) { // Click on system tray icon triggers "show/hide Zer0coin" toggleHideAction->trigger(); } } #endif void BitcoinGUI::optionsClicked() { if(!clientModel || !clientModel->getOptionsModel()) return; OptionsDialog dlg; dlg.setModel(clientModel->getOptionsModel()); dlg.exec(); } void BitcoinGUI::aboutClicked() { AboutDialog dlg; dlg.setModel(clientModel); dlg.exec(); } void BitcoinGUI::setNumConnections(int count) { QString icon; switch(count) { case 0: icon = ":/icons/connect_0"; break; case 1: case 2: case 3: icon = ":/icons/connect_1"; break; case 4: case 5: case 6: icon = ":/icons/connect_2"; break; case 7: case 8: case 9: icon = ":/icons/connect_3"; break; default: icon = ":/icons/connect_4"; break; } labelConnectionsIcon->setPixmap(QIcon(icon).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); labelConnectionsIcon->setToolTip(tr("%n active connection(s) to Zer0coin network", "", count)); } void BitcoinGUI::setNumBlocks(int count, int nTotalBlocks) { // don't show / hide progressBar and it's label if we have no connection(s) to the network if (!clientModel || clientModel->getNumConnections() == 0) { progressBarLabel->setVisible(false); progressBar->setVisible(false); return; } QString tooltip; if(count < nTotalBlocks) { int nRemainingBlocks = nTotalBlocks - count; float nPercentageDone = count / (nTotalBlocks * 0.01f); if (clientModel->getStatusBarWarnings() == "") { progressBarLabel->setText(tr("Synchronizing with network...")); progressBarLabel->setVisible(true); progressBar->setFormat(tr("~%n block(s) remaining", "", nRemainingBlocks)); progressBar->setMaximum(nTotalBlocks); progressBar->setValue(count); progressBar->setVisible(true); } else { progressBarLabel->setText(clientModel->getStatusBarWarnings()); progressBarLabel->setVisible(true); progressBar->setVisible(false); } tooltip = tr("Downloaded %1 of %2 blocks of transaction history (%3% done).").arg(count).arg(nTotalBlocks).arg(nPercentageDone, 0, 'f', 2); } else { if (clientModel->getStatusBarWarnings() == "") progressBarLabel->setVisible(false); else { progressBarLabel->setText(clientModel->getStatusBarWarnings()); progressBarLabel->setVisible(true); } progressBar->setVisible(false); tooltip = tr("Downloaded %1 blocks of transaction history.").arg(count); } tooltip = tr("Current difficulty is %1.").arg(clientModel->GetDifficulty()) + QString("<br>") + tooltip; QDateTime now = QDateTime::currentDateTime(); QDateTime lastBlockDate = clientModel->getLastBlockDate(); int secs = lastBlockDate.secsTo(now); QString text; // Represent time from last generated block in human readable text if(secs <= 0) { // Fully up to date. Leave text empty. } else if(secs < 60) { text = tr("%n second(s) ago","",secs); } else if(secs < 60*60) { text = tr("%n minute(s) ago","",secs/60); } else if(secs < 24*60*60) { text = tr("%n hour(s) ago","",secs/(60*60)); } else { text = tr("%n day(s) ago","",secs/(60*60*24)); } // Set icon state: spinning if catching up, tick otherwise if(secs < 90*60 && count >= nTotalBlocks) { tooltip = tr("Up to date") + QString(".<br>") + tooltip; labelBlocksIcon->setPixmap(QIcon(":/icons/synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); overviewPage->showOutOfSyncWarning(false); } else { tooltip = tr("Catching up...") + QString("<br>") + tooltip; labelBlocksIcon->setMovie(syncIconMovie); syncIconMovie->start(); overviewPage->showOutOfSyncWarning(true); } if(!text.isEmpty()) { tooltip += QString("<br>"); tooltip += tr("Last received block was generated %1.").arg(text); } // Don't word-wrap this (fixed-width) tooltip tooltip = QString("<nobr>") + tooltip + QString("</nobr>"); labelBlocksIcon->setToolTip(tooltip); progressBarLabel->setToolTip(tooltip); progressBar->setToolTip(tooltip); } void BitcoinGUI::setMining(bool mining, int hashrate) { if (mining) { labelMiningIcon->setPixmap(QIcon(":/icons/mining_active").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); labelMiningIcon->setToolTip(tr("Mining Zer0coin at %1 hashes per second").arg(hashrate)); } else { labelMiningIcon->setPixmap(QIcon(":/icons/mining_inactive").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); labelMiningIcon->setToolTip(tr("Not mining Zer0coin")); } } void BitcoinGUI::error(const QString &title, const QString &message, bool modal) { // Report errors from network/worker thread if(modal) { QMessageBox::critical(this, title, message, QMessageBox::Ok, QMessageBox::Ok); } else { notificator->notify(Notificator::Critical, title, message); } } void BitcoinGUI::changeEvent(QEvent *e) { QMainWindow::changeEvent(e); #ifndef Q_WS_MAC // Ignored on Mac if(e->type() == QEvent::WindowStateChange) { if(clientModel && clientModel->getOptionsModel()->getMinimizeToTray()) { QWindowStateChangeEvent *wsevt = static_cast<QWindowStateChangeEvent*>(e); if(!(wsevt->oldState() & Qt::WindowMinimized) && isMinimized()) { QTimer::singleShot(0, this, SLOT(hide())); e->ignore(); } } } #endif } void BitcoinGUI::closeEvent(QCloseEvent *event) { if(clientModel) { #ifndef Q_WS_MAC // Ignored on Mac if(!clientModel->getOptionsModel()->getMinimizeToTray() && !clientModel->getOptionsModel()->getMinimizeOnClose()) { qApp->quit(); } #endif } QMainWindow::closeEvent(event); } void BitcoinGUI::askFee(qint64 nFeeRequired, bool *payFee) { QString strMessage = tr("This transaction is over the size limit. You can still send it for a fee of %1, " "which goes to the nodes that process your transaction and helps to support the network. " "Do you want to pay the fee?").arg( BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, nFeeRequired)); QMessageBox::StandardButton retval = QMessageBox::question( this, tr("Confirm transaction fee"), strMessage, QMessageBox::Yes|QMessageBox::Cancel, QMessageBox::Yes); *payFee = (retval == QMessageBox::Yes); } void BitcoinGUI::incomingTransaction(const QModelIndex & parent, int start, int end) { if(!walletModel || !clientModel) return; TransactionTableModel *ttm = walletModel->getTransactionTableModel(); qint64 amount = ttm->index(start, TransactionTableModel::Amount, parent) .data(Qt::EditRole).toULongLong(); if(!clientModel->inInitialBlockDownload()) { // On new transaction, make an info balloon // Unless the initial block download is in progress, to prevent balloon-spam QString date = ttm->index(start, TransactionTableModel::Date, parent) .data().toString(); QString type = ttm->index(start, TransactionTableModel::Type, parent) .data().toString(); QString address = ttm->index(start, TransactionTableModel::ToAddress, parent) .data().toString(); QIcon icon = qvariant_cast<QIcon>(ttm->index(start, TransactionTableModel::ToAddress, parent) .data(Qt::DecorationRole)); notificator->notify(Notificator::Information, (amount)<0 ? tr("Sent transaction") : tr("Incoming transaction"), tr("Date: %1\n" "Amount: %2\n" "Type: %3\n" "Address: %4\n") .arg(date) .arg(BitcoinUnits::formatWithUnit(walletModel->getOptionsModel()->getDisplayUnit(), amount, true)) .arg(type) .arg(address), icon); } } void BitcoinGUI::gotoOverviewPage() { overviewAction->setChecked(true); centralWidget->setCurrentWidget(overviewPage); exportAction->setEnabled(false); disconnect(exportAction, SIGNAL(triggered()), 0, 0); } void BitcoinGUI::gotoMiningPage() { miningAction->setChecked(true); centralWidget->setCurrentWidget(miningPage); exportAction->setEnabled(false); disconnect(exportAction, SIGNAL(triggered()), 0, 0); } void BitcoinGUI::gotoHistoryPage() { historyAction->setChecked(true); centralWidget->setCurrentWidget(transactionsPage); exportAction->setEnabled(true); disconnect(exportAction, SIGNAL(triggered()), 0, 0); connect(exportAction, SIGNAL(triggered()), transactionView, SLOT(exportClicked())); } void BitcoinGUI::gotoAddressBookPage() { addressBookAction->setChecked(true); centralWidget->setCurrentWidget(addressBookPage); exportAction->setEnabled(true); disconnect(exportAction, SIGNAL(triggered()), 0, 0); connect(exportAction, SIGNAL(triggered()), addressBookPage, SLOT(exportClicked())); } void BitcoinGUI::gotoReceiveCoinsPage() { receiveCoinsAction->setChecked(true); centralWidget->setCurrentWidget(receiveCoinsPage); exportAction->setEnabled(true); disconnect(exportAction, SIGNAL(triggered()), 0, 0); connect(exportAction, SIGNAL(triggered()), receiveCoinsPage, SLOT(exportClicked())); } void BitcoinGUI::gotoSendCoinsPage() { sendCoinsAction->setChecked(true); centralWidget->setCurrentWidget(sendCoinsPage); exportAction->setEnabled(false); disconnect(exportAction, SIGNAL(triggered()), 0, 0); } void BitcoinGUI::gotoSignMessageTab(QString addr) { #ifdef FIRST_CLASS_MESSAGING firstClassMessagingAction->setChecked(true); centralWidget->setCurrentWidget(signVerifyMessageDialog); exportAction->setEnabled(false); disconnect(exportAction, SIGNAL(triggered()), 0, 0); signVerifyMessageDialog->showTab_SM(false); #else // call show() in showTab_SM() signVerifyMessageDialog->showTab_SM(true); #endif if(!addr.isEmpty()) signVerifyMessageDialog->setAddress_SM(addr); } void BitcoinGUI::gotoVerifyMessageTab(QString addr) { #ifdef FIRST_CLASS_MESSAGING firstClassMessagingAction->setChecked(true); centralWidget->setCurrentWidget(signVerifyMessageDialog); exportAction->setEnabled(false); disconnect(exportAction, SIGNAL(triggered()), 0, 0); signVerifyMessageDialog->showTab_VM(false); #else // call show() in showTab_VM() signVerifyMessageDialog->showTab_VM(true); #endif if(!addr.isEmpty()) signVerifyMessageDialog->setAddress_VM(addr); } void BitcoinGUI::dragEnterEvent(QDragEnterEvent *event) { // Accept only URIs if(event->mimeData()->hasUrls()) event->acceptProposedAction(); } void BitcoinGUI::dropEvent(QDropEvent *event) { if(event->mimeData()->hasUrls()) { int nValidUrisFound = 0; QList<QUrl> uris = event->mimeData()->urls(); foreach(const QUrl &uri, uris) { if (sendCoinsPage->handleURI(uri.toString())) nValidUrisFound++; } // if valid URIs were found if (nValidUrisFound) gotoSendCoinsPage(); else notificator->notify(Notificator::Warning, tr("URI handling"), tr("URI can not be parsed! This can be caused by an invalid Zer0coin address or malformed URI parameters.")); } event->acceptProposedAction(); } void BitcoinGUI::handleURI(QString strURI) { // URI has to be valid if (sendCoinsPage->handleURI(strURI)) { showNormalIfMinimized(); gotoSendCoinsPage(); } else notificator->notify(Notificator::Warning, tr("URI handling"), tr("URI can not be parsed! This can be caused by an invalid Zer0coin address or malformed URI parameters.")); } void BitcoinGUI::setEncryptionStatus(int status) { switch(status) { case WalletModel::Unencrypted: labelEncryptionIcon->hide(); encryptWalletAction->setChecked(false); changePassphraseAction->setEnabled(false); encryptWalletAction->setEnabled(true); break; case WalletModel::Unlocked: labelEncryptionIcon->show(); labelEncryptionIcon->setPixmap(QIcon(":/icons/lock_open").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); labelEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>unlocked</b>")); encryptWalletAction->setChecked(true); changePassphraseAction->setEnabled(true); encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported break; case WalletModel::Locked: labelEncryptionIcon->show(); labelEncryptionIcon->setPixmap(QIcon(":/icons/lock_closed").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); labelEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>locked</b>")); encryptWalletAction->setChecked(true); changePassphraseAction->setEnabled(true); encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported break; } } void BitcoinGUI::encryptWallet(bool status) { if(!walletModel) return; AskPassphraseDialog dlg(status ? AskPassphraseDialog::Encrypt: AskPassphraseDialog::Decrypt, this); dlg.setModel(walletModel); dlg.exec(); setEncryptionStatus(walletModel->getEncryptionStatus()); } void BitcoinGUI::backupWallet() { QString saveDir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation); QString filename = QFileDialog::getSaveFileName(this, tr("Backup Wallet"), saveDir, tr("Wallet Data (*.dat)")); if(!filename.isEmpty()) { if(!walletModel->backupWallet(filename)) { QMessageBox::warning(this, tr("Backup Failed"), tr("There was an error trying to save the wallet data to the new location.")); } } } void BitcoinGUI::changePassphrase() { AskPassphraseDialog dlg(AskPassphraseDialog::ChangePass, this); dlg.setModel(walletModel); dlg.exec(); } void BitcoinGUI::unlockWallet() { if(!walletModel) return; // Unlock wallet when requested by wallet model if(walletModel->getEncryptionStatus() == WalletModel::Locked) { AskPassphraseDialog dlg(AskPassphraseDialog::Unlock, this); dlg.setModel(walletModel); dlg.exec(); } } void BitcoinGUI::showNormalIfMinimized(bool fToggleHidden) { // activateWindow() (sometimes) helps with keyboard focus on Windows if (isHidden()) { show(); activateWindow(); } else if (isMinimized()) { showNormal(); activateWindow(); } else if (GUIUtil::isObscured(this)) { raise(); activateWindow(); } else if(fToggleHidden) hide(); } void BitcoinGUI::toggleHidden() { showNormalIfMinimized(true); }
34f178b86df688d0690a04f14eb3ec3b86589800
b414fa1e79a7aa19bc8255fb35c21dfb5488224c
/Outros programas/ConstrutorDestrutor/Circulo4.h
0af7e16ccd3e414ddb6d493b364f196962b3a0bf
[ "MIT" ]
permissive
noemiacintia/TP
a5fac33aea7065b95a198125331a041a83d090a8
d2eeeac4288e22db74ace693a1bf763bfb84dfc1
refs/heads/main
2023-05-11T02:41:27.070941
2021-05-25T23:11:56
2021-05-25T23:11:56
344,129,383
2
0
null
null
null
null
UTF-8
C++
false
false
308
h
#ifndef CIRCULO4_H #define CIRCULO4_H #include "Ponto4.cpp" // definicao da classe Ponto4 class Circulo4 : public Ponto4 { public: Circulo4( int = 0, int = 0, double = 0.0 ); ~Circulo4(); void imprime() const;// mostra um objeto Circulo4 private: double raio; }; #endif