blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 264 | content_id stringlengths 40 40 | detected_licenses listlengths 0 85 | license_type stringclasses 2
values | repo_name stringlengths 5 140 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 905
values | visit_date timestamp[us]date 2015-08-09 11:21:18 2023-09-06 10:45:07 | revision_date timestamp[us]date 1997-09-14 05:04:47 2023-09-17 19:19:19 | committer_date timestamp[us]date 1997-09-14 05:04:47 2023-09-06 06:22:19 | github_id int64 3.89k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-07 00:51:45 2023-09-14 21:58:39 ⌀ | gha_created_at timestamp[us]date 2008-03-27 23:40:48 2023-08-21 23:17:38 ⌀ | gha_language stringclasses 141
values | src_encoding stringclasses 34
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 2
classes | length_bytes int64 3 10.4M | extension stringclasses 115
values | content stringlengths 3 10.4M | authors listlengths 1 1 | author_id stringlengths 0 158 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4fccc4b5425386a072b847a260e92e58654f8c25 | 76adadc595cf0e27f03833036ecb9e7e9387c7d5 | /obstacle_avoidance_gazebo_and_tx2/Navigator_2D_gazebo/Path_Planning_cpp/rrt_test.cpp | 3e82ffec48ebf1326e08e91f891909a23c659927 | [
"Apache-2.0"
] | permissive | hddxds/scripts_from_gi | 2fdef4dc747b6a269a1aa9df871afaca19bbe178 | afb8977c001b860335f9062464e600d9115ea56e | refs/heads/master | 2022-12-08T21:32:42.307594 | 2020-09-07T13:25:40 | 2020-09-07T13:25:40 | 293,529,833 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 833 | cpp | //
// Created by gishr on 19-6-6.
//
#include "rrt_star.h"
int main(int argc, char **argv) {
rrt_star rrt(50);
vector<Vector3f> obstacle = rrt.create_obstacle();
for(auto& ob : obstacle)
{
cout<<ob<<endl;
}
vector<Vector3f> path = rrt.find_path(Vector3f(0, 0, 10), Vector3f(50, 0, 10), obstacle);
rrt.visualize_world();
// vector<Vector3f> line = Bresenham3D(Vector3f(0, 0, 0), Vector3f(5, 6, 7));
// for(auto& p : line){
// cout<<"line p: "<<p[0]<<", "<<p[1]<<", "<<p[2]<<endl;
// }
// vector<double> xs, ys, zs;
// for(auto& p : line){
// cout<<"p: "<<p[0]<<", "<<p[1]<<", "<<p[2]<<endl;
// xs.emplace_back(p[0]);
// ys.emplace_back(p[1]);
// zs.emplace_back(p[2]);
// }
// plt::scatter(xs, ys, zs, 50, "r");
// plt::show();
} | [
"dongshuo@giai.tech"
] | dongshuo@giai.tech |
0bb3646cf106489ce267d7561a169a9d8341c492 | 0a264c136331aa7c926df48061bbeaeae34afec6 | /muduo/muduo/base/Condition.h | 1cd1591cd06529414007f9fb973fa30af49f3979 | [
"BSD-3-Clause"
] | permissive | wenwuge/EasyLib | e28b64238cc5ebd4dafbcfb8f2eabb483cdbe52f | 2151e0246ec971024200c318d61694e23ec7df1f | refs/heads/master | 2022-10-25T15:58:09.725483 | 2022-10-19T07:37:24 | 2022-10-19T07:37:24 | 42,303,639 | 20 | 16 | null | null | null | null | UTF-8 | C++ | false | false | 1,008 | h | // Use of this source code is governed by a BSD-style license
// that can be found in the License file.
//
// Author: Shuo Chen (chenshuo at chenshuo dot com)
#ifndef MUDUO_BASE_CONDITION_H
#define MUDUO_BASE_CONDITION_H
#include <muduo/base/Mutex.h>
#include <boost/noncopyable.hpp>
#include <pthread.h>
namespace muduo
{
class Condition : boost::noncopyable
{
public:
explicit Condition(MutexLock& mutex)
: mutex_(mutex)
{
MCHECK(pthread_cond_init(&pcond_, NULL));
}
~Condition()
{
MCHECK(pthread_cond_destroy(&pcond_));
}
void wait()
{
MutexLock::UnassignGuard ug(mutex_);
MCHECK(pthread_cond_wait(&pcond_, mutex_.getPthreadMutex()));
}
// returns true if time out, false otherwise.
bool waitForSeconds(int seconds);
void notify()
{
MCHECK(pthread_cond_signal(&pcond_));
}
void notifyAll()
{
MCHECK(pthread_cond_broadcast(&pcond_));
}
private:
MutexLock& mutex_;
pthread_cond_t pcond_;
};
}
#endif // MUDUO_BASE_CONDITION_H
| [
"libin3-s@video02v.ops.corp.qihoo.net"
] | libin3-s@video02v.ops.corp.qihoo.net |
b6fd202b67208e4ecb245f269a2ac43d70da750b | 2aa54f4d4404cfcdf90d4b20d0043a835b90ae98 | /protocol/Greenstack/libgreenstack/Frame.cc | aecdcbec0d720c46b8dea8010894673c3517c42c | [] | no_license | premkumr/memcached | 1bf8f3e36f19e27668ee30aaece4f3f700004e4b | 743c7bed1ed5dca50f0fde75cfa7533a78ded919 | refs/heads/master | 2021-01-22T18:42:31.225911 | 2017-04-06T08:35:39 | 2017-04-06T15:03:58 | 85,103,393 | 0 | 0 | null | 2017-03-25T00:09:22 | 2017-03-15T17:46:14 | C++ | UTF-8 | C++ | false | false | 1,602 | cc | /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2015 Couchbase, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <libgreenstack/Frame.h>
#include <libgreenstack/Message.h>
#include <libgreenstack/Writer.h>
#include <libgreenstack/Reader.h>
#include <cassert>
size_t Greenstack::Frame::encode(const Message* message,
std::vector<uint8_t>& vector, size_t offset) {
VectorWriter writer(vector, offset);
size_t nb = message->encode(vector, offset + 4);
writer.write(static_cast<uint32_t>(nb));
return nb + 4;
}
Greenstack::Message* Greenstack::Frame::create(Greenstack::Reader& reader) {
if (reader.getRemainder() < 4) {
return nullptr;
}
uint32_t size;
reader.read(size);
if (reader.getRemainder() < size) {
return nullptr;
}
return Message::create(reader, size);
}
Greenstack::UniqueMessagePtr Greenstack::Frame::createUnique(
Greenstack::Reader& reader) {
return UniqueMessagePtr(create(reader));
}
| [
"trond.norbye@gmail.com"
] | trond.norbye@gmail.com |
ef97d4aafacaa4c3b06777d7cbe583a6ac0f1561 | dff5780f161834db353ee91466d04c08cd6b2631 | /Kojima_lib/RegressEquation.h | 52adbf89cb31d0688a2d0b9408c5401f5bcc60d9 | [] | no_license | kojima04/Kojima_lib | bcfe4218f1ba67a0f785576718c60bd32627f671 | de5e1aebb69c53366cf8f14b3aeabbbc2b2328ab | refs/heads/master | 2016-09-02T22:03:19.871835 | 2015-09-08T03:56:48 | 2015-09-08T03:56:48 | 42,042,912 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 595 | h | #pragma once
class CRegressEquation3
{
public:
CRegressEquation3();
~CRegressEquation3();
void SetUpNode(int index);
void SetNodePara(int index,D3DXVECTOR3 * vec3)
{
m_Node[index] = *vec3;
}
void SetRegressEquation();
float B0,B1,B2;
D3DXVECTOR3 * m_Node;
//D3DXVECTOR3 m_Node[10];
int m_NodeNum;
float GetRegressSolution(float x,float y);
float SumPrdctDeviation(int i,int j);
float SumSqrDeviation(int i);
float m_VL_SumPrdctDv[3][3];
float m_VL_SumSqrDv[3];
float m_VL_Ave[3];
float m_VL_Sum[3];
float m_VL_SumSqr[3];
float m_VL_SumPrdct[3][3];
void SetUpVL();
}; | [
"kojimay04@gmail.com"
] | kojimay04@gmail.com |
a4a6afc39704ccfa57132b27433685f4135dcf47 | 2573e6f265ea2b926f63f53961aff625cc8c819b | /cppwamp/include/cppwamp/internal/session.ipp | f418b3394eaa08cfa97cfaaa2a0c3954939f8b68 | [
"BSL-1.0"
] | permissive | ecorm/cppwamp | 424f8d057a8b8ebea10c2e5a6e1494980f502850 | d07a8e86e17ce92bac2a4d395aad1b5bae406ae3 | refs/heads/master | 2023-09-01T01:50:27.434040 | 2022-09-01T04:59:05 | 2022-09-01T04:59:05 | 29,992,524 | 42 | 9 | BSL-1.0 | 2022-05-15T21:59:40 | 2015-01-28T22:52:41 | C++ | UTF-8 | C++ | false | false | 26,024 | ipp | /*------------------------------------------------------------------------------
Copyright Butterfly Energy Systems 2014-2015, 2022.
Distributed under the Boost Software License, Version 1.0.
http://www.boost.org/LICENSE_1_0.txt
------------------------------------------------------------------------------*/
#include "../session.hpp"
#include "../api.hpp"
#include "client.hpp"
namespace wamp
{
//------------------------------------------------------------------------------
/** @copydetails Session(Executor) */
//------------------------------------------------------------------------------
CPPWAMP_INLINE Session::Ptr Session::create(
Executor exec /**< Executor used for internal I/O operations and as
a fallback for user-provided handlers. */
)
{
return Ptr(new Session(std::move(exec)));
}
//------------------------------------------------------------------------------
/** @copydetails Session(const Executor&, FallbackExecutor) */
//------------------------------------------------------------------------------
CPPWAMP_INLINE Session::Ptr Session::create(
const Executor& exec, /**< Executor from which Session will extract
a strand for its internal I/O operations. */
FallbackExecutor fallbackExec /**< Fallback executor to use for
user-provided handlers. */
)
{
return Ptr(new Session(exec, std::move(fallbackExec)));
}
//------------------------------------------------------------------------------
/** @details
The provided executor serves as a fallback when asynchronous operation
handlers don't bind a specific executor (in lieu of using the system
executor as fallback.
From the given connector(s), session will extract an execution strand for
use with its internal I/O operations.
@post `this->state() == SessionState::disconnected`
@post `this->fallbackExecutor() == exec`
@return A shared pointer to the created session object. */
//------------------------------------------------------------------------------
CPPWAMP_INLINE Session::Ptr Session::create(
FallbackExecutor fallbackExec, /**< Fallback executor for
user-provided handlers. */
LegacyConnector connector /**< Connection details for the transport
to use. */
)
{
return Ptr(new Session(std::move(fallbackExec),
ConnectorList{std::move(connector)}));
}
//------------------------------------------------------------------------------
/** @copydetails Session::create(FallbackExecutor, LegacyConnector)
@pre `connectors.empty() == false`
@post `this->state() == SessionState::disconnected`
@return A shared pointer to the created Session object.
@throws error::Logic if `connectors.empty() == true` */
//------------------------------------------------------------------------------
CPPWAMP_INLINE Session::Ptr Session::create(
FallbackExecutor fallbackExec, /**< Fallback executor with which to execute
user-provided handlers. */
ConnectorList connectors /**< A list of connection details for
the transports to use. */
)
{
CPPWAMP_LOGIC_CHECK(!connectors.empty(), "Connector list is empty");
return Ptr(new Session(std::move(fallbackExec), std::move(connectors)));
}
//------------------------------------------------------------------------------
/** @details
Session will extract a strand from the given executor for use with its
internal I/O operations. The given executor also serves as fallback
for user-provided handlers.
@post `this->fallbackExecutor() == exec` */
//------------------------------------------------------------------------------
CPPWAMP_INLINE Session::Session(
Executor exec /**< Executor for internal I/O operations, as well as
fallback for user-provided handlers. */
)
: impl_(internal::Client::create(std::move(exec)))
{}
//------------------------------------------------------------------------------
/** @details
@post `this->fallbackExecutor() == exec` */
//------------------------------------------------------------------------------
CPPWAMP_INLINE Session::Session(
const Executor& exec, /**< Executor from which Session will extract
a strand for its internal I/O operations */
FallbackExecutor fallbackExec /**< Fallback executor to use for
user-provided handlers. */
)
: impl_(internal::Client::create(exec, std::move(fallbackExec)))
{}
//------------------------------------------------------------------------------
/** @details
Automatically invokes disconnect() on the session, which drops the
connection and cancels all pending asynchronous operations. */
//------------------------------------------------------------------------------
CPPWAMP_INLINE Session::~Session()
{
// CoroSession does not define a destructor, so ~Session does not need
// to be virtual.
if (impl_)
impl_->safeDisconnect();
}
//------------------------------------------------------------------------------
/** @details
The dictionary is structured as per `HELLO.Details.roles`, as desribed in
the ["Client: Role and Feature Announcement"][1] section of the advanced
WAMP specification.
[1]: https://wamp-proto.org/_static/gen/wamp_latest_ietf.html#rfc.section.7.1.1.1 */
//------------------------------------------------------------------------------
CPPWAMP_INLINE const Object& Session::roles()
{
return internal::Client::roles();
}
//------------------------------------------------------------------------------
CPPWAMP_INLINE const IoStrand& Session::strand() const
{
return impl_->strand();
}
//------------------------------------------------------------------------------
CPPWAMP_INLINE Session::FallbackExecutor Session::fallbackExecutor() const
{
return impl_->userExecutor();
}
//------------------------------------------------------------------------------
CPPWAMP_INLINE Session::FallbackExecutor Session::userExecutor() const
{
return impl_->userExecutor();
}
//------------------------------------------------------------------------------
/** @deprecated Use wamp::Session::fallbackExecutor instead. */
//------------------------------------------------------------------------------
CPPWAMP_INLINE Session::FallbackExecutor Session::userIosvc() const
{
return fallbackExecutor();
}
//------------------------------------------------------------------------------
CPPWAMP_INLINE SessionState Session::state() const
{
return impl_->state();
}
//------------------------------------------------------------------------------
/** @details
Log events are emitted in the following situations:
- Errors: Protocol violations, message deserialization errors, unsupported
features, invalid states, inability to perform operations,
conversion errors, or transport payload overflows.
- Warnings: Problems that do not prevent operations from proceeding.
- Traces: Transmitted and received WAMP messages presented in JSON format.
Log events are discarded when there is no log handler set.
Copies of the handler are made when they are dispatched. If the handler
needs to be stateful, or is non-copyable, then pass a stateless copyable
proxy instead.
@note No state change events are fired when the session object is
terminating.
@see Session::setLogLevel */
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::setLogHandler(
LogHandler handler /**< Callable handler of type `<void (LogEntry)>`. */
)
{
impl_->setLogHandler(handler);
}
//------------------------------------------------------------------------------
/** @copydetails Session::setLogHandler(LogHandler) */
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::setLogHandler(
ThreadSafe,
LogHandler handler /**< Callable handler of type `<void (LogEntry)>`. */
)
{
impl_->safeSetLogHandler(handler);
}
//------------------------------------------------------------------------------
/** @details
The default log level is LogLevel::warning if never set.
@note This method is thread-safe.
@see Session::setLogHandler */
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::setLogLevel(LogLevel level)
{
impl_->setLogLevel(level);
}
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::setWarningHandler(
LogStringHandler handler /**< Callable handler of type `<void (std::string)>`. */
)
{
impl_->setWarningHandler(handler);
}
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::setWarningHandler(
ThreadSafe,
LogStringHandler handler /**< Callable handler of type `<void (std::string)>`. */
)
{
impl_->safeSetWarningHandler(handler);
}
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::setTraceHandler(
LogStringHandler handler /**< Callable handler of type `<void (std::string)>`. */
)
{
impl_->setTraceHandler(handler);
}
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::setTraceHandler(
ThreadSafe,
LogStringHandler handler /**< Callable handler of type `<void (std::string)>`. */
)
{
impl_->safeSetTraceHandler(handler);
}
//------------------------------------------------------------------------------
/** @details
Copies of the handler are made when they are dispatched. If the handler
needs to be stateful, or is non-copyable, then pass a stateless copyable
proxy instead.
@note No state change events are fired when the session object is
terminating. */
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::setStateChangeHandler(
StateChangeHandler handler /**< Callable handler of type `<void (SessionState)>`. */
)
{
impl_->setStateChangeHandler(handler);
}
//------------------------------------------------------------------------------
/** @copydetails Session::setStateChangeHandler(StateChangeHandler) */
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::setStateChangeHandler(
ThreadSafe,
StateChangeHandler handler /**< Callable handler of type `<void (SessionState)>`. */
)
{
impl_->safeSetStateChangeHandler(handler);
}
//------------------------------------------------------------------------------
/** @details
Copies of the handler are made when they are dispatched. If the handler
needs to be stateful, or is non-copyable, then pass a stateless copyable
proxy instead.
@note No challenge events are fired when the session object is
terminating. */
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::setChallengeHandler(
ChallengeHandler handler /**< Callable handler of type `<void (Challenge)>`. */
)
{
impl_->setChallengeHandler(handler);
}
//------------------------------------------------------------------------------
/** @copydetails Session::setChallengeHandler(ChallengeHandler) */
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::setChallengeHandler(
ThreadSafe,
ChallengeHandler handler /**< Callable handler of type `<void (Challenge)>`. */
)
{
impl_->safeSetChallengeHandler(handler);
}
//------------------------------------------------------------------------------
/** @returns `true` if the authentication was sent, a std::error_code otherwise.
@par Error Codes
- SessionErrc::payloadSizeExceeded if the resulting AUTHENTICATE message
exceeds the transport's limits.
- SessionErrc::invalidState if the session was not authenticating
during the attempt to authenticate (can be safely discarded). */
//------------------------------------------------------------------------------
CPPWAMP_INLINE ErrorOrDone Session::authenticate(
Authentication auth /**< Contains the authentication signature
and other options. */
)
{
return impl_->authenticate(std::move(auth));
}
//------------------------------------------------------------------------------
/** @copydetails Session::authenticate(Authentication)
@note It is safe to call `get()` on the returned `std::future` within the
same thread as the one used by Session::strand. */
//------------------------------------------------------------------------------
CPPWAMP_INLINE std::future<ErrorOrDone> Session::authenticate(
ThreadSafe,
Authentication auth /**< Contains the authentication signature
and other options. */
)
{
return impl_->safeAuthenticate(std::move(auth));
}
//------------------------------------------------------------------------------
/** @details
Aborts all pending asynchronous operations, invoking their handlers
with error codes indicating that cancellation has occured.
@post `this->state() == SessionState::disconnected` */
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::disconnect()
{
impl_->disconnect();
}
//------------------------------------------------------------------------------
/** @copydetails Session::disconnect */
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::disconnect(ThreadSafe)
{
impl_->safeDisconnect();
}
//------------------------------------------------------------------------------
/** @details
Terminates all pending asynchronous operations, which does **not**
invoke their handlers. This is useful when a client application needs
to shutdown abruptly and cannot enforce the lifetime of objects
accessed within the asynchronous operation handlers.
@note The warning, trace, challenge, and state change handlers will *not*
be fired again until the commencement of the next connect operation.
@post `this->state() == SessionState::disconnected` */
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::terminate()
{
impl_->terminate();
}
//------------------------------------------------------------------------------
/** @copydetails Session::terminate */
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::terminate(ThreadSafe)
{
impl_->safeTerminate();
}
//------------------------------------------------------------------------------
/** @copydetails Session::terminate */
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::reset()
{
impl_->terminate();
}
//------------------------------------------------------------------------------
/** @copydetails Session::terminate */
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::reset(ThreadSafe)
{
impl_->safeTerminate();
}
//------------------------------------------------------------------------------
/** @details
This function can be safely called during any session state. If the
subscription is no longer applicable, then this operation will
effectively do nothing.
@see Subscription, ScopedSubscription
@note Duplicate unsubscribes using the same Subscription object
are safely ignored.
@pre `bool(sub) == true`
@throws error::Logic if the given subscription is empty */
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::unsubscribe(
Subscription sub /**< The subscription to unsubscribe from. */
)
{
CPPWAMP_LOGIC_CHECK(bool(sub), "The subscription is empty");
impl_->unsubscribe(sub);
}
//------------------------------------------------------------------------------
/** @copydetails Session::unsubscribe(Subscription) */
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::unsubscribe(
ThreadSafe,
Subscription sub /**< The subscription to unsubscribe from. */
)
{
CPPWAMP_LOGIC_CHECK(bool(sub), "The subscription is empty");
impl_->safeUnsubscribe(sub);
}
//------------------------------------------------------------------------------
/** @returns `true` if the authentication was sent, a std::error_code otherwise.
@par Error Codes
- SessionErrc::payloadSizeExceeded if the resulting PUBLISH message exceeds
the transport's limits.
- SessionErrc::invalidState if the session was not established
during the attempt to publish (can be safely discarded). */
//------------------------------------------------------------------------------
CPPWAMP_INLINE ErrorOrDone Session::publish(
Pub pub /**< The publication to publish. */
)
{
return impl_->publish(std::move(pub));
}
//------------------------------------------------------------------------------
/** @copydetails Session::publish(Pub pub)
@note It is safe to call `get()` on the returned `std::future` within the
same thread as the one used by Session::strand. */
//------------------------------------------------------------------------------
CPPWAMP_INLINE std::future<ErrorOrDone> Session::publish(
ThreadSafe,
Pub pub /**< The publication to publish. */
)
{
return impl_->safePublish(std::move(pub));
}
//------------------------------------------------------------------------------
/** @details
This function can be safely called during any session state. If the
registration is no longer applicable, then this operation will
effectively do nothing.
@see Registration, ScopedRegistration
@note Duplicate unregistrations using the same Registration handle
are safely ignored.
@pre `bool(reg) == true`
@throws error::Logic if the given registration is empty */
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::unregister(
Registration reg /**< The RPC registration to unregister. */
)
{
CPPWAMP_LOGIC_CHECK(bool(reg), "The registration is empty");
impl_->unregister(reg);
}
//------------------------------------------------------------------------------
/** @copydetails Session::unregister(Registration) */
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::unregister(
ThreadSafe,
Registration reg /**< The RPC registration to unregister. */
)
{
CPPWAMP_LOGIC_CHECK(bool(reg), "The registration is empty");
impl_->safeUnregister(reg);
}
//------------------------------------------------------------------------------
/** @returns `true` or `false` depending if a pending call matching the given
chit was found.
@par Error Codes
- SessionErrc::invalidState if the session was not established
during the attempt to cancel (can be safely discarded). */
//------------------------------------------------------------------------------
CPPWAMP_INLINE ErrorOrDone Session::cancel(
CallChit chit /**< Contains the request ID of the call to cancel. */
)
{
return cancel(chit, chit.cancelMode());
}
//------------------------------------------------------------------------------
/** @copydetails Session::cancel(CallChit)
@note It is safe to call `get()` on the returned `std::future` within the
same thread as the one used by Session::strand. */
//------------------------------------------------------------------------------
CPPWAMP_INLINE std::future<ErrorOrDone> Session::cancel(
ThreadSafe,
CallChit chit /**< Contains the request ID of the call to cancel. */
)
{
return cancel(threadSafe, chit, chit.cancelMode());
}
//------------------------------------------------------------------------------
/** @copydetails Session::cancel(CallChit) */
//------------------------------------------------------------------------------
CPPWAMP_INLINE ErrorOrDone Session::cancel(
CallChit chit, /**< Contains the request ID of the call to cancel. */
CallCancelMode mode /**< The mode with which to cancel the call. */
)
{
return impl_->cancelCall(chit.requestId(), mode);
}
//------------------------------------------------------------------------------
/** @copydetails Session::cancel(ThreadSafe, CallChit) */
//------------------------------------------------------------------------------
CPPWAMP_INLINE std::future<ErrorOrDone> Session::cancel(
ThreadSafe,
CallChit chit, /**< Contains the request ID of the call to cancel. */
CallCancelMode mode /**< The mode with which to cancel the call. */
)
{
return impl_->safeCancelCall(chit.requestId(), mode);
}
//------------------------------------------------------------------------------
/** @copydetails Session::cancel(CallChit) */
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::cancel(
CallCancellation cancellation /**< Contains the request ID
and other options. */
)
{
(void)impl_->cancelCall(cancellation.requestId(), cancellation.mode());
}
//------------------------------------------------------------------------------
/** @copydetails Session::cancel(CallChit, CallCancelMode) */
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::cancel(
ThreadSafe,
CallCancellation cancellation /**< Contains the request ID
and other options. */
)
{
impl_->safeCancelCall(cancellation.requestId(), cancellation.mode());
}
//------------------------------------------------------------------------------
CPPWAMP_INLINE Session::Session(FallbackExecutor fallbackExec,
ConnectorList connectors)
: legacyConnectors_(std::move(connectors)),
impl_(internal::Client::create(
boost::asio::make_strand(legacyConnectors_.at(0).executor()),
std::move(fallbackExec)))
{}
//------------------------------------------------------------------------------
CPPWAMP_INLINE void Session::doConnect(ConnectionWishList&& w, CompletionHandler<size_t>&& f)
{impl_->connect(std::move(w), std::move(f));}
CPPWAMP_INLINE void Session::safeConnect(ConnectionWishList&& w, CompletionHandler<size_t>&& f)
{impl_->safeConnect(std::move(w), std::move(f));}
CPPWAMP_INLINE void Session::doJoin(Realm&& r, CompletionHandler<SessionInfo>&& f)
{impl_->join(std::move(r), std::move(f));}
CPPWAMP_INLINE void Session::safeJoin(Realm&& r, CompletionHandler<SessionInfo>&& f)
{impl_->safeJoin(std::move(r), std::move(f));}
CPPWAMP_INLINE void Session::doLeave(Reason&& r, CompletionHandler<Reason>&& f)
{impl_->leave(std::move(r), std::move(f));}
CPPWAMP_INLINE void Session::safeLeave(Reason&& r, CompletionHandler<Reason>&& f)
{impl_->safeLeave(std::move(r), std::move(f));}
CPPWAMP_INLINE void Session::doSubscribe(Topic&& t, EventSlot&& s,
CompletionHandler<Subscription>&& f)
{impl_->subscribe(std::move(t), std::move(s), std::move(f));}
CPPWAMP_INLINE void Session::safeSubscribe(Topic&& t, EventSlot&& s,
CompletionHandler<Subscription>&& f)
{impl_->safeSubscribe(std::move(t), std::move(s), std::move(f));}
CPPWAMP_INLINE void Session::doUnsubscribe(const Subscription& s, CompletionHandler<bool>&& f)
{impl_->unsubscribe(std::move(s), std::move(f));}
CPPWAMP_INLINE void Session::safeUnsubscribe(const Subscription& s, CompletionHandler<bool>&& f)
{impl_->safeUnsubscribe(std::move(s), std::move(f));}
CPPWAMP_INLINE void Session::doPublish(Pub&& p, CompletionHandler<PublicationId>&& f)
{impl_->publish(std::move(p), std::move(f));}
CPPWAMP_INLINE void Session::safePublish(Pub&& p, CompletionHandler<PublicationId>&& f)
{impl_->safePublish(std::move(p), std::move(f));}
CPPWAMP_INLINE void Session::doEnroll(Procedure&& p, CallSlot&& c, InterruptSlot&& i,
CompletionHandler<Registration>&& f)
{impl_->enroll(std::move(p), std::move(c), std::move(i), std::move(f));}
CPPWAMP_INLINE void Session::safeEnroll(Procedure&& p, CallSlot&& c, InterruptSlot&& i,
CompletionHandler<Registration>&& f)
{impl_->safeEnroll(std::move(p), std::move(c), std::move(i), std::move(f));}
CPPWAMP_INLINE void Session::doUnregister(const Registration& r, CompletionHandler<bool>&& f)
{impl_->unregister(std::move(r), std::move(f));}
CPPWAMP_INLINE void Session::safeUnregister(const Registration& r, CompletionHandler<bool>&& f)
{impl_->safeUnregister(r, std::move(f));}
CPPWAMP_INLINE void Session::doOneShotCall(Rpc&& r, CallChit* c, CompletionHandler<Result>&& f)
{impl_->oneShotCall(std::move(r), c, std::move(f));}
CPPWAMP_INLINE void Session::safeOneShotCall(Rpc&& r, CallChit* c, CompletionHandler<Result>&& f)
{impl_->safeOneShotCall(std::move(r), c, std::move(f));}
CPPWAMP_INLINE void Session::doOngoingCall(Rpc&& r, CallChit* c, OngoingCallHandler&& f)
{impl_->ongoingCall(std::move(r), c, std::move(f));}
CPPWAMP_INLINE void Session::safeOngoingCall(Rpc&& r, CallChit* c, OngoingCallHandler&& f)
{impl_->safeOngoingCall(std::move(r), c, std::move(f));}
} // namespace wamp
| [
"ecorm@users.noreply.github.com"
] | ecorm@users.noreply.github.com |
bcffaf73f299af37019d524bb731a93e43220db9 | 4a21fd10b9ee9e84ee3c88cf9d98e029a74b3710 | /app/GL/GLShapeElement.h | ec8c395c47d6f5f130989d4ebcabdb281b1a3b12 | [
"MIT"
] | permissive | 0x50Fc/kk-game | bb114c22162b9c94932cfb63488c91010f3e3721 | 56463c13347a5608e54ae0a069b0b9263f32d7c8 | refs/heads/master | 2022-08-04T14:17:10.879769 | 2018-10-31T03:14:47 | 2018-10-31T03:14:47 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 669 | h | //
// GLShapeElement.h
// KKGame
//
// Created by zhanghailong on 2018/4/27.
// Copyright © 2018年 kkmofang.cn. All rights reserved.
//
#ifndef GLShapeElement_h
#define GLShapeElement_h
#include "GLContext.h"
namespace kk {
namespace GL {
class ShapeElement : public Element {
public:
virtual void changedKey(String& key);
virtual void onDraw(Context * context);
vec4 color;
KK_DEF_ELEMENT_CREATE(ShapeElement)
DEF_SCRIPT_CLASS_NOALLOC
protected:
};
}
}
#endif /* GLShapeElement_hpp */
| [
"hailong11@staff.weibo.com"
] | hailong11@staff.weibo.com |
22356c8d074acd7aa9a37f00c109fb53e55ea64b | baae2eda20f6777f93d155fcc10b8ebd296aba41 | /code/particle/effects/CompositeEffect.h | 1c1473087497c9ecc8fc688f3eaf8303268b0150 | [] | no_license | rodrigobmg/fs2open.github.com | 62ec24927ffacbc2126c9ab6445b8ed08e748f56 | ae17e3f4b7f956cff92c5d2dc2c46f73b142e193 | refs/heads/master | 2020-03-10T02:28:54.759459 | 2018-04-09T15:08:27 | 2018-04-09T15:08:27 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 847 | h | #ifndef COMPOSIE_EFFECT_H
#define COMPOSIE_EFFECT_H
#pragma once
#include "globalincs/pstypes.h"
#include "particle/ParticleEffect.h"
#include "particle/ParticleManager.h"
#include "utils/RandomRange.h"
namespace particle {
namespace effects {
/**
* @ingroup particleEffects
*/
class CompositeEffect: public ParticleEffect {
private:
SCP_vector<ParticleEffectPtr> m_childEffects;
public:
explicit CompositeEffect(const SCP_string& name);
virtual bool processSource(const ParticleSource* source) override;
virtual void parseValues(bool nocreate) override;
virtual void pageIn() override;
virtual EffectType getType() const override { return EffectType::Composite; }
const SCP_vector<ParticleEffectPtr>& getEffects() const { return m_childEffects; }
void addEffect(ParticleEffectPtr effect);
};
}
}
#endif // COMPOSIE_EFFECT_H
| [
"asarium@gmail.com"
] | asarium@gmail.com |
ecbe7fdcd8d80011c867dc11e466a98a4f14829f | 78918391a7809832dc486f68b90455c72e95cdda | /boost_lib/boost/fusion/support/unused.hpp | deaa39f2fb0fd7c291a8d0a94b9876f8a21515b4 | [
"MIT",
"BSL-1.0"
] | permissive | kyx0r/FA_Patcher | 50681e3e8bb04745bba44a71b5fd04e1004c3845 | 3f539686955249004b4483001a9e49e63c4856ff | refs/heads/master | 2022-03-28T10:03:28.419352 | 2020-01-02T09:16:30 | 2020-01-02T09:16:30 | 141,066,396 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,073 | hpp | /*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(BOOST_FUSION_SUPPORT_UNUSED_20070305_1038)
#define BOOST_FUSION_SUPPORT_UNUSED_20070305_1038
#include <boost/fusion/support/config.hpp>
#include <iosfwd>
#include <boost/config.hpp>
#if defined(BOOST_MSVC)
# pragma warning(push)
# pragma warning(disable: 4522) // multiple assignment operators specified warning
#endif
#define BOOST_FUSION_UNUSED_HAS_IO
namespace boost
{
namespace fusion
{
struct unused_type
{
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
unused_type() BOOST_NOEXCEPT
{
}
template <typename T>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
unused_type(T const&) BOOST_NOEXCEPT
{
}
template <typename T>
BOOST_FUSION_CONSTEXPR_THIS BOOST_FUSION_GPU_ENABLED
unused_type const&
operator=(T const&) const BOOST_NOEXCEPT
{
return *this;
}
template <typename T>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
unused_type&
operator=(T const&) BOOST_NOEXCEPT
{
return *this;
}
BOOST_FUSION_CONSTEXPR_THIS BOOST_FUSION_GPU_ENABLED
unused_type const&
operator=(unused_type const&) const BOOST_NOEXCEPT
{
return *this;
}
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
unused_type&
operator=(unused_type const&) BOOST_NOEXCEPT
{
return *this;
}
};
BOOST_CONSTEXPR_OR_CONST unused_type unused = unused_type();
namespace detail
{
struct unused_only
{
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
unused_only(unused_type const&) BOOST_NOEXCEPT {}
};
}
BOOST_CONSTEXPR
inline std::ostream& operator<<(std::ostream& out, detail::unused_only const&) BOOST_NOEXCEPT
{
return out;
}
BOOST_CONSTEXPR
inline std::istream& operator>>(std::istream& in, unused_type&) BOOST_NOEXCEPT
{
return in;
}
}
}
#if defined(BOOST_MSVC)
# pragma warning(pop)
#endif
#endif
| [
"k.melekhin@gmail.com"
] | k.melekhin@gmail.com |
66a240d15265308b2801398291c80090c03594f0 | 1bf8b46afad5402fe6fa74293b464e1ca5ee5fd7 | /SDK/BP_GamePadShoulderSetAsset_functions.cpp | 3aeef1f70f133bd35b76c0f01889cd5c8d8225f4 | [] | no_license | LemonHaze420/ShenmueIIISDK | a4857eebefc7e66dba9f667efa43301c5efcdb62 | 47a433b5e94f171bbf5256e3ff4471dcec2c7d7e | refs/heads/master | 2021-06-30T17:33:06.034662 | 2021-01-19T20:33:33 | 2021-01-19T20:33:33 | 214,824,713 | 4 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,208 | cpp |
#include "../SDK.h"
// Name: Shenmue3SDK, Version: 1.4.1
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
namespace SDK
{
//---------------------------------------------------------------------------
// Functions
//---------------------------------------------------------------------------
// Function BP_GamePadShoulderSetAsset.BP_GamePadShoulderSetAsset_C.GetImage
// (Public, HasOutParms, BlueprintCallable, BlueprintEvent, Const)
// Parameters:
// TEnumAsByte<EGamepadShoulder> Button (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData)
// class UTexture2D* ReturnValue (Parm, OutParm, ZeroConstructor, ReturnParm, IsPlainOldData)
class UTexture2D* UBP_GamePadShoulderSetAsset_C::GetImage(TEnumAsByte<EGamepadShoulder> Button)
{
static auto fn = UObject::FindObject<UFunction>("Function BP_GamePadShoulderSetAsset.BP_GamePadShoulderSetAsset_C.GetImage");
UBP_GamePadShoulderSetAsset_C_GetImage_Params params;
params.Button = Button;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
return params.ReturnValue;
}
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
| [
"35783139+LemonHaze420@users.noreply.github.com"
] | 35783139+LemonHaze420@users.noreply.github.com |
558e066527194532e31051a796b19b68b383019a | e9da060baee22bacd0974e4a54d94701c478d384 | /Programming Assignment 3/BattleArena.h | 5d62d6e789905d86367bd780d24c7e2d92a4e286 | [] | no_license | SamKrasnoff/EC_327 | ca47be160a1119ce0dd5635902fb83f74b53d865 | 78b95631b7fe9be88967da7e150da185a1ad41dd | refs/heads/master | 2022-04-07T19:22:36.491480 | 2020-02-27T03:30:30 | 2020-02-27T03:30:30 | 213,062,873 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 643 | h | #ifndef BATTLEARENA_H
#define BATTLEARENA_H
class BattleArena: public Building{
public:
enum BattleArenaStates{
RIVALS_AVAILABLE = 0,
NO_RIVALS_AVAILABLE = 1
};
BattleArena();
BattleArena(unsigned int max_rivals, unsigned int stamina_cost, double dollar_cost, int in_id, Point2D loc):Building('A',in_id, loc);
unsigned int GetNumRivalsRemaining();
bool
private:
unsigned int max_num_rivals;
unsigned int num_rivals_remaining;
double dollar_cost_per_fight;
unsigned int stamina_cost_per_fight;
unsigned int pokemon_count;
} | [
"krasnoff@bu.edu"
] | krasnoff@bu.edu |
7c5db880526fb930f704c6fb43d7838164f582be | 0577a46d8d28e1fd8636893bbdd2b18270bb8eb8 | /update_notifier/thirdparty/wxWidgets/include/wx/confbase.h | 731f9cbad3b553e20e5b4f1eb40196508750afe9 | [
"BSD-3-Clause"
] | permissive | ric2b/Vivaldi-browser | 388a328b4cb838a4c3822357a5529642f86316a5 | 87244f4ee50062e59667bf8b9ca4d5291b6818d7 | refs/heads/master | 2022-12-21T04:44:13.804535 | 2022-12-17T16:30:35 | 2022-12-17T16:30:35 | 86,637,416 | 166 | 41 | BSD-3-Clause | 2021-03-31T18:49:30 | 2017-03-29T23:09:05 | null | UTF-8 | C++ | false | false | 18,415 | h | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/confbase.h
// Purpose: declaration of the base class of all config implementations
// (see also: fileconf.h and msw/regconf.h and iniconf.h)
// Author: Karsten Ballueder & Vadim Zeitlin
// Modified by:
// Created: 07.04.98 (adapted from appconf.h)
// Copyright: (c) 1997 Karsten Ballueder Ballueder@usa.net
// Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CONFBASE_H_
#define _WX_CONFBASE_H_
#include "wx/defs.h"
#include "wx/string.h"
#include "wx/object.h"
#include "wx/base64.h"
class WXDLLIMPEXP_FWD_BASE wxArrayString;
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
/// shall we be case sensitive in parsing variable names?
#ifndef wxCONFIG_CASE_SENSITIVE
#define wxCONFIG_CASE_SENSITIVE 0
#endif
/// separates group and entry names (probably shouldn't be changed)
#ifndef wxCONFIG_PATH_SEPARATOR
#define wxCONFIG_PATH_SEPARATOR wxT('/')
#endif
/// introduces immutable entries
// (i.e. the ones which can't be changed from the local config file)
#ifndef wxCONFIG_IMMUTABLE_PREFIX
#define wxCONFIG_IMMUTABLE_PREFIX wxT('!')
#endif
#if wxUSE_CONFIG
/// should we use registry instead of configuration files under Windows?
// (i.e. whether wxConfigBase::Create() will create a wxFileConfig (if it's
// false) or wxRegConfig (if it's true and we're under Win32))
#ifndef wxUSE_CONFIG_NATIVE
#define wxUSE_CONFIG_NATIVE 1
#endif
// not all compilers can deal with template Read/Write() methods, define this
// symbol if the template functions are available
#if !defined( __VMS ) && \
!(defined(__HP_aCC) && defined(__hppa))
#define wxHAS_CONFIG_TEMPLATE_RW
#endif
// Style flags for constructor style parameter
enum
{
wxCONFIG_USE_LOCAL_FILE = 1,
wxCONFIG_USE_GLOBAL_FILE = 2,
wxCONFIG_USE_RELATIVE_PATH = 4,
wxCONFIG_USE_NO_ESCAPE_CHARACTERS = 8,
wxCONFIG_USE_SUBDIR = 16
};
// ----------------------------------------------------------------------------
// abstract base class wxConfigBase which defines the interface for derived
// classes
//
// wxConfig organizes the items in a tree-like structure (modelled after the
// Unix/Dos filesystem). There are groups (directories) and keys (files).
// There is always one current group given by the current path.
//
// Keys are pairs "key_name = value" where value may be of string or integer
// (long) type (TODO doubles and other types such as wxDate coming soon).
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_BASE wxConfigBase : public wxObject
{
public:
// constants
// the type of an entry
enum EntryType
{
Type_Unknown,
Type_String,
Type_Boolean,
Type_Integer, // use Read(long *)
Type_Float // use Read(double *)
};
// static functions
// sets the config object, returns the previous pointer
static wxConfigBase *Set(wxConfigBase *pConfig);
// get the config object, creates it on demand unless DontCreateOnDemand
// was called
static wxConfigBase *Get(bool createOnDemand = true)
{ if ( createOnDemand && (!ms_pConfig) ) Create(); return ms_pConfig; }
// create a new config object: this function will create the "best"
// implementation of wxConfig available for the current platform, see
// comments near definition wxUSE_CONFIG_NATIVE for details. It returns
// the created object and also sets it as ms_pConfig.
static wxConfigBase *Create();
// should Get() try to create a new log object if the current one is NULL?
static void DontCreateOnDemand() { ms_bAutoCreate = false; }
// ctor & virtual dtor
// ctor (can be used as default ctor too)
//
// Not all args will always be used by derived classes, but including
// them all in each class ensures compatibility. If appName is empty,
// uses wxApp name
wxConfigBase(const wxString& appName = wxEmptyString,
const wxString& vendorName = wxEmptyString,
const wxString& localFilename = wxEmptyString,
const wxString& globalFilename = wxEmptyString,
long style = 0);
// empty but ensures that dtor of all derived classes is virtual
virtual ~wxConfigBase();
// path management
// set current path: if the first character is '/', it's the absolute path,
// otherwise it's a relative path. '..' is supported. If the strPath
// doesn't exist it is created.
virtual void SetPath(const wxString& strPath) = 0;
// retrieve the current path (always as absolute path)
virtual const wxString& GetPath() const = 0;
// enumeration: all functions here return false when there are no more items.
// you must pass the same lIndex to GetNext and GetFirst (don't modify it)
// enumerate subgroups
virtual bool GetFirstGroup(wxString& str, long& lIndex) const = 0;
virtual bool GetNextGroup (wxString& str, long& lIndex) const = 0;
// enumerate entries
virtual bool GetFirstEntry(wxString& str, long& lIndex) const = 0;
virtual bool GetNextEntry (wxString& str, long& lIndex) const = 0;
// get number of entries/subgroups in the current group, with or without
// it's subgroups
virtual size_t GetNumberOfEntries(bool bRecursive = false) const = 0;
virtual size_t GetNumberOfGroups(bool bRecursive = false) const = 0;
// tests of existence
// returns true if the group by this name exists
virtual bool HasGroup(const wxString& strName) const = 0;
// same as above, but for an entry
virtual bool HasEntry(const wxString& strName) const = 0;
// returns true if either a group or an entry with a given name exist
bool Exists(const wxString& strName) const
{ return HasGroup(strName) || HasEntry(strName); }
// get the entry type
virtual EntryType GetEntryType(const wxString& name) const
{
// by default all entries are strings
return HasEntry(name) ? Type_String : Type_Unknown;
}
// key access: returns true if value was really read, false if default used
// (and if the key is not found the default value is returned.)
// read a string from the key
bool Read(const wxString& key, wxString *pStr) const;
bool Read(const wxString& key, wxString *pStr, const wxString& defVal) const;
// read a number (long)
bool Read(const wxString& key, long *pl) const;
bool Read(const wxString& key, long *pl, long defVal) const;
// read an int (wrapper around `long' version)
bool Read(const wxString& key, int *pi) const;
bool Read(const wxString& key, int *pi, int defVal) const;
// read a double
bool Read(const wxString& key, double* val) const;
bool Read(const wxString& key, double* val, double defVal) const;
// read a float
bool Read(const wxString& key, float* val) const;
bool Read(const wxString& key, float* val, float defVal) const;
// read a bool
bool Read(const wxString& key, bool* val) const;
bool Read(const wxString& key, bool* val, bool defVal) const;
// read a 64-bit number when long is 32 bits
#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
bool Read(const wxString& key, wxLongLong_t *pl) const;
bool Read(const wxString& key, wxLongLong_t *pl, wxLongLong_t defVal) const;
#endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
bool Read(const wxString& key, size_t* val) const;
bool Read(const wxString& key, size_t* val, size_t defVal) const;
#if wxUSE_BASE64
// read a binary data block
bool Read(const wxString& key, wxMemoryBuffer* data) const
{ return DoReadBinary(key, data); }
// no default version since it does not make sense for binary data
#endif // wxUSE_BASE64
#ifdef wxHAS_CONFIG_TEMPLATE_RW
// read other types, for which wxFromString is defined
template <typename T>
bool Read(const wxString& key, T* value) const
{
wxString s;
if ( !Read(key, &s) )
return false;
return wxFromString(s, value);
}
template <typename T>
bool Read(const wxString& key, T* value, const T& defVal) const
{
const bool found = Read(key, value);
if ( !found )
{
if (IsRecordingDefaults())
const_cast<wxConfigBase*>(this)->Write(key, defVal);
*value = defVal;
}
return found;
}
#endif // wxHAS_CONFIG_TEMPLATE_RW
// convenience functions returning directly the value
wxString Read(const wxString& key,
const wxString& defVal = wxEmptyString) const
{ wxString s; (void)Read(key, &s, defVal); return s; }
// we have to provide a separate version for C strings as otherwise the
// template Read() would be used
#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
wxString Read(const wxString& key, const char* defVal) const
{ return Read(key, wxString(defVal)); }
#endif
wxString Read(const wxString& key, const wchar_t* defVal) const
{ return Read(key, wxString(defVal)); }
long ReadLong(const wxString& key, long defVal) const
{ long l; (void)Read(key, &l, defVal); return l; }
wxLongLong_t ReadLongLong(const wxString& key, wxLongLong_t defVal) const
{ wxLongLong_t ll; (void)Read(key, &ll, defVal); return ll; }
double ReadDouble(const wxString& key, double defVal) const
{ double d; (void)Read(key, &d, defVal); return d; }
bool ReadBool(const wxString& key, bool defVal) const
{ bool b; (void)Read(key, &b, defVal); return b; }
template <typename T>
T ReadObject(const wxString& key, T const& defVal) const
{ T t; (void)Read(key, &t, defVal); return t; }
// for compatibility with wx 2.8
long Read(const wxString& key, long defVal) const
{ return ReadLong(key, defVal); }
// write the value (return true on success)
bool Write(const wxString& key, const wxString& value)
{ return DoWriteString(key, value); }
bool Write(const wxString& key, long value)
{ return DoWriteLong(key, value); }
bool Write(const wxString& key, double value)
{ return DoWriteDouble(key, value); }
bool Write(const wxString& key, bool value)
{ return DoWriteBool(key, value); }
#if wxUSE_BASE64
bool Write(const wxString& key, const wxMemoryBuffer& buf)
{ return DoWriteBinary(key, buf); }
#endif // wxUSE_BASE64
// we have to provide a separate version for C strings as otherwise they
// would be converted to bool and not to wxString as expected!
#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
bool Write(const wxString& key, const char *value)
{ return Write(key, wxString(value)); }
bool Write(const wxString& key, const unsigned char *value)
{ return Write(key, wxString(value)); }
#endif
bool Write(const wxString& key, const wchar_t *value)
{ return Write(key, wxString(value)); }
// we also have to provide specializations for other types which we want to
// handle using the specialized DoWriteXXX() instead of the generic template
// version below
bool Write(const wxString& key, char value)
{ return DoWriteLong(key, value); }
bool Write(const wxString& key, unsigned char value)
{ return DoWriteLong(key, value); }
bool Write(const wxString& key, short value)
{ return DoWriteLong(key, value); }
bool Write(const wxString& key, unsigned short value)
{ return DoWriteLong(key, value); }
bool Write(const wxString& key, unsigned int value)
{ return DoWriteLong(key, value); }
bool Write(const wxString& key, int value)
{ return DoWriteLong(key, value); }
bool Write(const wxString& key, unsigned long value)
{ return DoWriteLong(key, value); }
#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
bool Write(const wxString& key, wxLongLong_t value)
{ return DoWriteLongLong(key, value); }
bool Write(const wxString& key, wxULongLong_t value)
{ return DoWriteLongLong(key, value); }
#endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
bool Write(const wxString& key, float value)
{ return DoWriteDouble(key, double(value)); }
// Causes ambiguities in under OpenVMS
#if !defined( __VMS )
// for other types, use wxToString()
template <typename T>
bool Write(const wxString& key, T const& value)
{ return Write(key, wxToString(value)); }
#endif
// permanently writes all changes
virtual bool Flush(bool bCurrentOnly = false) = 0;
// renaming, all functions return false on failure (probably because the new
// name is already taken by an existing entry)
// rename an entry
virtual bool RenameEntry(const wxString& oldName,
const wxString& newName) = 0;
// rename a group
virtual bool RenameGroup(const wxString& oldName,
const wxString& newName) = 0;
// delete entries/groups
// deletes the specified entry and the group it belongs to if
// it was the last key in it and the second parameter is true
virtual bool DeleteEntry(const wxString& key,
bool bDeleteGroupIfEmpty = true) = 0;
// delete the group (with all subgroups)
virtual bool DeleteGroup(const wxString& key) = 0;
// delete the whole underlying object (disk file, registry key, ...)
// primarily for use by uninstallation routine.
virtual bool DeleteAll() = 0;
// options
// we can automatically expand environment variables in the config entries
// (this option is on by default, you can turn it on/off at any time)
bool IsExpandingEnvVars() const { return m_bExpandEnvVars; }
void SetExpandEnvVars(bool bDoIt = true) { m_bExpandEnvVars = bDoIt; }
// recording of default values
void SetRecordDefaults(bool bDoIt = true) { m_bRecordDefaults = bDoIt; }
bool IsRecordingDefaults() const { return m_bRecordDefaults; }
// does expansion only if needed
wxString ExpandEnvVars(const wxString& str) const;
// misc accessors
wxString GetAppName() const { return m_appName; }
wxString GetVendorName() const { return m_vendorName; }
// Used wxIniConfig to set members in constructor
void SetAppName(const wxString& appName) { m_appName = appName; }
void SetVendorName(const wxString& vendorName) { m_vendorName = vendorName; }
void SetStyle(long style) { m_style = style; }
long GetStyle() const { return m_style; }
protected:
static bool IsImmutable(const wxString& key)
{ return !key.IsEmpty() && key[0] == wxCONFIG_IMMUTABLE_PREFIX; }
// return the path without trailing separator, if any: this should be called
// to sanitize paths referring to the group names before passing them to
// wxConfigPathChanger as "/foo/bar/" should be the same as "/foo/bar" and it
// isn't interpreted in the same way by it (and this can't be changed there
// as it's not the same for the entries names)
static wxString RemoveTrailingSeparator(const wxString& key);
// do read/write the values of different types
virtual bool DoReadString(const wxString& key, wxString *pStr) const = 0;
virtual bool DoReadLong(const wxString& key, long *pl) const = 0;
#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
virtual bool DoReadLongLong(const wxString& key, wxLongLong_t *pll) const;
#endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
virtual bool DoReadDouble(const wxString& key, double* val) const;
virtual bool DoReadBool(const wxString& key, bool* val) const;
#if wxUSE_BASE64
virtual bool DoReadBinary(const wxString& key, wxMemoryBuffer* buf) const = 0;
#endif // wxUSE_BASE64
virtual bool DoWriteString(const wxString& key, const wxString& value) = 0;
virtual bool DoWriteLong(const wxString& key, long value) = 0;
#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
virtual bool DoWriteLongLong(const wxString& key, wxLongLong_t value);
#endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
virtual bool DoWriteDouble(const wxString& key, double value);
virtual bool DoWriteBool(const wxString& key, bool value);
#if wxUSE_BASE64
virtual bool DoWriteBinary(const wxString& key, const wxMemoryBuffer& buf) = 0;
#endif // wxUSE_BASE64
private:
// are we doing automatic environment variable expansion?
bool m_bExpandEnvVars;
// do we record default values?
bool m_bRecordDefaults;
// static variables
static wxConfigBase *ms_pConfig;
static bool ms_bAutoCreate;
// Application name and organisation name
wxString m_appName;
wxString m_vendorName;
// Style flag
long m_style;
wxDECLARE_ABSTRACT_CLASS(wxConfigBase);
};
// a handy little class which changes current path to the path of given entry
// and restores it in dtor: so if you declare a local variable of this type,
// you work in the entry directory and the path is automatically restored
// when the function returns
// Taken out of wxConfig since not all compilers can cope with nested classes.
class WXDLLIMPEXP_BASE wxConfigPathChanger
{
public:
// ctor/dtor do path changing/restoring of the path
wxConfigPathChanger(const wxConfigBase *pContainer, const wxString& strEntry);
~wxConfigPathChanger();
// get the key name
const wxString& Name() const { return m_strName; }
// this method must be called if the original path (i.e. the current path at
// the moment of creation of this object) could have been deleted to prevent
// us from restoring the not existing (any more) path
//
// if the original path doesn't exist any more, the path will be restored to
// the deepest still existing component of the old path
void UpdateIfDeleted();
private:
wxConfigBase *m_pContainer; // object we live in
wxString m_strName, // name of entry (i.e. name only)
m_strOldPath; // saved path
bool m_bChanged; // was the path changed?
wxDECLARE_NO_COPY_CLASS(wxConfigPathChanger);
};
#endif // wxUSE_CONFIG
/*
Replace environment variables ($SOMETHING) with their values. The format is
$VARNAME or ${VARNAME} where VARNAME contains alphanumeric characters and
'_' only. '$' must be escaped ('\$') in order to be taken literally.
*/
WXDLLIMPEXP_BASE wxString wxExpandEnvVars(const wxString &sz);
/*
Split path into parts removing '..' in progress
*/
WXDLLIMPEXP_BASE void wxSplitPath(wxArrayString& aParts, const wxString& path);
#endif // _WX_CONFBASE_H_
| [
"mathieu.caroff@free.fr"
] | mathieu.caroff@free.fr |
529a8ecba99ef67a9a88acc673a7b9dd7b9c1149 | 43ae0d65a9acbfbfe8c36e158e1a590f6db02ad5 | /jni/WiEngine/impl/common/wyObject.cpp | a72b34e5015f21eea84fc2c27f774fe5d66394c8 | [
"MIT"
] | permissive | identy/WiEngine | bfd0f5b95f0be72274e1dfb341d732d4a571993c | 2fb4276f558a5b1660d940b982c591cb7c73aec8 | refs/heads/master | 2020-12-25T01:27:01.452216 | 2013-04-22T03:22:24 | 2013-04-22T03:22:24 | 9,659,254 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,624 | cpp | /*
* Copyright (c) 2010 WiYun Inc.
* Author: luma(stubma@gmail.com)
*
* For all entities this program is free software; you can redistribute
* it and/or modify it under the terms of the 'WiEngine' license with
* the additional provision that 'WiEngine' must be credited in a manner
* that can be be observed by end users, for example, in the credits or during
* start up. (please find WiEngine logo in sdk's logo folder)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "wyObject.h"
#include <stdlib.h>
#include "wyHashSet.h"
#include "wyLog.h"
#include <pthread.h>
#include "wyTargetSelector.h"
#include <typeinfo>
#include "wyTextureManager.h"
#include "wyEventDispatcher.h"
#include "wyAutoReleasePool.h"
#include "wyUtils.h"
#include <string>
using namespace std;
extern pthread_mutex_t gMutex;
#if ANDROID
#include "wyUtils_android.h"
extern jmethodID g_mid_BaseWYObject_onTargetSelectorInvoked;
#endif
// release pools
static wyArray* sAutoReleasePool = NULL;
static wyArray* sLazyReleasePool = NULL;
// only needed when memory tracking is enabled
#ifdef WY_CFLAG_MEMORY_TRACKING
static wyArray* sLeakPool = NULL;
#endif
wyObject::wyObject() :
m_retainCount(1),
#if ANDROID
m_jTSConnector(NULL),
#endif
m_name(NULL) {
#ifdef WY_CFLAG_MEMORY_TRACKING
if(sLeakPool != NULL)
wyArrayPush(sLeakPool, this);
#endif
}
wyObject::~wyObject() {
#ifdef WY_CFLAG_DESTROY_TRACE
const char* name = getClassName();
if(name != NULL)
LOGD("Destroyed: %s, %d", name, this);
#endif
#ifdef WY_CFLAG_MEMORY_TRACKING
if(sLeakPool != NULL)
wyArrayDeleteObj(sLeakPool, this, NULL, NULL);
#endif
#if ANDROID
if(m_jTSConnector) {
JNIEnv* env = wyUtils::getJNIEnv();
env->DeleteGlobalRef(m_jTSConnector);
m_jTSConnector = NULL;
}
#endif
if(m_name)
wyFree((void*)m_name);
}
const char* wyObject::getClassName() {
char* name = (char*)typeid(*this).name();
while('0' <= *name && *name <= '9')
name++;
return (const char*)name;
}
wyObject* wyObject::retain() {
m_retainCount++;
#ifdef WY_CFLAG_RETAIN_TRACE
const char* name = getClassName();
if(name != NULL)
LOGD("Retained: %s, %d, %d", name, this, m_retainCount);
#endif
return this;
}
void wyObject::javaRelease() {
// we need find the object in lazy release pool, if found, decrease retain count
int index = wyArrayIndexOf(sLazyReleasePool, this, NULL, NULL);
if(index != -1) {
wyArrayDeleteIndex(sLazyReleasePool, index);
autoRelease();
}
}
void wyObject::release() {
if(m_retainCount <= 0)
return;
m_retainCount--;
#ifdef WY_CFLAG_RELEASE_TRACE
const char* name = getClassName();
if(name != NULL)
LOGD("Released: %s, %d, %d", name, this, m_retainCount);
#endif
if(m_retainCount <= 0)
WYDELETE(this);
}
wyObject* wyObject::lazyRelease() {
if(sLazyReleasePool != NULL) {
wyArrayPush(sLazyReleasePool, this);
}
return this;
}
wyObject* wyObject::autoRelease() {
if(isGLThread()) {
if(sAutoReleasePool != NULL)
wyArrayPush(sAutoReleasePool, this);
} else {
wyAutoReleasePool::addToPool(this);
}
return this;
}
int wyObject::getRetainCount() {
return m_retainCount;
}
void wyObject::onTargetSelectorInvoked(wyTargetSelector* ts) {
#if ANDROID
if(m_jTSConnector) {
JNIEnv* env = wyUtils::getJNIEnv();
env->CallVoidMethod(m_jTSConnector, g_mid_BaseWYObject_onTargetSelectorInvoked, ts->getId(), ts->getDelta());
}
#endif
}
void wyObject::setName(const char* name) {
if(m_name)
wyFree((void*)m_name);
m_name = wyUtils::copy(name);
}
#if ANDROID
void wyObject::setJavaTSConnector(jobject c) {
JNIEnv* env = wyUtils::getJNIEnv();
if(m_jTSConnector) {
env->DeleteGlobalRef(m_jTSConnector);
m_jTSConnector = NULL;
}
if(c) {
m_jTSConnector = env->NewGlobalRef(c);
}
}
#endif // #if ANDROID
#ifdef __cplusplus
extern "C" {
#endif
wyObject* wyObjectRetain(wyObject* obj) {
if(obj == NULL)
return NULL;
obj->retain();
return obj;
}
wyObject* wyObjectAutoRelease(wyObject* obj) {
if(obj == NULL)
return NULL;
obj->autoRelease();
return obj;
}
wyObject* wyObjectLazyRelease(wyObject* obj) {
if(obj == NULL)
return NULL;
obj->lazyRelease();
return obj;
}
void wyObjectRelease(wyObject* obj) {
if(obj != NULL) {
obj->release();
}
}
static bool releaseObject(wyArray* arr, void* ptr, int index, void* data) {
wyObjectRelease((wyObject*)ptr);
return true;
}
#ifdef WY_CFLAG_MEMORY_TRACKING
static bool outputLeak(wyArray* arr, void* ptr, int index, void* data) {
wyObject* obj = (wyObject*)ptr;
LOGD("unreleased object: %s, addr: %x, retain count: %d", obj->getClassName(), obj, obj->getRetainCount());
return true;
}
#endif
void wyInitAutoReleasePool() {
if(sAutoReleasePool == NULL) {
sAutoReleasePool = wyArrayNew(100);
}
if(sLazyReleasePool == NULL) {
sLazyReleasePool = wyArrayNew(100);
}
// for tracing leak
#ifdef WY_CFLAG_MEMORY_TRACKING
if(sLeakPool == NULL) {
sLeakPool = wyArrayNew(100);
}
#endif
}
void wyClearLazyReleasePool() {
if(sLazyReleasePool != NULL && sLazyReleasePool->num > 0) {
// clear pool
wyArrayEach(sLazyReleasePool, releaseObject, NULL);
wyArrayClear(sLazyReleasePool);
}
}
void wyClearAutoReleasePool() {
if(sAutoReleasePool != NULL && sAutoReleasePool->num > 0) {
// clear pool
wyArrayEach(sAutoReleasePool, releaseObject, NULL);
wyArrayClear(sAutoReleasePool);
}
}
void wyDestroyAutoReleasePool() {
if(sAutoReleasePool != NULL) {
// clear auto release pool
wyArrayEach(sAutoReleasePool, releaseObject, NULL);
wyArrayClear(sAutoReleasePool);
wyArrayDestroy(sAutoReleasePool);
sAutoReleasePool = NULL;
}
wyClearLazyReleasePool();
}
#ifdef WY_CFLAG_MEMORY_TRACKING
void wyOutputLeakPool() {
if(sLeakPool != NULL) {
if(sLeakPool->num > 0)
LOGD("leak pool count: %d", sLeakPool->num);
wyArrayEach(sLeakPool, outputLeak, NULL);
}
}
void wyClearLeakPool() {
if(sLeakPool != NULL) {
wyArrayClear(sLeakPool);
wyArrayDestroy(sLeakPool);
sLeakPool = NULL;
}
}
#endif
void wyOutputLazyPool() {
LOGD("+++ objects still not autoreleased +++");
for(int i = 0; i < sLazyReleasePool->num; i++) {
wyObject* obj = (wyObject*)wyArrayGet(sLazyReleasePool, i);
LOGD("%s", obj->getClassName());
}
LOGD("--- objects still not autoreleased ---");
}
#ifdef __cplusplus
}
#endif
| [
"stubma@gmail.com"
] | stubma@gmail.com |
f1e85089187d60998a7946fcdccb67fc107d99a2 | e9854cb02e90dab7ec0a49c65f658babba819d56 | /Curve Editor Framework/QT/src/gui/kernel/qapplication.cpp | b99944e469906932219c827fd7cadb8517a372a8 | [] | no_license | katzeforest/Computer-Animation | 2bbb1df374d65240ca2209b3a75a0b6a8b99ad58 | 01481111a622ae8812fb0b76550f5d66de206bab | refs/heads/master | 2021-01-23T19:46:13.455834 | 2015-06-08T21:29:02 | 2015-06-08T21:29:02 | 37,092,780 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 209,632 | cpp | /****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial Usage
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qplatformdefs.h"
#include "qabstracteventdispatcher.h"
#include "qaccessible.h"
#include "qapplication.h"
#include "qclipboard.h"
#include "qcursor.h"
#include "qdesktopwidget.h"
#include "qdir.h"
#include "qevent.h"
#include "qfile.h"
#include "qfileinfo.h"
#include "qgraphicsscene.h"
#include "qhash.h"
#include "qset.h"
#include "qlayout.h"
#include "qsessionmanager.h"
#include "qstyle.h"
#include "qstylefactory.h"
#include "qtextcodec.h"
#include "qtranslator.h"
#include "qvariant.h"
#include "qwidget.h"
#include "qdnd_p.h"
#include "qcolormap.h"
#include "qdebug.h"
#include "private/qgraphicssystemfactory_p.h"
#include "private/qgraphicssystem_p.h"
#include "private/qstylesheetstyle_p.h"
#include "private/qstyle_p.h"
#include "qmessagebox.h"
#include <QtGui/qgraphicsproxywidget.h>
#ifdef QT_GRAPHICSSYSTEM_RUNTIME
#include "private/qgraphicssystem_runtime_p.h"
#endif
#include "qinputcontext.h"
#include "qkeymapper_p.h"
#ifdef Q_WS_X11
#include <private/qt_x11_p.h>
#endif
#if defined(Q_WS_X11) || defined(Q_OS_SYMBIAN)
#include "qinputcontextfactory.h"
#endif
#include "qguiplatformplugin_p.h"
#include <qthread.h>
#include <private/qthread_p.h>
#include <private/qfont_p.h>
#include <stdlib.h>
#if defined(Q_WS_X11) && !defined(QT_NO_EGL)
#include <link.h>
#endif
#include "qapplication_p.h"
#include "qevent_p.h"
#include "qwidget_p.h"
#include "qapplication.h"
#include "qgesture.h"
#include "private/qgesturemanager_p.h"
#ifndef QT_NO_LIBRARY
#include "qlibrary.h"
#endif
#ifdef Q_WS_WINCE
#include "qdatetime.h"
#include "qguifunctions_wince.h"
extern bool qt_wince_is_smartphone(); //qguifunctions_wince.cpp
extern bool qt_wince_is_mobile(); //qguifunctions_wince.cpp
extern bool qt_wince_is_pocket_pc(); //qguifunctions_wince.cpp
#endif
#include "qdatetime.h"
#ifdef QT_MAC_USE_COCOA
#include <private/qt_cocoa_helpers_mac_p.h>
#endif
//#define ALIEN_DEBUG
static void initResources()
{
#if defined(Q_WS_WINCE)
Q_INIT_RESOURCE_EXTERN(qstyle_wince)
Q_INIT_RESOURCE(qstyle_wince);
#elif defined(Q_OS_SYMBIAN)
Q_INIT_RESOURCE_EXTERN(qstyle_s60)
Q_INIT_RESOURCE(qstyle_s60);
#else
Q_INIT_RESOURCE_EXTERN(qstyle)
Q_INIT_RESOURCE(qstyle);
#endif
Q_INIT_RESOURCE_EXTERN(qmessagebox)
Q_INIT_RESOURCE(qmessagebox);
#if !defined(QT_NO_PRINTDIALOG)
Q_INIT_RESOURCE_EXTERN(qprintdialog)
Q_INIT_RESOURCE(qprintdialog);
#endif
}
QT_BEGIN_NAMESPACE
Q_CORE_EXPORT void qt_call_post_routines();
int QApplicationPrivate::app_compile_version = 0x040000; //we don't know exactly, but it's at least 4.0.0
QApplication::Type qt_appType=QApplication::Tty;
QApplicationPrivate *QApplicationPrivate::self = 0;
QInputContext *QApplicationPrivate::inputContext = 0;
bool QApplicationPrivate::quitOnLastWindowClosed = true;
#ifdef Q_WS_WINCE
int QApplicationPrivate::autoMaximizeThreshold = -1;
bool QApplicationPrivate::autoSipEnabled = false;
#else
bool QApplicationPrivate::autoSipEnabled = true;
#endif
QApplicationPrivate::QApplicationPrivate(int &argc, char **argv, QApplication::Type type)
: QCoreApplicationPrivate(argc, argv)
{
application_type = type;
qt_appType = type;
#ifndef QT_NO_SESSIONMANAGER
is_session_restored = false;
#endif
quitOnLastWindowClosed = true;
#ifdef QT3_SUPPORT
qt_compat_used = 0;
qt_compat_resolved = 0;
qt_tryAccelEvent = 0;
qt_tryComposeUnicode = 0;
qt_dispatchAccelEvent = 0;
#endif
#if defined(Q_WS_QWS) && !defined(QT_NO_DIRECTPAINTER)
directPainters = 0;
#endif
#ifndef QT_NO_GESTURES
gestureManager = 0;
gestureWidget = 0;
#endif // QT_NO_GESTURES
#if defined(Q_WS_X11) || defined(Q_WS_WIN)
move_cursor = 0;
copy_cursor = 0;
link_cursor = 0;
#endif
#if defined(Q_WS_WIN)
ignore_cursor = 0;
#endif
if (!self)
self = this;
}
QApplicationPrivate::~QApplicationPrivate()
{
if (self == this)
self = 0;
}
/*!
\class QApplication
\brief The QApplication class manages the GUI application's control
flow and main settings.
QApplication contains the main event loop, where all events from the window
system and other sources are processed and dispatched. It also handles the
application's initialization, finalization, and provides session
management. In addition, QApplication handles most of the system-wide and
application-wide settings.
For any GUI application using Qt, there is precisely \bold one QApplication
object, no matter whether the application has 0, 1, 2 or more windows at
any given time. For non-GUI Qt applications, use QCoreApplication instead,
as it does not depend on the \l QtGui library.
The QApplication object is accessible through the instance() function that
returns a pointer equivalent to the global qApp pointer.
QApplication's main areas of responsibility are:
\list
\o It initializes the application with the user's desktop settings
such as palette(), font() and doubleClickInterval(). It keeps
track of these properties in case the user changes the desktop
globally, for example through some kind of control panel.
\o It performs event handling, meaning that it receives events
from the underlying window system and dispatches them to the
relevant widgets. By using sendEvent() and postEvent() you can
send your own events to widgets.
\o It parses common command line arguments and sets its internal
state accordingly. See the \l{QApplication::QApplication()}
{constructor documentation} below for more details.
\o It defines the application's look and feel, which is
encapsulated in a QStyle object. This can be changed at runtime
with setStyle().
\o It specifies how the application is to allocate colors. See
setColorSpec() for details.
\o It provides localization of strings that are visible to the
user via translate().
\o It provides some magical objects like the desktop() and the
clipboard().
\o It knows about the application's windows. You can ask which
widget is at a certain position using widgetAt(), get a list of
topLevelWidgets() and closeAllWindows(), etc.
\o It manages the application's mouse cursor handling, see
setOverrideCursor()
\o On the X window system, it provides functions to flush and sync
the communication stream, see flushX() and syncX().
\o It provides support for sophisticated \l{Session Management}
{session management}. This makes it possible for applications
to terminate gracefully when the user logs out, to cancel a
shutdown process if termination isn't possible and even to
preserve the entire application's state for a future session.
See isSessionRestored(), sessionId() and commitData() and
saveState() for details.
\endlist
Since the QApplication object does so much initialization, it \e{must} be
created before any other objects related to the user interface are created.
QApplication also deals with common command line arguments. Hence, it is
usually a good idea to create it \e before any interpretation or
modification of \c argv is done in the application itself.
\table
\header
\o{2,1} Groups of functions
\row
\o System settings
\o desktopSettingsAware(),
setDesktopSettingsAware(),
cursorFlashTime(),
setCursorFlashTime(),
doubleClickInterval(),
setDoubleClickInterval(),
setKeyboardInputInterval(),
wheelScrollLines(),
setWheelScrollLines(),
palette(),
setPalette(),
font(),
setFont(),
fontMetrics().
\row
\o Event handling
\o exec(),
processEvents(),
exit(),
quit().
sendEvent(),
postEvent(),
sendPostedEvents(),
removePostedEvents(),
hasPendingEvents(),
notify(),
macEventFilter(),
qwsEventFilter(),
x11EventFilter(),
x11ProcessEvent(),
winEventFilter().
\row
\o GUI Styles
\o style(),
setStyle().
\row
\o Color usage
\o colorSpec(),
setColorSpec(),
qwsSetCustomColors().
\row
\o Text handling
\o installTranslator(),
removeTranslator()
translate().
\row
\o Widgets
\o allWidgets(),
topLevelWidgets(),
desktop(),
activePopupWidget(),
activeModalWidget(),
clipboard(),
focusWidget(),
activeWindow(),
widgetAt().
\row
\o Advanced cursor handling
\o overrideCursor(),
setOverrideCursor(),
restoreOverrideCursor().
\row
\o X Window System synchronization
\o flushX(),
syncX().
\row
\o Session management
\o isSessionRestored(),
sessionId(),
commitData(),
saveState().
\row
\o Miscellaneous
\o closeAllWindows(),
startingUp(),
closingDown(),
type().
\endtable
\sa QCoreApplication, QAbstractEventDispatcher, QEventLoop, QSettings
*/
/*!
\enum QApplication::Type
\value Tty a console application
\value GuiClient a GUI client application
\value GuiServer a GUI server application (for Qt for Embedded Linux)
*/
/*!
\enum QApplication::ColorSpec
\value NormalColor the default color allocation policy
\value CustomColor the same as NormalColor for X11; allocates colors
to a palette on demand under Windows
\value ManyColor the right choice for applications that use thousands of
colors
See setColorSpec() for full details.
*/
/*!
\fn QWidget *QApplication::topLevelAt(const QPoint &point)
Returns the top-level widget at the given \a point; returns 0 if
there is no such widget.
*/
/*!
\fn QWidget *QApplication::topLevelAt(int x, int y)
\overload
Returns the top-level widget at the point (\a{x}, \a{y}); returns
0 if there is no such widget.
*/
/*
The qt_init() and qt_cleanup() functions are implemented in the
qapplication_xyz.cpp file.
*/
void qt_init(QApplicationPrivate *priv, int type
#ifdef Q_WS_X11
, Display *display = 0, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0
#endif
);
void qt_cleanup();
Qt::MouseButtons QApplicationPrivate::mouse_buttons = Qt::NoButton;
Qt::KeyboardModifiers QApplicationPrivate::modifier_buttons = Qt::NoModifier;
QStyle *QApplicationPrivate::app_style = 0; // default application style
QString QApplicationPrivate::styleOverride; // style override
#ifndef QT_NO_STYLE_STYLESHEET
QString QApplicationPrivate::styleSheet; // default application stylesheet
#endif
QPointer<QWidget> QApplicationPrivate::leaveAfterRelease = 0;
int QApplicationPrivate::app_cspec = QApplication::NormalColor;
QPalette *QApplicationPrivate::app_pal = 0; // default application palette
QPalette *QApplicationPrivate::sys_pal = 0; // default system palette
QPalette *QApplicationPrivate::set_pal = 0; // default palette set by programmer
QGraphicsSystem *QApplicationPrivate::graphics_system = 0; // default graphics system
QString QApplicationPrivate::graphics_system_name; // graphics system id - for delayed initialization
bool QApplicationPrivate::runtime_graphics_system = false;
Q_GLOBAL_STATIC(QMutex, applicationFontMutex)
QFont *QApplicationPrivate::app_font = 0; // default application font
QFont *QApplicationPrivate::sys_font = 0; // default system font
QFont *QApplicationPrivate::set_font = 0; // default font set by programmer
QIcon *QApplicationPrivate::app_icon = 0;
QWidget *QApplicationPrivate::main_widget = 0; // main application widget
QWidget *QApplicationPrivate::focus_widget = 0; // has keyboard input focus
QWidget *QApplicationPrivate::hidden_focus_widget = 0; // will get keyboard input focus after show()
QWidget *QApplicationPrivate::active_window = 0; // toplevel with keyboard focus
bool QApplicationPrivate::obey_desktop_settings = true; // use winsys resources
int QApplicationPrivate::cursor_flash_time = 1000; // text caret flash time
int QApplicationPrivate::mouse_double_click_time = 400; // mouse dbl click limit
int QApplicationPrivate::keyboard_input_time = 400; // keyboard input interval
#ifndef QT_NO_WHEELEVENT
int QApplicationPrivate::wheel_scroll_lines; // number of lines to scroll
#endif
bool qt_is_gui_used;
bool Q_GUI_EXPORT qt_tab_all_widgets = true;
bool qt_in_tab_key_event = false;
int qt_antialiasing_threshold = -1;
static int drag_time = 500;
#ifndef QT_GUI_DRAG_DISTANCE
#define QT_GUI_DRAG_DISTANCE 4
#endif
#ifdef Q_OS_SYMBIAN
// The screens are a bit too small to for your thumb when using only 4 pixels drag distance.
static int drag_distance = 12; //XXX move to qplatformdefs.h
#else
static int drag_distance = QT_GUI_DRAG_DISTANCE;
#endif
static Qt::LayoutDirection layout_direction = Qt::LeftToRight;
QSize QApplicationPrivate::app_strut = QSize(0,0); // no default application strut
bool QApplicationPrivate::animate_ui = true;
bool QApplicationPrivate::animate_menu = false;
bool QApplicationPrivate::fade_menu = false;
bool QApplicationPrivate::animate_combo = false;
bool QApplicationPrivate::animate_tooltip = false;
bool QApplicationPrivate::fade_tooltip = false;
bool QApplicationPrivate::animate_toolbox = false;
bool QApplicationPrivate::widgetCount = false;
bool QApplicationPrivate::load_testability = false;
QString QApplicationPrivate::qmljs_debug_arguments;
#ifdef QT_KEYPAD_NAVIGATION
# ifdef Q_OS_SYMBIAN
Qt::NavigationMode QApplicationPrivate::navigationMode = Qt::NavigationModeKeypadDirectional;
# else
Qt::NavigationMode QApplicationPrivate::navigationMode = Qt::NavigationModeKeypadTabOrder;
# endif
QWidget *QApplicationPrivate::oldEditFocus = 0;
#endif
bool qt_tabletChokeMouse = false;
static bool force_reverse = false;
inline bool QApplicationPrivate::isAlien(QWidget *widget)
{
if (!widget)
return false;
#if defined(Q_WS_QWS)
return !widget->isWindow()
# ifdef Q_BACKINGSTORE_SUBSURFACES
&& !(widget->d_func()->maybeTopData() && widget->d_func()->maybeTopData()->windowSurface)
# endif
;
#else
return !widget->internalWinId();
#endif
}
// ######## move to QApplicationPrivate
// Default application palettes and fonts (per widget type)
Q_GLOBAL_STATIC(PaletteHash, app_palettes)
PaletteHash *qt_app_palettes_hash()
{
return app_palettes();
}
Q_GLOBAL_STATIC(FontHash, app_fonts)
FontHash *qt_app_fonts_hash()
{
return app_fonts();
}
QWidgetList *QApplicationPrivate::popupWidgets = 0; // has keyboard input focus
QDesktopWidget *qt_desktopWidget = 0; // root window widgets
#ifndef QT_NO_CLIPBOARD
QClipboard *qt_clipboard = 0; // global clipboard object
#endif
QWidgetList * qt_modal_stack=0; // stack of modal widgets
/*!
\internal
*/
void QApplicationPrivate::process_cmdline()
{
// process platform-indep command line
if (!qt_is_gui_used || !argc)
return;
int i, j;
j = 1;
for (i=1; i<argc; i++) { // if you add anything here, modify QCoreApplication::arguments()
if (argv[i] && *argv[i] != '-') {
argv[j++] = argv[i];
continue;
}
QByteArray arg = argv[i];
arg = arg;
QString s;
if (arg == "-qdevel" || arg == "-qdebug") {
// obsolete argument
} else if (arg.indexOf("-qmljsdebugger=", 0) != -1) {
qmljs_debug_arguments = QString::fromLocal8Bit(arg.right(arg.length() - 15));
} else if (arg.indexOf("-style=", 0) != -1) {
s = QString::fromLocal8Bit(arg.right(arg.length() - 7).toLower());
} else if (arg == "-style" && i < argc-1) {
s = QString::fromLocal8Bit(argv[++i]).toLower();
#ifndef QT_NO_SESSIONMANAGER
} else if (arg == "-session" && i < argc-1) {
++i;
if (argv[i] && *argv[i]) {
session_id = QString::fromLatin1(argv[i]);
int p = session_id.indexOf(QLatin1Char('_'));
if (p >= 0) {
session_key = session_id.mid(p +1);
session_id = session_id.left(p);
}
is_session_restored = true;
}
#endif
#ifndef QT_NO_STYLE_STYLESHEET
} else if (arg == "-stylesheet" && i < argc -1) {
styleSheet = QLatin1String("file:///");
styleSheet.append(QString::fromLocal8Bit(argv[++i]));
} else if (arg.indexOf("-stylesheet=") != -1) {
styleSheet = QLatin1String("file:///");
styleSheet.append(QString::fromLocal8Bit(arg.right(arg.length() - 12)));
#endif
} else if (qstrcmp(arg, "-reverse") == 0) {
force_reverse = true;
QApplication::setLayoutDirection(Qt::RightToLeft);
} else if (qstrcmp(arg, "-widgetcount") == 0) {
widgetCount = true;
} else if (qstrcmp(arg, "-testability") == 0) {
load_testability = true;
} else if (arg == "-graphicssystem" && i < argc-1) {
graphics_system_name = QString::fromLocal8Bit(argv[++i]);
} else {
argv[j++] = argv[i];
}
if (!s.isEmpty()) {
if (app_style) {
delete app_style;
app_style = 0;
}
styleOverride = s;
}
}
if(j < argc) {
argv[j] = 0;
argc = j;
}
}
/*!
Initializes the window system and constructs an application object with
\a argc command line arguments in \a argv.
\warning The data referred to by \a argc and \a argv must stay valid for
the entire lifetime of the QApplication object. In addition, \a argc must
be greater than zero and \a argv must contain at least one valid character
string.
The global \c qApp pointer refers to this application object. Only one
application object should be created.
This application object must be constructed before any \l{QPaintDevice}
{paint devices} (including widgets, pixmaps, bitmaps etc.).
\note \a argc and \a argv might be changed as Qt removes command line
arguments that it recognizes.
Qt debugging options (not available if Qt was compiled without the QT_DEBUG
flag defined):
\list
\o -nograb, tells Qt that it must never grab the mouse or the
keyboard.
\o -dograb (only under X11), running under a debugger can cause an
implicit -nograb, use -dograb to override.
\o -sync (only under X11), switches to synchronous mode for
debugging.
\endlist
See \l{Debugging Techniques} for a more detailed explanation.
All Qt programs automatically support the following command line options:
\list
\o -style= \e style, sets the application GUI style. Possible values
are \c motif, \c windows, and \c platinum. If you compiled Qt with
additional styles or have additional styles as plugins these will
be available to the \c -style command line option.
\o -style \e style, is the same as listed above.
\o -stylesheet= \e stylesheet, sets the application \l styleSheet. The
value must be a path to a file that contains the Style Sheet.
\note Relative URLs in the Style Sheet file are relative to the
Style Sheet file's path.
\o -stylesheet \e stylesheet, is the same as listed above.
\o -session= \e session, restores the application from an earlier
\l{Session Management}{session}.
\o -session \e session, is the same as listed above.
\o -widgetcount, prints debug message at the end about number of
widgets left undestroyed and maximum number of widgets existed at
the same time
\o -reverse, sets the application's layout direction to
Qt::RightToLeft
\o -graphicssystem, sets the backend to be used for on-screen widgets
and QPixmaps. Available options are \c{raster} and \c{opengl}.
\o -qmljsdebugger=, activates the QML/JS debugger with a specified port.
The value must be of format port:1234[,block], where block is optional
and will make the application wait until a debugger connects to it.
\endlist
The X11 version of Qt supports some traditional X11 command line options:
\list
\o -display \e display, sets the X display (default is $DISPLAY).
\o -geometry \e geometry, sets the client geometry of the first window
that is shown.
\o -fn or \c -font \e font, defines the application font. The font
should be specified using an X logical font description. Note that
this option is ignored when Qt is built with fontconfig support enabled.
\o -bg or \c -background \e color, sets the default background color
and an application palette (light and dark shades are calculated).
\o -fg or \c -foreground \e color, sets the default foreground color.
\o -btn or \c -button \e color, sets the default button color.
\o -name \e name, sets the application name.
\o -title \e title, sets the application title.
\o -visual \c TrueColor, forces the application to use a TrueColor
visual on an 8-bit display.
\o -ncols \e count, limits the number of colors allocated in the color
cube on an 8-bit display, if the application is using the
QApplication::ManyColor color specification. If \e count is 216
then a 6x6x6 color cube is used (i.e. 6 levels of red, 6 of green,
and 6 of blue); for other values, a cube approximately proportional
to a 2x3x1 cube is used.
\o -cmap, causes the application to install a private color map on an
8-bit display.
\o -im, sets the input method server (equivalent to setting the
XMODIFIERS environment variable)
\o -inputstyle, defines how the input is inserted into the given
widget, e.g., \c onTheSpot makes the input appear directly in the
widget, while \c overTheSpot makes the input appear in a box
floating over the widget and is not inserted until the editing is
done.
\endlist
\section1 X11 Notes
If QApplication fails to open the X11 display, it will terminate
the process. This behavior is consistent with most X11
applications.
\sa arguments()
*/
QApplication::QApplication(int &argc, char **argv)
: QCoreApplication(*new QApplicationPrivate(argc, argv, GuiClient))
{ Q_D(QApplication); d->construct(); }
QApplication::QApplication(int &argc, char **argv, int _internal)
: QCoreApplication(*new QApplicationPrivate(argc, argv, GuiClient))
{ Q_D(QApplication); d->construct(); QApplicationPrivate::app_compile_version = _internal;}
/*!
Constructs an application object with \a argc command line arguments in
\a argv. If \a GUIenabled is true, a GUI application is constructed,
otherwise a non-GUI (console) application is created.
\warning The data referred to by \a argc and \a argv must stay valid for
the entire lifetime of the QApplication object. In addition, \a argc must
be greater than zero and \a argv must contain at least one valid character
string.
Set \a GUIenabled to false for programs without a graphical user interface
that should be able to run without a window system.
On X11, the window system is initialized if \a GUIenabled is true. If
\a GUIenabled is false, the application does not connect to the X server.
On Windows and Mac OS, currently the window system is always initialized,
regardless of the value of GUIenabled. This may change in future versions
of Qt.
The following example shows how to create an application that uses a
graphical interface when available.
\snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 0
*/
QApplication::QApplication(int &argc, char **argv, bool GUIenabled )
: QCoreApplication(*new QApplicationPrivate(argc, argv, GUIenabled ? GuiClient : Tty))
{ Q_D(QApplication); d->construct(); }
QApplication::QApplication(int &argc, char **argv, bool GUIenabled , int _internal)
: QCoreApplication(*new QApplicationPrivate(argc, argv, GUIenabled ? GuiClient : Tty))
{ Q_D(QApplication); d->construct(); QApplicationPrivate::app_compile_version = _internal;}
/*!
Constructs an application object with \a argc command line arguments in
\a argv.
\warning The data referred to by \a argc and \a argv must stay valid for
the entire lifetime of the QApplication object. In addition, \a argc must
be greater than zero and \a argv must contain at least one valid character
string.
With Qt for Embedded Linux, passing QApplication::GuiServer for \a type
makes this application the server (equivalent to running with the
\c -qws option).
*/
QApplication::QApplication(int &argc, char **argv, Type type)
: QCoreApplication(*new QApplicationPrivate(argc, argv, type))
{ Q_D(QApplication); d->construct(); }
QApplication::QApplication(int &argc, char **argv, Type type , int _internal)
: QCoreApplication(*new QApplicationPrivate(argc, argv, type))
{ Q_D(QApplication); d->construct(); QApplicationPrivate::app_compile_version = _internal;}
#if defined(Q_WS_X11) && !defined(QT_NO_EGL)
static int qt_matchLibraryName(dl_phdr_info *info, size_t, void *data)
{
const char *name = static_cast<const char *>(data);
return strstr(info->dlpi_name, name) != 0;
}
#endif
/*!
\internal
*/
void QApplicationPrivate::construct(
#ifdef Q_WS_X11
Display *dpy, Qt::HANDLE visual, Qt::HANDLE cmap
#endif
)
{
initResources();
qt_is_gui_used = (qt_appType != QApplication::Tty);
process_cmdline();
// the environment variable has the lowest precedence of runtime graphicssystem switches
if (graphics_system_name.isEmpty())
graphics_system_name = QString::fromLocal8Bit(qgetenv("QT_GRAPHICSSYSTEM"));
#if defined(Q_WS_X11) && !defined(QT_NO_EGL)
if (graphics_system_name.isEmpty()) {
bool linksWithMeeGoTouch = dl_iterate_phdr(qt_matchLibraryName, const_cast<char *>("libmeegotouchcore"));
bool linksWithMeeGoGraphicsSystemHelper = dl_iterate_phdr(qt_matchLibraryName, const_cast<char *>("libQtMeeGoGraphicsSystemHelper"));
if (linksWithMeeGoTouch && !linksWithMeeGoGraphicsSystemHelper) {
qWarning("Running non-meego graphics system enabled MeeGo touch, forcing native graphicssystem\n");
graphics_system_name = QLatin1String("native");
}
}
#endif
// Must be called before initialize()
qt_init(this, qt_appType
#ifdef Q_WS_X11
, dpy, visual, cmap
#endif
);
initialize();
eventDispatcher->startingUp();
#ifdef QT_EVAL
extern void qt_gui_eval_init(uint);
qt_gui_eval_init(application_type);
#endif
#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_SYSTEMLOCALE)
symbianInit();
#endif
#ifndef QT_NO_LIBRARY
if(load_testability) {
QLibrary testLib(QLatin1String("qttestability"));
if (testLib.load()) {
typedef void (*TasInitialize)(void);
TasInitialize initFunction = (TasInitialize)testLib.resolve("qt_testability_init");
#ifdef Q_OS_SYMBIAN
// resolving method by name does not work on Symbian OS so need to use ordinal
if(!initFunction) {
initFunction = (TasInitialize)testLib.resolve("1");
}
#endif
if (initFunction) {
initFunction();
} else {
qCritical("Library qttestability resolve failed!");
}
} else {
qCritical("Library qttestability load failed!");
}
}
//make sure the plugin is loaded
if (qt_is_gui_used)
qt_guiPlatformPlugin();
#endif
}
#if defined(Q_WS_X11)
// ### a string literal is a cont char*
// ### using it as a char* is wrong and could lead to segfaults
// ### if aargv is modified someday
// ########## make it work with argc == argv == 0
static int aargc = 1;
static char *aargv[] = { (char*)"unknown", 0 };
/*!
\fn QApplication::QApplication(Display* display, Qt::HANDLE visual, Qt::HANDLE colormap)
Creates an application, given an already open display \a display. If
\a visual and \a colormap are non-zero, the application will use those
values as the default Visual and Colormap contexts.
\warning Qt only supports TrueColor visuals at depths higher than 8
bits-per-pixel.
This function is only available on X11.
*/
QApplication::QApplication(Display* dpy, Qt::HANDLE visual, Qt::HANDLE colormap)
: QCoreApplication(*new QApplicationPrivate(aargc, aargv, GuiClient))
{
if (! dpy)
qWarning("QApplication: Invalid Display* argument");
Q_D(QApplication);
d->construct(dpy, visual, colormap);
}
QApplication::QApplication(Display* dpy, Qt::HANDLE visual, Qt::HANDLE colormap, int _internal)
: QCoreApplication(*new QApplicationPrivate(aargc, aargv, GuiClient))
{
if (! dpy)
qWarning("QApplication: Invalid Display* argument");
Q_D(QApplication);
d->construct(dpy, visual, colormap);
QApplicationPrivate::app_compile_version = _internal;
}
/*!
\fn QApplication::QApplication(Display *display, int &argc, char **argv,
Qt::HANDLE visual, Qt::HANDLE colormap)
Creates an application, given an already open \a display and using \a argc
command line arguments in \a argv. If \a visual and \a colormap are
non-zero, the application will use those values as the default Visual
and Colormap contexts.
\warning Qt only supports TrueColor visuals at depths higher than 8
bits-per-pixel.
This function is only available on X11.
*/
QApplication::QApplication(Display *dpy, int &argc, char **argv,
Qt::HANDLE visual, Qt::HANDLE colormap)
: QCoreApplication(*new QApplicationPrivate(argc, argv, GuiClient))
{
if (! dpy)
qWarning("QApplication: Invalid Display* argument");
Q_D(QApplication);
d->construct(dpy, visual, colormap);
}
QApplication::QApplication(Display *dpy, int &argc, char **argv,
Qt::HANDLE visual, Qt::HANDLE colormap, int _internal)
: QCoreApplication(*new QApplicationPrivate(argc, argv, GuiClient))
{
if (! dpy)
qWarning("QApplication: Invalid Display* argument");
Q_D(QApplication);
d->construct(dpy, visual, colormap);
QApplicationPrivate::app_compile_version = _internal;
}
#endif // Q_WS_X11
extern void qInitDrawhelperAsm();
extern void qInitImageConversions();
extern int qRegisterGuiVariant();
extern int qUnregisterGuiVariant();
#ifndef QT_NO_STATEMACHINE
extern int qRegisterGuiStateMachine();
extern int qUnregisterGuiStateMachine();
#endif
/*!
\fn void QApplicationPrivate::initialize()
Initializes the QApplication object, called from the constructors.
*/
void QApplicationPrivate::initialize()
{
QWidgetPrivate::mapper = new QWidgetMapper;
QWidgetPrivate::allWidgets = new QWidgetSet;
#if !defined(Q_WS_X11) && !defined(Q_WS_QWS)
// initialize the graphics system - on X11 this is initialized inside
// qt_init() in qapplication_x11.cpp because of several reasons.
// On QWS, the graphics system is set by the QScreen plugin.
graphics_system = QGraphicsSystemFactory::create(graphics_system_name);
#endif
if (qt_appType != QApplication::Tty)
(void) QApplication::style(); // trigger creation of application style
// trigger registering of QVariant's GUI types
qRegisterGuiVariant();
#ifndef QT_NO_STATEMACHINE
// trigger registering of QStateMachine's GUI types
qRegisterGuiStateMachine();
#endif
is_app_running = true; // no longer starting up
Q_Q(QApplication);
#ifndef QT_NO_SESSIONMANAGER
// connect to the session manager
session_manager = new QSessionManager(q, session_id, session_key);
#endif
if (qgetenv("QT_USE_NATIVE_WINDOWS").toInt() > 0)
q->setAttribute(Qt::AA_NativeWindows);
#ifdef Q_WS_WINCE
#ifdef QT_AUTO_MAXIMIZE_THRESHOLD
autoMaximizeThreshold = QT_AUTO_MAXIMIZE_THRESHOLD;
#else
if (qt_wince_is_mobile())
autoMaximizeThreshold = 50;
else
autoMaximizeThreshold = -1;
#endif //QT_AUTO_MAXIMIZE_THRESHOLD
#endif //Q_WS_WINCE
// Set up which span functions should be used in raster engine...
qInitDrawhelperAsm();
// and QImage conversion functions
qInitImageConversions();
#ifndef QT_NO_WHEELEVENT
QApplicationPrivate::wheel_scroll_lines = 3;
#endif
if (qt_is_gui_used)
initializeMultitouch();
}
/*!
Returns the type of application (\l Tty, GuiClient, or
GuiServer). The type is set when constructing the QApplication
object.
*/
QApplication::Type QApplication::type()
{
return qt_appType;
}
/*****************************************************************************
Functions returning the active popup and modal widgets.
*****************************************************************************/
/*!
Returns the active popup widget.
A popup widget is a special top-level widget that sets the \c
Qt::WType_Popup widget flag, e.g. the QMenu widget. When the application
opens a popup widget, all events are sent to the popup. Normal widgets and
modal widgets cannot be accessed before the popup widget is closed.
Only other popup widgets may be opened when a popup widget is shown. The
popup widgets are organized in a stack. This function returns the active
popup widget at the top of the stack.
\sa activeModalWidget(), topLevelWidgets()
*/
QWidget *QApplication::activePopupWidget()
{
return QApplicationPrivate::popupWidgets && !QApplicationPrivate::popupWidgets->isEmpty() ?
QApplicationPrivate::popupWidgets->last() : 0;
}
/*!
Returns the active modal widget.
A modal widget is a special top-level widget which is a subclass of QDialog
that specifies the modal parameter of the constructor as true. A modal
widget must be closed before the user can continue with other parts of the
program.
Modal widgets are organized in a stack. This function returns the active
modal widget at the top of the stack.
\sa activePopupWidget(), topLevelWidgets()
*/
QWidget *QApplication::activeModalWidget()
{
return qt_modal_stack && !qt_modal_stack->isEmpty() ? qt_modal_stack->first() : 0;
}
/*!
Cleans up any window system resources that were allocated by this
application. Sets the global variable \c qApp to 0.
*/
QApplication::~QApplication()
{
Q_D(QApplication);
#ifndef QT_NO_CLIPBOARD
// flush clipboard contents
if (qt_clipboard) {
QEvent event(QEvent::Clipboard);
QApplication::sendEvent(qt_clipboard, &event);
}
#endif
//### this should probable be done even later
qt_call_post_routines();
// kill timers before closing down the dispatcher
d->toolTipWakeUp.stop();
d->toolTipFallAsleep.stop();
d->eventDispatcher->closingDown();
d->eventDispatcher = 0;
QApplicationPrivate::is_app_closing = true;
QApplicationPrivate::is_app_running = false;
delete QWidgetPrivate::mapper;
QWidgetPrivate::mapper = 0;
// delete all widgets
if (QWidgetPrivate::allWidgets) {
QWidgetSet *mySet = QWidgetPrivate::allWidgets;
QWidgetPrivate::allWidgets = 0;
for (QWidgetSet::ConstIterator it = mySet->constBegin(); it != mySet->constEnd(); ++it) {
register QWidget *w = *it;
if (!w->parent()) // window
w->destroy(true, true);
}
delete mySet;
}
delete qt_desktopWidget;
qt_desktopWidget = 0;
#ifndef QT_NO_CLIPBOARD
delete qt_clipboard;
qt_clipboard = 0;
#endif
#if defined(Q_WS_X11) || defined(Q_WS_WIN)
delete d->move_cursor; d->move_cursor = 0;
delete d->copy_cursor; d->copy_cursor = 0;
delete d->link_cursor; d->link_cursor = 0;
#endif
#if defined(Q_WS_WIN)
delete d->ignore_cursor; d->ignore_cursor = 0;
#endif
delete QApplicationPrivate::app_pal;
QApplicationPrivate::app_pal = 0;
delete QApplicationPrivate::sys_pal;
QApplicationPrivate::sys_pal = 0;
delete QApplicationPrivate::set_pal;
QApplicationPrivate::set_pal = 0;
app_palettes()->clear();
{
QMutexLocker locker(applicationFontMutex());
delete QApplicationPrivate::app_font;
QApplicationPrivate::app_font = 0;
}
delete QApplicationPrivate::sys_font;
QApplicationPrivate::sys_font = 0;
delete QApplicationPrivate::set_font;
QApplicationPrivate::set_font = 0;
app_fonts()->clear();
delete QApplicationPrivate::app_style;
QApplicationPrivate::app_style = 0;
delete QApplicationPrivate::app_icon;
QApplicationPrivate::app_icon = 0;
delete QApplicationPrivate::graphics_system;
QApplicationPrivate::graphics_system = 0;
#ifndef QT_NO_CURSOR
d->cursor_list.clear();
#endif
#ifndef QT_NO_DRAGANDDROP
if (qt_is_gui_used)
delete QDragManager::self();
#endif
d->cleanupMultitouch();
qt_cleanup();
if (QApplicationPrivate::widgetCount)
qDebug("Widgets left: %i Max widgets: %i \n", QWidgetPrivate::instanceCounter, QWidgetPrivate::maxInstances);
#ifndef QT_NO_SESSIONMANAGER
delete d->session_manager;
d->session_manager = 0;
#endif //QT_NO_SESSIONMANAGER
QApplicationPrivate::obey_desktop_settings = true;
QApplicationPrivate::cursor_flash_time = 1000;
QApplicationPrivate::mouse_double_click_time = 400;
QApplicationPrivate::keyboard_input_time = 400;
drag_time = 500;
drag_distance = 4;
layout_direction = Qt::LeftToRight;
QApplicationPrivate::app_strut = QSize(0, 0);
QApplicationPrivate::animate_ui = true;
QApplicationPrivate::animate_menu = false;
QApplicationPrivate::fade_menu = false;
QApplicationPrivate::animate_combo = false;
QApplicationPrivate::animate_tooltip = false;
QApplicationPrivate::fade_tooltip = false;
QApplicationPrivate::widgetCount = false;
#ifndef QT_NO_STATEMACHINE
// trigger unregistering of QStateMachine's GUI types
qUnregisterGuiStateMachine();
#endif
// trigger unregistering of QVariant's GUI types
qUnregisterGuiVariant();
}
/*!
\fn QWidget *QApplication::widgetAt(const QPoint &point)
Returns the widget at global screen position \a point, or 0 if there is no
Qt widget there.
This function can be slow.
\sa QCursor::pos(), QWidget::grabMouse(), QWidget::grabKeyboard()
*/
QWidget *QApplication::widgetAt(const QPoint &p)
{
QWidget *window = QApplication::topLevelAt(p);
if (!window)
return 0;
QWidget *child = 0;
if (!window->testAttribute(Qt::WA_TransparentForMouseEvents))
child = window->childAt(window->mapFromGlobal(p));
if (child)
return child;
if (window->testAttribute(Qt::WA_TransparentForMouseEvents)) {
//shoot a hole in the widget and try once again,
//suboptimal on Qt for Embedded Linux where we do
//know the stacking order of the toplevels.
int x = p.x();
int y = p.y();
QRegion oldmask = window->mask();
QPoint wpoint = window->mapFromGlobal(QPoint(x, y));
QRegion newmask = (oldmask.isEmpty() ? QRegion(window->rect()) : oldmask)
- QRegion(wpoint.x(), wpoint.y(), 1, 1);
window->setMask(newmask);
QWidget *recurse = 0;
if (QApplication::topLevelAt(p) != window) // verify recursion will terminate
recurse = widgetAt(x, y);
if (oldmask.isEmpty())
window->clearMask();
else
window->setMask(oldmask);
return recurse;
}
return window;
}
/*!
\fn QWidget *QApplication::widgetAt(int x, int y)
\overload
Returns the widget at global screen position (\a x, \a y), or 0 if there is
no Qt widget there.
*/
/*!
\fn void QApplication::setArgs(int argc, char **argv)
\internal
*/
/*!
\internal
*/
bool QApplication::compressEvent(QEvent *event, QObject *receiver, QPostEventList *postedEvents)
{
if ((event->type() == QEvent::UpdateRequest
#ifdef QT3_SUPPORT
|| event->type() == QEvent::LayoutHint
#endif
|| event->type() == QEvent::LayoutRequest
|| event->type() == QEvent::Resize
|| event->type() == QEvent::Move
|| event->type() == QEvent::LanguageChange
|| event->type() == QEvent::UpdateSoftKeys
|| event->type() == QEvent::InputMethod)) {
for (int i = 0; i < postedEvents->size(); ++i) {
const QPostEvent &cur = postedEvents->at(i);
if (cur.receiver != receiver || cur.event == 0 || cur.event->type() != event->type())
continue;
if (cur.event->type() == QEvent::LayoutRequest
#ifdef QT3_SUPPORT
|| cur.event->type() == QEvent::LayoutHint
#endif
|| cur.event->type() == QEvent::UpdateRequest) {
;
} else if (cur.event->type() == QEvent::Resize) {
((QResizeEvent *)(cur.event))->s = ((QResizeEvent *)event)->s;
} else if (cur.event->type() == QEvent::Move) {
((QMoveEvent *)(cur.event))->p = ((QMoveEvent *)event)->p;
} else if (cur.event->type() == QEvent::LanguageChange) {
;
} else if (cur.event->type() == QEvent::UpdateSoftKeys) {
;
} else if ( cur.event->type() == QEvent::InputMethod ) {
*(QInputMethodEvent *)(cur.event) = *(QInputMethodEvent *)event;
} else {
continue;
}
delete event;
return true;
}
return false;
}
return QCoreApplication::compressEvent(event, receiver, postedEvents);
}
/*!
\property QApplication::styleSheet
\brief the application style sheet
\since 4.2
By default, this property returns an empty string unless the user specifies
the \c{-stylesheet} option on the command line when running the application.
\sa QWidget::setStyle(), {Qt Style Sheets}
*/
/*!
\property QApplication::autoMaximizeThreshold
\since 4.4
\brief defines a threshold for auto maximizing widgets
\bold{The auto maximize threshold is only available as part of Qt for
Windows CE.}
This property defines a threshold for the size of a window as a percentage
of the screen size. If the minimum size hint of a window exceeds the
threshold, calling show() will cause the window to be maximized
automatically.
Setting the threshold to 100 or greater means that the widget will always
be maximized. Alternatively, setting the threshold to 50 means that the
widget will be maximized only if the vertical minimum size hint is at least
50% of the vertical screen size.
Setting the threshold to -1 disables the feature.
On Windows CE the default is -1 (i.e., it is disabled).
On Windows Mobile the default is 40.
*/
/*!
\property QApplication::autoSipEnabled
\since 4.5
\brief toggles automatic SIP (software input panel) visibility
Set this property to \c true to automatically display the SIP when entering
widgets that accept keyboard input. This property only affects widgets with
the WA_InputMethodEnabled attribute set, and is typically used to launch
a virtual keyboard on devices which have very few or no keys.
\bold{ The property only has an effect on platforms which use software input
panels, such as Windows CE and Symbian.}
The default is platform dependent.
*/
#ifdef Q_WS_WINCE
void QApplication::setAutoMaximizeThreshold(const int threshold)
{
QApplicationPrivate::autoMaximizeThreshold = threshold;
}
int QApplication::autoMaximizeThreshold() const
{
return QApplicationPrivate::autoMaximizeThreshold;
}
#endif
void QApplication::setAutoSipEnabled(const bool enabled)
{
QApplicationPrivate::autoSipEnabled = enabled;
}
bool QApplication::autoSipEnabled() const
{
return QApplicationPrivate::autoSipEnabled;
}
#ifndef QT_NO_STYLE_STYLESHEET
QString QApplication::styleSheet() const
{
return QApplicationPrivate::styleSheet;
}
void QApplication::setStyleSheet(const QString& styleSheet)
{
QApplicationPrivate::styleSheet = styleSheet;
QStyleSheetStyle *proxy = qobject_cast<QStyleSheetStyle*>(QApplicationPrivate::app_style);
if (styleSheet.isEmpty()) { // application style sheet removed
if (!proxy)
return; // there was no stylesheet before
setStyle(proxy->base);
} else if (proxy) { // style sheet update, just repolish
proxy->repolish(qApp);
} else { // stylesheet set the first time
QStyleSheetStyle *newProxy = new QStyleSheetStyle(QApplicationPrivate::app_style);
QApplicationPrivate::app_style->setParent(newProxy);
setStyle(newProxy);
}
}
#endif // QT_NO_STYLE_STYLESHEET
/*!
Returns the application's style object.
\sa setStyle(), QStyle
*/
QStyle *QApplication::style()
{
if (QApplicationPrivate::app_style)
return QApplicationPrivate::app_style;
if (!qt_is_gui_used) {
Q_ASSERT(!"No style available in non-gui applications!");
return 0;
}
if (!QApplicationPrivate::app_style) {
// Compile-time search for default style
//
QString style;
#ifdef QT_BUILD_INTERNAL
QString envStyle = QString::fromLocal8Bit(qgetenv("QT_STYLE_OVERRIDE"));
#else
QString envStyle;
#endif
if (!QApplicationPrivate::styleOverride.isEmpty()) {
style = QApplicationPrivate::styleOverride;
} else if (!envStyle.isEmpty()) {
style = envStyle;
} else {
style = QApplicationPrivate::desktopStyleKey();
}
QStyle *&app_style = QApplicationPrivate::app_style;
app_style = QStyleFactory::create(style);
if (!app_style) {
QStringList styles = QStyleFactory::keys();
for (int i = 0; i < styles.size(); ++i) {
if ((app_style = QStyleFactory::create(styles.at(i))))
break;
}
}
if (!app_style) {
Q_ASSERT(!"No styles available!");
return 0;
}
}
// take ownership of the style
QApplicationPrivate::app_style->setParent(qApp);
if (!QApplicationPrivate::sys_pal)
QApplicationPrivate::setSystemPalette(QApplicationPrivate::app_style->standardPalette());
if (QApplicationPrivate::set_pal) // repolish set palette with the new style
QApplication::setPalette(*QApplicationPrivate::set_pal);
#ifndef QT_NO_STYLE_STYLESHEET
if (!QApplicationPrivate::styleSheet.isEmpty()) {
qApp->setStyleSheet(QApplicationPrivate::styleSheet);
} else
#endif
QApplicationPrivate::app_style->polish(qApp);
return QApplicationPrivate::app_style;
}
/*!
Sets the application's GUI style to \a style. Ownership of the style object
is transferred to QApplication, so QApplication will delete the style
object on application exit or when a new style is set and the old style is
still the parent of the application object.
Example usage:
\snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 1
When switching application styles, the color palette is set back to the
initial colors or the system defaults. This is necessary since certain
styles have to adapt the color palette to be fully style-guide compliant.
Setting the style before a palette has been se, i.e., before creating
QApplication, will cause the application to use QStyle::standardPalette()
for the palette.
\warning Qt style sheets are currently not supported for custom QStyle
subclasses. We plan to address this in some future release.
\sa style(), QStyle, setPalette(), desktopSettingsAware()
*/
void QApplication::setStyle(QStyle *style)
{
if (!style || style == QApplicationPrivate::app_style)
return;
QWidgetList all = allWidgets();
// clean up the old style
if (QApplicationPrivate::app_style) {
if (QApplicationPrivate::is_app_running && !QApplicationPrivate::is_app_closing) {
for (QWidgetList::ConstIterator it = all.constBegin(); it != all.constEnd(); ++it) {
register QWidget *w = *it;
if (!(w->windowType() == Qt::Desktop) && // except desktop
w->testAttribute(Qt::WA_WState_Polished)) { // has been polished
QApplicationPrivate::app_style->unpolish(w);
}
}
}
QApplicationPrivate::app_style->unpolish(qApp);
}
QStyle *old = QApplicationPrivate::app_style; // save
#ifndef QT_NO_STYLE_STYLESHEET
if (!QApplicationPrivate::styleSheet.isEmpty() && !qobject_cast<QStyleSheetStyle *>(style)) {
// we have a stylesheet already and a new style is being set
QStyleSheetStyle *newProxy = new QStyleSheetStyle(style);
style->setParent(newProxy);
QApplicationPrivate::app_style = newProxy;
} else
#endif // QT_NO_STYLE_STYLESHEET
QApplicationPrivate::app_style = style;
QApplicationPrivate::app_style->setParent(qApp); // take ownership
// take care of possible palette requirements of certain gui
// styles. Do it before polishing the application since the style
// might call QApplication::setPalette() itself
if (QApplicationPrivate::set_pal) {
QApplication::setPalette(*QApplicationPrivate::set_pal);
} else if (QApplicationPrivate::sys_pal) {
QApplicationPrivate::initializeWidgetPaletteHash();
QApplicationPrivate::setPalette_helper(*QApplicationPrivate::sys_pal, /*className=*/0, /*clearWidgetPaletteHash=*/false);
} else if (!QApplicationPrivate::sys_pal) {
// Initialize the sys_pal if it hasn't happened yet...
QApplicationPrivate::setSystemPalette(QApplicationPrivate::app_style->standardPalette());
}
// initialize the application with the new style
QApplicationPrivate::app_style->polish(qApp);
// re-polish existing widgets if necessary
if (QApplicationPrivate::is_app_running && !QApplicationPrivate::is_app_closing) {
for (QWidgetList::ConstIterator it1 = all.constBegin(); it1 != all.constEnd(); ++it1) {
register QWidget *w = *it1;
if (w->windowType() != Qt::Desktop && w->testAttribute(Qt::WA_WState_Polished)) {
if (w->style() == QApplicationPrivate::app_style)
QApplicationPrivate::app_style->polish(w); // repolish
#ifndef QT_NO_STYLE_STYLESHEET
else
w->setStyleSheet(w->styleSheet()); // touch
#endif
}
}
for (QWidgetList::ConstIterator it2 = all.constBegin(); it2 != all.constEnd(); ++it2) {
register QWidget *w = *it2;
if (w->windowType() != Qt::Desktop && !w->testAttribute(Qt::WA_SetStyle)) {
QEvent e(QEvent::StyleChange);
QApplication::sendEvent(w, &e);
#ifdef QT3_SUPPORT
if (old)
w->styleChange(*old);
#endif
w->update();
}
}
}
#ifndef QT_NO_STYLE_STYLESHEET
if (QStyleSheetStyle *oldProxy = qobject_cast<QStyleSheetStyle *>(old)) {
oldProxy->deref();
} else
#endif
if (old && old->parent() == qApp) {
delete old;
}
if (QApplicationPrivate::focus_widget) {
QFocusEvent in(QEvent::FocusIn, Qt::OtherFocusReason);
QApplication::sendEvent(QApplicationPrivate::focus_widget->style(), &in);
QApplicationPrivate::focus_widget->update();
}
}
/*!
\overload
Requests a QStyle object for \a style from the QStyleFactory.
The string must be one of the QStyleFactory::keys(), typically one of
"windows", "motif", "cde", "plastique", "windowsxp", or "macintosh". Style
names are case insensitive.
Returns 0 if an unknown \a style is passed, otherwise the QStyle object
returned is set as the application's GUI style.
\warning To ensure that the application's style is set correctly, it is
best to call this function before the QApplication constructor, if
possible.
*/
QStyle* QApplication::setStyle(const QString& style)
{
QStyle *s = QStyleFactory::create(style);
if (!s)
return 0;
setStyle(s);
return s;
}
/*!
\since 4.5
Sets the default graphics backend to \a system, which will be used for
on-screen widgets and QPixmaps. The available systems are \c{"native"},
\c{"raster"} and \c{"opengl"}.
There are several ways to set the graphics backend, in order of decreasing
precedence:
\list
\o the application commandline \c{-graphicssystem} switch
\o QApplication::setGraphicsSystem()
\o the QT_GRAPHICSSYSTEM environment variable
\o the Qt configure \c{-graphicssystem} switch
\endlist
If the highest precedence switch sets an invalid name, the error will be
ignored and the default backend will be used.
\warning This function is only effective before the QApplication constructor
is called.
\note The \c{"opengl"} option is currently experimental.
*/
void QApplication::setGraphicsSystem(const QString &system)
{
#ifdef QT_GRAPHICSSYSTEM_RUNTIME
if (QApplicationPrivate::graphics_system_name == QLatin1String("runtime")) {
QRuntimeGraphicsSystem *r =
static_cast<QRuntimeGraphicsSystem *>(QApplicationPrivate::graphics_system);
r->setGraphicsSystem(system);
} else
#endif
QApplicationPrivate::graphics_system_name = system;
}
/*!
Returns the color specification.
\sa QApplication::setColorSpec()
*/
int QApplication::colorSpec()
{
return QApplicationPrivate::app_cspec;
}
/*!
Sets the color specification for the application to \a spec.
The color specification controls how the application allocates colors when
run on a display with a limited amount of colors, e.g. 8 bit / 256 color
displays.
The color specification must be set before you create the QApplication
object.
The options are:
\list
\o QApplication::NormalColor. This is the default color allocation
strategy. Use this option if your application uses buttons, menus,
texts and pixmaps with few colors. With this option, the
application uses system global colors. This works fine for most
applications under X11, but on the Windows platform, it may cause
dithering of non-standard colors.
\o QApplication::CustomColor. Use this option if your application
needs a small number of custom colors. On X11, this option is the
same as NormalColor. On Windows, Qt creates a Windows palette, and
allocates colors to it on demand.
\o QApplication::ManyColor. Use this option if your application is
very color hungry, e.g., it requires thousands of colors. \br
Under X11 the effect is:
\list
\o For 256-color displays which have at best a 256 color true
color visual, the default visual is used, and colors are
allocated from a color cube. The color cube is the 6x6x6
(216 color) "Web palette" (the red, green, and blue
components always have one of the following values: 0x00,
0x33, 0x66, 0x99, 0xCC, or 0xFF), but the number of colors
can be changed by the \e -ncols option. The user can force
the application to use the true color visual with the
\l{QApplication::QApplication()}{-visual} option.
\o For 256-color displays which have a true color visual with
more than 256 colors, use that visual. Silicon Graphics X
servers this feature, for example. They provide an 8 bit
visual by default but can deliver true color when asked.
\endlist
On Windows, Qt creates a Windows palette, and fills it with a color
cube.
\endlist
Be aware that the CustomColor and ManyColor choices may lead to colormap
flashing: The foreground application gets (most) of the available colors,
while the background windows will look less attractive.
Example:
\snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 2
\sa colorSpec()
*/
void QApplication::setColorSpec(int spec)
{
if (qApp)
qWarning("QApplication::setColorSpec: This function must be "
"called before the QApplication object is created");
QApplicationPrivate::app_cspec = spec;
}
/*!
\property QApplication::globalStrut
\brief the minimum size that any GUI element that the user can interact
with should have
For example, no button should be resized to be smaller than the global
strut size. The strut size should be considered when reimplementing GUI
controls that may be used on touch-screens or similar I/O devices.
Example:
\snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 3
By default, this property contains a QSize object with zero width and height.
*/
QSize QApplication::globalStrut()
{
return QApplicationPrivate::app_strut;
}
void QApplication::setGlobalStrut(const QSize& strut)
{
QApplicationPrivate::app_strut = strut;
}
/*!
Returns the application palette.
\sa setPalette(), QWidget::palette()
*/
QPalette QApplication::palette()
{
if (!QApplicationPrivate::app_pal)
QApplicationPrivate::app_pal = new QPalette(Qt::black);
return *QApplicationPrivate::app_pal;
}
/*!
\fn QPalette QApplication::palette(const QWidget* widget)
\overload
If a \a widget is passed, the default palette for the widget's class is
returned. This may or may not be the application palette. In most cases
there is no special palette for certain types of widgets, but one notable
exception is the popup menu under Windows, if the user has defined a
special background color for menus in the display settings.
\sa setPalette(), QWidget::palette()
*/
QPalette QApplication::palette(const QWidget* w)
{
PaletteHash *hash = app_palettes();
if (w && hash && hash->size()) {
QHash<QByteArray, QPalette>::ConstIterator it = hash->constFind(w->metaObject()->className());
if (it != hash->constEnd())
return *it;
for (it = hash->constBegin(); it != hash->constEnd(); ++it) {
if (w->inherits(it.key()))
return it.value();
}
}
return palette();
}
/*!
\overload
Returns the palette for widgets of the given \a className.
\sa setPalette(), QWidget::palette()
*/
QPalette QApplication::palette(const char *className)
{
if (!QApplicationPrivate::app_pal)
palette();
PaletteHash *hash = app_palettes();
if (className && hash && hash->size()) {
QHash<QByteArray, QPalette>::ConstIterator it = hash->constFind(className);
if (it != hash->constEnd())
return *it;
}
return *QApplicationPrivate::app_pal;
}
void QApplicationPrivate::setPalette_helper(const QPalette &palette, const char* className, bool clearWidgetPaletteHash)
{
QPalette pal = palette;
if (QApplicationPrivate::app_style)
QApplicationPrivate::app_style->polish(pal); // NB: non-const reference
bool all = false;
PaletteHash *hash = app_palettes();
if (!className) {
if (QApplicationPrivate::app_pal && pal.isCopyOf(*QApplicationPrivate::app_pal))
return;
if (!QApplicationPrivate::app_pal)
QApplicationPrivate::app_pal = new QPalette(pal);
else
*QApplicationPrivate::app_pal = pal;
if (hash && hash->size()) {
all = true;
if (clearWidgetPaletteHash)
hash->clear();
}
} else if (hash) {
hash->insert(className, pal);
}
if (QApplicationPrivate::is_app_running && !QApplicationPrivate::is_app_closing) {
// Send ApplicationPaletteChange to qApp itself, and to the widgets.
QEvent e(QEvent::ApplicationPaletteChange);
QApplication::sendEvent(QApplication::instance(), &e);
QWidgetList wids = QApplication::allWidgets();
for (QWidgetList::ConstIterator it = wids.constBegin(); it != wids.constEnd(); ++it) {
register QWidget *w = *it;
if (all || (!className && w->isWindow()) || w->inherits(className)) // matching class
QApplication::sendEvent(w, &e);
}
// Send to all scenes as well.
#ifndef QT_NO_GRAPHICSVIEW
QList<QGraphicsScene *> &scenes = qApp->d_func()->scene_list;
for (QList<QGraphicsScene *>::ConstIterator it = scenes.constBegin();
it != scenes.constEnd(); ++it) {
QApplication::sendEvent(*it, &e);
}
#endif //QT_NO_GRAPHICSVIEW
}
if (!className && (!QApplicationPrivate::sys_pal || !palette.isCopyOf(*QApplicationPrivate::sys_pal))) {
if (!QApplicationPrivate::set_pal)
QApplicationPrivate::set_pal = new QPalette(palette);
else
*QApplicationPrivate::set_pal = palette;
}
}
/*!
Changes the default application palette to \a palette.
If \a className is passed, the change applies only to widgets that inherit
\a className (as reported by QObject::inherits()). If \a className is left
0, the change affects all widgets, thus overriding any previously set class
specific palettes.
The palette may be changed according to the current GUI style in
QStyle::polish().
\warning Do not use this function in conjunction with \l{Qt Style Sheets}.
When using style sheets, the palette of a widget can be customized using
the "color", "background-color", "selection-color",
"selection-background-color" and "alternate-background-color".
\note Some styles do not use the palette for all drawing, for instance, if
they make use of native theme engines. This is the case for the Windows XP,
Windows Vista, and Mac OS X styles.
\sa QWidget::setPalette(), palette(), QStyle::polish()
*/
void QApplication::setPalette(const QPalette &palette, const char* className)
{
QApplicationPrivate::setPalette_helper(palette, className, /*clearWidgetPaletteHash=*/ true);
}
void QApplicationPrivate::setSystemPalette(const QPalette &pal)
{
QPalette adjusted;
#if 0
// adjust the system palette to avoid dithering
QColormap cmap = QColormap::instance();
if (cmap.depths() > 4 && cmap.depths() < 24) {
for (int g = 0; g < QPalette::NColorGroups; g++)
for (int i = 0; i < QPalette::NColorRoles; i++) {
QColor color = pal.color((QPalette::ColorGroup)g, (QPalette::ColorRole)i);
color = cmap.colorAt(cmap.pixel(color));
adjusted.setColor((QPalette::ColorGroup)g, (QPalette::ColorRole) i, color);
}
}
#else
adjusted = pal;
#endif
if (!sys_pal)
sys_pal = new QPalette(adjusted);
else
*sys_pal = adjusted;
if (!QApplicationPrivate::set_pal)
QApplication::setPalette(*sys_pal);
}
/*!
Returns the default application font.
\sa fontMetrics(), QWidget::font()
*/
QFont QApplication::font()
{
QMutexLocker locker(applicationFontMutex());
if (!QApplicationPrivate::app_font)
QApplicationPrivate::app_font = new QFont(QLatin1String("Helvetica"));
return *QApplicationPrivate::app_font;
}
/*!
\overload
Returns the default font for the \a widget.
\sa fontMetrics(), QWidget::setFont()
*/
QFont QApplication::font(const QWidget *widget)
{
FontHash *hash = app_fonts();
#ifdef Q_WS_MAC
// short circuit for small and mini controls
if (widget->testAttribute(Qt::WA_MacSmallSize)) {
return hash->value("QSmallFont");
} else if (widget->testAttribute(Qt::WA_MacMiniSize)) {
return hash->value("QMiniFont");
}
#endif
if (widget && hash && hash->size()) {
QHash<QByteArray, QFont>::ConstIterator it =
hash->constFind(widget->metaObject()->className());
if (it != hash->constEnd())
return it.value();
for (it = hash->constBegin(); it != hash->constEnd(); ++it) {
if (widget->inherits(it.key()))
return it.value();
}
}
return font();
}
/*!
\overload
Returns the font for widgets of the given \a className.
\sa setFont(), QWidget::font()
*/
QFont QApplication::font(const char *className)
{
FontHash *hash = app_fonts();
if (className && hash && hash->size()) {
QHash<QByteArray, QFont>::ConstIterator it = hash->constFind(className);
if (it != hash->constEnd())
return *it;
}
return font();
}
/*!
Changes the default application font to \a font. If \a className is passed,
the change applies only to classes that inherit \a className (as reported
by QObject::inherits()).
On application start-up, the default font depends on the window system. It
can vary depending on both the window system version and the locale. This
function lets you override the default font; but overriding may be a bad
idea because, for example, some locales need extra large fonts to support
their special characters.
\warning Do not use this function in conjunction with \l{Qt Style Sheets}.
The font of an application can be customized using the "font" style sheet
property. To set a bold font for all QPushButtons, set the application
styleSheet() as "QPushButton { font: bold }"
\sa font(), fontMetrics(), QWidget::setFont()
*/
void QApplication::setFont(const QFont &font, const char *className)
{
bool all = false;
FontHash *hash = app_fonts();
if (!className) {
QMutexLocker locker(applicationFontMutex());
if (!QApplicationPrivate::app_font)
QApplicationPrivate::app_font = new QFont(font);
else
*QApplicationPrivate::app_font = font;
if (hash && hash->size()) {
all = true;
hash->clear();
}
} else if (hash) {
hash->insert(className, font);
}
if (QApplicationPrivate::is_app_running && !QApplicationPrivate::is_app_closing) {
// Send ApplicationFontChange to qApp itself, and to the widgets.
QEvent e(QEvent::ApplicationFontChange);
QApplication::sendEvent(QApplication::instance(), &e);
QWidgetList wids = QApplication::allWidgets();
for (QWidgetList::ConstIterator it = wids.constBegin(); it != wids.constEnd(); ++it) {
register QWidget *w = *it;
if (all || (!className && w->isWindow()) || w->inherits(className)) // matching class
sendEvent(w, &e);
}
#ifndef QT_NO_GRAPHICSVIEW
// Send to all scenes as well.
QList<QGraphicsScene *> &scenes = qApp->d_func()->scene_list;
for (QList<QGraphicsScene *>::ConstIterator it = scenes.constBegin();
it != scenes.constEnd(); ++it) {
QApplication::sendEvent(*it, &e);
}
#endif //QT_NO_GRAPHICSVIEW
}
if (!className && (!QApplicationPrivate::sys_font || !font.isCopyOf(*QApplicationPrivate::sys_font))) {
if (!QApplicationPrivate::set_font)
QApplicationPrivate::set_font = new QFont(font);
else
*QApplicationPrivate::set_font = font;
}
}
/*! \internal
*/
void QApplicationPrivate::setSystemFont(const QFont &font)
{
if (!sys_font)
sys_font = new QFont(font);
else
*sys_font = font;
if (!QApplicationPrivate::set_font)
QApplication::setFont(*sys_font);
}
/*! \internal
*/
QString QApplicationPrivate::desktopStyleKey()
{
return qt_guiPlatformPlugin()->styleName();
}
/*!
\property QApplication::windowIcon
\brief the default window icon
\sa QWidget::setWindowIcon(), {Setting the Application Icon}
*/
QIcon QApplication::windowIcon()
{
return QApplicationPrivate::app_icon ? *QApplicationPrivate::app_icon : QIcon();
}
void QApplication::setWindowIcon(const QIcon &icon)
{
if (!QApplicationPrivate::app_icon)
QApplicationPrivate::app_icon = new QIcon();
*QApplicationPrivate::app_icon = icon;
if (QApplicationPrivate::is_app_running && !QApplicationPrivate::is_app_closing) {
#ifdef Q_WS_MAC
void qt_mac_set_app_icon(const QPixmap &); //qapplication_mac.cpp
QSize size = QApplicationPrivate::app_icon->actualSize(QSize(128, 128));
qt_mac_set_app_icon(QApplicationPrivate::app_icon->pixmap(size));
#endif
QEvent e(QEvent::ApplicationWindowIconChange);
QWidgetList all = QApplication::allWidgets();
for (QWidgetList::ConstIterator it = all.constBegin(); it != all.constEnd(); ++it) {
register QWidget *w = *it;
if (w->isWindow())
sendEvent(w, &e);
}
}
}
/*!
Returns a list of the top-level widgets (windows) in the application.
\note Some of the top-level widgets may be hidden, for example a tooltip if
no tooltip is currently shown.
Example:
\snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 4
\sa allWidgets(), QWidget::isWindow(), QWidget::isHidden()
*/
QWidgetList QApplication::topLevelWidgets()
{
QWidgetList list;
QWidgetList all = allWidgets();
for (QWidgetList::ConstIterator it = all.constBegin(); it != all.constEnd(); ++it) {
QWidget *w = *it;
if (w->isWindow() && w->windowType() != Qt::Desktop)
list.append(w);
}
return list;
}
/*!
Returns a list of all the widgets in the application.
The list is empty (QList::isEmpty()) if there are no widgets.
\note Some of the widgets may be hidden.
Example:
\snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 5
\sa topLevelWidgets(), QWidget::isVisible()
*/
QWidgetList QApplication::allWidgets()
{
if (QWidgetPrivate::allWidgets)
return QWidgetPrivate::allWidgets->toList();
return QWidgetList();
}
/*!
Returns the application widget that has the keyboard input focus, or 0 if
no widget in this application has the focus.
\sa QWidget::setFocus(), QWidget::hasFocus(), activeWindow(), focusChanged()
*/
QWidget *QApplication::focusWidget()
{
return QApplicationPrivate::focus_widget;
}
void QApplicationPrivate::setFocusWidget(QWidget *focus, Qt::FocusReason reason)
{
#ifndef QT_NO_GRAPHICSVIEW
if (focus && focus->window()->graphicsProxyWidget())
return;
#endif
hidden_focus_widget = 0;
if (focus != focus_widget) {
if (focus && focus->isHidden()) {
hidden_focus_widget = focus;
return;
}
if (focus && (reason == Qt::BacktabFocusReason || reason == Qt::TabFocusReason)
&& qt_in_tab_key_event)
focus->window()->setAttribute(Qt::WA_KeyboardFocusChange);
else if (focus && reason == Qt::ShortcutFocusReason) {
focus->window()->setAttribute(Qt::WA_KeyboardFocusChange);
}
QWidget *prev = focus_widget;
focus_widget = focus;
#ifndef QT_NO_IM
if (prev && ((reason != Qt::PopupFocusReason && reason != Qt::MenuBarFocusReason
&& prev->testAttribute(Qt::WA_InputMethodEnabled))
// Do reset the input context, in case the new focus widget won't accept keyboard input
// or it is not created fully yet.
|| (focus_widget && (!focus_widget->testAttribute(Qt::WA_InputMethodEnabled)
|| !focus_widget->testAttribute(Qt::WA_WState_Created))))) {
QInputContext *qic = prev->inputContext();
if(qic) {
qic->reset();
qic->setFocusWidget(0);
}
}
#endif //QT_NO_IM
if(focus_widget)
focus_widget->d_func()->setFocus_sys();
if (reason != Qt::NoFocusReason) {
//send events
if (prev) {
#ifdef QT_KEYPAD_NAVIGATION
if (QApplication::keypadNavigationEnabled()) {
if (prev->hasEditFocus() && reason != Qt::PopupFocusReason
#ifdef Q_OS_SYMBIAN
&& reason != Qt::ActiveWindowFocusReason
#endif
)
prev->setEditFocus(false);
}
#endif
#ifndef QT_NO_IM
if (focus) {
QInputContext *prevIc;
prevIc = prev->inputContext();
if (prevIc && prevIc != focus->inputContext()) {
QEvent closeSIPEvent(QEvent::CloseSoftwareInputPanel);
QApplication::sendEvent(prev, &closeSIPEvent);
}
}
#endif
QFocusEvent out(QEvent::FocusOut, reason);
QPointer<QWidget> that = prev;
QApplication::sendEvent(prev, &out);
if (that)
QApplication::sendEvent(that->style(), &out);
}
if(focus && QApplicationPrivate::focus_widget == focus) {
#ifndef QT_NO_IM
if (focus->testAttribute(Qt::WA_InputMethodEnabled)) {
QInputContext *qic = focus->inputContext();
if (qic && focus->testAttribute(Qt::WA_WState_Created)
&& focus->isEnabled())
qic->setFocusWidget(focus);
}
#endif //QT_NO_IM
QFocusEvent in(QEvent::FocusIn, reason);
QPointer<QWidget> that = focus;
QApplication::sendEvent(focus, &in);
if (that)
QApplication::sendEvent(that->style(), &in);
}
emit qApp->focusChanged(prev, focus_widget);
}
}
}
/*!
Returns the application top-level window that has the keyboard input focus,
or 0 if no application window has the focus. There might be an
activeWindow() even if there is no focusWidget(), for example if no widget
in that window accepts key events.
\sa QWidget::setFocus(), QWidget::hasFocus(), focusWidget()
*/
QWidget *QApplication::activeWindow()
{
return QApplicationPrivate::active_window;
}
/*!
Returns display (screen) font metrics for the application font.
\sa font(), setFont(), QWidget::fontMetrics(), QPainter::fontMetrics()
*/
QFontMetrics QApplication::fontMetrics()
{
return desktop()->fontMetrics();
}
/*!
Closes all top-level windows.
This function is particularly useful for applications with many top-level
windows. It could, for example, be connected to a \gui{Exit} entry in the
\gui{File} menu:
\snippet examples/mainwindows/mdi/mainwindow.cpp 0
The windows are closed in random order, until one window does not accept
the close event. The application quits when the last window was
successfully closed; this can be turned off by setting
\l quitOnLastWindowClosed to false.
\sa quitOnLastWindowClosed, lastWindowClosed(), QWidget::close(),
QWidget::closeEvent(), lastWindowClosed(), quit(), topLevelWidgets(),
QWidget::isWindow()
*/
void QApplication::closeAllWindows()
{
bool did_close = true;
QWidget *w;
while ((w = activeModalWidget()) && did_close) {
if (!w->isVisible() || w->data->is_closing)
break;
did_close = w->close();
}
QWidgetList list = QApplication::topLevelWidgets();
for (int i = 0; did_close && i < list.size(); ++i) {
w = list.at(i);
if (w->isVisible()
&& w->windowType() != Qt::Desktop
&& !w->data->is_closing) {
did_close = w->close();
list = QApplication::topLevelWidgets();
i = -1;
}
}
}
/*!
Displays a simple message box about Qt. The message includes the version
number of Qt being used by the application.
This is useful for inclusion in the \gui Help menu of an application, as
shown in the \l{mainwindows/menus}{Menus} example.
This function is a convenience slot for QMessageBox::aboutQt().
*/
void QApplication::aboutQt()
{
#ifndef QT_NO_MESSAGEBOX
QMessageBox::aboutQt(
#ifdef Q_WS_MAC
0
#else
activeWindow()
#endif // Q_WS_MAC
);
#endif // QT_NO_MESSAGEBOX
}
/*!
\fn void QApplication::lastWindowClosed()
This signal is emitted from QApplication::exec() when the last visible
primary window (i.e. window with no parent) with the Qt::WA_QuitOnClose
attribute set is closed.
By default,
\list
\o this attribute is set for all widgets except transient windows such
as splash screens, tool windows, and popup menus
\o QApplication implicitly quits when this signal is emitted.
\endlist
This feature can be turned off by setting \l quitOnLastWindowClosed to
false.
\sa QWidget::close()
*/
/*!
\since 4.1
\fn void QApplication::focusChanged(QWidget *old, QWidget *now)
This signal is emitted when the widget that has keyboard focus changed from
\a old to \a now, i.e., because the user pressed the tab-key, clicked into
a widget or changed the active window. Both \a old and \a now can be the
null-pointer.
The signal is emitted after both widget have been notified about the change
through QFocusEvent.
\sa QWidget::setFocus(), QWidget::clearFocus(), Qt::FocusReason
*/
/*!
\since 4.5
\fn void QApplication::fontDatabaseChanged()
This signal is emitted when application fonts are loaded or removed.
\sa QFontDatabase::addApplicationFont(),
QFontDatabase::addApplicationFontFromData(),
QFontDatabase::removeAllApplicationFonts(),
QFontDatabase::removeApplicationFont()
*/
#ifndef QT_NO_TRANSLATION
static bool qt_detectRTLLanguage()
{
return force_reverse ^
(QApplication::tr("QT_LAYOUT_DIRECTION",
"Translate this string to the string 'LTR' in left-to-right"
" languages or to 'RTL' in right-to-left languages (such as Hebrew"
" and Arabic) to get proper widget layout.") == QLatin1String("RTL"));
}
#if defined(Q_WS_MAC)
static const char *application_menu_strings[] = {
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Services"),
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Hide %1"),
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Hide Others"),
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Show All"),
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Preferences..."),
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Quit %1"),
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","About %1")
};
QString qt_mac_applicationmenu_string(int type)
{
QString menuString = QString::fromLatin1(application_menu_strings[type]);
QString translated = qApp->translate("QMenuBar", application_menu_strings[type]);
if (translated != menuString)
return translated;
else
return qApp->translate("MAC_APPLICATION_MENU",
application_menu_strings[type]);
}
#endif
#endif
/*!\reimp
*/
bool QApplication::event(QEvent *e)
{
Q_D(QApplication);
if(e->type() == QEvent::Close) {
QCloseEvent *ce = static_cast<QCloseEvent*>(e);
ce->accept();
closeAllWindows();
QWidgetList list = topLevelWidgets();
for (int i = 0; i < list.size(); ++i) {
QWidget *w = list.at(i);
if (w->isVisible() && !(w->windowType() == Qt::Desktop) && !(w->windowType() == Qt::Popup) &&
(!(w->windowType() == Qt::Dialog) || !w->parentWidget())) {
ce->ignore();
break;
}
}
if(ce->isAccepted())
return true;
} else if(e->type() == QEvent::LanguageChange) {
#ifndef QT_NO_TRANSLATION
setLayoutDirection(qt_detectRTLLanguage()?Qt::RightToLeft:Qt::LeftToRight);
#endif
#if defined(QT_MAC_USE_COCOA)
qt_mac_post_retranslateAppMenu();
#endif
QWidgetList list = topLevelWidgets();
for (int i = 0; i < list.size(); ++i) {
QWidget *w = list.at(i);
if (!(w->windowType() == Qt::Desktop))
postEvent(w, new QEvent(QEvent::LanguageChange));
}
#ifndef Q_OS_WIN
} else if (e->type() == QEvent::LocaleChange) {
// on Windows the event propagation is taken care by the
// WM_SETTINGCHANGE event handler.
QWidgetList list = topLevelWidgets();
for (int i = 0; i < list.size(); ++i) {
QWidget *w = list.at(i);
if (!(w->windowType() == Qt::Desktop)) {
if (!w->testAttribute(Qt::WA_SetLocale))
w->d_func()->setLocale_helper(QLocale(), true);
}
}
#endif
} else if (e->type() == QEvent::Timer) {
QTimerEvent *te = static_cast<QTimerEvent*>(e);
Q_ASSERT(te != 0);
if (te->timerId() == d->toolTipWakeUp.timerId()) {
d->toolTipWakeUp.stop();
if (d->toolTipWidget) {
QWidget *w = d->toolTipWidget->window();
// show tooltip if WA_AlwaysShowToolTips is set, or if
// any ancestor of d->toolTipWidget is the active
// window
bool showToolTip = w->testAttribute(Qt::WA_AlwaysShowToolTips);
while (w && !showToolTip) {
showToolTip = w->isActiveWindow();
w = w->parentWidget();
w = w ? w->window() : 0;
}
if (showToolTip) {
QHelpEvent e(QEvent::ToolTip, d->toolTipPos, d->toolTipGlobalPos);
QApplication::sendEvent(d->toolTipWidget, &e);
if (e.isAccepted())
d->toolTipFallAsleep.start(2000, this);
}
}
} else if (te->timerId() == d->toolTipFallAsleep.timerId()) {
d->toolTipFallAsleep.stop();
}
}
return QCoreApplication::event(e);
}
#if !defined(Q_WS_X11)
// The doc and X implementation of this function is in qapplication_x11.cpp
void QApplication::syncX() {} // do nothing
#endif
/*!
\fn Qt::WindowsVersion QApplication::winVersion()
Use \l QSysInfo::WindowsVersion instead.
*/
/*!
\fn void QApplication::setActiveWindow(QWidget* active)
Sets the active window to the \a active widget in response to a system
event. The function is called from the platform specific event handlers.
\warning This function does \e not set the keyboard focus to the active
widget. Call QWidget::activateWindow() instead.
It sets the activeWindow() and focusWidget() attributes and sends proper
\l{QEvent::WindowActivate}{WindowActivate}/\l{QEvent::WindowDeactivate}
{WindowDeactivate} and \l{QEvent::FocusIn}{FocusIn}/\l{QEvent::FocusOut}
{FocusOut} events to all appropriate widgets. The window will then be
painted in active state (e.g. cursors in line edits will blink), and it
will have tool tips enabled.
\sa activeWindow(), QWidget::activateWindow()
*/
void QApplication::setActiveWindow(QWidget* act)
{
QWidget* window = act?act->window():0;
if (QApplicationPrivate::active_window == window)
return;
#ifndef QT_NO_GRAPHICSVIEW
if (window && window->graphicsProxyWidget()) {
// Activate the proxy's view->viewport() ?
return;
}
#endif
QWidgetList toBeActivated;
QWidgetList toBeDeactivated;
if (QApplicationPrivate::active_window) {
if (style()->styleHint(QStyle::SH_Widget_ShareActivation, 0, QApplicationPrivate::active_window)) {
QWidgetList list = topLevelWidgets();
for (int i = 0; i < list.size(); ++i) {
QWidget *w = list.at(i);
if (w->isVisible() && w->isActiveWindow())
toBeDeactivated.append(w);
}
} else {
toBeDeactivated.append(QApplicationPrivate::active_window);
}
}
#if !defined(Q_WS_MAC)
QWidget *previousActiveWindow = QApplicationPrivate::active_window;
#endif
QApplicationPrivate::active_window = window;
if (QApplicationPrivate::active_window) {
if (style()->styleHint(QStyle::SH_Widget_ShareActivation, 0, QApplicationPrivate::active_window)) {
QWidgetList list = topLevelWidgets();
for (int i = 0; i < list.size(); ++i) {
QWidget *w = list.at(i);
if (w->isVisible() && w->isActiveWindow())
toBeActivated.append(w);
}
} else {
toBeActivated.append(QApplicationPrivate::active_window);
}
}
// first the activation/deactivation events
QEvent activationChange(QEvent::ActivationChange);
QEvent windowActivate(QEvent::WindowActivate);
QEvent windowDeactivate(QEvent::WindowDeactivate);
#if !defined(Q_WS_MAC)
if (!previousActiveWindow) {
QEvent appActivate(QEvent::ApplicationActivate);
sendSpontaneousEvent(qApp, &appActivate);
}
#endif
for (int i = 0; i < toBeActivated.size(); ++i) {
QWidget *w = toBeActivated.at(i);
sendSpontaneousEvent(w, &windowActivate);
sendSpontaneousEvent(w, &activationChange);
}
#ifdef QT_MAC_USE_COCOA
// In case the user clicked on a child window, we need to
// reestablish the stacking order of the window so
// it pops in front of other child windows in cocoa:
qt_cocoaStackChildWindowOnTopOfOtherChildren(window);
#endif
for(int i = 0; i < toBeDeactivated.size(); ++i) {
QWidget *w = toBeDeactivated.at(i);
sendSpontaneousEvent(w, &windowDeactivate);
sendSpontaneousEvent(w, &activationChange);
}
#if !defined(Q_WS_MAC)
if (!QApplicationPrivate::active_window) {
QEvent appDeactivate(QEvent::ApplicationDeactivate);
sendSpontaneousEvent(qApp, &appDeactivate);
}
#endif
if (QApplicationPrivate::popupWidgets == 0) { // !inPopupMode()
// then focus events
if (!QApplicationPrivate::active_window && QApplicationPrivate::focus_widget) {
QApplicationPrivate::setFocusWidget(0, Qt::ActiveWindowFocusReason);
} else if (QApplicationPrivate::active_window) {
QWidget *w = QApplicationPrivate::active_window->focusWidget();
if (w && w->isVisible() /*&& w->focusPolicy() != QWidget::NoFocus*/)
w->setFocus(Qt::ActiveWindowFocusReason);
else {
w = QApplicationPrivate::focusNextPrevChild_helper(QApplicationPrivate::active_window, true);
if (w) {
w->setFocus(Qt::ActiveWindowFocusReason);
} else {
// If the focus widget is not in the activate_window, clear the focus
w = QApplicationPrivate::focus_widget;
if (!w && QApplicationPrivate::active_window->focusPolicy() != Qt::NoFocus)
QApplicationPrivate::setFocusWidget(QApplicationPrivate::active_window, Qt::ActiveWindowFocusReason);
else if (!QApplicationPrivate::active_window->isAncestorOf(w))
QApplicationPrivate::setFocusWidget(0, Qt::ActiveWindowFocusReason);
}
}
}
}
}
/*!internal
* Helper function that returns the new focus widget, but does not set the focus reason.
* Returns 0 if a new focus widget could not be found.
* Shared with QGraphicsProxyWidgetPrivate::findFocusChild()
*/
QWidget *QApplicationPrivate::focusNextPrevChild_helper(QWidget *toplevel, bool next)
{
uint focus_flag = qt_tab_all_widgets ? Qt::TabFocus : Qt::StrongFocus;
QWidget *f = toplevel->focusWidget();
if (!f)
f = toplevel;
QWidget *w = f;
QWidget *test = f->d_func()->focus_next;
while (test && test != f) {
if ((test->focusPolicy() & focus_flag) == focus_flag
&& !(test->d_func()->extra && test->d_func()->extra->focus_proxy)
&& test->isVisibleTo(toplevel) && test->isEnabled()
&& !(w->windowType() == Qt::SubWindow && !w->isAncestorOf(test))
&& (toplevel->windowType() != Qt::SubWindow || toplevel->isAncestorOf(test))) {
w = test;
if (next)
break;
}
test = test->d_func()->focus_next;
}
if (w == f) {
if (qt_in_tab_key_event) {
w->window()->setAttribute(Qt::WA_KeyboardFocusChange);
w->update();
}
return 0;
}
return w;
}
/*!
\fn void QApplicationPrivate::dispatchEnterLeave(QWidget* enter, QWidget* leave)
\internal
Creates the proper Enter/Leave event when widget \a enter is entered and
widget \a leave is left.
*/
void QApplicationPrivate::dispatchEnterLeave(QWidget* enter, QWidget* leave) {
#if 0
if (leave) {
QEvent e(QEvent::Leave);
QApplication::sendEvent(leave, & e);
}
if (enter) {
QEvent e(QEvent::Enter);
QApplication::sendEvent(enter, & e);
}
return;
#endif
QWidget* w ;
if ((!enter && !leave) || (enter == leave))
return;
#ifdef ALIEN_DEBUG
qDebug() << "QApplicationPrivate::dispatchEnterLeave, ENTER:" << enter << "LEAVE:" << leave;
#endif
QWidgetList leaveList;
QWidgetList enterList;
bool sameWindow = leave && enter && leave->window() == enter->window();
if (leave && !sameWindow) {
w = leave;
do {
leaveList.append(w);
} while (!w->isWindow() && (w = w->parentWidget()));
}
if (enter && !sameWindow) {
w = enter;
do {
enterList.prepend(w);
} while (!w->isWindow() && (w = w->parentWidget()));
}
if (sameWindow) {
int enterDepth = 0;
int leaveDepth = 0;
w = enter;
while (!w->isWindow() && (w = w->parentWidget()))
enterDepth++;
w = leave;
while (!w->isWindow() && (w = w->parentWidget()))
leaveDepth++;
QWidget* wenter = enter;
QWidget* wleave = leave;
while (enterDepth > leaveDepth) {
wenter = wenter->parentWidget();
enterDepth--;
}
while (leaveDepth > enterDepth) {
wleave = wleave->parentWidget();
leaveDepth--;
}
while (!wenter->isWindow() && wenter != wleave) {
wenter = wenter->parentWidget();
wleave = wleave->parentWidget();
}
w = leave;
while (w != wleave) {
leaveList.append(w);
w = w->parentWidget();
}
w = enter;
while (w != wenter) {
enterList.prepend(w);
w = w->parentWidget();
}
}
QEvent leaveEvent(QEvent::Leave);
for (int i = 0; i < leaveList.size(); ++i) {
w = leaveList.at(i);
if (!QApplication::activeModalWidget() || QApplicationPrivate::tryModalHelper(w, 0)) {
#if defined(Q_WS_WIN) || defined(Q_WS_X11)
if (leaveAfterRelease == w)
leaveAfterRelease = 0;
#endif
QApplication::sendEvent(w, &leaveEvent);
if (w->testAttribute(Qt::WA_Hover) &&
(!QApplication::activePopupWidget() || QApplication::activePopupWidget() == w->window())) {
Q_ASSERT(instance());
QHoverEvent he(QEvent::HoverLeave, QPoint(-1, -1), w->mapFromGlobal(QApplicationPrivate::instance()->hoverGlobalPos));
qApp->d_func()->notify_helper(w, &he);
}
}
}
QPoint posEnter = QCursor::pos();
QEvent enterEvent(QEvent::Enter);
for (int i = 0; i < enterList.size(); ++i) {
w = enterList.at(i);
if (!QApplication::activeModalWidget() || QApplicationPrivate::tryModalHelper(w, 0)) {
QApplication::sendEvent(w, &enterEvent);
if (w->testAttribute(Qt::WA_Hover) &&
(!QApplication::activePopupWidget() || QApplication::activePopupWidget() == w->window())) {
QHoverEvent he(QEvent::HoverEnter, w->mapFromGlobal(posEnter), QPoint(-1, -1));
qApp->d_func()->notify_helper(w, &he);
}
}
}
#ifndef QT_NO_CURSOR
// Update cursor for alien/graphics widgets.
const bool enterOnAlien = (enter && (isAlien(enter) || enter->testAttribute(Qt::WA_DontShowOnScreen)));
#if defined(Q_WS_X11)
//Whenever we leave an alien widget on X11, we need to reset its nativeParentWidget()'s cursor.
// This is not required on Windows as the cursor is reset on every single mouse move.
QWidget *parentOfLeavingCursor = 0;
for (int i = 0; i < leaveList.size(); ++i) {
w = leaveList.at(i);
if (!isAlien(w))
break;
if (w->testAttribute(Qt::WA_SetCursor)) {
QWidget *parent = w->parentWidget();
while (parent && parent->d_func()->data.in_destructor)
parent = parent->parentWidget();
parentOfLeavingCursor = parent;
//continue looping, we need to find the downest alien widget with a cursor.
// (downest on the screen)
}
}
//check that we will not call qt_x11_enforce_cursor twice with the same native widget
if (parentOfLeavingCursor && (!enterOnAlien
|| parentOfLeavingCursor->effectiveWinId() != enter->effectiveWinId())) {
#ifndef QT_NO_GRAPHICSVIEW
if (!parentOfLeavingCursor->window()->graphicsProxyWidget())
#endif
{
qt_x11_enforce_cursor(parentOfLeavingCursor,true);
}
}
#endif
if (enterOnAlien) {
QWidget *cursorWidget = enter;
while (!cursorWidget->isWindow() && !cursorWidget->isEnabled())
cursorWidget = cursorWidget->parentWidget();
if (!cursorWidget)
return;
#ifndef QT_NO_GRAPHICSVIEW
if (cursorWidget->window()->graphicsProxyWidget()) {
QWidgetPrivate::nearestGraphicsProxyWidget(cursorWidget)->setCursor(cursorWidget->cursor());
} else
#endif
{
#if defined(Q_WS_WIN)
qt_win_set_cursor(cursorWidget, true);
#elif defined(Q_WS_X11)
qt_x11_enforce_cursor(cursorWidget, true);
#elif defined(Q_OS_SYMBIAN)
qt_symbian_set_cursor(cursorWidget, true);
#endif
}
}
#endif
}
/* exported for the benefit of testing tools */
Q_GUI_EXPORT bool qt_tryModalHelper(QWidget *widget, QWidget **rettop)
{
return QApplicationPrivate::tryModalHelper(widget, rettop);
}
/*! \internal
Returns true if \a widget is blocked by a modal window.
*/
bool QApplicationPrivate::isBlockedByModal(QWidget *widget)
{
widget = widget->window();
if (!modalState())
return false;
if (QApplication::activePopupWidget() == widget)
return false;
for (int i = 0; i < qt_modal_stack->size(); ++i) {
QWidget *modalWidget = qt_modal_stack->at(i);
{
// check if the active modal widget is our widget or a parent of our widget
QWidget *w = widget;
while (w) {
if (w == modalWidget)
return false;
w = w->parentWidget();
}
#ifdef Q_WS_WIN
if ((widget->testAttribute(Qt::WA_WState_Created) || widget->data->winid)
&& (modalWidget->testAttribute(Qt::WA_WState_Created) || modalWidget->data->winid)
&& IsChild(modalWidget->data->winid, widget->data->winid))
return false;
#endif
}
Qt::WindowModality windowModality = modalWidget->windowModality();
if (windowModality == Qt::NonModal) {
// determine the modality type if it hasn't been set on the
// modalWidget, this normally happens when waiting for a
// native dialog. use WindowModal if we are the child of a
// group leader; otherwise use ApplicationModal.
QWidget *m = modalWidget;
while (m && !m->testAttribute(Qt::WA_GroupLeader)) {
m = m->parentWidget();
if (m)
m = m->window();
}
windowModality = (m && m->testAttribute(Qt::WA_GroupLeader))
? Qt::WindowModal
: Qt::ApplicationModal;
}
switch (windowModality) {
case Qt::ApplicationModal:
{
QWidget *groupLeaderForWidget = widget;
while (groupLeaderForWidget && !groupLeaderForWidget->testAttribute(Qt::WA_GroupLeader))
groupLeaderForWidget = groupLeaderForWidget->parentWidget();
if (groupLeaderForWidget) {
// if \a widget has WA_GroupLeader, it can only be blocked by ApplicationModal children
QWidget *m = modalWidget;
while (m && m != groupLeaderForWidget && !m->testAttribute(Qt::WA_GroupLeader))
m = m->parentWidget();
if (m == groupLeaderForWidget)
return true;
} else if (modalWidget != widget) {
return true;
}
break;
}
case Qt::WindowModal:
{
QWidget *w = widget;
do {
QWidget *m = modalWidget;
do {
if (m == w)
return true;
m = m->parentWidget();
if (m)
m = m->window();
} while (m);
w = w->parentWidget();
if (w)
w = w->window();
} while (w);
break;
}
default:
Q_ASSERT_X(false, "QApplication", "internal error, a modal widget cannot be modeless");
break;
}
}
return false;
}
/*!\internal
*/
void QApplicationPrivate::enterModal(QWidget *widget)
{
QSet<QWidget*> blocked;
QList<QWidget*> windows = QApplication::topLevelWidgets();
for (int i = 0; i < windows.count(); ++i) {
QWidget *window = windows.at(i);
if (window->windowType() != Qt::Tool && isBlockedByModal(window))
blocked.insert(window);
}
enterModal_sys(widget);
windows = QApplication::topLevelWidgets();
QEvent e(QEvent::WindowBlocked);
for (int i = 0; i < windows.count(); ++i) {
QWidget *window = windows.at(i);
if (!blocked.contains(window) && window->windowType() != Qt::Tool && isBlockedByModal(window))
QApplication::sendEvent(window, &e);
}
}
/*!\internal
*/
void QApplicationPrivate::leaveModal(QWidget *widget)
{
QSet<QWidget*> blocked;
QList<QWidget*> windows = QApplication::topLevelWidgets();
for (int i = 0; i < windows.count(); ++i) {
QWidget *window = windows.at(i);
if (window->windowType() != Qt::Tool && isBlockedByModal(window))
blocked.insert(window);
}
leaveModal_sys(widget);
windows = QApplication::topLevelWidgets();
QEvent e(QEvent::WindowUnblocked);
for (int i = 0; i < windows.count(); ++i) {
QWidget *window = windows.at(i);
if(blocked.contains(window) && window->windowType() != Qt::Tool && !isBlockedByModal(window))
QApplication::sendEvent(window, &e);
}
}
/*!\internal
Called from qapplication_\e{platform}.cpp, returns true
if the widget should accept the event.
*/
bool QApplicationPrivate::tryModalHelper(QWidget *widget, QWidget **rettop)
{
QWidget *top = QApplication::activeModalWidget();
if (rettop)
*rettop = top;
// the active popup widget always gets the input event
if (QApplication::activePopupWidget())
return true;
#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
top = QApplicationPrivate::tryModalHelper_sys(top);
if (rettop)
*rettop = top;
#endif
return !isBlockedByModal(widget->window());
}
/*
\internal
*/
QWidget *QApplicationPrivate::pickMouseReceiver(QWidget *candidate, const QPoint &globalPos,
QPoint &pos, QEvent::Type type,
Qt::MouseButtons buttons, QWidget *buttonDown,
QWidget *alienWidget)
{
Q_ASSERT(candidate);
QWidget *mouseGrabber = QWidget::mouseGrabber();
if (((type == QEvent::MouseMove && buttons) || (type == QEvent::MouseButtonRelease))
&& !buttonDown && !mouseGrabber) {
return 0;
}
if (alienWidget && alienWidget->internalWinId())
alienWidget = 0;
QWidget *receiver = candidate;
if (!mouseGrabber)
mouseGrabber = (buttonDown && !isBlockedByModal(buttonDown)) ? buttonDown : alienWidget;
if (mouseGrabber && mouseGrabber != candidate) {
receiver = mouseGrabber;
pos = receiver->mapFromGlobal(globalPos);
#ifdef ALIEN_DEBUG
qDebug() << " ** receiver adjusted to:" << receiver << "pos:" << pos;
#endif
}
return receiver;
}
/*
\internal
*/
bool QApplicationPrivate::sendMouseEvent(QWidget *receiver, QMouseEvent *event,
QWidget *alienWidget, QWidget *nativeWidget,
QWidget **buttonDown, QPointer<QWidget> &lastMouseReceiver,
bool spontaneous)
{
Q_ASSERT(receiver);
Q_ASSERT(event);
Q_ASSERT(nativeWidget);
Q_ASSERT(buttonDown);
if (alienWidget && !isAlien(alienWidget))
alienWidget = 0;
QPointer<QWidget> receiverGuard = receiver;
QPointer<QWidget> nativeGuard = nativeWidget;
QPointer<QWidget> alienGuard = alienWidget;
QPointer<QWidget> activePopupWidget = QApplication::activePopupWidget();
const bool graphicsWidget = nativeWidget->testAttribute(Qt::WA_DontShowOnScreen);
if (*buttonDown) {
if (!graphicsWidget) {
// Register the widget that shall receive a leave event
// after the last button is released.
if ((alienWidget || !receiver->internalWinId()) && !leaveAfterRelease && !QWidget::mouseGrabber())
leaveAfterRelease = *buttonDown;
if (event->type() == QEvent::MouseButtonRelease && !event->buttons())
*buttonDown = 0;
}
} else if (lastMouseReceiver) {
// Dispatch enter/leave if we move:
// 1) from an alien widget to another alien widget or
// from a native widget to an alien widget (first OR case)
// 2) from an alien widget to a native widget (second OR case)
if ((alienWidget && alienWidget != lastMouseReceiver)
|| (isAlien(lastMouseReceiver) && !alienWidget)) {
if (activePopupWidget) {
if (!QWidget::mouseGrabber())
dispatchEnterLeave(alienWidget ? alienWidget : nativeWidget, lastMouseReceiver);
} else {
dispatchEnterLeave(receiver, lastMouseReceiver);
}
}
}
#ifdef ALIEN_DEBUG
qDebug() << "QApplicationPrivate::sendMouseEvent: receiver:" << receiver
<< "pos:" << event->pos() << "alien" << alienWidget << "button down"
<< *buttonDown << "last" << lastMouseReceiver << "leave after release"
<< leaveAfterRelease;
#endif
// We need this quard in case someone opens a modal dialog / popup. If that's the case
// leaveAfterRelease is set to null, but we shall not update lastMouseReceiver.
const bool wasLeaveAfterRelease = leaveAfterRelease != 0;
bool result;
if (spontaneous)
result = QApplication::sendSpontaneousEvent(receiver, event);
else
result = QApplication::sendEvent(receiver, event);
if (!graphicsWidget && leaveAfterRelease && event->type() == QEvent::MouseButtonRelease
&& !event->buttons() && QWidget::mouseGrabber() != leaveAfterRelease) {
// Dispatch enter/leave if:
// 1) the mouse grabber is an alien widget
// 2) the button is released on an alien widget
QWidget *enter = 0;
if (nativeGuard)
enter = alienGuard ? alienWidget : nativeWidget;
else // The receiver is typically deleted on mouse release with drag'n'drop.
enter = QApplication::widgetAt(event->globalPos());
dispatchEnterLeave(enter, leaveAfterRelease);
leaveAfterRelease = 0;
lastMouseReceiver = enter;
} else if (!wasLeaveAfterRelease) {
if (activePopupWidget) {
if (!QWidget::mouseGrabber())
lastMouseReceiver = alienGuard ? alienWidget : (nativeGuard ? nativeWidget : 0);
} else {
lastMouseReceiver = receiverGuard ? receiver : QApplication::widgetAt(event->globalPos());
}
}
return result;
}
#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_WS_MAC)
/*
This function should only be called when the widget changes visibility, i.e.
when the \a widget is shown, hidden or deleted. This function does nothing
if the widget is a top-level or native, i.e. not an alien widget. In that
case enter/leave events are genereated by the underlying windowing system.
*/
extern QPointer<QWidget> qt_last_mouse_receiver;
extern QWidget *qt_button_down;
void QApplicationPrivate::sendSyntheticEnterLeave(QWidget *widget)
{
#ifndef QT_NO_CURSOR
#ifdef Q_WS_QWS
if (!widget || widget->isWindow())
return;
#else
if (!widget || widget->internalWinId() || widget->isWindow())
return;
#endif
const bool widgetInShow = widget->isVisible() && !widget->data->in_destructor;
if (!widgetInShow && widget != qt_last_mouse_receiver)
return; // Widget was not under the cursor when it was hidden/deleted.
if (widgetInShow && widget->parentWidget()->data->in_show)
return; // Ingore recursive show.
QWidget *mouseGrabber = QWidget::mouseGrabber();
if (mouseGrabber && mouseGrabber != widget)
return; // Someone else has the grab; enter/leave should not occur.
QWidget *tlw = widget->window();
if (tlw->data->in_destructor || tlw->data->is_closing)
return; // Closing down the business.
if (widgetInShow && (!qt_last_mouse_receiver || qt_last_mouse_receiver->window() != tlw))
return; // Mouse cursor not inside the widget's top-level.
const QPoint globalPos(QCursor::pos());
QPoint pos = tlw->mapFromGlobal(globalPos);
// Find the current widget under the mouse. If this function was called from
// the widget's destructor, we have to make sure childAt() doesn't take into
// account widgets that are about to be destructed.
QWidget *widgetUnderCursor = tlw->d_func()->childAt_helper(pos, widget->data->in_destructor);
if (!widgetUnderCursor)
widgetUnderCursor = tlw;
else
pos = widgetUnderCursor->mapFrom(tlw, pos);
if (widgetInShow && widgetUnderCursor != widget && !widget->isAncestorOf(widgetUnderCursor))
return; // Mouse cursor not inside the widget or any of its children.
if (widget->data->in_destructor && qt_button_down == widget)
qt_button_down = 0;
// Send enter/leave events followed by a mouse move on the entered widget.
QMouseEvent e(QEvent::MouseMove, pos, globalPos, Qt::NoButton, Qt::NoButton, Qt::NoModifier);
sendMouseEvent(widgetUnderCursor, &e, widgetUnderCursor, tlw, &qt_button_down, qt_last_mouse_receiver);
#endif // QT_NO_CURSOR
}
#endif // Q_WS_WIN || Q_WS_X11 || Q_WS_MAC
/*!
Returns the desktop widget (also called the root window).
The desktop may be composed of multiple screens, so it would be incorrect,
for example, to attempt to \e center some widget in the desktop's geometry.
QDesktopWidget has various functions for obtaining useful geometries upon
the desktop, such as QDesktopWidget::screenGeometry() and
QDesktopWidget::availableGeometry().
On X11, it is also possible to draw on the desktop.
*/
QDesktopWidget *QApplication::desktop()
{
if (!qt_desktopWidget || // not created yet
!(qt_desktopWidget->windowType() == Qt::Desktop)) { // reparented away
qt_desktopWidget = new QDesktopWidget();
}
return qt_desktopWidget;
}
#ifndef QT_NO_CLIPBOARD
/*!
Returns a pointer to the application global clipboard.
\note The QApplication object should already be constructed before
accessing the clipboard.
*/
QClipboard *QApplication::clipboard()
{
if (qt_clipboard == 0) {
if (!qApp) {
qWarning("QApplication: Must construct a QApplication before accessing a QClipboard");
return 0;
}
qt_clipboard = new QClipboard(0);
}
return qt_clipboard;
}
#endif // QT_NO_CLIPBOARD
/*!
Sets whether Qt should use the system's standard colors, fonts, etc., to
\a on. By default, this is true.
This function must be called before creating the QApplication object, like
this:
\snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 6
\sa desktopSettingsAware()
*/
void QApplication::setDesktopSettingsAware(bool on)
{
QApplicationPrivate::obey_desktop_settings = on;
}
/*!
Returns true if Qt is set to use the system's standard colors, fonts, etc.;
otherwise returns false. The default is true.
\sa setDesktopSettingsAware()
*/
bool QApplication::desktopSettingsAware()
{
return QApplicationPrivate::obey_desktop_settings;
}
/*!
Returns the current state of the modifier keys on the keyboard. The current
state is updated sychronously as the event queue is emptied of events that
will spontaneously change the keyboard state (QEvent::KeyPress and
QEvent::KeyRelease events).
It should be noted this may not reflect the actual keys held on the input
device at the time of calling but rather the modifiers as last reported in
one of the above events. If no keys are being held Qt::NoModifier is
returned.
\sa mouseButtons()
*/
Qt::KeyboardModifiers QApplication::keyboardModifiers()
{
return QApplicationPrivate::modifier_buttons;
}
/*!
Returns the current state of the buttons on the mouse. The current state is
updated syncronously as the event queue is emptied of events that will
spontaneously change the mouse state (QEvent::MouseButtonPress and
QEvent::MouseButtonRelease events).
It should be noted this may not reflect the actual buttons held on the
input device at the time of calling but rather the mouse buttons as last
reported in one of the above events. If no mouse buttons are being held
Qt::NoButton is returned.
\sa keyboardModifiers()
*/
Qt::MouseButtons QApplication::mouseButtons()
{
return QApplicationPrivate::mouse_buttons;
}
/*!
\fn bool QApplication::isSessionRestored() const
Returns true if the application has been restored from an earlier
\l{Session Management}{session}; otherwise returns false.
\sa sessionId(), commitData(), saveState()
*/
/*!
\fn QString QApplication::sessionId() const
Returns the current \l{Session Management}{session's} identifier.
If the application has been restored from an earlier session, this
identifier is the same as it was in that previous session. The session
identifier is guaranteed to be unique both for different applications
and for different instances of the same application.
\sa isSessionRestored(), sessionKey(), commitData(), saveState()
*/
/*!
\fn QString QApplication::sessionKey() const
Returns the session key in the current \l{Session Management}{session}.
If the application has been restored from an earlier session, this key is
the same as it was when the previous session ended.
The session key changes with every call of commitData() or saveState().
\sa isSessionRestored(), sessionId(), commitData(), saveState()
*/
#ifndef QT_NO_SESSIONMANAGER
bool QApplication::isSessionRestored() const
{
Q_D(const QApplication);
return d->is_session_restored;
}
QString QApplication::sessionId() const
{
Q_D(const QApplication);
return d->session_id;
}
QString QApplication::sessionKey() const
{
Q_D(const QApplication);
return d->session_key;
}
#endif
/*!
\since 4.2
\fn void QApplication::commitDataRequest(QSessionManager &manager)
This signal deals with \l{Session Management}{session management}. It is
emitted when the QSessionManager wants the application to commit all its
data.
Usually this means saving all open files, after getting permission from
the user. Furthermore you may want to provide a means by which the user
can cancel the shutdown.
You should not exit the application within this signal. Instead,
the session manager may or may not do this afterwards, depending on the
context.
\warning Within this signal, no user interaction is possible, \e
unless you ask the \a manager for explicit permission. See
QSessionManager::allowsInteraction() and
QSessionManager::allowsErrorInteraction() for details and example
usage.
\note You should use Qt::DirectConnection when connecting to this signal.
\sa isSessionRestored(), sessionId(), saveState(), {Session Management}
*/
/*!
This function deals with \l{Session Management}{session management}. It is
invoked when the QSessionManager wants the application to commit all its
data.
Usually this means saving all open files, after getting permission from the
user. Furthermore you may want to provide a means by which the user can
cancel the shutdown.
You should not exit the application within this function. Instead, the
session manager may or may not do this afterwards, depending on the
context.
\warning Within this function, no user interaction is possible, \e
unless you ask the \a manager for explicit permission. See
QSessionManager::allowsInteraction() and
QSessionManager::allowsErrorInteraction() for details and example
usage.
The default implementation requests interaction and sends a close event to
all visible top-level widgets. If any event was rejected, the shutdown is
canceled.
\sa isSessionRestored(), sessionId(), saveState(), {Session Management}
*/
#ifndef QT_NO_SESSIONMANAGER
void QApplication::commitData(QSessionManager& manager )
{
emit commitDataRequest(manager);
if (manager.allowsInteraction()) {
QWidgetList done;
QWidgetList list = QApplication::topLevelWidgets();
bool cancelled = false;
for (int i = 0; !cancelled && i < list.size(); ++i) {
QWidget* w = list.at(i);
if (w->isVisible() && !done.contains(w)) {
cancelled = !w->close();
if (!cancelled)
done.append(w);
list = QApplication::topLevelWidgets();
i = -1;
}
}
if (cancelled)
manager.cancel();
}
}
/*!
\since 4.2
\fn void QApplication::saveStateRequest(QSessionManager &manager)
This signal deals with \l{Session Management}{session management}. It is
invoked when the \l{QSessionManager}{session manager} wants the application
to preserve its state for a future session.
For example, a text editor would create a temporary file that includes the
current contents of its edit buffers, the location of the cursor and other
aspects of the current editing session.
You should never exit the application within this signal. Instead, the
session manager may or may not do this afterwards, depending on the
context. Futhermore, most session managers will very likely request a saved
state immediately after the application has been started. This permits the
session manager to learn about the application's restart policy.
\warning Within this function, no user interaction is possible, \e
unless you ask the \a manager for explicit permission. See
QSessionManager::allowsInteraction() and
QSessionManager::allowsErrorInteraction() for details.
\note You should use Qt::DirectConnection when connecting to this signal.
\sa isSessionRestored(), sessionId(), commitData(), {Session Management}
*/
/*!
This function deals with \l{Session Management}{session management}. It is
invoked when the \l{QSessionManager}{session manager} wants the application
to preserve its state for a future session.
For example, a text editor would create a temporary file that includes the
current contents of its edit buffers, the location of the cursor and other
aspects of the current editing session.
You should never exit the application within this function. Instead, the
session manager may or may not do this afterwards, depending on the
context. Futhermore, most session managers will very likely request a saved
state immediately after the application has been started. This permits the
session manager to learn about the application's restart policy.
\warning Within this function, no user interaction is possible, \e
unless you ask the \a manager for explicit permission. See
QSessionManager::allowsInteraction() and
QSessionManager::allowsErrorInteraction() for details.
\sa isSessionRestored(), sessionId(), commitData(), {Session Management}
*/
void QApplication::saveState(QSessionManager &manager)
{
emit saveStateRequest(manager);
}
#endif //QT_NO_SESSIONMANAGER
/*
Sets the time after which a drag should start to \a ms ms.
\sa startDragTime()
*/
void QApplication::setStartDragTime(int ms)
{
drag_time = ms;
}
/*!
\property QApplication::startDragTime
\brief the time in milliseconds that a mouse button must be held down
before a drag and drop operation will begin
If you support drag and drop in your application, and want to start a drag
and drop operation after the user has held down a mouse button for a
certain amount of time, you should use this property's value as the delay.
Qt also uses this delay internally, e.g. in QTextEdit and QLineEdit, for
starting a drag.
The default value is 500 ms.
\sa startDragDistance(), {Drag and Drop}
*/
int QApplication::startDragTime()
{
return drag_time;
}
/*
Sets the distance after which a drag should start to \a l pixels.
\sa startDragDistance()
*/
void QApplication::setStartDragDistance(int l)
{
drag_distance = l;
}
/*!
\property QApplication::startDragDistance
If you support drag and drop in your application, and want to start a drag
and drop operation after the user has moved the cursor a certain distance
with a button held down, you should use this property's value as the
minimum distance required.
For example, if the mouse position of the click is stored in \c startPos
and the current position (e.g. in the mouse move event) is \c currentPos,
you can find out if a drag should be started with code like this:
\snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 7
Qt uses this value internally, e.g. in QFileDialog.
The default value is 4 pixels.
\sa startDragTime() QPoint::manhattanLength() {Drag and Drop}
*/
int QApplication::startDragDistance()
{
return drag_distance;
}
/*!
\fn void QApplication::setReverseLayout(bool reverse)
Use setLayoutDirection() instead.
*/
/*!
\fn void QApplication::reverseLayout()
Use layoutDirection() instead.
*/
/*!
\fn bool QApplication::isRightToLeft()
Returns true if the application's layout direction is
Qt::RightToLeft; otherwise returns false.
\sa layoutDirection(), isLeftToRight()
*/
/*!
\fn bool QApplication::isLeftToRight()
Returns true if the application's layout direction is
Qt::LeftToRight; otherwise returns false.
\sa layoutDirection(), isRightToLeft()
*/
/*!
\property QApplication::layoutDirection
\brief the default layout direction for this application
On system start-up, the default layout direction depends on the
application's language.
\sa QWidget::layoutDirection, isLeftToRight(), isRightToLeft()
*/
void QApplication::setLayoutDirection(Qt::LayoutDirection direction)
{
if (layout_direction == direction || direction == Qt::LayoutDirectionAuto)
return;
layout_direction = direction;
QWidgetList list = topLevelWidgets();
for (int i = 0; i < list.size(); ++i) {
QWidget *w = list.at(i);
QEvent ev(QEvent::ApplicationLayoutDirectionChange);
sendEvent(w, &ev);
}
}
Qt::LayoutDirection QApplication::layoutDirection()
{
return layout_direction;
}
/*!
\obsolete
Strips out vertical alignment flags and transforms an alignment \a align
of Qt::AlignLeft into Qt::AlignLeft or Qt::AlignRight according to the
language used.
*/
#ifdef QT3_SUPPORT
Qt::Alignment QApplication::horizontalAlignment(Qt::Alignment align)
{
return QStyle::visualAlignment(layoutDirection(), align);
}
#endif
/*!
\fn QCursor *QApplication::overrideCursor()
Returns the active application override cursor.
This function returns 0 if no application cursor has been defined (i.e. the
internal cursor stack is empty).
\sa setOverrideCursor(), restoreOverrideCursor()
*/
#ifndef QT_NO_CURSOR
QCursor *QApplication::overrideCursor()
{
return qApp->d_func()->cursor_list.isEmpty() ? 0 : &qApp->d_func()->cursor_list.first();
}
/*!
Changes the currently active application override cursor to \a cursor.
This function has no effect if setOverrideCursor() was not called.
\sa setOverrideCursor(), overrideCursor(), restoreOverrideCursor(),
QWidget::setCursor()
*/
void QApplication::changeOverrideCursor(const QCursor &cursor)
{
if (qApp->d_func()->cursor_list.isEmpty())
return;
qApp->d_func()->cursor_list.removeFirst();
#ifdef QT_MAC_USE_COCOA
// We use native NSCursor stacks in Cocoa. The currentCursor is the
// top of this stack. So to avoid flickering of cursor, we have to
// change the cusor instead of pop-ing the existing OverrideCursor
// and pushing the new one.
qApp->d_func()->cursor_list.prepend(cursor);
qt_cocoaChangeOverrideCursor(cursor);
return;
#endif
setOverrideCursor(cursor);
}
#endif
/*!
\fn void QApplication::setOverrideCursor(const QCursor &cursor, bool replace)
Use changeOverrideCursor(\a cursor) (if \a replace is true) or
setOverrideCursor(\a cursor) (if \a replace is false).
*/
/*!
Enters the main event loop and waits until exit() is called, then returns
the value that was set to exit() (which is 0 if exit() is called via
quit()).
It is necessary to call this function to start event handling. The main
event loop receives events from the window system and dispatches these to
the application widgets.
Generally, no user interaction can take place before calling exec(). As a
special case, modal widgets like QMessageBox can be used before calling
exec(), because modal widgets call exec() to start a local event loop.
To make your application perform idle processing, i.e., executing a special
function whenever there are no pending events, use a QTimer with 0 timeout.
More advanced idle processing schemes can be achieved using processEvents().
We recommend that you connect clean-up code to the
\l{QCoreApplication::}{aboutToQuit()} signal, instead of putting it in your
application's \c{main()} function. This is because, on some platforms the
QApplication::exec() call may not return. For example, on the Windows
platform, when the user logs off, the system terminates the process after Qt
closes all top-level windows. Hence, there is \e{no guarantee} that the
application will have time to exit its event loop and execute code at the
end of the \c{main()} function, after the QApplication::exec() call.
\sa quitOnLastWindowClosed, quit(), exit(), processEvents(),
QCoreApplication::exec()
*/
int QApplication::exec()
{
#ifndef QT_NO_ACCESSIBILITY
QAccessible::setRootObject(qApp);
#endif
return QCoreApplication::exec();
}
/*! \reimp
*/
bool QApplication::notify(QObject *receiver, QEvent *e)
{
Q_D(QApplication);
// no events are delivered after ~QCoreApplication() has started
if (QApplicationPrivate::is_app_closing)
return true;
if (receiver == 0) { // serious error
qWarning("QApplication::notify: Unexpected null receiver");
return true;
}
#ifndef QT_NO_DEBUG
d->checkReceiverThread(receiver);
#endif
#ifdef QT3_SUPPORT
if (e->type() == QEvent::ChildRemoved && !receiver->d_func()->pendingChildInsertedEvents.isEmpty())
receiver->d_func()->removePendingChildInsertedEvents(static_cast<QChildEvent *>(e)->child());
#endif // QT3_SUPPORT
// capture the current mouse/keyboard state
if(e->spontaneous()) {
if (e->type() == QEvent::KeyPress
|| e->type() == QEvent::KeyRelease) {
QKeyEvent *ke = static_cast<QKeyEvent*>(e);
QApplicationPrivate::modifier_buttons = ke->modifiers();
} else if(e->type() == QEvent::MouseButtonPress
|| e->type() == QEvent::MouseButtonRelease) {
QMouseEvent *me = static_cast<QMouseEvent*>(e);
QApplicationPrivate::modifier_buttons = me->modifiers();
if(me->type() == QEvent::MouseButtonPress)
QApplicationPrivate::mouse_buttons |= me->button();
else
QApplicationPrivate::mouse_buttons &= ~me->button();
}
#if !defined(QT_NO_WHEELEVENT) || !defined(QT_NO_TABLETEVENT)
else if (false
# ifndef QT_NO_WHEELEVENT
|| e->type() == QEvent::Wheel
# endif
# ifndef QT_NO_TABLETEVENT
|| e->type() == QEvent::TabletMove
|| e->type() == QEvent::TabletPress
|| e->type() == QEvent::TabletRelease
# endif
) {
QInputEvent *ie = static_cast<QInputEvent*>(e);
QApplicationPrivate::modifier_buttons = ie->modifiers();
}
#endif // !QT_NO_WHEELEVENT || !QT_NO_TABLETEVENT
}
#ifndef QT_NO_GESTURES
// walk through parents and check for gestures
if (d->gestureManager) {
switch (e->type()) {
case QEvent::Paint:
case QEvent::MetaCall:
case QEvent::DeferredDelete:
case QEvent::DragEnter: case QEvent::DragMove: case QEvent::DragLeave:
case QEvent::Drop: case QEvent::DragResponse:
case QEvent::ChildAdded: case QEvent::ChildPolished:
#ifdef QT3_SUPPORT
case QEvent::ChildInsertedRequest:
case QEvent::ChildInserted:
case QEvent::LayoutHint:
#endif
case QEvent::ChildRemoved:
case QEvent::UpdateRequest:
case QEvent::UpdateLater:
case QEvent::AccessibilityPrepare:
case QEvent::LocaleChange:
case QEvent::Style:
case QEvent::IconDrag:
case QEvent::StyleChange:
case QEvent::AccessibilityHelp:
case QEvent::AccessibilityDescription:
case QEvent::GraphicsSceneDragEnter:
case QEvent::GraphicsSceneDragMove:
case QEvent::GraphicsSceneDragLeave:
case QEvent::GraphicsSceneDrop:
case QEvent::DynamicPropertyChange:
case QEvent::NetworkReplyUpdated:
break;
default:
if (receiver->isWidgetType()) {
if (d->gestureManager->filterEvent(static_cast<QWidget *>(receiver), e))
return true;
} else {
// a special case for events that go to QGesture objects.
// We pass the object to the gesture manager and it'll figure
// out if it's QGesture or not.
if (d->gestureManager->filterEvent(receiver, e))
return true;
}
}
}
#endif // QT_NO_GESTURES
// User input and window activation makes tooltips sleep
switch (e->type()) {
case QEvent::Wheel:
case QEvent::ActivationChange:
case QEvent::KeyPress:
case QEvent::KeyRelease:
case QEvent::FocusOut:
case QEvent::FocusIn:
case QEvent::MouseButtonPress:
case QEvent::MouseButtonRelease:
case QEvent::MouseButtonDblClick:
d->toolTipFallAsleep.stop();
// fall-through
case QEvent::Leave:
d->toolTipWakeUp.stop();
default:
break;
}
bool res = false;
if (!receiver->isWidgetType()) {
res = d->notify_helper(receiver, e);
} else switch (e->type()) {
#if defined QT3_SUPPORT && !defined(QT_NO_SHORTCUT)
case QEvent::Accel:
{
if (d->use_compat()) {
QKeyEvent* key = static_cast<QKeyEvent*>(e);
res = d->notify_helper(receiver, e);
if (!res && !key->isAccepted())
res = d->qt_dispatchAccelEvent(static_cast<QWidget *>(receiver), key);
// next lines are for compatibility with Qt <= 3.0.x: old
// QAccel was listening on toplevel widgets
if (!res && !key->isAccepted() && !static_cast<QWidget *>(receiver)->isWindow())
res = d->notify_helper(static_cast<QWidget *>(receiver)->window(), e);
}
break;
}
#endif //QT3_SUPPORT && !QT_NO_SHORTCUT
case QEvent::ShortcutOverride:
case QEvent::KeyPress:
case QEvent::KeyRelease:
{
bool isWidget = receiver->isWidgetType();
bool isGraphicsWidget = false;
#ifndef QT_NO_GRAPHICSVIEW
isGraphicsWidget = !isWidget && qobject_cast<QGraphicsWidget *>(receiver);
#endif
if (!isWidget && !isGraphicsWidget) {
res = d->notify_helper(receiver, e);
break;
}
QKeyEvent* key = static_cast<QKeyEvent*>(e);
#if defined QT3_SUPPORT && !defined(QT_NO_SHORTCUT)
if (d->use_compat() && d->qt_tryComposeUnicode(static_cast<QWidget*>(receiver), key))
break;
#endif
if (key->type()==QEvent::KeyPress) {
#ifndef QT_NO_SHORTCUT
// Try looking for a Shortcut before sending key events
if ((res = qApp->d_func()->shortcutMap.tryShortcutEvent(receiver, key)))
return res;
#endif
qt_in_tab_key_event = (key->key() == Qt::Key_Backtab
|| key->key() == Qt::Key_Tab
|| key->key() == Qt::Key_Left
|| key->key() == Qt::Key_Up
|| key->key() == Qt::Key_Right
|| key->key() == Qt::Key_Down);
}
bool def = key->isAccepted();
QPointer<QObject> pr = receiver;
while (receiver) {
if (def)
key->accept();
else
key->ignore();
res = d->notify_helper(receiver, e);
QWidget *w = isWidget ? static_cast<QWidget *>(receiver) : 0;
#ifndef QT_NO_GRAPHICSVIEW
QGraphicsWidget *gw = isGraphicsWidget ? static_cast<QGraphicsWidget *>(receiver) : 0;
#endif
if ((res && key->isAccepted())
/*
QLineEdit will emit a signal on Key_Return, but
ignore the event, and sometimes the connected
slot deletes the QLineEdit (common in itemview
delegates), so we have to check if the widget
was destroyed even if the event was ignored (to
prevent a crash)
note that we don't have to reset pw while
propagating (because the original receiver will
be destroyed if one of its ancestors is)
*/
|| !pr
|| (isWidget && (w->isWindow() || !w->parentWidget()))
#ifndef QT_NO_GRAPHICSVIEW
|| (isGraphicsWidget && (gw->isWindow() || !gw->parentWidget()))
#endif
) {
break;
}
#ifndef QT_NO_GRAPHICSVIEW
receiver = w ? (QObject *)w->parentWidget() : (QObject *)gw->parentWidget();
#else
receiver = w->parentWidget();
#endif
}
qt_in_tab_key_event = false;
}
break;
case QEvent::MouseButtonPress:
case QEvent::MouseButtonRelease:
case QEvent::MouseButtonDblClick:
case QEvent::MouseMove:
{
QWidget* w = static_cast<QWidget *>(receiver);
QMouseEvent* mouse = static_cast<QMouseEvent*>(e);
QPoint relpos = mouse->pos();
if (e->spontaneous()) {
#ifndef QT_NO_IM
QInputContext *ic = w->inputContext();
if (ic
&& w->testAttribute(Qt::WA_InputMethodEnabled)
&& ic->filterEvent(mouse))
return true;
#endif
if (e->type() == QEvent::MouseButtonPress) {
QApplicationPrivate::giveFocusAccordingToFocusPolicy(w,
Qt::ClickFocus,
Qt::MouseFocusReason);
}
// ### Qt 5 These dynamic tool tips should be an OPT-IN feature. Some platforms
// like Mac OS X (probably others too), can optimize their views by not
// dispatching mouse move events. We have attributes to control hover,
// and mouse tracking, but as long as we are deciding to implement this
// feature without choice of opting-in or out, you ALWAYS have to have
// tracking enabled. Therefore, the other properties give a false sense of
// performance enhancement.
if (e->type() == QEvent::MouseMove && mouse->buttons() == 0) {
d->toolTipWidget = w;
d->toolTipPos = relpos;
d->toolTipGlobalPos = mouse->globalPos();
d->toolTipWakeUp.start(d->toolTipFallAsleep.isActive()?20:700, this);
}
}
bool eventAccepted = mouse->isAccepted();
QPointer<QWidget> pw = w;
while (w) {
QMouseEvent me(mouse->type(), relpos, mouse->globalPos(), mouse->button(), mouse->buttons(),
mouse->modifiers());
me.spont = mouse->spontaneous();
// throw away any mouse-tracking-only mouse events
if (!w->hasMouseTracking()
&& mouse->type() == QEvent::MouseMove && mouse->buttons() == 0) {
// but still send them through all application event filters (normally done by notify_helper)
for (int i = 0; i < d->eventFilters.size(); ++i) {
register QObject *obj = d->eventFilters.at(i);
if (!obj)
continue;
if (obj->d_func()->threadData != w->d_func()->threadData) {
qWarning("QApplication: Object event filter cannot be in a different thread.");
continue;
}
if (obj->eventFilter(w, w == receiver ? mouse : &me))
break;
}
res = true;
} else {
w->setAttribute(Qt::WA_NoMouseReplay, false);
res = d->notify_helper(w, w == receiver ? mouse : &me);
e->spont = false;
}
eventAccepted = (w == receiver ? mouse : &me)->isAccepted();
if (res && eventAccepted)
break;
if (w->isWindow() || w->testAttribute(Qt::WA_NoMousePropagation))
break;
relpos += w->pos();
w = w->parentWidget();
}
mouse->setAccepted(eventAccepted);
if (e->type() == QEvent::MouseMove) {
if (!pw)
break;
w = static_cast<QWidget *>(receiver);
relpos = mouse->pos();
QPoint diff = relpos - w->mapFromGlobal(d->hoverGlobalPos);
while (w) {
if (w->testAttribute(Qt::WA_Hover) &&
(!QApplication::activePopupWidget() || QApplication::activePopupWidget() == w->window())) {
QHoverEvent he(QEvent::HoverMove, relpos, relpos - diff);
d->notify_helper(w, &he);
}
if (w->isWindow() || w->testAttribute(Qt::WA_NoMousePropagation))
break;
relpos += w->pos();
w = w->parentWidget();
}
}
d->hoverGlobalPos = mouse->globalPos();
}
break;
#ifndef QT_NO_WHEELEVENT
case QEvent::Wheel:
{
QWidget* w = static_cast<QWidget *>(receiver);
QWheelEvent* wheel = static_cast<QWheelEvent*>(e);
QPoint relpos = wheel->pos();
bool eventAccepted = wheel->isAccepted();
if (e->spontaneous()) {
QApplicationPrivate::giveFocusAccordingToFocusPolicy(w,
Qt::WheelFocus,
Qt::MouseFocusReason);
}
while (w) {
QWheelEvent we(relpos, wheel->globalPos(), wheel->delta(), wheel->buttons(),
wheel->modifiers(), wheel->orientation());
we.spont = wheel->spontaneous();
res = d->notify_helper(w, w == receiver ? wheel : &we);
eventAccepted = ((w == receiver) ? wheel : &we)->isAccepted();
e->spont = false;
if ((res && eventAccepted)
|| w->isWindow() || w->testAttribute(Qt::WA_NoMousePropagation))
break;
relpos += w->pos();
w = w->parentWidget();
}
wheel->setAccepted(eventAccepted);
}
break;
#endif
#ifndef QT_NO_CONTEXTMENU
case QEvent::ContextMenu:
{
QWidget* w = static_cast<QWidget *>(receiver);
QContextMenuEvent *context = static_cast<QContextMenuEvent*>(e);
QPoint relpos = context->pos();
bool eventAccepted = context->isAccepted();
while (w) {
QContextMenuEvent ce(context->reason(), relpos, context->globalPos(), context->modifiers());
ce.spont = e->spontaneous();
res = d->notify_helper(w, w == receiver ? context : &ce);
eventAccepted = ((w == receiver) ? context : &ce)->isAccepted();
e->spont = false;
if ((res && eventAccepted)
|| w->isWindow() || w->testAttribute(Qt::WA_NoMousePropagation))
break;
relpos += w->pos();
w = w->parentWidget();
}
context->setAccepted(eventAccepted);
}
break;
#endif // QT_NO_CONTEXTMENU
#ifndef QT_NO_TABLETEVENT
case QEvent::TabletMove:
case QEvent::TabletPress:
case QEvent::TabletRelease:
{
QWidget *w = static_cast<QWidget *>(receiver);
QTabletEvent *tablet = static_cast<QTabletEvent*>(e);
QPoint relpos = tablet->pos();
bool eventAccepted = tablet->isAccepted();
while (w) {
QTabletEvent te(tablet->type(), relpos, tablet->globalPos(),
tablet->hiResGlobalPos(), tablet->device(), tablet->pointerType(),
tablet->pressure(), tablet->xTilt(), tablet->yTilt(),
tablet->tangentialPressure(), tablet->rotation(), tablet->z(),
tablet->modifiers(), tablet->uniqueId());
te.spont = e->spontaneous();
res = d->notify_helper(w, w == receiver ? tablet : &te);
eventAccepted = ((w == receiver) ? tablet : &te)->isAccepted();
e->spont = false;
if ((res && eventAccepted)
|| w->isWindow()
|| w->testAttribute(Qt::WA_NoMousePropagation))
break;
relpos += w->pos();
w = w->parentWidget();
}
tablet->setAccepted(eventAccepted);
qt_tabletChokeMouse = tablet->isAccepted();
}
break;
#endif // QT_NO_TABLETEVENT
#if !defined(QT_NO_TOOLTIP) || !defined(QT_NO_WHATSTHIS)
case QEvent::ToolTip:
case QEvent::WhatsThis:
case QEvent::QueryWhatsThis:
{
QWidget* w = static_cast<QWidget *>(receiver);
QHelpEvent *help = static_cast<QHelpEvent*>(e);
QPoint relpos = help->pos();
bool eventAccepted = help->isAccepted();
while (w) {
QHelpEvent he(help->type(), relpos, help->globalPos());
he.spont = e->spontaneous();
res = d->notify_helper(w, w == receiver ? help : &he);
e->spont = false;
eventAccepted = (w == receiver ? help : &he)->isAccepted();
if ((res && eventAccepted) || w->isWindow())
break;
relpos += w->pos();
w = w->parentWidget();
}
help->setAccepted(eventAccepted);
}
break;
#endif
#if !defined(QT_NO_STATUSTIP) || !defined(QT_NO_WHATSTHIS)
case QEvent::StatusTip:
case QEvent::WhatsThisClicked:
{
QWidget *w = static_cast<QWidget *>(receiver);
while (w) {
res = d->notify_helper(w, e);
if ((res && e->isAccepted()) || w->isWindow())
break;
w = w->parentWidget();
}
}
break;
#endif
#ifndef QT_NO_DRAGANDDROP
case QEvent::DragEnter: {
QWidget* w = static_cast<QWidget *>(receiver);
QDragEnterEvent *dragEvent = static_cast<QDragEnterEvent *>(e);
#ifdef Q_WS_MAC
// HIView has a slight difference in how it delivers events to children and parents
// It will not give a leave to a child's parent when it enters a child.
QWidget *currentTarget = QDragManager::self()->currentTarget();
if (currentTarget) {
// Assume currentTarget did not get a leave
QDragLeaveEvent event;
QApplication::sendEvent(currentTarget, &event);
}
#endif
#ifndef QT_NO_GRAPHICSVIEW
// QGraphicsProxyWidget handles its own propagation,
// and we must not change QDragManagers currentTarget.
QWExtra *extra = w->window()->d_func()->extra;
if (extra && extra->proxyWidget) {
res = d->notify_helper(w, dragEvent);
break;
}
#endif
while (w) {
if (w->isEnabled() && w->acceptDrops()) {
res = d->notify_helper(w, dragEvent);
if (res && dragEvent->isAccepted()) {
QDragManager::self()->setCurrentTarget(w);
break;
}
}
if (w->isWindow())
break;
dragEvent->p = w->mapToParent(dragEvent->p);
w = w->parentWidget();
}
}
break;
case QEvent::DragMove:
case QEvent::Drop:
case QEvent::DragLeave: {
QWidget* w = static_cast<QWidget *>(receiver);
#ifndef QT_NO_GRAPHICSVIEW
// QGraphicsProxyWidget handles its own propagation,
// and we must not change QDragManagers currentTarget.
QWExtra *extra = w->window()->d_func()->extra;
bool isProxyWidget = extra && extra->proxyWidget;
if (!isProxyWidget)
#endif
w = QDragManager::self()->currentTarget();
if (!w) {
#ifdef Q_WS_MAC
// HIView has a slight difference in how it delivers events to children and parents
// It will not give an enter to a child's parent when it leaves the child.
if (e->type() == QEvent::DragLeave)
break;
// Assume that w did not get an enter.
QDropEvent *dropEvent = static_cast<QDropEvent *>(e);
QDragEnterEvent dragEnterEvent(dropEvent->pos(), dropEvent->possibleActions(),
dropEvent->mimeData(), dropEvent->mouseButtons(),
dropEvent->keyboardModifiers());
QApplication::sendEvent(receiver, &dragEnterEvent);
w = QDragManager::self()->currentTarget();
if (!w)
#endif
break;
}
if (e->type() == QEvent::DragMove || e->type() == QEvent::Drop) {
QDropEvent *dragEvent = static_cast<QDropEvent *>(e);
QWidget *origReciver = static_cast<QWidget *>(receiver);
while (origReciver && w != origReciver) {
dragEvent->p = origReciver->mapToParent(dragEvent->p);
origReciver = origReciver->parentWidget();
}
}
res = d->notify_helper(w, e);
if (e->type() != QEvent::DragMove
#ifndef QT_NO_GRAPHICSVIEW
&& !isProxyWidget
#endif
)
QDragManager::self()->setCurrentTarget(0, e->type() == QEvent::Drop);
}
break;
#endif
case QEvent::TouchBegin:
// Note: TouchUpdate and TouchEnd events are never propagated
{
QWidget *widget = static_cast<QWidget *>(receiver);
QTouchEvent *touchEvent = static_cast<QTouchEvent *>(e);
bool eventAccepted = touchEvent->isAccepted();
if (widget->testAttribute(Qt::WA_AcceptTouchEvents) && e->spontaneous()) {
// give the widget focus if the focus policy allows it
QApplicationPrivate::giveFocusAccordingToFocusPolicy(widget,
Qt::ClickFocus,
Qt::MouseFocusReason);
}
while (widget) {
// first, try to deliver the touch event
bool acceptTouchEvents = widget->testAttribute(Qt::WA_AcceptTouchEvents);
touchEvent->setWidget(widget);
touchEvent->setAccepted(acceptTouchEvents);
QWeakPointer<QWidget> p = widget;
res = acceptTouchEvents && d->notify_helper(widget, touchEvent);
eventAccepted = touchEvent->isAccepted();
if (p.isNull()) {
// widget was deleted
widget = 0;
} else {
widget->setAttribute(Qt::WA_WState_AcceptedTouchBeginEvent, res && eventAccepted);
}
touchEvent->spont = false;
if (res && eventAccepted) {
// the first widget to accept the TouchBegin gets an implicit grab.
for (int i = 0; i < touchEvent->touchPoints().count(); ++i) {
const QTouchEvent::TouchPoint &touchPoint = touchEvent->touchPoints().at(i);
d->widgetForTouchPointId[touchPoint.id()] = widget;
}
break;
} else if (p.isNull() || widget->isWindow() || widget->testAttribute(Qt::WA_NoMousePropagation)) {
break;
}
QPoint offset = widget->pos();
widget = widget->parentWidget();
touchEvent->setWidget(widget);
for (int i = 0; i < touchEvent->_touchPoints.size(); ++i) {
QTouchEvent::TouchPoint &pt = touchEvent->_touchPoints[i];
QRectF rect = pt.rect();
rect.moveCenter(offset);
pt.d->rect = rect;
pt.d->startPos = pt.startPos() + offset;
pt.d->lastPos = pt.lastPos() + offset;
}
}
touchEvent->setAccepted(eventAccepted);
break;
}
case QEvent::RequestSoftwareInputPanel:
case QEvent::CloseSoftwareInputPanel:
#ifndef QT_NO_IM
if (receiver->isWidgetType()) {
QWidget *w = static_cast<QWidget *>(receiver);
QInputContext *ic = w->inputContext();
if (ic && ic->filterEvent(e)) {
break;
}
}
#endif
res = d->notify_helper(receiver, e);
break;
#ifndef QT_NO_GESTURES
case QEvent::NativeGesture:
{
// only propagate the first gesture event (after the GID_BEGIN)
QWidget *w = static_cast<QWidget *>(receiver);
while (w) {
e->ignore();
res = d->notify_helper(w, e);
if ((res && e->isAccepted()) || w->isWindow())
break;
w = w->parentWidget();
}
break;
}
case QEvent::Gesture:
case QEvent::GestureOverride:
{
if (receiver->isWidgetType()) {
QWidget *w = static_cast<QWidget *>(receiver);
QGestureEvent *gestureEvent = static_cast<QGestureEvent *>(e);
QList<QGesture *> allGestures = gestureEvent->gestures();
bool eventAccepted = gestureEvent->isAccepted();
bool wasAccepted = eventAccepted;
while (w) {
// send only gestures the widget expects
QList<QGesture *> gestures;
QWidgetPrivate *wd = w->d_func();
for (int i = 0; i < allGestures.size();) {
QGesture *g = allGestures.at(i);
Qt::GestureType type = g->gestureType();
QMap<Qt::GestureType, Qt::GestureFlags>::iterator contextit =
wd->gestureContext.find(type);
bool deliver = contextit != wd->gestureContext.end() &&
(g->state() == Qt::GestureStarted || w == receiver ||
(contextit.value() & Qt::ReceivePartialGestures));
if (deliver) {
allGestures.removeAt(i);
gestures.append(g);
} else {
++i;
}
}
if (!gestures.isEmpty()) { // we have gestures for this w
QGestureEvent ge(gestures);
ge.t = gestureEvent->t;
ge.spont = gestureEvent->spont;
ge.m_accept = wasAccepted;
ge.d_func()->accepted = gestureEvent->d_func()->accepted;
res = d->notify_helper(w, &ge);
gestureEvent->spont = false;
eventAccepted = ge.isAccepted();
for (int i = 0; i < gestures.size(); ++i) {
QGesture *g = gestures.at(i);
// Ignore res [event return value] because handling of multiple gestures
// packed into a single QEvent depends on not consuming the event
if (eventAccepted || ge.isAccepted(g)) {
// if the gesture was accepted, mark the target widget for it
gestureEvent->d_func()->targetWidgets[g->gestureType()] = w;
gestureEvent->setAccepted(g, true);
} else {
// if the gesture was explicitly ignored by the application,
// put it back so a parent can get it
allGestures.append(g);
}
}
}
if (allGestures.isEmpty()) // everything delivered
break;
if (w->isWindow())
break;
w = w->parentWidget();
}
foreach (QGesture *g, allGestures)
gestureEvent->setAccepted(g, false);
gestureEvent->m_accept = false; // to make sure we check individual gestures
} else {
res = d->notify_helper(receiver, e);
}
break;
}
#endif // QT_NO_GESTURES
default:
res = d->notify_helper(receiver, e);
break;
}
return res;
}
bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
{
// send to all application event filters
if (sendThroughApplicationEventFilters(receiver, e))
return true;
if (receiver->isWidgetType()) {
QWidget *widget = static_cast<QWidget *>(receiver);
#if !defined(Q_WS_WINCE) || (defined(GWES_ICONCURS) && !defined(QT_NO_CURSOR))
// toggle HasMouse widget state on enter and leave
if ((e->type() == QEvent::Enter || e->type() == QEvent::DragEnter) &&
(!QApplication::activePopupWidget() || QApplication::activePopupWidget() == widget->window()))
widget->setAttribute(Qt::WA_UnderMouse, true);
else if (e->type() == QEvent::Leave || e->type() == QEvent::DragLeave)
widget->setAttribute(Qt::WA_UnderMouse, false);
#endif
if (QLayout *layout=widget->d_func()->layout) {
layout->widgetEvent(e);
}
}
// send to all receiver event filters
if (sendThroughObjectEventFilters(receiver, e))
return true;
// deliver the event
bool consumed = receiver->event(e);
e->spont = false;
return consumed;
}
/*!
\class QSessionManager
\brief The QSessionManager class provides access to the session manager.
A session manager in a desktop environment (in which Qt GUI applications
live) keeps track of a session, which is a group of running applications,
each of which has a particular state. The state of an application contains
(most notably) the documents the application has open and the position and
size of its windows.
The session manager is used to save the session, e.g., when the machine is
shut down, and to restore a session, e.g., when the machine is started up.
We recommend that you use QSettings to save an application's settings,
for example, window positions, recently used files, etc. When the
application is restarted by the session manager, you can restore the
settings.
QSessionManager provides an interface between the application and the
session manager so that the program can work well with the session manager.
In Qt, session management requests for action are handled by the two
virtual functions QApplication::commitData() and QApplication::saveState().
Both provide a reference to a session manager object as argument, to allow
the application to communicate with the session manager. The session
manager can only be accessed through these functions.
No user interaction is possible \e unless the application gets explicit
permission from the session manager. You ask for permission by calling
allowsInteraction() or, if it is really urgent, allowsErrorInteraction().
Qt does not enforce this, but the session manager may.
You can try to abort the shutdown process by calling cancel(). The default
commitData() function does this if some top-level window rejected its
closeEvent().
For sophisticated session managers provided on Unix/X11, QSessionManager
offers further possibilities to fine-tune an application's session
management behavior: setRestartCommand(), setDiscardCommand(),
setRestartHint(), setProperty(), requestPhase2(). See the respective
function descriptions for further details.
\sa QApplication, {Session Management}
*/
/*! \enum QSessionManager::RestartHint
This enum type defines the circumstances under which this application wants
to be restarted by the session manager. The current values are:
\value RestartIfRunning If the application is still running when the
session is shut down, it wants to be restarted
at the start of the next session.
\value RestartAnyway The application wants to be started at the
start of the next session, no matter what.
(This is useful for utilities that run just
after startup and then quit.)
\value RestartImmediately The application wants to be started immediately
whenever it is not running.
\value RestartNever The application does not want to be restarted
automatically.
The default hint is \c RestartIfRunning.
*/
/*!
\fn QString QSessionManager::sessionId() const
Returns the identifier of the current session.
If the application has been restored from an earlier session, this
identifier is the same as it was in the earlier session.
\sa sessionKey(), QApplication::sessionId()
*/
/*!
\fn QString QSessionManager::sessionKey() const
Returns the session key in the current session.
If the application has been restored from an earlier session, this key is
the same as it was when the previous session ended.
The session key changes with every call of commitData() or saveState().
\sa sessionId(), QApplication::sessionKey()
*/
/*!
\fn void* QSessionManager::handle() const
\internal
*/
/*!
\fn bool QSessionManager::allowsInteraction()
Asks the session manager for permission to interact with the user. Returns
true if interaction is permitted; otherwise returns false.
The rationale behind this mechanism is to make it possible to synchronize
user interaction during a shutdown. Advanced session managers may ask all
applications simultaneously to commit their data, resulting in a much
faster shutdown.
When the interaction is completed we strongly recommend releasing the user
interaction semaphore with a call to release(). This way, other
applications may get the chance to interact with the user while your
application is still busy saving data. (The semaphore is implicitly
released when the application exits.)
If the user decides to cancel the shutdown process during the interaction
phase, you must tell the session manager that this has happened by calling
cancel().
Here's an example of how an application's QApplication::commitData() might
be implemented:
\snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 8
If an error occurred within the application while saving its data, you may
want to try allowsErrorInteraction() instead.
\sa QApplication::commitData(), release(), cancel()
*/
/*!
\fn bool QSessionManager::allowsErrorInteraction()
Returns true if error interaction is permitted; otherwise returns false.
This is similar to allowsInteraction(), but also enables the application to
tell the user about any errors that occur. Session managers may give error
interaction requests higher priority, which means that it is more likely
that an error interaction is permitted. However, you are still not
guaranteed that the session manager will allow interaction.
\sa allowsInteraction(), release(), cancel()
*/
/*!
\fn void QSessionManager::release()
Releases the session manager's interaction semaphore after an interaction
phase.
\sa allowsInteraction(), allowsErrorInteraction()
*/
/*!
\fn void QSessionManager::cancel()
Tells the session manager to cancel the shutdown process. Applications
should not call this function without asking the user first.
\sa allowsInteraction(), allowsErrorInteraction()
*/
/*!
\fn void QSessionManager::setRestartHint(RestartHint hint)
Sets the application's restart hint to \a hint. On application startup, the
hint is set to \c RestartIfRunning.
\note These flags are only hints, a session manager may or may not respect
them.
We recommend setting the restart hint in QApplication::saveState() because
most session managers perform a checkpoint shortly after an application's
startup.
\sa restartHint()
*/
/*!
\fn QSessionManager::RestartHint QSessionManager::restartHint() const
Returns the application's current restart hint. The default is
\c RestartIfRunning.
\sa setRestartHint()
*/
/*!
\fn void QSessionManager::setRestartCommand(const QStringList& command)
If the session manager is capable of restoring sessions it will execute
\a command in order to restore the application. The command defaults to
\snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 9
The \c -session option is mandatory; otherwise QApplication cannot tell
whether it has been restored or what the current session identifier is.
See QApplication::isSessionRestored() and QApplication::sessionId() for
details.
If your application is very simple, it may be possible to store the entire
application state in additional command line options. This is usually a
very bad idea because command lines are often limited to a few hundred
bytes. Instead, use QSettings, temporary files, or a database for this
purpose. By marking the data with the unique sessionId(), you will be able
to restore the application in a future session.
\sa restartCommand(), setDiscardCommand(), setRestartHint()
*/
/*!
\fn QStringList QSessionManager::restartCommand() const
Returns the currently set restart command.
To iterate over the list, you can use the \l foreach pseudo-keyword:
\snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 10
\sa setRestartCommand(), restartHint()
*/
/*!
\fn void QSessionManager::setDiscardCommand(const QStringList& list)
Sets the discard command to the given \a list.
\sa discardCommand(), setRestartCommand()
*/
/*!
\fn QStringList QSessionManager::discardCommand() const
Returns the currently set discard command.
To iterate over the list, you can use the \l foreach pseudo-keyword:
\snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 11
\sa setDiscardCommand(), restartCommand(), setRestartCommand()
*/
/*!
\fn void QSessionManager::setManagerProperty(const QString &name, const QString &value)
\overload
Low-level write access to the application's identification and state
records are kept in the session manager.
The property called \a name has its value set to the string \a value.
*/
/*!
\fn void QSessionManager::setManagerProperty(const QString& name,
const QStringList& value)
Low-level write access to the application's identification and state record
are kept in the session manager.
The property called \a name has its value set to the string list \a value.
*/
/*!
\fn bool QSessionManager::isPhase2() const
Returns true if the session manager is currently performing a second
session management phase; otherwise returns false.
\sa requestPhase2()
*/
/*!
\fn void QSessionManager::requestPhase2()
Requests a second session management phase for the application. The
application may then return immediately from the QApplication::commitData()
or QApplication::saveState() function, and they will be called again once
most or all other applications have finished their session management.
The two phases are useful for applications such as the X11 window manager
that need to store information about another application's windows and
therefore have to wait until these applications have completed their
respective session management tasks.
\note If another application has requested a second phase it may get called
before, simultaneously with, or after your application's second phase.
\sa isPhase2()
*/
/*****************************************************************************
Stubbed session management support
*****************************************************************************/
#ifndef QT_NO_SESSIONMANAGER
#if defined(Q_WS_WIN) || defined(Q_WS_MAC) || defined(Q_WS_QWS)
#if defined(Q_OS_WINCE)
HRESULT qt_CoCreateGuid(GUID* guid)
{
// We will use the following information to create the GUID
// 1. absolute path to application
wchar_t tempFilename[MAX_PATH];
if (!GetModuleFileName(0, tempFilename, MAX_PATH))
return S_FALSE;
unsigned int hash = qHash(QString::fromWCharArray(tempFilename));
guid->Data1 = hash;
// 2. creation time of file
QFileInfo info(QString::fromWCharArray(tempFilename));
guid->Data2 = qHash(info.created().toTime_t());
// 3. current system time
guid->Data3 = qHash(QDateTime::currentDateTime().toTime_t());
return S_OK;
}
#if !defined(OLE32_MCOMGUID) || defined(QT_WINCE_FORCE_CREATE_GUID)
#define CoCreateGuid qt_CoCreateGuid
#endif
#endif
class QSessionManagerPrivate : public QObjectPrivate
{
public:
QStringList restartCommand;
QStringList discardCommand;
QString sessionId;
QString sessionKey;
QSessionManager::RestartHint restartHint;
};
QSessionManager* qt_session_manager_self = 0;
QSessionManager::QSessionManager(QApplication * app, QString &id, QString &key)
: QObject(*new QSessionManagerPrivate, app)
{
Q_D(QSessionManager);
setObjectName(QLatin1String("qt_sessionmanager"));
qt_session_manager_self = this;
#if defined(Q_WS_WIN)
wchar_t guidstr[40];
GUID guid;
CoCreateGuid(&guid);
StringFromGUID2(guid, guidstr, 40);
id = QString::fromWCharArray(guidstr);
CoCreateGuid(&guid);
StringFromGUID2(guid, guidstr, 40);
key = QString::fromWCharArray(guidstr);
#endif
d->sessionId = id;
d->sessionKey = key;
d->restartHint = RestartIfRunning;
}
QSessionManager::~QSessionManager()
{
qt_session_manager_self = 0;
}
QString QSessionManager::sessionId() const
{
Q_D(const QSessionManager);
return d->sessionId;
}
QString QSessionManager::sessionKey() const
{
Q_D(const QSessionManager);
return d->sessionKey;
}
#if defined(Q_WS_X11) || defined(Q_WS_MAC)
void* QSessionManager::handle() const
{
return 0;
}
#endif
#if !defined(Q_WS_WIN)
bool QSessionManager::allowsInteraction()
{
return true;
}
bool QSessionManager::allowsErrorInteraction()
{
return true;
}
void QSessionManager::release()
{
}
void QSessionManager::cancel()
{
}
#endif
void QSessionManager::setRestartHint(QSessionManager::RestartHint hint)
{
Q_D(QSessionManager);
d->restartHint = hint;
}
QSessionManager::RestartHint QSessionManager::restartHint() const
{
Q_D(const QSessionManager);
return d->restartHint;
}
void QSessionManager::setRestartCommand(const QStringList& command)
{
Q_D(QSessionManager);
d->restartCommand = command;
}
QStringList QSessionManager::restartCommand() const
{
Q_D(const QSessionManager);
return d->restartCommand;
}
void QSessionManager::setDiscardCommand(const QStringList& command)
{
Q_D(QSessionManager);
d->discardCommand = command;
}
QStringList QSessionManager::discardCommand() const
{
Q_D(const QSessionManager);
return d->discardCommand;
}
void QSessionManager::setManagerProperty(const QString&, const QString&)
{
}
void QSessionManager::setManagerProperty(const QString&, const QStringList&)
{
}
bool QSessionManager::isPhase2() const
{
return false;
}
void QSessionManager::requestPhase2()
{
}
#endif
#endif // QT_NO_SESSIONMANAGER
/*!
\typedef QApplication::ColorMode
\compat
Use ColorSpec instead.
*/
/*!
\fn Qt::MacintoshVersion QApplication::macVersion()
Use QSysInfo::MacintoshVersion instead.
*/
/*!
\fn QApplication::ColorMode QApplication::colorMode()
Use colorSpec() instead, and use ColorSpec as the enum type.
*/
/*!
\fn void QApplication::setColorMode(ColorMode mode)
Use setColorSpec() instead, and pass a ColorSpec value instead.
*/
/*!
\fn bool QApplication::hasGlobalMouseTracking()
This feature does not exist anymore. This function always returns true
in Qt 4.
*/
/*!
\fn void QApplication::setGlobalMouseTracking(bool dummy)
This function does nothing in Qt 4. The \a dummy parameter is ignored.
*/
/*!
\fn void QApplication::flushX()
Use flush() instead.
*/
/*!
\fn void QApplication::setWinStyleHighlightColor(const QColor &c)
Use the palette instead.
\oldcode
app.setWinStyleHighlightColor(color);
\newcode
QPalette palette(QApplication::palette());
palette.setColor(QPalette::Highlight, color);
QApplication::setPalette(palette);
\endcode
*/
/*!
\fn void QApplication::setPalette(const QPalette &pal, bool b, const char* className = 0)
Use the two-argument overload instead.
*/
/*!
\fn void QApplication::setFont(const QFont &font, bool b, const char* className = 0)
Use the two-argument overload instead.
*/
/*!
\fn const QColor &QApplication::winStyleHighlightColor()
Use QApplication::palette().color(QPalette::Active, QPalette::Highlight) instead.
*/
/*!
\fn QWidget *QApplication::widgetAt(int x, int y, bool child)
Use the two-argument widgetAt() overload to get the child widget. To get
the top-level widget do this:
\snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 12
*/
/*!
\fn QWidget *QApplication::widgetAt(const QPoint &point, bool child)
Use the single-argument widgetAt() overload to get the child widget. To get
the top-level widget do this:
\snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 13
*/
#ifdef QT3_SUPPORT
QWidget *QApplication::mainWidget()
{
return QApplicationPrivate::main_widget;
}
#endif
bool QApplicationPrivate::inPopupMode() const
{
return QApplicationPrivate::popupWidgets != 0;
}
/*!
\property QApplication::quitOnLastWindowClosed
\brief whether the application implicitly quits when the last window is
closed.
The default is true.
If this property is true, the applications quits when the last visible
primary window (i.e. window with no parent) with the Qt::WA_QuitOnClose
attribute set is closed. By default this attribute is set for all widgets
except for sub-windows. Refer to \l{Qt::WindowType} for a detailed list of
Qt::Window objects.
\sa quit(), QWidget::close()
*/
void QApplication::setQuitOnLastWindowClosed(bool quit)
{
QApplicationPrivate::quitOnLastWindowClosed = quit;
}
bool QApplication::quitOnLastWindowClosed()
{
return QApplicationPrivate::quitOnLastWindowClosed;
}
void QApplicationPrivate::emitLastWindowClosed()
{
if (qApp && qApp->d_func()->in_exec) {
if (QApplicationPrivate::quitOnLastWindowClosed) {
// get ready to quit, this event might be removed if the
// event loop is re-entered, however
QApplication::postEvent(qApp, new QEvent(QEvent::Quit));
}
emit qApp->lastWindowClosed();
}
}
/*! \variable QApplication::NormalColors
\compat
Use \l NormalColor instead.
*/
/*! \variable QApplication::CustomColors
\compat
Use \l CustomColor instead.
*/
#ifdef QT_KEYPAD_NAVIGATION
/*!
Sets the kind of focus navigation Qt should use to \a mode.
This feature is available in Qt for Embedded Linux, Symbian and Windows CE
only.
\note On Windows CE this feature is disabled by default for touch device
mkspecs. To enable keypad navigation, build Qt with
QT_KEYPAD_NAVIGATION defined.
\note On Symbian, setting the mode to Qt::NavigationModeCursorAuto will enable a
virtual mouse cursor on non touchscreen devices, which is controlled
by the cursor keys if there is no analog pointer device.
On other platforms and on touchscreen devices, it has the same
meaning as Qt::NavigationModeNone.
\since 4.6
\sa keypadNavigationEnabled()
*/
void QApplication::setNavigationMode(Qt::NavigationMode mode)
{
#ifdef Q_OS_SYMBIAN
QApplicationPrivate::setNavigationMode(mode);
#else
QApplicationPrivate::navigationMode = mode;
#endif
}
/*!
Returns what kind of focus navigation Qt is using.
This feature is available in Qt for Embedded Linux, Symbian and Windows CE
only.
\note On Windows CE this feature is disabled by default for touch device
mkspecs. To enable keypad navigation, build Qt with
QT_KEYPAD_NAVIGATION defined.
\note On Symbian, the default mode is Qt::NavigationModeNone for touch
devices, and Qt::NavigationModeKeypadDirectional.
\since 4.6
\sa keypadNavigationEnabled()
*/
Qt::NavigationMode QApplication::navigationMode()
{
return QApplicationPrivate::navigationMode;
}
/*!
Sets whether Qt should use focus navigation suitable for use with a
minimal keypad.
This feature is available in Qt for Embedded Linux, Symbian and Windows CE
only.
\note On Windows CE this feature is disabled by default for touch device
mkspecs. To enable keypad navigation, build Qt with
QT_KEYPAD_NAVIGATION defined.
\deprecated
\sa setNavigationMode()
*/
void QApplication::setKeypadNavigationEnabled(bool enable)
{
if (enable) {
#ifdef Q_OS_SYMBIAN
QApplication::setNavigationMode(Qt::NavigationModeKeypadDirectional);
#else
QApplication::setNavigationMode(Qt::NavigationModeKeypadTabOrder);
#endif
}
else {
QApplication::setNavigationMode(Qt::NavigationModeNone);
}
}
/*!
Returns true if Qt is set to use keypad navigation; otherwise returns
false. The default value is true on Symbian, but false on other platforms.
This feature is available in Qt for Embedded Linux, Symbian and Windows CE
only.
\note On Windows CE this feature is disabled by default for touch device
mkspecs. To enable keypad navigation, build Qt with
QT_KEYPAD_NAVIGATION defined.
\deprecated
\sa navigationMode()
*/
bool QApplication::keypadNavigationEnabled()
{
return QApplicationPrivate::navigationMode == Qt::NavigationModeKeypadTabOrder ||
QApplicationPrivate::navigationMode == Qt::NavigationModeKeypadDirectional;
}
#endif
/*!
\fn void QApplication::alert(QWidget *widget, int msec)
\since 4.3
Causes an alert to be shown for \a widget if the window is not the active
window. The alert is shown for \a msec miliseconds. If \a msec is zero (the
default), then the alert is shown indefinitely until the window becomes
active again.
Currently this function does nothing on Qt for Embedded Linux.
On Mac OS X, this works more at the application level and will cause the
application icon to bounce in the dock.
On Windows, this causes the window's taskbar entry to flash for a time. If
\a msec is zero, the flashing will stop and the taskbar entry will turn a
different color (currently orange).
On X11, this will cause the window to be marked as "demands attention", the
window must not be hidden (i.e. not have hide() called on it, but be
visible in some sort of way) in order for this to work.
*/
/*!
\property QApplication::cursorFlashTime
\brief the text cursor's flash (blink) time in milliseconds
The flash time is the time required to display, invert and restore the
caret display. Usually the text cursor is displayed for half the cursor
flash time, then hidden for the same amount of time, but this may vary.
The default value on X11 is 1000 milliseconds. On Windows, the
\gui{Control Panel} value is used and setting this property sets the cursor
flash time for all applications.
We recommend that widgets do not cache this value as it may change at any
time if the user changes the global desktop settings.
*/
/*!
\property QApplication::doubleClickInterval
\brief the time limit in milliseconds that distinguishes a double click
from two consecutive mouse clicks
The default value on X11 is 400 milliseconds. On Windows and Mac OS, the
operating system's value is used. However, on Windows and Symbian OS,
calling this function sets the double click interval for all applications.
*/
/*!
\property QApplication::keyboardInputInterval
\brief the time limit in milliseconds that distinguishes a key press
from two consecutive key presses
\since 4.2
The default value on X11 is 400 milliseconds. On Windows and Mac OS, the
operating system's value is used.
*/
/*!
\property QApplication::wheelScrollLines
\brief the number of lines to scroll a widget, when the
mouse wheel is rotated.
If the value exceeds the widget's number of visible lines, the widget
should interpret the scroll operation as a single \e{page up} or
\e{page down}. If the widget is an \l{QAbstractItemView}{item view class},
then the result of scrolling one \e line depends on the setting of the
widget's \l{QAbstractItemView::verticalScrollMode()}{scroll mode}. Scroll
one \e line can mean \l{QAbstractItemView::ScrollPerItem}{scroll one item}
or \l{QAbstractItemView::ScrollPerPixel}{scroll one pixel}.
By default, this property has a value of 3.
*/
/*!
\fn void QApplication::setEffectEnabled(Qt::UIEffect effect, bool enable)
Enables the UI effect \a effect if \a enable is true, otherwise the effect
will not be used.
\note All effects are disabled on screens running at less than 16-bit color
depth.
\sa isEffectEnabled(), Qt::UIEffect, setDesktopSettingsAware()
*/
/*!
\fn bool QApplication::isEffectEnabled(Qt::UIEffect effect)
Returns true if \a effect is enabled; otherwise returns false.
By default, Qt will try to use the desktop settings. To prevent this, call
setDesktopSettingsAware(false).
\note All effects are disabled on screens running at less than 16-bit color
depth.
\sa setEffectEnabled(), Qt::UIEffect
*/
/*!
\fn QWidget *QApplication::mainWidget()
Returns the main application widget, or 0 if there is no main widget.
*/
/*!
\fn void QApplication::setMainWidget(QWidget *mainWidget)
Sets the application's main widget to \a mainWidget.
In most respects the main widget is like any other widget, except that if
it is closed, the application exits. QApplication does \e not take
ownership of the \a mainWidget, so if you create your main widget on the
heap you must delete it yourself.
You need not have a main widget; connecting lastWindowClosed() to quit()
is an alternative.
On X11, this function also resizes and moves the main widget according
to the \e -geometry command-line option, so you should set the default
geometry (using \l QWidget::setGeometry()) before calling setMainWidget().
\sa mainWidget(), exec(), quit()
*/
/*!
\fn void QApplication::beep()
Sounds the bell, using the default volume and sound. The function is \e not
available in Qt for Embedded Linux.
*/
/*!
\fn void QApplication::setOverrideCursor(const QCursor &cursor)
Sets the application override cursor to \a cursor.
Application override cursors are intended for showing the user that the
application is in a special state, for example during an operation that
might take some time.
This cursor will be displayed in all the application's widgets until
restoreOverrideCursor() or another setOverrideCursor() is called.
Application cursors are stored on an internal stack. setOverrideCursor()
pushes the cursor onto the stack, and restoreOverrideCursor() pops the
active cursor off the stack. changeOverrideCursor() changes the curently
active application override cursor.
Every setOverrideCursor() must eventually be followed by a corresponding
restoreOverrideCursor(), otherwise the stack will never be emptied.
Example:
\snippet doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp 0
\sa overrideCursor(), restoreOverrideCursor(), changeOverrideCursor(),
QWidget::setCursor()
*/
/*!
\fn void QApplication::restoreOverrideCursor()
Undoes the last setOverrideCursor().
If setOverrideCursor() has been called twice, calling
restoreOverrideCursor() will activate the first cursor set. Calling this
function a second time restores the original widgets' cursors.
\sa setOverrideCursor(), overrideCursor()
*/
/*!
\macro qApp
\relates QApplication
A global pointer referring to the unique application object. It is
equivalent to the pointer returned by the QCoreApplication::instance()
function except that, in GUI applications, it is a pointer to a
QApplication instance.
Only one application object can be created.
\sa QCoreApplication::instance()
*/
#ifndef QT_NO_IM
// ************************************************************************
// Input Method support
// ************************************************************************
/*!
This function replaces the QInputContext instance used by the application
with \a inputContext.
Qt takes ownership of the given \a inputContext.
\sa inputContext()
*/
void QApplication::setInputContext(QInputContext *inputContext)
{
if (inputContext == QApplicationPrivate::inputContext)
return;
if (!inputContext) {
qWarning("QApplication::setInputContext: called with 0 input context");
return;
}
delete QApplicationPrivate::inputContext;
QApplicationPrivate::inputContext = inputContext;
QApplicationPrivate::inputContext->setParent(this);
}
/*!
Returns the QInputContext instance used by the application.
\sa setInputContext()
*/
QInputContext *QApplication::inputContext() const
{
Q_D(const QApplication);
Q_UNUSED(d);// only static members being used.
if (QApplicationPrivate::is_app_closing)
return d->inputContext;
#ifdef Q_WS_X11
if (!X11)
return 0;
if (!d->inputContext) {
QApplication *that = const_cast<QApplication *>(this);
QInputContext *qic = QInputContextFactory::create(X11->default_im, that);
// fallback to default X Input Method.
if (!qic)
qic = QInputContextFactory::create(QLatin1String("xim"), that);
that->d_func()->inputContext = qic;
}
#elif defined(Q_OS_SYMBIAN)
if (!d->inputContext) {
QApplication *that = const_cast<QApplication *>(this);
const QStringList keys = QInputContextFactory::keys();
// Try hbim and coefep first, then try others.
if (keys.contains(QLatin1String("hbim"))) {
that->d_func()->inputContext = QInputContextFactory::create(QLatin1String("hbim"), that);
} else if (keys.contains(QLatin1String("coefep"))) {
that->d_func()->inputContext = QInputContextFactory::create(QLatin1String("coefep"), that);
} else {
for (int c = 0; c < keys.size() && !d->inputContext; ++c) {
that->d_func()->inputContext = QInputContextFactory::create(keys[c], that);
}
}
}
#endif
return d->inputContext;
}
#endif // QT_NO_IM
//Returns the current platform used by keyBindings
uint QApplicationPrivate::currentPlatform(){
uint platform = KB_Win;
#ifdef Q_WS_MAC
platform = KB_Mac;
#elif defined Q_WS_X11
platform = KB_X11;
if (X11->desktopEnvironment == DE_KDE)
platform |= KB_KDE;
if (X11->desktopEnvironment == DE_GNOME)
platform |= KB_Gnome;
if (X11->desktopEnvironment == DE_CDE)
platform |= KB_CDE;
#elif defined(Q_OS_SYMBIAN)
platform = KB_S60;
#endif
return platform;
}
bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event)
{
return QCoreApplication::sendSpontaneousEvent(receiver, event);
}
/*!
\since 4.2
Returns the current keyboard input locale.
*/
QLocale QApplication::keyboardInputLocale()
{
if (!QApplicationPrivate::checkInstance("keyboardInputLocale"))
return QLocale::c();
return qt_keymapper_private()->keyboardInputLocale;
}
/*!
\since 4.2
Returns the current keyboard input direction.
*/
Qt::LayoutDirection QApplication::keyboardInputDirection()
{
if (!QApplicationPrivate::checkInstance("keyboardInputDirection"))
return Qt::LeftToRight;
return qt_keymapper_private()->keyboardInputDirection;
}
void QApplicationPrivate::giveFocusAccordingToFocusPolicy(QWidget *widget,
Qt::FocusPolicy focusPolicy,
Qt::FocusReason focusReason)
{
QWidget *focusWidget = widget;
while (focusWidget) {
if (focusWidget->isEnabled()
&& QApplicationPrivate::shouldSetFocus(focusWidget, focusPolicy)) {
focusWidget->setFocus(focusReason);
break;
}
if (focusWidget->isWindow())
break;
focusWidget = focusWidget->parentWidget();
}
}
bool QApplicationPrivate::shouldSetFocus(QWidget *w, Qt::FocusPolicy policy)
{
QWidget *f = w;
while (f->d_func()->extra && f->d_func()->extra->focus_proxy)
f = f->d_func()->extra->focus_proxy;
if ((w->focusPolicy() & policy) != policy)
return false;
if (w != f && (f->focusPolicy() & policy) != policy)
return false;
return true;
}
/*! \fn QDecoration &QApplication::qwsDecoration()
Return the QWSDecoration used for decorating windows.
\warning This method is non-portable. It is only available in
Qt for Embedded Linux.
\sa QDecoration
*/
/*!
\fn void QApplication::qwsSetDecoration(QDecoration *decoration)
Sets the QDecoration derived class to use for decorating the
windows used by Qt for Embedded Linux to the \a decoration
specified.
This method is non-portable. It is only available in Qt for Embedded Linux.
\sa QDecoration
*/
/*! \fn QDecoration* QApplication::qwsSetDecoration(const QString &decoration)
\overload
Requests a QDecoration object for \a decoration from the
QDecorationFactory.
The string must be one of the QDecorationFactory::keys(). Keys are case
insensitive.
A later call to the QApplication constructor will override the requested
style when a "-style" option is passed in as a commandline parameter.
Returns 0 if an unknown \a decoration is passed, otherwise the QStyle object
returned is set as the application's GUI style.
*/
/*!
\fn bool QApplication::qwsEventFilter(QWSEvent *event)
This virtual function is only implemented under Qt for Embedded Linux.
If you create an application that inherits QApplication and
reimplement this function, you get direct access to all QWS (Q
Window System) events that the are received from the QWS master
process. The events are passed in the \a event parameter.
Return true if you want to stop the event from being processed.
Return false for normal event dispatching. The default
implementation returns false.
*/
/*! \fn void QApplication::qwsSetCustomColors(QRgb *colorTable, int start, int numColors)
Set Qt for Embedded Linux custom color table.
Qt for Embedded Linux on 8-bpp displays allocates a standard 216 color cube.
The remaining 40 colors may be used by setting a custom color
table in the QWS master process before any clients connect.
\a colorTable is an array of up to 40 custom colors. \a start is
the starting index (0-39) and \a numColors is the number of colors
to be set (1-40).
This method is non-portable. It is available \e only in
Qt for Embedded Linux.
\note The custom colors will not be used by the default screen
driver. To make use of the new colors, implement a custom screen
driver, or use QDirectPainter.
*/
/*! \fn int QApplication::qwsProcessEvent(QWSEvent* event)
\internal
*/
/*! \fn int QApplication::x11ClientMessage(QWidget* w, XEvent* event, bool passive_only)
\internal
*/
/*! \fn int QApplication::x11ProcessEvent(XEvent* event)
This function does the core processing of individual X
\a{event}s, normally by dispatching Qt events to the right
destination.
It returns 1 if the event was consumed by special handling, 0 if
the \a event was consumed by normal handling, and -1 if the \a
event was for an unrecognized widget.
\sa x11EventFilter()
*/
/*!
\fn bool QApplication::x11EventFilter(XEvent *event)
\warning This virtual function is only implemented under X11.
If you create an application that inherits QApplication and
reimplement this function, you get direct access to all X events
that the are received from the X server. The events are passed in
the \a event parameter.
Return true if you want to stop the event from being processed.
Return false for normal event dispatching. The default
implementation returns false.
It is only the directly addressed messages that are filtered.
You must install an event filter directly on the event
dispatcher, which is returned by
QAbstractEventDispatcher::instance(), to handle system wide
messages.
\sa x11ProcessEvent()
*/
/*! \fn void QApplication::winFocus(QWidget *widget, bool gotFocus)
\internal
\since 4.1
If \a gotFocus is true, \a widget will become the active window.
Otherwise the active window is reset to 0.
*/
/*! \fn void QApplication::winMouseButtonUp()
\internal
*/
/*! \fn void QApplication::syncX()
Synchronizes with the X server in the X11 implementation.
This normally takes some time. Does nothing on other platforms.
*/
void QApplicationPrivate::updateTouchPointsForWidget(QWidget *widget, QTouchEvent *touchEvent)
{
for (int i = 0; i < touchEvent->touchPoints().count(); ++i) {
QTouchEvent::TouchPoint &touchPoint = touchEvent->_touchPoints[i];
// preserve the sub-pixel resolution
QRectF rect = touchPoint.screenRect();
const QPointF screenPos = rect.center();
const QPointF delta = screenPos - screenPos.toPoint();
rect.moveCenter(widget->mapFromGlobal(screenPos.toPoint()) + delta);
touchPoint.d->rect = rect;
if (touchPoint.state() == Qt::TouchPointPressed) {
touchPoint.d->startPos = widget->mapFromGlobal(touchPoint.startScreenPos().toPoint()) + delta;
touchPoint.d->lastPos = widget->mapFromGlobal(touchPoint.lastScreenPos().toPoint()) + delta;
}
}
}
void QApplicationPrivate::initializeMultitouch()
{
widgetForTouchPointId.clear();
appCurrentTouchPoints.clear();
initializeMultitouch_sys();
}
void QApplicationPrivate::cleanupMultitouch()
{
cleanupMultitouch_sys();
widgetForTouchPointId.clear();
appCurrentTouchPoints.clear();
}
int QApplicationPrivate::findClosestTouchPointId(const QPointF &screenPos)
{
int closestTouchPointId = -1;
qreal closestDistance = qreal(0.);
foreach (const QTouchEvent::TouchPoint &touchPoint, appCurrentTouchPoints) {
qreal distance = QLineF(screenPos, touchPoint.screenPos()).length();
if (closestTouchPointId == -1 || distance < closestDistance) {
closestTouchPointId = touchPoint.id();
closestDistance = distance;
}
}
return closestTouchPointId;
}
void QApplicationPrivate::translateRawTouchEvent(QWidget *window,
QTouchEvent::DeviceType deviceType,
const QList<QTouchEvent::TouchPoint> &touchPoints)
{
QApplicationPrivate *d = self;
typedef QPair<Qt::TouchPointStates, QList<QTouchEvent::TouchPoint> > StatesAndTouchPoints;
QHash<QWidget *, StatesAndTouchPoints> widgetsNeedingEvents;
for (int i = 0; i < touchPoints.count(); ++i) {
QTouchEvent::TouchPoint touchPoint = touchPoints.at(i);
// explicitly detach from the original touch point that we got, so even
// if the touchpoint structs are reused, we will make a copy that we'll
// deliver to the user (which might want to store the struct for later use).
touchPoint.d = touchPoint.d->detach();
// update state
QWeakPointer<QWidget> widget;
switch (touchPoint.state()) {
case Qt::TouchPointPressed:
{
if (deviceType == QTouchEvent::TouchPad) {
// on touch-pads, send all touch points to the same widget
widget = d->widgetForTouchPointId.isEmpty()
? QWeakPointer<QWidget>()
: d->widgetForTouchPointId.constBegin().value();
}
if (!widget) {
// determine which widget this event will go to
if (!window)
window = QApplication::topLevelAt(touchPoint.screenPos().toPoint());
if (!window)
continue;
widget = window->childAt(window->mapFromGlobal(touchPoint.screenPos().toPoint()));
if (!widget)
widget = window;
}
if (deviceType == QTouchEvent::TouchScreen) {
int closestTouchPointId = d->findClosestTouchPointId(touchPoint.screenPos());
QWidget *closestWidget = d->widgetForTouchPointId.value(closestTouchPointId).data();
if (closestWidget
&& (widget.data()->isAncestorOf(closestWidget) || closestWidget->isAncestorOf(widget.data()))) {
widget = closestWidget;
}
}
d->widgetForTouchPointId[touchPoint.id()] = widget;
touchPoint.d->startScreenPos = touchPoint.screenPos();
touchPoint.d->lastScreenPos = touchPoint.screenPos();
touchPoint.d->startNormalizedPos = touchPoint.normalizedPos();
touchPoint.d->lastNormalizedPos = touchPoint.normalizedPos();
if (touchPoint.pressure() < qreal(0.))
touchPoint.d->pressure = qreal(1.);
d->appCurrentTouchPoints.insert(touchPoint.id(), touchPoint);
break;
}
case Qt::TouchPointReleased:
{
widget = d->widgetForTouchPointId.take(touchPoint.id());
if (!widget)
continue;
QTouchEvent::TouchPoint previousTouchPoint = d->appCurrentTouchPoints.take(touchPoint.id());
touchPoint.d->startScreenPos = previousTouchPoint.startScreenPos();
touchPoint.d->lastScreenPos = previousTouchPoint.screenPos();
touchPoint.d->startPos = previousTouchPoint.startPos();
touchPoint.d->lastPos = previousTouchPoint.pos();
touchPoint.d->startNormalizedPos = previousTouchPoint.startNormalizedPos();
touchPoint.d->lastNormalizedPos = previousTouchPoint.normalizedPos();
if (touchPoint.pressure() < qreal(0.))
touchPoint.d->pressure = qreal(0.);
break;
}
default:
widget = d->widgetForTouchPointId.value(touchPoint.id());
if (!widget)
continue;
Q_ASSERT(d->appCurrentTouchPoints.contains(touchPoint.id()));
QTouchEvent::TouchPoint previousTouchPoint = d->appCurrentTouchPoints.value(touchPoint.id());
touchPoint.d->startScreenPos = previousTouchPoint.startScreenPos();
touchPoint.d->lastScreenPos = previousTouchPoint.screenPos();
touchPoint.d->startPos = previousTouchPoint.startPos();
touchPoint.d->lastPos = previousTouchPoint.pos();
touchPoint.d->startNormalizedPos = previousTouchPoint.startNormalizedPos();
touchPoint.d->lastNormalizedPos = previousTouchPoint.normalizedPos();
if (touchPoint.pressure() < qreal(0.))
touchPoint.d->pressure = qreal(1.);
d->appCurrentTouchPoints[touchPoint.id()] = touchPoint;
break;
}
Q_ASSERT(widget.data() != 0);
// make the *scene* functions return the same as the *screen* functions
touchPoint.d->sceneRect = touchPoint.screenRect();
touchPoint.d->startScenePos = touchPoint.startScreenPos();
touchPoint.d->lastScenePos = touchPoint.lastScreenPos();
StatesAndTouchPoints &maskAndPoints = widgetsNeedingEvents[widget.data()];
maskAndPoints.first |= touchPoint.state();
if (touchPoint.isPrimary())
maskAndPoints.first |= Qt::TouchPointPrimary;
maskAndPoints.second.append(touchPoint);
}
if (widgetsNeedingEvents.isEmpty())
return;
QHash<QWidget *, StatesAndTouchPoints>::ConstIterator it = widgetsNeedingEvents.constBegin();
const QHash<QWidget *, StatesAndTouchPoints>::ConstIterator end = widgetsNeedingEvents.constEnd();
for (; it != end; ++it) {
QWidget *widget = it.key();
if (!QApplicationPrivate::tryModalHelper(widget, 0))
continue;
QEvent::Type eventType;
switch (it.value().first & Qt::TouchPointStateMask) {
case Qt::TouchPointPressed:
eventType = QEvent::TouchBegin;
break;
case Qt::TouchPointReleased:
eventType = QEvent::TouchEnd;
break;
case Qt::TouchPointStationary:
// don't send the event if nothing changed
continue;
default:
eventType = QEvent::TouchUpdate;
break;
}
QTouchEvent touchEvent(eventType,
deviceType,
QApplication::keyboardModifiers(),
it.value().first,
it.value().second);
updateTouchPointsForWidget(widget, &touchEvent);
switch (touchEvent.type()) {
case QEvent::TouchBegin:
{
// if the TouchBegin handler recurses, we assume that means the event
// has been implicitly accepted and continue to send touch events
widget->setAttribute(Qt::WA_WState_AcceptedTouchBeginEvent);
(void ) QApplication::sendSpontaneousEvent(widget, &touchEvent);
break;
}
default:
if (widget->testAttribute(Qt::WA_WState_AcceptedTouchBeginEvent)) {
if (touchEvent.type() == QEvent::TouchEnd)
widget->setAttribute(Qt::WA_WState_AcceptedTouchBeginEvent, false);
(void) QApplication::sendSpontaneousEvent(widget, &touchEvent);
}
break;
}
}
}
Q_GUI_EXPORT void qt_translateRawTouchEvent(QWidget *window,
QTouchEvent::DeviceType deviceType,
const QList<QTouchEvent::TouchPoint> &touchPoints)
{
QApplicationPrivate::translateRawTouchEvent(window, deviceType, touchPoints);
}
#ifndef QT_NO_GESTURES
QGestureManager* QGestureManager::instance()
{
if (QApplicationPrivate *qAppPriv = QApplicationPrivate::instance()) {
if (!qAppPriv->gestureManager)
qAppPriv->gestureManager = new QGestureManager(qApp);
return qAppPriv->gestureManager;
}
return 0;
}
#endif // QT_NO_GESTURES
// These pixmaps approximate the images in the Windows User Interface Guidelines.
// XPM
static const char * const move_xpm[] = {
"11 20 3 1",
". c None",
#if defined(Q_WS_WIN)
"a c #000000",
"X c #FFFFFF", // Windows cursor is traditionally white
#else
"a c #FFFFFF",
"X c #000000", // X11 cursor is traditionally black
#endif
"aa.........",
"aXa........",
"aXXa.......",
"aXXXa......",
"aXXXXa.....",
"aXXXXXa....",
"aXXXXXXa...",
"aXXXXXXXa..",
"aXXXXXXXXa.",
"aXXXXXXXXXa",
"aXXXXXXaaaa",
"aXXXaXXa...",
"aXXaaXXa...",
"aXa..aXXa..",
"aa...aXXa..",
"a.....aXXa.",
"......aXXa.",
".......aXXa",
".......aXXa",
"........aa."};
#ifdef Q_WS_WIN
/* XPM */
static const char * const ignore_xpm[] = {
"24 30 3 1",
". c None",
"a c #000000",
"X c #FFFFFF",
"aa......................",
"aXa.....................",
"aXXa....................",
"aXXXa...................",
"aXXXXa..................",
"aXXXXXa.................",
"aXXXXXXa................",
"aXXXXXXXa...............",
"aXXXXXXXXa..............",
"aXXXXXXXXXa.............",
"aXXXXXXaaaa.............",
"aXXXaXXa................",
"aXXaaXXa................",
"aXa..aXXa...............",
"aa...aXXa...............",
"a.....aXXa..............",
"......aXXa.....XXXX.....",
".......aXXa..XXaaaaXX...",
".......aXXa.XaaaaaaaaX..",
"........aa.XaaaXXXXaaaX.",
"...........XaaaaX..XaaX.",
"..........XaaXaaaX..XaaX",
"..........XaaXXaaaX.XaaX",
"..........XaaX.XaaaXXaaX",
"..........XaaX..XaaaXaaX",
"...........XaaX..XaaaaX.",
"...........XaaaXXXXaaaX.",
"............XaaaaaaaaX..",
".............XXaaaaXX...",
"...............XXXX....."};
#endif
/* XPM */
static const char * const copy_xpm[] = {
"24 30 3 1",
". c None",
"a c #000000",
"X c #FFFFFF",
#if defined(Q_WS_WIN) // Windows cursor is traditionally white
"aa......................",
"aXa.....................",
"aXXa....................",
"aXXXa...................",
"aXXXXa..................",
"aXXXXXa.................",
"aXXXXXXa................",
"aXXXXXXXa...............",
"aXXXXXXXXa..............",
"aXXXXXXXXXa.............",
"aXXXXXXaaaa.............",
"aXXXaXXa................",
"aXXaaXXa................",
"aXa..aXXa...............",
"aa...aXXa...............",
"a.....aXXa..............",
"......aXXa..............",
".......aXXa.............",
".......aXXa.............",
"........aa...aaaaaaaaaaa",
#else
"XX......................",
"XaX.....................",
"XaaX....................",
"XaaaX...................",
"XaaaaX..................",
"XaaaaaX.................",
"XaaaaaaX................",
"XaaaaaaaX...............",
"XaaaaaaaaX..............",
"XaaaaaaaaaX.............",
"XaaaaaaXXXX.............",
"XaaaXaaX................",
"XaaXXaaX................",
"XaX..XaaX...............",
"XX...XaaX...............",
"X.....XaaX..............",
"......XaaX..............",
".......XaaX.............",
".......XaaX.............",
"........XX...aaaaaaaaaaa",
#endif
".............aXXXXXXXXXa",
".............aXXXXXXXXXa",
".............aXXXXaXXXXa",
".............aXXXXaXXXXa",
".............aXXaaaaaXXa",
".............aXXXXaXXXXa",
".............aXXXXaXXXXa",
".............aXXXXXXXXXa",
".............aXXXXXXXXXa",
".............aaaaaaaaaaa"};
/* XPM */
static const char * const link_xpm[] = {
"24 30 3 1",
". c None",
"a c #000000",
"X c #FFFFFF",
#if defined(Q_WS_WIN) // Windows cursor is traditionally white
"aa......................",
"aXa.....................",
"aXXa....................",
"aXXXa...................",
"aXXXXa..................",
"aXXXXXa.................",
"aXXXXXXa................",
"aXXXXXXXa...............",
"aXXXXXXXXa..............",
"aXXXXXXXXXa.............",
"aXXXXXXaaaa.............",
"aXXXaXXa................",
"aXXaaXXa................",
"aXa..aXXa...............",
"aa...aXXa...............",
"a.....aXXa..............",
"......aXXa..............",
".......aXXa.............",
".......aXXa.............",
"........aa...aaaaaaaaaaa",
#else
"XX......................",
"XaX.....................",
"XaaX....................",
"XaaaX...................",
"XaaaaX..................",
"XaaaaaX.................",
"XaaaaaaX................",
"XaaaaaaaX...............",
"XaaaaaaaaX..............",
"XaaaaaaaaaX.............",
"XaaaaaaXXXX.............",
"XaaaXaaX................",
"XaaXXaaX................",
"XaX..XaaX...............",
"XX...XaaX...............",
"X.....XaaX..............",
"......XaaX..............",
".......XaaX.............",
".......XaaX.............",
"........XX...aaaaaaaaaaa",
#endif
".............aXXXXXXXXXa",
".............aXXXaaaaXXa",
".............aXXXXaaaXXa",
".............aXXXaaaaXXa",
".............aXXaaaXaXXa",
".............aXXaaXXXXXa",
".............aXXaXXXXXXa",
".............aXXXaXXXXXa",
".............aXXXXXXXXXa",
".............aaaaaaaaaaa"};
QPixmap QApplicationPrivate::getPixmapCursor(Qt::CursorShape cshape)
{
#if defined(Q_WS_X11) || defined(Q_WS_WIN)
if (!move_cursor) {
move_cursor = new QPixmap((const char **)move_xpm);
copy_cursor = new QPixmap((const char **)copy_xpm);
link_cursor = new QPixmap((const char **)link_xpm);
#ifdef Q_WS_WIN
ignore_cursor = new QPixmap((const char **)ignore_xpm);
#endif
}
switch (cshape) {
case Qt::DragMoveCursor:
return *move_cursor;
case Qt::DragCopyCursor:
return *copy_cursor;
case Qt::DragLinkCursor:
return *link_cursor;
#ifdef Q_WS_WIN
case Qt::ForbiddenCursor:
return *ignore_cursor;
#endif
default:
break;
}
#endif
return QPixmap();
}
QString QApplicationPrivate::qmljsDebugArgumentsString()
{
return qmljs_debug_arguments;
}
QT_END_NAMESPACE
#include "moc_qapplication.cpp"
| [
"sonyang@seas.upenn.edu"
] | sonyang@seas.upenn.edu |
c4c394fb076e5d36b081f9ac4e8837d42045f0c1 | 5bfcd0c40509ed4f4251e5d286aa010e0a04243f | /3rdParty/Raknet/include/UDPProxyCoordinator.cpp | 4436ae8e1cc822f3418db8d74ebfdf9554673f6b | [] | no_license | CedricGuillemet/theRush | 28b912d8c90f8c7b67c7c0c3e55512ab9bb7df0c | bf1a85200f236d8eff672fb701b213a4ea24424c | refs/heads/master | 2021-09-06T09:07:56.188895 | 2018-02-04T19:06:26 | 2018-02-04T19:06:26 | 120,213,513 | 2 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 18,096 | cpp | #include "NativeFeatureIncludes.h"
#if _RAKNET_SUPPORT_UDPProxyCoordinator==1
#include "UDPProxyCoordinator.h"
#include "BitStream.h"
#include "UDPProxyCommon.h"
#include "RakPeerInterface.h"
#include "MessageIdentifiers.h"
#include "Rand.h"
#include "GetTime.h"
#include "UDPForwarder.h"
// Larger than the client version
static const int DEFAULT_CLIENT_UNRESPONSIVE_PING_TIME=2000;
static const int DEFAULT_UNRESPONSIVE_PING_TIME=DEFAULT_CLIENT_UNRESPONSIVE_PING_TIME+1000;
using namespace RakNet;
bool operator<( const DataStructures::MLKeyRef<unsigned short> &inputKey, const UDPProxyCoordinator::ServerWithPing &cls ) {return inputKey.Get() < cls.ping;}
bool operator>( const DataStructures::MLKeyRef<unsigned short> &inputKey, const UDPProxyCoordinator::ServerWithPing &cls ) {return inputKey.Get() > cls.ping;}
bool operator==( const DataStructures::MLKeyRef<unsigned short> &inputKey, const UDPProxyCoordinator::ServerWithPing &cls ) {return inputKey.Get() == cls.ping;}
bool operator<( const DataStructures::MLKeyRef<UDPProxyCoordinator::SenderAndTargetAddress> &inputKey, const UDPProxyCoordinator::ForwardingRequest *cls )
{
return inputKey.Get().senderClientAddress < cls->sata.senderClientAddress ||
(inputKey.Get().senderClientAddress == cls->sata.senderClientAddress && inputKey.Get().targetClientAddress < cls->sata.targetClientAddress);
}
bool operator>( const DataStructures::MLKeyRef<UDPProxyCoordinator::SenderAndTargetAddress> &inputKey, const UDPProxyCoordinator::ForwardingRequest *cls )
{
return inputKey.Get().senderClientAddress > cls->sata.senderClientAddress ||
(inputKey.Get().senderClientAddress == cls->sata.senderClientAddress && inputKey.Get().targetClientAddress > cls->sata.targetClientAddress);
}
bool operator==( const DataStructures::MLKeyRef<UDPProxyCoordinator::SenderAndTargetAddress> &inputKey, const UDPProxyCoordinator::ForwardingRequest *cls )
{
return inputKey.Get().senderClientAddress == cls->sata.senderClientAddress && inputKey.Get().targetClientAddress == cls->sata.targetClientAddress;
}
STATIC_FACTORY_DEFINITIONS(UDPProxyCoordinator,UDPProxyCoordinator);
UDPProxyCoordinator::UDPProxyCoordinator()
{
}
UDPProxyCoordinator::~UDPProxyCoordinator()
{
Clear();
}
void UDPProxyCoordinator::SetRemoteLoginPassword(RakNet::RakString password)
{
remoteLoginPassword=password;
}
void UDPProxyCoordinator::Update(void)
{
DataStructures::DefaultIndexType idx;
RakNet::TimeMS curTime = RakNet::GetTimeMS();
ForwardingRequest *fw;
idx=0;
while (idx < forwardingRequestList.GetSize())
{
fw=forwardingRequestList[idx];
if (fw->timeRequestedPings!=0 &&
curTime > fw->timeRequestedPings + DEFAULT_UNRESPONSIVE_PING_TIME)
{
fw->OrderRemainingServersToTry();
fw->timeRequestedPings=0;
TryNextServer(fw->sata, fw);
idx++;
}
else if (fw->timeoutAfterSuccess!=0 &&
curTime > fw->timeoutAfterSuccess)
{
// Forwarding request succeeded, we waited a bit to prevent duplicates. Can forget about the entry now.
RakNet::OP_DELETE(fw,_FILE_AND_LINE_);
forwardingRequestList.RemoveAtIndex(idx,_FILE_AND_LINE_);
}
else
idx++;
}
}
PluginReceiveResult UDPProxyCoordinator::OnReceive(Packet *packet)
{
if (packet->data[0]==ID_UDP_PROXY_GENERAL && packet->length>1)
{
switch (packet->data[1])
{
case ID_UDP_PROXY_FORWARDING_REQUEST_FROM_CLIENT_TO_COORDINATOR:
OnForwardingRequestFromClientToCoordinator(packet);
return RR_STOP_PROCESSING_AND_DEALLOCATE;
case ID_UDP_PROXY_LOGIN_REQUEST_FROM_SERVER_TO_COORDINATOR:
OnLoginRequestFromServerToCoordinator(packet);
return RR_STOP_PROCESSING_AND_DEALLOCATE;
case ID_UDP_PROXY_FORWARDING_REPLY_FROM_SERVER_TO_COORDINATOR:
OnForwardingReplyFromServerToCoordinator(packet);
return RR_STOP_PROCESSING_AND_DEALLOCATE;
case ID_UDP_PROXY_PING_SERVERS_REPLY_FROM_CLIENT_TO_COORDINATOR:
OnPingServersReplyFromClientToCoordinator(packet);
return RR_STOP_PROCESSING_AND_DEALLOCATE;
}
}
return RR_CONTINUE_PROCESSING;
}
void UDPProxyCoordinator::OnClosedConnection(const SystemAddress &systemAddress, RakNetGUID rakNetGUID, PI2_LostConnectionReason lostConnectionReason )
{
(void) lostConnectionReason;
(void) rakNetGUID;
DataStructures::DefaultIndexType idx, idx2;
idx=0;
while (idx < forwardingRequestList.GetSize())
{
if (forwardingRequestList[idx]->requestingAddress==systemAddress)
{
// Guy disconnected before the attempt completed
RakNet::OP_DELETE(forwardingRequestList[idx], _FILE_AND_LINE_);
forwardingRequestList.RemoveAtIndex(idx, _FILE_AND_LINE_ );
}
else
idx++;
}
idx = serverList.GetIndexOf(systemAddress);
if (idx!=(DataStructures::DefaultIndexType)-1)
{
ForwardingRequest *fw;
// For each pending client for this server, choose from remaining servers.
for (idx2=0; idx2 < forwardingRequestList.GetSize(); idx2++)
{
fw = forwardingRequestList[idx2];
if (fw->currentlyAttemptedServerAddress==systemAddress)
{
// Try the next server
TryNextServer(fw->sata, fw);
}
}
// Remove dead server
serverList.RemoveAtIndex(idx, _FILE_AND_LINE_ );
}
}
void UDPProxyCoordinator::OnForwardingRequestFromClientToCoordinator(Packet *packet)
{
RakNet::BitStream incomingBs(packet->data, packet->length, false);
incomingBs.IgnoreBytes(2);
SystemAddress sourceAddress;
incomingBs.Read(sourceAddress);
if (sourceAddress==UNASSIGNED_SYSTEM_ADDRESS)
sourceAddress=packet->systemAddress;
SystemAddress targetAddress;
RakNetGUID targetGuid;
bool usesAddress;
incomingBs.Read(usesAddress);
if (usesAddress)
{
incomingBs.Read(targetAddress);
}
else
{
incomingBs.Read(targetGuid);
targetAddress=rakPeerInterface->GetSystemAddressFromGuid(targetGuid);
}
ForwardingRequest *fw = RakNet::OP_NEW<ForwardingRequest>(_FILE_AND_LINE_);
fw->timeoutAfterSuccess=0;
incomingBs.Read(fw->timeoutOnNoDataMS);
bool hasServerSelectionBitstream;
incomingBs.Read(hasServerSelectionBitstream);
if (hasServerSelectionBitstream)
incomingBs.Read(&(fw->serverSelectionBitstream));
RakNet::BitStream outgoingBs;
SenderAndTargetAddress sata;
sata.senderClientAddress=sourceAddress;
sata.targetClientAddress=targetAddress;
SenderAndTargetAddress sataReversed;
sataReversed.senderClientAddress=targetAddress;
sataReversed.targetClientAddress=sourceAddress;
DataStructures::DefaultIndexType insertionIndex;
insertionIndex = forwardingRequestList.GetInsertionIndex(sata);
if (insertionIndex==(DataStructures::DefaultIndexType)-1 ||
forwardingRequestList.GetInsertionIndex(sataReversed)==(DataStructures::DefaultIndexType)-1)
{
outgoingBs.Write((MessageID)ID_UDP_PROXY_GENERAL);
outgoingBs.Write((MessageID)ID_UDP_PROXY_IN_PROGRESS);
outgoingBs.Write(sata.senderClientAddress);
outgoingBs.Write(targetAddress);
rakPeerInterface->Send(&outgoingBs, MEDIUM_PRIORITY, RELIABLE_ORDERED, 0, packet->systemAddress, false);
RakNet::OP_DELETE(fw, _FILE_AND_LINE_);
return;
}
if (serverList.GetSize()==0)
{
outgoingBs.Write((MessageID)ID_UDP_PROXY_GENERAL);
outgoingBs.Write((MessageID)ID_UDP_PROXY_NO_SERVERS_ONLINE);
outgoingBs.Write(sata.senderClientAddress);
outgoingBs.Write(targetAddress);
rakPeerInterface->Send(&outgoingBs, MEDIUM_PRIORITY, RELIABLE_ORDERED, 0, packet->systemAddress, false);
RakNet::OP_DELETE(fw, _FILE_AND_LINE_);
return;
}
if (rakPeerInterface->GetConnectionState(targetAddress)!=IS_CONNECTED && usesAddress==false)
{
outgoingBs.Write((MessageID)ID_UDP_PROXY_GENERAL);
outgoingBs.Write((MessageID)ID_UDP_PROXY_RECIPIENT_GUID_NOT_CONNECTED_TO_COORDINATOR);
outgoingBs.Write(sata.senderClientAddress);
outgoingBs.Write(targetAddress);
outgoingBs.Write(targetGuid);
rakPeerInterface->Send(&outgoingBs, MEDIUM_PRIORITY, RELIABLE_ORDERED, 0, packet->systemAddress, false);
RakNet::OP_DELETE(fw, _FILE_AND_LINE_);
return;
}
fw->sata=sata;
fw->requestingAddress=packet->systemAddress;
if (serverList.GetSize()>1)
{
outgoingBs.Write((MessageID)ID_UDP_PROXY_GENERAL);
outgoingBs.Write((MessageID)ID_UDP_PROXY_PING_SERVERS_FROM_COORDINATOR_TO_CLIENT);
outgoingBs.Write(sourceAddress);
outgoingBs.Write(targetAddress);
unsigned short serverListSize = (unsigned short) serverList.GetSize();
outgoingBs.Write(serverListSize);
DataStructures::DefaultIndexType idx;
for (idx=0; idx < serverList.GetSize(); idx++)
outgoingBs.Write(serverList[idx]);
rakPeerInterface->Send(&outgoingBs, MEDIUM_PRIORITY, RELIABLE_ORDERED, 0, sourceAddress, false);
rakPeerInterface->Send(&outgoingBs, MEDIUM_PRIORITY, RELIABLE_ORDERED, 0, targetAddress, false);
fw->timeRequestedPings=RakNet::GetTimeMS();
DataStructures::DefaultIndexType copyIndex;
for (copyIndex=0; copyIndex < serverList.GetSize(); copyIndex++)
fw->remainingServersToTry.Push(serverList[copyIndex], _FILE_AND_LINE_ );
forwardingRequestList.InsertAtIndex(fw, insertionIndex, _FILE_AND_LINE_ );
}
else
{
fw->timeRequestedPings=0;
fw->currentlyAttemptedServerAddress=serverList[0];
forwardingRequestList.InsertAtIndex(fw, insertionIndex, _FILE_AND_LINE_ );
SendForwardingRequest(sourceAddress, targetAddress, fw->currentlyAttemptedServerAddress, fw->timeoutOnNoDataMS);
}
}
void UDPProxyCoordinator::SendForwardingRequest(SystemAddress sourceAddress, SystemAddress targetAddress, SystemAddress serverAddress, RakNet::TimeMS timeoutOnNoDataMS)
{
RakNet::BitStream outgoingBs;
// Send request to desired server
outgoingBs.Write((MessageID)ID_UDP_PROXY_GENERAL);
outgoingBs.Write((MessageID)ID_UDP_PROXY_FORWARDING_REQUEST_FROM_COORDINATOR_TO_SERVER);
outgoingBs.Write(sourceAddress);
outgoingBs.Write(targetAddress);
outgoingBs.Write(timeoutOnNoDataMS);
rakPeerInterface->Send(&outgoingBs, MEDIUM_PRIORITY, RELIABLE_ORDERED, 0, serverAddress, false);
}
void UDPProxyCoordinator::OnLoginRequestFromServerToCoordinator(Packet *packet)
{
RakNet::BitStream incomingBs(packet->data, packet->length, false);
incomingBs.IgnoreBytes(2);
RakNet::RakString password;
incomingBs.Read(password);
RakNet::BitStream outgoingBs;
if (remoteLoginPassword.IsEmpty())
{
outgoingBs.Write((MessageID)ID_UDP_PROXY_GENERAL);
outgoingBs.Write((MessageID)ID_UDP_PROXY_NO_PASSWORD_SET_FROM_COORDINATOR_TO_SERVER);
outgoingBs.Write(password);
rakPeerInterface->Send(&outgoingBs, MEDIUM_PRIORITY, RELIABLE_ORDERED, 0, packet->systemAddress, false);
return;
}
if (remoteLoginPassword!=password)
{
outgoingBs.Write((MessageID)ID_UDP_PROXY_GENERAL);
outgoingBs.Write((MessageID)ID_UDP_PROXY_WRONG_PASSWORD_FROM_COORDINATOR_TO_SERVER);
outgoingBs.Write(password);
rakPeerInterface->Send(&outgoingBs, MEDIUM_PRIORITY, RELIABLE_ORDERED, 0, packet->systemAddress, false);
return;
}
DataStructures::DefaultIndexType insertionIndex;
insertionIndex=serverList.GetInsertionIndex(packet->systemAddress);
if (insertionIndex==(DataStructures::DefaultIndexType)-1)
{
outgoingBs.Write((MessageID)ID_UDP_PROXY_GENERAL);
outgoingBs.Write((MessageID)ID_UDP_PROXY_ALREADY_LOGGED_IN_FROM_COORDINATOR_TO_SERVER);
outgoingBs.Write(password);
rakPeerInterface->Send(&outgoingBs, MEDIUM_PRIORITY, RELIABLE_ORDERED, 0, packet->systemAddress, false);
return;
}
serverList.InsertAtIndex(packet->systemAddress, insertionIndex, _FILE_AND_LINE_ );
outgoingBs.Write((MessageID)ID_UDP_PROXY_GENERAL);
outgoingBs.Write((MessageID)ID_UDP_PROXY_LOGIN_SUCCESS_FROM_COORDINATOR_TO_SERVER);
outgoingBs.Write(password);
rakPeerInterface->Send(&outgoingBs, MEDIUM_PRIORITY, RELIABLE_ORDERED, 0, packet->systemAddress, false);
}
void UDPProxyCoordinator::OnForwardingReplyFromServerToCoordinator(Packet *packet)
{
RakNet::BitStream incomingBs(packet->data, packet->length, false);
incomingBs.IgnoreBytes(2);
SenderAndTargetAddress sata;
incomingBs.Read(sata.senderClientAddress);
incomingBs.Read(sata.targetClientAddress);
DataStructures::DefaultIndexType index = forwardingRequestList.GetIndexOf(sata);
if (index==(DataStructures::DefaultIndexType)-1)
{
// The guy disconnected before the request finished
return;
}
ForwardingRequest *fw = forwardingRequestList[index];
UDPForwarderResult success;
unsigned char c;
incomingBs.Read(c);
success=(UDPForwarderResult)c;
RakNet::BitStream outgoingBs;
if (success==UDPFORWARDER_SUCCESS)
{
char serverIP[64];
packet->systemAddress.ToString(false,serverIP);
unsigned short forwardingPort;
incomingBs.Read(forwardingPort);
outgoingBs.Write((MessageID)ID_UDP_PROXY_GENERAL);
outgoingBs.Write((MessageID)ID_UDP_PROXY_FORWARDING_SUCCEEDED);
outgoingBs.Write(sata.senderClientAddress);
outgoingBs.Write(sata.targetClientAddress);
outgoingBs.Write(RakNet::RakString(serverIP));
outgoingBs.Write(forwardingPort);
rakPeerInterface->Send(&outgoingBs, MEDIUM_PRIORITY, RELIABLE_ORDERED, 0, fw->requestingAddress, false);
outgoingBs.Reset();
outgoingBs.Write((MessageID)ID_UDP_PROXY_GENERAL);
outgoingBs.Write((MessageID)ID_UDP_PROXY_FORWARDING_NOTIFICATION);
outgoingBs.Write(sata.senderClientAddress);
outgoingBs.Write(sata.targetClientAddress);
outgoingBs.Write(RakNet::RakString(serverIP));
outgoingBs.Write(forwardingPort);
rakPeerInterface->Send(&outgoingBs, MEDIUM_PRIORITY, RELIABLE_ORDERED, 0, sata.targetClientAddress, false);
// 05/18/09 Keep the entry around for some time after success, so duplicates are reported if attempting forwarding from the target system before notification of success
fw->timeoutAfterSuccess=RakNet::GetTimeMS()+fw->timeoutOnNoDataMS;
// forwardingRequestList.RemoveAtIndex(index);
// RakNet::OP_DELETE(fw,_FILE_AND_LINE_);
return;
}
else if (success==UDPFORWARDER_NO_SOCKETS)
{
// Try next server
TryNextServer(sata, fw);
}
else
{
RakAssert(success==UDPFORWARDER_FORWARDING_ALREADY_EXISTS);
// Return in progress
outgoingBs.Write((MessageID)ID_UDP_PROXY_GENERAL);
outgoingBs.Write((MessageID)ID_UDP_PROXY_IN_PROGRESS);
outgoingBs.Write(sata.senderClientAddress);
outgoingBs.Write(sata.targetClientAddress);
rakPeerInterface->Send(&outgoingBs, MEDIUM_PRIORITY, RELIABLE_ORDERED, 0, fw->requestingAddress, false);
forwardingRequestList.RemoveAtIndex(index,_FILE_AND_LINE_);
RakNet::OP_DELETE(fw,_FILE_AND_LINE_);
}
}
void UDPProxyCoordinator::OnPingServersReplyFromClientToCoordinator(Packet *packet)
{
RakNet::BitStream incomingBs(packet->data, packet->length, false);
incomingBs.IgnoreBytes(2);
unsigned short serversToPingSize;
SystemAddress serverAddress;
SenderAndTargetAddress sata;
incomingBs.Read(sata.senderClientAddress);
incomingBs.Read(sata.targetClientAddress);
DataStructures::DefaultIndexType index = forwardingRequestList.GetIndexOf(sata);
if (index==(DataStructures::DefaultIndexType)-1)
return;
unsigned short idx;
ServerWithPing swp;
ForwardingRequest *fw = forwardingRequestList[index];
if (fw->timeRequestedPings==0)
return;
incomingBs.Read(serversToPingSize);
if (packet->systemAddress==sata.senderClientAddress)
{
for (idx=0; idx < serversToPingSize; idx++)
{
incomingBs.Read(swp.serverAddress);
incomingBs.Read(swp.ping);
fw->sourceServerPings.Push(swp, swp.ping, _FILE_AND_LINE_);
}
}
else
{
for (idx=0; idx < serversToPingSize; idx++)
{
incomingBs.Read(swp.serverAddress);
incomingBs.Read(swp.ping);
fw->targetServerPings.Push(swp, swp.ping, _FILE_AND_LINE_);
}
}
// Both systems have to give us pings to progress here. Otherwise will timeout in Update()
if (fw->sourceServerPings.GetSize()>0 &&
fw->targetServerPings.GetSize()>0)
{
fw->OrderRemainingServersToTry();
fw->timeRequestedPings=0;
TryNextServer(fw->sata, fw);
}
}
void UDPProxyCoordinator::TryNextServer(SenderAndTargetAddress sata, ForwardingRequest *fw)
{
bool pickedGoodServer=false;
while(fw->remainingServersToTry.GetSize()>0)
{
fw->currentlyAttemptedServerAddress=fw->remainingServersToTry.Pop(_FILE_AND_LINE_ );
if (serverList.GetIndexOf(fw->currentlyAttemptedServerAddress)!=(DataStructures::DefaultIndexType)-1)
{
pickedGoodServer=true;
break;
}
}
if (pickedGoodServer==false)
{
SendAllBusy(sata.senderClientAddress, sata.targetClientAddress, fw->requestingAddress);
forwardingRequestList.RemoveAtKey(sata,true,_FILE_AND_LINE_);
RakNet::OP_DELETE(fw,_FILE_AND_LINE_);
return;
}
SendForwardingRequest(sata.senderClientAddress, sata.targetClientAddress, fw->currentlyAttemptedServerAddress, fw->timeoutOnNoDataMS);
}
void UDPProxyCoordinator::SendAllBusy(SystemAddress senderClientAddress, SystemAddress targetClientAddress, SystemAddress requestingAddress)
{
RakNet::BitStream outgoingBs;
outgoingBs.Write((MessageID)ID_UDP_PROXY_GENERAL);
outgoingBs.Write((MessageID)ID_UDP_PROXY_ALL_SERVERS_BUSY);
outgoingBs.Write(senderClientAddress);
outgoingBs.Write(targetClientAddress);
rakPeerInterface->Send(&outgoingBs, MEDIUM_PRIORITY, RELIABLE_ORDERED, 0, requestingAddress, false);
}
void UDPProxyCoordinator::Clear(void)
{
serverList.Clear(true, _FILE_AND_LINE_);
forwardingRequestList.ClearPointers(true, _FILE_AND_LINE_);
}
void UDPProxyCoordinator::ForwardingRequest::OrderRemainingServersToTry(void)
{
DataStructures::Multilist<ML_ORDERED_LIST,UDPProxyCoordinator::ServerWithPing,unsigned short> swpList;
swpList.SetSortOrder(true);
if (sourceServerPings.GetSize()==0 && targetServerPings.GetSize()==0)
return;
DataStructures::DefaultIndexType idx;
UDPProxyCoordinator::ServerWithPing swp;
for (idx=0; idx < remainingServersToTry.GetSize(); idx++)
{
swp.serverAddress=remainingServersToTry[idx];
swp.ping=0;
if (sourceServerPings.GetSize())
swp.ping+=(unsigned short) (sourceServerPings[idx].ping);
else
swp.ping+=(unsigned short) (DEFAULT_CLIENT_UNRESPONSIVE_PING_TIME);
if (targetServerPings.GetSize())
swp.ping+=(unsigned short) (targetServerPings[idx].ping);
else
swp.ping+=(unsigned short) (DEFAULT_CLIENT_UNRESPONSIVE_PING_TIME);
swpList.Push(swp, swp.ping, _FILE_AND_LINE_);
}
remainingServersToTry.Clear(true, _FILE_AND_LINE_ );
for (idx=0; idx < swpList.GetSize(); idx++)
{
remainingServersToTry.Push(swpList[idx].serverAddress, _FILE_AND_LINE_ );
}
}
#endif // _RAKNET_SUPPORT_*
| [
"cedric.guillemet@gmail.com"
] | cedric.guillemet@gmail.com |
d788eb6ba6faf4838ce73cc2f6bb2bb3d2c77787 | 481ff5af691f12dd066547538f6b0d3610f8804a | /04 Test/codecTest/codecTest.cpp | 66bc439be69c1c3cfd928ce9bdc74b7680392dbe | [] | no_license | lightindarkgit/irisembx00 | 909a1ff0fe10165537cf03f78f310f2329c62da4 | 3fa3ca437246172dfa0b6adbbddda418c60ee7a6 | refs/heads/master | 2020-04-11T06:45:09.549740 | 2018-03-09T03:32:23 | 2018-03-09T03:32:23 | 124,330,594 | 1 | 0 | null | null | null | null | GB18030 | C++ | false | false | 1,899 | cpp | // codecTest.cpp : 定义控制台应用程序的入口点。
//
#include <iostream>
#include "IKEMB1000Codec.h"
int main(int argc, char* argv[])
{
std::cout << "codecTest" << std::endl;
PersonBase personBase[3];
/*
uuid_t Pid;
int OpToken; // 增加操作令牌, added at 20140429
// 值由X00服务控制,设备只负责接收、保存
char PersonName[g_nameLen];
char PersonSn[g_snLen];
EnumPersonType PersonType;
EnumX00Sex PersonSex;
char IdCardNumber[g_idCardNoLen];
char DepartName[g_nameLen];
char CardNumber[g_cardNoLen];
char Memo[g_memoLen];
*/
personBase[0].OpToken = 1234;
strcpy(personBase[0].PersonName, "123456");
strcpy(personBase[0].PersonSn, "777777");
personBase[0].PersonType = EnumPersonType::ordinaryPerson;
personBase[0].PersonSex = EnumX00Sex::female;
strcpy(personBase[0].IdCardNumber, "IdCard");
strcpy(personBase[0].DepartName, "测试部门");
strcpy(personBase[0].CardNumber, "门禁卡号001");
strcpy(personBase[0].Memo, "memo hehe");
strcpy(personBase[1].PersonName, "中文名称");
strcpy(personBase[1].PersonSn, "002");
strcpy(personBase[2].PersonName, "a中文+English");
strcpy(personBase[2].PersonSn, "003");
char buf[0x20000];
memset(buf, 0, 0x20000);
int size = EncodeAddPerson(personBase, 3, buf);
char buf2[0x20000];
memset(buf2, 0, 0x20000);
size = EncodeAddPerson(personBase, 3, buf2);
char trans[0x20000];
int arraySize = 0;
bool bret = DecodeAddPerson(buf, (PPersonBase)trans, &arraySize);
PPersonBase pTemp = (PPersonBase)trans;
PPersonBase pTemp0 = pTemp;
PPersonBase pTemp1 = pTemp+1;
PPersonBase pTemp2 = pTemp+2;
memset(buf, 0, 1024);
NormalAck ack;
ack.ErrorCode = 0;
EncodeAckDeletePerson(ack, buf);
return 0;
}
| [
"guowen@irisking.com"
] | guowen@irisking.com |
152e5a23eb4b0222fb6ecff55c041aafe844559f | 8171c0d36186ab01094c63436dcfa92d09a7b30a | /solve.cpp | 4834fb68c81f15b22be1d00723b1d0976ed679f9 | [] | no_license | ashleshabise/algo_assignment3 | 84a32b927c3ad64dcc8415a4f0265580828858db | 01b9b843c62083e8750e02fb8f02feb27480a319 | refs/heads/master | 2021-01-10T13:58:48.657766 | 2016-02-09T13:16:41 | 2016-02-09T13:16:41 | 51,367,486 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 10,620 | cpp | #include<stdio.h>
#include<string.h>
#include<stdbool.h>
#include<math.h>
#define a 16
#define SIZE 100
#define TRUE 1
#define FALSE 0
fGamma(int K, float q, char *partitionOutputFile, char *inputFileGamma, char *fileForR) {
char *str;
int gammaArray[K], i=0;
// Read gammas from inputFileGamma
FILE gammaFile = fopen(inputFileGamma,"r");
while (fgets(str,SIZE,gammaFile) != NULL) {
sscanf(str,"%f",&gamma);
gammaArray[i++] = gamma;
}
// Read file for R
FILE rFile = fopen(fileForR, "r");
//
float rArray[3];
while (fgets(str,SIZE,rFile) != NULL) {
sscanf(str,"%f %f %f",&x1,&x2,&x3);
rArray[0] = x1;
rArray[1] = x2;
rArray[2] = x3;
count++;
}
FILE pOutputFile = fopen(partitionOutputFile, "r");
while (fgets(str,SIZE,pOutputFile) != NULL) {
sscanf(str,"%f %f %f",&x1,&x2,&x2);
}
}
int summation(int l[] [], int y[],int start, int end, int i) {
int sum = 0;
for(int j=start; j<=end; j++) {
sum+=l[i][j]*y[j]
}
return sum;
}
int* LUP-SOLVE(int L[][], int U[][],int Pi[],int b[], int rowsL) {
int n=rowsL;
int P[n][n], y[n], x[n];
// Initialize P matrix
for ( int i=0; i < n; i++) {
for ( int j=0; j < n; j++) {
if ( j == Pi[i])
P[i][j] = 1;
else
P[i][j] = 0;
}
}
// Calculate Pb from P and b
for ( int i=0; i < n; i++) {
for ( int j=0; j < n; j++) {
Pb[i] += P[i][j]*b[j];
}
}
// Initialize y and x
for (int i=0; i < n; i++ )
y[i] = 0,x[i] = 0;
for(int i=1; i<n; i++)
y[i] = Pb[i]- summation(L,y,1,i-1);
for(int i=n;i>=0;i--)
x[i]=(y[i]-summation(U,x,i+1,n))/U[i][i];
int *result = x;
// returned a pointer to the array x.
return result;
}
LUP-Decomposition(int A[][]) {
int n=rowsA, temp;
int Pi[n];
for(int i=1;i<=n;i++)
Pi[i]=i;
int p, k1;
for(int k=1; k<n; k++) {
p=0;
for(int i=k; i<n; i++) {
if(abs(A[i][k]) > p) {
p=abs(A[i][k]);
k1=i;
}
}
if (p==0)
cout<<"\n Singular matrix.";
// Swap
temp=Pi[k];
Pi[k]=Pi[k1];
Pi[k1]=temp;
for(int i=1; i<n; i++) {
temp=A[k][i];
A[k][i]=A[k1][i];
A[k1][i]=temp;
}
for(int i=k+1; i<=n; i++) {
A[i][k]/= A[k][k];
for(int i=1; i<n; i++)
A[i][j]-= (A[i][k] * A[k][j]);
}
}
}
// Returns a pointer to solution array.
int* solve-ls(int A[][], int b[], int ) {
LUP-Decomposition();
int* result = LUP-SOLVE();
return result;
}
/* Code for SOLVE function goes here */
bool solve(int L, char* inputFileR, char* inputFileP, char* inputFileQ, char* inputFileGamma, char* outputFile) {
}
/*--------------------------------------------------------------------------------------------*/
/* Code for partitionAll + utility functions starts here */
// A linked list where each node represents a point r[]
struct node {
float r[3];
struct node* next;
};
void push(struct node** head, float r[3]) {
struct node* newNode = (struct node*)(malloc(sizeof(struct node)));
newNode->next = NULL;
int i;
// copy r[i] into newNode->r[i];
for (i=0; i<3; i++) newNode->r[i] = r[i];
if ( *head == NULL) {
*head = newNode;
return;
}
newNode->next = *head;
*head = newNode;
}
bool partition(float r[3],int L, int lMatrix[L][L][L], struct node* pointList[L][L][L]) {
//validity check for r[3]
fflush(stdout);
printf("Entering partition\n");
int i;
for(i=0;i<3;i++) {
if(!(r[i]>=0 && r[i] <= a)) {
printf(" Input Invalid");
return FALSE;
}
printf("%f ", r[i]);
}
printf("\n");
//validity check for L
if(!(L>0))
printf(" Input Invalid");
FILE* fPartition;
fPartition=fopen("partitionFile", "a");
if(fPartition==NULL) {
printf("Couldn't open partition file");
return FALSE;
}
float x[3];
printf("opened partition file\n");
int l[3],binary[3], bString=0, temp;
for (i=0; i<3; i++) {
printf("generating binary string: ");
x[i]=(r[i]*L)/a;
l[i] = (int)x[i];
// for x1, temp=1. binary = 0 | 1 = 1
// for x2, temp=0, binary = 1<<1 = 10 | 0 = 10
// for x3, temp=1, binary = 10<<1 = 100 | 1 = 101
printf("%f %d", x[i], l[i]);
binary[i] = (x[i]-l[i]) ? 0 : 1;
printf("binary[%d] : %d \n",i, binary[i]);
bString = bString<<1 | binary[i];
}
printf("\n");
// write 000 always.
fprintf(fPartition,"%d %d %d %f %f %f\n", l[0], l[1], l[2], r[0],r[1],r[2]);
// update the lMatrix as well.
lMatrix[l[0]][l[1]][l[2]]++;
int b1,b2,b3;
int done[8]={0,0,0,0,0,0,0,0},result;
for ( i=1; i <= bString; i++) {
printf("writing l[] into partition file\n");
result = bString & i;
if (result ) {
b1=result&4 ? 1:0;
b2=result&2 ? 1:0;
b3=result&1 ? 1:0;
// update the lMatrix
if (!done[result]) {
fprintf(fPartition,"%d %d %d %f %f %f\n", l[0]-b1, l[1]-b2, l[2]-b3, r[0],r[1],r[2]);
lMatrix[l[0]-b1][l[1]-b2][l[2]-b3]++;
// push the point corresponding to l[] to the pointList
push(&pointList[l[0]-b1][l[1]-b2][l[2]-b3],r);
done[result]=1;
}
printf("%d\n", done[result]);
}
}
fclose(fPartition);
return TRUE;
}
bool partitionAll(int L, char* inputFileName, char* outputFileName) {
printf("Entering partitionall\n");
float r[3];
float **R;
// Declaring helper variables
int i,j,k;
int a1,a2,a3;
float x1,x2,x3, temp1, temp2, temp3;
int lMatrix[L][L][L],K=0;
// initialise every element of lMatrix to 0.
for ( i=0; i<L; i++)
for ( j=0; j<L; j++)
for ( k=0; k<L; k++)
lMatrix[i][j][k]=0;
FILE *fin, *fout;
fin = fopen(inputFileName,"r");
if (fin != NULL) {
char str[SIZE];
while (fgets(str,SIZE,fin) != NULL) {
printf("getting data from input file\n");
/*
temp1 = x1;
temp2 = x2;
temp3 = x3;
*/
sscanf(str, "%f %f %f", &x1, &x2, &x3);
printf("%f %f %f\n", x1,x2,x3);
if (x1>a || x1<0 /*|| x1==temp1*/ ) {
printf("Input Failed\n");
return FALSE;
}
if (x2>a || x2<0 /*|| x2==temp2*/) {
printf("Input Failed\n");
return FALSE;
}
if (x3>a || x3<0 /*|| x3==temp3*/) {
printf("Input Failed\n");
return FALSE;
}
r[0] = x1;
r[1] = x2;
r[2] = x3;
partition(r,L,lMatrix);
// so we have K points.
K++;
}
}
else {
printf("Could not open the input File \n");
return 1;
}
fclose(fin);
fout = fopen(outputFileName, "w");
FILE *fPartition ;
char str[SIZE];
for ( i=0; i<L; i++) {
for ( j=0; j<L; j++) {
for ( k=0; k<L; k++) {
fprintf(fout,"%d %d %d\n", i, j, k);
fprintf(fout,"%d\n",lMatrix[i][j][k]);
// open the partition file
fPartition = fopen("partitionFile", "r");
while (fgets(str,SIZE,fPartition) != NULL) {
sscanf(str,"%d %d %d %f %f %f",&a1,&a2,&a3,&x1,&x2,&x2);
if (i==a1 && j==a2 && k==a3)
fprintf(fout,"%f %f %f\n",x1,x2,x3);
}
// close the partition file.
fclose(fPartition);
}
}
}
fclose(fout);
return TRUE;
}
/*----------------------------------------------------------------------------------*/
/* Code for BUILD-MATRIX function starts here */
bool MATRIX(int L, int l[3], char* fileForP, char* fileForQ, char* fileForMatrix) {
float x[3], temp1, temp2, temp3;
float x1,x2,x3;
FILE *fp, *fq, *fMatrix;
int N=0, M=0,i,j;
float P[100][3],Q[100][3];
// Initialise P and Q to 0
for (i=0; i < 100; i++) {
for ( j=0;j<3; j++) {
P[i][j] = Q[i][j] = 0;
}
}
fp = fopen(fileForP,"r");
if (fp != NULL) {
char str[SIZE];
// Checking validity of input P and pushing valid data into P matrix
while (fgets(str,SIZE,fp) != NULL) {
sscanf(str, "%f%f%f", &x[0], &x[1], &x[2]);
int flag = 0;
for ( i=0; i<3; i++) {
// check for 0<= x[i] <= a
if (x[i]>a || x[i]<0) {
printf("initial condition : Invalid Input for P");
return FALSE;
}
if (!( (((a*l[i])/L == x[i]) ||(x[i] == (a*(l[i]+1)/L))) && ( ((a*l[(i+1)%3])/L <= x[(i+1)%3]) && (x[(i+1)%3]<= (a*(l[(i+1)%3]+1)/L)) ) && ( ((a*l[(i+2)%3])/L <= x[(i+2)%3]) && (x[(i+2)%3]<= (a*(l[(i+2)%3]+1))/L) ))) {
flag++;
}
}
/*
If the condition fails for all three co-ordinates,
the point is not a boundary point
*/
if (flag==3) {
printf("Invalid Input for P\n");
return FALSE;
}
P[N][0] = x[0];
P[N][1] = x[1];
P[N][2] = x[2];
/* This will count no. of inputs in file for P*/
N++;
}
} else {
printf("Could not open the input File \n");
return 1;
}
fclose(fp);
fq = fopen(fileForQ,"r");
// Checking validity of input Q and pushing valid data into Q Matrix
if (fq != NULL) {
char str2[SIZE];
while (fgets(str2,SIZE,fq) != NULL) {
sscanf(str2, "%f%f%f", &x[0], &x[1], &x[2]);
// Calculate the radius of the sphere.
float sum= powf(2*a/(float)L,2);
// Check if the point lies on the sphere.
for(i=0; i<3 ; i++)
sum-= powf(x[i]-((2*l[i]+1)*a)/(2*L), 2);
// Decide the validity accordingly
if(sum) {
printf("Input data for Q is Invalid");
return false;
}
Q[M][0] = x[0];
Q[M][1] = x[1];
Q[M][2] = x[2];
/* This will count no. of inputs in file for Q*/
M++;
}
} else {
printf("Could not open the input File \n");
return 1;
}
fclose(fq);
// Construction of matrix A
float A[M][N];
for ( i =0; i < M; i++) {
for ( j =0; j < N; j++) {
float temp;
// sqrt( x^2 + y^2 + z^2 )
temp = sqrt( powf((Q[i][0] - P[j][0]), 2) + powf((Q[i][1] - P[j][1]), 2) + powf((Q[i][2] - P[j][2]), 2));
// here ??
// so we need to multiply each element of a[i][j] with gamma and add .
// umm.. kaise ?? i mean.
A[i][j]= temp ? (sinf(temp))/temp : 1;
}
}
// Finding the Product Matrix of A and Transpose of A
float result[N][N];
for ( i =0; i < N; i++) {
for ( j =0; j <= i; j++) {
result[i][j] = 0;
for ( int k=0; k<N; k++) {
result[i][j]+= A[k][i] * A[k][j];
}
result[j][i] = result[i][j];
}
}
fMatrix = fopen(fileForMatrix, "w");
for ( i =0; i < M; i++) {
for ( j =0; j < M; j++) {
fprintf(fMatrix, "%d %d %f\n", i, j, result[i][j]);
}
}
fclose(fMatrix);
}
/* Main for build-matrix program
int main( int argc, char* argv[]) {
// check that whether file names are provided or not at the command line.
if(argc!=4) {
printf("File Names are not provided at command line");
return 1;
}
int L;
do {
printf("Enter a Positive Integer: ");
scanf("%d",&L);
}
while(L<=0);
int l[3];
do {
printf("\nEnter 3 integers less than %d: ",L);
scanf("%d%d%d",&l[0],&l[1],&l[2]);
}
while(!(l[0]<L && l[1]<L && l[2]<L && l[0]>=0 && l[1]>=0 && l[2]>=0));
bool result=MATRIX(L,l,argv[1],argv[2],argv[3]);
switch(result) {
case true: printf("\nAlgorithm is implemented Successfully\n");
break;
case false: printf("\nAlgorithm is implemented Successfully\n");
break;
}
return 0;
}
*/
| [
"binny.arora@jugnoo.in"
] | binny.arora@jugnoo.in |
9bec5377d577362a149f8020fc1bea16ba876942 | 204c5937cdea475f5c3dafde6d770a74ae9b8919 | /UVA/Chapter 1. Algorithm Design/General Problem Solving Techniques/Exercises Beginner/11039.cpp | 088316ac7afcfea79b22f9c9d92981a4843d7fb8 | [] | no_license | mlz000/Algorithms | ad2c35e4441bcbdad61203489888b83627024b7e | 495eb701d4ec6b317816786ad5b38681fbea1001 | refs/heads/master | 2023-01-04T03:50:02.673937 | 2023-01-02T22:46:20 | 2023-01-02T22:46:20 | 101,135,823 | 7 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,045 | cpp | #include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
using namespace std;
const int N=500005;
int a[N],b[N];
int tot1,tot2;
int work(int p)
{
int ans=1;
int i,j;
i=j=1;
while(i<=tot1 && j<=tot2)
{
if(p)
{
while(a[i]>b[j] && j<=tot2) j++;
if(j<=tot2) ans++;
p=0;
}
else
{
while(a[i]<b[j] && i<=tot1) i++;
if(i<=tot1) ans++;
p=1;
}
}
return ans;
}
int main()
{
int t;
int i,j,n;
scanf("%d",&t);
for(i=1;i<=t;++i)
{
int num=0;
tot1=0;tot2=0;
scanf("%d",&n);
for(j=1;j<=n;++j)
{
int x;
scanf("%d",&x);
if(x>0) a[++tot1]=x;
else if(x<0) b[++tot2]=-x;
}
if(!tot1 || !tot2) printf("1\n");
else
{
sort(&a[1],&a[tot1+1]);
sort(&b[1],&b[tot2+1]);
int MAX=max(work(1),work(0));
printf("%d\n",MAX);
}
}
return 0;
}
| [
"njumlz@gmail.com"
] | njumlz@gmail.com |
77515741e72bc9fa89943e5a08b1ceac9ea714c6 | 5f794e0d109fbf536ffa5cebff1080da3ded39f8 | /src/test/streams_tests.cpp | bdc682cb6e54c25d36156b964df2ed7091c46d05 | [
"MIT"
] | permissive | sighttviewliu/RoyalBitcoin-1 | dbb85ab6975d19177f6de5534dba915a98c0a462 | 5e3e3c05f346a1e1d4a8908743574db0a070d723 | refs/heads/master | 2021-09-03T09:49:37.381083 | 2018-01-08T05:48:44 | 2018-01-08T05:48:44 | 116,490,156 | 2 | 0 | null | 2018-01-08T05:48:45 | 2018-01-06T14:40:34 | C++ | UTF-8 | C++ | false | false | 4,262 | cpp | // Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "streams.h"
#include "support/allocators/zeroafterfree.h"
#include "test/test_royalbitcoin.h"
#include <boost/assign/std/vector.hpp> // for 'operator+=()'
#include <boost/test/unit_test.hpp>
using namespace boost::assign; // bring 'operator+=()' into scope
BOOST_FIXTURE_TEST_SUITE(streams_tests, BasicTestingSetup)
BOOST_AUTO_TEST_CASE(streams_vector_writer)
{
unsigned char a(1);
unsigned char b(2);
unsigned char bytes[] = { 3, 4, 5, 6 };
std::vector<unsigned char> vch;
// Each test runs twice. Serializing a second time at the same starting
// point should yield the same results, even if the first test grew the
// vector.
CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 0, a, b);
BOOST_CHECK((vch == std::vector<unsigned char>{{1, 2}}));
CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 0, a, b);
BOOST_CHECK((vch == std::vector<unsigned char>{{1, 2}}));
vch.clear();
CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 2, a, b);
BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 1, 2}}));
CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 2, a, b);
BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 1, 2}}));
vch.clear();
vch.resize(5, 0);
CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 2, a, b);
BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 1, 2, 0}}));
CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 2, a, b);
BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 1, 2, 0}}));
vch.clear();
vch.resize(4, 0);
CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 3, a, b);
BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 0, 1, 2}}));
CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 3, a, b);
BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 0, 1, 2}}));
vch.clear();
vch.resize(4, 0);
CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 4, a, b);
BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 0, 0, 1, 2}}));
CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 4, a, b);
BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 0, 0, 1, 2}}));
vch.clear();
CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 0, FLATDATA(bytes));
BOOST_CHECK((vch == std::vector<unsigned char>{{3, 4, 5, 6}}));
CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 0, FLATDATA(bytes));
BOOST_CHECK((vch == std::vector<unsigned char>{{3, 4, 5, 6}}));
vch.clear();
vch.resize(4, 8);
CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 2, a, FLATDATA(bytes), b);
BOOST_CHECK((vch == std::vector<unsigned char>{{8, 8, 1, 3, 4, 5, 6, 2}}));
CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 2, a, FLATDATA(bytes), b);
BOOST_CHECK((vch == std::vector<unsigned char>{{8, 8, 1, 3, 4, 5, 6, 2}}));
vch.clear();
}
BOOST_AUTO_TEST_CASE(streams_serializedata_xor)
{
std::vector<char> in;
std::vector<char> expected_xor;
std::vector<unsigned char> key;
CDataStream ds(in, 0, 0);
// Degenerate case
key += '\x00','\x00';
ds.Xor(key);
BOOST_CHECK_EQUAL(
std::string(expected_xor.begin(), expected_xor.end()),
std::string(ds.begin(), ds.end()));
in += '\x0f','\xf0';
expected_xor += '\xf0','\x0f';
// Single character key
ds.clear();
ds.insert(ds.begin(), in.begin(), in.end());
key.clear();
key += '\xff';
ds.Xor(key);
BOOST_CHECK_EQUAL(
std::string(expected_xor.begin(), expected_xor.end()),
std::string(ds.begin(), ds.end()));
// Multi character key
in.clear();
expected_xor.clear();
in += '\xf0','\x0f';
expected_xor += '\x0f','\x00';
ds.clear();
ds.insert(ds.begin(), in.begin(), in.end());
key.clear();
key += '\xff','\x0f';
ds.Xor(key);
BOOST_CHECK_EQUAL(
std::string(expected_xor.begin(), expected_xor.end()),
std::string(ds.begin(), ds.end()));
}
BOOST_AUTO_TEST_SUITE_END()
| [
"liaoyeping@earthledger.com"
] | liaoyeping@earthledger.com |
90781eecf2fd047c0d40787d67c7b525b8d3dc50 | 260e5dec446d12a7dd3f32e331c1fde8157e5cea | /Indi/SDK/Indi_XFH_T_0604_Turrets_parameters.hpp | 8434c48cb1c788a9445553ec2101e66c4340a432 | [] | no_license | jfmherokiller/TheOuterWorldsSdkDump | 6e140fde4fcd1cade94ce0d7ea69f8a3f769e1c0 | 18a8c6b1f5d87bb1ad4334be4a9f22c52897f640 | refs/heads/main | 2023-08-30T09:27:17.723265 | 2021-09-17T00:24:52 | 2021-09-17T00:24:52 | 407,437,218 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 365 | hpp | #pragma once
// TheOuterWorlds SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "Indi_XFH_T_0604_Turrets_classes.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Parameters
//---------------------------------------------------------------------------
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
| [
"peterpan0413@live.com"
] | peterpan0413@live.com |
40439faefe1e62db778863f9000ab01c6cb9eb10 | 7e522089dc55393159a7cfddfe98506f2cf70717 | /SigmoidLayer.cpp | 870824393a2900f9cecd0f42fa0474c088c5737e | [] | no_license | danathughes/cNeuralNetwork | 27d6d77f5f1eb18d8ebf09a0b40dab33e72c4c87 | b494f426a7c2be50ac96388535d2ffcba387624b | refs/heads/master | 2016-09-03T06:59:55.953486 | 2015-07-11T04:14:14 | 2015-07-11T04:14:14 | 35,659,535 | 0 | 0 | null | 2015-07-08T00:31:36 | 2015-05-15T07:13:40 | C++ | UTF-8 | C++ | false | false | 658 | cpp | /**
*
*/
#include "SigmoidLayer.h"
#include <Eigen/Dense>
#include <math.h>
//#include <iostream>
using namespace std;
SigmoidLayer::SigmoidLayer(int size) : Layer(size)
{
}
SigmoidLayer::~SigmoidLayer()
{
}
void SigmoidLayer::activate()
{
// cout << "About to activate..." << endl << this->net_input << endl;
for(int i=0; i<this->getSize(); i++)
{
this->activations(i) = 1.0 / (1.0 + exp(-this->net_input(i)));
}
}
Eigen::VectorXd SigmoidLayer::gradient()
{
Eigen::VectorXd grad(this->getSize());
for(int i=0; i<this->getSize(); i++)
{
grad(i) = this->activations(i) * (1.0 - this->activations(i));
}
return grad;
}
| [
"danathughes@gmail.com"
] | danathughes@gmail.com |
96cfe4c44a595af886761adbefbc0a06eea3bd15 | 677cf31b015e197e102b1708d1fc913505cd0558 | /cpp/CodeForces/cf-1343B.cpp | 4c72c21dccae7b302a1ac589f5f4d15b90b7b8d6 | [] | no_license | AvatarSenju/Competitive | 511744f6db4ad9e0cb4834135cbddca7ed0f94ac | b9aff171dad8eda8807faf8f869900cde1ba3773 | refs/heads/master | 2022-12-31T22:38:27.951717 | 2020-10-22T03:54:10 | 2020-10-22T03:54:10 | 198,122,214 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 544 | cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int t = 0;
cin >> t;
while (t--)
{
int n = 0;
cin >> n;
if (n % 4 != 0)
{
cout << "NO\n";
continue;
}
cout << "YES\n";
for (int i = 2; i <= n; i += 2)
{
cout << i << " ";
}
int f = n / 2;
for (int i = 1; i < f; i++)
{
cout << (2 * i) - 1 << " ";
}
f--;
cout << n + f << "\n";
}
return 0;
} | [
"anushrut5@gmail.com"
] | anushrut5@gmail.com |
568fe5827e9ec61d2393df9e5a35ecded351ab72 | 731ca8ba9d20a374a97ced40d1a0da8c9183e3b9 | /Project3/ch8_main.cpp | 34e8ace4929dc2235ae4d7f279149487dc4e7638 | [
"WTFPL"
] | permissive | guannan-he/cppLearning | 0d09949ccfd7e3b117d141cedfcf1c7cff0c30dd | 8fe3ff661afe1c814dbf44fc1ebfd9998f51eac6 | refs/heads/master | 2023-07-21T17:37:31.477331 | 2021-09-07T04:14:00 | 2021-09-07T04:14:00 | 290,625,478 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 1,364 | cpp | #if 0
#if 1
#include <iostream>
using namespace std;
#endif
#if 1
inline int addPonter(int i, int j) {//内联函数,递归调用编译器忽略内联
return i + j;
}
template<class anyType>//必须加在函数声明前面
void swapPos(anyType& a, anyType& b) {
anyType tmp;
tmp = a;
a = b;
b = tmp;
return;
}
template<> void swapPos<char>(char& a, char& b) {//重载函数摸板
return;
}
typedef struct {
char* name;
int len;
} annoy;
void setAnnoy(annoy& annoyMenber, string str) {
char* pt = new char[str.length() + 1];
int i = 0;
while (str[i]) {
pt[i] = str[i];
i++;
}
pt[i] = '\0';
annoyMenber.name = pt;
annoyMenber.len = i - 1;
}
int main(int argc, char* argv[]) {
cout << addPonter(1, 2) << endl;
int i = 1;
int& j = i;
cout << &i << endl;
cout << &j << endl;
///////////////////引用一次性认准不能改/////////////////////
int a = 1;
int b = 2;
int* pa = &a;
int& ra = *pa;
cout << ra << endl;
pa = &b;
cout << ra << endl;
ra = 3;
cout << ra << endl;
swapPos(a, b);
double c = 1.1;
double d = 1.2;
swapPos(c, d);
char e = 'r';
char f = 'k';
swapPos(e, f);
annoy annoying;
string str = "hello";
setAnnoy(annoying, str);
delete[] annoying.name;
//cock:goto dick;
//dick:goto cock;
//swapPos(a);
return 0;
}
#endif
#if 0
int main(int argc, char* argv[]) {
return 0;
}
#endif
#endif | [
"hgn15084095120@hotmail.com"
] | hgn15084095120@hotmail.com |
41ebf64c7b8a2d98cd7502065a616c35c093faf1 | f23fea7b41150cc5037ddf86cd7a83a4a225b68b | /SDK/BP_FishingFish_Pondie_03_Colour_03_Bronze_classes.h | 418155a7db833a4769d06ca303fd36df6d2e9218 | [] | no_license | zH4x/SoT-SDK-2.2.0.1 | 36e1cf7f23ece6e6b45e5885f01ec7e9cd50625e | f2464e2e733637b9fa0075cde6adb5ed2be8cdbd | refs/heads/main | 2023-06-06T04:21:06.057614 | 2021-06-27T22:12:34 | 2021-06-27T22:12:34 | 380,845,087 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 891 | h | #pragma once
// Name: SoT, Version: 2.2.0b
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Classes
//---------------------------------------------------------------------------
// BlueprintGeneratedClass BP_FishingFish_Pondie_03_Colour_03_Bronze.BP_FishingFish_Pondie_03_Colour_03_Bronze_C
// 0x0000 (FullSize[0x0910] - InheritedSize[0x0910])
class ABP_FishingFish_Pondie_03_Colour_03_Bronze_C : public ABP_FishingFish_Pondie_03_C
{
public:
static UClass* StaticClass()
{
static auto ptr = UObject::FindClass("BlueprintGeneratedClass BP_FishingFish_Pondie_03_Colour_03_Bronze.BP_FishingFish_Pondie_03_Colour_03_Bronze_C");
return ptr;
}
void UserConstructionScript();
};
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
| [
"Massimo.linker@gmail.com"
] | Massimo.linker@gmail.com |
94a78ee938293dfd8ad05c053be2def0e3982bce | e650aebc5d9f0873c2fca1e043e9fdfa7bc46d11 | /legend/projects/legend/Classes/scene/HelloWorldScene.cpp | 21d3faa8ec72a8740257147a48aa4a3ae6d3fc44 | [] | no_license | asurada/SGLegend | e47003218de3fba4e9ee5b116cfbdb1869c7de7b | e3ea1d380e7110344514752b6fe511dd2f73c4ab | refs/heads/master | 2020-05-19T22:57:37.339258 | 2014-09-28T10:33:03 | 2014-09-28T10:33:03 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,520 | cpp | #include "HelloWorldScene.h"
#include "CCHttpRequest.h"
USING_NS_CC;
CCScene* HelloWorld::scene()
{
// 'scene' is an autorelease object
CCScene *scene = CCScene::create();
// 'layer' is an autorelease object
HelloWorld *layer = HelloWorld::create();
// add layer as a child to scene
scene->addChild(layer);
// return the scene
return scene;
}
// on "init" you need to initialize your instance
bool HelloWorld::init()
{
//////////////////////////////
// 1. super init first
if ( !CCLayer::init() )
{
return false;
}
CCSize visibleSize = CCDirector::sharedDirector()->getVisibleSize();
CCPoint origin = CCDirector::sharedDirector()->getVisibleOrigin();
/////////////////////////////
// 2. add a menu item with "X" image, which is clicked to quit the program
// you may modify it.
// add a "close" icon to exit the progress. it's an autorelease object
CCMenuItemImage *pCloseItem = CCMenuItemImage::create(
"CloseNormal.png",
"CloseSelected.png",
this,
menu_selector(HelloWorld::menuCloseCallback));
pCloseItem->setPosition(ccp(origin.x + visibleSize.width - pCloseItem->getContentSize().width/2 ,
origin.y + pCloseItem->getContentSize().height/2));
// create menu, it's an autorelease object
CCMenu* pMenu = CCMenu::create(pCloseItem, NULL);
pMenu->setPosition(CCPointZero);
this->addChild(pMenu, 1);
/////////////////////////////
// 3. add your codes below...
// add a label shows "Hello World"
// create and initialize a label
CCLabelTTF* pLabel = CCLabelTTF::create("Hello World", "Arial", 24);
// position the label on the center of the screen
pLabel->setPosition(ccp(origin.x + visibleSize.width/2,
origin.y + visibleSize.height - pLabel->getContentSize().height));
// add the label as a child to this layer
this->addChild(pLabel, 1);
// add "HelloWorld" splash screen"
CCSprite* pSprite = CCSprite::create("HelloWorld.png");
// position the sprite on the center of the screen
pSprite->setPosition(ccp(visibleSize.width/2 + origin.x, visibleSize.height/2 + origin.y));
// add the sprite as a child to this layer
this->addChild(pSprite, 0);
cocos2d::extension::CCHttpRequest *requestor = cocos2d::extension::CCHttpRequest::sharedHttpRequest();
std::string url = "http://192.168.1.12:8080/snippets/";
std::string postData = "code=print 456";
requestor->addGetTask(url, this, callfuncND_selector(HelloWorld::onHttpRequestCompleted));
requestor->addPostTask(url, postData, this, callfuncND_selector(HelloWorld::onHttpRequestCompleted));
std::vector<std::string> downloads;
downloads.push_back("http://192.168.1.12/project/image.jpg");
requestor->addDownloadTask(downloads, this, callfuncND_selector(HelloWorld::onHttpRequestCompleted));
return true;
}
void HelloWorld::menuCloseCallback(CCObject* pSender)
{
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8)
CCMessageBox("You pressed the close button. Windows Store Apps do not implement a close button.","Alert");
#else
CCDirector::sharedDirector()->end();
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
exit(0);
#endif
#endif
}
| [
"asurada.gen@gmail.com"
] | asurada.gen@gmail.com |
7088bd3cbb1cf58995dbb936f2edfcfb724bc488 | 0c7e20a002108d636517b2f0cde6de9019fdf8c4 | /Sources/Elastos/Packages/Apps/Settings/inc/elastos/droid/settings/applications/CInstalledAppDetailsAlertDialogFragment.h | be6a8ed5f115dede2aec8eec10497d28ff09440c | [
"Apache-2.0"
] | permissive | kernal88/Elastos5 | 022774d8c42aea597e6f8ee14e80e8e31758f950 | 871044110de52fcccfbd6fd0d9c24feefeb6dea0 | refs/heads/master | 2021-01-12T15:23:52.242654 | 2016-10-24T08:20:15 | 2016-10-24T08:20:15 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 760 | h |
#ifndef __ELASTOS_DROID_SETTINGS_APPLICATIONS_CINSTALLEDAPPDETAILSALERTDIALOGFRAGMENT_H__
#define __ELASTOS_DROID_SETTINGS_APPLICATIONS_CINSTALLEDAPPDETAILSALERTDIALOGFRAGMENT_H__
#include "_Elastos_Droid_Settings_Applications_CInstalledAppDetailsAlertDialogFragment.h"
#include "elastos/droid/settings/applications/CInstalledAppDetails.h"
namespace Elastos {
namespace Droid {
namespace Settings {
namespace Applications {
CarClass(CInstalledAppDetailsAlertDialogFragment)
, public CInstalledAppDetails::MyAlertDialogFragment
{
public:
CAR_OBJECT_DECL();
};
} // namespace Applications
} // namespace Settings
} // namespace Droid
} // namespace Elastos
#endif //__ELASTOS_DROID_SETTINGS_APPLICATIONS_CINSTALLEDAPPDETAILSALERTDIALOGFRAGMENT_H__
| [
"xu.liting@kortide.com"
] | xu.liting@kortide.com |
d2b83597069eac9ab8409b359a572a12d3e67701 | a943ab8fcd086f5e1f42d31521b542b28f014035 | /src/bLib/Vector.cpp | 53af1d398d0195bc714bf8f78a75372ef4747d34 | [] | no_license | javeme/bScript | 13e4804efd3df89a88a6ad133fc15298587398d4 | 75105dcafec80ab7c951850976a8d816422e0d7e | refs/heads/master | 2020-04-06T04:29:07.246373 | 2016-07-17T11:19:34 | 2016-07-17T11:19:34 | 71,037,108 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,261 | cpp | #pragma once
#include "stdafx.h"
#include "Vector.h"
namespace bluemei{
template <class T>
Vector<T>::Vector(void)
{
//dataArray.resize(10);
}
template <class T>
Vector<T>::~Vector(void)
{
;
}
template <class T>
int Vector<T>::add(T ele)
{
dataArray.push_back(ele);
return this->size();
}
template <class T>
bool Vector<T>::remove(int pos,T& value)
{
if(pos<0||pos>=dataArray.size())
return false;
vector <T> ::iterator iter = dataArray.begin();
advance(iter,pos);
value=*iter;
dataArray.erase(iter);
return true;
}
template <class T>
bool Vector<T>::get(int pos,T& value)
{
if(pos<0||pos>=dataArray.size())
return false;
value=dataArray[pos];
return true;
}
template <class T>
T& Vector<T>::operator[](int pos)
{
if(pos<0||pos>=dataArray.size())
{
char buf[100];
sprintf(buf,"vector size is %d,can't request %d.",dataArray.size(),pos);
throw OutOfBoundException(buf);
}
return dataArray[pos];
}
template <class T>
bool Vector<T>::remove(const T& ele)
{
vector<T>::iterator iter = find(dataArray.begin(), dataArray.end(), ele);
if (iter != dataArray.end())
{
dataArray.erase(iter);
return true;
}
return false;
}
template <class T>
int Vector<T>::size()
{
return dataArray.size();
}
}//end of namespace bluemei | [
"javaloveme@gmail.com"
] | javaloveme@gmail.com |
c625f44688740a9d24dc02c6640dd91714ed3a32 | 17c3e190832a88acf7d97d22d048a927a2bacaef | /src/wam_node.cpp | 77cd1a7eb53b0beafb9ba3a6d27f2b01ef5938ff | [] | no_license | cbuscaron/wam_node | 58f4731baa5929b574f8cc8d1ff9710cda1d6794 | f7a4f60c7d84b7cddda9643387f822423ede50cc | refs/heads/master | 2021-01-09T06:11:43.107048 | 2017-02-04T19:12:28 | 2017-02-04T19:12:28 | 80,935,169 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 35,769 | cpp | /*
Copyright 2012 Barrett Technology <support@barrett.com>
This file is part of barrett-ros-pkg.
This version of barrett-ros-pkg is free software: you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This version of barrett-ros-pkg is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this version of barrett-ros-pkg. If not, see
<http://www.gnu.org/licenses/>.
Barrett Technology holds all copyrights on barrett-ros-pkg. As the sole
copyright holder, Barrett reserves the right to release future versions
of barrett-ros-pkg under a different license.
File: wam_node.cpp
Date: 5 June, 2012
Author: Kyle Maroney
*/
/*Made catkin compatible and newer ROS friendly by Benjamin Blumer */
#include <unistd.h>
#include <math.h>
#include <boost/thread.hpp> // BarrettHand threading
#include <boost/bind.hpp>
#include "ros/ros.h"
#include "tf/transform_datatypes.h"
#include "wam_common/RTJointPos.h"
#include "wam_common/RTJointVel.h"
#include "wam_common/RTCartPos.h"
#include "wam_common/RTCartVel.h"
#include "wam_common/RTOrtnPos.h"
#include "wam_common/RTOrtnVel.h"
#include "wam_common/GravityComp.h"
#include "wam_common/Hold.h"
#include "wam_common/JointMove.h"
#include "wam_common/PoseMove.h"
#include "wam_common/CartPosMove.h"
#include "wam_common/OrtnMove.h"
#include "wam_common/BHandFingerPos.h"
#include "wam_common/BHandGraspPos.h"
#include "wam_common/BHandSpreadPos.h"
#include "wam_common/BHandFingerVel.h"
#include "wam_common/BHandGraspVel.h"
#include "wam_common/BHandSpreadVel.h"
#include "std_srvs/Empty.h"
#include "sensor_msgs/JointState.h"
#include "geometry_msgs/PoseStamped.h"
#include <barrett/math.h>
#include <barrett/units.h>
#include <barrett/systems.h>
#include <barrett/products/product_manager.h>
#include <barrett/standard_main_function.h>
#include <barrett/systems/wam.h>
#include <barrett/detail/stl_utils.h>
typedef tf::Quaternion btQuaternion;
typedef tf::Matrix3x3 btMatrix3x3;
static const int PUBLISH_FREQ = 250; // Default Control Loop / Publishing Frequency
static const int BHAND_PUBLISH_FREQ = 5; // Publishing Frequency for the BarretHand
static const double SPEED = 0.5; // Default Cartesian Velocity
using namespace barrett;
//Creating a templated multiplier for our real-time computation
template<typename T1, typename T2, typename OutputType>
class Multiplier : public systems::System, public systems::SingleOutput<OutputType>
{
public:
Input<T1> input1;
public:
Input<T2> input2;
public:
Multiplier(std::string sysName = "Multiplier") :
systems::System(sysName), systems::SingleOutput<OutputType>(this), input1(this), input2(this)
{
}
virtual ~Multiplier()
{
mandatoryCleanUp();
}
protected:
OutputType data;
virtual void operate()
{
data = input1.getValue() * input2.getValue();
this->outputValue->setData(&data);
}
private:
DISALLOW_COPY_AND_ASSIGN(Multiplier);
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
};
//Creating a templated converter from Roll, Pitch, Yaw to Quaternion for real-time computation
class ToQuaternion : public systems::SingleIO<math::Vector<3>::type, Eigen::Quaterniond>
{
public:
Eigen::Quaterniond outputQuat;
public:
ToQuaternion(std::string sysName = "ToQuaternion") :
systems::SingleIO<math::Vector<3>::type, Eigen::Quaterniond>(sysName)
{
}
virtual ~ToQuaternion()
{
mandatoryCleanUp();
}
protected:
btQuaternion q;
virtual void operate()
{
const math::Vector<3>::type &inputRPY = input.getValue();
q.setEulerZYX(inputRPY[2], inputRPY[1], inputRPY[0]);
outputQuat.x() = q.getX();
outputQuat.y() = q.getY();
outputQuat.z() = q.getZ();
outputQuat.w() = q.getW();
this->outputValue->setData(&outputQuat);
}
private:
DISALLOW_COPY_AND_ASSIGN(ToQuaternion);
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
};
//Simple Function for converting Quaternion to RPY
math::Vector<3>::type toRPY(Eigen::Quaterniond inquat)
{
math::Vector<3>::type newRPY;
btQuaternion q(inquat.x(), inquat.y(), inquat.z(), inquat.w());
btMatrix3x3(q).getEulerZYX(newRPY[2], newRPY[1], newRPY[0]);
return newRPY;
}
//WamNode Class
template<size_t DOF>
class WamNode
{
BARRETT_UNITS_TEMPLATE_TYPEDEFS(DOF);
protected:
bool cart_vel_status, ortn_vel_status, jnt_vel_status;
bool jnt_pos_status, cart_pos_status, ortn_pos_status, new_rt_cmd;
double cart_vel_mag, ortn_vel_mag;
systems::Wam<DOF>& wam;
Hand* hand;
jp_type jp, jp_cmd, jp_home;
jp_type rt_jp_cmd, rt_jp_rl;
jv_type rt_jv_cmd;
cp_type cp_cmd, rt_cv_cmd;
cp_type rt_cp_cmd, rt_cp_rl;
Eigen::Quaterniond ortn_cmd, rt_op_cmd, rt_op_rl;
pose_type pose_cmd;
math::Vector<3>::type rt_ortn_cmd;
systems::ExposedOutput<Eigen::Quaterniond> orientationSetPoint, current_ortn;
systems::ExposedOutput<cp_type> cart_dir, current_cart_pos, cp_track;
systems::ExposedOutput<math::Vector<3>::type> rpy_cmd, current_rpy_ortn;
systems::ExposedOutput<jv_type> jv_track;
systems::ExposedOutput<jp_type> jp_track;
systems::TupleGrouper<cp_type, Eigen::Quaterniond> rt_pose_cmd;
systems::Summer<cp_type> cart_pos_sum;
systems::Summer<math::Vector<3>::type> ortn_cmd_sum;
systems::Ramp ramp;
systems::RateLimiter<jp_type> jp_rl;
systems::RateLimiter<cp_type> cp_rl;
Multiplier<double, cp_type, cp_type> mult_linear;
Multiplier<double, math::Vector<3>::type, math::Vector<3>::type> mult_angular;
ToQuaternion to_quat, to_quat_print;
Eigen::Quaterniond ortn_print;
ros::Time last_cart_vel_msg_time, last_ortn_vel_msg_time, last_jnt_vel_msg_time;
ros::Time last_jnt_pos_msg_time, last_cart_pos_msg_time, last_ortn_pos_msg_time;
ros::Duration rt_msg_timeout;
//Subscribed Topics
wam_common::RTCartVel cart_vel_cmd;
wam_common::RTOrtnVel ortn_vel_cmd;
//Subscribers
ros::Subscriber cart_vel_sub;
ros::Subscriber ortn_vel_sub;
ros::Subscriber jnt_vel_sub;
ros::Subscriber jnt_pos_sub;
ros::Subscriber cart_pos_sub;
ros::Subscriber ortn_pos_sub;
//Published Topics
sensor_msgs::JointState wam_joint_state, bhand_joint_state;
geometry_msgs::PoseStamped wam_pose;
//Publishers
ros::Publisher wam_joint_state_pub, bhand_joint_state_pub, wam_pose_pub;
//Services
ros::ServiceServer gravity_srv, go_home_srv, hold_jpos_srv, hold_cpos_srv;
ros::ServiceServer hold_ortn_srv, joint_move_srv, pose_move_srv;
ros::ServiceServer cart_move_srv, ortn_move_srv, hand_close_srv;
ros::ServiceServer hand_open_grsp_srv, hand_close_grsp_srv, hand_open_sprd_srv;
ros::ServiceServer hand_close_sprd_srv, hand_fngr_pos_srv, hand_fngr_vel_srv;
ros::ServiceServer hand_grsp_pos_srv, hand_grsp_vel_srv, hand_sprd_pos_srv;
ros::ServiceServer hand_sprd_vel_srv;
public:
WamNode(systems::Wam<DOF>& wam_) :
wam(wam_), hand(NULL), ramp(NULL, SPEED)
{
}
void
init(ProductManager& pm);
~WamNode()
{
}
bool
gravity(wam_common::GravityComp::Request &req, wam_common::GravityComp::Response &res);
bool
goHome(std_srvs::Empty::Request &req, std_srvs::Empty::Response &res);
bool
holdJPos(wam_common::Hold::Request &req, wam_common::Hold::Response &res);
bool
holdCPos(wam_common::Hold::Request &req, wam_common::Hold::Response &res);
bool
holdOrtn(wam_common::Hold::Request &req, wam_common::Hold::Response &res);
bool
jointMove(wam_common::JointMove::Request &req, wam_common::JointMove::Response &res);
bool
poseMove(wam_common::PoseMove::Request &req, wam_common::PoseMove::Response &res);
bool
cartMove(wam_common::CartPosMove::Request &req, wam_common::CartPosMove::Response &res);
bool
ortnMove(wam_common::OrtnMove::Request &req, wam_common::OrtnMove::Response &res);
bool
handOpenGrasp(std_srvs::Empty::Request &req, std_srvs::Empty::Response &res);
bool
handCloseGrasp(std_srvs::Empty::Request &req, std_srvs::Empty::Response &res);
bool
handOpenSpread(std_srvs::Empty::Request &req, std_srvs::Empty::Response &res);
bool
handCloseSpread(std_srvs::Empty::Request &req, std_srvs::Empty::Response &res);
bool
handFingerPos(wam_common::BHandFingerPos::Request &req, wam_common::BHandFingerPos::Response &res);
bool
handGraspPos(wam_common::BHandGraspPos::Request &req, wam_common::BHandGraspPos::Response &res);
bool
handSpreadPos(wam_common::BHandSpreadPos::Request &req, wam_common::BHandSpreadPos::Response &res);
bool
handFingerVel(wam_common::BHandFingerVel::Request &req, wam_common::BHandFingerVel::Response &res);
bool
handGraspVel(wam_common::BHandGraspVel::Request &req, wam_common::BHandGraspVel::Response &res);
bool
handSpreadVel(wam_common::BHandSpreadVel::Request &req, wam_common::BHandSpreadVel::Response &res);
void
cartVelCB(const wam_common::RTCartVel::ConstPtr& msg);
void
ortnVelCB(const wam_common::RTOrtnVel::ConstPtr& msg);
void
jntVelCB(const wam_common::RTJointVel::ConstPtr& msg);
void
jntPosCB(const wam_common::RTJointPos::ConstPtr& msg);
void
cartPosCB(const wam_common::RTCartPos::ConstPtr& msg);
void
publishWam(ProductManager& pm);
void
publishHand(void);
void
updateRT(ProductManager& pm);
};
// Templated Initialization Function
template<size_t DOF>
void WamNode<DOF>::init(ProductManager& pm)
{
ros::NodeHandle n_("wam"); // WAM specific nodehandle
ros::NodeHandle nh_("bhand"); // BarrettHand specific nodehandle
//Setting up real-time command timeouts and initial values
cart_vel_status = false; //Bool for determining cartesian velocity real-time state
ortn_vel_status = false; //Bool for determining orientation velocity real-time state
new_rt_cmd = false; //Bool for determining if a new real-time message was received
rt_msg_timeout.fromSec(0.3); //rt_status will be determined false if rt message is not received in specified time
cart_vel_mag = SPEED; //Setting default cartesian velocity magnitude to SPEED
ortn_vel_mag = SPEED;
pm.getExecutionManager()->startManaging(ramp); //starting ramp manager
ROS_INFO(" \n %zu-DOF WAM", DOF);
jp_home = wam.getJointPositions();
if (pm.foundHand()) //Does the following only if a BarrettHand is present
{
std::cout << "Barrett Hand" << std::endl;
hand = pm.getHand();
// Adjust the torque limits to allow for BarrettHand movements at extents
pm.getSafetyModule()->setTorqueLimit(3.0);
// Move j3 in order to give room for hand initialization
jp_type jp_init = wam.getJointPositions();
jp_init[3] -= 0.35;
usleep(500000);
wam.moveTo(jp_init);
usleep(500000);
hand->initialize();
hand->update();
//Publishing the following topics only if there is a BarrettHand present
bhand_joint_state_pub = nh_.advertise < sensor_msgs::JointState > ("joint_states", 1); // bhand/joint_states
//Advertise the following services only if there is a BarrettHand present
hand_open_grsp_srv = nh_.advertiseService("open_grasp", &WamNode<DOF>::handOpenGrasp, this); // bhand/open_grasp
hand_close_grsp_srv = nh_.advertiseService("close_grasp", &WamNode::handCloseGrasp, this); // bhand/close_grasp
hand_open_sprd_srv = nh_.advertiseService("open_spread", &WamNode::handOpenSpread, this); // bhand/open_spread
hand_close_sprd_srv = nh_.advertiseService("close_spread", &WamNode::handCloseSpread, this); // bhand/close_spread
hand_fngr_pos_srv = nh_.advertiseService("finger_pos", &WamNode::handFingerPos, this); // bhand/finger_pos
hand_grsp_pos_srv = nh_.advertiseService("grasp_pos", &WamNode::handGraspPos, this); // bhand/grasp_pos
hand_sprd_pos_srv = nh_.advertiseService("spread_pos", &WamNode::handSpreadPos, this); // bhand/spread_pos
hand_fngr_vel_srv = nh_.advertiseService("finger_vel", &WamNode::handFingerVel, this); // bhand/finger_vel
hand_grsp_vel_srv = nh_.advertiseService("grasp_vel", &WamNode::handGraspVel, this); // bhand/grasp_vel
hand_sprd_vel_srv = nh_.advertiseService("spread_vel", &WamNode::handSpreadVel, this); // bhand/spread_vel
//Set up the BarrettHand joint state publisher
const char* bhand_jnts[] = {"inner_f1", "inner_f2", "inner_f3", "spread", "outer_f1", "outer_f2", "outer_f3"};
std::vector < std::string > bhand_joints(bhand_jnts, bhand_jnts + 7);
bhand_joint_state.name.resize(7);
bhand_joint_state.name = bhand_joints;
bhand_joint_state.position.resize(7);
}
wam.gravityCompensate(true); // Turning on Gravity Compenstation by Default when starting the WAM Node
//Setting up WAM joint state publisher
const char* wam_jnts[] = {"wam_j1", "wam_j2", "wam_j3", "wam_j4", "wam_j5", "wam_j6", "wam_j7"};
std::vector < std::string > wam_joints(wam_jnts, wam_jnts + 7);
wam_joint_state.name = wam_joints;
wam_joint_state.name.resize(DOF);
wam_joint_state.position.resize(DOF);
wam_joint_state.velocity.resize(DOF);
wam_joint_state.effort.resize(DOF);
//Publishing the following rostopics
wam_joint_state_pub = n_.advertise < sensor_msgs::JointState > ("joint_states", 1); // wam/joint_states
wam_pose_pub = n_.advertise < geometry_msgs::PoseStamped > ("pose", 1); // wam/pose
//Subscribing to the following rostopics
cart_vel_sub = n_.subscribe("cart_vel_cmd", 1, &WamNode::cartVelCB, this); // wam/cart_vel_cmd
ortn_vel_sub = n_.subscribe("ortn_vel_cmd", 1, &WamNode::ortnVelCB, this); // wam/ortn_vel_cmd
jnt_vel_sub = n_.subscribe("jnt_vel_cmd", 1, &WamNode::jntVelCB, this); // wam/jnt_vel_cmd
jnt_pos_sub = n_.subscribe("jnt_pos_cmd", 1, &WamNode::jntPosCB, this); // wam/jnt_pos_cmd
cart_pos_sub = n_.subscribe("cart_pos_cmd", 1, &WamNode::cartPosCB, this); // wam/cart_pos_cmd
//Advertising the following rosservices
gravity_srv = n_.advertiseService("gravity_comp", &WamNode::gravity, this); // wam/gravity_comp
go_home_srv = n_.advertiseService("go_home", &WamNode::goHome, this); // wam/go_home
hold_jpos_srv = n_.advertiseService("hold_joint_pos", &WamNode::holdJPos, this); // wam/hold_joint_pos
hold_cpos_srv = n_.advertiseService("hold_cart_pos", &WamNode::holdCPos, this); // wam/hold_cart_pos
hold_ortn_srv = n_.advertiseService("hold_ortn", &WamNode::holdOrtn, this); // wam/hold_ortn
joint_move_srv = n_.advertiseService("joint_move", &WamNode::jointMove, this); // wam/joint_move
pose_move_srv = n_.advertiseService("pose_move", &WamNode::poseMove, this); // wam/pose_move
cart_move_srv = n_.advertiseService("cart_move", &WamNode::cartMove, this); // wam/cart_pos_move
ortn_move_srv = n_.advertiseService("ortn_move", &WamNode::ortnMove, this); // wam/ortn_move
}
// gravity_comp service callback
template<size_t DOF>
bool WamNode<DOF>::gravity(wam_common::GravityComp::Request &req, wam_common::GravityComp::Response &res)
{
wam.gravityCompensate(req.gravity);
ROS_INFO("Gravity Compensation Request: %s", (req.gravity) ? "true" : "false");
return true;
}
// goHome Function for sending the WAM safely back to its home starting position.
template<size_t DOF>
bool WamNode<DOF>::goHome(std_srvs::Empty::Request &req, std_srvs::Empty::Response &res)
{
ROS_INFO("Returning to Home Position");
if (hand != NULL)
{
hand->open(Hand::GRASP, true);
hand->close(Hand::SPREAD, true);
}
for (size_t i = 0; i < DOF; i++)
jp_cmd[i] = 0.0;
wam.moveTo(jp_cmd, true);
jp_home[3] -= 0.3;
wam.moveTo(jp_home, true);
jp_home[3] += 0.3;
wam.moveTo(jp_home, true);
return true;
}
//Function to hold WAM Joint Positions
template<size_t DOF>
bool WamNode<DOF>::holdJPos(wam_common::Hold::Request &req, wam_common::Hold::Response &res)
{
ROS_INFO("Joint Position Hold request: %s", (req.hold) ? "true" : "false");
if (req.hold)
wam.moveTo(wam.getJointPositions());
else
wam.idle();
return true;
}
//Function to hold WAM end effector Cartesian Position
template<size_t DOF>
bool WamNode<DOF>::holdCPos(wam_common::Hold::Request &req, wam_common::Hold::Response &res)
{
ROS_INFO("Cartesian Position Hold request: %s", (req.hold) ? "true" : "false");
if (req.hold)
wam.moveTo(wam.getToolPosition());
else
wam.idle();
return true;
}
//Function to hold WAM end effector Orientation
template<size_t DOF>
bool WamNode<DOF>::holdOrtn(wam_common::Hold::Request &req, wam_common::Hold::Response &res)
{
ROS_INFO("Orientation Hold request: %s", (req.hold) ? "true" : "false");
if (req.hold)
{
orientationSetPoint.setValue(wam.getToolOrientation());
wam.trackReferenceSignal(orientationSetPoint.output);
}
else
wam.idle();
return true;
}
//Function to command a joint space move to the WAM
template<size_t DOF>
bool WamNode<DOF>::jointMove(wam_common::JointMove::Request &req, wam_common::JointMove::Response &res)
{
if (req.joints.size() != DOF)
{
ROS_INFO("Request Failed: %zu-DOF request received, must be %zu-DOF", req.joints.size(), DOF);
return false;
}
ROS_INFO("Moving Robot to Commanded Joint Pose");
for (size_t i = 0; i < DOF; i++)
jp_cmd[i] = req.joints[i];
wam.moveTo(jp_cmd, false);
return true;
}
//Function to command a pose move to the WAM
template<size_t DOF>
bool WamNode<DOF>::poseMove(wam_common::PoseMove::Request &req, wam_common::PoseMove::Response &res)
{
ROS_INFO("Moving Robot to Commanded Pose");
cp_cmd[0] = req.pose.position.x;
cp_cmd[1] = req.pose.position.y;
cp_cmd[2] = req.pose.position.z;
ortn_cmd.x() = req.pose.orientation.x;
ortn_cmd.y() = req.pose.orientation.y;
ortn_cmd.z() = req.pose.orientation.z;
ortn_cmd.w() = req.pose.orientation.w;
pose_cmd = boost::make_tuple(cp_cmd, ortn_cmd);
//wam.moveTo(pose_cmd, false); //(TODO:KM Update Libbarrett API for Pose Moves)
ROS_INFO("Pose Commands for WAM not yet supported by API");
return false;
}
//Function to command a cartesian move to the WAM
template<size_t DOF>
bool WamNode<DOF>::cartMove(wam_common::CartPosMove::Request &req, wam_common::CartPosMove::Response &res)
{
ROS_INFO("Moving Robot to Commanded Cartesian Position");
for (int i = 0; i < 3; i++)
cp_cmd[i] = req.position[i];
wam.moveTo(cp_cmd, false);
return true;
}
//Function to command an orientation move to the WAM
template<size_t DOF>
bool WamNode<DOF>::ortnMove(wam_common::OrtnMove::Request &req, wam_common::OrtnMove::Response &res)
{
ROS_INFO("Moving Robot to Commanded End Effector Orientation");
ortn_cmd.x() = req.orientation[0];
ortn_cmd.y() = req.orientation[1];
ortn_cmd.z() = req.orientation[2];
ortn_cmd.w() = req.orientation[3];
wam.moveTo(ortn_cmd, false);
return true;
}
//Function to open the BarrettHand Grasp
template<size_t DOF>
bool WamNode<DOF>::handOpenGrasp(std_srvs::Empty::Request &req, std_srvs::Empty::Response &res)
{
ROS_INFO("Opening the BarrettHand Grasp");
hand->open(Hand::GRASP, false);
return true;
}
//Function to close the BarrettHand Grasp
template<size_t DOF>
bool WamNode<DOF>::handCloseGrasp(std_srvs::Empty::Request &req, std_srvs::Empty::Response &res)
{
ROS_INFO("Closing the BarrettHand Grasp");
hand->close(Hand::GRASP, false);
return true;
}
//Function to open the BarrettHand Spread
template<size_t DOF>
bool WamNode<DOF>::handOpenSpread(std_srvs::Empty::Request &req, std_srvs::Empty::Response &res)
{
ROS_INFO("Opening the BarrettHand Spread");
hand->open(Hand::SPREAD, false);
return true;
}
//Function to close the BarrettHand Spread
template<size_t DOF>
bool WamNode<DOF>::handCloseSpread(std_srvs::Empty::Request &req, std_srvs::Empty::Response &res)
{
ROS_INFO("Closing the BarrettHand Spread");
hand->close(Hand::SPREAD, false);
return true;
}
//Function to control a BarrettHand Finger Position
template<size_t DOF>
bool WamNode<DOF>::handFingerPos(wam_common::BHandFingerPos::Request &req, wam_common::BHandFingerPos::Response &res)
{
ROS_INFO("Moving BarrettHand to Finger Positions: %.3f, %.3f, %.3f radians", req.radians[0], req.radians[1],
req.radians[2]);
hand->trapezoidalMove(Hand::jp_type(req.radians[0], req.radians[1], req.radians[2], 0.0), Hand::GRASP, false);
return true;
}
//Function to control the BarrettHand Grasp Position
template<size_t DOF>
bool WamNode<DOF>::handGraspPos(wam_common::BHandGraspPos::Request &req, wam_common::BHandGraspPos::Response &res)
{
ROS_INFO("Moving BarrettHand Grasp: %.3f radians", req.radians);
hand->trapezoidalMove(Hand::jp_type(req.radians), Hand::GRASP, false);
return true;
}
//Function to control the BarrettHand Spread Position
template<size_t DOF>
bool WamNode<DOF>::handSpreadPos(wam_common::BHandSpreadPos::Request &req, wam_common::BHandSpreadPos::Response &res)
{
ROS_INFO("Moving BarrettHand Spread: %.3f radians", req.radians);
hand->trapezoidalMove(Hand::jp_type(req.radians), Hand::SPREAD, false);
return true;
}
//Function to control a BarrettHand Finger Velocity
template<size_t DOF>
bool WamNode<DOF>::handFingerVel(wam_common::BHandFingerVel::Request &req, wam_common::BHandFingerVel::Response &res)
{
ROS_INFO("Moving BarrettHand Finger Velocities: %.3f, %.3f, %.3f m/s", req.velocity[0], req.velocity[1],
req.velocity[2]);
hand->velocityMove(Hand::jv_type(req.velocity[0], req.velocity[1], req.velocity[2], 0.0), Hand::GRASP);
return true;
}
//Function to control a BarrettHand Grasp Velocity
template<size_t DOF>
bool WamNode<DOF>::handGraspVel(wam_common::BHandGraspVel::Request &req, wam_common::BHandGraspVel::Response &res)
{
ROS_INFO("Moving BarrettHand Grasp: %.3f m/s", req.velocity);
hand->velocityMove(Hand::jv_type(req.velocity), Hand::GRASP);
return true;
}
//Function to control a BarrettHand Spread Velocity
template<size_t DOF>
bool WamNode<DOF>::handSpreadVel(wam_common::BHandSpreadVel::Request &req, wam_common::BHandSpreadVel::Response &res)
{
ROS_INFO("Moving BarrettHand Spread: %.3f m/s", req.velocity);
usleep(5000);
hand->velocityMove(Hand::jv_type(req.velocity), Hand::SPREAD);
return true;
}
//Callback function for RT Cartesian Velocity messages
template<size_t DOF>
void WamNode<DOF>::cartVelCB(const wam_common::RTCartVel::ConstPtr& msg)
{
if (cart_vel_status)
{
for (size_t i = 0; i < 3; i++)
rt_cv_cmd[i] = msg->direction[i];
new_rt_cmd = true;
if (msg->magnitude != 0)
cart_vel_mag = msg->magnitude;
}
last_cart_vel_msg_time = ros::Time::now();
}
//Callback function for RT Orientation Velocity Messages
template<size_t DOF>
void WamNode<DOF>::ortnVelCB(const wam_common::RTOrtnVel::ConstPtr& msg)
{
if (ortn_vel_status)
{
for (size_t i = 0; i < 3; i++)
rt_ortn_cmd[i] = msg->angular[i];
new_rt_cmd = true;
if (msg->magnitude != 0)
ortn_vel_mag = msg->magnitude;
}
last_ortn_vel_msg_time = ros::Time::now();
}
//Callback function for RT Joint Velocity Messages
template<size_t DOF>
void WamNode<DOF>::jntVelCB(const wam_common::RTJointVel::ConstPtr& msg)
{
if (msg->velocities.size() != DOF)
{
ROS_INFO("Commanded Joint Velocities != DOF of WAM");
return;
}
if (jnt_vel_status)
{
for (size_t i = 0; i < DOF; i++)
rt_jv_cmd[i] = msg->velocities[i];
new_rt_cmd = true;
}
last_jnt_vel_msg_time = ros::Time::now();
}
//Callback function for RT Joint Position Messages
template<size_t DOF>
void WamNode<DOF>::jntPosCB(const wam_common::RTJointPos::ConstPtr& msg)
{
if (msg->joints.size() != DOF)
{
ROS_INFO("Commanded Joint Positions != DOF of WAM");
return;
}
if (jnt_pos_status)
{
for (size_t i = 0; i < DOF; i++)
{
rt_jp_cmd[i] = msg->joints[i];
rt_jp_rl[i] = msg->rate_limits[i];
}
rt_jp_cmd[3] = 2*M_PI - msg->joints[3];
rt_jp_rl[3] = -msg->rate_limits[3];
new_rt_cmd = true;
}
last_jnt_pos_msg_time = ros::Time::now();
}
//Callback function for RT Cartesian Position Messages
template<size_t DOF>
void WamNode<DOF>::cartPosCB(const wam_common::RTCartPos::ConstPtr& msg)
{
if (cart_pos_status)
{
for (size_t i = 0; i < 3; i++)
{
rt_cp_cmd[i] = msg->position[i];
rt_cp_rl[i] = msg->rate_limits[i];
}
new_rt_cmd = true;
}
last_cart_pos_msg_time = ros::Time::now();
}
//Function to update the WAM publisher
template<size_t DOF>
void WamNode<DOF>::publishWam(ProductManager& pm)
{
//Current values to be published
jp_type jp = wam.getJointPositions();
jt_type jt = wam.getJointTorques();
jv_type jv = wam.getJointVelocities();
cp_type cp_pub = wam.getToolPosition();
Eigen::Quaterniond to_pub = wam.getToolOrientation();
//publishing sensor_msgs/JointState to wam/joint_states
for (size_t i = 0; i < DOF; i++)
{
wam_joint_state.position[i] = jp[i];
wam_joint_state.velocity[i] = jv[i];
wam_joint_state.effort[i] = jt[i];
}
wam_joint_state.position[3] = 2*M_PI - jp[3];
wam_joint_state.velocity[3] = -jv[3];
wam_joint_state.effort[3] = -jt[3];
wam_joint_state.header.stamp = ros::Time::now();
wam_joint_state_pub.publish(wam_joint_state);
//publishing geometry_msgs/PoseStamed to wam/pose
wam_pose.header.stamp = ros::Time::now();
wam_pose.pose.position.x = cp_pub[0];
wam_pose.pose.position.y = cp_pub[1];
wam_pose.pose.position.z = cp_pub[2];
wam_pose.pose.orientation.w = to_pub.w();
wam_pose.pose.orientation.x = to_pub.x();
wam_pose.pose.orientation.y = to_pub.y();
wam_pose.pose.orientation.z = to_pub.z();
wam_pose_pub.publish(wam_pose);
}
//Function to update the real-time control loops
template<size_t DOF>
void WamNode<DOF>::publishHand() //systems::PeriodicDataLogger<debug_tuple>& logger
{
while (ros::ok())
{
hand->update(); // Update the hand sensors
Hand::jp_type hi = hand->getInnerLinkPosition(); // get finger positions information
Hand::jp_type ho = hand->getOuterLinkPosition();
for (size_t i = 0; i < 4; i++) // Save finger positions
bhand_joint_state.position[i] = hi[i];
for (size_t j = 0; j < 3; j++)
bhand_joint_state.position[j + 4] = ho[j];
bhand_joint_state.header.stamp = ros::Time::now(); // Set the timestamp
bhand_joint_state_pub.publish(bhand_joint_state); // Publish the BarrettHand joint states
btsleep(1.0 / BHAND_PUBLISH_FREQ); // Sleep according to the specified publishing frequency
}
}
//Function to update the real-time control loops
template<size_t DOF>
void WamNode<DOF>::updateRT(ProductManager& pm) //systems::PeriodicDataLogger<debug_tuple>& logger
{
//Real-Time Cartesian Velocity Control Portion
if (last_cart_vel_msg_time + rt_msg_timeout > ros::Time::now()) // checking if a cartesian velocity message has been published and if it is within timeout
{
if (!cart_vel_status)
{
cart_dir.setValue(cp_type(0.0, 0.0, 0.0)); // zeroing the cartesian direction
current_cart_pos.setValue(wam.getToolPosition()); // Initializing the cartesian position
current_ortn.setValue(wam.getToolOrientation()); // Initializing the orientation
systems::forceConnect(ramp.output, mult_linear.input1); // connecting the ramp to multiplier
systems::forceConnect(cart_dir.output, mult_linear.input2); // connecting the direction to the multiplier
systems::forceConnect(mult_linear.output, cart_pos_sum.getInput(0)); // adding the output of the multiplier
systems::forceConnect(current_cart_pos.output, cart_pos_sum.getInput(1)); // with the starting cartesian position offset
systems::forceConnect(cart_pos_sum.output, rt_pose_cmd.getInput<0>()); // saving summed position as new commanded pose.position
systems::forceConnect(current_ortn.output, rt_pose_cmd.getInput<1>()); // saving the original orientation to the pose.orientation
ramp.setSlope(cart_vel_mag); // setting the slope to the commanded magnitude
ramp.stop(); // ramp is stopped on startup
ramp.setOutput(0.0); // ramp is re-zeroed on startup
ramp.start(); // start the ramp
wam.trackReferenceSignal(rt_pose_cmd.output); // command WAM to track the RT commanded (500 Hz) updated pose
}
else if (new_rt_cmd)
{
ramp.reset(); // reset the ramp to 0
ramp.setSlope(cart_vel_mag);
cart_dir.setValue(rt_cv_cmd); // set our cartesian direction to subscribed command
current_cart_pos.setValue(wam.tpoTpController.referenceInput.getValue()); // updating the current position to the actual low level commanded value
}
cart_vel_status = true;
new_rt_cmd = false;
}
//Real-Time Angular Velocity Control Portion
else if (last_ortn_vel_msg_time + rt_msg_timeout > ros::Time::now()) // checking if a orientation velocity message has been published and if it is within timeout
{
if (!ortn_vel_status)
{
rpy_cmd.setValue(math::Vector<3>::type(0.0, 0.0, 0.0)); // zeroing the rpy command
current_cart_pos.setValue(wam.getToolPosition()); // Initializing the cartesian position
current_rpy_ortn.setValue(toRPY(wam.getToolOrientation())); // Initializing the orientation
systems::forceConnect(ramp.output, mult_angular.input1); // connecting the ramp to multiplier
systems::forceConnect(rpy_cmd.output, mult_angular.input2); // connecting the rpy command to the multiplier
systems::forceConnect(mult_angular.output, ortn_cmd_sum.getInput(0)); // adding the output of the multiplier
systems::forceConnect(current_rpy_ortn.output, ortn_cmd_sum.getInput(1)); // with the starting rpy orientation offset
systems::forceConnect(ortn_cmd_sum.output, to_quat.input);
systems::forceConnect(current_cart_pos.output, rt_pose_cmd.getInput<0>()); // saving the original position to the pose.position
systems::forceConnect(to_quat.output, rt_pose_cmd.getInput<1>()); // saving the summed and converted new quaternion commmand as the pose.orientation
ramp.setSlope(ortn_vel_mag); // setting the slope to the commanded magnitude
ramp.stop(); // ramp is stopped on startup
ramp.setOutput(0.0); // ramp is re-zeroed on startup
ramp.start(); // start the ramp
wam.trackReferenceSignal(rt_pose_cmd.output); // command the WAM to track the RT commanded up to (500 Hz) cartesian velocity
}
else if (new_rt_cmd)
{
ramp.reset(); // reset the ramp to 0
ramp.setSlope(ortn_vel_mag); // updating the commanded angular velocity magnitude
rpy_cmd.setValue(rt_ortn_cmd); // set our angular rpy command to subscribed command
current_rpy_ortn.setValue(toRPY(wam.tpoToController.referenceInput.getValue())); // updating the current orientation to the actual low level commanded value
}
ortn_vel_status = true;
new_rt_cmd = false;
}
//Real-Time Joint Velocity Control Portion
else if (last_jnt_vel_msg_time + rt_msg_timeout > ros::Time::now()) // checking if a joint velocity message has been published and if it is within timeout
{
if (!jnt_vel_status)
{
jv_type jv_start;
for (size_t i = 0; i < DOF; i++)
jv_start[i] = 0.0;
jv_track.setValue(jv_start); // zeroing the joint velocity command
wam.trackReferenceSignal(jv_track.output); // command the WAM to track the RT commanded up to (500 Hz) joint velocities
}
else if (new_rt_cmd)
{
jv_track.setValue(rt_jv_cmd); // set our joint velocity to subscribed command
}
jnt_vel_status = true;
new_rt_cmd = false;
}
//Real-Time Joint Position Control Portion
else if (last_jnt_pos_msg_time + rt_msg_timeout > ros::Time::now()) // checking if a joint position message has been published and if it is within timeout
{
if (!jnt_pos_status)
{
jp_type jp_start = wam.getJointPositions();
jp_track.setValue(jp_start); // setting initial the joint position command
jp_rl.setLimit(rt_jp_rl);
systems::forceConnect(jp_track.output, jp_rl.input);
wam.trackReferenceSignal(jp_rl.output); // command the WAM to track the RT commanded up to (500 Hz) joint positions
}
else if (new_rt_cmd)
{
jp_track.setValue(rt_jp_cmd); // set our joint position to subscribed command
jp_rl.setLimit(rt_jp_rl); // set our rate limit to subscribed rate to control the rate of the moves
}
jnt_pos_status = true;
new_rt_cmd = false;
}
//Real-Time Cartesian Position Control Portion
else if (last_cart_pos_msg_time + rt_msg_timeout > ros::Time::now()) // checking if a cartesian position message has been published and if it is within timeout
{
if (!cart_pos_status)
{
cp_track.setValue(wam.getToolPosition());
current_ortn.setValue(wam.getToolOrientation()); // Initializing the orientation
cp_rl.setLimit(rt_cp_rl);
systems::forceConnect(cp_track.output, cp_rl.input);
systems::forceConnect(cp_rl.output, rt_pose_cmd.getInput<0>()); // saving the rate limited cartesian position command to the pose.position
systems::forceConnect(current_ortn.output, rt_pose_cmd.getInput<1>()); // saving the original orientation to the pose.orientation
wam.trackReferenceSignal(rt_pose_cmd.output); //Commanding the WAM to track the real-time pose command.
}
else if (new_rt_cmd)
{
cp_track.setValue(rt_cp_cmd); // Set our cartesian positions to subscribed command
cp_rl.setLimit(rt_cp_rl); // Updating the rate limit to subscribed rate to control the rate of the moves
}
cart_pos_status = true;
new_rt_cmd = false;
}
//If we fall out of 'Real-Time', hold joint positions
else if (cart_vel_status | ortn_vel_status | jnt_vel_status | jnt_pos_status | cart_pos_status)
{
wam.moveTo(wam.getJointPositions()); // Holds current joint positions upon a RT message timeout
cart_vel_status = ortn_vel_status = jnt_vel_status = jnt_pos_status = cart_pos_status = ortn_pos_status = false;
}
}
//wam_main Function
template<size_t DOF>
int wam_main(int argc, char** argv, ProductManager& pm, systems::Wam<DOF>& wam)
{
BARRETT_UNITS_TEMPLATE_TYPEDEFS(DOF);
ros::init(argc, argv, "wam_node");
WamNode<DOF> wam_node(wam);
wam_node.init(pm);
ros::Rate pub_rate(PUBLISH_FREQ);
if (pm.getHand())
boost::thread handPubThread(&WamNode<DOF>::publishHand, &wam_node);
while (ros::ok() && pm.getSafetyModule()->getMode() == SafetyModule::ACTIVE)
{
ros::spinOnce();
wam_node.publishWam(pm);
wam_node.updateRT(pm);
pub_rate.sleep();
}
return 0;
}
| [
"cbuscaron@gmail.com"
] | cbuscaron@gmail.com |
0d0eedaaaed8afa0626e63e51cf2a6837a74ddd2 | 27f88ea6d808b3cd88daa21a3b706539eaf0b539 | /Online Judge/CodCad/Airport/69027.cpp | c612b0cd032db2298937de188c403a2dbaa54959 | [] | no_license | glaucoacassio2020/Competitive-Programming-Algorithm | 7889cf906df7665e0f7c3db245cd3b946e6231a9 | 99d396b0fae5c7a4c702a5ec174e6d0261a9d50f | refs/heads/master | 2023-03-17T22:44:49.785615 | 2020-04-21T02:07:02 | 2020-04-21T02:07:02 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 658 | cpp | #include <iostream>
#include <stdio.h>
#include <cstring>
using namespace std;
int main(void) {
int x=1, a, v;
scanf("%d %d", &a, &v);
while(a && v){
int i, y, z, maior=0;
int lista[101];
memset(lista, 0, sizeof(lista));
for(i=0; i<v; i++){
scanf("%d %d", &y, &z);
lista[y]++;
lista[z]++;
}
for(i=0; i<=a; i++){
if(lista[i] > maior)
maior = lista[i];
}
cout << "Teste " << x << endl;
for(i=0; i<=a; i++){
if(lista[i] == maior)
cout << i << " ";
}
cout << endl<<endl;
x++;
scanf("%d %d", &a, &v);
}
return 0;
}
| [
"paulomirandamss12@gmail.com"
] | paulomirandamss12@gmail.com |
904a67c6dd640dc927a7c3af0e64a187434cedd1 | 61f26e78291a96b5e8c810d82cb5eedbe86bd6f7 | /train_and_predict.cpp | a06453e3c89fcbb3f4f32093ced2239c5f99e1dd | [] | no_license | kyaFUK/tf-train-cpp | 993f33fe76c29d6bc692680ddcc3b5b9f9d17c05 | 5309e0c5efa7bad76d957b4567bec24331eeb80c | refs/heads/master | 2022-01-31T12:28:31.958859 | 2019-03-14T10:31:37 | 2019-03-22T22:20:00 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,600 | cpp | //
// Example of training the model created by create_graph.py in a C++ program.
//
#include <iostream>
#include <vector>
#include <string>
#include "tensorflow/core/platform/init_main.h"
#include "common.h"
using std::vector;
using std::string;
namespace {
// Save a checkpoint
void save_checkpoint(const std::unique_ptr<tensorflow::Session>& session, const string& checkpoint_prefix) {
tensorflow::Tensor ckpt(tensorflow::DT_STRING, tensorflow::TensorShape());
ckpt.scalar<string>()() = checkpoint_prefix;
TF_CHECK_OK(session->Run({{"save/Const", ckpt}}, {}, {"save/control_dependency"}, nullptr));
}
bool directory_exists(const string& dir) {
struct stat buf;
return stat(dir.c_str(), &buf) == 0;
}
}
int main(int argc, char* argv[]) {
const string graph_def_filename = "model.pb";
const string checkpoint_dir = "./checkpoints";
const string checkpoint_prefix = checkpoint_dir + "/model.ckpt";
// Setup global state for TensorFlow.
tensorflow::port::InitMain(argv[0], &argc, &argv);
std::cout << "Loading graph\n";
tensorflow::GraphDef graph_def;
// tensorflow::MetaGraphDef graph_def;
TF_CHECK_OK(tensorflow::ReadBinaryProto(tensorflow::Env::Default(),
graph_def_filename, &graph_def));
std::unique_ptr<tensorflow::Session> session(tensorflow::NewSession(tensorflow::SessionOptions()));
TF_CHECK_OK(session->Create(graph_def));
if (directory_exists(checkpoint_dir)) {
std::cout << "Restoring model weights from checkpoint\n";
tensorflow::Tensor ckpt(tensorflow::DT_STRING, tensorflow::TensorShape());
ckpt.scalar<string>()() = checkpoint_prefix;
TF_CHECK_OK(session->Run({{"save/Const", ckpt}}, {}, {"save/restore_all"}, nullptr));
} else {
std::cout << "Initializing model weights\n";
TF_CHECK_OK(session->Run({}, {}, {"init"}, nullptr));
}
// Load images and labels of training data
auto test_x = read_training_file("MNIST_data/t10k-images.idx3-ubyte");
auto test_y = read_label_file("MNIST_data/t10k-labels.idx1-ubyte");
predict(session, test_x, test_y);
// Load images and labels of test data
auto train_x = read_training_file("MNIST_data/train-images.idx3-ubyte");
auto train_y = read_label_file("MNIST_data/train-labels.idx1-ubyte");
// Training
for (int i = 0; i < 20; ++i) {
std::cout << "Epoch: " << i << std::endl;
run_train_step(session, train_x, train_y);
}
std::cout << "Updated predictions\n";
predict(session, test_x, test_y);
std::cout << "Saving checkpoint\n";
save_checkpoint(session, checkpoint_prefix);
return 0;
}
| [
"ryoji.ysd@gmail.com"
] | ryoji.ysd@gmail.com |
bb0812c2286f825e10d7d5d34a2d678a5dfe09b7 | 2a5db4d9e51d29445f72d1ffd3f98609523b082d | /media-driver/media_driver/linux/gen8/ddi/media_libva_caps_g8.cpp | 6b8e4a211574d30a9caa0ecc0fa75eaef9decfe6 | [
"BSD-3-Clause",
"MIT"
] | permissive | mintaka33/media | 19f26239aee1d889860867a536024ffc137c2776 | 4ab1435ef3b3269ff9c0fa71072c3f81275a4b9d | refs/heads/master | 2021-05-11T04:01:48.314310 | 2018-02-02T03:43:36 | 2018-02-02T03:43:36 | 117,930,190 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 7,794 | cpp | /*
* Copyright (c) 2017, Intel Corporation
*
* 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.
*/
//!
//! \file media_libva_caps_g8.cpp
//! \brief This file implements the C++ class/interface for gen8 media capbilities.
//!
#include "codec_def_encode_avc.h"
#include "media_libva_util.h"
#include "media_libva.h"
#include "media_libva_caps_g8.h"
#include "media_libva_caps_factory.h"
VAStatus MediaLibvaCapsG8::GetPlatformSpecificAttrib(
VAProfile profile,
VAEntrypoint entrypoint,
VAConfigAttribType type,
uint32_t *value)
{
DDI_CHK_NULL(value, "Null pointer", VA_STATUS_ERROR_INVALID_PARAMETER);
VAStatus status = VA_STATUS_SUCCESS;
switch ((int32_t)type)
{
case VAConfigAttribEncMaxRefFrames:
{
if (entrypoint == VAEntrypointEncSliceLP || !IsHevcProfile(profile))
{
status = VA_STATUS_ERROR_INVALID_PARAMETER;
}
else
{
*value = 1 | (1 << 16);
}
break;
}
case VAConfigAttribDecProcessing:
{
*value = VA_DEC_PROCESSING_NONE;
break;
}
case VAConfigAttribEncIntraRefresh:
{
if(IsAvcProfile(profile))
{
*value = VA_ENC_INTRA_REFRESH_ROLLING_COLUMN |
VA_ENC_INTRA_REFRESH_ROLLING_ROW;
}
else
{
*value = VA_ENC_INTRA_REFRESH_NONE;
}
break;
}
case VAConfigAttribEncROI:
{
if (entrypoint == VAEntrypointEncSliceLP)
{
status = VA_STATUS_ERROR_INVALID_PARAMETER;
}
else if (IsAvcProfile(profile))
{
*value = ENCODE_DP_AVC_MAX_ROI_NUMBER;
}
else
{
*value = 0;
}
break;
}
case VAConfigAttribCustomRoundingControl:
{
if (IsAvcProfile(profile))
{
*value = 1;
}
else
{
*value = 0;
}
break;
}
default:
status = VA_STATUS_ERROR_INVALID_PARAMETER;
break;
}
return status;
}
VAStatus MediaLibvaCapsG8::LoadProfileEntrypoints()
{
VAStatus status = VA_STATUS_SUCCESS;
status = LoadAvcDecProfileEntrypoints();
DDI_CHK_RET(status, "Failed to initialize Caps!");
status = LoadAvcEncProfileEntrypoints();
DDI_CHK_RET(status, "Failed to initialize Caps!");
status = LoadMpeg2DecProfileEntrypoints();
DDI_CHK_RET(status, "Failed to initialize Caps!");
status = LoadMpeg2EncProfileEntrypoints();
DDI_CHK_RET(status, "Failed to initialize Caps!");
status = LoadVc1DecProfileEntrypoints();
DDI_CHK_RET(status, "Failed to initialize Caps!");
status = LoadJpegDecProfileEntrypoints();
DDI_CHK_RET(status, "Failed to initialize Caps!");
status = LoadJpegEncProfileEntrypoints();
DDI_CHK_RET(status, "Failed to initialize Caps!");
status = LoadVp8DecProfileEntrypoints();
DDI_CHK_RET(status, "Failed to initialize Caps!");
status = LoadVp8EncProfileEntrypoints();
DDI_CHK_RET(status, "Failed to initialize Caps!");
status = LoadVp9DecProfileEntrypoints();
DDI_CHK_RET(status, "Failed to initialize Caps!");
status = LoadVp9EncProfileEntrypoints();
DDI_CHK_RET(status, "Failed to initialize Caps!");
status = LoadNoneProfileEntrypoints();
DDI_CHK_RET(status, "Failed to initialize Caps!");
return status;
}
VAStatus MediaLibvaCapsG8::QueryAVCROIMaxNum(uint32_t rcMode, int32_t *maxNum, bool *isRoiInDeltaQP)
{
DDI_CHK_NULL(maxNum, "Null pointer", VA_STATUS_ERROR_INVALID_PARAMETER);
DDI_CHK_NULL(isRoiInDeltaQP, "Null pointer", VA_STATUS_ERROR_INVALID_PARAMETER);
*maxNum = ENCODE_DP_AVC_MAX_ROI_NUMBER;
*isRoiInDeltaQP = false;
return VA_STATUS_SUCCESS;
}
VAStatus MediaLibvaCapsG8::GetMbProcessingRateEnc(
MEDIA_FEATURE_TABLE *skuTable,
uint32_t tuIdx,
uint32_t codecMode,
bool vdencActive,
uint32_t *mbProcessingRatePerSec)
{
DDI_CHK_NULL(skuTable, "Null pointer", VA_STATUS_ERROR_INVALID_PARAMETER);
DDI_CHK_NULL(mbProcessingRatePerSec, "Null pointer", VA_STATUS_ERROR_INVALID_PARAMETER);
uint32_t gtIdx = 0;
if (MEDIA_IS_SKU(skuTable, FtrGT1))
{
gtIdx = 3;
}
else if (MEDIA_IS_SKU(skuTable, FtrGT1_5))
{
gtIdx = 2;
}
else if (MEDIA_IS_SKU(skuTable, FtrGT2))
{
gtIdx = 1;
}
else if (MEDIA_IS_SKU(skuTable, FtrGT3))
{
gtIdx = 0;
}
else
{
return VA_STATUS_ERROR_INVALID_PARAMETER;
}
if (MEDIA_IS_SKU(skuTable, FtrULX))
{
const uint32_t mbRate[7][4] =
{
// GT3 | GT2 | GT1.5 | GT1
{ 0, 750000, 750000, 676280 },
{ 0, 750000, 750000, 661800 },
{ 0, 750000, 750000, 640000 },
{ 0, 750000, 750000, 640000 },
{ 0, 750000, 750000, 640000 },
{ 0, 416051, 416051, 317980 },
{ 0, 214438, 214438, 180655 }
};
if (gtIdx == 0)
{
return VA_STATUS_ERROR_INVALID_PARAMETER;
}
*mbProcessingRatePerSec = mbRate[tuIdx][gtIdx];
}
else if (MEDIA_IS_SKU(skuTable, FtrULT))
{
const uint32_t mbRate[7][4] =
{
// GT3 | GT2 | GT1.5 | GT1
{ 1544090, 1544090, 1029393, 676280 },
{ 1462540, 1462540, 975027, 661800 },
{ 1165381, 1165381, 776921, 640000 },
{ 1165381, 1165381, 776921, 640000 },
{ 1165381, 1165381, 776921, 640000 },
{ 624076, 624076, 416051, 317980 },
{ 321657, 321657, 214438, 180655 }
};
*mbProcessingRatePerSec = mbRate[tuIdx][gtIdx];
}
else
{
const uint32_t mbRate[7][4] =
{
// GT3 | GT2 | GT1.5 | GT1
{ 1544090, 1544090, 1029393, 676280 },
{ 1462540, 1462540, 975027, 661800 },
{ 1165381, 1165381, 776921, 640000 },
{ 1165381, 1165381, 776921, 640000 },
{ 1165381, 1165381, 776921, 640000 },
{ 624076, 624076, 416051, 317980 },
{ 321657, 321657, 214438, 180655 }
};
*mbProcessingRatePerSec = mbRate[tuIdx][gtIdx];
}
return VA_STATUS_SUCCESS;
}
extern template class MediaLibvaCapsFactory<MediaLibvaCaps, DDI_MEDIA_CONTEXT>;
static bool bdwRegistered = MediaLibvaCapsFactory<MediaLibvaCaps, DDI_MEDIA_CONTEXT>::
RegisterCaps<MediaLibvaCapsG8>((uint32_t)IGFX_BROADWELL);
| [
"mintaka33@outlook.com"
] | mintaka33@outlook.com |
e47a2a48b8263836cb278b3f6722706cfd2389c4 | 10fa542cf8a837a2225989537d52e1572080795d | /Delphes-3.0.12/classes/DelphesClasses.h | 194b31a7a80102c592ea3dbb7627cec58786a69d | [] | no_license | kalanand/DelphesTutorial | cd28173b8a9364459807018faa0ac9c93db9775d | 816b1eac585555f41eb238b14b57742dcda5b12d | refs/heads/master | 2021-01-15T13:13:20.894890 | 2014-02-23T02:44:48 | 2014-02-23T02:44:48 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 11,477 | h | #ifndef DelphesClasses_h
#define DelphesClasses_h
/**
*
* Definition of classes to be stored in the root tree.
* Function CompareXYZ sorts objects by the variable XYZ that MUST be
* present in the data members of the root tree class of the branch.
*
* $Date: 2008-06-04 13:57:24 $
* $Revision: 1.1 $
*
*
* \author P. Demin - UCL, Louvain-la-Neuve
*
*/
// Dependencies (#includes)
#include "TRef.h"
#include "TObject.h"
#include "TRefArray.h"
#include "TLorentzVector.h"
#include "classes/SortableObject.h"
class DelphesFactory;
//---------------------------------------------------------------------------
class Event: public TObject
{
public:
Long64_t Number; // event number
Float_t ReadTime;
Float_t ProcTime;
ClassDef(Event, 1)
};
//---------------------------------------------------------------------------
class LHCOEvent: public Event
{
public:
Int_t Trigger; // trigger word
ClassDef(LHCOEvent, 1)
};
//---------------------------------------------------------------------------
class LHEFEvent: public Event
{
public:
Int_t ProcessID; // subprocess code for the event | hepup.IDPRUP
Float_t Weight; // weight for the event | hepup.XWGTUP
Float_t ScalePDF; // scale in GeV used in the calculation of the PDFs in the event | hepup.SCALUP
Float_t AlphaQED; // value of the QED coupling used in the event | hepup.AQEDUP
Float_t AlphaQCD; // value of the QCD coupling used in the event | hepup.AQCDUP
ClassDef(LHEFEvent, 2)
};
//---------------------------------------------------------------------------
class HepMCEvent: public Event
{
public:
Int_t ProcessID; // unique signal process id | signal_process_id()
Int_t MPI; // number of multi parton interactions | mpi ()
Float_t Weight; // weight for the event
Float_t Scale; // energy scale, see hep-ph/0109068 | event_scale()
Float_t AlphaQED; // QED coupling, see hep-ph/0109068 | alphaQED()
Float_t AlphaQCD; // QCD coupling, see hep-ph/0109068 | alphaQCD()
Int_t ID1; // flavour code of first parton | pdf_info()->id1()
Int_t ID2; // flavour code of second parton | pdf_info()->id2()
Float_t X1; // fraction of beam momentum carried by first parton ("beam side") | pdf_info()->x1()
Float_t X2; // fraction of beam momentum carried by second parton ("target side") | pdf_info()->x2()
Float_t ScalePDF; // Q-scale used in evaluation of PDF's (in GeV) | pdf_info()->scalePDF()
Float_t PDF1; // PDF (id1, x1, Q) | pdf_info()->pdf1()
Float_t PDF2; // PDF (id2, x2, Q) | pdf_info()->pdf2()
ClassDef(HepMCEvent, 2)
};
//---------------------------------------------------------------------------
class GenParticle: public SortableObject
{
public:
Int_t PID; // particle HEP ID number | hepevt.idhep[number]
Int_t Status; // particle status | hepevt.isthep[number]
Int_t IsPU; // 0 or 1 for particles from pile-up interactions
Int_t M1; // particle 1st mother | hepevt.jmohep[number][0] - 1
Int_t M2; // particle 2nd mother | hepevt.jmohep[number][1] - 1
Int_t D1; // particle 1st daughter | hepevt.jdahep[number][0] - 1
Int_t D2; // particle last daughter | hepevt.jdahep[number][1] - 1
Int_t Charge; // particle charge
Float_t Mass; // particle mass
Float_t E; // particle energy | hepevt.phep[number][3]
Float_t Px; // particle momentum vector (x component) | hepevt.phep[number][0]
Float_t Py; // particle momentum vector (y component) | hepevt.phep[number][1]
Float_t Pz; // particle momentum vector (z component) | hepevt.phep[number][2]
Float_t PT; // particle transverse momentum
Float_t Eta; // particle pseudorapidity
Float_t Phi; // particle azimuthal angle
Float_t Rapidity; // particle rapidity
Float_t T; // particle vertex position (t component) | hepevt.vhep[number][3]
Float_t X; // particle vertex position (x component) | hepevt.vhep[number][0]
Float_t Y; // particle vertex position (y component) | hepevt.vhep[number][1]
Float_t Z; // particle vertex position (z component) | hepevt.vhep[number][2]
static CompBase *fgCompare; //!
const CompBase *GetCompare() const { return fgCompare; }
TLorentzVector P4();
ClassDef(GenParticle, 1)
};
//---------------------------------------------------------------------------
class Vertex: public TObject
{
public:
Float_t T; // vertex position (t component)
Float_t X; // vertex position (x component)
Float_t Y; // vertex position (y component)
Float_t Z; // vertex position (z component)
ClassDef(Vertex, 1)
};
//---------------------------------------------------------------------------
class MissingET: public TObject
{
public:
Float_t MET; // mising transverse energy
Float_t Eta; // mising energy pseudorapidity
Float_t Phi; // mising energy azimuthal angle
TLorentzVector P4();
ClassDef(MissingET, 1)
};
//---------------------------------------------------------------------------
class ScalarHT: public TObject
{
public:
Float_t HT; // scalar sum of transverse momenta
ClassDef(ScalarHT, 1)
};
//---------------------------------------------------------------------------
class Rho: public TObject
{
public:
Float_t Rho; // rho energy density
Float_t Edges[2]; // pseudorapidity range edges
ClassDef(Rho, 1)
};
//---------------------------------------------------------------------------
class Weight: public TObject
{
public:
Float_t Weight; // weight for the event
ClassDef(Weight, 1)
};
//---------------------------------------------------------------------------
class Photon: public SortableObject
{
public:
Float_t PT; // photon transverse momentum
Float_t Eta; // photon pseudorapidity
Float_t Phi; // photon azimuthal angle
Float_t E; // photon energy
Float_t T; //particle arrival time of flight
Float_t EhadOverEem; // ratio of the hadronic versus electromagnetic energy deposited in the calorimeter
TRefArray Particles; // references to generated particles
static CompBase *fgCompare; //!
const CompBase *GetCompare() const { return fgCompare; }
TLorentzVector P4();
ClassDef(Photon, 2)
};
//---------------------------------------------------------------------------
class Electron: public SortableObject
{
public:
Float_t PT; // electron transverse momentum
Float_t Eta; // electron pseudorapidity
Float_t Phi; // electron azimuthal angle
Float_t T; //particle arrival time of flight
Int_t Charge; // electron charge
Float_t EhadOverEem; // ratio of the hadronic versus electromagnetic energy deposited in the calorimeter
TRef Particle; // reference to generated particle
static CompBase *fgCompare; //!
const CompBase *GetCompare() const { return fgCompare; }
TLorentzVector P4();
ClassDef(Electron, 2)
};
//---------------------------------------------------------------------------
class Muon: public SortableObject
{
public:
Float_t PT; // muon transverse momentum
Float_t Eta; // muon pseudorapidity
Float_t Phi; // muon azimuthal angle
Float_t T; //particle arrival time of flight
Int_t Charge; // muon charge
TRef Particle; // reference to generated particle
static CompBase *fgCompare; //!
const CompBase *GetCompare() const { return fgCompare; }
TLorentzVector P4();
ClassDef(Muon, 2)
};
//---------------------------------------------------------------------------
class Jet: public SortableObject
{
public:
Float_t PT; // jet transverse momentum
Float_t Eta; // jet pseudorapidity
Float_t Phi; // jet azimuthal angle
Float_t T; //particle arrival time of flight
Float_t Mass; // jet invariant mass
Float_t DeltaEta; // jet radius in pseudorapidity
Float_t DeltaPhi; // jet radius in azimuthal angle
UInt_t BTag; // 0 or 1 for a jet that has been tagged as containing a heavy quark
UInt_t TauTag; // 0 or 1 for a jet that has been tagged as a tau
Int_t Charge; // tau charge
Float_t EhadOverEem; // ratio of the hadronic versus electromagnetic energy deposited in the calorimeter
TRefArray Constituents; // references to constituents
TRefArray Particles; // references to generated particles
static CompBase *fgCompare; //!
const CompBase *GetCompare() const { return fgCompare; }
TLorentzVector P4();
// -- PileUpJetID variables ---
Int_t NCharged;
Int_t NNeutrals;
Float_t Beta;
Float_t BetaStar;
Float_t MeanSqDeltaR;
Float_t PTD;
Float_t FracPt[5];
ClassDef(Jet, 2)
};
//---------------------------------------------------------------------------
class Track: public SortableObject
{
public:
Int_t PID; // HEP ID number
Int_t Charge; // track charge
Float_t PT; // track transverse momentum
Float_t Eta; // track pseudorapidity
Float_t Phi; // track azimuthal angle
Float_t EtaOuter; // track pseudorapidity at the tracker edge
Float_t PhiOuter; // track azimuthal angle at the tracker edge
Float_t X; // track vertex position (x component)
Float_t Y; // track vertex position (y component)
Float_t Z; // track vertex position (z component)
Float_t T; // track vertex position (z component)
Float_t XOuter; // track position (x component) at the tracker edge
Float_t YOuter; // track position (y component) at the tracker edge
Float_t ZOuter; // track position (z component) at the tracker edge
Float_t TOuter; // track position (z component) at the tracker edge
TRef Particle; // reference to generated particle
static CompBase *fgCompare; //!
const CompBase *GetCompare() const { return fgCompare; }
TLorentzVector P4();
ClassDef(Track, 1)
};
//---------------------------------------------------------------------------
class Tower: public SortableObject
{
public:
Float_t ET; // calorimeter tower transverse energy
Float_t Eta; // calorimeter tower pseudorapidity
Float_t Phi; // calorimeter tower azimuthal angle
Float_t E; // calorimeter tower energy
Float_t T; //particle arrival time of flight
Float_t Eem; // calorimeter tower electromagnetic energy
Float_t Ehad; // calorimeter tower hadronic energy
Float_t Edges[4]; // calorimeter tower edges
TRefArray Particles; // references to generated particles
static CompBase *fgCompare; //!
const CompBase *GetCompare() const { return fgCompare; }
TLorentzVector P4();
ClassDef(Tower, 1)
};
//---------------------------------------------------------------------------
class Candidate: public SortableObject
{
friend class DelphesFactory;
public:
Candidate();
Int_t PID;
Int_t Status;
Int_t M1, M2, D1, D2;
Int_t Charge;
Float_t Mass;
Int_t IsPU;
Int_t IsConstituent;
UInt_t BTag;
UInt_t TauTag;
Float_t Eem;
Float_t Ehad;
Float_t Edges[4];
Float_t DeltaEta;
Float_t DeltaPhi;
TLorentzVector Momentum, Position, Area;
// PileUpJetID variables
Int_t NCharged;
Int_t NNeutrals;
Float_t Beta;
Float_t BetaStar;
Float_t MeanSqDeltaR;
Float_t PTD;
Float_t FracPt[5];
static CompBase *fgCompare; //!
const CompBase *GetCompare() const { return fgCompare; }
void AddCandidate(Candidate *object);
TObjArray *GetCandidates();
Bool_t Overlaps(const Candidate *object) const;
virtual void Copy(TObject &object) const;
virtual TObject *Clone(const char *newname = "") const;
virtual void Clear(Option_t* option = "");
private:
DelphesFactory *fFactory; //!
TObjArray *fArray; //!
void SetFactory(DelphesFactory *factory) { fFactory = factory; }
ClassDef(Candidate, 1)
};
#endif // DelphesClasses_h
| [
"jstupak@fnal.gov"
] | jstupak@fnal.gov |
37874a3432f30d0d6e97712f9d17ca0a0fd5e920 | 7f8b6d898d0f3a7927e20ae03240dce40bf07f2d | /백준/DFS/14501_퇴사.cpp | 2e70045762443de0d6076df1d605b7a811fe4c5e | [] | no_license | sihyun98/2020Algorithm | 0f08e1139a47d55188f9d2addc9b215533b4b19a | 19c9326e6c800a9e1b43725cbb275721807d0869 | refs/heads/master | 2020-12-12T11:19:01.209753 | 2020-10-15T18:07:14 | 2020-10-15T18:07:14 | 234,115,073 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 408 | cpp | #include <iostream>
using namespace std;
int time[15];
int pay[15];
int N;
int maximum = 0;
void profit(int d, int t) {
if (d >= N) {
if (maximum < t) {
maximum = t;
}
return;
}
if (d + time[d] <= N) {
profit(d + time[d], t + pay[d]);
}
profit(d + 1, t);
}
int main() {
cin >> N;
for (int i = 0; i < N; i++) {
cin >> time[i] >> pay[i];
}
profit(0, 0);
cout << maximum;
return 0;
} | [
"sihyun98@live.cau.ac.kr"
] | sihyun98@live.cau.ac.kr |
e1d8fc643967b8a7a369101c6d6d8ed8b5f3b46a | a137bb0777b323cd99166ed6c24f43008565eae7 | /network/C++/CoProcessor/CoProcessor/main.cpp | 816ada37afba082ffafab0fc74b66edaee8a1c43 | [] | no_license | MclvAdmin/Mclv2012 | 1ad963b5ac73c181fb50e94e4bdc56873a4d7347 | 8aea886f67d49b6fdbedbc1715debfd3d29f1c90 | refs/heads/master | 2020-04-13T18:17:47.595045 | 2012-02-14T05:34:14 | 2012-02-14T05:34:14 | 3,423,435 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,194 | cpp | #include <WinSock.h>
#include <Windows.h>
#include <iostream>
#include <list>
#include <deque>
#include <map>
#include <vector>
using namespace std;
bool _connected = false;
char* ip_address = "10.11.55.6";
int port = 1140;
//-----------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------
int pow2(int val){
int ans = 1;
for(int i = 0; i < val; ++i){
ans *= 2;
}
return ans;
}
#include "Packet.h"
//-----------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------
class NetObject{
public:
unsigned short address;
NetObject(unsigned char pwm){}
//IMPORTANT: ANY NETOBJECT METHODS MUST BE PROTOTYPED HERE BEFORE THEY CAN WORK
virtual void recieve(unsigned char* data){}
virtual void set(double val){}
virtual double getY(){return 0;}
virtual bool getButtonState(int val){return 0;}
};
map<unsigned short, NetObject*> _hardware_elements;
//-----------------------------------------------------------------------------------
#include "Network.h"
#include "Hardware.h"
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DWORD WINAPI start_server(LPVOID params){
_network_interface.SERVER();
return -1;
}
void init_hardware(){
//ASSIGN HARDWARE ADDRESSES HERE
new Joystick(1);
new Joystick(2);
//TWO GEESE WITH ONE STONE
for(int i = 1; i <= 4; ++i){
new Jaguar(i);
}
unsigned short p = 5;
p <<= 8;
p += 1;
while(1){
_hardware_elements[p]->getY();
Sleep(1000);
}
}
DWORD WINAPI DRIVE(LPVOID lpParam){
#define leftjoy 1
#define rightjoy 2
#define startjags 3 //THE DRIVE JAGS IN CONFIGURATION: LEFT LEFT RIGHT RIGHT
while(_connected){
double left = _hardware_elements[leftjoy]->getY();
double right = _hardware_elements[rightjoy]->getY();
for(int i = startjags; i <= startjags+1; ++i){
_hardware_elements[i]->set(left);
_hardware_elements[i+2]->set(right);
}
//RECORDING
bool _recording = false;
deque<double*> left_record, right_record;
while(_recording){
//@TODO: CLEAR ANY MEMORY PREVIOUSLY USED
while(!right_record.empty()){
free(left_record[0]);
free(right_record[0]);
left_record.pop_front();
right_record.pop_front();
}
double* d = (double*) calloc(1024, 8); // ENOUGH FOR 1024 DOUBLES
double* b = (double*) calloc(1024, 8); // MEMORY LEAK IF NOT CLEANED UP
left_record.push_back(d);
right_record.push_back(b);
for(int j = 0; j < 1024; ++j){
d[j] = _hardware_elements[leftjoy]->getY();
b[j] = _hardware_elements[rightjoy]->getY(); // 16 KB/s * 60 seconds = 960 KB per minute
//Sleep(20); ALREADY LIMITED BY GET METHODS
}
_recording = _hardware_elements[leftjoy]->getButtonState(1);
}
}
return 0;
}
int main(){
HANDLE _server_thread = CreateThread(NULL,0,start_server,NULL,0,NULL);
while(!_connected) Sleep(200); // WAIT FOR CLIENT
init_hardware(); //@TODO INITIALIZE OBJECTS *AFTER* CLIENT CONNECTION (and reinitialize after connection lost/reestablished
HANDLE heartbeat = CreateThread(0,0,HEARTBEAT,0,0,0);
//HANDLE _drive_thread = CreateThread(NULL,0,DRIVE,NULL,0,NULL);
/*
LARGE_INTEGER _count;
LARGE_INTEGER _freq; //Frequency of one second
QueryPerformanceFrequency(&_freq);
DWORD count = 0;
DWORD freq = _freq.LowPart;
DWORD _tStart = 0;
unsigned char ping[] = {5,0,0,0};
Packet status(ping);
while(1){
QueryPerformanceCounter(&_count);
count = _count.LowPart;
_tStart = count/freq;
cin.ignore();
unsigned char data[] = {3,1,1};
Packet temp(data);
int send = count;
temp.AddData(send);
Packet stat = status;
temp.Finalize();
stat.Finalize();
_network_interface.SendPacket(&temp);
_network_interface.SendPacket(&stat); //Automate the status packet send.
}*/
cout << "YO";
Sleep(999999);
} | [
"computeralex@gmail.com"
] | computeralex@gmail.com |
e357a08e0e9a0114680068d54a3f4aa0e3ca04b0 | 00192278a0fdaa820cdfb574347b9b3a1f9c56d7 | /include/ply/PlyTypes.hpp | 830a003e82635b20bd375a4025ee9548f82971af | [
"Apache-2.0"
] | permissive | jmitchell24/cpp-utility-lib | a27582d753a09e0bce68abd791c03e5c49f945cb | 76e7bae9f07b741c409a282604a999ab86fc0702 | refs/heads/master | 2021-01-12T16:33:23.274501 | 2017-01-07T21:51:25 | 2017-01-07T21:51:25 | 71,411,079 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 435 | hpp | #pragma once
#include "../string/Segment.hpp"
#include <iostream>
namespace util
{
namespace ply
{
typedef char Char;
typedef std::basic_string <Char> String;
typedef std::basic_ostream <Char> Ostream;
typedef std::basic_ofstream<Char> Ofstream;
typedef std::basic_ifstream<Char> Ifstream;
typedef SegmentT <Char> Segment;
typedef StringT <Char> SegString;
}
}
| [
"james.mitchell.dev@gmail.com"
] | james.mitchell.dev@gmail.com |
f90117e67ec7625e7d70020e2f808a932a28e6e7 | 3cdc68f3eee253db86ba630a07cabe4b0be99330 | /src/od-pandora/gui/EditFilesysHardfile.cpp | af430a6daa284c4a7ca5c134a87647d3f1247257 | [] | no_license | joolswills/uae4arm-rpi | 6e8bc3a73b9f7bcdbb79acd10443e94fe1ba3803 | c5610e7acdc9dbb6e969d65ae29476d1bea405aa | refs/heads/master | 2021-01-14T08:45:40.714258 | 2015-10-11T12:23:51 | 2015-10-11T12:23:51 | 44,225,049 | 0 | 0 | null | 2015-10-14T05:03:12 | 2015-10-14T05:03:12 | null | UTF-8 | C++ | false | false | 12,151 | cpp | #include <guichan.hpp>
#include <SDL/SDL_ttf.h>
#include <guichan/sdl.hpp>
#include "sdltruetypefont.hpp"
#include "SelectorEntry.hpp"
#include "UaeRadioButton.hpp"
#include "UaeDropDown.hpp"
#include "UaeCheckBox.hpp"
#include "sysconfig.h"
#include "sysdeps.h"
#include "config.h"
#include "options.h"
#include "memory.h"
#include "uae.h"
#include "autoconf.h"
#include "filesys.h"
#include "gui.h"
#include "target.h"
#include "gui_handling.h"
#define DIALOG_WIDTH 620
#define DIALOG_HEIGHT 242
static const char *harddisk_filter[] = { ".hdf", "\0" };
static bool dialogResult = false;
static bool dialogFinished = false;
static bool fileSelected = false;
static gcn::Window *wndEditFilesysHardfile;
static gcn::Button* cmdOK;
static gcn::Button* cmdCancel;
static gcn::Label *lblDevice;
static gcn::TextField *txtDevice;
static gcn::UaeCheckBox* chkReadWrite;
static gcn::UaeCheckBox* chkAutoboot;
static gcn::Label *lblBootPri;
static gcn::TextField *txtBootPri;
static gcn::Label *lblPath;
static gcn::TextField *txtPath;
static gcn::Button* cmdPath;
static gcn::Label *lblSurfaces;
static gcn::TextField *txtSurfaces;
static gcn::Label *lblReserved;
static gcn::TextField *txtReserved;
static gcn::Label *lblSectors;
static gcn::TextField *txtSectors;
static gcn::Label *lblBlocksize;
static gcn::TextField *txtBlocksize;
class FilesysHardfileActionListener : public gcn::ActionListener
{
public:
void action(const gcn::ActionEvent& actionEvent)
{
if(actionEvent.getSource() == cmdPath)
{
char tmp[MAX_PATH];
strncpy(tmp, txtPath->getText().c_str(), MAX_PATH);
wndEditFilesysHardfile->releaseModalFocus();
if(SelectFile("Select harddisk file", tmp, harddisk_filter))
{
txtPath->setText(tmp);
fileSelected = true;
}
wndEditFilesysHardfile->requestModalFocus();
cmdPath->requestFocus();
}
else
{
if (actionEvent.getSource() == cmdOK)
{
if(txtDevice->getText().length() <= 0)
{
wndEditFilesysHardfile->setCaption("Please enter a device name.");
return;
}
if(!fileSelected)
{
wndEditFilesysHardfile->setCaption("Please select a filename.");
return;
}
dialogResult = true;
}
dialogFinished = true;
}
}
};
static FilesysHardfileActionListener* filesysHardfileActionListener;
static void InitEditFilesysHardfile(void)
{
wndEditFilesysHardfile = new gcn::Window("Edit");
wndEditFilesysHardfile->setSize(DIALOG_WIDTH, DIALOG_HEIGHT);
wndEditFilesysHardfile->setPosition((GUI_WIDTH - DIALOG_WIDTH) / 2, (GUI_HEIGHT - DIALOG_HEIGHT) / 2);
wndEditFilesysHardfile->setBaseColor(gui_baseCol + 0x202020);
wndEditFilesysHardfile->setCaption("Volume settings");
wndEditFilesysHardfile->setTitleBarHeight(TITLEBAR_HEIGHT);
filesysHardfileActionListener = new FilesysHardfileActionListener();
cmdOK = new gcn::Button("Ok");
cmdOK->setSize(BUTTON_WIDTH, BUTTON_HEIGHT);
cmdOK->setPosition(DIALOG_WIDTH - DISTANCE_BORDER - 2 * BUTTON_WIDTH - DISTANCE_NEXT_X, DIALOG_HEIGHT - 2 * DISTANCE_BORDER - BUTTON_HEIGHT - 10);
cmdOK->setBaseColor(gui_baseCol + 0x202020);
cmdOK->setId("hdfOK");
cmdOK->addActionListener(filesysHardfileActionListener);
cmdCancel = new gcn::Button("Cancel");
cmdCancel->setSize(BUTTON_WIDTH, BUTTON_HEIGHT);
cmdCancel->setPosition(DIALOG_WIDTH - DISTANCE_BORDER - BUTTON_WIDTH, DIALOG_HEIGHT - 2 * DISTANCE_BORDER - BUTTON_HEIGHT - 10);
cmdCancel->setBaseColor(gui_baseCol + 0x202020);
cmdCancel->setId("hdfCancel");
cmdCancel->addActionListener(filesysHardfileActionListener);
lblDevice = new gcn::Label("Device Name:");
lblDevice->setSize(100, LABEL_HEIGHT);
lblDevice->setAlignment(gcn::Graphics::RIGHT);
txtDevice = new gcn::TextField();
txtDevice->setSize(80, TEXTFIELD_HEIGHT);
txtDevice->setId("hdfDev");
chkReadWrite = new gcn::UaeCheckBox("Read/Write", true);
chkReadWrite->setId("hdfRW");
chkAutoboot = new gcn::UaeCheckBox("Bootable", true);
chkAutoboot->setId("hdfAutoboot");
lblBootPri = new gcn::Label("Boot priority:");
lblBootPri->setSize(100, LABEL_HEIGHT);
lblBootPri->setAlignment(gcn::Graphics::RIGHT);
txtBootPri = new gcn::TextField();
txtBootPri->setSize(40, TEXTFIELD_HEIGHT);
txtBootPri->setId("hdfBootPri");
lblSurfaces = new gcn::Label("Surfaces:");
lblSurfaces->setSize(100, LABEL_HEIGHT);
lblSurfaces->setAlignment(gcn::Graphics::RIGHT);
txtSurfaces = new gcn::TextField();
txtSurfaces->setSize(40, TEXTFIELD_HEIGHT);
txtSurfaces->setId("hdfSurface");
lblReserved = new gcn::Label("Reserved:");
lblReserved->setSize(100, LABEL_HEIGHT);
lblReserved->setAlignment(gcn::Graphics::RIGHT);
txtReserved = new gcn::TextField();
txtReserved->setSize(40, TEXTFIELD_HEIGHT);
txtReserved->setId("hdfReserved");
lblSectors = new gcn::Label("Sectors:");
lblSectors->setSize(100, LABEL_HEIGHT);
lblSectors->setAlignment(gcn::Graphics::RIGHT);
txtSectors = new gcn::TextField();
txtSectors->setSize(40, TEXTFIELD_HEIGHT);
txtSectors->setId("hdfSectors");
lblBlocksize = new gcn::Label("Blocksize:");
lblBlocksize->setSize(100, LABEL_HEIGHT);
lblBlocksize->setAlignment(gcn::Graphics::RIGHT);
txtBlocksize = new gcn::TextField();
txtBlocksize->setSize(40, TEXTFIELD_HEIGHT);
txtBlocksize->setId("hdfBlocksize");
lblPath = new gcn::Label("Path:");
lblPath->setSize(100, LABEL_HEIGHT);
lblPath->setAlignment(gcn::Graphics::RIGHT);
txtPath = new gcn::TextField();
txtPath->setSize(438, TEXTFIELD_HEIGHT);
txtPath->setEnabled(false);
cmdPath = new gcn::Button("...");
cmdPath->setSize(SMALL_BUTTON_WIDTH, SMALL_BUTTON_HEIGHT);
cmdPath->setBaseColor(gui_baseCol + 0x202020);
cmdPath->setId("hdfPath");
cmdPath->addActionListener(filesysHardfileActionListener);
int posY = DISTANCE_BORDER;
wndEditFilesysHardfile->add(lblDevice, DISTANCE_BORDER, posY);
wndEditFilesysHardfile->add(txtDevice, DISTANCE_BORDER + lblDevice->getWidth() + 8, posY);
wndEditFilesysHardfile->add(chkReadWrite, 235, posY + 1);
wndEditFilesysHardfile->add(chkAutoboot, 360, posY + 1);
wndEditFilesysHardfile->add(lblBootPri, 460, posY);
wndEditFilesysHardfile->add(txtBootPri, 460 + lblBootPri->getWidth() + 8, posY);
posY += txtDevice->getHeight() + DISTANCE_NEXT_Y;
wndEditFilesysHardfile->add(lblPath, DISTANCE_BORDER, posY);
wndEditFilesysHardfile->add(txtPath, DISTANCE_BORDER + lblPath->getWidth() + 8, posY);
wndEditFilesysHardfile->add(cmdPath, wndEditFilesysHardfile->getWidth() - DISTANCE_BORDER - SMALL_BUTTON_WIDTH, posY);
posY += txtPath->getHeight() + DISTANCE_NEXT_Y;
wndEditFilesysHardfile->add(lblSurfaces, DISTANCE_BORDER, posY);
wndEditFilesysHardfile->add(txtSurfaces, DISTANCE_BORDER + lblSurfaces->getWidth() + 8, posY);
wndEditFilesysHardfile->add(lblReserved, 240, posY);
wndEditFilesysHardfile->add(txtReserved, 240 + lblReserved->getWidth() + 8, posY);
posY += txtSurfaces->getHeight() + DISTANCE_NEXT_Y;
wndEditFilesysHardfile->add(lblSectors, DISTANCE_BORDER, posY);
wndEditFilesysHardfile->add(txtSectors, DISTANCE_BORDER + lblSectors->getWidth() + 8, posY);
wndEditFilesysHardfile->add(lblBlocksize, 240, posY);
wndEditFilesysHardfile->add(txtBlocksize, 240 + lblBlocksize->getWidth() + 8, posY);
posY += txtSectors->getHeight() + DISTANCE_NEXT_Y;
wndEditFilesysHardfile->add(cmdOK);
wndEditFilesysHardfile->add(cmdCancel);
gui_top->add(wndEditFilesysHardfile);
txtDevice->requestFocus();
wndEditFilesysHardfile->requestModalFocus();
}
static void ExitEditFilesysHardfile(void)
{
wndEditFilesysHardfile->releaseModalFocus();
gui_top->remove(wndEditFilesysHardfile);
delete lblDevice;
delete txtDevice;
delete chkReadWrite;
delete chkAutoboot;
delete lblBootPri;
delete txtBootPri;
delete lblPath;
delete txtPath;
delete cmdPath;
delete lblSurfaces;
delete txtSurfaces;
delete lblReserved;
delete txtReserved;
delete lblSectors;
delete txtSectors;
delete lblBlocksize;
delete txtBlocksize;
delete cmdOK;
delete cmdCancel;
delete filesysHardfileActionListener;
delete wndEditFilesysHardfile;
}
static void EditFilesysHardfileLoop(void)
{
while(!dialogFinished)
{
SDL_Event event;
while(SDL_PollEvent(&event))
{
if (event.type == SDL_KEYDOWN)
{
switch(event.key.keysym.sym)
{
case SDLK_ESCAPE:
dialogFinished = true;
break;
case SDLK_UP:
if(HandleNavigation(DIRECTION_UP))
continue; // Don't change value when enter ComboBox -> don't send event to control
break;
case SDLK_DOWN:
if(HandleNavigation(DIRECTION_DOWN))
continue; // Don't change value when enter ComboBox -> don't send event to control
break;
case SDLK_LEFT:
if(HandleNavigation(DIRECTION_LEFT))
continue; // Don't change value when enter Slider -> don't send event to control
break;
case SDLK_RIGHT:
if(HandleNavigation(DIRECTION_RIGHT))
continue; // Don't change value when enter Slider -> don't send event to control
break;
case SDLK_PAGEDOWN:
case SDLK_HOME:
event.key.keysym.sym = SDLK_RETURN;
gui_input->pushInput(event); // Fire key down
event.type = SDL_KEYUP; // and the key up
break;
}
}
//-------------------------------------------------
// Send event to guichan-controls
//-------------------------------------------------
gui_input->pushInput(event);
}
// Now we let the Gui object perform its logic.
uae_gui->logic();
// Now we let the Gui object draw itself.
uae_gui->draw();
// Finally we update the screen.
SDL_Flip(gui_screen);
}
}
bool EditFilesysHardfile(int unit_no)
{
struct mountedinfo mi;
struct uaedev_config_info *uci = &changed_prefs.mountconfig[unit_no];
std::string strdevname, strroot;
char tmp[32];
dialogResult = false;
dialogFinished = false;
InitEditFilesysHardfile();
if(unit_no >= 0)
{
get_filesys_unitconfig(&changed_prefs, unit_no, &mi);
strdevname.assign(uci->devname);
txtDevice->setText(strdevname);
strroot.assign(uci->rootdir);
txtPath->setText(strroot);
fileSelected = true;
chkReadWrite->setSelected(!uci->readonly);
chkAutoboot->setSelected(uci->bootpri != -128);
snprintf(tmp, 32, "%d", uci->bootpri >= -127 ? uci->bootpri : -127);
txtBootPri->setText(tmp);
snprintf(tmp, 32, "%d", uci->surfaces);
txtSurfaces->setText(tmp);
snprintf(tmp, 32, "%d", uci->reserved);
txtReserved->setText(tmp);
snprintf(tmp, 32, "%d", uci->sectors);
txtSectors->setText(tmp);
snprintf(tmp, 32, "%d", uci->blocksize);
txtBlocksize->setText(tmp);
}
else
{
CreateDefaultDevicename(tmp);
txtDevice->setText(tmp);
strroot.assign(currentDir);
txtPath->setText(strroot);
fileSelected = false;
chkReadWrite->setSelected(true);
txtBootPri->setText("0");
txtSurfaces->setText("1");
txtReserved->setText("2");
txtSectors->setText("32");
txtBlocksize->setText("512");
}
EditFilesysHardfileLoop();
ExitEditFilesysHardfile();
if(dialogResult)
{
int bp = tweakbootpri(atoi(txtBootPri->getText().c_str()), chkAutoboot->isSelected() ? 1 : 0, 0);
extractPath((char *) txtPath->getText().c_str(), currentDir);
uci = add_filesys_config(&changed_prefs, unit_no, (char *) txtDevice->getText().c_str(),
0, (char *) txtPath->getText().c_str(), !chkReadWrite->isSelected(),
atoi(txtSectors->getText().c_str()), atoi(txtSurfaces->getText().c_str()),
atoi(txtReserved->getText().c_str()), atoi(txtBlocksize->getText().c_str()),
bp, 0, 0, 0);
if (uci)
hardfile_do_disk_change (uci->configoffset, 1);
}
return dialogResult;
}
| [
"darcelf@gmail.com"
] | darcelf@gmail.com |
589e311c5c3c82c00b5710744519a8a570b0b127 | 8af4126a93b7227bcf82037c98982a62fadfd847 | /include/google/protobuf/stubs/port.h | 328258b7c052e7a9e07f63c4681eefde97b135cf | [
"MIT"
] | permissive | Elkantor/sc2_project_bot | c93fe37c1399871b468b7eacc906748ec79a3bf6 | b66506e8329511a215f944abcb695cc373bfebfe | refs/heads/master | 2020-04-10T14:02:46.502354 | 2018-03-23T14:10:17 | 2018-03-23T14:10:17 | 124,276,724 | 0 | 1 | MIT | 2018-03-23T13:11:06 | 2018-03-07T18:22:09 | C++ | UTF-8 | C++ | false | false | 12,504 | h | // Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// 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 Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// 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.
#ifndef GOOGLE_PROTOBUF_STUBS_PORT_H_
#define GOOGLE_PROTOBUF_STUBS_PORT_H_
#include <assert.h>
#include <stdlib.h>
#include <cstddef>
#include <string>
#include <string.h>
#if defined(__osf__)
// Tru64 lacks stdint.h, but has inttypes.h which defines a superset of
// what stdint.h would define.
#include <inttypes.h>
#elif !defined(_MSC_VER)
#include <stdint.h>
#endif
#undef PROTOBUF_LITTLE_ENDIAN
#ifdef _WIN32
// Assuming windows is always little-endian.
// TODO(xiaofeng): The PROTOBUF_LITTLE_ENDIAN is not only used for
// optimization but also for correctness. We should define an
// different macro to test the big-endian code path in coded_stream.
#if !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
#define PROTOBUF_LITTLE_ENDIAN 1
#endif
#if _MSC_VER >= 1300 && !defined(__INTEL_COMPILER)
// If MSVC has "/RTCc" set, it will complain about truncating casts at
// runtime. This file contains some intentional truncating casts.
#pragma runtime_checks("c", off)
#endif
#else
#include <sys/param.h> // __BYTE_ORDER
#if ((defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)) || \
(defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN)) && \
!defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
#define PROTOBUF_LITTLE_ENDIAN 1
#endif
#endif
#if defined(_MSC_VER) && defined(PROTOBUF_USE_DLLS)
#ifdef LIBPROTOBUF_EXPORTS
#define LIBPROTOBUF_EXPORT __declspec(dllexport)
#else
#define LIBPROTOBUF_EXPORT __declspec(dllimport)
#endif
#ifdef LIBPROTOC_EXPORTS
#define LIBPROTOC_EXPORT __declspec(dllexport)
#else
#define LIBPROTOC_EXPORT __declspec(dllimport)
#endif
#else
#define LIBPROTOBUF_EXPORT
#define LIBPROTOC_EXPORT
#endif
// These #includes are for the byte swap functions declared later on.
#ifdef _MSC_VER
#include <stdlib.h> // NOLINT(build/include)
#elif defined(__APPLE__)
#include <libkern/OSByteOrder.h>
#elif defined(__GLIBC__) || defined(__CYGWIN__)
#include <byteswap.h> // IWYU pragma: export
#endif
// ===================================================================
// from google3/base/port.h
namespace google {
namespace protobuf {
typedef unsigned int uint;
#ifdef _MSC_VER
typedef signed __int8 int8;
typedef __int16 int16;
typedef __int32 int32;
typedef __int64 int64;
typedef unsigned __int8 uint8;
typedef unsigned __int16 uint16;
typedef unsigned __int32 uint32;
typedef unsigned __int64 uint64;
#else
typedef signed char int8;
typedef short int16;
typedef int int32;
typedef long long int64;
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int uint32;
typedef unsigned long long uint64;
#endif
// long long macros to be used because gcc and vc++ use different suffixes,
// and different size specifiers in format strings
#undef GOOGLE_LONGLONG
#undef GOOGLE_ULONGLONG
#undef GOOGLE_LL_FORMAT
#ifdef _MSC_VER
#define GOOGLE_LONGLONG(x) x##I64
#define GOOGLE_ULONGLONG(x) x##UI64
#define GOOGLE_LL_FORMAT "I64" // As in printf("%I64d", ...)
#else
#define GOOGLE_LONGLONG(x) x##LL
#define GOOGLE_ULONGLONG(x) x##ULL
#define GOOGLE_LL_FORMAT "ll" // As in "%lld". Note that "q" is poor form also.
#endif
static const int32 kint32max = 0x7FFFFFFF;
static const int32 kint32min = -kint32max - 1;
static const int64 kint64max = GOOGLE_LONGLONG(0x7FFFFFFFFFFFFFFF);
static const int64 kint64min = -kint64max - 1;
static const uint32 kuint32max = 0xFFFFFFFFu;
static const uint64 kuint64max = GOOGLE_ULONGLONG(0xFFFFFFFFFFFFFFFF);
// -------------------------------------------------------------------
// Annotations: Some parts of the code have been annotated in ways that might
// be useful to some compilers or tools, but are not supported universally.
// You can #define these annotations yourself if the default implementation
// is not right for you.
#ifndef GOOGLE_ATTRIBUTE_ALWAYS_INLINE
#if defined(__GNUC__) && (__GNUC__ > 3 ||(__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
// For functions we want to force inline.
// Introduced in gcc 3.1.
#define GOOGLE_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((always_inline))
#else
// Other compilers will have to figure it out for themselves.
#define GOOGLE_ATTRIBUTE_ALWAYS_INLINE
#endif
#endif
#ifndef GOOGLE_ATTRIBUTE_NOINLINE
#if defined(__GNUC__) && (__GNUC__ > 3 ||(__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
// For functions we want to force not inline.
// Introduced in gcc 3.1.
#define GOOGLE_ATTRIBUTE_NOINLINE __attribute__ ((noinline))
#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
// Seems to have been around since at least Visual Studio 2005
#define GOOGLE_ATTRIBUTE_NOINLINE __declspec(noinline)
#else
// Other compilers will have to figure it out for themselves.
#define GOOGLE_ATTRIBUTE_NOINLINE
#endif
#endif
#ifndef GOOGLE_ATTRIBUTE_NORETURN
#ifdef __GNUC__
// Tell the compiler that a given function never returns.
#define GOOGLE_ATTRIBUTE_NORETURN __attribute__((noreturn))
#else
#define GOOGLE_ATTRIBUTE_NORETURN
#endif
#endif
#ifndef GOOGLE_ATTRIBUTE_DEPRECATED
#ifdef __GNUC__
// If the method/variable/type is used anywhere, produce a warning.
#define GOOGLE_ATTRIBUTE_DEPRECATED __attribute__((deprecated))
#else
#define GOOGLE_ATTRIBUTE_DEPRECATED
#endif
#endif
#ifndef GOOGLE_PREDICT_TRUE
#ifdef __GNUC__
// Provided at least since GCC 3.0.
#define GOOGLE_PREDICT_TRUE(x) (__builtin_expect(!!(x), 1))
#else
#define GOOGLE_PREDICT_TRUE(x) (x)
#endif
#endif
#ifndef GOOGLE_PREDICT_FALSE
#ifdef __GNUC__
// Provided at least since GCC 3.0.
#define GOOGLE_PREDICT_FALSE(x) (__builtin_expect(x, 0))
#else
#define GOOGLE_PREDICT_FALSE(x) (x)
#endif
#endif
// Delimits a block of code which may write to memory which is simultaneously
// written by other threads, but which has been determined to be thread-safe
// (e.g. because it is an idempotent write).
#ifndef GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN
#define GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN()
#endif
#ifndef GOOGLE_SAFE_CONCURRENT_WRITES_END
#define GOOGLE_SAFE_CONCURRENT_WRITES_END()
#endif
#if defined(__clang__) && defined(__has_cpp_attribute) \
&& !defined(GOOGLE_PROTOBUF_OS_APPLE)
# if defined(GOOGLE_PROTOBUF_OS_NACL) || defined(EMSCRIPTEN) || \
__has_cpp_attribute(clang::fallthrough)
# define GOOGLE_FALLTHROUGH_INTENDED [[clang::fallthrough]]
# endif
#endif
#ifndef GOOGLE_FALLTHROUGH_INTENDED
# define GOOGLE_FALLTHROUGH_INTENDED
#endif
#define GOOGLE_GUARDED_BY(x)
#define GOOGLE_ATTRIBUTE_COLD
// x86 and x86-64 can perform unaligned loads/stores directly.
#if defined(_M_X64) || defined(__x86_64__) || \
defined(_M_IX86) || defined(__i386__)
#define GOOGLE_UNALIGNED_LOAD16(_p) (*reinterpret_cast<const uint16 *>(_p))
#define GOOGLE_UNALIGNED_LOAD32(_p) (*reinterpret_cast<const uint32 *>(_p))
#define GOOGLE_UNALIGNED_LOAD64(_p) (*reinterpret_cast<const uint64 *>(_p))
#define GOOGLE_UNALIGNED_STORE16(_p, _val) (*reinterpret_cast<uint16 *>(_p) = (_val))
#define GOOGLE_UNALIGNED_STORE32(_p, _val) (*reinterpret_cast<uint32 *>(_p) = (_val))
#define GOOGLE_UNALIGNED_STORE64(_p, _val) (*reinterpret_cast<uint64 *>(_p) = (_val))
#else
inline uint16 GOOGLE_UNALIGNED_LOAD16(const void *p) {
uint16 t;
memcpy(&t, p, sizeof t);
return t;
}
inline uint32 GOOGLE_UNALIGNED_LOAD32(const void *p) {
uint32 t;
memcpy(&t, p, sizeof t);
return t;
}
inline uint64 GOOGLE_UNALIGNED_LOAD64(const void *p) {
uint64 t;
memcpy(&t, p, sizeof t);
return t;
}
inline void GOOGLE_UNALIGNED_STORE16(void *p, uint16 v) {
memcpy(p, &v, sizeof v);
}
inline void GOOGLE_UNALIGNED_STORE32(void *p, uint32 v) {
memcpy(p, &v, sizeof v);
}
inline void GOOGLE_UNALIGNED_STORE64(void *p, uint64 v) {
memcpy(p, &v, sizeof v);
}
#endif
#if defined(_MSC_VER)
#define GOOGLE_THREAD_LOCAL __declspec(thread)
#else
#define GOOGLE_THREAD_LOCAL __thread
#endif
// The following guarantees declaration of the byte swap functions.
#ifdef _MSC_VER
#define bswap_16(x) _byteswap_ushort(x)
#define bswap_32(x) _byteswap_ulong(x)
#define bswap_64(x) _byteswap_uint64(x)
#elif defined(__APPLE__)
// Mac OS X / Darwin features
#define bswap_16(x) OSSwapInt16(x)
#define bswap_32(x) OSSwapInt32(x)
#define bswap_64(x) OSSwapInt64(x)
#elif !defined(__GLIBC__) && !defined(__CYGWIN__)
static inline uint16 bswap_16(uint16 x) {
return static_cast<uint16>(((x & 0xFF) << 8) | ((x & 0xFF00) >> 8));
}
#define bswap_16(x) bswap_16(x)
static inline uint32 bswap_32(uint32 x) {
return (((x & 0xFF) << 24) |
((x & 0xFF00) << 8) |
((x & 0xFF0000) >> 8) |
((x & 0xFF000000) >> 24));
}
#define bswap_32(x) bswap_32(x)
static inline uint64 bswap_64(uint64 x) {
return (((x & GOOGLE_ULONGLONG(0xFF)) << 56) |
((x & GOOGLE_ULONGLONG(0xFF00)) << 40) |
((x & GOOGLE_ULONGLONG(0xFF0000)) << 24) |
((x & GOOGLE_ULONGLONG(0xFF000000)) << 8) |
((x & GOOGLE_ULONGLONG(0xFF00000000)) >> 8) |
((x & GOOGLE_ULONGLONG(0xFF0000000000)) >> 24) |
((x & GOOGLE_ULONGLONG(0xFF000000000000)) >> 40) |
((x & GOOGLE_ULONGLONG(0xFF00000000000000)) >> 56));
}
#define bswap_64(x) bswap_64(x)
#endif
// ===================================================================
// from google3/util/endian/endian.h
LIBPROTOBUF_EXPORT uint32 ghtonl(uint32 x);
class BigEndian {
public:
#ifdef PROTOBUF_LITTLE_ENDIAN
static uint16 FromHost16(uint16 x) { return bswap_16(x); }
static uint16 ToHost16(uint16 x) { return bswap_16(x); }
static uint32 FromHost32(uint32 x) { return bswap_32(x); }
static uint32 ToHost32(uint32 x) { return bswap_32(x); }
static uint64 FromHost64(uint64 x) { return bswap_64(x); }
static uint64 ToHost64(uint64 x) { return bswap_64(x); }
static bool IsLittleEndian() { return true; }
#else
static uint16 FromHost16(uint16 x) { return x; }
static uint16 ToHost16(uint16 x) { return x; }
static uint32 FromHost32(uint32 x) { return x; }
static uint32 ToHost32(uint32 x) { return x; }
static uint64 FromHost64(uint64 x) { return x; }
static uint64 ToHost64(uint64 x) { return x; }
static bool IsLittleEndian() { return false; }
#endif /* ENDIAN */
// Functions to do unaligned loads and stores in big-endian order.
static uint16 Load16(const void *p) {
return ToHost16(GOOGLE_UNALIGNED_LOAD16(p));
}
static void Store16(void *p, uint16 v) {
GOOGLE_UNALIGNED_STORE16(p, FromHost16(v));
}
static uint32 Load32(const void *p) {
return ToHost32(GOOGLE_UNALIGNED_LOAD32(p));
}
static void Store32(void *p, uint32 v) {
GOOGLE_UNALIGNED_STORE32(p, FromHost32(v));
}
static uint64 Load64(const void *p) {
return ToHost64(GOOGLE_UNALIGNED_LOAD64(p));
}
static void Store64(void *p, uint64 v) {
GOOGLE_UNALIGNED_STORE64(p, FromHost64(v));
}
};
} // namespace protobuf
} // namespace google
#endif // GOOGLE_PROTOBUF_STUBS_PORT_H_
| [
"vic03@live.fr"
] | vic03@live.fr |
91cd89eb8f5606be742541a642a9818cebd15ea5 | 6e9e14744f8a4a3a7d8b9369a82c31cb3f0e55c0 | /Other/ecs/Manager/Settings.hpp | 293ae3e94311483dd15d9faf11f58b1c00bae546 | [
"AFL-3.0",
"AFL-2.1",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | laiyierjiangsu/cppcon2015 | 0f20f97be77534f4f2845b14c09c1f742a8c41b5 | 870f600af729af1400b06f64eeabfb9f9d30a19e | refs/heads/master | 2021-01-23T14:15:56.653940 | 2017-09-07T02:50:59 | 2017-09-07T02:50:59 | 102,681,861 | 0 | 0 | null | 2017-09-07T02:31:56 | 2017-09-07T02:31:56 | null | UTF-8 | C++ | false | false | 3,063 | hpp | #pragma once
#include <bitset>
#include "../../ecs/Core/Core.hpp"
#include "../../ecs/Traits/Traits.hpp"
#include "../../ecs/Elements/Elements.hpp"
#include "../../ecs/Config/Config.hpp"
namespace ecs
{
namespace Impl
{
enum class CacheSettings
{
UseCache,
DontUseCache
};
template <typename TComponentConfig, typename TSignatureConfig,
typename TSystemConfig = SystemConfig<>,
typename TTagConfig = TagConfig<>,
CacheSettings TCacheSettings = CacheSettings::DontUseCache>
struct Settings final : Traits::SettingsTag
{
static_assert(Traits::IsComponentConfig<TComponentConfig>{}, "");
static_assert(Traits::IsSignatureConfig<TSignatureConfig>{}, "");
static_assert(Traits::IsSystemConfig<TSystemConfig>{}, "");
static_assert(Traits::IsTagConfig<TTagConfig>{}, "");
using ComponentConfig = TComponentConfig;
using SignatureConfig = TSignatureConfig;
using SystemConfig = TSystemConfig;
using TagConfig = TTagConfig;
static constexpr bool useCache{
TCacheSettings == CacheSettings::UseCache};
static constexpr std::size_t componentCount{
ComponentConfig::componentCount};
static constexpr std::size_t tagCount{TagConfig::tagCount};
static constexpr std::size_t bitCount{componentCount + tagCount};
// TODO: constexpr bitset for signatures
using EntityBitset = std::bitset<bitCount>;
static constexpr float growMultiplier{2.f};
static constexpr std::size_t growAmount{5};
template <typename TComponent>
static constexpr auto getComponentTypeID() noexcept
{
return ComponentConfig::template getComponentTypeID<
TComponent>();
}
/*template<typename TSignature>
static constexpr auto getSignatureTypeID() noexcept
{
static_assert(Traits::IsSignature<TSignature>{}, "");
return SignatureConfig::template
getSignatureTypeID<TSignature>();
}*/
template <template <typename> class TSystem>
static constexpr auto getSystemTypeID() noexcept
{
return SystemConfig::template getSystemTypeID<TSystem>();
}
template <typename TTag>
static constexpr auto getTagTypeID() noexcept
{
return TagConfig::template getTagTypeID<TTag>();
}
template <typename TComponent>
static constexpr auto getComponentBit() noexcept
{
return getComponentTypeID<TComponent>();
}
template <typename TTag>
static constexpr auto getTagBit() noexcept
{
return componentCount + getTagTypeID<TTag>();
}
};
}
} | [
"vittorio.romeo@outlook.com"
] | vittorio.romeo@outlook.com |
65190637f4a7ec94df9176e4a8ef628c354a78b6 | f53da1d0c7bcff51d05f64db69c26363bc9f386c | /src/protocol.cpp | fe738a57fdac98a82b15a1e49ba0264c4d731417 | [
"MIT"
] | permissive | SafeNodeNetwork/safenode | e550ac16316577537872924fa62204e280aef519 | 72c830f7eeb59b9c5c959a2745da9d37471a27a7 | refs/heads/master | 2020-03-16T11:16:16.358309 | 2018-05-08T18:44:21 | 2018-05-08T18:44:21 | 132,645,279 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,887 | cpp | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "protocol.h"
#include "util.h"
#include "utilstrencodings.h"
#ifndef WIN32
# include <arpa/inet.h>
#endif
namespace NetMsgType {
const char *VERSION="version";
const char *VERACK="verack";
const char *ADDR="addr";
const char *INV="inv";
const char *GETDATA="getdata";
const char *MERKLEBLOCK="merkleblock";
const char *GETBLOCKS="getblocks";
const char *GETHEADERS="getheaders";
const char *TX="tx";
const char *HEADERS="headers";
const char *BLOCK="block";
const char *GETADDR="getaddr";
const char *MEMPOOL="mempool";
const char *PING="ping";
const char *PONG="pong";
const char *ALERT="alert";
const char *NOTFOUND="notfound";
const char *FILTERLOAD="filterload";
const char *FILTERADD="filteradd";
const char *FILTERCLEAR="filterclear";
const char *REJECT="reject";
const char *SENDHEADERS="sendheaders";
// SafeNode message types
const char *TXLOCKREQUEST="ix";
const char *TXLOCKVOTE="txlvote";
const char *SPORK="spork";
const char *GETSPORKS="getsporks";
const char *SAFENODEPAYMENTVOTE="mnw";
const char *SAFENODEPAYMENTBLOCK="mnwb";
const char *SAFENODEPAYMENTSYNC="mnget";
const char *MNBUDGETSYNC="mnvs"; // depreciated since 12.1
const char *MNBUDGETVOTE="mvote"; // depreciated since 12.1
const char *MNBUDGETPROPOSAL="mprop"; // depreciated since 12.1
const char *MNBUDGETFINAL="fbs"; // depreciated since 12.1
const char *MNBUDGETFINALVOTE="fbvote"; // depreciated since 12.1
const char *MNQUORUM="mn quorum"; // not implemented
const char *MNANNOUNCE="mnb";
const char *MNPING="mnp";
const char *DSACCEPT="dsa";
const char *DSVIN="dsi";
const char *DSFINALTX="dsf";
const char *DSSIGNFINALTX="dss";
const char *DSCOMPLETE="dsc";
const char *DSSTATUSUPDATE="dssu";
const char *DSTX="dstx";
const char *DSQUEUE="dsq";
const char *DSEG="dseg";
const char *SYNCSTATUSCOUNT="ssc";
const char *MNGOVERNANCESYNC="govsync";
const char *MNGOVERNANCEOBJECT="govobj";
const char *MNGOVERNANCEOBJECTVOTE="govobjvote";
const char *MNVERIFY="mnv";
};
static const char* ppszTypeName[] =
{
"ERROR", // Should never occur
NetMsgType::TX,
NetMsgType::BLOCK,
"filtered block", // Should never occur
// SafeNode message types
// NOTE: include non-implmented here, we must keep this list in sync with enum in protocol.h
NetMsgType::TXLOCKREQUEST,
NetMsgType::TXLOCKVOTE,
NetMsgType::SPORK,
NetMsgType::SAFENODEPAYMENTVOTE,
NetMsgType::SAFENODEPAYMENTBLOCK, // reusing, was MNSCANERROR previousely, was NOT used in 12.0, we need this for inv
NetMsgType::MNBUDGETVOTE, // depreciated since 12.1
NetMsgType::MNBUDGETPROPOSAL, // depreciated since 12.1
NetMsgType::MNBUDGETFINAL, // depreciated since 12.1
NetMsgType::MNBUDGETFINALVOTE, // depreciated since 12.1
NetMsgType::MNQUORUM, // not implemented
NetMsgType::MNANNOUNCE,
NetMsgType::MNPING,
NetMsgType::DSTX,
NetMsgType::MNGOVERNANCEOBJECT,
NetMsgType::MNGOVERNANCEOBJECTVOTE,
NetMsgType::MNVERIFY,
};
/** All known message types. Keep this in the same order as the list of
* messages above and in protocol.h.
*/
const static std::string allNetMessageTypes[] = {
NetMsgType::VERSION,
NetMsgType::VERACK,
NetMsgType::ADDR,
NetMsgType::INV,
NetMsgType::GETDATA,
NetMsgType::MERKLEBLOCK,
NetMsgType::GETBLOCKS,
NetMsgType::GETHEADERS,
NetMsgType::TX,
NetMsgType::HEADERS,
NetMsgType::BLOCK,
NetMsgType::GETADDR,
NetMsgType::MEMPOOL,
NetMsgType::PING,
NetMsgType::PONG,
NetMsgType::ALERT,
NetMsgType::NOTFOUND,
NetMsgType::FILTERLOAD,
NetMsgType::FILTERADD,
NetMsgType::FILTERCLEAR,
NetMsgType::REJECT,
NetMsgType::SENDHEADERS,
// SafeNode message types
// NOTE: do NOT include non-implmented here, we want them to be "Unknown command" in ProcessMessage()
NetMsgType::TXLOCKREQUEST,
NetMsgType::TXLOCKVOTE,
NetMsgType::SPORK,
NetMsgType::GETSPORKS,
NetMsgType::SAFENODEPAYMENTVOTE,
// NetMsgType::SAFENODEPAYMENTBLOCK, // there is no message for this, only inventory
NetMsgType::SAFENODEPAYMENTSYNC,
NetMsgType::MNANNOUNCE,
NetMsgType::MNPING,
NetMsgType::DSACCEPT,
NetMsgType::DSVIN,
NetMsgType::DSFINALTX,
NetMsgType::DSSIGNFINALTX,
NetMsgType::DSCOMPLETE,
NetMsgType::DSSTATUSUPDATE,
NetMsgType::DSTX,
NetMsgType::DSQUEUE,
NetMsgType::DSEG,
NetMsgType::SYNCSTATUSCOUNT,
NetMsgType::MNGOVERNANCESYNC,
NetMsgType::MNGOVERNANCEOBJECT,
NetMsgType::MNGOVERNANCEOBJECTVOTE,
NetMsgType::MNVERIFY,
};
const static std::vector<std::string> allNetMessageTypesVec(allNetMessageTypes, allNetMessageTypes+ARRAYLEN(allNetMessageTypes));
CMessageHeader::CMessageHeader(const MessageStartChars& pchMessageStartIn)
{
memcpy(pchMessageStart, pchMessageStartIn, MESSAGE_START_SIZE);
memset(pchCommand, 0, sizeof(pchCommand));
nMessageSize = -1;
nChecksum = 0;
}
CMessageHeader::CMessageHeader(const MessageStartChars& pchMessageStartIn, const char* pszCommand, unsigned int nMessageSizeIn)
{
memcpy(pchMessageStart, pchMessageStartIn, MESSAGE_START_SIZE);
memset(pchCommand, 0, sizeof(pchCommand));
strncpy(pchCommand, pszCommand, COMMAND_SIZE);
nMessageSize = nMessageSizeIn;
nChecksum = 0;
}
std::string CMessageHeader::GetCommand() const
{
return std::string(pchCommand, pchCommand + strnlen(pchCommand, COMMAND_SIZE));
}
bool CMessageHeader::IsValid(const MessageStartChars& pchMessageStartIn) const
{
// Check start string
if (memcmp(pchMessageStart, pchMessageStartIn, MESSAGE_START_SIZE) != 0)
return false;
// Check the command string for errors
for (const char* p1 = pchCommand; p1 < pchCommand + COMMAND_SIZE; p1++)
{
if (*p1 == 0)
{
// Must be all zeros after the first zero
for (; p1 < pchCommand + COMMAND_SIZE; p1++)
if (*p1 != 0)
return false;
}
else if (*p1 < ' ' || *p1 > 0x7E)
return false;
}
// Message size
if (nMessageSize > MAX_SIZE)
{
LogPrintf("CMessageHeader::IsValid(): (%s, %u bytes) nMessageSize > MAX_SIZE\n", GetCommand(), nMessageSize);
return false;
}
return true;
}
CAddress::CAddress() : CService()
{
Init();
}
CAddress::CAddress(CService ipIn, uint64_t nServicesIn) : CService(ipIn)
{
Init();
nServices = nServicesIn;
}
void CAddress::Init()
{
nServices = NODE_NETWORK;
nTime = 100000000;
}
CInv::CInv()
{
type = 0;
hash.SetNull();
}
CInv::CInv(int typeIn, const uint256& hashIn)
{
type = typeIn;
hash = hashIn;
}
CInv::CInv(const std::string& strType, const uint256& hashIn)
{
unsigned int i;
for (i = 1; i < ARRAYLEN(ppszTypeName); i++)
{
if (strType == ppszTypeName[i])
{
type = i;
break;
}
}
if (i == ARRAYLEN(ppszTypeName))
throw std::out_of_range(strprintf("CInv::CInv(string, uint256): unknown type '%s'", strType));
hash = hashIn;
}
bool operator<(const CInv& a, const CInv& b)
{
return (a.type < b.type || (a.type == b.type && a.hash < b.hash));
}
bool CInv::IsKnownType() const
{
return (type >= 1 && type < (int)ARRAYLEN(ppszTypeName));
}
const char* CInv::GetCommand() const
{
if (!IsKnownType())
throw std::out_of_range(strprintf("CInv::GetCommand(): type=%d unknown type", type));
return ppszTypeName[type];
}
std::string CInv::ToString() const
{
return strprintf("%s %s", GetCommand(), hash.ToString());
}
const std::vector<std::string> &getAllNetMessageTypes()
{
return allNetMessageTypesVec;
}
| [
"safenode@protonmail.com"
] | safenode@protonmail.com |
6393266e6dc3946cfc6400faf26deaecc8f7cb44 | aafbd0448f9d34c839f1b753854c39289784896a | /src/config/manager/ConfigManager.cpp | cddba5884cc12fd456aae2fe8e3f1fac3d3c625c | [] | no_license | adahbingee/config-manager | bc41f6ef2b8e59de1fb743a7857a9617e2919da1 | 1a6c3954e4e5b3436d45d46174c37b030724c6e9 | refs/heads/master | 2021-01-11T00:46:59.306698 | 2019-08-22T10:04:41 | 2019-08-22T10:04:41 | 70,488,771 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 646 | cpp | #include <iostream>
#include <fstream>
#include "../config.h"
#include "ConfigManager.h"
#include "ConfigManagerRead.inc"
#include "ConfigManagerPrint.inc"
#include "ConfigManagerWrite.inc"
#include "ConfigManagerMacro.inc"
using namespace std;
void ConfigManager::read(const char *fileName) {
fstream file(fileName, ios::in);
if ( !file.is_open() ) {
printf("can't open %s\n", fileName);
}
while( getline(file, line) ){
CFG_READ_MACRO
}
file.close();
}
void ConfigManager::write(const char *fileName) {
writeFile = fopen(fileName, "w");
CFG_WRITE_MACRO
fclose( writeFile );
}
void ConfigManager::print() {
CFG_PRINT_MACRO
}
| [
"adahbingee@gmail.com"
] | adahbingee@gmail.com |
08af35721597ef7ac788762d7345c0afa92bf87a | a8d0bb2f9a42320be0aa5e383f1ce67e5e44d2c6 | /Datastructures/002 Arrays/007 maxSumInConfiguration.cpp | 2f777645311e04f929403f38fe222b2d9bc71cc4 | [] | no_license | camperjett/DSA_dups | f5728e06f1874bafbaf8561752e8552fee2170fa | f20fb4be1463398f568dbf629a597d8d0ae92e8f | refs/heads/main | 2023-04-19T18:18:55.674116 | 2021-05-15T12:51:21 | 2021-05-15T12:51:21 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 537 | cpp | #include<bits/stdc++.h>
using namespace std;
int max_sum(int A[],int N)
{
//Your code here
int currSum(0), sumArray(0);
for(int i=0; i<N; i++){
currSum+= i*A[i];
sumArray+=A[i];
}
int ans = currSum;
for(int i=0; i<N-1; i++){
int temp = currSum - sumArray+N*A[i];
ans = max(ans, temp);
currSum = temp;
}
return ans;
}
int main(){
int n; cin>>n;
int* arr = new int[n];
for(int i=0; i<n; i++)
cin>>arr[i];
cout<<max_sum(arr, n);
return 0;
}
| [
"vasubansal1998@gmail.com"
] | vasubansal1998@gmail.com |
94c2141cb3ef58154f115eb6c2457da41c1500aa | cdcaffa6580a621eb78981f8e8f4a58fac6b0c34 | /IrisSegmentation/IrisSegm.cpp | c293ab8979ca05c4ca02b23e52c5e935aceaacd1 | [] | no_license | MaxPappa/Iris-segmentation-occlusion-detection | 3cc54fdbc7b952d7848c55d5154acf803258d44d | b840d0d592a02c1bd968b8026ecdf78d120b5ba0 | refs/heads/master | 2021-07-19T19:20:09.491705 | 2020-09-08T22:29:07 | 2020-09-08T22:29:07 | 213,500,923 | 2 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 4,660 | cpp | #include "IrisSegm.hpp"
IrisSegm::IrisSegm(std::string pathToDB) : eye(Eye(pathToDB))
{
}
IrisSegm::~IrisSegm()
{
}
void IrisSegm::run()
{
Preprocessing refCor(&eye);
refCor.run();
Segmentation daug(&eye);
daug.run();
try{
Normalization norm = Normalization();
norm.run(&eye);
}
catch(const std::exception& e){
std::cerr << e.what() << '\n';
}
OcclusionDetector occDec;
occDec.run(&eye);
}
Eye* IrisSegm::getEye(){ return &eye; }
// arguments should be: "y", "/path/to/dataset/", "/path/to/output/"
int main(int argc, char** argv)
{
if(argc == 2 && strcmp(argv[1], "--help")==0)
{
std::string help = "Welcome to my IrisSegmentation project. This project has been created as a bachelor project and then improved in order to use it ";
help+="as a project for Biometrics Systems course.\nPossible arguments (write them in order) are:\n\n\n";
help+="y/n - if you have already ran this IrisSegmenter, y means that you want to overwrite previous results,";
help+="\n\tn means that you don't want it to happen, and then nothing will be done.";
help+="\n\tNOTICE: if this is your first run, or you want the output in a new folder (u should not create it manually), \n\tthen u can avoid to use this argument.\n\n\n";
help+="path/to/dataset/ - this argument is a path to the folder containing the iris dataset.\n\n\n";
help+="path/to/output/folder/ - this argument is a path to the output folder. Notice: if the folder doesn't exist, it will be created.\n";
std::cout << help << std::endl;
return 0;
}
if(argc >= 5)
{
std::cout << "Too many arguments given. Use the --help option in order to learn which are the possible arguments." << std::endl;
return 0;
}
boost::filesystem::path dstFolder(argv[3]);//"/Utiris_Segmented");
if(!(boost::filesystem::exists(dstFolder)))
{
boost::filesystem::create_directory(dstFolder);
}
else{
char ans = *argv[1];
std::tolower(ans);
switch (ans)
{
case('y'):
{
boost::filesystem::remove_all(dstFolder);
boost::filesystem::create_directory(dstFolder);
break;
}
case('n'):
{
std::cout << "Ok, so this run is going to be aborted." << std::endl;
break;
}
default:
{
std::cout << "Options are y or n, so try again." << std::endl;
break;
}
}
}
vector<boost::filesystem::path> ret;
vector<std::string> names;
string ext{".JPG"};
string path{argv[2]};
boost::filesystem::path root{path}; // root folder of the dataset
get_all(root, ext, ret, names);
boost::timer::auto_cpu_timer t; // when destructor is called the elapsed time is printed
#pragma omp parallel for shared(ret) num_threads(4)
for(int i = 0; i < ret.size(); i++){
std::cout << names[i] << " is starting now"<< std::endl;
IrisSegm irSe(ret[i].string());
cv::Mat img = *(irSe.getEye()->getImg());
// cv::namedWindow("Image Window");
irSe.run();
cv::Mat image = *(irSe.getEye()->getImg());
int c = round(image.cols/irSe.getEye()->getImgWidth()); // i'm not sure if every x,y pair should have the same coefficient c (!)
cv::circle(image, irSe.getEye()->getIrisCenter()*c, irSe.getEye()->getIrisRadius()*c, cv::Scalar(0,0,255), 3);
int xRoi = irSe.getEye()->getIrisCenter().x - irSe.getEye()->getIrisRadius();
int yRoi = irSe.getEye()->getIrisCenter().y - irSe.getEye()->getIrisRadius();
cv::Point centerPup(xRoi+irSe.getEye()->getPupilCenter().x, yRoi+irSe.getEye()->getPupilCenter().y);
cv::circle(image, centerPup*c, irSe.getEye()->getPupilRadius()*c, cv::Scalar(255,0,0), 3);
cv::Mat imgNorm = *(irSe.getEye()->getNormImg());
cv::Mat binMask = *(irSe.getEye()->getBinMask());
cv::Mat normMask = *(irSe.getEye()->getNormMask());
cv::imwrite(dstFolder.string()+"/"+names[i]+"_NORMALIZED"+ext, imgNorm);
cv::imwrite(dstFolder.string()+"/"+names[i]+"_BINARYMASK"+ext, binMask);
cv::imwrite(dstFolder.string()+"/"+names[i]+"_NORMMASK"+ext, normMask);
cv::imwrite(dstFolder.string()+"/"+names[i]+"_IMAGE"+ext, image);
std::cout << names[i] << " DONE!"<< std::endl;
imgNorm.release();
binMask.release();
normMask.release();
image.release();
}
}
| [
"massimilianopappa95@gmail.com"
] | massimilianopappa95@gmail.com |
ba0ae75e3072d14cd0322ae1e9d9f68146261d6c | 75af9ed348bc6d8dc9ff03ec898309bebce485db | /src/AOSGUI/paw_gui_tab_basic.cpp | 13133ff1bf3676462c5f0a09b96d29f924de7267 | [
"MIT"
] | permissive | creikey/Game-Pencil-Engine | eea63d5345f6c7f516fb4ab108709444529d3568 | 961a33f090b6b8d94a660db9e4b67644d829c96f | refs/heads/master | 2020-07-08T12:53:04.073564 | 2019-08-21T23:36:55 | 2019-08-21T23:36:55 | 203,677,843 | 0 | 0 | MIT | 2019-08-21T23:16:40 | 2019-08-21T23:16:40 | null | UTF-8 | C++ | false | false | 12,305 | cpp | /*
paw_gui_tab_basic.cpp
This file is part of:
GAME PENCIL ENGINE
https://create.pawbyte.com
Copyright (c) 2014-2019 Nathan Hurde, Chase Lee.
Copyright (c) 2014-2019 PawByte LLC.
Copyright (c) 2014-2019 Game Pencil Engine contributors ( Contributors Page )
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.
-Game Pencil Engine <https://create.pawbyte.com>
*/
#include "paw_gui_tab_basic.h"
GPE_TabBar::GPE_TabBar( bool dynamicClosing )
{
canCloseTabs = dynamicClosing;
needsNewLine = true;
isFullWidth = true;
tabIsRightClicked = false;
isInUse = false;
guiListTypeName = "tabbar";
elementBox.x = 16;
elementBox.y = 16;
elementBox.w = 32;
elementBox.h = 18;
barXPadding = GENERAL_GPE_PADDING;
barYPadding = 4;
fontTextWidth = 12;
fontTextHeight = 12;
if( GUI_TAB_FONT!=NULL)
{
GUI_TAB_FONT->get_metrics("A",&fontTextWidth,&fontTextHeight);
}
else
{
fontTextWidth = 12;
fontTextHeight = 12;
}
tabInUse = 0;
tabSize = -1; //defaults to equally divide the tab onto the screen
miniTabSize = 48;
extraSmallSize = 64;
smallTabSize = 96;
medTabSize = 128;
largeTabSize = 160;
extraLargeTabSize = 192;
xxLargeTabSize = 256;
tabsPerView = -1;
tabPos = 0;
}
GPE_TabBar::~GPE_TabBar()
{
subOptions.clear();
}
void GPE_TabBar::add_new_tab(std::string newOption, bool switchToNew )
{
if( (int)newOption.size() > 0)
{
//automatically add resource to when the tab bar is empty
if( switchToNew)
{
tabInUse = (int)subOptions.size();
}
subOptions.push_back(newOption);
calculate_tabs();
}
}
void GPE_TabBar::calculate_tabs()
{
int currentSize = (int)subOptions.size();
if( tabPos >= currentSize )
{
tabPos = currentSize -1;
}
if( tabPos < 0)
{
tabPos = 0;
}
if( tabInUse >= currentSize )
{
tabInUse = currentSize - 1;
}
if( tabPos < 0)
{
tabInUse = 0;
}
if( currentSize == 0 )
{
tabSize = elementBox.w;
}
else
{
tabSize = elementBox.w/ currentSize;
}
}
bool GPE_TabBar::contains_tab( std::string tabName )
{
if( (int)tabName.size() > 0)
{
for( int i = 0; i < (int)subOptions.size(); i++)
{
if( tabName==subOptions[i] )
{
return true;
}
}
}
return false;
}
void GPE_TabBar::open_tab(int tabId)
{
if( tabId >=0 && tabId < (int)subOptions.size() )
{
tabInUse = tabId;
}
else
{
tabInUse = 0;
}
}
void GPE_TabBar::open_tab(std::string tabName)
{
if( (int)tabName.size() > 0)
{
for( int i = 0; i < (int)subOptions.size(); i++)
{
if( tabName==subOptions[i] )
{
tabInUse = i;
break;
}
}
}
}
std::string GPE_TabBar::get_selected_name()
{
if( (int)subOptions.size() > 0 )
{
if( tabInUse >=0 && tabInUse < (int)subOptions.size() )
{
return subOptions[tabInUse];
}
}
return "";
}
int GPE_TabBar::get_selected_tab()
{
return tabInUse;
}
int GPE_TabBar::get_tab_count()
{
return (int)subOptions.size();
}
void GPE_TabBar::process_self(GPE_Rect * viewedSpace,GPE_Rect *cam)
{
viewedSpace = GPE_find_camera(viewedSpace);
cam = GPE_find_camera(cam);
tabIsRightClicked = false;
//elementBox.w = viewedSpace->w - elementBox.x;
if( elementBox.w!=0 && viewedSpace!=NULL && cam!=NULL)
{
GPE_GeneralGuiElement::process_self(viewedSpace, cam);
calculate_tabs();
if( isClicked || isRightClicked)
{
isInUse = true;
}
else if( clickedOutside)
{
isInUse = false;
}
int cTabXPos = elementBox.x+viewedSpace->x-cam->x;
int cTabX2Pos = cTabXPos;
int cTabYPos = elementBox.y+viewedSpace->y-cam->y;
int cTabY2Pos = elementBox.y+elementBox.h+viewedSpace->y-cam->y;
int optionsSize = (int)subOptions.size();
cTabX2Pos += optionsSize * tabSize;
cTabXPos = cTabX2Pos - tabSize;
for(int i = optionsSize-1; i >=0; i--)
{
if(point_within(input->mouse_x,input->mouse_y,cTabXPos,cTabYPos,cTabX2Pos,cTabY2Pos) )
{
MAIN_OVERLAY->update_tooltip( subOptions[i] );
if( isClicked )
{
if( canCloseTabs )
{
if( point_between(input->mouse_x, input->mouse_y,cTabX2Pos-12,cTabYPos, cTabX2Pos,cTabY2Pos) )
{
subOptions.erase( subOptions.begin()+i );
tabInUse = i -1;
return;
}
else
{
tabInUse = i;
}
}
else
{
tabInUse = i;
}
}
if( isRightClicked )
{
tabIsRightClicked = true;
tabInUse = i;
}
}
cTabX2Pos = cTabXPos;
cTabXPos-=tabSize;
}
if( isInUse)
{
if( input->check_keyboard_released(kb_left) && tabInUse > 0)
{
tabInUse--;
}
else if( input->check_keyboard_released(kb_right) && tabInUse < (int)subOptions.size()-1 )
{
tabInUse++;
}
}
}
}
void GPE_TabBar::remove_all_tabs( )
{
subOptions.clear();
isClicked = false;
tabIsRightClicked = false;
tabPos = tabInUse = 0;
calculate_tabs();
}
bool GPE_TabBar::remove_tab( int tabId )
{
if( tabId >=0 && tabId < (int)subOptions.size() )
{
subOptions.erase(subOptions.begin()+tabId );
calculate_tabs();
}
}
bool GPE_TabBar::remove_tab( std::string tabName )
{
//Reverse iterate for safety
for( int i = (int)subOptions.size()-1; i >=0; i--)
{
if( subOptions.at(i) ==tabName )
{
subOptions.erase(subOptions.begin()+i );
calculate_tabs();
}
}
}
void GPE_TabBar::render_self( GPE_Rect * viewedSpace,GPE_Rect * cam, bool forceRedraw)
{
//gcanvas->render_rect(&elementBox,barColor,false);
//gcanvas->render_rect(&elementBox,barOutlineColor,true);
viewedSpace = GPE_find_camera(viewedSpace);
cam = GPE_find_camera(cam);
if(forceRedraw && viewedSpace!=NULL && cam!=NULL)
{
if( (int)subOptions.size() >0 )
{
std::string tabOptionStr = "";
int tabFontWidth = 0;
int tabFontHeight = 0;
int maxCharactersAllowed = 0;
GUI_TAB_FONT->get_metrics("A", &tabFontWidth, &tabFontHeight );
maxCharactersAllowed = tabSize/tabFontWidth -1;
int cTabXPos = elementBox.x-cam->x;
int cTabX2Pos = elementBox.x-cam->x;
int cTabY1Pos = elementBox.y-cam->y;
int cTabY2Pos = elementBox.y-cam->y+elementBox.h;
for(int i=0; i< (int)subOptions.size(); i++)
{
cTabX2Pos+=tabSize;
tabOptionStr = subOptions[i];
if( (int)tabOptionStr.size() > maxCharactersAllowed )
{
if( maxCharactersAllowed > 1 )
{
tabOptionStr = get_substring( tabOptionStr,0,maxCharactersAllowed-1 )+"..";
}
else
{
tabOptionStr = get_substring( tabOptionStr,0, 1 );
}
}
if( tabInUse==i)
{
gcanvas->render_rectangle( cTabXPos,elementBox.y-cam->y,cTabX2Pos,elementBox.y+elementBox.h-cam->y,GPE_MAIN_THEME->Program_Header_Color,false);
gcanvas->render_rectangle( cTabXPos,elementBox.y-cam->y,cTabX2Pos,elementBox.y+elementBox.h-cam->y,GPE_MAIN_THEME->Main_Border_Color,true);
gfs->render_text( cTabXPos+tabSize/2,elementBox.y+elementBox.h/2-cam->y, tabOptionStr, GPE_MAIN_THEME->PopUp_Box_Font_Color,GUI_TAB_FONT,FA_CENTER,FA_MIDDLE);
}
else
{
gcanvas->render_rectangle( cTabXPos,elementBox.y-cam->y,cTabX2Pos,elementBox.y+elementBox.h-cam->y,GPE_MAIN_THEME->Program_Color,false);
gcanvas->render_rectangle( cTabXPos,elementBox.y-cam->y,cTabX2Pos,elementBox.y+elementBox.h-cam->y,GPE_MAIN_THEME->Main_Border_Color,true);
gfs->render_text( cTabXPos+tabSize/2,elementBox.y+elementBox.h/2-cam->y, tabOptionStr, GPE_MAIN_THEME->Main_Box_Font_Color,GUI_TAB_FONT,FA_CENTER,FA_MIDDLE);
}
if( canCloseTabs )
{
if( point_between(input->mouse_x, input->mouse_y,viewedSpace->x+cTabX2Pos-32,viewedSpace->y+cTabY1Pos, viewedSpace->x+cTabX2Pos,viewedSpace->y+cTabY2Pos) )
{
gfs->render_text( cTabXPos+tabSize-GENERAL_GPE_PADDING,elementBox.y+elementBox.h/2-cam->y, "X", GPE_MAIN_THEME->Main_Box_Font_Highlight_Color,GUI_TAB_FONT,FA_RIGHT,FA_MIDDLE);
}
else
{
gfs->render_text( cTabXPos+tabSize-GENERAL_GPE_PADDING,elementBox.y+elementBox.h/2-cam->y, "X", GPE_MAIN_THEME->Main_Box_Font_Color,GUI_TAB_FONT,FA_RIGHT,FA_MIDDLE);
}
}
cTabXPos = cTabX2Pos;
}
}
else
{
gcanvas->render_rectangle( elementBox.x-cam->x,elementBox.y-cam->y,elementBox.x+elementBox.w-cam->x,elementBox.y+elementBox.h-cam->y,GPE_MAIN_THEME->Program_Color,false);
gcanvas->render_rectangle( elementBox.x-cam->x,elementBox.y-cam->y,elementBox.x+elementBox.w-cam->x,elementBox.y+elementBox.h-cam->y,GPE_MAIN_THEME->Main_Border_Color,true);
}
/*if( isHovered)
{
//Uncomment in the even a tab bar randomly behaves weirdly
gcanvas->render_rectangle( elementBox.x-cam->x,elementBox.y-cam->y,elementBox.x+elementBox.w-cam->x,elementBox.y+elementBox.h-cam->y,GPE_MAIN_THEME->Main_Border_Highlighted_Color,true);
}*/
}
}
void GPE_TabBar::select_tab( int tabToSelect )
{
if( tabToSelect >=0 && tabToSelect < (int)subOptions.size() )
{
tabInUse = tabToSelect;
}
}
void GPE_TabBar::toggle_tab( std::string tabName )
{
if( contains_tab( tabName) )
{
remove_tab( tabName);
}
else
{
add_new_tab( tabName);
}
}
| [
"chase@pawbyte.com"
] | chase@pawbyte.com |
193a2ff86a76148f91ca15e8fe443177e2f41a61 | c17bb25e2db7b2f38edd36425f27611799c4b963 | /Wipgate/Source/Wipgate/LevelGenerator/LevelGenerator.cpp | 700a64eb0b7ab575466ba1c6de5fdd4aafb63172 | [] | no_license | ajweeks/Wipgate | 680e0b0e445e06eaaa5df445f4496702974aab4e | dcf3a249e21d1612804c1fbb614d1bcec4eb8fbf | refs/heads/master | 2021-09-08T03:57:52.559275 | 2018-03-06T17:52:40 | 2018-03-06T17:52:40 | 110,848,942 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,424 | cpp | #include "LevelGenerator.h"
#include "Runtime/Engine/Classes/Engine/StaticMesh.h"
#include "Runtime/Engine/Classes/Materials/MaterialInstanceDynamic.h"
#include "Runtime/Engine/Classes/Engine/World.h"
#include "GeneralFunctionLibrary_CPP.h"
#include "Wipgate.h"
#include "Step.h"
void ALevelGenerator::InitializeBlockout()
{
m_Grid = new LevelGrid(35, 35, this);
m_Grid->SetMainGrid(m_Grid);
m_Blockout = GetWorld()->SpawnActor<ALevelBlockout>();
m_Blockout->SetBlock(m_Block);
m_Blockout->Initialize(m_Grid);
}
void ALevelGenerator::GenerateStreets(const int granularity)
{
LevelGrid* grid = m_Grid->CreateSubGrid(2, 2, m_Grid->GetHeight() - 3, m_Grid->GetWidth() - 3);
// empty grid
//vector<Tile*> tiles = m_Grid->GetTiles();
m_Grid->SetFilledArea(1, 1, m_Grid->GetHeight() - 2, m_Grid->GetWidth() - 2, false);
m_Grid->SetTilesType(m_Grid->GetTiles(), LEVEL_EDGE);
m_Grid->SetTileTypeArea(1, 1, m_Grid->GetHeight() - 2, m_Grid->GetWidth() - 2, FLOOR);
ExecuteSteps();
GenerateBaseLayout(grid, granularity);
FlagStreets();
CreateStreetsFromFlagged();
// street sparsity
//vector<Street*> edgeStreets = m_Grid->GetEdgeStreets();
//for (auto street : edgeStreets)
//{
// if (rand() % 3 == 0)
// m_Grid->RemoveStreet(street);
//}
/*for (auto street : m_Grid->GetStreets())
{
int rnd = rand() % 3;
if (rnd == 0)
street->Widen();
else if (rnd == 1)
street->Tighten();
}*/
//m_Grid->GetRandomStreet()->Widen();
//vector<Tile*> intersectionTiles = m_Grid->GetTilesWithType(m_Grid->GetTiles(), INTERSECTION);
//vector<Tile*> adjacents;
//for (auto t : intersectionTiles)
//{
// // adjacent to wall?
// adjacents = m_Grid->GetAdjacentTiles(t);
// if (!m_Grid->GetTilesFilled(adjacents).empty() &&
// (m_Grid->IsAdjTileWithType(t, STREET_HOR) || m_Grid->IsAdjTileWithType(t, STREET_VERT)))
// {
// Tile* filled = m_Grid->GetTilesFilled(adjacents)[0];
// vector<Tile*> adjEmpties = m_Grid->GetTilesFilled(m_Grid->GetAdjacentTiles(filled), false);
// if (adjEmpties.size() > 1 && !m_Grid->GetTilesWithTypes(adjEmpties, vector<TileType> { STREET_HOR, STREET_VERT}).empty())
// {
// m_Grid->SetFilled(filled, false);
// m_Grid->SetType(filled, INTERSECTION);
// }
// }
//}
//Street* street = m_Grid->GetRandomStreet();
//if (street)
//{
// auto path = m_Grid->FindPathWithoutStreets(street->GetIntersectionTilesFront()[0],
// street->GetIntersectionTilesBack()[0], vector<Street*> {street});
// m_Grid->SetTilesType(path, FLAGGED);
//}
// remove streets while ensuring connectivity
SparsifyStreetsRandom(4);
// Reset unfilled tiles to floor and flag streets again
m_Grid->SetTilesType(m_Grid->GetTilesFilled(m_Grid->GetTiles(), false), FLOOR);
FlagStreets();
CreateStreetsFromFlagged();
m_Grid->SetFilled((*m_Grid)[0][0], false);
}
void ALevelGenerator::ExecuteStep(UStep * step)
{
if(step)
step->Execute(m_Blockout->GetBlockoutMap());
}
void ALevelGenerator::Reset()
{
if (m_Blockout)
m_Blockout->Destroy();
if(m_Grid)
delete m_Grid;
InitializeBlockout();
}
void ALevelGenerator::ExecuteSteps()
{
for (auto step : m_Grid->GetSteps())
ExecuteStep(step);
m_Grid->ClearSteps();
}
void ALevelGenerator::GenerateBaseLayout(LevelGrid* grid, const int granularity)
{
grid->SplitDeep(granularity);
auto children = grid->GetChildrenDeep();
for (auto c : children)
{
c->SetFilledArea(1, 1, c->GetHeight() - 2, c->GetWidth() - 2, true);
}
}
void ALevelGenerator::FlagStreets()
{
vector<Tile*> tiles = m_Grid->GetTiles();
vector<Tile*> emptyTiles = m_Grid->GetTilesFilled(tiles, false);
// flag tiles diagonal from building corners
for (auto t : emptyTiles)
{
vector<Tile*> nearby = m_Grid->GetNearbyTiles(t->GetPosition());
vector<Tile*> nearbyFilleds = m_Grid->GetTilesFilled(nearby, true);
if (nearbyFilleds.size() > 1)
m_Grid->SetType(t, FLAGGED);
}
// complete street flagging by flagging intersections completely
// flag the 3 opposite tiles from the building corner
vector<Tile*> intersectionTiles = m_Grid->GetTilesWithType(tiles, FLOOR);
m_Grid->SetTilesType(intersectionTiles, FLOOR);
Tile* blockCorner;
vector<Tile*> oppositeTiles;
for (auto t : intersectionTiles)
{
// get nearby building block corner
blockCorner = m_Grid->GetTilesFilled(m_Grid->GetNearbyTiles(t), true).front();
Direction cornerDir = m_Grid->GetTileDirection(t, blockCorner);
oppositeTiles = m_Grid->GetOppositeDirTiles(t, cornerDir);
m_Grid->SetTilesType(oppositeTiles, FLOOR);
}
}
void ALevelGenerator::CreateStreetsFromFlagged()
{
Tile* start;
vector<Tile*> streetTiles;
start = m_Grid->GetRandomTileWithType(FLAGGED);
while (start)
{
streetTiles = m_Grid->GetFloodType(start, FLAGGED);
m_Grid->AddStreet(streetTiles);
start = m_Grid->GetRandomTileWithType(FLAGGED);
}
}
void ALevelGenerator::SparsifyStreetsRandom(const int odds)
{
for (auto street : m_Grid->GetStreets())
{
if (rand() % odds == 0)
{
if (!street->GetIntersectionTilesFront().empty()
&& !street->GetIntersectionTilesBack().empty())
{
Tile* front = street->GetIntersectionTilesFront()[0];
Tile* back = street->GetIntersectionTilesBack()[0];
if (front && back)
{
auto path = m_Grid->FindPathWithoutStreets(front, back, vector<Street*> {street});
if (!path.empty())
{
m_Grid->SetTilesType(path, FLAGGED);
m_Grid->RemoveStreet(street);
}
}
}
}
}
}
| [
"yosha.vandaele@student.howest.be"
] | yosha.vandaele@student.howest.be |
3fce2738cf9b4528f93034da171b0dae8e699505 | ecc9069b70793aa275caa8226f7dc159dff76def | /OsiInterface/GameDefinitions/EntitySystem.h | f802a9cbda71b79995417d7bfd0b4861f9d1c9fe | [
"MIT"
] | permissive | Al123F1/ositools | 2caaaa8371710c73503caa55caaf1f42a9126b09 | 09999c5a62c881774ac97844f43f1d639c32127f | refs/heads/master | 2022-12-18T17:02:59.306410 | 2020-09-27T11:04:33 | 2020-09-27T11:04:33 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 23,858 | h | #pragma once
#include "BaseTypes.h"
#include "Enumerations.h"
#include "Net.h"
#include "Module.h"
#include "Stats.h"
#include <GlobalFixedStrings.h>
namespace dse
{
template <class T, uint32_t TypeIndex>
struct NetworkObjectFactory : public ObjectFactory<T, TypeIndex>
{
Map<FixedString, T *> ObjectMap;
Map<uint16_t, T *> NetIds;
Map<uint16_t, void *> FreeNetIdMap;
Set<uint32_t> Unknown4;
uint32_t NumFreeNetIDs;
Array<uint16_t> NetIdSalts;
uint16_t NextFreeNetIndex;
bool CanCreateNetIDs;
T* FindByNetId(NetId netId) const
{
if (!netId) return nullptr;
auto index = netId.GetIndex();
if (index >= NetIdSalts.Size
|| netId.GetSalt() != NetIdSalts[index]) {
return nullptr;
}
auto object = NetIds.Find(index);
if (object != nullptr) {
return *object;
} else {
return nullptr;
}
}
};
struct ComponentTypeEntry
{
// todo
Component * component;
uint64_t dummy[31];
};
struct ComponentLayout
{
struct LayoutEntry
{
uint64_t unkn1;
ComponentHandle Handle;
};
Array<LayoutEntry> Entries;
};
struct SystemTypeEntry
{
void * System;
int64_t Unkn1;
uint32_t Unkn2;
PrimitiveSet<uint64_t> PSet;
};
struct EntityEntry
{
void * VMT;
ComponentLayout Layout;
};
namespace eoc
{
struct CombatComponent;
struct CustomStatsComponent;
}
struct BaseComponentProcessingSystem
{
void * VMT;
void * field_8;
};
template <class TComponentType>
struct EntityWorldBase : public ProtectedGameObject<EntityWorldBase<TComponentType>>
{
void * VMT;
Array<EntityEntry *> EntityEntries;
Array<uint32_t> EntitySalts;
uint64_t Unkn1[3];
PrimitiveSet<EntityEntry *> EntityEntries2;
uint8_t Unkn3;
uint32_t Unkn4;
Array<ComponentTypeEntry> Components;
ObjectSet<void *> KeepAlives; // ObjectSet<ObjectHandleRefMap<ComponentKeepAliveDesc>>
Array<SystemTypeEntry> SystemTypes;
Array<void *> EventTypes; // Array<EventTypeEntry>
void * EntityWorldManager;
PrimitiveSet<SystemTypeEntry> SystemTypes2;
ObjectSet<void *> Funcs; // ObjectSet<function>
RefMap<FixedString, int> RefMap; // ???
void* GetComponent(TComponentType type, ObjectType handleType, ObjectHandle componentHandle, bool logError = true)
{
if (this == nullptr) {
OsiError("Tried to find component on null EntityWorld!");
return nullptr;
}
if (!componentHandle) {
return nullptr;
}
if ((uint32_t)type >= Components.Size) {
if (logError) {
OsiError("Component type index " << (uint32_t)type << " too large!");
}
return nullptr;
}
auto componentMgr = Components[(uint32_t)type].component;
if (componentMgr == nullptr) {
if (logError) {
OsiError("Component type " << (uint32_t)type << " not bound!");
}
return nullptr;
}
if (componentHandle.GetType() != (uint32_t)handleType) {
if (logError) {
OsiError("Type mismatch! Factory supports " << (unsigned)handleType << ", got " << (unsigned)componentHandle.GetType());
}
return nullptr;
}
// FIXME - This is somewhat ugly :(
auto factory = reinterpret_cast<ObjectFactory<void *, 0>*>((std::intptr_t)componentMgr + 8);
auto index = componentHandle.GetIndex();
auto salt = componentHandle.GetSalt();
if (index >= factory->Salts.Size) {
if (logError) {
OsiError("Factory for type " << (unsigned)handleType << " only has " << factory->Salts.Size
<< " objects, requested " << (unsigned)index);
}
return nullptr;
}
if (salt != factory->Salts[index]) {
if (logError) {
OsiError("Salt mismatch for type " << (unsigned)handleType << ", object " << index << ": got "
<< salt << ", real is " << factory->Salts[index]);
}
return nullptr;
}
return componentMgr->FindComponentByHandle(&componentHandle);
}
void* GetComponent(TComponentType componentType, char const* nameGuid, bool logError = true)
{
if (this == nullptr) {
OsiError("Tried to find component on null EntityWorld!");
return nullptr;
}
if (nameGuid == nullptr) {
OsiError("Attempted to look up component with null name!");
return nullptr;
}
auto fs = NameGuidToFixedString(nameGuid);
if (!fs) {
OsiError("Could not map GUID '" << nameGuid << "' to FixedString");
return nullptr;
}
auto component = Components[(uint32_t)componentType].component->FindComponentByGuid(&fs);
if (component != nullptr) {
return component;
}
else {
if (logError) {
OsiError("No " << ComponentTypeToName(componentType).Str << " component found with GUID '" << nameGuid << "'");
}
return nullptr;
}
}
void* GetComponent(TComponentType type, NetId netId, bool logError = true)
{
if (this == nullptr) {
OsiError("Tried to find component on null EntityWorld!");
return nullptr;
}
if (!netId) {
return nullptr;
}
if ((uint32_t)type >= Components.Size) {
OsiError("Component type index " << (uint32_t)type << " too large!");
return nullptr;
}
auto componentMgr = Components[(uint32_t)type].component;
if (componentMgr == nullptr) {
OsiError("Component type " << (uint32_t)type << " not bound!");
return nullptr;
}
return componentMgr->FindComponentByNetId(netId, true);
}
void* GetComponentByEntityHandle(TComponentType type, ObjectHandle entityHandle, bool logError = true)
{
if (this == nullptr) {
OsiError("Tried to find component on null EntityWorld!");
return nullptr;
}
if (entityHandle.GetType() != 0) {
OsiError("Entity handle has invalid type " << entityHandle.GetType());
return nullptr;
}
auto index = entityHandle.GetIndex();
if (index >= EntityEntries.Size) {
if (logError) {
OsiError("Entity index " << index << " too large!");
}
return nullptr;
}
auto salt = entityHandle.GetSalt();
if (salt != EntitySalts[index]) {
if (logError) {
OsiError("Salt mismatch on index " << index << "; " << salt << " != " << EntitySalts[index]);
}
return nullptr;
}
auto entity = EntityEntries[index];
if ((uint32_t)type >= entity->Layout.Entries.Size) {
if (logError) {
OsiError("Entity " << index << " has no component slot for " << (uint32_t)type);
}
return nullptr;
}
auto const& layoutEntry = entity->Layout.Entries[(uint32_t)type];
if (!layoutEntry.Handle.IsValid()) {
if (logError) {
OsiError("Entity " << index << " has no component bound to slot " << (uint32_t)type);
}
return nullptr;
}
ObjectHandle componentHandle{ layoutEntry.Handle.Handle };
auto componentMgr = Components[(uint32_t)type].component;
return componentMgr->FindComponentByHandle(&componentHandle);
}
FixedString ComponentTypeToName(TComponentType type)
{
auto label = EnumInfo<TComponentType>::Find(type);
if (label) {
return label;
} else {
return GFS.strEmpty;
}
}
};
namespace eoc
{
struct Ai;
}
struct IGameObject : public ProtectedGameObject<IGameObject>
{
virtual ~IGameObject() = 0;
virtual void HandleTextKeyEvent() = 0;
virtual uint64_t Ret5() = 0;
virtual void SetObjectHandle(ObjectHandle Handle) = 0;
virtual void GetObjectHandle(ObjectHandle& Handle) const = 0;
virtual void SetGuid(FixedString const& fs) = 0;
virtual FixedString* GetGuid() const = 0;
virtual void SetNetID(NetId netId) = 0;
virtual void GetNetID(NetId& netId) const = 0;
virtual void SetCurrentTemplate(void* esvTemplate) = 0;
virtual void* GetCurrentTemplate() const = 0;
virtual void SetGlobal(bool isGlobal) = 0;
virtual bool IsGlobal() const = 0;
virtual uint32_t GetComponentType() = 0;
virtual void* GetEntityObjectByHandle(ObjectHandle handle) = 0;
virtual STDWString* GetName() = 0;
virtual void SetFlags(uint64_t flag) = 0;
virtual void ClearFlags(uint64_t flag) = 0;
virtual bool HasFlag(uint64_t flag) const = 0;
virtual void SetAiColliding(bool colliding) = 0;
virtual void GetTags(ObjectSet<FixedString> & tags) = 0;
virtual bool IsTagged(FixedString & tag) = 0;
virtual Vector3 const* GetTranslate() const = 0;
virtual glm::mat3 const* GetRotation() const = 0;
virtual float GetScale() const = 0;
virtual void SetTranslate(Vector3 const& translate) = 0;
virtual void SetRotation(glm::mat3 const& rotate) = 0;
virtual void SetScale(float scale) = 0;
virtual Vector3 const* GetVelocity() = 0;
virtual void SetVelocity(Vector3 const& translate) = 0;
virtual void LoadVisual() = 0;
virtual void UnloadVisual() = 0;
virtual void ReloadVisual() = 0;
virtual void GetVisual() = 0;
virtual void GetPhysics() = 0;
virtual void SetPhysics() = 0;
virtual void LoadPhysics() = 0;
virtual void UnloadPhysics() = 0;
virtual void ReloadPhysics() = 0;
virtual void GetHeight() = 0;
virtual void GetParentUUID() = 0;
virtual FixedString* GetCurrentLevel() const = 0;
virtual void SetCurrentLevel(FixedString const& level) = 0;
BaseComponent Base;
FixedString MyGuid;
NetId NetID;
};
struct IEocClientObject : public IGameObject
{
virtual eoc::Ai * GetAi() = 0;
virtual void LoadAi() = 0;
virtual void UnloadAi() = 0;
virtual void Unknown0() = 0;
virtual void Unknown1() = 0;
virtual void Unknown2() = 0;
virtual void Unknown3() = 0;
virtual FixedString * Unknown4() = 0;
virtual bool Unknown5() = 0;
virtual TranslatedString* GetDisplayName(TranslatedString* name) = 0;
virtual float Unknown6() = 0;
virtual void SavegameVisit() = 0;
virtual void SetLight(FixedString *) = 0;
virtual void * GetLight() = 0;
virtual void RemoveLight() = 0;
virtual FixedString * GetPlayerRace(bool returnPolymorph, bool excludeUninitialized) = 0;
virtual FixedString* GetPlayerOrigin(bool returnPolymorph, bool excludeUninitialized) = 0;
};
struct IEoCServerObject : public IGameObject
{
virtual void AddPeer() = 0;
virtual void UNK1() = 0;
virtual void UNK2() = 0;
virtual void UNK3() = 0;
virtual eoc::Ai* GetAi() = 0;
virtual void LoadAi() = 0;
virtual void UnloadAi() = 0;
virtual TranslatedString* GetDisplayName(TranslatedString* name) = 0;
virtual void SavegameVisit() = 0;
virtual void GetEntityNetworkId() = 0;
virtual void SetTemplate() = 0;
virtual void SetOriginalTemplate_M() = 0;
};
template <class TWorld>
struct EntityManager
{
void* VMT;
RefMap<FixedString, void*> field_8;
TWorld* EntityWorld;
FixedString FS1;
};
namespace esv
{
struct CustomStatDefinitionComponent;
struct CustomStatSystem;
struct NetComponent;
struct Item;
struct Character;
struct Inventory;
struct TurnManager;
struct Projectile;
struct EntityWorld;
struct EntityManager;
struct CombineManager;
struct ItemFactory;
struct CharacterFactory;
struct ItemConversionHelpers : public ProtectedGameObject<ItemConversionHelpers>
{
EntityManager* EntityManager;
ItemFactory* ItemFactory;
RefMap<FixedString, ObjectSet<Item *> *> RegisteredItems;
RefMap<FixedString, ObjectSet<Item *> *> ActivatedItems;
FixedString CurrentLevel;
Map<FixedString, ObjectHandle> GlobalItemHandles;
#if !defined(OSI_EOCAPP)
int field_4C;
RefMap<FixedString, void*> DebugItems;
__int64 field_88;
#endif
};
struct CharacterConversionHelpers : public ProtectedGameObject<CharacterConversionHelpers>
{
EntityManager* EntityManager;
CharacterFactory* CharacterFactory;
RefMap<FixedString, ObjectSet<Character *> *> RegisteredCharacters;
RefMap<FixedString, ObjectSet<Character *> *> ActivatedCharacters;
};
struct TriggerConversionHelpers : public ProtectedGameObject<TriggerConversionHelpers>
{
esv::EntityManager* EntityManager;
void* TriggerFactory;
RefMap<FixedString, ObjectSet<void *>*> RegisteredTriggers;
};
struct ProjectileConversionHelpers : public ProtectedGameObject<ProjectileConversionHelpers>
{
esv::EntityManager* EntityManager;
void* ProjectileFactory;
RefMap<FixedString, ObjectSet<Projectile *> *> RegisteredProjectiles;
};
struct EntityManager : public dse::EntityManager<EntityWorld>
{
ItemConversionHelpers ItemConversionHelpers;
CharacterConversionHelpers CharacterConversionHelpers;
TriggerConversionHelpers TriggerConversionHelpers;
ProjectileConversionHelpers ProjectileConversionHelpers;
void* CharacterManagerSystem;
void* ItemManagerSystem;
void* TriggerManagerSystem;
void* ProjectileManagerSystem;
void* TurnManagerSystem;
void* SpiritObjectManager;
ObjectSet<FixedString> TriggerTypes;
bool field_150;
ObjectSet<void*> ComponentPrepares; // <esv::ComponentPrepare>
ObjectSet<void*> TemplateTraces; // <esv::TemplateTrace>
};
struct EntityWorld : public EntityWorldBase<ComponentType>
{
inline CustomStatDefinitionComponent* GetCustomStatDefinitionComponent(ObjectHandle componentHandle, bool logError = true)
{
auto component = GetComponent(ComponentType::CustomStatDefinition, ObjectType::ServerCustomStatDefinitionComponent,
componentHandle, logError);
if (component != nullptr) {
return (CustomStatDefinitionComponent*)((uint8_t*)component - 80);
}
else {
return nullptr;
}
}
inline Character* GetCharacterComponentByEntityHandle(ObjectHandle entityHandle, bool logError = true)
{
auto ptr = GetComponentByEntityHandle(ComponentType::Character, entityHandle, logError);
if (ptr != nullptr) {
return (Character*)((uint8_t*)ptr - 8);
}
else {
return nullptr;
}
}
inline Item* GetItemComponentByEntityHandle(ObjectHandle entityHandle, bool logError = true)
{
auto ptr = GetComponentByEntityHandle(ComponentType::Item, entityHandle, logError);
if (ptr != nullptr) {
return (Item*)((uint8_t*)ptr - 8);
}
else {
return nullptr;
}
}
inline eoc::CombatComponent* GetCombatComponentByEntityHandle(ObjectHandle entityHandle, bool logError = true)
{
return (eoc::CombatComponent*)GetComponentByEntityHandle(ComponentType::Combat, entityHandle, logError);
}
inline eoc::CustomStatsComponent* GetCustomStatsComponentByEntityHandle(ObjectHandle entityHandle, bool logError = true)
{
return (eoc::CustomStatsComponent*)GetComponentByEntityHandle(ComponentType::CustomStats, entityHandle, logError);
}
inline NetComponent* GetNetComponentByEntityHandle(ObjectHandle entityHandle, bool logError = true)
{
return (NetComponent*)GetComponentByEntityHandle(ComponentType::Net, entityHandle, logError);
}
inline CustomStatSystem* GetCustomStatSystem()
{
auto sys = SystemTypes.Buf[(uint32_t)SystemType::CustomStat].System;
return (CustomStatSystem*)((uint8_t*)sys - 0x18);
}
inline TurnManager* GetTurnManager()
{
auto const& system = SystemTypes[(unsigned)SystemType::TurnManager];
return (TurnManager*)((uint8_t*)system.System - 8);
}
inline Character* GetCharacter(char const* nameGuid, bool logError = true)
{
auto component = GetComponent(ComponentType::Character, nameGuid, logError);
if (component != nullptr) {
return (Character*)((uint8_t*)component - 8);
}
else {
return nullptr;
}
}
inline Character* GetCharacter(ObjectHandle handle, bool logError = true)
{
auto component = GetComponent(ComponentType::Character, ObjectType::ServerCharacter, handle, logError);
if (component != nullptr) {
return (Character*)((uint8_t*)component - 8);
}
else {
return nullptr;
}
}
inline Character* GetCharacter(NetId netId, bool logError = true)
{
auto component = GetComponent(ComponentType::Character, netId, logError);
if (component != nullptr) {
return (Character*)((uint8_t*)component - 8);
}
else {
return nullptr;
}
}
inline Item* GetItem(char const* nameGuid, bool logError = true)
{
auto component = GetComponent(ComponentType::Item, nameGuid, logError);
if (component != nullptr) {
return (Item*)((uint8_t*)component - 8);
}
else {
return nullptr;
}
}
inline Item* GetItem(ObjectHandle handle, bool logError = true)
{
auto component = GetComponent(ComponentType::Item, ObjectType::ServerItem, handle, logError);
if (component != nullptr) {
return (Item*)((uint8_t*)component - 8);
}
else {
return nullptr;
}
}
inline Projectile* GetProjectile(ObjectHandle handle, bool logError = true)
{
auto component = GetComponent(ComponentType::Item, ObjectType::ServerProjectile, handle, logError);
if (component != nullptr) {
return (Projectile*)((uint8_t*)component - 8);
}
else {
return nullptr;
}
}
IEoCServerObject* GetGameObject(char const* nameGuid, bool logError = true);
IEoCServerObject* GetGameObject(ObjectHandle handle, bool logError = true);
};
struct CharacterFactory : public NetworkObjectFactory<esv::Character, (uint32_t)ObjectType::ServerCharacter>
{
void* VMT2;
void* VMT3;
Map<FixedString, void*> FSMap_ReloadComponent;
EntityWorld* Entities;
uint64_t Unkn8[2];
};
struct ItemFactory : public NetworkObjectFactory<esv::Item, (uint32_t)ObjectType::ServerItem>
{
void* VMT2;
void* VMT3;
Map<FixedString, void*> FSMap_ReloadComponent;
EntityWorld* Entities;
uint64_t Unkn8[2];
};
struct InventoryFactory : public NetworkObjectFactory<esv::Inventory, (uint32_t)ObjectType::ServerInventory>
{
// TODO
};
struct GameStateMachine : public ProtectedGameObject<GameStateMachine>
{
uint8_t Unknown;
void * CurrentState;
GameState State;
void ** TargetStates;
uint32_t TargetStateBufSize;
uint32_t NumTargetStates;
uint32_t ReadStateIdx;
uint32_t WriteStateIdx;
};
struct EoCServer
{
bool Unknown1;
uint64_t EoC;
uint64_t GameTime_M;
ScratchBuffer ScratchBuffer1;
ScratchBuffer ScratchBuffer2;
FixedString FS1;
FixedString FS2;
FixedString FS3;
FixedString FSGUID4;
GameStateMachine * StateMachine;
net::GameServer * GameServer;
void * field_88;
void * GlobalRandom;
void * ItemCombinationManager;
CombineManager * CombineManager;
ModManager * ModManagerServer;
bool ShutDown;
void * EntityWorldManager;
EntityWorld * EntityWorld;
EntityManager * EntityManager;
void * ArenaManager;
void * GameMasterLobbyManager;
void * LobbyManagerOrigins;
bool field_E8;
};
EntityWorld* GetEntityWorld();
}
namespace ecl
{
struct Item;
struct Character;
struct Inventory;
struct EntityManager;
struct ItemConversionHelpers
{
EntityManager* EntityManager;
void* ItemFactory;
RefMap<FixedString, ObjectSet<Item*>*> RegisteredItemsByLevel;
RefMap<FixedString, ObjectSet<Item*>*> ActivatedItemsByLevel;
};
struct CharacterConversionHelpers
{
EntityManager* EntityManager;
void* CharacterFactory;
RefMap<FixedString, ObjectSet<Character*>*> RegisteredCharactersByLevel;
RefMap<FixedString, ObjectSet<Character*>*> ActivatedCharactersByLevel;
};
struct TriggerConversionHelpers
{
void* VMT;
ecl::EntityManager* EntityManager;
void* TriggerFactory;
RefMap<FixedString, ObjectSet<void*>*> RegisteredTriggersByLevel;
};
struct ProjectileConversionHelpers
{
EntityManager* EntityManager;
void* ProjectileFactory;
RefMap<FixedString, ObjectSet<void*>*> RegisteredProjectilesByLevel;
};
struct EntityWorld : public EntityWorldBase<ComponentType>
{
inline Character* GetCharacter(char const* nameGuid, bool logError = true)
{
auto component = GetComponent(ComponentType::Character, nameGuid, logError);
if (component != nullptr) {
return (Character*)((uint8_t*)component - 8);
}
else {
return nullptr;
}
}
inline Character* GetCharacter(ObjectHandle handle, bool logError = true)
{
auto component = GetComponent(ComponentType::Character, ObjectType::ClientCharacter, handle, logError);
if (component != nullptr) {
return (Character*)((uint8_t*)component - 8);
}
else {
return nullptr;
}
}
inline Character* GetCharacter(NetId netId, bool logError = true)
{
auto component = GetComponent(ComponentType::Character, netId, logError);
if (component != nullptr) {
return (Character*)((uint8_t*)component - 8);
}
else {
return nullptr;
}
}
inline Item* GetItem(char const* nameGuid, bool logError = true)
{
auto component = GetComponent(ComponentType::Item, nameGuid, logError);
if (component != nullptr) {
return (Item*)((uint8_t*)component - 8);
}
else {
return nullptr;
}
}
inline Item* GetItem(ObjectHandle handle, bool logError = true)
{
auto component = GetComponent(ComponentType::Item, ObjectType::ClientItem, handle, logError);
if (component != nullptr) {
return (Item*)((uint8_t*)component - 8);
}
else {
return nullptr;
}
}
inline Item* GetItem(NetId netId, bool logError = true)
{
auto component = GetComponent(ComponentType::Item, netId, logError);
if (component != nullptr) {
return (Item*)((uint8_t*)component - 8);
}
else {
return nullptr;
}
}
inline eoc::CustomStatsComponent* GetCustomStatsComponentByEntityHandle(ObjectHandle entityHandle)
{
return (eoc::CustomStatsComponent*)GetComponentByEntityHandle(ComponentType::CustomStats, entityHandle);
}
};
struct EntityManager : public dse::EntityManager<EntityWorld>
{
void* NetEventManagerVMT;
ItemConversionHelpers ItemConversionHelpers;
CharacterConversionHelpers CharacterConversionHelpers;
TriggerConversionHelpers TriggerConversionHelpers;
uint64_t Unknown[3];
ProjectileConversionHelpers ProjectileConversionHelpers;
void* WallManager;
ObjectSet<FixedString> TriggerTypes;
ObjectSet<FixedString> OS_FS2;
};
struct InventoryFactory : public NetworkObjectFactory<ecl::Inventory, (uint32_t)ObjectType::ClientInventory>
{
};
struct ActivationManager
{
struct ActivationGroup
{
ObjectSet<Item*> Items;
ObjectSet<Character*> Characters;
};
void* VMT;
__int64 field_8;
void* VMT2;
__int64 field_18;
RefMap<FixedString, ActivationGroup> ChangedGroups;
float ActivationRange1;
float DeactivationRange1;
float ActivationRange2;
float DeactivationRange2;
};
struct GameStateMachine : public ProtectedGameObject<GameStateMachine>
{
uint8_t Unknown;
void* CurrentState;
GameState State;
};
struct EoCClient : public ProtectedGameObject<EoCClient>
{
void* VMT;
void* GameEventManagerVMT;
uint64_t field_10;
void* NetEventManagerVMT;
uint64_t field_20;
void* VMT2;
void* VMT3;
void* EoC;
GameStateMachine** GameStateMachine;
net::Client* GameClient;
uint64_t field_50;
void* LobbyLogicManager;
void* ArenaManager;
FixedString FS1;
FixedString LevelName;
FixedString SomeGUID;
FixedString FS_CurrentSaveGameGUID;
bool IsLoading;
bool IsLoading2;
PrimitiveSet<int> PrimitiveSetUnkn;
uint16_t field_B0;
void* Random;
void* ItemCombinationManager;
char field_C8;
uint64_t ScratchStr[4];
ScratchBuffer ScratchBuf;
ModManager* ModManager;
void* ChatManager;
STDWString WStr_CurrentHost_M;
uint64_t SomeObject[16];
int field_1C0;
uint64_t field_1C8[2];
void* EntityWorldManager;
EntityWorld* EntityWorld;
EntityManager* EntityManager;
};
typedef void (*EoCClient__HandleError)(void* self, STDWString const* message, bool exitGame, STDWString const* a4);
typedef void (*GameStateThreaded__GameStateWorker__DoWork)(void* self);
typedef void (*GameStateEventManager__ExecuteGameStateChangedEvent)(void* self, GameState fromState, GameState toState);
EntityWorld* GetEntityWorld();
}
} | [
"infernorb@gmail.com"
] | infernorb@gmail.com |
9712d07b7e4df7351463f27103ea5123a2df2a06 | 4207bbd97a4debbf29b0cf1652c4b4d247d71647 | /src/core/DistributedRegionHash.hpp | a9011963e3fb57b0cbe2fcaaae6d72be5b2d8ad2 | [
"MIT"
] | permissive | loftyhauser/overkit | 6a94c7411191f39a8d55c8d7a5f7634d3dd6f44d | 490aa77a79bd9708d7f2af0f3069b86545a2cebc | refs/heads/master | 2022-04-29T03:25:08.181280 | 2020-03-01T22:53:34 | 2020-03-02T00:55:37 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,336 | hpp | // Copyright (c) 2020 Matthew J. Smith and Overkit contributors
// License: MIT (http://opensource.org/licenses/MIT)
#ifndef OVK_CORE_DISTRIBUTED_REGION_HASH_HPP_INCLUDED
#define OVK_CORE_DISTRIBUTED_REGION_HASH_HPP_INCLUDED
#include <ovk/core/Array.hpp>
#include <ovk/core/ArrayView.hpp>
#include <ovk/core/Box.hpp>
#include <ovk/core/Comm.hpp>
#include <ovk/core/CommunicationOps.hpp>
#include <ovk/core/DataType.hpp>
#include <ovk/core/Elem.hpp>
#include <ovk/core/Field.hpp>
#include <ovk/core/Global.hpp>
#include <ovk/core/HashableRegionTraits.hpp>
#include <ovk/core/Indexer.hpp>
#include <ovk/core/Interval.hpp>
#include <ovk/core/Map.hpp>
#include <ovk/core/Math.hpp>
#include <ovk/core/MPISerializableTraits.hpp>
#include <ovk/core/Range.hpp>
#include <ovk/core/Requires.hpp>
#include <ovk/core/Set.hpp>
#include <ovk/core/Tuple.hpp>
#include <mpi.h>
#include <cmath>
#include <cstring>
#include <memory>
#include <numeric>
#include <type_traits>
#include <utility>
namespace ovk {
namespace core {
template <typename RegionType> class distributed_region_hash;
template <typename RegionType> class distributed_region_data {
public:
using region_type = RegionType;
const region_type &Region() const { return Region_; }
int Rank() const { return Rank_; }
private:
region_type Region_;
int Rank_;
friend class distributed_region_hash<RegionType>;
};
template <typename RegionType> class distributed_region_hash_retrieved_bins {
public:
using region_data = distributed_region_data<RegionType>;
const region_data &RegionData(int iRegion) const { return RegionData_(iRegion); }
array_view<const int> BinRegionIndices(int iBin) const {
const interval<long long> &Interval = BinRegionIndicesIntervals_(iBin);
return {BinRegionIndices_.Data(Interval.Begin()), Interval};
}
private:
array<region_data> RegionData_;
map<int,interval<long long>> BinRegionIndicesIntervals_;
array<int> BinRegionIndices_;
friend class distributed_region_hash<RegionType>;
};
template <typename RegionType> class distributed_region_hash {
public:
static_assert(IsHashableRegion<RegionType>(), "Invalid region type (not hashable).");
static_assert(IsMPISerializable<RegionType>(), "Invalid region type (not MPI-serializable).");
using region_type = RegionType;
using region_traits = hashable_region_traits<region_type>;
using coord_type = typename region_traits::coord_type;
using mpi_traits = mpi_serializable_traits<region_type>;
static_assert(std::is_same<coord_type, int>::value || std::is_same<coord_type, double>::value,
"Coord type must be int or double.");
using extents_type = interval<coord_type,MAX_DIMS>;
using region_data = distributed_region_data<region_type>;
using retrieved_bins = distributed_region_hash_retrieved_bins<region_type>;
distributed_region_hash(int NumDims, comm_view Comm);
distributed_region_hash(int NumDims, comm_view Comm, array_view<const region_type> LocalRegions);
distributed_region_hash(const distributed_region_hash &Other) = delete;
distributed_region_hash(distributed_region_hash &&Other) noexcept = default;
distributed_region_hash &operator=(const distributed_region_hash &Other) = delete;
distributed_region_hash &operator=(distributed_region_hash &&Other) noexcept = default;
elem<int,2> MapToBin(const tuple<coord_type> &Point) const;
map<int,retrieved_bins> RetrieveBins(array_view<const elem<int,2>> BinIDs) const;
private:
int NumDims_;
comm_view Comm_;
extents_type GlobalExtents_;
range ProcRange_;
range_indexer<int> ProcIndexer_;
tuple<coord_type> ProcSize_;
array<int> ProcToBinMultipliers_;
array<region_data> RegionData_;
range BinRange_;
field<int> NumRegionsPerBin_;
field<long long> BinRegionIndicesStarts_;
array<int> BinRegionIndices_;
template <hashable_region_maps_to MapsTo> struct maps_to_tag {};
template <typename IndexerType> set<typename IndexerType::index_type> MapToBins_(const range
&BinRange, const IndexerType &BinIndexer, const tuple<coord_type> &LowerCorner, const
tuple<coord_type> &BinSize, const region_type &Region, maps_to_tag<
hashable_region_maps_to::SET>) const;
template <typename IndexerType> set<typename IndexerType::index_type> MapToBins_(const range
&BinRange, const IndexerType &BinIndexer, const tuple<coord_type> &LowerCorner, const
tuple<coord_type> &BinSize, const region_type &Region, maps_to_tag<
hashable_region_maps_to::RANGE>) const;
template <typename T> struct coord_type_tag {};
static interval<int,MAX_DIMS> MakeEmptyExtents_(int NumDims, coord_type_tag<int>);
static interval<double,MAX_DIMS> MakeEmptyExtents_(int NumDims, coord_type_tag<double>);
static interval<int,MAX_DIMS> UnionExtents_(const interval<int,MAX_DIMS> &Left, const
interval<int,MAX_DIMS> &Right);
static interval<double,MAX_DIMS> UnionExtents_(const interval<double,MAX_DIMS> &Left, const
interval<double,MAX_DIMS> &Right);
static tuple<int> BinDecomp_(int NumDims, const extents_type &Extents, int MaxBins);
static tuple<int> GetBinSize_(const interval<int,MAX_DIMS> &Extents, const tuple<int> &NumBins);
static tuple<double> GetBinSize_(const interval<double,MAX_DIMS> &Extents, const tuple<int>
&NumBins);
};
}}
#include <ovk/core/DistributedRegionHash.inl>
#endif
| [
"mjsmith6@illinois.edu"
] | mjsmith6@illinois.edu |
e12d1d34f5c2afbf2b75de6d24ece4abcc2e5d4b | 9d9e74fcfaddbc7ebfa72894d1e117669dbd0a7d | /src/views/fight.hpp | 8b13a61562480d159c4bc8f0b56ce02a23dbf7da | [
"BSL-1.0"
] | permissive | SuperFola/Unamed-Endive | fadeb173dcd175c2fa40bc8d5b5f26db0d494a39 | 530678fc622b04648dfce592a4671f7706779cbb | refs/heads/master | 2022-12-25T09:18:40.940516 | 2020-10-08T08:04:01 | 2020-10-08T08:04:01 | 66,569,631 | 5 | 1 | null | 2018-05-07T12:11:29 | 2016-08-25T15:21:42 | C++ | UTF-8 | C++ | false | false | 3,706 | hpp | #ifndef DEF_FIGHT_VIEW
#define DEF_FIGHT_VIEW
#include <SFML/Graphics.hpp>
#include <string>
#include <map>
#include "view.hpp"
#include "../abstract/container.hpp"
#include "../constants.hpp"
#ifdef PLATFORM_WIN
#include <windows.h>
#endif // PLATFORM_WIN
#include "../objects/dex.hpp"
#include "../entities/creature.hpp"
#include "../abstract/equip.hpp"
#include "../abstract/creatures_loader.hpp"
#include "../abstract/defines.hpp"
#include "../particles/particles.hpp"
#include "../scripting/types.hpp"
#include "../abstract/config.hpp"
#define X_TEXT_SELCREA_UI 200
#define MX_TEXT_SELCREA_UI 400
#define Y_TEXT_SELCREA_UI 200
#define MY_TEXT_SELCREA_UI 400
#define YS_TEXT_SELCREA_UI 30
#define CREATURE_HEIGHT 160.0f
#define START_X 269.0f
#define SPACEMENT_X 100.0f
#define SPACING_ATK_LISTING_Y 30
#define ENDING_CNT 260
#define NODEAD 0
#define DEADME 1
#define DEADOTH 2
std::string convert_sort(SortilegeType);
class FightView : public View
{
private:
Container<sf::Texture> textures;
std::map<std::string, sf::Sprite> sprites;
Container<sf::Text> texts;
std::vector<Creature*> adv;
std::vector<int> cibles;
sf::Font font;
sf::Text action;
sf::Text enemy;
sf::Text me;
sf::Text e_pv;
sf::Text m_pv;
FightEnv env;
Dex* dex;
Equip* equip;
Equip* pc;
CreaturesLoader* crealoader;
int __c; // for the capture
int __selected; // for the UI when we select an enemy
bool selectingcrea; // are we selected a creature (change it)
bool selectingadv; // or the enemy (to attack it)
int __count_before_flyaway; // count down in frames
bool can_escape;
sf::RectangleShape life1;
sf::RectangleShape life2;
int ui_my_selected; // to know which creature we are currently displaying the stats
int ui_enemy_selected; // same
bool attacking;
sf::Text attack_name;
std::vector<bool> attacks_used;
bool has_selected_an_atk;
int atk_using_sort_of;
int attack_frames_count;
bool display_attack;
bool my_turn;
bool attacking_enemy;
ParticleSystem particles;
float eq_x;
float eq_y;
int ending;
bool enemy_is_attacking;
int enemy_wait_until_next;
bool lock;
int wait_give_xp;
int whoisdead;
bool iamattacking;
int wait;
int giving_xp_to;
bool random_encounter;
std::vector<fight_opponent> _opponents;
sf::Texture black_fade;
sf::Sprite black_fade_sprite;
const std::string __adv = "adv";
const std::string __me = "me";
const std::string BKG1 = "bkg1";
const std::string BKG2 = "bkg2";
const std::string BKG3 = "bkg3";
const std::string GRD1 = "grd1";
const std::string GRD2 = "grd2";
const std::string GRD3 = "grd3";
const std::string TOOLS = "toolbar";
const std::string LIFEBAR = "lifebar";
const std::string LIFEBAR2 = "lifebar2";
const std::string OVERLAY = "overlay";
const std::string BKG_SELECT = "background_select";
void attack(int, int);
void e_attack(int);
void check_statuses();
void give_xp(bool);
void on_end();
public:
FightView();
~FightView();
bool load() override;
void render(sf::RenderWindow&) override;
int process_event(sf::Event&, sf::Time) override;
void update(sf::RenderWindow&, sf::Time) override;
void encounter();
void set_env(FightEnv);
void set_dex(Dex*);
void set_equip(Equip*);
void set_pc(Equip*);
void set_crealoader(CreaturesLoader*);
void start();
void set_escape(bool);
void set_random_encounter(bool);
void set_opponents(std::vector<fight_opponent>);
static int ATK_FR_CNT();
};
#endif // DEF_FIGHT_VIEW
| [
"folaefolc@outlook.fr"
] | folaefolc@outlook.fr |
7a0d6ee7d192ed943a50a392e03dd6146e2a9bf5 | d147f9c98bae97ed79cef2597977f61c83724c39 | /STLWorkspace/Exam/DXExam1/DirectX_Assignment/02. Direct3D/Engine.cpp | ed5f37ca4a01cb33ef6354fcda59302ece95a4ca | [] | no_license | daaie/SkillTreeLab | 28ec4bea1057d4c44a5f15bcfb1e0178358f85e1 | 43482b9a4732836ad7b0f2df5c29c6b1debfa913 | refs/heads/master | 2020-03-17T05:06:08.824446 | 2018-07-17T04:49:47 | 2018-07-17T04:49:47 | 133,302,446 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 408 | cpp | #include "Engine.h"
#include <d3d11.h>
Engine::Engine(HINSTANCE hinstance)
: DXApp(hinstance)
{
}
Engine::~Engine()
{
}
bool Engine::Init()
{
if (DXApp::Init() == false)
return false;
return true;
}
void Engine::Update()
{
}
void Engine::Render()
{
float color[4] = { 0.0f, 0.0f, 0.0f, 1.0f };
pDeviceContext->ClearRenderTargetView(pRenderTargetView, color);
pSwapChain->Present(0, 0);
}
| [
"pda4423@gmail.com"
] | pda4423@gmail.com |
3c6df2fc0b2a480a1dad23087ed914c11e6168fc | 2abf706df55f5f73c5df95ea2f7c1b51bc73a784 | /AudioEngine.h | a7cc9262ff85819696376e1ce2e037b47cc69e24 | [] | no_license | skyshaver/FMODEngine | 579b67e31c1b3a6800ebccf4fce4bcff66dc474f | 7567e57c722e3266bf91a39ae405b109ab609647 | refs/heads/master | 2022-11-27T13:22:10.763303 | 2020-08-03T18:59:40 | 2020-08-03T18:59:40 | 283,329,724 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,350 | h | #pragma once
#include <string>
#include <unordered_map>
#include <vector>
#include <cmath>
#include <iostream>
#include <memory>
#include "fmod_studio.hpp"
#include "fmod.hpp"
#include "glm/glm.hpp"
struct Implementation
{
Implementation();
~Implementation();
void update();
FMOD::Studio::System* studioSystem;
FMOD::System* system;
int nextChannelId = 0;
using SoundMap = std::unordered_map<std::string, FMOD::Sound*>;
using ChannelMap = std::unordered_map<int, FMOD::Channel*>;
using EventMap = std::unordered_map<std::string, FMOD::Studio::EventInstance*>;
using BankMap = std::unordered_map<std::string, FMOD::Studio::Bank*>;
BankMap banks;
EventMap events;
SoundMap sounds;
ChannelMap channels;
};
class AudioEngine
{
public:
static void init();
static void update();
//static void shutdown();
static int errorCheck(FMOD_RESULT result);
void loadBank(const std::string& bankName, FMOD_STUDIO_LOAD_BANK_FLAGS flags);
void loadEvent(const std::string& eventName);
void loadSound(const std::string& soundName, bool is3D = false, bool isLooping = false, bool isStream = false);
void unLoadSound(const std::string& strSoundName);
// void set3dListenerAndOrientation(const Vector3& vPos = Vector3{ 0, 0, 0 }, float fVolumedB = 0.0f);
int playSound(const std::string& soundName, float volumedB = 0.0f, const glm::vec3 pos = { 0, 0, 0 });
void playEvent(const std::string& eventName);
// void stopChannel(int nChannelId);
void stopEvent(const std::string& eventName, bool isImmediate = false);
void geteventParameter(const std::string& eventName, const std::string& eventParameter, float* parameter);
void setEventParameter(const std::string& eventName, const std::string& parameterName, float value);
// void stopAllChannels();
void setChannel3dPosition(int channelId, const glm::vec3& pos);
void setChannelVolume(int channelId, float volumedB);
// bool isPlaying(int nChannelId) const;
bool isEventPlaying(const std::string& eventName) const;
float dBToVolume(float dB);
float volumeTodB(float volume);
unsigned int getSoundLengthInMS(const std::string& soundName);
FMOD_VECTOR vectorToFmod(const glm::vec3& pos);
//static std::unique_ptr<Implementation> implementation;
};
| [
"skyshaver@me.com"
] | skyshaver@me.com |
581861080f4a3db2808c0de4d82ef2557fd9723a | 7a17d90d655482898c6777c101d3ab6578ccc6ba | /SDK/PUBG_CameraShake_GrenadeDamage_Right_TPP_parameters.hpp | a8d16fa509dd5b89117acbd6f34e25b5eb296a61 | [] | no_license | Chordp/PUBG-SDK | 7625f4a419d5b028f7ff5afa5db49e18fcee5de6 | 1b23c750ec97cb842bf5bc2b827da557e4ff828f | refs/heads/master | 2022-08-25T10:07:15.641579 | 2022-08-14T14:12:48 | 2022-08-14T14:12:48 | 245,409,493 | 17 | 7 | null | null | null | null | UTF-8 | C++ | false | false | 1,970 | hpp | #pragma once
// PUBG (9.1.5.3) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "PUBG_CameraShake_GrenadeDamage_Right_TPP_classes.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Parameters
//---------------------------------------------------------------------------
// Function Engine.CameraShake.ReceiveStopShake
struct UCameraShake_GrenadeDamage_Right_TPP_C_ReceiveStopShake_Params
{
bool bImmediately; // (Parm, ZeroConstructor, IsPlainOldData)
};
// Function Engine.CameraShake.ReceivePlayShake
struct UCameraShake_GrenadeDamage_Right_TPP_C_ReceivePlayShake_Params
{
float Scale; // (Parm, ZeroConstructor, IsPlainOldData)
};
// Function Engine.CameraShake.ReceiveIsFinished
struct UCameraShake_GrenadeDamage_Right_TPP_C_ReceiveIsFinished_Params
{
bool ReturnValue; // (Parm, OutParm, ZeroConstructor, ReturnParm, IsPlainOldData)
};
// Function Engine.CameraShake.BlueprintUpdateCameraShake
struct UCameraShake_GrenadeDamage_Right_TPP_C_BlueprintUpdateCameraShake_Params
{
float DeltaTime; // (Parm, ZeroConstructor, IsPlainOldData)
float ALPHA; // (Parm, ZeroConstructor, IsPlainOldData)
struct FMinimalViewInfo POV; // (ConstParm, Parm, OutParm, ReferenceParm)
struct FMinimalViewInfo ModifiedPOV; // (Parm, OutParm)
};
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
| [
"1263178881@qq.com"
] | 1263178881@qq.com |
2555752bbc37795817f1095be90b19d19d7029cc | 38c29c3c4c97e4831b2882d02f245161ccdd63e7 | /VoxelEngine_V2/engine/textures/BaseTexture.h | 47d242072b97b2cc45a02411a53094b0b104a97c | [] | no_license | incetents/VoxelEngine_V2 | fc7f9ac7f0977fa9467b0d0516dd8eddb661bb33 | 91d5c2e96a297ac8144a8a2c78216943cfed60dc | refs/heads/master | 2020-04-06T08:57:28.877501 | 2020-01-26T05:05:57 | 2020-01-26T05:05:57 | 157,323,605 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,080 | h | // Copyright (c) 2020 Emmanuel Lajeunesse
#pragma once
#include "../rendering/Graphics.h"
#include "../utilities/Types.h"
#include "../utilities/Macros.h"
#include "../math/Color.h"
#include <map>
#include <string>
namespace Vxl
{
class RenderBuffer;
class BaseTexture
{
protected:
// Data //
TextureID m_id = -1;
bool m_loaded = false;
bool m_mipMapping = false;
int m_width;
int m_height;
int m_channelCount;
Color4F m_borderColor = Color4F(0, 0, 0, 1);
TextureType m_type;
TextureWrapping m_wrapMode;
TextureFilter m_filterMode;
TextureFormat m_formatType;
TextureChannelType m_channelType;
TexturePixelType m_pixelType;
AnisotropicMode m_anisotropicMode;
// Creation/Deletion
void load();
void unload();
// Storage
virtual void createStorage(); // Create space for texture [immutable, cannot be resized]
virtual void setStorage(const void* pixels);
// Utility
void updateParameters();
void updateMipmapping();
void flipImageVertically(uint8_t* imagePixels);
public:
BaseTexture(const BaseTexture&) = delete;
BaseTexture(
TextureType Type,
TextureWrapping WrapMode = TextureWrapping::REPEAT,
TextureFilter FilterMode = TextureFilter::LINEAR,
TextureFormat FormatType = TextureFormat::RGBA8,
TextureChannelType ChannelType = TextureChannelType::RGBA,
TexturePixelType PixelType = TexturePixelType::UNSIGNED_BYTE,
AnisotropicMode AnisotropicMode = AnisotropicMode::NONE,
bool MipMapping = false
);
virtual ~BaseTexture();
void bind(TextureLevel layer) const;
void bind() const;
void unbind() const;
//void copy(const BaseTexture& _texture);
//void copy(const RenderBuffer& _texture);
void setWrapMode(TextureWrapping W);
void setFilterMode(TextureFilter filter);
void setAnistropicMode(AnisotropicMode Anso);
// only works if min filter is [clamp to border]
void setBorderColor(Color4F color);
void setGLName(const std::string& glName);
inline TextureID getID(void) const
{
return m_id;
}
inline bool isMipMapping(void) const
{
return m_mipMapping;
}
inline int getWidth(void) const
{
return m_width;
}
inline int getHeight(void) const
{
return m_height;
}
inline int getChannelCount(void) const
{
return m_channelCount;
}
inline Color4F getBorderColor(void) const
{
return m_borderColor;
}
inline TextureType getType(void) const
{
return m_type;
}
inline TextureWrapping getWrapMode(void) const
{
return m_wrapMode;
}
inline TextureFilter getFilterMode(void) const
{
return m_filterMode;
}
inline TextureFormat getFormatType(void) const
{
return m_formatType;
}
inline TextureChannelType getChannelType(void) const
{
return m_channelType;
}
inline TexturePixelType getPixelType(void) const
{
return m_pixelType;
}
virtual bool isLoaded(void) const
{
return true;
}
};
} | [
"incetents99@gmail.com"
] | incetents99@gmail.com |
b0bb7fcf485c8415c7d601a4b8602ee7521bc02d | d016a5ca6f4bd9e24d818895f6b807b9578e30a2 | /Bank_Managenmet_System/Main.cpp | 62b768e4433307c75fb5023ee73025ea9e01ded3 | [] | no_license | Xuandai2311/Bank_Managenmet_System | 283df3ffc84450f321315fba634367a1c85d4485 | 1b8d6975aced37fbce6a07d2f6a3cec5df9da05b | refs/heads/master | 2023-02-04T12:25:24.872394 | 2020-12-17T13:31:02 | 2020-12-17T13:31:02 | 321,990,344 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 114 | cpp | #include <iostream>
#include "ManagerAll.h"
using namespace std;
int main() {
ManagerAll all;
all.Wellcome();
} | [
"xuandai2311@gmail.com"
] | xuandai2311@gmail.com |
a925dc5988956ea09a05c0a3db097c152145b748 | 15203435a6619321bee044539265f0be5d6a2e7b | /the-water/Temp/il2cppOutput/il2cppOutput/Il2CppCompilerCalculateTypeValuesTable.cpp | 457554bd61b654369c4555cb019f3d034823a810 | [] | no_license | rachelggarza/head-above | 724fef17729ce18652e1ad0a468e6c2546398429 | 205b7f9f9909bfd82cf37b2c13149ba06a37531e | refs/heads/master | 2021-06-21T13:13:14.755575 | 2017-08-17T21:55:04 | 2017-08-17T21:55:04 | 100,616,507 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 324,434 | cpp | #include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <cstring>
#include <string.h>
#include <stdio.h>
#include <cmath>
#include <limits>
#include <assert.h>
#include "class-internals.h"
#include "codegen/il2cpp-codegen.h"
extern const int32_t g_FieldOffsetTable5[3];
extern const int32_t g_FieldOffsetTable11[3];
extern const int32_t g_FieldOffsetTable12[1];
extern const int32_t g_FieldOffsetTable14[1];
extern const int32_t g_FieldOffsetTable15[1];
extern const int32_t g_FieldOffsetTable16[1];
extern const int32_t g_FieldOffsetTable17[1];
extern const int32_t g_FieldOffsetTable18[3];
extern const int32_t g_FieldOffsetTable19[1];
extern const int32_t g_FieldOffsetTable20[1];
extern const int32_t g_FieldOffsetTable21[3];
extern const int32_t g_FieldOffsetTable26[10];
extern const int32_t g_FieldOffsetTable27[4];
extern const int32_t g_FieldOffsetTable30[8];
extern const int32_t g_FieldOffsetTable31[14];
extern const int32_t g_FieldOffsetTable32[9];
extern const int32_t g_FieldOffsetTable33[3];
extern const int32_t g_FieldOffsetTable34[2];
extern const int32_t g_FieldOffsetTable36[2];
extern const int32_t g_FieldOffsetTable37[2];
extern const int32_t g_FieldOffsetTable38[9];
extern const int32_t g_FieldOffsetTable39[1];
extern const int32_t g_FieldOffsetTable41[2];
extern const int32_t g_FieldOffsetTable42[3];
extern const int32_t g_FieldOffsetTable43[1];
extern const int32_t g_FieldOffsetTable44[4];
extern const int32_t g_FieldOffsetTable51[8];
extern const int32_t g_FieldOffsetTable57[11];
extern const int32_t g_FieldOffsetTable59[1];
extern const int32_t g_FieldOffsetTable60[1];
extern const int32_t g_FieldOffsetTable63[2];
extern const int32_t g_FieldOffsetTable64[9];
extern const int32_t g_FieldOffsetTable65[7];
extern const int32_t g_FieldOffsetTable67[1];
extern const int32_t g_FieldOffsetTable68[2];
extern const int32_t g_FieldOffsetTable69[1];
extern const int32_t g_FieldOffsetTable72[2];
extern const int32_t g_FieldOffsetTable74[2];
extern const int32_t g_FieldOffsetTable75[1];
extern const int32_t g_FieldOffsetTable77[1];
extern const int32_t g_FieldOffsetTable78[5];
extern const int32_t g_FieldOffsetTable79[1];
extern const int32_t g_FieldOffsetTable80[1];
extern const int32_t g_FieldOffsetTable83[3];
extern const int32_t g_FieldOffsetTable84[4];
extern const int32_t g_FieldOffsetTable85[1];
extern const int32_t g_FieldOffsetTable86[2];
extern const int32_t g_FieldOffsetTable89[1];
extern const int32_t g_FieldOffsetTable95[7];
extern const int32_t g_FieldOffsetTable96[8];
extern const int32_t g_FieldOffsetTable97[6];
extern const int32_t g_FieldOffsetTable98[8];
extern const int32_t g_FieldOffsetTable99[1];
extern const int32_t g_FieldOffsetTable100[7];
extern const int32_t g_FieldOffsetTable102[1];
extern const int32_t g_FieldOffsetTable103[4];
extern const int32_t g_FieldOffsetTable104[5];
extern const int32_t g_FieldOffsetTable105[4];
extern const int32_t g_FieldOffsetTable106[3];
extern const int32_t g_FieldOffsetTable107[1];
extern const int32_t g_FieldOffsetTable108[2];
extern const int32_t g_FieldOffsetTable109[1];
extern const int32_t g_FieldOffsetTable110[22];
extern const int32_t g_FieldOffsetTable111[7];
extern const int32_t g_FieldOffsetTable112[13];
extern const int32_t g_FieldOffsetTable113[8];
extern const int32_t g_FieldOffsetTable114[2];
extern const int32_t g_FieldOffsetTable115[5];
extern const int32_t g_FieldOffsetTable116[6];
extern const int32_t g_FieldOffsetTable117[4];
extern const int32_t g_FieldOffsetTable118[22];
extern const int32_t g_FieldOffsetTable121[7];
extern const int32_t g_FieldOffsetTable123[4];
extern const int32_t g_FieldOffsetTable124[4];
extern const int32_t g_FieldOffsetTable125[2];
extern const int32_t g_FieldOffsetTable127[8];
extern const int32_t g_FieldOffsetTable128[15];
extern const int32_t g_FieldOffsetTable130[1];
extern const int32_t g_FieldOffsetTable131[4];
extern const int32_t g_FieldOffsetTable132[14];
extern const int32_t g_FieldOffsetTable134[5];
extern const int32_t g_FieldOffsetTable135[9];
extern const int32_t g_FieldOffsetTable136[5];
extern const int32_t g_FieldOffsetTable137[4];
extern const int32_t g_FieldOffsetTable139[4];
extern const int32_t g_FieldOffsetTable140[4];
extern const int32_t g_FieldOffsetTable141[4];
extern const int32_t g_FieldOffsetTable142[14];
extern const int32_t g_FieldOffsetTable144[12];
extern const int32_t g_FieldOffsetTable145[2];
extern const int32_t g_FieldOffsetTable146[2];
extern const int32_t g_FieldOffsetTable147[17];
extern const int32_t g_FieldOffsetTable148[7];
extern const int32_t g_FieldOffsetTable149[15];
extern const int32_t g_FieldOffsetTable150[26];
extern const int32_t g_FieldOffsetTable152[1];
extern const int32_t g_FieldOffsetTable153[5];
extern const int32_t g_FieldOffsetTable154[8];
extern const int32_t g_FieldOffsetTable155[3];
extern const int32_t g_FieldOffsetTable156[1];
extern const int32_t g_FieldOffsetTable157[3];
extern const int32_t g_FieldOffsetTable158[2];
extern const int32_t g_FieldOffsetTable159[2];
extern const int32_t g_FieldOffsetTable160[3];
extern const int32_t g_FieldOffsetTable164[2];
extern const int32_t g_FieldOffsetTable165[4];
extern const int32_t g_FieldOffsetTable166[8];
extern const int32_t g_FieldOffsetTable167[8];
extern const int32_t g_FieldOffsetTable168[6];
extern const int32_t g_FieldOffsetTable169[3];
extern const int32_t g_FieldOffsetTable170[13];
extern const int32_t g_FieldOffsetTable173[2];
extern const int32_t g_FieldOffsetTable174[2];
extern const int32_t g_FieldOffsetTable178[1];
extern const int32_t g_FieldOffsetTable181[2];
extern const int32_t g_FieldOffsetTable182[16];
extern const int32_t g_FieldOffsetTable183[1];
extern const int32_t g_FieldOffsetTable184[4];
extern const int32_t g_FieldOffsetTable185[1];
extern const int32_t g_FieldOffsetTable186[1];
extern const int32_t g_FieldOffsetTable187[1];
extern const int32_t g_FieldOffsetTable188[1];
extern const int32_t g_FieldOffsetTable190[1];
extern const int32_t g_FieldOffsetTable197[2];
extern const int32_t g_FieldOffsetTable198[5];
extern const int32_t g_FieldOffsetTable199[4];
extern const int32_t g_FieldOffsetTable200[2];
extern const int32_t g_FieldOffsetTable201[1];
extern const int32_t g_FieldOffsetTable202[5];
extern const int32_t g_FieldOffsetTable203[5];
extern const int32_t g_FieldOffsetTable204[1];
extern const int32_t g_FieldOffsetTable205[1];
extern const int32_t g_FieldOffsetTable208[3];
extern const int32_t g_FieldOffsetTable209[4];
extern const int32_t g_FieldOffsetTable210[3];
extern const int32_t g_FieldOffsetTable211[3];
extern const int32_t g_FieldOffsetTable212[1];
extern const int32_t g_FieldOffsetTable214[3];
extern const int32_t g_FieldOffsetTable215[2];
extern const int32_t g_FieldOffsetTable216[14];
extern const int32_t g_FieldOffsetTable217[2];
extern const int32_t g_FieldOffsetTable218[1];
extern const int32_t g_FieldOffsetTable219[4];
extern const int32_t g_FieldOffsetTable220[8];
extern const int32_t g_FieldOffsetTable221[1];
extern const int32_t g_FieldOffsetTable222[1];
extern const int32_t g_FieldOffsetTable223[1];
extern const int32_t g_FieldOffsetTable229[6];
extern const int32_t g_FieldOffsetTable230[3];
extern const int32_t g_FieldOffsetTable231[1];
extern const int32_t g_FieldOffsetTable232[6];
extern const int32_t g_FieldOffsetTable233[2];
extern const int32_t g_FieldOffsetTable234[4];
extern const int32_t g_FieldOffsetTable235[9];
extern const int32_t g_FieldOffsetTable236[1];
extern const int32_t g_FieldOffsetTable237[1];
extern const int32_t g_FieldOffsetTable238[5];
extern const int32_t g_FieldOffsetTable239[3];
extern const int32_t g_FieldOffsetTable240[4];
extern const int32_t g_FieldOffsetTable241[4];
extern const int32_t g_FieldOffsetTable243[3];
extern const int32_t g_FieldOffsetTable244[6];
extern const int32_t g_FieldOffsetTable245[1];
extern const int32_t g_FieldOffsetTable246[4];
extern const int32_t g_FieldOffsetTable247[3];
extern const int32_t g_FieldOffsetTable249[1];
extern const int32_t g_FieldOffsetTable250[8];
extern const int32_t g_FieldOffsetTable251[3];
extern const int32_t g_FieldOffsetTable252[4];
extern const int32_t g_FieldOffsetTable256[6];
extern const int32_t g_FieldOffsetTable257[10];
extern const int32_t g_FieldOffsetTable258[40];
extern const int32_t g_FieldOffsetTable259[9];
extern const int32_t g_FieldOffsetTable260[6];
extern const int32_t g_FieldOffsetTable261[58];
extern const int32_t g_FieldOffsetTable262[11];
extern const int32_t g_FieldOffsetTable263[3];
extern const int32_t g_FieldOffsetTable264[1];
extern const int32_t g_FieldOffsetTable265[7];
extern const int32_t g_FieldOffsetTable266[39];
extern const int32_t g_FieldOffsetTable267[18];
extern const int32_t g_FieldOffsetTable268[9];
extern const int32_t g_FieldOffsetTable269[5];
extern const int32_t g_FieldOffsetTable270[31];
extern const int32_t g_FieldOffsetTable272[6];
extern const int32_t g_FieldOffsetTable273[7];
extern const int32_t g_FieldOffsetTable275[2];
extern const int32_t g_FieldOffsetTable278[1];
extern const int32_t g_FieldOffsetTable279[4];
extern const int32_t g_FieldOffsetTable280[15];
extern const int32_t g_FieldOffsetTable281[4];
extern const int32_t g_FieldOffsetTable282[7];
extern const int32_t g_FieldOffsetTable283[2];
extern const int32_t g_FieldOffsetTable284[8];
extern const int32_t g_FieldOffsetTable285[7];
extern const int32_t g_FieldOffsetTable286[14];
extern const int32_t g_FieldOffsetTable289[9];
extern const int32_t g_FieldOffsetTable290[4];
extern const int32_t g_FieldOffsetTable292[10];
extern const int32_t g_FieldOffsetTable293[6];
extern const int32_t g_FieldOffsetTable294[2];
extern const int32_t g_FieldOffsetTable295[25];
extern const int32_t g_FieldOffsetTable296[6];
extern const int32_t g_FieldOffsetTable297[8];
extern const int32_t g_FieldOffsetTable299[2];
extern const int32_t g_FieldOffsetTable300[4];
extern const int32_t g_FieldOffsetTable301[1];
extern const int32_t g_FieldOffsetTable303[6];
extern const int32_t g_FieldOffsetTable304[13];
extern const int32_t g_FieldOffsetTable306[10];
extern const int32_t g_FieldOffsetTable307[3];
extern const int32_t g_FieldOffsetTable308[1];
extern const int32_t g_FieldOffsetTable310[1];
extern const int32_t g_FieldOffsetTable311[2];
extern const int32_t g_FieldOffsetTable313[2];
extern const int32_t g_FieldOffsetTable314[2];
extern const int32_t g_FieldOffsetTable316[8];
extern const int32_t g_FieldOffsetTable317[6];
extern const int32_t g_FieldOffsetTable318[21];
extern const int32_t g_FieldOffsetTable319[5];
extern const int32_t g_FieldOffsetTable320[11];
extern const int32_t g_FieldOffsetTable321[12];
extern const int32_t g_FieldOffsetTable322[2];
extern const int32_t g_FieldOffsetTable323[5];
extern const int32_t g_FieldOffsetTable324[4];
extern const int32_t g_FieldOffsetTable325[2];
extern const int32_t g_FieldOffsetTable327[14];
extern const int32_t g_FieldOffsetTable328[3];
extern const int32_t g_FieldOffsetTable329[2];
extern const int32_t g_FieldOffsetTable330[1];
extern const int32_t g_FieldOffsetTable331[1];
extern const int32_t g_FieldOffsetTable332[18];
extern const int32_t g_FieldOffsetTable333[2];
extern const int32_t g_FieldOffsetTable334[13];
extern const int32_t g_FieldOffsetTable335[1];
extern const int32_t g_FieldOffsetTable336[8];
extern const int32_t g_FieldOffsetTable337[1];
extern const int32_t g_FieldOffsetTable338[226];
extern const int32_t g_FieldOffsetTable339[19];
extern const int32_t g_FieldOffsetTable340[4];
extern const int32_t g_FieldOffsetTable341[10];
extern const int32_t g_FieldOffsetTable342[3];
extern const int32_t g_FieldOffsetTable343[6];
extern const int32_t g_FieldOffsetTable344[30];
extern const int32_t g_FieldOffsetTable345[21];
extern const int32_t g_FieldOffsetTable346[9];
extern const int32_t g_FieldOffsetTable348[10];
extern const int32_t g_FieldOffsetTable350[1];
extern const int32_t g_FieldOffsetTable351[1];
extern const int32_t g_FieldOffsetTable352[1];
extern const int32_t g_FieldOffsetTable353[1];
extern const int32_t g_FieldOffsetTable354[1];
extern const int32_t g_FieldOffsetTable355[1];
extern const int32_t g_FieldOffsetTable356[1];
extern const int32_t g_FieldOffsetTable357[1];
extern const int32_t g_FieldOffsetTable358[1];
extern const int32_t g_FieldOffsetTable359[1];
extern const int32_t g_FieldOffsetTable360[15];
extern const int32_t g_FieldOffsetTable361[6];
extern const int32_t g_FieldOffsetTable362[1];
extern const int32_t g_FieldOffsetTable363[1];
extern const int32_t g_FieldOffsetTable364[1];
extern const int32_t g_FieldOffsetTable365[1];
extern const int32_t g_FieldOffsetTable367[21];
extern const int32_t g_FieldOffsetTable368[6];
extern const int32_t g_FieldOffsetTable369[2];
extern const int32_t g_FieldOffsetTable370[3];
extern const int32_t g_FieldOffsetTable371[2];
extern const int32_t g_FieldOffsetTable372[2];
extern const int32_t g_FieldOffsetTable373[5];
extern const int32_t g_FieldOffsetTable374[1];
extern const int32_t g_FieldOffsetTable376[20];
extern const int32_t g_FieldOffsetTable378[3];
extern const int32_t g_FieldOffsetTable379[3];
extern const int32_t g_FieldOffsetTable380[5];
extern const int32_t g_FieldOffsetTable381[10];
extern const int32_t g_FieldOffsetTable382[25];
extern const int32_t g_FieldOffsetTable384[15];
extern const int32_t g_FieldOffsetTable386[1];
extern const int32_t g_FieldOffsetTable387[10];
extern const int32_t g_FieldOffsetTable388[8];
extern const int32_t g_FieldOffsetTable389[2];
extern const int32_t g_FieldOffsetTable390[5];
extern const int32_t g_FieldOffsetTable393[5];
extern const int32_t g_FieldOffsetTable394[3];
extern const int32_t g_FieldOffsetTable395[3];
extern const int32_t g_FieldOffsetTable396[5];
extern const int32_t g_FieldOffsetTable397[7];
extern const int32_t g_FieldOffsetTable398[5];
extern const int32_t g_FieldOffsetTable402[12];
extern const int32_t g_FieldOffsetTable403[7];
extern const int32_t g_FieldOffsetTable404[1];
extern const int32_t g_FieldOffsetTable405[2];
extern const int32_t g_FieldOffsetTable406[6];
extern const int32_t g_FieldOffsetTable407[9];
extern const int32_t g_FieldOffsetTable409[3];
extern const int32_t g_FieldOffsetTable410[4];
extern const int32_t g_FieldOffsetTable411[5];
extern const int32_t g_FieldOffsetTable415[32];
extern const int32_t g_FieldOffsetTable416[1];
extern const int32_t g_FieldOffsetTable418[1];
extern const int32_t g_FieldOffsetTable419[5];
extern const int32_t g_FieldOffsetTable420[21];
extern const int32_t g_FieldOffsetTable421[13];
extern const int32_t g_FieldOffsetTable422[3];
extern const int32_t g_FieldOffsetTable423[2];
extern const int32_t g_FieldOffsetTable424[3];
extern const int32_t g_FieldOffsetTable425[4];
extern const int32_t g_FieldOffsetTable427[1];
extern const int32_t g_FieldOffsetTable428[2];
extern const int32_t g_FieldOffsetTable429[1];
extern const int32_t g_FieldOffsetTable430[1];
extern const int32_t g_FieldOffsetTable432[4];
extern const int32_t g_FieldOffsetTable434[4];
extern const int32_t g_FieldOffsetTable435[5];
extern const int32_t g_FieldOffsetTable437[2];
extern const int32_t g_FieldOffsetTable438[2];
extern const int32_t g_FieldOffsetTable440[6];
extern const int32_t g_FieldOffsetTable441[5];
extern const int32_t g_FieldOffsetTable442[1];
extern const int32_t g_FieldOffsetTable443[4];
extern const int32_t g_FieldOffsetTable444[1];
extern const int32_t g_FieldOffsetTable445[4];
extern const int32_t g_FieldOffsetTable446[1];
extern const int32_t g_FieldOffsetTable447[1];
extern const int32_t g_FieldOffsetTable449[1];
extern const int32_t g_FieldOffsetTable450[5];
extern const int32_t g_FieldOffsetTable451[2];
extern const int32_t g_FieldOffsetTable452[1];
extern const int32_t g_FieldOffsetTable453[2];
extern const int32_t g_FieldOffsetTable454[1];
extern const int32_t g_FieldOffsetTable456[4];
extern const int32_t g_FieldOffsetTable457[1];
extern const int32_t g_FieldOffsetTable458[2];
extern const int32_t g_FieldOffsetTable459[1];
extern const int32_t g_FieldOffsetTable460[36];
extern const int32_t g_FieldOffsetTable484[1];
extern const int32_t g_FieldOffsetTable485[2];
extern const int32_t g_FieldOffsetTable487[1];
extern const int32_t g_FieldOffsetTable491[1];
extern const int32_t g_FieldOffsetTable492[1];
extern const int32_t g_FieldOffsetTable493[5];
extern const int32_t g_FieldOffsetTable494[3];
extern const int32_t g_FieldOffsetTable495[1];
extern const int32_t g_FieldOffsetTable496[3];
extern const int32_t g_FieldOffsetTable504[3];
extern const int32_t g_FieldOffsetTable505[14];
extern const int32_t g_FieldOffsetTable506[1];
extern const int32_t g_FieldOffsetTable507[2];
extern const int32_t g_FieldOffsetTable509[1];
extern const int32_t g_FieldOffsetTable520[5];
extern const int32_t g_FieldOffsetTable521[2];
extern const int32_t g_FieldOffsetTable522[2];
extern const int32_t g_FieldOffsetTable525[8];
extern const int32_t g_FieldOffsetTable527[2];
extern const int32_t g_FieldOffsetTable528[1];
extern const int32_t g_FieldOffsetTable529[6];
extern const int32_t g_FieldOffsetTable530[5];
extern const int32_t g_FieldOffsetTable531[3];
extern const int32_t g_FieldOffsetTable532[3];
extern const int32_t g_FieldOffsetTable533[15];
extern const int32_t g_FieldOffsetTable534[1];
extern const int32_t g_FieldOffsetTable535[7];
extern const int32_t g_FieldOffsetTable536[3];
extern const int32_t g_FieldOffsetTable537[1];
extern const int32_t g_FieldOffsetTable538[4];
extern const int32_t g_FieldOffsetTable548[2];
extern const int32_t g_FieldOffsetTable549[1];
extern const int32_t g_FieldOffsetTable550[11];
extern const int32_t g_FieldOffsetTable551[1];
extern const int32_t g_FieldOffsetTable552[6];
extern const int32_t g_FieldOffsetTable553[3];
extern const int32_t g_FieldOffsetTable554[2];
extern const int32_t g_FieldOffsetTable555[10];
extern const int32_t g_FieldOffsetTable556[5];
extern const int32_t g_FieldOffsetTable560[4];
extern const int32_t g_FieldOffsetTable561[13];
extern const int32_t g_FieldOffsetTable563[1];
extern const int32_t g_FieldOffsetTable564[2];
extern const int32_t g_FieldOffsetTable565[3];
extern const int32_t g_FieldOffsetTable566[2];
extern const int32_t g_FieldOffsetTable567[6];
extern const int32_t g_FieldOffsetTable569[7];
extern const int32_t g_FieldOffsetTable571[1];
extern const int32_t g_FieldOffsetTable572[5];
extern const int32_t g_FieldOffsetTable573[5];
extern const int32_t g_FieldOffsetTable575[1];
extern const int32_t g_FieldOffsetTable576[2];
extern const int32_t g_FieldOffsetTable577[1];
extern const int32_t g_FieldOffsetTable578[1];
extern const int32_t g_FieldOffsetTable582[7];
extern const int32_t g_FieldOffsetTable583[1];
extern const int32_t g_FieldOffsetTable584[1];
extern const int32_t g_FieldOffsetTable585[9];
extern const int32_t g_FieldOffsetTable586[13];
extern const int32_t g_FieldOffsetTable587[10];
extern const int32_t g_FieldOffsetTable588[7];
extern const int32_t g_FieldOffsetTable589[5];
extern const int32_t g_FieldOffsetTable592[8];
extern const int32_t g_FieldOffsetTable593[5];
extern const int32_t g_FieldOffsetTable597[5];
extern const int32_t g_FieldOffsetTable598[2];
extern const int32_t g_FieldOffsetTable599[2];
extern const int32_t g_FieldOffsetTable600[3];
extern const int32_t g_FieldOffsetTable601[3];
extern const int32_t g_FieldOffsetTable602[3];
extern const int32_t g_FieldOffsetTable603[3];
extern const int32_t g_FieldOffsetTable604[4];
extern const int32_t g_FieldOffsetTable605[24];
extern const int32_t g_FieldOffsetTable606[9];
extern const int32_t g_FieldOffsetTable607[11];
extern const int32_t g_FieldOffsetTable608[5];
extern const int32_t g_FieldOffsetTable609[7];
extern const int32_t g_FieldOffsetTable610[2];
extern const int32_t g_FieldOffsetTable612[12];
extern const int32_t g_FieldOffsetTable613[6];
extern const int32_t g_FieldOffsetTable614[1];
extern const int32_t g_FieldOffsetTable615[2];
extern const int32_t g_FieldOffsetTable616[1];
extern const int32_t g_FieldOffsetTable617[2];
extern const int32_t g_FieldOffsetTable618[1];
extern const int32_t g_FieldOffsetTable619[14];
extern const int32_t g_FieldOffsetTable620[2];
extern const int32_t g_FieldOffsetTable621[3];
extern const int32_t g_FieldOffsetTable622[4];
extern const int32_t g_FieldOffsetTable623[3];
extern const int32_t g_FieldOffsetTable632[3];
extern const int32_t g_FieldOffsetTable634[9];
extern const int32_t g_FieldOffsetTable635[4];
extern const int32_t g_FieldOffsetTable636[1];
extern const int32_t g_FieldOffsetTable637[1];
extern const int32_t g_FieldOffsetTable638[1];
extern const int32_t g_FieldOffsetTable639[1];
extern const int32_t g_FieldOffsetTable640[5];
extern const int32_t g_FieldOffsetTable641[13];
extern const int32_t g_FieldOffsetTable647[6];
extern const int32_t g_FieldOffsetTable649[3];
extern const int32_t g_FieldOffsetTable651[5];
extern const int32_t g_FieldOffsetTable652[1];
extern const int32_t g_FieldOffsetTable653[3];
extern const int32_t g_FieldOffsetTable654[2];
extern const int32_t g_FieldOffsetTable655[2];
extern const int32_t g_FieldOffsetTable656[10];
extern const int32_t g_FieldOffsetTable661[5];
extern const int32_t g_FieldOffsetTable662[5];
extern const int32_t g_FieldOffsetTable663[9];
extern const int32_t g_FieldOffsetTable664[7];
extern const int32_t g_FieldOffsetTable665[2];
extern const int32_t g_FieldOffsetTable670[2];
extern const int32_t g_FieldOffsetTable671[6];
extern const int32_t g_FieldOffsetTable672[1];
extern const int32_t g_FieldOffsetTable673[139];
extern const int32_t g_FieldOffsetTable674[5];
extern const int32_t g_FieldOffsetTable675[15];
extern const int32_t g_FieldOffsetTable676[3];
extern const int32_t g_FieldOffsetTable679[2];
extern const int32_t g_FieldOffsetTable680[7];
extern const int32_t g_FieldOffsetTable681[9];
extern const int32_t g_FieldOffsetTable682[3];
extern const int32_t g_FieldOffsetTable683[13];
extern const int32_t g_FieldOffsetTable686[8];
extern const int32_t g_FieldOffsetTable687[8];
extern const int32_t g_FieldOffsetTable688[1];
extern const int32_t g_FieldOffsetTable689[1];
extern const int32_t g_FieldOffsetTable691[3];
extern const int32_t g_FieldOffsetTable692[6];
extern const int32_t g_FieldOffsetTable693[5];
extern const int32_t g_FieldOffsetTable698[2];
extern const int32_t g_FieldOffsetTable699[2];
extern const int32_t g_FieldOffsetTable700[4];
extern const int32_t g_FieldOffsetTable703[3];
extern const int32_t g_FieldOffsetTable704[3];
extern const int32_t g_FieldOffsetTable705[1];
extern const int32_t g_FieldOffsetTable706[3];
extern const int32_t g_FieldOffsetTable708[8];
extern const int32_t g_FieldOffsetTable710[1];
extern const int32_t g_FieldOffsetTable711[6];
extern const int32_t g_FieldOffsetTable712[10];
extern const int32_t g_FieldOffsetTable713[1];
extern const int32_t g_FieldOffsetTable714[1];
extern const int32_t g_FieldOffsetTable715[7];
extern const int32_t g_FieldOffsetTable717[6];
extern const int32_t g_FieldOffsetTable718[2];
extern const int32_t g_FieldOffsetTable720[9];
extern const int32_t g_FieldOffsetTable721[1];
extern const int32_t g_FieldOffsetTable722[3];
extern const int32_t g_FieldOffsetTable723[2];
extern const int32_t g_FieldOffsetTable724[2];
extern const int32_t g_FieldOffsetTable725[2];
extern const int32_t g_FieldOffsetTable726[2];
extern const int32_t g_FieldOffsetTable727[8];
extern const int32_t g_FieldOffsetTable729[7];
extern const int32_t g_FieldOffsetTable732[15];
extern const int32_t g_FieldOffsetTable733[2];
extern const int32_t g_FieldOffsetTable735[7];
extern const int32_t g_FieldOffsetTable736[1];
extern const int32_t g_FieldOffsetTable737[1];
extern const int32_t g_FieldOffsetTable739[7];
extern const int32_t g_FieldOffsetTable741[14];
extern const int32_t g_FieldOffsetTable743[14];
extern const int32_t g_FieldOffsetTable744[2];
extern const int32_t g_FieldOffsetTable745[4];
extern const int32_t g_FieldOffsetTable748[10];
extern const int32_t g_FieldOffsetTable749[3];
extern const int32_t g_FieldOffsetTable752[6];
extern const int32_t g_FieldOffsetTable754[3];
extern const int32_t g_FieldOffsetTable755[5];
extern const int32_t g_FieldOffsetTable756[1];
extern const int32_t g_FieldOffsetTable757[5];
extern const int32_t g_FieldOffsetTable758[9];
extern const int32_t g_FieldOffsetTable759[7];
extern const int32_t g_FieldOffsetTable760[12];
extern const int32_t g_FieldOffsetTable763[13];
extern const int32_t g_FieldOffsetTable765[5];
extern const int32_t g_FieldOffsetTable766[2];
extern const int32_t g_FieldOffsetTable767[6];
extern const int32_t g_FieldOffsetTable768[1];
extern const int32_t g_FieldOffsetTable769[1];
extern const int32_t g_FieldOffsetTable770[12];
extern const int32_t g_FieldOffsetTable771[3];
extern const int32_t g_FieldOffsetTable772[1];
extern const int32_t g_FieldOffsetTable773[7];
extern const int32_t g_FieldOffsetTable774[4];
extern const int32_t g_FieldOffsetTable775[6];
extern const int32_t g_FieldOffsetTable776[10];
extern const int32_t g_FieldOffsetTable777[1];
extern const int32_t g_FieldOffsetTable778[1];
extern const int32_t g_FieldOffsetTable779[17];
extern const int32_t g_FieldOffsetTable780[3];
extern const int32_t g_FieldOffsetTable781[3];
extern const int32_t g_FieldOffsetTable782[1];
extern const int32_t g_FieldOffsetTable783[2];
extern const int32_t g_FieldOffsetTable784[4];
extern const int32_t g_FieldOffsetTable785[5];
extern const int32_t g_FieldOffsetTable786[1];
extern const int32_t g_FieldOffsetTable787[1];
extern const int32_t g_FieldOffsetTable788[1];
extern const int32_t g_FieldOffsetTable789[6];
extern const int32_t g_FieldOffsetTable790[6];
extern const int32_t g_FieldOffsetTable791[6];
extern const int32_t g_FieldOffsetTable792[12];
extern const int32_t g_FieldOffsetTable793[3];
extern const int32_t g_FieldOffsetTable794[4];
extern const int32_t g_FieldOffsetTable795[3];
extern const int32_t g_FieldOffsetTable796[1];
extern const int32_t g_FieldOffsetTable798[2];
extern const int32_t g_FieldOffsetTable804[1];
extern const int32_t g_FieldOffsetTable806[4];
extern const int32_t g_FieldOffsetTable807[3];
extern const int32_t g_FieldOffsetTable809[8];
extern const int32_t g_FieldOffsetTable810[2];
extern const int32_t g_FieldOffsetTable811[5];
extern const int32_t g_FieldOffsetTable812[3];
extern const int32_t g_FieldOffsetTable813[4];
extern const int32_t g_FieldOffsetTable816[1];
extern const int32_t g_FieldOffsetTable817[2];
extern const int32_t g_FieldOffsetTable818[2];
extern const int32_t g_FieldOffsetTable819[2];
extern const int32_t g_FieldOffsetTable822[4];
extern const int32_t g_FieldOffsetTable823[6];
extern const int32_t g_FieldOffsetTable824[5];
extern const int32_t g_FieldOffsetTable825[7];
extern const int32_t g_FieldOffsetTable826[1];
extern const int32_t g_FieldOffsetTable829[2];
extern const int32_t g_FieldOffsetTable831[8];
extern const int32_t g_FieldOffsetTable837[2];
extern const int32_t g_FieldOffsetTable838[1];
extern const int32_t g_FieldOffsetTable839[2];
extern const int32_t g_FieldOffsetTable840[2];
extern const int32_t g_FieldOffsetTable841[5];
extern const int32_t g_FieldOffsetTable842[6];
extern const int32_t g_FieldOffsetTable843[5];
extern const int32_t g_FieldOffsetTable844[1];
extern const int32_t g_FieldOffsetTable845[3];
extern const int32_t g_FieldOffsetTable846[9];
extern const int32_t g_FieldOffsetTable847[2];
extern const int32_t g_FieldOffsetTable848[14];
extern const int32_t g_FieldOffsetTable849[3];
extern const int32_t g_FieldOffsetTable850[5];
extern const int32_t g_FieldOffsetTable851[5];
extern const int32_t g_FieldOffsetTable852[3];
extern const int32_t g_FieldOffsetTable853[6];
extern const int32_t g_FieldOffsetTable858[7];
extern const int32_t g_FieldOffsetTable864[2];
extern const int32_t g_FieldOffsetTable867[3];
extern const int32_t g_FieldOffsetTable869[2];
extern const int32_t g_FieldOffsetTable870[1];
extern const int32_t g_FieldOffsetTable871[3];
extern const int32_t g_FieldOffsetTable874[3];
extern const int32_t g_FieldOffsetTable876[4];
extern const int32_t g_FieldOffsetTable877[1];
extern const int32_t g_FieldOffsetTable878[3];
extern const int32_t g_FieldOffsetTable879[28];
extern const int32_t g_FieldOffsetTable880[1];
extern const int32_t g_FieldOffsetTable882[5];
extern const int32_t g_FieldOffsetTable883[2];
extern const int32_t g_FieldOffsetTable884[3];
extern const int32_t g_FieldOffsetTable885[3];
extern const int32_t g_FieldOffsetTable886[1];
extern const int32_t g_FieldOffsetTable887[1];
extern const int32_t g_FieldOffsetTable888[2];
extern const int32_t g_FieldOffsetTable889[2];
extern const int32_t g_FieldOffsetTable890[2];
extern const int32_t g_FieldOffsetTable891[4];
extern const int32_t g_FieldOffsetTable892[2];
extern const int32_t g_FieldOffsetTable894[1];
extern const int32_t g_FieldOffsetTable895[3];
extern const int32_t g_FieldOffsetTable897[3];
extern const int32_t g_FieldOffsetTable903[9];
extern const int32_t g_FieldOffsetTable904[1];
extern const int32_t g_FieldOffsetTable906[52];
extern const int32_t g_FieldOffsetTable910[11];
extern const int32_t g_FieldOffsetTable912[7];
extern const int32_t g_FieldOffsetTable914[2];
extern const int32_t g_FieldOffsetTable915[4];
extern const int32_t g_FieldOffsetTable917[1];
extern const int32_t g_FieldOffsetTable919[21];
extern const int32_t g_FieldOffsetTable921[22];
extern const int32_t g_FieldOffsetTable923[1];
extern const int32_t g_FieldOffsetTable924[2];
extern const int32_t g_FieldOffsetTable925[1];
extern const int32_t g_FieldOffsetTable926[1];
extern const int32_t g_FieldOffsetTable928[3];
extern const int32_t g_FieldOffsetTable929[1];
extern const int32_t g_FieldOffsetTable931[17];
extern const int32_t g_FieldOffsetTable932[2];
extern const int32_t g_FieldOffsetTable934[3];
extern const int32_t g_FieldOffsetTable935[5];
extern const int32_t g_FieldOffsetTable937[2];
extern const int32_t g_FieldOffsetTable938[1];
extern const int32_t g_FieldOffsetTable939[15];
extern const int32_t g_FieldOffsetTable940[5];
extern const int32_t g_FieldOffsetTable941[4];
extern const int32_t g_FieldOffsetTable942[4];
extern const int32_t g_FieldOffsetTable944[8];
extern const int32_t g_FieldOffsetTable945[2];
extern const int32_t g_FieldOffsetTable946[1];
extern const int32_t g_FieldOffsetTable947[7];
extern const int32_t g_FieldOffsetTable948[1];
extern const int32_t g_FieldOffsetTable949[1];
extern const int32_t g_FieldOffsetTable950[1];
extern const int32_t g_FieldOffsetTable951[11];
extern const int32_t g_FieldOffsetTable956[2];
extern const int32_t g_FieldOffsetTable957[24];
extern const int32_t g_FieldOffsetTable958[4];
extern const int32_t g_FieldOffsetTable959[1];
extern const int32_t g_FieldOffsetTable963[1];
extern const int32_t g_FieldOffsetTable965[15];
extern const int32_t g_FieldOffsetTable966[3];
extern const int32_t g_FieldOffsetTable971[1];
extern const int32_t g_FieldOffsetTable972[1];
extern const int32_t g_FieldOffsetTable973[7];
extern const int32_t g_FieldOffsetTable974[5];
extern const int32_t g_FieldOffsetTable977[1];
extern const int32_t g_FieldOffsetTable979[3];
extern const int32_t g_FieldOffsetTable980[1];
extern const int32_t g_FieldOffsetTable981[7];
extern const int32_t g_FieldOffsetTable982[3];
extern const int32_t g_FieldOffsetTable983[2];
extern const int32_t g_FieldOffsetTable984[1];
extern const int32_t g_FieldOffsetTable985[2];
extern const int32_t g_FieldOffsetTable986[1];
extern const int32_t g_FieldOffsetTable990[1];
extern const int32_t g_FieldOffsetTable991[1];
extern const int32_t g_FieldOffsetTable993[26];
extern const int32_t g_FieldOffsetTable994[14];
extern const int32_t g_FieldOffsetTable995[2];
extern const int32_t g_FieldOffsetTable996[3];
extern const int32_t g_FieldOffsetTable997[1];
extern const int32_t g_FieldOffsetTable998[1];
extern const int32_t g_FieldOffsetTable999[8];
extern const int32_t g_FieldOffsetTable1000[1];
extern const int32_t g_FieldOffsetTable1001[3];
extern const int32_t g_FieldOffsetTable1003[1];
extern const int32_t g_FieldOffsetTable1004[1];
extern const int32_t g_FieldOffsetTable1006[4];
extern const int32_t g_FieldOffsetTable1007[2];
extern const int32_t g_FieldOffsetTable1008[1];
extern const int32_t g_FieldOffsetTable1009[7];
extern const int32_t g_FieldOffsetTable1010[3];
extern const int32_t g_FieldOffsetTable1013[4];
extern const int32_t g_FieldOffsetTable1014[4];
extern const int32_t g_FieldOffsetTable1015[3];
extern const int32_t g_FieldOffsetTable1016[8];
extern const int32_t g_FieldOffsetTable1017[19];
extern const int32_t g_FieldOffsetTable1018[1];
extern const int32_t g_FieldOffsetTable1019[3];
extern const int32_t g_FieldOffsetTable1021[2];
extern const int32_t g_FieldOffsetTable1022[3];
extern const int32_t g_FieldOffsetTable1023[5];
extern const int32_t g_FieldOffsetTable1024[5];
extern const int32_t g_FieldOffsetTable1025[2];
extern const int32_t g_FieldOffsetTable1048[55];
extern const int32_t g_FieldOffsetTable1076[4];
extern const int32_t g_FieldOffsetTable1077[4];
extern const int32_t g_FieldOffsetTable1078[2];
extern const int32_t g_FieldOffsetTable1080[7];
extern const int32_t g_FieldOffsetTable1084[3];
extern const int32_t g_FieldOffsetTable1088[2];
extern const int32_t g_FieldOffsetTable1089[4];
extern const int32_t g_FieldOffsetTable1090[4];
extern const int32_t g_FieldOffsetTable1091[5];
extern const int32_t g_FieldOffsetTable1093[1];
extern const int32_t g_FieldOffsetTable1095[6];
extern const int32_t g_FieldOffsetTable1097[5];
extern const int32_t g_FieldOffsetTable1098[4];
extern const int32_t g_FieldOffsetTable1100[4];
extern const int32_t g_FieldOffsetTable1101[4];
extern const int32_t g_FieldOffsetTable1102[2];
extern const int32_t g_FieldOffsetTable1103[13];
extern const int32_t g_FieldOffsetTable1105[6];
extern const int32_t g_FieldOffsetTable1106[2];
extern const int32_t g_FieldOffsetTable1107[2];
extern const int32_t g_FieldOffsetTable1108[36];
extern const int32_t g_FieldOffsetTable1109[7];
extern const int32_t g_FieldOffsetTable1110[4];
extern const int32_t g_FieldOffsetTable1111[16];
extern const int32_t g_FieldOffsetTable1112[3];
extern const int32_t g_FieldOffsetTable1113[26];
extern const int32_t g_FieldOffsetTable1115[1];
extern const int32_t g_FieldOffsetTable1116[10];
extern const int32_t g_FieldOffsetTable1117[5];
extern const int32_t g_FieldOffsetTable1118[8];
extern const int32_t g_FieldOffsetTable1119[12];
extern const int32_t g_FieldOffsetTable1120[3];
extern const int32_t g_FieldOffsetTable1121[3];
extern const int32_t g_FieldOffsetTable1122[1];
extern const int32_t g_FieldOffsetTable1123[5];
extern const int32_t g_FieldOffsetTable1124[2];
extern const int32_t g_FieldOffsetTable1125[6];
extern const int32_t g_FieldOffsetTable1126[5];
extern const int32_t g_FieldOffsetTable1128[4];
extern const int32_t g_FieldOffsetTable1146[1];
extern const int32_t g_FieldOffsetTable1147[2];
extern const int32_t g_FieldOffsetTable1148[2];
extern const int32_t g_FieldOffsetTable1149[5];
extern const int32_t g_FieldOffsetTable1150[11];
extern const int32_t g_FieldOffsetTable1151[1];
extern const int32_t g_FieldOffsetTable1152[1];
extern const int32_t g_FieldOffsetTable1153[8];
extern const int32_t g_FieldOffsetTable1154[1];
extern const int32_t g_FieldOffsetTable1155[1];
extern const int32_t g_FieldOffsetTable1156[4];
extern const int32_t g_FieldOffsetTable1157[3];
extern const int32_t g_FieldOffsetTable1158[3];
extern const int32_t g_FieldOffsetTable1159[25];
extern const int32_t g_FieldOffsetTable1160[2];
extern const int32_t g_FieldOffsetTable1161[8];
extern const int32_t g_FieldOffsetTable1162[21];
extern const int32_t g_FieldOffsetTable1163[2];
extern const int32_t g_FieldOffsetTable1165[2];
extern const int32_t g_FieldOffsetTable1167[7];
extern const int32_t g_FieldOffsetTable1168[2];
extern const int32_t g_FieldOffsetTable1169[5];
extern const int32_t g_FieldOffsetTable1170[34];
extern const int32_t g_FieldOffsetTable1171[1];
extern const int32_t g_FieldOffsetTable1172[6];
extern const int32_t g_FieldOffsetTable1173[4];
extern const int32_t g_FieldOffsetTable1174[4];
extern const int32_t g_FieldOffsetTable1175[4];
extern const int32_t g_FieldOffsetTable1176[3];
extern const int32_t g_FieldOffsetTable1177[9];
extern const int32_t g_FieldOffsetTable1178[7];
extern const int32_t g_FieldOffsetTable1179[3];
extern const int32_t g_FieldOffsetTable1180[3];
extern const int32_t g_FieldOffsetTable1181[3];
extern const int32_t g_FieldOffsetTable1182[3];
extern const int32_t g_FieldOffsetTable1183[5];
extern const int32_t g_FieldOffsetTable1184[3];
extern const int32_t g_FieldOffsetTable1186[3];
extern const int32_t g_FieldOffsetTable1187[4];
extern const int32_t g_FieldOffsetTable1188[4];
extern const int32_t g_FieldOffsetTable1189[8];
extern const int32_t g_FieldOffsetTable1190[3];
extern const int32_t g_FieldOffsetTable1191[15];
extern const int32_t g_FieldOffsetTable1192[12];
extern const int32_t g_FieldOffsetTable1194[3];
extern const int32_t g_FieldOffsetTable1195[4];
extern const int32_t g_FieldOffsetTable1196[1];
extern const int32_t g_FieldOffsetTable1197[8];
extern const int32_t g_FieldOffsetTable1198[5];
extern const int32_t g_FieldOffsetTable1199[6];
extern const int32_t g_FieldOffsetTable1200[4];
extern const int32_t g_FieldOffsetTable1201[12];
extern const int32_t g_FieldOffsetTable1202[2];
extern const int32_t g_FieldOffsetTable1204[1];
extern const int32_t g_FieldOffsetTable1205[1];
extern const int32_t g_FieldOffsetTable1207[1];
extern const int32_t g_FieldOffsetTable1208[2];
extern const int32_t g_FieldOffsetTable1209[1];
extern const int32_t g_FieldOffsetTable1210[4];
extern const int32_t g_FieldOffsetTable1212[2];
extern const int32_t g_FieldOffsetTable1213[1];
extern const int32_t g_FieldOffsetTable1216[4];
extern const int32_t g_FieldOffsetTable1220[1];
extern const int32_t g_FieldOffsetTable1221[2];
extern const int32_t g_FieldOffsetTable1229[16];
extern const int32_t g_FieldOffsetTable1242[1];
extern const int32_t g_FieldOffsetTable1243[12];
extern const int32_t g_FieldOffsetTable1246[8];
extern const int32_t g_FieldOffsetTable1249[15];
extern const int32_t g_FieldOffsetTable1254[11];
extern const int32_t g_FieldOffsetTable1260[1];
extern const int32_t g_FieldOffsetTable1266[5];
extern const int32_t g_FieldOffsetTable1267[4];
extern const int32_t g_FieldOffsetTable1268[4];
extern const int32_t g_FieldOffsetTable1269[5];
extern const int32_t g_FieldOffsetTable1270[3];
extern const int32_t g_FieldOffsetTable1271[3];
extern const int32_t g_FieldOffsetTable1272[3];
extern const int32_t g_FieldOffsetTable1273[3];
extern const int32_t g_FieldOffsetTable1274[4];
extern const int32_t g_FieldOffsetTable1275[3];
extern const int32_t g_FieldOffsetTable1276[4];
extern const int32_t g_FieldOffsetTable1277[2];
extern const int32_t g_FieldOffsetTable1278[2];
extern const int32_t g_FieldOffsetTable1279[10];
extern const int32_t g_FieldOffsetTable1280[2];
extern const int32_t g_FieldOffsetTable1281[2];
extern const int32_t g_FieldOffsetTable1282[1];
extern const int32_t g_FieldOffsetTable1283[2];
extern const int32_t g_FieldOffsetTable1284[1];
extern const int32_t g_FieldOffsetTable1285[1];
extern const int32_t g_FieldOffsetTable1286[3];
extern const int32_t g_FieldOffsetTable1287[2];
extern const int32_t g_FieldOffsetTable1296[2];
extern const int32_t g_FieldOffsetTable1298[2];
extern const int32_t g_FieldOffsetTable1299[3];
extern const int32_t g_FieldOffsetTable1300[3];
extern const int32_t g_FieldOffsetTable1302[2];
extern const int32_t g_FieldOffsetTable1303[7];
extern const int32_t g_FieldOffsetTable1305[1];
extern const int32_t g_FieldOffsetTable1306[4];
extern const int32_t g_FieldOffsetTable1308[4];
extern const int32_t g_FieldOffsetTable1310[1];
extern const int32_t g_FieldOffsetTable1311[17];
extern const int32_t g_FieldOffsetTable1313[4];
extern const int32_t g_FieldOffsetTable1314[2];
extern const int32_t g_FieldOffsetTable1316[3];
extern const int32_t g_FieldOffsetTable1319[1];
extern const int32_t g_FieldOffsetTable1321[1];
extern const int32_t g_FieldOffsetTable1324[2];
extern const int32_t g_FieldOffsetTable1325[2];
extern const int32_t g_FieldOffsetTable1326[1];
extern const int32_t g_FieldOffsetTable1327[2];
extern const int32_t g_FieldOffsetTable1328[4];
extern const int32_t g_FieldOffsetTable1329[4];
extern const int32_t g_FieldOffsetTable1330[2];
extern const int32_t g_FieldOffsetTable1331[5];
extern const int32_t g_FieldOffsetTable1332[4];
extern const int32_t g_FieldOffsetTable1333[5];
extern const int32_t g_FieldOffsetTable1334[2];
extern const int32_t g_FieldOffsetTable1335[3];
extern const int32_t g_FieldOffsetTable1337[2];
extern const int32_t g_FieldOffsetTable1338[1];
extern const int32_t g_FieldOffsetTable1339[4];
extern const int32_t g_FieldOffsetTable1340[2];
extern const int32_t g_FieldOffsetTable1343[3];
extern const int32_t g_FieldOffsetTable1344[3];
extern const int32_t g_FieldOffsetTable1345[2];
extern const int32_t g_FieldOffsetTable1366[4];
extern const int32_t g_FieldOffsetTable1372[1];
extern const int32_t g_FieldOffsetTable1375[1];
extern const int32_t g_FieldOffsetTable1376[3];
extern const int32_t g_FieldOffsetTable1378[2];
extern const int32_t g_FieldOffsetTable1379[3];
extern const int32_t g_FieldOffsetTable1380[4];
extern const int32_t g_FieldOffsetTable1381[4];
extern const int32_t g_FieldOffsetTable1382[9];
extern const int32_t g_FieldOffsetTable1383[2];
extern const int32_t g_FieldOffsetTable1384[1];
extern const int32_t g_FieldOffsetTable1385[3];
extern const int32_t g_FieldOffsetTable1386[4];
extern const int32_t g_FieldOffsetTable1387[3];
extern const int32_t g_FieldOffsetTable1388[4];
extern const int32_t g_FieldOffsetTable1390[4];
extern const int32_t g_FieldOffsetTable1392[4];
extern const int32_t g_FieldOffsetTable1393[3];
extern const int32_t g_FieldOffsetTable1394[4];
extern const int32_t g_FieldOffsetTable1395[2];
extern const int32_t g_FieldOffsetTable1396[1];
extern const int32_t g_FieldOffsetTable1397[2];
extern const int32_t g_FieldOffsetTable1398[3];
extern const int32_t g_FieldOffsetTable1399[4];
extern const int32_t g_FieldOffsetTable1400[4];
extern const int32_t g_FieldOffsetTable1401[1];
extern const int32_t g_FieldOffsetTable1402[5];
extern const int32_t g_FieldOffsetTable1403[6];
extern const int32_t g_FieldOffsetTable1404[2];
extern const int32_t g_FieldOffsetTable1405[4];
extern const int32_t g_FieldOffsetTable1406[4];
extern const int32_t g_FieldOffsetTable1407[1];
extern const int32_t g_FieldOffsetTable1412[5];
extern const int32_t g_FieldOffsetTable1413[2];
extern const int32_t g_FieldOffsetTable1414[5];
extern const int32_t g_FieldOffsetTable1416[1];
extern const int32_t g_FieldOffsetTable1417[2];
extern const int32_t g_FieldOffsetTable1418[2];
extern const int32_t g_FieldOffsetTable1419[2];
extern const int32_t g_FieldOffsetTable1421[12];
extern const int32_t g_FieldOffsetTable1422[1];
extern const int32_t g_FieldOffsetTable1423[1];
extern const int32_t g_FieldOffsetTable1424[1];
extern const int32_t g_FieldOffsetTable1425[3];
extern const int32_t g_FieldOffsetTable1427[6];
extern const int32_t g_FieldOffsetTable1428[3];
extern const int32_t g_FieldOffsetTable1429[2];
extern const int32_t g_FieldOffsetTable1430[1];
extern const int32_t g_FieldOffsetTable1434[2];
extern const int32_t g_FieldOffsetTable1436[1];
extern const int32_t g_FieldOffsetTable1438[12];
extern const int32_t g_FieldOffsetTable1439[10];
extern const int32_t g_FieldOffsetTable1440[29];
extern const int32_t g_FieldOffsetTable1442[18];
extern const int32_t g_FieldOffsetTable1443[3];
extern const int32_t g_FieldOffsetTable1444[8];
extern const int32_t g_FieldOffsetTable1448[1];
extern const int32_t g_FieldOffsetTable1450[1783];
extern const int32_t g_FieldOffsetTable1455[6];
extern const int32_t g_FieldOffsetTable1457[1];
extern const int32_t g_FieldOffsetTable1458[1];
extern const int32_t g_FieldOffsetTable1459[2];
extern const int32_t g_FieldOffsetTable1460[2];
extern const int32_t g_FieldOffsetTable1461[1];
extern const int32_t g_FieldOffsetTable1462[2];
extern const int32_t g_FieldOffsetTable1464[3];
extern const int32_t g_FieldOffsetTable1465[1];
extern const int32_t g_FieldOffsetTable1466[2];
extern const int32_t g_FieldOffsetTable1468[9];
extern const int32_t g_FieldOffsetTable1469[2];
extern const int32_t g_FieldOffsetTable1470[1];
extern const int32_t g_FieldOffsetTable1471[5];
extern const int32_t g_FieldOffsetTable1472[7];
extern const int32_t g_FieldOffsetTable1473[2];
extern const int32_t g_FieldOffsetTable1474[3];
extern const int32_t g_FieldOffsetTable1476[1];
extern const int32_t g_FieldOffsetTable1477[1];
extern const int32_t g_FieldOffsetTable1478[23];
extern const int32_t g_FieldOffsetTable1480[9];
extern const int32_t g_FieldOffsetTable1483[3];
extern const int32_t g_FieldOffsetTable1484[25];
extern const int32_t g_FieldOffsetTable1486[1];
extern const int32_t g_FieldOffsetTable1489[3];
extern const int32_t g_FieldOffsetTable1490[4];
extern const int32_t g_FieldOffsetTable1492[1];
extern const int32_t g_FieldOffsetTable1493[1];
extern const int32_t g_FieldOffsetTable1494[1];
extern const int32_t g_FieldOffsetTable1496[1];
extern const int32_t g_FieldOffsetTable1498[1];
extern const int32_t g_FieldOffsetTable1499[2];
extern const int32_t g_FieldOffsetTable1500[2];
extern const int32_t g_FieldOffsetTable1501[13];
extern const int32_t g_FieldOffsetTable1503[1];
extern const int32_t g_FieldOffsetTable1504[15];
extern const int32_t g_FieldOffsetTable1505[2];
extern const int32_t g_FieldOffsetTable1506[2];
extern const int32_t g_FieldOffsetTable1507[3];
extern const int32_t g_FieldOffsetTable1508[2];
extern const int32_t g_FieldOffsetTable1509[7];
extern const int32_t g_FieldOffsetTable1510[3];
extern const int32_t g_FieldOffsetTable1511[5];
extern const int32_t g_FieldOffsetTable1512[1];
extern const int32_t g_FieldOffsetTable1513[7];
extern const int32_t g_FieldOffsetTable1514[11];
extern const int32_t g_FieldOffsetTable1515[7];
extern const int32_t g_FieldOffsetTable1516[2];
extern const int32_t g_FieldOffsetTable1517[4];
extern const int32_t g_FieldOffsetTable1518[1];
extern const int32_t g_FieldOffsetTable1519[6];
extern const int32_t g_FieldOffsetTable1520[8];
extern const int32_t g_FieldOffsetTable1521[7];
extern const int32_t g_FieldOffsetTable1523[3];
extern const int32_t g_FieldOffsetTable1524[1];
extern const int32_t g_FieldOffsetTable1525[2];
extern const int32_t g_FieldOffsetTable1526[6];
extern const int32_t g_FieldOffsetTable1527[1];
extern const int32_t g_FieldOffsetTable1528[2];
extern const int32_t g_FieldOffsetTable1529[4];
extern const int32_t g_FieldOffsetTable1530[1];
extern const int32_t g_FieldOffsetTable1531[2];
extern const int32_t g_FieldOffsetTable1532[7];
extern const int32_t g_FieldOffsetTable1533[8];
extern const int32_t g_FieldOffsetTable1534[3];
extern const int32_t g_FieldOffsetTable1535[5];
extern const int32_t g_FieldOffsetTable1536[3];
extern const int32_t g_FieldOffsetTable1537[26];
extern const int32_t g_FieldOffsetTable1538[8];
extern const int32_t g_FieldOffsetTable1539[3];
extern const int32_t g_FieldOffsetTable1540[11];
extern const int32_t g_FieldOffsetTable1541[2];
extern const int32_t g_FieldOffsetTable1542[3];
extern const int32_t g_FieldOffsetTable1543[1];
extern const int32_t g_FieldOffsetTable1544[5];
extern const int32_t g_FieldOffsetTable1545[1];
extern const int32_t g_FieldOffsetTable1547[2];
extern const int32_t g_FieldOffsetTable1548[5];
extern const int32_t g_FieldOffsetTable1549[6];
extern const int32_t g_FieldOffsetTable1550[7];
extern const int32_t g_FieldOffsetTable1552[3];
extern const int32_t g_FieldOffsetTable1553[14];
extern const int32_t g_FieldOffsetTable1555[1];
extern const int32_t g_FieldOffsetTable1556[1];
extern const int32_t g_FieldOffsetTable1557[15];
extern const int32_t g_FieldOffsetTable1559[1];
extern const int32_t g_FieldOffsetTable1560[1];
extern const int32_t g_FieldOffsetTable1561[5];
extern const int32_t g_FieldOffsetTable1563[2];
extern const int32_t g_FieldOffsetTable1564[1];
extern const int32_t g_FieldOffsetTable1565[1];
extern const int32_t g_FieldOffsetTable1566[2];
extern const int32_t g_FieldOffsetTable1567[13];
extern const int32_t g_FieldOffsetTable1568[3];
extern const int32_t g_FieldOffsetTable1569[22];
extern const int32_t g_FieldOffsetTable1570[21];
extern const int32_t g_FieldOffsetTable1571[27];
extern const int32_t g_FieldOffsetTable1572[4];
extern const int32_t g_FieldOffsetTable1573[4];
extern const int32_t g_FieldOffsetTable1574[3];
extern const int32_t g_FieldOffsetTable1575[3];
extern const int32_t g_FieldOffsetTable1576[3];
extern const int32_t g_FieldOffsetTable1577[10];
extern const int32_t g_FieldOffsetTable1578[2];
extern const int32_t g_FieldOffsetTable1579[3];
extern const int32_t g_FieldOffsetTable1580[2];
extern const int32_t g_FieldOffsetTable1581[4];
extern const int32_t g_FieldOffsetTable1582[2];
extern const int32_t g_FieldOffsetTable1583[4];
extern const int32_t g_FieldOffsetTable1584[5];
extern const int32_t g_FieldOffsetTable1585[3];
extern const int32_t g_FieldOffsetTable1586[2];
extern const int32_t g_FieldOffsetTable1587[2];
extern const int32_t g_FieldOffsetTable1588[32];
extern const int32_t g_FieldOffsetTable1589[35];
extern const int32_t g_FieldOffsetTable1590[2];
extern const int32_t g_FieldOffsetTable1591[2];
extern const int32_t g_FieldOffsetTable1592[2];
extern const int32_t g_FieldOffsetTable1593[3];
extern const int32_t g_FieldOffsetTable1594[6];
extern const int32_t g_FieldOffsetTable1595[1];
extern const int32_t g_FieldOffsetTable1596[32];
extern const int32_t g_FieldOffsetTable1597[26];
extern const int32_t g_FieldOffsetTable1598[4];
extern const int32_t g_FieldOffsetTable1599[5];
extern const int32_t g_FieldOffsetTable1600[23];
extern const int32_t g_FieldOffsetTable1601[15];
extern const int32_t g_FieldOffsetTable1602[2];
extern const int32_t g_FieldOffsetTable1603[25];
extern const int32_t g_FieldOffsetTable1604[3];
extern const int32_t g_FieldOffsetTable1605[2];
extern const int32_t g_FieldOffsetTable1608[16];
extern const int32_t g_FieldOffsetTable1609[11];
extern const int32_t g_FieldOffsetTable1610[48];
extern const int32_t g_FieldOffsetTable1612[11];
extern const int32_t g_FieldOffsetTable1613[2];
extern const int32_t g_FieldOffsetTable1614[5];
extern const int32_t g_FieldOffsetTable1615[6];
extern const int32_t g_FieldOffsetTable1616[44];
extern const int32_t g_FieldOffsetTable1617[2];
extern const int32_t g_FieldOffsetTable1618[4];
extern const int32_t g_FieldOffsetTable1619[7];
extern const int32_t g_FieldOffsetTable1620[11];
extern const int32_t g_FieldOffsetTable1621[7];
extern const int32_t g_FieldOffsetTable1622[3];
extern const int32_t g_FieldOffsetTable1623[7];
extern const int32_t g_FieldOffsetTable1624[5];
extern const int32_t g_FieldOffsetTable1625[3];
extern const int32_t g_FieldOffsetTable1626[8];
extern const int32_t g_FieldOffsetTable1627[5];
extern const int32_t g_FieldOffsetTable1629[9];
extern const int32_t g_FieldOffsetTable1630[5];
extern const int32_t g_FieldOffsetTable1631[2];
extern const int32_t g_FieldOffsetTable1632[4];
extern const int32_t g_FieldOffsetTable1633[5];
extern const int32_t g_FieldOffsetTable1634[5];
extern const int32_t g_FieldOffsetTable1635[18];
extern const int32_t g_FieldOffsetTable1636[2];
extern const int32_t g_FieldOffsetTable1638[8];
extern const int32_t g_FieldOffsetTable1640[3];
extern const int32_t g_FieldOffsetTable1641[5];
extern const int32_t g_FieldOffsetTable1642[4];
extern const int32_t g_FieldOffsetTable1643[4];
extern const int32_t g_FieldOffsetTable1645[5];
extern const int32_t g_FieldOffsetTable1646[6];
extern const int32_t g_FieldOffsetTable1647[1];
extern const int32_t g_FieldOffsetTable1654[1];
extern const int32_t g_FieldOffsetTable1655[2];
extern const int32_t g_FieldOffsetTable1656[1];
extern const int32_t g_FieldOffsetTable1658[8];
extern const int32_t g_FieldOffsetTable1659[1];
extern const int32_t g_FieldOffsetTable1660[15];
extern const int32_t g_FieldOffsetTable1661[1];
extern const int32_t g_FieldOffsetTable1665[5];
extern const int32_t g_FieldOffsetTable1666[9];
extern const int32_t g_FieldOffsetTable1667[5];
extern const int32_t g_FieldOffsetTable1671[2];
extern const int32_t g_FieldOffsetTable1672[38];
extern const int32_t g_FieldOffsetTable1673[44];
extern const int32_t g_FieldOffsetTable1674[10];
extern const int32_t g_FieldOffsetTable1675[12];
extern const int32_t g_FieldOffsetTable1677[1];
extern const int32_t g_FieldOffsetTable1678[19];
extern const int32_t g_FieldOffsetTable1679[3];
extern const int32_t g_FieldOffsetTable1680[4];
extern const int32_t g_FieldOffsetTable1681[11];
extern const int32_t g_FieldOffsetTable1682[1];
extern const int32_t g_FieldOffsetTable1683[7];
extern const int32_t g_FieldOffsetTable1685[2];
extern const int32_t g_FieldOffsetTable1686[21];
extern const int32_t g_FieldOffsetTable1687[17];
extern const int32_t g_FieldOffsetTable1689[42];
extern const int32_t g_FieldOffsetTable1690[31];
extern const int32_t g_FieldOffsetTable1691[47];
extern const int32_t g_FieldOffsetTable1692[10];
extern const int32_t g_FieldOffsetTable1694[2];
extern const int32_t g_FieldOffsetTable1695[52];
extern const int32_t g_FieldOffsetTable1696[14];
extern const int32_t g_FieldOffsetTable1697[3];
extern const int32_t g_FieldOffsetTable1703[12];
extern const int32_t g_FieldOffsetTable1704[4];
extern const int32_t g_FieldOffsetTable1705[3];
extern const int32_t g_FieldOffsetTable1706[5];
extern const int32_t g_FieldOffsetTable1710[9];
extern const int32_t g_FieldOffsetTable1711[7];
extern const int32_t g_FieldOffsetTable1712[4];
extern const int32_t g_FieldOffsetTable1713[2];
extern const int32_t g_FieldOffsetTable1714[3];
extern const int32_t g_FieldOffsetTable1715[3];
extern const int32_t g_FieldOffsetTable1716[1];
extern const int32_t g_FieldOffsetTable1717[1];
extern const int32_t g_FieldOffsetTable1719[6];
extern const int32_t g_FieldOffsetTable1720[6];
extern const int32_t g_FieldOffsetTable1721[3];
extern const int32_t g_FieldOffsetTable1722[17];
extern const int32_t g_FieldOffsetTable1723[12];
extern const int32_t g_FieldOffsetTable1724[2];
extern const int32_t g_FieldOffsetTable1725[4];
extern const int32_t g_FieldOffsetTable1726[1];
extern const int32_t g_FieldOffsetTable1727[6];
extern const int32_t g_FieldOffsetTable1728[1];
extern const int32_t g_FieldOffsetTable1729[1];
extern const int32_t g_FieldOffsetTable1730[4];
extern const int32_t g_FieldOffsetTable1731[1];
extern const int32_t g_FieldOffsetTable1732[1];
extern const int32_t g_FieldOffsetTable1733[17];
extern const int32_t g_FieldOffsetTable1734[24];
extern const int32_t g_FieldOffsetTable1735[5];
extern const int32_t g_FieldOffsetTable1736[32];
extern const int32_t g_FieldOffsetTable1737[1];
extern const int32_t g_FieldOffsetTable1738[7];
extern const int32_t g_FieldOffsetTable1739[5];
extern const int32_t g_FieldOffsetTable1740[27];
extern const int32_t g_FieldOffsetTable1741[2];
extern const int32_t g_FieldOffsetTable1742[22];
extern const int32_t g_FieldOffsetTable1743[5];
extern const int32_t g_FieldOffsetTable1744[4];
extern const int32_t g_FieldOffsetTable1745[2];
extern const int32_t g_FieldOffsetTable1746[3];
extern const int32_t g_FieldOffsetTable1747[2];
extern const int32_t g_FieldOffsetTable1748[5];
extern const int32_t g_FieldOffsetTable1750[5];
extern const int32_t g_FieldOffsetTable1752[2];
extern const int32_t g_FieldOffsetTable1753[13];
extern const int32_t g_FieldOffsetTable1754[6];
extern const int32_t g_FieldOffsetTable1756[10];
extern const int32_t g_FieldOffsetTable1757[5];
extern const int32_t g_FieldOffsetTable1758[4];
extern const int32_t g_FieldOffsetTable1759[6];
extern const int32_t g_FieldOffsetTable1760[1];
extern const int32_t g_FieldOffsetTable1761[9];
extern const int32_t g_FieldOffsetTable1762[6];
extern const int32_t g_FieldOffsetTable1763[7];
extern const int32_t g_FieldOffsetTable1764[3];
extern const int32_t g_FieldOffsetTable1765[9];
extern const int32_t g_FieldOffsetTable1766[2];
extern const int32_t g_FieldOffsetTable1767[11];
extern const int32_t g_FieldOffsetTable1768[6];
extern const int32_t g_FieldOffsetTable1769[13];
extern const int32_t g_FieldOffsetTable1771[1];
extern const int32_t g_FieldOffsetTable1773[1];
extern const int32_t g_FieldOffsetTable1774[15];
extern const int32_t g_FieldOffsetTable1775[4];
extern const int32_t g_FieldOffsetTable1776[1];
extern const int32_t g_FieldOffsetTable1777[1];
extern const int32_t g_FieldOffsetTable1778[8];
extern const int32_t g_FieldOffsetTable1779[2];
extern const int32_t g_FieldOffsetTable1780[24];
extern const int32_t g_FieldOffsetTable1781[5];
extern const int32_t g_FieldOffsetTable1782[1];
extern const int32_t g_FieldOffsetTable1783[1];
extern const int32_t g_FieldOffsetTable1784[1];
extern const int32_t g_FieldOffsetTable1785[16];
extern const int32_t g_FieldOffsetTable1786[5];
extern const int32_t g_FieldOffsetTable1787[5];
extern const int32_t g_FieldOffsetTable1788[11];
extern const int32_t g_FieldOffsetTable1789[7];
extern const int32_t g_FieldOffsetTable1790[4];
extern const int32_t g_FieldOffsetTable1791[4];
extern const int32_t g_FieldOffsetTable1792[6];
extern const int32_t g_FieldOffsetTable1793[5];
extern const int32_t g_FieldOffsetTable1794[4];
extern const int32_t g_FieldOffsetTable1795[15];
extern const int32_t g_FieldOffsetTable1796[7];
extern const int32_t g_FieldOffsetTable1797[3];
extern const int32_t g_FieldOffsetTable1798[1];
extern const int32_t g_FieldOffsetTable1799[2];
extern const int32_t g_FieldOffsetTable1800[24];
extern const int32_t g_FieldOffsetTable1801[2];
extern const int32_t g_FieldOffsetTable1802[2];
extern const int32_t g_FieldOffsetTable1803[1];
extern const int32_t g_FieldOffsetTable1804[3];
extern const int32_t g_FieldOffsetTable1805[1];
extern const int32_t g_FieldOffsetTable1806[3];
extern const int32_t g_FieldOffsetTable1807[2];
extern const int32_t g_FieldOffsetTable1808[5];
extern const int32_t g_FieldOffsetTable1809[2];
extern const int32_t g_FieldOffsetTable1810[2];
extern const int32_t g_FieldOffsetTable1811[9];
extern const int32_t g_FieldOffsetTable1812[10];
extern const int32_t g_FieldOffsetTable1813[26];
extern const int32_t g_FieldOffsetTable1814[6];
extern const int32_t g_FieldOffsetTable1815[11];
extern const int32_t g_FieldOffsetTable1818[3];
extern const int32_t g_FieldOffsetTable1819[2];
extern const int32_t g_FieldOffsetTable1820[2];
extern const int32_t g_FieldOffsetTable1821[3];
extern const int32_t g_FieldOffsetTable1822[146];
extern const int32_t g_FieldOffsetTable1826[4];
extern const int32_t g_FieldOffsetTable1827[1];
extern const int32_t g_FieldOffsetTable1828[1];
extern const int32_t g_FieldOffsetTable1829[2];
extern const int32_t g_FieldOffsetTable1830[1];
extern const int32_t g_FieldOffsetTable1831[3];
extern const int32_t g_FieldOffsetTable1832[16];
extern const int32_t g_FieldOffsetTable1833[2];
extern const int32_t g_FieldOffsetTable1834[7];
extern const int32_t g_FieldOffsetTable1835[4];
extern const int32_t g_FieldOffsetTable1836[3];
extern const int32_t g_FieldOffsetTable1837[1];
extern const int32_t g_FieldOffsetTable1838[2];
extern const int32_t g_FieldOffsetTable1840[6];
extern const int32_t g_FieldOffsetTable1841[7];
extern const int32_t g_FieldOffsetTable1844[1];
extern const int32_t g_FieldOffsetTable1846[1];
extern const int32_t g_FieldOffsetTable1847[2];
extern const int32_t g_FieldOffsetTable1848[1];
extern const int32_t g_FieldOffsetTable1850[3];
extern const int32_t g_FieldOffsetTable1852[3];
extern const int32_t g_FieldOffsetTable1853[2];
extern const int32_t g_FieldOffsetTable1855[2];
extern const int32_t g_FieldOffsetTable1856[1];
extern const int32_t g_FieldOffsetTable1857[2];
extern const int32_t g_FieldOffsetTable1858[2];
extern const int32_t g_FieldOffsetTable1859[6];
extern const int32_t g_FieldOffsetTable1860[6];
extern const int32_t g_FieldOffsetTable1865[13];
extern const int32_t g_FieldOffsetTable1870[1];
extern const int32_t g_FieldOffsetTable1871[38];
extern const int32_t g_FieldOffsetTable1872[3];
extern const int32_t g_FieldOffsetTable1873[10];
extern const int32_t g_FieldOffsetTable1874[17];
extern const int32_t g_FieldOffsetTable1875[4];
extern const int32_t g_FieldOffsetTable1877[6];
extern const int32_t g_FieldOffsetTable1878[4];
extern const int32_t g_FieldOffsetTable1879[4];
extern const int32_t g_FieldOffsetTable1880[6];
extern const int32_t g_FieldOffsetTable1881[5];
extern const int32_t g_FieldOffsetTable1909[4];
extern const int32_t g_FieldOffsetTable1914[2];
extern const int32_t g_FieldOffsetTable1915[6];
extern const int32_t g_FieldOffsetTable1917[2];
extern const int32_t g_FieldOffsetTable1918[1];
extern const int32_t g_FieldOffsetTable1919[2];
extern const int32_t g_FieldOffsetTable1920[1];
extern const int32_t g_FieldOffsetTable1921[7];
extern const int32_t g_FieldOffsetTable1922[3];
extern const int32_t g_FieldOffsetTable1923[2];
extern const int32_t g_FieldOffsetTable1924[1];
extern const int32_t g_FieldOffsetTable1925[1];
extern const int32_t g_FieldOffsetTable1926[2];
extern const int32_t g_FieldOffsetTable1927[2];
extern const int32_t g_FieldOffsetTable1928[1];
extern const int32_t g_FieldOffsetTable1929[1];
extern const int32_t g_FieldOffsetTable1931[4];
extern const int32_t g_FieldOffsetTable1937[1];
extern const int32_t g_FieldOffsetTable1938[1];
extern const int32_t g_FieldOffsetTable1941[1];
extern const int32_t g_FieldOffsetTable1945[3];
extern const int32_t g_FieldOffsetTable1948[1];
extern const int32_t g_FieldOffsetTable1949[3];
extern const int32_t g_FieldOffsetTable1950[2];
extern const int32_t g_FieldOffsetTable1953[1];
extern const int32_t g_FieldOffsetTable1954[4];
extern const int32_t g_FieldOffsetTable1957[1];
extern const int32_t g_FieldOffsetTable1961[1];
extern const int32_t g_FieldOffsetTable1962[13];
extern const int32_t g_FieldOffsetTable1963[5];
extern const int32_t g_FieldOffsetTable1964[2];
extern const int32_t g_FieldOffsetTable1965[1];
extern const int32_t g_FieldOffsetTable1966[4];
extern const int32_t g_FieldOffsetTable1967[1];
extern const int32_t g_FieldOffsetTable1970[1];
extern const int32_t g_FieldOffsetTable1971[3];
extern const int32_t g_FieldOffsetTable1973[1];
extern const int32_t g_FieldOffsetTable1975[10];
extern const int32_t g_FieldOffsetTable1976[3];
extern const int32_t g_FieldOffsetTable1977[2];
extern const int32_t g_FieldOffsetTable1983[10];
extern const int32_t g_FieldOffsetTable1984[2];
extern const int32_t g_FieldOffsetTable1987[3];
extern const int32_t g_FieldOffsetTable1988[2];
extern const int32_t g_FieldOffsetTable1989[2];
extern const int32_t g_FieldOffsetTable1990[5];
extern const int32_t g_FieldOffsetTable1991[2];
extern const int32_t g_FieldOffsetTable1992[2];
extern const int32_t g_FieldOffsetTable1993[2];
extern const int32_t g_FieldOffsetTable1994[12];
extern const int32_t g_FieldOffsetTable1995[12];
extern const int32_t g_FieldOffsetTable1996[2];
extern const int32_t g_FieldOffsetTable1997[1];
extern const int32_t g_FieldOffsetTable1998[1];
extern const int32_t g_FieldOffsetTable1999[3];
extern const int32_t g_FieldOffsetTable2000[3];
extern const int32_t g_FieldOffsetTable2001[1];
extern const int32_t g_FieldOffsetTable2003[2];
extern const int32_t g_FieldOffsetTable2004[1];
extern const int32_t g_FieldOffsetTable2006[2];
extern const int32_t g_FieldOffsetTable2009[7];
extern const int32_t g_FieldOffsetTable2010[5];
extern const int32_t g_FieldOffsetTable2011[4];
extern const int32_t g_FieldOffsetTable2013[5];
extern const int32_t g_FieldOffsetTable2020[6];
extern const int32_t g_FieldOffsetTable2023[1];
extern const int32_t g_FieldOffsetTable2024[1];
extern const int32_t g_FieldOffsetTable2025[1];
extern const int32_t g_FieldOffsetTable2026[1];
extern const int32_t g_FieldOffsetTable2028[2];
extern const int32_t g_FieldOffsetTable2033[2];
extern const int32_t g_FieldOffsetTable2035[1];
extern const int32_t g_FieldOffsetTable2036[1];
extern const int32_t g_FieldOffsetTable2037[9];
extern const int32_t g_FieldOffsetTable2038[1];
extern const int32_t g_FieldOffsetTable2039[1];
extern const int32_t g_FieldOffsetTable2040[1];
extern const int32_t g_FieldOffsetTable2042[4];
extern const int32_t g_FieldOffsetTable2043[7];
extern const int32_t g_FieldOffsetTable2044[5];
extern const int32_t g_FieldOffsetTable2045[7];
extern const int32_t g_FieldOffsetTable2046[7];
extern const int32_t g_FieldOffsetTable2047[1];
extern const int32_t g_FieldOffsetTable2048[3];
extern const int32_t g_FieldOffsetTable2049[5];
extern const int32_t g_FieldOffsetTable2050[5];
extern const int32_t g_FieldOffsetTable2051[7];
extern const int32_t g_FieldOffsetTable2052[6];
extern const int32_t g_FieldOffsetTable2053[10];
extern const int32_t g_FieldOffsetTable2056[6];
extern const int32_t g_FieldOffsetTable2061[3];
extern const int32_t g_FieldOffsetTable2062[4];
extern const int32_t g_FieldOffsetTable2063[2];
extern const int32_t g_FieldOffsetTable2065[2];
extern const int32_t g_FieldOffsetTable2066[3];
extern const int32_t g_FieldOffsetTable2068[3];
extern const int32_t g_FieldOffsetTable2069[2];
extern const int32_t g_FieldOffsetTable2070[3];
extern const int32_t g_FieldOffsetTable2072[1];
extern const int32_t g_FieldOffsetTable2073[1];
extern const int32_t g_FieldOffsetTable2077[3];
extern const int32_t g_FieldOffsetTable2078[34];
extern const int32_t g_FieldOffsetTable2079[6];
extern const int32_t g_FieldOffsetTable2080[2];
extern const int32_t g_FieldOffsetTable2083[6];
extern const int32_t g_FieldOffsetTable2084[54];
extern const int32_t g_FieldOffsetTable2085[3];
extern const int32_t g_FieldOffsetTable2086[5];
extern const int32_t g_FieldOffsetTable2087[2];
extern const int32_t g_FieldOffsetTable2088[2];
extern const int32_t g_FieldOffsetTable2089[4];
extern const int32_t g_FieldOffsetTable2094[1];
extern const int32_t g_FieldOffsetTable2095[2];
extern const int32_t g_FieldOffsetTable2096[8];
extern const int32_t g_FieldOffsetTable2097[6];
extern const int32_t g_FieldOffsetTable2099[1];
extern const int32_t g_FieldOffsetTable2100[1];
extern const int32_t g_FieldOffsetTable2101[1];
extern const int32_t g_FieldOffsetTable2102[1];
extern const int32_t g_FieldOffsetTable2103[1];
extern const int32_t g_FieldOffsetTable2104[1];
extern const int32_t g_FieldOffsetTable2105[4];
extern const int32_t g_FieldOffsetTable2106[5];
extern const int32_t g_FieldOffsetTable2107[1];
extern const int32_t g_FieldOffsetTable2108[4];
extern const int32_t g_FieldOffsetTable2109[4];
extern const int32_t g_FieldOffsetTable2111[1];
extern const int32_t g_FieldOffsetTable2113[1];
extern const int32_t g_FieldOffsetTable2115[1];
extern const int32_t g_FieldOffsetTable2117[1];
extern const int32_t g_FieldOffsetTable2119[1];
extern const int32_t g_FieldOffsetTable2121[1];
extern const int32_t g_FieldOffsetTable2122[2];
extern const int32_t g_FieldOffsetTable2123[10];
extern const int32_t g_FieldOffsetTable2132[6];
extern const int32_t g_FieldOffsetTable2133[5];
extern const int32_t g_FieldOffsetTable2137[6];
extern const int32_t g_FieldOffsetTable2142[1];
extern const int32_t g_FieldOffsetTable2143[1];
extern const int32_t g_FieldOffsetTable2147[3];
extern const int32_t g_FieldOffsetTable2148[2];
extern const int32_t g_FieldOffsetTable2150[3];
extern const int32_t g_FieldOffsetTable2151[3];
extern const int32_t g_FieldOffsetTable2154[3];
extern const int32_t g_FieldOffsetTable2155[1];
extern const int32_t g_FieldOffsetTable2158[2];
extern const int32_t g_FieldOffsetTable2162[1];
extern const int32_t g_FieldOffsetTable2163[5];
extern const int32_t g_FieldOffsetTable2164[1];
extern const int32_t g_FieldOffsetTable2167[4];
extern const int32_t g_FieldOffsetTable2168[2];
extern const int32_t g_FieldOffsetTable2169[1];
extern const int32_t g_FieldOffsetTable2172[2];
extern const int32_t g_FieldOffsetTable2173[14];
extern const int32_t g_FieldOffsetTable2176[2];
extern const int32_t g_FieldOffsetTable2177[1];
extern const int32_t g_FieldOffsetTable2180[2];
extern const int32_t g_FieldOffsetTable2181[11];
extern const int32_t g_FieldOffsetTable2182[2];
extern const int32_t g_FieldOffsetTable2183[4];
extern const int32_t g_FieldOffsetTable2184[2];
extern const int32_t g_FieldOffsetTable2185[5];
extern const int32_t g_FieldOffsetTable2186[9];
extern const int32_t g_FieldOffsetTable2187[7];
extern const int32_t g_FieldOffsetTable2188[14];
extern const int32_t g_FieldOffsetTable2189[5];
extern const int32_t g_FieldOffsetTable2191[1];
extern const int32_t g_FieldOffsetTable2195[1];
extern const int32_t g_FieldOffsetTable2196[2];
extern const int32_t g_FieldOffsetTable2197[1];
extern const int32_t g_FieldOffsetTable2198[1];
extern const int32_t g_FieldOffsetTable2199[1];
extern const int32_t g_FieldOffsetTable2200[1];
extern const int32_t g_FieldOffsetTable2201[2];
extern const int32_t g_FieldOffsetTable2202[2];
extern const int32_t g_FieldOffsetTable2203[3];
extern const int32_t g_FieldOffsetTable2204[6];
extern const int32_t g_FieldOffsetTable2208[2];
extern const int32_t g_FieldOffsetTable2209[6];
extern const int32_t g_FieldOffsetTable2213[2];
extern const int32_t g_FieldOffsetTable2214[2];
extern const int32_t g_FieldOffsetTable2215[4];
extern const int32_t g_FieldOffsetTable2216[2];
extern const int32_t g_FieldOffsetTable2217[4];
extern const int32_t g_FieldOffsetTable2218[2];
extern const int32_t g_FieldOffsetTable2219[5];
extern const int32_t g_FieldOffsetTable2220[2];
extern const int32_t g_FieldOffsetTable2221[4];
extern const int32_t g_FieldOffsetTable2222[5];
extern const int32_t g_FieldOffsetTable2223[1];
extern const int32_t g_FieldOffsetTable2224[6];
extern const int32_t g_FieldOffsetTable2225[5];
extern const int32_t g_FieldOffsetTable2231[1];
extern const int32_t g_FieldOffsetTable2232[6];
extern const int32_t g_FieldOffsetTable2233[1];
extern const int32_t g_FieldOffsetTable2234[1];
extern const int32_t g_FieldOffsetTable2235[6];
extern const int32_t g_FieldOffsetTable2237[1];
extern const int32_t g_FieldOffsetTable2241[1];
extern const int32_t g_FieldOffsetTable2244[1];
extern const int32_t g_FieldOffsetTable2245[1];
extern const int32_t g_FieldOffsetTable2246[5];
extern const int32_t g_FieldOffsetTable2248[1];
extern const int32_t g_FieldOffsetTable2249[1];
extern const int32_t g_FieldOffsetTable2250[9];
extern const int32_t g_FieldOffsetTable2252[5];
extern const int32_t g_FieldOffsetTable2253[8];
extern const int32_t g_FieldOffsetTable2254[2];
extern const int32_t g_FieldOffsetTable2255[6];
extern const int32_t* g_FieldOffsetTable[2256] =
{
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable5,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable11,
g_FieldOffsetTable12,
NULL,
g_FieldOffsetTable14,
g_FieldOffsetTable15,
g_FieldOffsetTable16,
g_FieldOffsetTable17,
g_FieldOffsetTable18,
g_FieldOffsetTable19,
g_FieldOffsetTable20,
g_FieldOffsetTable21,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable26,
g_FieldOffsetTable27,
NULL,
NULL,
g_FieldOffsetTable30,
g_FieldOffsetTable31,
g_FieldOffsetTable32,
g_FieldOffsetTable33,
g_FieldOffsetTable34,
NULL,
g_FieldOffsetTable36,
g_FieldOffsetTable37,
g_FieldOffsetTable38,
g_FieldOffsetTable39,
NULL,
g_FieldOffsetTable41,
g_FieldOffsetTable42,
g_FieldOffsetTable43,
g_FieldOffsetTable44,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable51,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable57,
NULL,
g_FieldOffsetTable59,
g_FieldOffsetTable60,
NULL,
NULL,
g_FieldOffsetTable63,
g_FieldOffsetTable64,
g_FieldOffsetTable65,
NULL,
g_FieldOffsetTable67,
g_FieldOffsetTable68,
g_FieldOffsetTable69,
NULL,
NULL,
g_FieldOffsetTable72,
NULL,
g_FieldOffsetTable74,
g_FieldOffsetTable75,
NULL,
g_FieldOffsetTable77,
g_FieldOffsetTable78,
g_FieldOffsetTable79,
g_FieldOffsetTable80,
NULL,
NULL,
g_FieldOffsetTable83,
g_FieldOffsetTable84,
g_FieldOffsetTable85,
g_FieldOffsetTable86,
NULL,
NULL,
g_FieldOffsetTable89,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable95,
g_FieldOffsetTable96,
g_FieldOffsetTable97,
g_FieldOffsetTable98,
g_FieldOffsetTable99,
g_FieldOffsetTable100,
NULL,
g_FieldOffsetTable102,
g_FieldOffsetTable103,
g_FieldOffsetTable104,
g_FieldOffsetTable105,
g_FieldOffsetTable106,
g_FieldOffsetTable107,
g_FieldOffsetTable108,
g_FieldOffsetTable109,
g_FieldOffsetTable110,
g_FieldOffsetTable111,
g_FieldOffsetTable112,
g_FieldOffsetTable113,
g_FieldOffsetTable114,
g_FieldOffsetTable115,
g_FieldOffsetTable116,
g_FieldOffsetTable117,
g_FieldOffsetTable118,
NULL,
NULL,
g_FieldOffsetTable121,
NULL,
g_FieldOffsetTable123,
g_FieldOffsetTable124,
g_FieldOffsetTable125,
NULL,
g_FieldOffsetTable127,
g_FieldOffsetTable128,
NULL,
g_FieldOffsetTable130,
g_FieldOffsetTable131,
g_FieldOffsetTable132,
NULL,
g_FieldOffsetTable134,
g_FieldOffsetTable135,
g_FieldOffsetTable136,
g_FieldOffsetTable137,
NULL,
g_FieldOffsetTable139,
g_FieldOffsetTable140,
g_FieldOffsetTable141,
g_FieldOffsetTable142,
NULL,
g_FieldOffsetTable144,
g_FieldOffsetTable145,
g_FieldOffsetTable146,
g_FieldOffsetTable147,
g_FieldOffsetTable148,
g_FieldOffsetTable149,
g_FieldOffsetTable150,
NULL,
g_FieldOffsetTable152,
g_FieldOffsetTable153,
g_FieldOffsetTable154,
g_FieldOffsetTable155,
g_FieldOffsetTable156,
g_FieldOffsetTable157,
g_FieldOffsetTable158,
g_FieldOffsetTable159,
g_FieldOffsetTable160,
NULL,
NULL,
NULL,
g_FieldOffsetTable164,
g_FieldOffsetTable165,
g_FieldOffsetTable166,
g_FieldOffsetTable167,
g_FieldOffsetTable168,
g_FieldOffsetTable169,
g_FieldOffsetTable170,
NULL,
NULL,
g_FieldOffsetTable173,
g_FieldOffsetTable174,
NULL,
NULL,
NULL,
g_FieldOffsetTable178,
NULL,
NULL,
g_FieldOffsetTable181,
g_FieldOffsetTable182,
g_FieldOffsetTable183,
g_FieldOffsetTable184,
g_FieldOffsetTable185,
g_FieldOffsetTable186,
g_FieldOffsetTable187,
g_FieldOffsetTable188,
NULL,
g_FieldOffsetTable190,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable197,
g_FieldOffsetTable198,
g_FieldOffsetTable199,
g_FieldOffsetTable200,
g_FieldOffsetTable201,
g_FieldOffsetTable202,
g_FieldOffsetTable203,
g_FieldOffsetTable204,
g_FieldOffsetTable205,
NULL,
NULL,
g_FieldOffsetTable208,
g_FieldOffsetTable209,
g_FieldOffsetTable210,
g_FieldOffsetTable211,
g_FieldOffsetTable212,
NULL,
g_FieldOffsetTable214,
g_FieldOffsetTable215,
g_FieldOffsetTable216,
g_FieldOffsetTable217,
g_FieldOffsetTable218,
g_FieldOffsetTable219,
g_FieldOffsetTable220,
g_FieldOffsetTable221,
g_FieldOffsetTable222,
g_FieldOffsetTable223,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable229,
g_FieldOffsetTable230,
g_FieldOffsetTable231,
g_FieldOffsetTable232,
g_FieldOffsetTable233,
g_FieldOffsetTable234,
g_FieldOffsetTable235,
g_FieldOffsetTable236,
g_FieldOffsetTable237,
g_FieldOffsetTable238,
g_FieldOffsetTable239,
g_FieldOffsetTable240,
g_FieldOffsetTable241,
NULL,
g_FieldOffsetTable243,
g_FieldOffsetTable244,
g_FieldOffsetTable245,
g_FieldOffsetTable246,
g_FieldOffsetTable247,
NULL,
g_FieldOffsetTable249,
g_FieldOffsetTable250,
g_FieldOffsetTable251,
g_FieldOffsetTable252,
NULL,
NULL,
NULL,
g_FieldOffsetTable256,
g_FieldOffsetTable257,
g_FieldOffsetTable258,
g_FieldOffsetTable259,
g_FieldOffsetTable260,
g_FieldOffsetTable261,
g_FieldOffsetTable262,
g_FieldOffsetTable263,
g_FieldOffsetTable264,
g_FieldOffsetTable265,
g_FieldOffsetTable266,
g_FieldOffsetTable267,
g_FieldOffsetTable268,
g_FieldOffsetTable269,
g_FieldOffsetTable270,
NULL,
g_FieldOffsetTable272,
g_FieldOffsetTable273,
NULL,
g_FieldOffsetTable275,
NULL,
NULL,
g_FieldOffsetTable278,
g_FieldOffsetTable279,
g_FieldOffsetTable280,
g_FieldOffsetTable281,
g_FieldOffsetTable282,
g_FieldOffsetTable283,
g_FieldOffsetTable284,
g_FieldOffsetTable285,
g_FieldOffsetTable286,
NULL,
NULL,
g_FieldOffsetTable289,
g_FieldOffsetTable290,
NULL,
g_FieldOffsetTable292,
g_FieldOffsetTable293,
g_FieldOffsetTable294,
g_FieldOffsetTable295,
g_FieldOffsetTable296,
g_FieldOffsetTable297,
NULL,
g_FieldOffsetTable299,
g_FieldOffsetTable300,
g_FieldOffsetTable301,
NULL,
g_FieldOffsetTable303,
g_FieldOffsetTable304,
NULL,
g_FieldOffsetTable306,
g_FieldOffsetTable307,
g_FieldOffsetTable308,
NULL,
g_FieldOffsetTable310,
g_FieldOffsetTable311,
NULL,
g_FieldOffsetTable313,
g_FieldOffsetTable314,
NULL,
g_FieldOffsetTable316,
g_FieldOffsetTable317,
g_FieldOffsetTable318,
g_FieldOffsetTable319,
g_FieldOffsetTable320,
g_FieldOffsetTable321,
g_FieldOffsetTable322,
g_FieldOffsetTable323,
g_FieldOffsetTable324,
g_FieldOffsetTable325,
NULL,
g_FieldOffsetTable327,
g_FieldOffsetTable328,
g_FieldOffsetTable329,
g_FieldOffsetTable330,
g_FieldOffsetTable331,
g_FieldOffsetTable332,
g_FieldOffsetTable333,
g_FieldOffsetTable334,
g_FieldOffsetTable335,
g_FieldOffsetTable336,
g_FieldOffsetTable337,
g_FieldOffsetTable338,
g_FieldOffsetTable339,
g_FieldOffsetTable340,
g_FieldOffsetTable341,
g_FieldOffsetTable342,
g_FieldOffsetTable343,
g_FieldOffsetTable344,
g_FieldOffsetTable345,
g_FieldOffsetTable346,
NULL,
g_FieldOffsetTable348,
NULL,
g_FieldOffsetTable350,
g_FieldOffsetTable351,
g_FieldOffsetTable352,
g_FieldOffsetTable353,
g_FieldOffsetTable354,
g_FieldOffsetTable355,
g_FieldOffsetTable356,
g_FieldOffsetTable357,
g_FieldOffsetTable358,
g_FieldOffsetTable359,
g_FieldOffsetTable360,
g_FieldOffsetTable361,
g_FieldOffsetTable362,
g_FieldOffsetTable363,
g_FieldOffsetTable364,
g_FieldOffsetTable365,
NULL,
g_FieldOffsetTable367,
g_FieldOffsetTable368,
g_FieldOffsetTable369,
g_FieldOffsetTable370,
g_FieldOffsetTable371,
g_FieldOffsetTable372,
g_FieldOffsetTable373,
g_FieldOffsetTable374,
NULL,
g_FieldOffsetTable376,
NULL,
g_FieldOffsetTable378,
g_FieldOffsetTable379,
g_FieldOffsetTable380,
g_FieldOffsetTable381,
g_FieldOffsetTable382,
NULL,
g_FieldOffsetTable384,
NULL,
g_FieldOffsetTable386,
g_FieldOffsetTable387,
g_FieldOffsetTable388,
g_FieldOffsetTable389,
g_FieldOffsetTable390,
NULL,
NULL,
g_FieldOffsetTable393,
g_FieldOffsetTable394,
g_FieldOffsetTable395,
g_FieldOffsetTable396,
g_FieldOffsetTable397,
g_FieldOffsetTable398,
NULL,
NULL,
NULL,
g_FieldOffsetTable402,
g_FieldOffsetTable403,
g_FieldOffsetTable404,
g_FieldOffsetTable405,
g_FieldOffsetTable406,
g_FieldOffsetTable407,
NULL,
g_FieldOffsetTable409,
g_FieldOffsetTable410,
g_FieldOffsetTable411,
NULL,
NULL,
NULL,
g_FieldOffsetTable415,
g_FieldOffsetTable416,
NULL,
g_FieldOffsetTable418,
g_FieldOffsetTable419,
g_FieldOffsetTable420,
g_FieldOffsetTable421,
g_FieldOffsetTable422,
g_FieldOffsetTable423,
g_FieldOffsetTable424,
g_FieldOffsetTable425,
NULL,
g_FieldOffsetTable427,
g_FieldOffsetTable428,
g_FieldOffsetTable429,
g_FieldOffsetTable430,
NULL,
g_FieldOffsetTable432,
NULL,
g_FieldOffsetTable434,
g_FieldOffsetTable435,
NULL,
g_FieldOffsetTable437,
g_FieldOffsetTable438,
NULL,
g_FieldOffsetTable440,
g_FieldOffsetTable441,
g_FieldOffsetTable442,
g_FieldOffsetTable443,
g_FieldOffsetTable444,
g_FieldOffsetTable445,
g_FieldOffsetTable446,
g_FieldOffsetTable447,
NULL,
g_FieldOffsetTable449,
g_FieldOffsetTable450,
g_FieldOffsetTable451,
g_FieldOffsetTable452,
g_FieldOffsetTable453,
g_FieldOffsetTable454,
NULL,
g_FieldOffsetTable456,
g_FieldOffsetTable457,
g_FieldOffsetTable458,
g_FieldOffsetTable459,
g_FieldOffsetTable460,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable484,
g_FieldOffsetTable485,
NULL,
g_FieldOffsetTable487,
NULL,
NULL,
NULL,
g_FieldOffsetTable491,
g_FieldOffsetTable492,
g_FieldOffsetTable493,
g_FieldOffsetTable494,
g_FieldOffsetTable495,
g_FieldOffsetTable496,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable504,
g_FieldOffsetTable505,
g_FieldOffsetTable506,
g_FieldOffsetTable507,
NULL,
g_FieldOffsetTable509,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable520,
g_FieldOffsetTable521,
g_FieldOffsetTable522,
NULL,
NULL,
g_FieldOffsetTable525,
NULL,
g_FieldOffsetTable527,
g_FieldOffsetTable528,
g_FieldOffsetTable529,
g_FieldOffsetTable530,
g_FieldOffsetTable531,
g_FieldOffsetTable532,
g_FieldOffsetTable533,
g_FieldOffsetTable534,
g_FieldOffsetTable535,
g_FieldOffsetTable536,
g_FieldOffsetTable537,
g_FieldOffsetTable538,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable548,
g_FieldOffsetTable549,
g_FieldOffsetTable550,
g_FieldOffsetTable551,
g_FieldOffsetTable552,
g_FieldOffsetTable553,
g_FieldOffsetTable554,
g_FieldOffsetTable555,
g_FieldOffsetTable556,
NULL,
NULL,
NULL,
g_FieldOffsetTable560,
g_FieldOffsetTable561,
NULL,
g_FieldOffsetTable563,
g_FieldOffsetTable564,
g_FieldOffsetTable565,
g_FieldOffsetTable566,
g_FieldOffsetTable567,
NULL,
g_FieldOffsetTable569,
NULL,
g_FieldOffsetTable571,
g_FieldOffsetTable572,
g_FieldOffsetTable573,
NULL,
g_FieldOffsetTable575,
g_FieldOffsetTable576,
g_FieldOffsetTable577,
g_FieldOffsetTable578,
NULL,
NULL,
NULL,
g_FieldOffsetTable582,
g_FieldOffsetTable583,
g_FieldOffsetTable584,
g_FieldOffsetTable585,
g_FieldOffsetTable586,
g_FieldOffsetTable587,
g_FieldOffsetTable588,
g_FieldOffsetTable589,
NULL,
NULL,
g_FieldOffsetTable592,
g_FieldOffsetTable593,
NULL,
NULL,
NULL,
g_FieldOffsetTable597,
g_FieldOffsetTable598,
g_FieldOffsetTable599,
g_FieldOffsetTable600,
g_FieldOffsetTable601,
g_FieldOffsetTable602,
g_FieldOffsetTable603,
g_FieldOffsetTable604,
g_FieldOffsetTable605,
g_FieldOffsetTable606,
g_FieldOffsetTable607,
g_FieldOffsetTable608,
g_FieldOffsetTable609,
g_FieldOffsetTable610,
NULL,
g_FieldOffsetTable612,
g_FieldOffsetTable613,
g_FieldOffsetTable614,
g_FieldOffsetTable615,
g_FieldOffsetTable616,
g_FieldOffsetTable617,
g_FieldOffsetTable618,
g_FieldOffsetTable619,
g_FieldOffsetTable620,
g_FieldOffsetTable621,
g_FieldOffsetTable622,
g_FieldOffsetTable623,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable632,
NULL,
g_FieldOffsetTable634,
g_FieldOffsetTable635,
g_FieldOffsetTable636,
g_FieldOffsetTable637,
g_FieldOffsetTable638,
g_FieldOffsetTable639,
g_FieldOffsetTable640,
g_FieldOffsetTable641,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable647,
NULL,
g_FieldOffsetTable649,
NULL,
g_FieldOffsetTable651,
g_FieldOffsetTable652,
g_FieldOffsetTable653,
g_FieldOffsetTable654,
g_FieldOffsetTable655,
g_FieldOffsetTable656,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable661,
g_FieldOffsetTable662,
g_FieldOffsetTable663,
g_FieldOffsetTable664,
g_FieldOffsetTable665,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable670,
g_FieldOffsetTable671,
g_FieldOffsetTable672,
g_FieldOffsetTable673,
g_FieldOffsetTable674,
g_FieldOffsetTable675,
g_FieldOffsetTable676,
NULL,
NULL,
g_FieldOffsetTable679,
g_FieldOffsetTable680,
g_FieldOffsetTable681,
g_FieldOffsetTable682,
g_FieldOffsetTable683,
NULL,
NULL,
g_FieldOffsetTable686,
g_FieldOffsetTable687,
g_FieldOffsetTable688,
g_FieldOffsetTable689,
NULL,
g_FieldOffsetTable691,
g_FieldOffsetTable692,
g_FieldOffsetTable693,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable698,
g_FieldOffsetTable699,
g_FieldOffsetTable700,
NULL,
NULL,
g_FieldOffsetTable703,
g_FieldOffsetTable704,
g_FieldOffsetTable705,
g_FieldOffsetTable706,
NULL,
g_FieldOffsetTable708,
NULL,
g_FieldOffsetTable710,
g_FieldOffsetTable711,
g_FieldOffsetTable712,
g_FieldOffsetTable713,
g_FieldOffsetTable714,
g_FieldOffsetTable715,
NULL,
g_FieldOffsetTable717,
g_FieldOffsetTable718,
NULL,
g_FieldOffsetTable720,
g_FieldOffsetTable721,
g_FieldOffsetTable722,
g_FieldOffsetTable723,
g_FieldOffsetTable724,
g_FieldOffsetTable725,
g_FieldOffsetTable726,
g_FieldOffsetTable727,
NULL,
g_FieldOffsetTable729,
NULL,
NULL,
g_FieldOffsetTable732,
g_FieldOffsetTable733,
NULL,
g_FieldOffsetTable735,
g_FieldOffsetTable736,
g_FieldOffsetTable737,
NULL,
g_FieldOffsetTable739,
NULL,
g_FieldOffsetTable741,
NULL,
g_FieldOffsetTable743,
g_FieldOffsetTable744,
g_FieldOffsetTable745,
NULL,
NULL,
g_FieldOffsetTable748,
g_FieldOffsetTable749,
NULL,
NULL,
g_FieldOffsetTable752,
NULL,
g_FieldOffsetTable754,
g_FieldOffsetTable755,
g_FieldOffsetTable756,
g_FieldOffsetTable757,
g_FieldOffsetTable758,
g_FieldOffsetTable759,
g_FieldOffsetTable760,
NULL,
NULL,
g_FieldOffsetTable763,
NULL,
g_FieldOffsetTable765,
g_FieldOffsetTable766,
g_FieldOffsetTable767,
g_FieldOffsetTable768,
g_FieldOffsetTable769,
g_FieldOffsetTable770,
g_FieldOffsetTable771,
g_FieldOffsetTable772,
g_FieldOffsetTable773,
g_FieldOffsetTable774,
g_FieldOffsetTable775,
g_FieldOffsetTable776,
g_FieldOffsetTable777,
g_FieldOffsetTable778,
g_FieldOffsetTable779,
g_FieldOffsetTable780,
g_FieldOffsetTable781,
g_FieldOffsetTable782,
g_FieldOffsetTable783,
g_FieldOffsetTable784,
g_FieldOffsetTable785,
g_FieldOffsetTable786,
g_FieldOffsetTable787,
g_FieldOffsetTable788,
g_FieldOffsetTable789,
g_FieldOffsetTable790,
g_FieldOffsetTable791,
g_FieldOffsetTable792,
g_FieldOffsetTable793,
g_FieldOffsetTable794,
g_FieldOffsetTable795,
g_FieldOffsetTable796,
NULL,
g_FieldOffsetTable798,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable804,
NULL,
g_FieldOffsetTable806,
g_FieldOffsetTable807,
NULL,
g_FieldOffsetTable809,
g_FieldOffsetTable810,
g_FieldOffsetTable811,
g_FieldOffsetTable812,
g_FieldOffsetTable813,
NULL,
NULL,
g_FieldOffsetTable816,
g_FieldOffsetTable817,
g_FieldOffsetTable818,
g_FieldOffsetTable819,
NULL,
NULL,
g_FieldOffsetTable822,
g_FieldOffsetTable823,
g_FieldOffsetTable824,
g_FieldOffsetTable825,
g_FieldOffsetTable826,
NULL,
NULL,
g_FieldOffsetTable829,
NULL,
g_FieldOffsetTable831,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable837,
g_FieldOffsetTable838,
g_FieldOffsetTable839,
g_FieldOffsetTable840,
g_FieldOffsetTable841,
g_FieldOffsetTable842,
g_FieldOffsetTable843,
g_FieldOffsetTable844,
g_FieldOffsetTable845,
g_FieldOffsetTable846,
g_FieldOffsetTable847,
g_FieldOffsetTable848,
g_FieldOffsetTable849,
g_FieldOffsetTable850,
g_FieldOffsetTable851,
g_FieldOffsetTable852,
g_FieldOffsetTable853,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable858,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable864,
NULL,
NULL,
g_FieldOffsetTable867,
NULL,
g_FieldOffsetTable869,
g_FieldOffsetTable870,
g_FieldOffsetTable871,
NULL,
NULL,
g_FieldOffsetTable874,
NULL,
g_FieldOffsetTable876,
g_FieldOffsetTable877,
g_FieldOffsetTable878,
g_FieldOffsetTable879,
g_FieldOffsetTable880,
NULL,
g_FieldOffsetTable882,
g_FieldOffsetTable883,
g_FieldOffsetTable884,
g_FieldOffsetTable885,
g_FieldOffsetTable886,
g_FieldOffsetTable887,
g_FieldOffsetTable888,
g_FieldOffsetTable889,
g_FieldOffsetTable890,
g_FieldOffsetTable891,
g_FieldOffsetTable892,
NULL,
g_FieldOffsetTable894,
g_FieldOffsetTable895,
NULL,
g_FieldOffsetTable897,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable903,
g_FieldOffsetTable904,
NULL,
g_FieldOffsetTable906,
NULL,
NULL,
NULL,
g_FieldOffsetTable910,
NULL,
g_FieldOffsetTable912,
NULL,
g_FieldOffsetTable914,
g_FieldOffsetTable915,
NULL,
g_FieldOffsetTable917,
NULL,
g_FieldOffsetTable919,
NULL,
g_FieldOffsetTable921,
NULL,
g_FieldOffsetTable923,
g_FieldOffsetTable924,
g_FieldOffsetTable925,
g_FieldOffsetTable926,
NULL,
g_FieldOffsetTable928,
g_FieldOffsetTable929,
NULL,
g_FieldOffsetTable931,
g_FieldOffsetTable932,
NULL,
g_FieldOffsetTable934,
g_FieldOffsetTable935,
NULL,
g_FieldOffsetTable937,
g_FieldOffsetTable938,
g_FieldOffsetTable939,
g_FieldOffsetTable940,
g_FieldOffsetTable941,
g_FieldOffsetTable942,
NULL,
g_FieldOffsetTable944,
g_FieldOffsetTable945,
g_FieldOffsetTable946,
g_FieldOffsetTable947,
g_FieldOffsetTable948,
g_FieldOffsetTable949,
g_FieldOffsetTable950,
g_FieldOffsetTable951,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable956,
g_FieldOffsetTable957,
g_FieldOffsetTable958,
g_FieldOffsetTable959,
NULL,
NULL,
NULL,
g_FieldOffsetTable963,
NULL,
g_FieldOffsetTable965,
g_FieldOffsetTable966,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable971,
g_FieldOffsetTable972,
g_FieldOffsetTable973,
g_FieldOffsetTable974,
NULL,
NULL,
g_FieldOffsetTable977,
NULL,
g_FieldOffsetTable979,
g_FieldOffsetTable980,
g_FieldOffsetTable981,
g_FieldOffsetTable982,
g_FieldOffsetTable983,
g_FieldOffsetTable984,
g_FieldOffsetTable985,
g_FieldOffsetTable986,
NULL,
NULL,
NULL,
g_FieldOffsetTable990,
g_FieldOffsetTable991,
NULL,
g_FieldOffsetTable993,
g_FieldOffsetTable994,
g_FieldOffsetTable995,
g_FieldOffsetTable996,
g_FieldOffsetTable997,
g_FieldOffsetTable998,
g_FieldOffsetTable999,
g_FieldOffsetTable1000,
g_FieldOffsetTable1001,
NULL,
g_FieldOffsetTable1003,
g_FieldOffsetTable1004,
NULL,
g_FieldOffsetTable1006,
g_FieldOffsetTable1007,
g_FieldOffsetTable1008,
g_FieldOffsetTable1009,
g_FieldOffsetTable1010,
NULL,
NULL,
g_FieldOffsetTable1013,
g_FieldOffsetTable1014,
g_FieldOffsetTable1015,
g_FieldOffsetTable1016,
g_FieldOffsetTable1017,
g_FieldOffsetTable1018,
g_FieldOffsetTable1019,
NULL,
g_FieldOffsetTable1021,
g_FieldOffsetTable1022,
g_FieldOffsetTable1023,
g_FieldOffsetTable1024,
g_FieldOffsetTable1025,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable1048,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable1076,
g_FieldOffsetTable1077,
g_FieldOffsetTable1078,
NULL,
g_FieldOffsetTable1080,
NULL,
NULL,
NULL,
g_FieldOffsetTable1084,
NULL,
NULL,
NULL,
g_FieldOffsetTable1088,
g_FieldOffsetTable1089,
g_FieldOffsetTable1090,
g_FieldOffsetTable1091,
NULL,
g_FieldOffsetTable1093,
NULL,
g_FieldOffsetTable1095,
NULL,
g_FieldOffsetTable1097,
g_FieldOffsetTable1098,
NULL,
g_FieldOffsetTable1100,
g_FieldOffsetTable1101,
g_FieldOffsetTable1102,
g_FieldOffsetTable1103,
NULL,
g_FieldOffsetTable1105,
g_FieldOffsetTable1106,
g_FieldOffsetTable1107,
g_FieldOffsetTable1108,
g_FieldOffsetTable1109,
g_FieldOffsetTable1110,
g_FieldOffsetTable1111,
g_FieldOffsetTable1112,
g_FieldOffsetTable1113,
NULL,
g_FieldOffsetTable1115,
g_FieldOffsetTable1116,
g_FieldOffsetTable1117,
g_FieldOffsetTable1118,
g_FieldOffsetTable1119,
g_FieldOffsetTable1120,
g_FieldOffsetTable1121,
g_FieldOffsetTable1122,
g_FieldOffsetTable1123,
g_FieldOffsetTable1124,
g_FieldOffsetTable1125,
g_FieldOffsetTable1126,
NULL,
g_FieldOffsetTable1128,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable1146,
g_FieldOffsetTable1147,
g_FieldOffsetTable1148,
g_FieldOffsetTable1149,
g_FieldOffsetTable1150,
g_FieldOffsetTable1151,
g_FieldOffsetTable1152,
g_FieldOffsetTable1153,
g_FieldOffsetTable1154,
g_FieldOffsetTable1155,
g_FieldOffsetTable1156,
g_FieldOffsetTable1157,
g_FieldOffsetTable1158,
g_FieldOffsetTable1159,
g_FieldOffsetTable1160,
g_FieldOffsetTable1161,
g_FieldOffsetTable1162,
g_FieldOffsetTable1163,
NULL,
g_FieldOffsetTable1165,
NULL,
g_FieldOffsetTable1167,
g_FieldOffsetTable1168,
g_FieldOffsetTable1169,
g_FieldOffsetTable1170,
g_FieldOffsetTable1171,
g_FieldOffsetTable1172,
g_FieldOffsetTable1173,
g_FieldOffsetTable1174,
g_FieldOffsetTable1175,
g_FieldOffsetTable1176,
g_FieldOffsetTable1177,
g_FieldOffsetTable1178,
g_FieldOffsetTable1179,
g_FieldOffsetTable1180,
g_FieldOffsetTable1181,
g_FieldOffsetTable1182,
g_FieldOffsetTable1183,
g_FieldOffsetTable1184,
NULL,
g_FieldOffsetTable1186,
g_FieldOffsetTable1187,
g_FieldOffsetTable1188,
g_FieldOffsetTable1189,
g_FieldOffsetTable1190,
g_FieldOffsetTable1191,
g_FieldOffsetTable1192,
NULL,
g_FieldOffsetTable1194,
g_FieldOffsetTable1195,
g_FieldOffsetTable1196,
g_FieldOffsetTable1197,
g_FieldOffsetTable1198,
g_FieldOffsetTable1199,
g_FieldOffsetTable1200,
g_FieldOffsetTable1201,
g_FieldOffsetTable1202,
NULL,
g_FieldOffsetTable1204,
g_FieldOffsetTable1205,
NULL,
g_FieldOffsetTable1207,
g_FieldOffsetTable1208,
g_FieldOffsetTable1209,
g_FieldOffsetTable1210,
NULL,
g_FieldOffsetTable1212,
g_FieldOffsetTable1213,
NULL,
NULL,
g_FieldOffsetTable1216,
NULL,
NULL,
NULL,
g_FieldOffsetTable1220,
g_FieldOffsetTable1221,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable1229,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable1242,
g_FieldOffsetTable1243,
NULL,
NULL,
g_FieldOffsetTable1246,
NULL,
NULL,
g_FieldOffsetTable1249,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable1254,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable1260,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable1266,
g_FieldOffsetTable1267,
g_FieldOffsetTable1268,
g_FieldOffsetTable1269,
g_FieldOffsetTable1270,
g_FieldOffsetTable1271,
g_FieldOffsetTable1272,
g_FieldOffsetTable1273,
g_FieldOffsetTable1274,
g_FieldOffsetTable1275,
g_FieldOffsetTable1276,
g_FieldOffsetTable1277,
g_FieldOffsetTable1278,
g_FieldOffsetTable1279,
g_FieldOffsetTable1280,
g_FieldOffsetTable1281,
g_FieldOffsetTable1282,
g_FieldOffsetTable1283,
g_FieldOffsetTable1284,
g_FieldOffsetTable1285,
g_FieldOffsetTable1286,
g_FieldOffsetTable1287,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable1296,
NULL,
g_FieldOffsetTable1298,
g_FieldOffsetTable1299,
g_FieldOffsetTable1300,
NULL,
g_FieldOffsetTable1302,
g_FieldOffsetTable1303,
NULL,
g_FieldOffsetTable1305,
g_FieldOffsetTable1306,
NULL,
g_FieldOffsetTable1308,
NULL,
g_FieldOffsetTable1310,
g_FieldOffsetTable1311,
NULL,
g_FieldOffsetTable1313,
g_FieldOffsetTable1314,
NULL,
g_FieldOffsetTable1316,
NULL,
NULL,
g_FieldOffsetTable1319,
NULL,
g_FieldOffsetTable1321,
NULL,
NULL,
g_FieldOffsetTable1324,
g_FieldOffsetTable1325,
g_FieldOffsetTable1326,
g_FieldOffsetTable1327,
g_FieldOffsetTable1328,
g_FieldOffsetTable1329,
g_FieldOffsetTable1330,
g_FieldOffsetTable1331,
g_FieldOffsetTable1332,
g_FieldOffsetTable1333,
g_FieldOffsetTable1334,
g_FieldOffsetTable1335,
NULL,
g_FieldOffsetTable1337,
g_FieldOffsetTable1338,
g_FieldOffsetTable1339,
g_FieldOffsetTable1340,
NULL,
NULL,
g_FieldOffsetTable1343,
g_FieldOffsetTable1344,
g_FieldOffsetTable1345,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable1366,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable1372,
NULL,
NULL,
g_FieldOffsetTable1375,
g_FieldOffsetTable1376,
NULL,
g_FieldOffsetTable1378,
g_FieldOffsetTable1379,
g_FieldOffsetTable1380,
g_FieldOffsetTable1381,
g_FieldOffsetTable1382,
g_FieldOffsetTable1383,
g_FieldOffsetTable1384,
g_FieldOffsetTable1385,
g_FieldOffsetTable1386,
g_FieldOffsetTable1387,
g_FieldOffsetTable1388,
NULL,
g_FieldOffsetTable1390,
NULL,
g_FieldOffsetTable1392,
g_FieldOffsetTable1393,
g_FieldOffsetTable1394,
g_FieldOffsetTable1395,
g_FieldOffsetTable1396,
g_FieldOffsetTable1397,
g_FieldOffsetTable1398,
g_FieldOffsetTable1399,
g_FieldOffsetTable1400,
g_FieldOffsetTable1401,
g_FieldOffsetTable1402,
g_FieldOffsetTable1403,
g_FieldOffsetTable1404,
g_FieldOffsetTable1405,
g_FieldOffsetTable1406,
g_FieldOffsetTable1407,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable1412,
g_FieldOffsetTable1413,
g_FieldOffsetTable1414,
NULL,
g_FieldOffsetTable1416,
g_FieldOffsetTable1417,
g_FieldOffsetTable1418,
g_FieldOffsetTable1419,
NULL,
g_FieldOffsetTable1421,
g_FieldOffsetTable1422,
g_FieldOffsetTable1423,
g_FieldOffsetTable1424,
g_FieldOffsetTable1425,
NULL,
g_FieldOffsetTable1427,
g_FieldOffsetTable1428,
g_FieldOffsetTable1429,
g_FieldOffsetTable1430,
NULL,
NULL,
NULL,
g_FieldOffsetTable1434,
NULL,
g_FieldOffsetTable1436,
NULL,
g_FieldOffsetTable1438,
g_FieldOffsetTable1439,
g_FieldOffsetTable1440,
NULL,
g_FieldOffsetTable1442,
g_FieldOffsetTable1443,
g_FieldOffsetTable1444,
NULL,
NULL,
NULL,
g_FieldOffsetTable1448,
NULL,
g_FieldOffsetTable1450,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable1455,
NULL,
g_FieldOffsetTable1457,
g_FieldOffsetTable1458,
g_FieldOffsetTable1459,
g_FieldOffsetTable1460,
g_FieldOffsetTable1461,
g_FieldOffsetTable1462,
NULL,
g_FieldOffsetTable1464,
g_FieldOffsetTable1465,
g_FieldOffsetTable1466,
NULL,
g_FieldOffsetTable1468,
g_FieldOffsetTable1469,
g_FieldOffsetTable1470,
g_FieldOffsetTable1471,
g_FieldOffsetTable1472,
g_FieldOffsetTable1473,
g_FieldOffsetTable1474,
NULL,
g_FieldOffsetTable1476,
g_FieldOffsetTable1477,
g_FieldOffsetTable1478,
NULL,
g_FieldOffsetTable1480,
NULL,
NULL,
g_FieldOffsetTable1483,
g_FieldOffsetTable1484,
NULL,
g_FieldOffsetTable1486,
NULL,
NULL,
g_FieldOffsetTable1489,
g_FieldOffsetTable1490,
NULL,
g_FieldOffsetTable1492,
g_FieldOffsetTable1493,
g_FieldOffsetTable1494,
NULL,
g_FieldOffsetTable1496,
NULL,
g_FieldOffsetTable1498,
g_FieldOffsetTable1499,
g_FieldOffsetTable1500,
g_FieldOffsetTable1501,
NULL,
g_FieldOffsetTable1503,
g_FieldOffsetTable1504,
g_FieldOffsetTable1505,
g_FieldOffsetTable1506,
g_FieldOffsetTable1507,
g_FieldOffsetTable1508,
g_FieldOffsetTable1509,
g_FieldOffsetTable1510,
g_FieldOffsetTable1511,
g_FieldOffsetTable1512,
g_FieldOffsetTable1513,
g_FieldOffsetTable1514,
g_FieldOffsetTable1515,
g_FieldOffsetTable1516,
g_FieldOffsetTable1517,
g_FieldOffsetTable1518,
g_FieldOffsetTable1519,
g_FieldOffsetTable1520,
g_FieldOffsetTable1521,
NULL,
g_FieldOffsetTable1523,
g_FieldOffsetTable1524,
g_FieldOffsetTable1525,
g_FieldOffsetTable1526,
g_FieldOffsetTable1527,
g_FieldOffsetTable1528,
g_FieldOffsetTable1529,
g_FieldOffsetTable1530,
g_FieldOffsetTable1531,
g_FieldOffsetTable1532,
g_FieldOffsetTable1533,
g_FieldOffsetTable1534,
g_FieldOffsetTable1535,
g_FieldOffsetTable1536,
g_FieldOffsetTable1537,
g_FieldOffsetTable1538,
g_FieldOffsetTable1539,
g_FieldOffsetTable1540,
g_FieldOffsetTable1541,
g_FieldOffsetTable1542,
g_FieldOffsetTable1543,
g_FieldOffsetTable1544,
g_FieldOffsetTable1545,
NULL,
g_FieldOffsetTable1547,
g_FieldOffsetTable1548,
g_FieldOffsetTable1549,
g_FieldOffsetTable1550,
NULL,
g_FieldOffsetTable1552,
g_FieldOffsetTable1553,
NULL,
g_FieldOffsetTable1555,
g_FieldOffsetTable1556,
g_FieldOffsetTable1557,
NULL,
g_FieldOffsetTable1559,
g_FieldOffsetTable1560,
g_FieldOffsetTable1561,
NULL,
g_FieldOffsetTable1563,
g_FieldOffsetTable1564,
g_FieldOffsetTable1565,
g_FieldOffsetTable1566,
g_FieldOffsetTable1567,
g_FieldOffsetTable1568,
g_FieldOffsetTable1569,
g_FieldOffsetTable1570,
g_FieldOffsetTable1571,
g_FieldOffsetTable1572,
g_FieldOffsetTable1573,
g_FieldOffsetTable1574,
g_FieldOffsetTable1575,
g_FieldOffsetTable1576,
g_FieldOffsetTable1577,
g_FieldOffsetTable1578,
g_FieldOffsetTable1579,
g_FieldOffsetTable1580,
g_FieldOffsetTable1581,
g_FieldOffsetTable1582,
g_FieldOffsetTable1583,
g_FieldOffsetTable1584,
g_FieldOffsetTable1585,
g_FieldOffsetTable1586,
g_FieldOffsetTable1587,
g_FieldOffsetTable1588,
g_FieldOffsetTable1589,
g_FieldOffsetTable1590,
g_FieldOffsetTable1591,
g_FieldOffsetTable1592,
g_FieldOffsetTable1593,
g_FieldOffsetTable1594,
g_FieldOffsetTable1595,
g_FieldOffsetTable1596,
g_FieldOffsetTable1597,
g_FieldOffsetTable1598,
g_FieldOffsetTable1599,
g_FieldOffsetTable1600,
g_FieldOffsetTable1601,
g_FieldOffsetTable1602,
g_FieldOffsetTable1603,
g_FieldOffsetTable1604,
g_FieldOffsetTable1605,
NULL,
NULL,
g_FieldOffsetTable1608,
g_FieldOffsetTable1609,
g_FieldOffsetTable1610,
NULL,
g_FieldOffsetTable1612,
g_FieldOffsetTable1613,
g_FieldOffsetTable1614,
g_FieldOffsetTable1615,
g_FieldOffsetTable1616,
g_FieldOffsetTable1617,
g_FieldOffsetTable1618,
g_FieldOffsetTable1619,
g_FieldOffsetTable1620,
g_FieldOffsetTable1621,
g_FieldOffsetTable1622,
g_FieldOffsetTable1623,
g_FieldOffsetTable1624,
g_FieldOffsetTable1625,
g_FieldOffsetTable1626,
g_FieldOffsetTable1627,
NULL,
g_FieldOffsetTable1629,
g_FieldOffsetTable1630,
g_FieldOffsetTable1631,
g_FieldOffsetTable1632,
g_FieldOffsetTable1633,
g_FieldOffsetTable1634,
g_FieldOffsetTable1635,
g_FieldOffsetTable1636,
NULL,
g_FieldOffsetTable1638,
NULL,
g_FieldOffsetTable1640,
g_FieldOffsetTable1641,
g_FieldOffsetTable1642,
g_FieldOffsetTable1643,
NULL,
g_FieldOffsetTable1645,
g_FieldOffsetTable1646,
g_FieldOffsetTable1647,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable1654,
g_FieldOffsetTable1655,
g_FieldOffsetTable1656,
NULL,
g_FieldOffsetTable1658,
g_FieldOffsetTable1659,
g_FieldOffsetTable1660,
g_FieldOffsetTable1661,
NULL,
NULL,
NULL,
g_FieldOffsetTable1665,
g_FieldOffsetTable1666,
g_FieldOffsetTable1667,
NULL,
NULL,
NULL,
g_FieldOffsetTable1671,
g_FieldOffsetTable1672,
g_FieldOffsetTable1673,
g_FieldOffsetTable1674,
g_FieldOffsetTable1675,
NULL,
g_FieldOffsetTable1677,
g_FieldOffsetTable1678,
g_FieldOffsetTable1679,
g_FieldOffsetTable1680,
g_FieldOffsetTable1681,
g_FieldOffsetTable1682,
g_FieldOffsetTable1683,
NULL,
g_FieldOffsetTable1685,
g_FieldOffsetTable1686,
g_FieldOffsetTable1687,
NULL,
g_FieldOffsetTable1689,
g_FieldOffsetTable1690,
g_FieldOffsetTable1691,
g_FieldOffsetTable1692,
NULL,
g_FieldOffsetTable1694,
g_FieldOffsetTable1695,
g_FieldOffsetTable1696,
g_FieldOffsetTable1697,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable1703,
g_FieldOffsetTable1704,
g_FieldOffsetTable1705,
g_FieldOffsetTable1706,
NULL,
NULL,
NULL,
g_FieldOffsetTable1710,
g_FieldOffsetTable1711,
g_FieldOffsetTable1712,
g_FieldOffsetTable1713,
g_FieldOffsetTable1714,
g_FieldOffsetTable1715,
g_FieldOffsetTable1716,
g_FieldOffsetTable1717,
NULL,
g_FieldOffsetTable1719,
g_FieldOffsetTable1720,
g_FieldOffsetTable1721,
g_FieldOffsetTable1722,
g_FieldOffsetTable1723,
g_FieldOffsetTable1724,
g_FieldOffsetTable1725,
g_FieldOffsetTable1726,
g_FieldOffsetTable1727,
g_FieldOffsetTable1728,
g_FieldOffsetTable1729,
g_FieldOffsetTable1730,
g_FieldOffsetTable1731,
g_FieldOffsetTable1732,
g_FieldOffsetTable1733,
g_FieldOffsetTable1734,
g_FieldOffsetTable1735,
g_FieldOffsetTable1736,
g_FieldOffsetTable1737,
g_FieldOffsetTable1738,
g_FieldOffsetTable1739,
g_FieldOffsetTable1740,
g_FieldOffsetTable1741,
g_FieldOffsetTable1742,
g_FieldOffsetTable1743,
g_FieldOffsetTable1744,
g_FieldOffsetTable1745,
g_FieldOffsetTable1746,
g_FieldOffsetTable1747,
g_FieldOffsetTable1748,
NULL,
g_FieldOffsetTable1750,
NULL,
g_FieldOffsetTable1752,
g_FieldOffsetTable1753,
g_FieldOffsetTable1754,
NULL,
g_FieldOffsetTable1756,
g_FieldOffsetTable1757,
g_FieldOffsetTable1758,
g_FieldOffsetTable1759,
g_FieldOffsetTable1760,
g_FieldOffsetTable1761,
g_FieldOffsetTable1762,
g_FieldOffsetTable1763,
g_FieldOffsetTable1764,
g_FieldOffsetTable1765,
g_FieldOffsetTable1766,
g_FieldOffsetTable1767,
g_FieldOffsetTable1768,
g_FieldOffsetTable1769,
NULL,
g_FieldOffsetTable1771,
NULL,
g_FieldOffsetTable1773,
g_FieldOffsetTable1774,
g_FieldOffsetTable1775,
g_FieldOffsetTable1776,
g_FieldOffsetTable1777,
g_FieldOffsetTable1778,
g_FieldOffsetTable1779,
g_FieldOffsetTable1780,
g_FieldOffsetTable1781,
g_FieldOffsetTable1782,
g_FieldOffsetTable1783,
g_FieldOffsetTable1784,
g_FieldOffsetTable1785,
g_FieldOffsetTable1786,
g_FieldOffsetTable1787,
g_FieldOffsetTable1788,
g_FieldOffsetTable1789,
g_FieldOffsetTable1790,
g_FieldOffsetTable1791,
g_FieldOffsetTable1792,
g_FieldOffsetTable1793,
g_FieldOffsetTable1794,
g_FieldOffsetTable1795,
g_FieldOffsetTable1796,
g_FieldOffsetTable1797,
g_FieldOffsetTable1798,
g_FieldOffsetTable1799,
g_FieldOffsetTable1800,
g_FieldOffsetTable1801,
g_FieldOffsetTable1802,
g_FieldOffsetTable1803,
g_FieldOffsetTable1804,
g_FieldOffsetTable1805,
g_FieldOffsetTable1806,
g_FieldOffsetTable1807,
g_FieldOffsetTable1808,
g_FieldOffsetTable1809,
g_FieldOffsetTable1810,
g_FieldOffsetTable1811,
g_FieldOffsetTable1812,
g_FieldOffsetTable1813,
g_FieldOffsetTable1814,
g_FieldOffsetTable1815,
NULL,
NULL,
g_FieldOffsetTable1818,
g_FieldOffsetTable1819,
g_FieldOffsetTable1820,
g_FieldOffsetTable1821,
g_FieldOffsetTable1822,
NULL,
NULL,
NULL,
g_FieldOffsetTable1826,
g_FieldOffsetTable1827,
g_FieldOffsetTable1828,
g_FieldOffsetTable1829,
g_FieldOffsetTable1830,
g_FieldOffsetTable1831,
g_FieldOffsetTable1832,
g_FieldOffsetTable1833,
g_FieldOffsetTable1834,
g_FieldOffsetTable1835,
g_FieldOffsetTable1836,
g_FieldOffsetTable1837,
g_FieldOffsetTable1838,
NULL,
g_FieldOffsetTable1840,
g_FieldOffsetTable1841,
NULL,
NULL,
g_FieldOffsetTable1844,
NULL,
g_FieldOffsetTable1846,
g_FieldOffsetTable1847,
g_FieldOffsetTable1848,
NULL,
g_FieldOffsetTable1850,
NULL,
g_FieldOffsetTable1852,
g_FieldOffsetTable1853,
NULL,
g_FieldOffsetTable1855,
g_FieldOffsetTable1856,
g_FieldOffsetTable1857,
g_FieldOffsetTable1858,
g_FieldOffsetTable1859,
g_FieldOffsetTable1860,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable1865,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable1870,
g_FieldOffsetTable1871,
g_FieldOffsetTable1872,
g_FieldOffsetTable1873,
g_FieldOffsetTable1874,
g_FieldOffsetTable1875,
NULL,
g_FieldOffsetTable1877,
g_FieldOffsetTable1878,
g_FieldOffsetTable1879,
g_FieldOffsetTable1880,
g_FieldOffsetTable1881,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable1909,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable1914,
g_FieldOffsetTable1915,
NULL,
g_FieldOffsetTable1917,
g_FieldOffsetTable1918,
g_FieldOffsetTable1919,
g_FieldOffsetTable1920,
g_FieldOffsetTable1921,
g_FieldOffsetTable1922,
g_FieldOffsetTable1923,
g_FieldOffsetTable1924,
g_FieldOffsetTable1925,
g_FieldOffsetTable1926,
g_FieldOffsetTable1927,
g_FieldOffsetTable1928,
g_FieldOffsetTable1929,
NULL,
g_FieldOffsetTable1931,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable1937,
g_FieldOffsetTable1938,
NULL,
NULL,
g_FieldOffsetTable1941,
NULL,
NULL,
NULL,
g_FieldOffsetTable1945,
NULL,
NULL,
g_FieldOffsetTable1948,
g_FieldOffsetTable1949,
g_FieldOffsetTable1950,
NULL,
NULL,
g_FieldOffsetTable1953,
g_FieldOffsetTable1954,
NULL,
NULL,
g_FieldOffsetTable1957,
NULL,
NULL,
NULL,
g_FieldOffsetTable1961,
g_FieldOffsetTable1962,
g_FieldOffsetTable1963,
g_FieldOffsetTable1964,
g_FieldOffsetTable1965,
g_FieldOffsetTable1966,
g_FieldOffsetTable1967,
NULL,
NULL,
g_FieldOffsetTable1970,
g_FieldOffsetTable1971,
NULL,
g_FieldOffsetTable1973,
NULL,
g_FieldOffsetTable1975,
g_FieldOffsetTable1976,
g_FieldOffsetTable1977,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable1983,
g_FieldOffsetTable1984,
NULL,
NULL,
g_FieldOffsetTable1987,
g_FieldOffsetTable1988,
g_FieldOffsetTable1989,
g_FieldOffsetTable1990,
g_FieldOffsetTable1991,
g_FieldOffsetTable1992,
g_FieldOffsetTable1993,
g_FieldOffsetTable1994,
g_FieldOffsetTable1995,
g_FieldOffsetTable1996,
g_FieldOffsetTable1997,
g_FieldOffsetTable1998,
g_FieldOffsetTable1999,
g_FieldOffsetTable2000,
g_FieldOffsetTable2001,
NULL,
g_FieldOffsetTable2003,
g_FieldOffsetTable2004,
NULL,
g_FieldOffsetTable2006,
NULL,
NULL,
g_FieldOffsetTable2009,
g_FieldOffsetTable2010,
g_FieldOffsetTable2011,
NULL,
g_FieldOffsetTable2013,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable2020,
NULL,
NULL,
g_FieldOffsetTable2023,
g_FieldOffsetTable2024,
g_FieldOffsetTable2025,
g_FieldOffsetTable2026,
NULL,
g_FieldOffsetTable2028,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable2033,
NULL,
g_FieldOffsetTable2035,
g_FieldOffsetTable2036,
g_FieldOffsetTable2037,
g_FieldOffsetTable2038,
g_FieldOffsetTable2039,
g_FieldOffsetTable2040,
NULL,
g_FieldOffsetTable2042,
g_FieldOffsetTable2043,
g_FieldOffsetTable2044,
g_FieldOffsetTable2045,
g_FieldOffsetTable2046,
g_FieldOffsetTable2047,
g_FieldOffsetTable2048,
g_FieldOffsetTable2049,
g_FieldOffsetTable2050,
g_FieldOffsetTable2051,
g_FieldOffsetTable2052,
g_FieldOffsetTable2053,
NULL,
NULL,
g_FieldOffsetTable2056,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable2061,
g_FieldOffsetTable2062,
g_FieldOffsetTable2063,
NULL,
g_FieldOffsetTable2065,
g_FieldOffsetTable2066,
NULL,
g_FieldOffsetTable2068,
g_FieldOffsetTable2069,
g_FieldOffsetTable2070,
NULL,
g_FieldOffsetTable2072,
g_FieldOffsetTable2073,
NULL,
NULL,
NULL,
g_FieldOffsetTable2077,
g_FieldOffsetTable2078,
g_FieldOffsetTable2079,
g_FieldOffsetTable2080,
NULL,
NULL,
g_FieldOffsetTable2083,
g_FieldOffsetTable2084,
g_FieldOffsetTable2085,
g_FieldOffsetTable2086,
g_FieldOffsetTable2087,
g_FieldOffsetTable2088,
g_FieldOffsetTable2089,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable2094,
g_FieldOffsetTable2095,
g_FieldOffsetTable2096,
g_FieldOffsetTable2097,
NULL,
g_FieldOffsetTable2099,
g_FieldOffsetTable2100,
g_FieldOffsetTable2101,
g_FieldOffsetTable2102,
g_FieldOffsetTable2103,
g_FieldOffsetTable2104,
g_FieldOffsetTable2105,
g_FieldOffsetTable2106,
g_FieldOffsetTable2107,
g_FieldOffsetTable2108,
g_FieldOffsetTable2109,
NULL,
g_FieldOffsetTable2111,
NULL,
g_FieldOffsetTable2113,
NULL,
g_FieldOffsetTable2115,
NULL,
g_FieldOffsetTable2117,
NULL,
g_FieldOffsetTable2119,
NULL,
g_FieldOffsetTable2121,
g_FieldOffsetTable2122,
g_FieldOffsetTable2123,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable2132,
g_FieldOffsetTable2133,
NULL,
NULL,
NULL,
g_FieldOffsetTable2137,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable2142,
g_FieldOffsetTable2143,
NULL,
NULL,
NULL,
g_FieldOffsetTable2147,
g_FieldOffsetTable2148,
NULL,
g_FieldOffsetTable2150,
g_FieldOffsetTable2151,
NULL,
NULL,
g_FieldOffsetTable2154,
g_FieldOffsetTable2155,
NULL,
NULL,
g_FieldOffsetTable2158,
NULL,
NULL,
NULL,
g_FieldOffsetTable2162,
g_FieldOffsetTable2163,
g_FieldOffsetTable2164,
NULL,
NULL,
g_FieldOffsetTable2167,
g_FieldOffsetTable2168,
g_FieldOffsetTable2169,
NULL,
NULL,
g_FieldOffsetTable2172,
g_FieldOffsetTable2173,
NULL,
NULL,
g_FieldOffsetTable2176,
g_FieldOffsetTable2177,
NULL,
NULL,
g_FieldOffsetTable2180,
g_FieldOffsetTable2181,
g_FieldOffsetTable2182,
g_FieldOffsetTable2183,
g_FieldOffsetTable2184,
g_FieldOffsetTable2185,
g_FieldOffsetTable2186,
g_FieldOffsetTable2187,
g_FieldOffsetTable2188,
g_FieldOffsetTable2189,
NULL,
g_FieldOffsetTable2191,
NULL,
NULL,
NULL,
g_FieldOffsetTable2195,
g_FieldOffsetTable2196,
g_FieldOffsetTable2197,
g_FieldOffsetTable2198,
g_FieldOffsetTable2199,
g_FieldOffsetTable2200,
g_FieldOffsetTable2201,
g_FieldOffsetTable2202,
g_FieldOffsetTable2203,
g_FieldOffsetTable2204,
NULL,
NULL,
NULL,
g_FieldOffsetTable2208,
g_FieldOffsetTable2209,
NULL,
NULL,
NULL,
g_FieldOffsetTable2213,
g_FieldOffsetTable2214,
g_FieldOffsetTable2215,
g_FieldOffsetTable2216,
g_FieldOffsetTable2217,
g_FieldOffsetTable2218,
g_FieldOffsetTable2219,
g_FieldOffsetTable2220,
g_FieldOffsetTable2221,
g_FieldOffsetTable2222,
g_FieldOffsetTable2223,
g_FieldOffsetTable2224,
g_FieldOffsetTable2225,
NULL,
NULL,
NULL,
NULL,
NULL,
g_FieldOffsetTable2231,
g_FieldOffsetTable2232,
g_FieldOffsetTable2233,
g_FieldOffsetTable2234,
g_FieldOffsetTable2235,
NULL,
g_FieldOffsetTable2237,
NULL,
NULL,
NULL,
g_FieldOffsetTable2241,
NULL,
NULL,
g_FieldOffsetTable2244,
g_FieldOffsetTable2245,
g_FieldOffsetTable2246,
NULL,
g_FieldOffsetTable2248,
g_FieldOffsetTable2249,
g_FieldOffsetTable2250,
NULL,
g_FieldOffsetTable2252,
g_FieldOffsetTable2253,
g_FieldOffsetTable2254,
g_FieldOffsetTable2255,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize0;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize3;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize4;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize5;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize6;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize7;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize8;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize9;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize10;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize11;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize12;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize13;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize14;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize15;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize16;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize17;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize18;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize19;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize20;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize21;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize22;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize23;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize24;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize25;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize26;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize27;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize28;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize29;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize30;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize31;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize32;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize33;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize34;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize35;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize36;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize37;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize38;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize39;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize40;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize41;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize42;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize43;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize44;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize45;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize46;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize47;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize48;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize49;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize50;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize51;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize52;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize53;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize54;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize55;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize56;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize57;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize58;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize59;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize60;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize61;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize62;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize63;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize64;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize65;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize66;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize67;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize68;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize69;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize70;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize71;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize72;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize73;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize74;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize75;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize76;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize77;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize78;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize79;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize80;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize81;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize82;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize83;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize84;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize85;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize86;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize87;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize88;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize89;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize90;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize91;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize92;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize93;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize94;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize95;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize96;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize97;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize98;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize99;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize100;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize101;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize102;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize103;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize104;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize105;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize106;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize107;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize108;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize109;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize110;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize111;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize112;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize113;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize114;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize115;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize116;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize117;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize118;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize119;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize120;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize121;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize122;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize123;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize124;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize125;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize126;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize127;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize128;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize129;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize130;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize131;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize132;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize133;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize134;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize135;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize136;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize137;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize138;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize139;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize140;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize141;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize142;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize143;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize144;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize145;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize146;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize147;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize148;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize149;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize150;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize151;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize152;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize153;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize154;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize155;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize156;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize157;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize158;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize159;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize160;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize161;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize162;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize163;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize164;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize165;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize166;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize167;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize168;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize169;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize170;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize171;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize172;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize173;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize174;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize175;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize176;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize177;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize178;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize179;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize180;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize181;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize182;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize183;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize184;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize185;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize186;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize187;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize188;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize189;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize190;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize191;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize192;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize193;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize194;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize195;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize196;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize197;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize198;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize199;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize200;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize201;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize202;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize203;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize204;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize205;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize206;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize207;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize208;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize209;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize210;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize211;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize212;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize213;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize214;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize215;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize216;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize217;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize218;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize219;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize220;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize221;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize222;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize223;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize224;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize225;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize226;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize227;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize228;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize229;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize230;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize231;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize232;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize233;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize234;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize235;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize236;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize237;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize238;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize239;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize240;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize241;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize242;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize243;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize244;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize245;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize246;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize247;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize248;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize249;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize250;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize251;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize252;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize253;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize254;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize255;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize256;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize257;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize258;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize259;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize260;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize261;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize262;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize263;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize264;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize265;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize266;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize267;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize268;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize269;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize270;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize271;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize272;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize273;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize274;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize275;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize276;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize277;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize278;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize279;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize280;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize281;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize282;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize283;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize284;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize285;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize286;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize287;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize288;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize289;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize290;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize291;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize292;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize293;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize294;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize295;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize296;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize297;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize298;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize299;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize300;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize301;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize302;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize303;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize304;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize305;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize306;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize307;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize308;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize309;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize310;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize311;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize312;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize313;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize314;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize315;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize316;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize317;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize318;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize319;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize320;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize321;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize322;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize323;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize324;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize325;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize326;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize327;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize328;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize329;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize330;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize331;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize332;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize333;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize334;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize335;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize336;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize337;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize338;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize339;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize340;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize341;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize342;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize343;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize344;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize345;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize346;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize347;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize348;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize349;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize350;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize351;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize352;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize353;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize354;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize355;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize356;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize357;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize358;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize359;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize360;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize361;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize362;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize363;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize364;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize365;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize366;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize367;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize368;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize369;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize370;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize371;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize372;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize373;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize374;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize375;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize376;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize377;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize378;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize379;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize380;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize381;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize382;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize383;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize384;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize385;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize386;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize387;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize388;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize389;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize390;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize391;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize392;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize393;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize394;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize395;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize396;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize397;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize398;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize399;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize400;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize401;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize402;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize403;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize404;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize405;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize406;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize407;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize408;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize409;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize410;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize411;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize412;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize413;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize414;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize415;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize416;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize417;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize418;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize419;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize420;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize421;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize422;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize423;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize424;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize425;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize426;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize427;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize428;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize429;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize430;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize431;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize432;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize433;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize434;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize435;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize436;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize437;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize438;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize439;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize440;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize441;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize442;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize443;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize444;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize445;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize446;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize447;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize448;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize449;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize450;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize451;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize452;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize453;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize454;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize455;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize456;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize457;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize458;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize459;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize460;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize461;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize462;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize463;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize464;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize465;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize466;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize467;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize468;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize469;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize470;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize471;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize472;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize473;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize474;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize475;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize476;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize477;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize478;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize479;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize480;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize481;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize482;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize483;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize484;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize485;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize486;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize487;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize488;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize489;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize490;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize491;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize492;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize493;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize494;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize495;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize496;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize497;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize498;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize499;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize500;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize501;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize502;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize503;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize504;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize505;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize506;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize507;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize508;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize509;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize510;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize511;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize512;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize513;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize514;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize515;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize516;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize517;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize518;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize519;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize520;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize521;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize522;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize523;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize524;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize525;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize526;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize527;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize528;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize529;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize530;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize531;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize532;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize533;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize534;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize535;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize536;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize537;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize538;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize539;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize540;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize541;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize542;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize543;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize544;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize545;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize546;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize547;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize548;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize549;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize550;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize551;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize552;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize553;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize554;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize555;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize556;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize557;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize558;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize559;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize560;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize561;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize562;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize563;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize564;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize565;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize566;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize567;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize568;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize569;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize570;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize571;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize572;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize573;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize574;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize575;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize576;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize577;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize578;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize579;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize580;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize581;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize582;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize583;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize584;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize585;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize586;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize587;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize588;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize589;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize590;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize591;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize592;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize593;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize594;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize595;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize596;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize597;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize598;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize599;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize600;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize601;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize602;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize603;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize604;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize605;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize606;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize607;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize608;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize609;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize610;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize611;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize612;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize613;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize614;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize615;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize616;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize617;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize618;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize619;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize620;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize621;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize622;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize623;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize624;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize625;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize626;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize627;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize628;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize629;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize630;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize631;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize632;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize633;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize634;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize635;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize636;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize637;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize638;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize639;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize640;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize641;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize642;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize643;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize644;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize645;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize646;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize647;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize648;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize649;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize650;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize651;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize652;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize653;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize654;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize655;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize656;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize657;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize658;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize659;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize660;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize661;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize662;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize663;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize664;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize665;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize666;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize667;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize668;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize669;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize670;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize671;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize672;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize673;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize674;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize675;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize676;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize677;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize678;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize679;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize680;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize681;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize682;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize683;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize684;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize685;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize686;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize687;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize688;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize689;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize690;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize691;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize692;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize693;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize694;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize695;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize696;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize697;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize698;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize699;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize700;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize701;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize702;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize703;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize704;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize705;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize706;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize707;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize708;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize709;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize710;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize711;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize712;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize713;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize714;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize715;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize716;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize717;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize718;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize719;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize720;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize721;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize722;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize723;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize724;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize725;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize726;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize727;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize728;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize729;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize730;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize731;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize732;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize733;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize734;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize735;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize736;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize737;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize738;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize739;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize740;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize741;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize742;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize743;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize744;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize745;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize746;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize747;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize748;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize749;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize750;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize751;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize752;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize753;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize754;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize755;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize756;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize757;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize758;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize759;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize760;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize761;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize762;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize763;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize764;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize765;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize766;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize767;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize768;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize769;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize770;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize771;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize772;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize773;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize774;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize775;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize776;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize777;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize778;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize779;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize780;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize781;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize782;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize783;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize784;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize785;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize786;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize787;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize788;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize789;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize790;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize791;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize792;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize793;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize794;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize795;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize796;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize797;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize798;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize799;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize800;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize801;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize802;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize803;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize804;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize805;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize806;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize807;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize808;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize809;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize810;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize811;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize812;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize813;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize814;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize815;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize816;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize817;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize818;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize819;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize820;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize821;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize822;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize823;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize824;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize825;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize826;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize827;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize828;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize829;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize830;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize831;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize832;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize833;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize834;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize835;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize836;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize837;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize838;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize839;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize840;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize841;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize842;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize843;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize844;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize845;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize846;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize847;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize848;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize849;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize850;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize851;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize852;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize853;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize854;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize855;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize856;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize857;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize858;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize859;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize860;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize861;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize862;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize863;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize864;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize865;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize866;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize867;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize868;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize869;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize870;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize871;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize872;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize873;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize874;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize875;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize876;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize877;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize878;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize879;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize880;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize881;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize882;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize883;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize884;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize885;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize886;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize887;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize888;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize889;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize890;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize891;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize892;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize893;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize894;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize895;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize896;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize897;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize898;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize899;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize900;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize901;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize902;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize903;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize904;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize905;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize906;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize907;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize908;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize909;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize910;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize911;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize912;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize913;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize914;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize915;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize916;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize917;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize918;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize919;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize920;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize921;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize922;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize923;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize924;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize925;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize926;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize927;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize928;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize929;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize930;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize931;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize932;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize933;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize934;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize935;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize936;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize937;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize938;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize939;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize940;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize941;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize942;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize943;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize944;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize945;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize946;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize947;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize948;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize949;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize950;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize951;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize952;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize953;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize954;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize955;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize956;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize957;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize958;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize959;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize960;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize961;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize962;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize963;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize964;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize965;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize966;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize967;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize968;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize969;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize970;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize971;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize972;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize973;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize974;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize975;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize976;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize977;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize978;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize979;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize980;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize981;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize982;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize983;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize984;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize985;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize986;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize987;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize988;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize989;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize990;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize991;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize992;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize993;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize994;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize995;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize996;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize997;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize998;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize999;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1000;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1001;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1002;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1003;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1004;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1005;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1006;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1007;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1008;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1009;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1010;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1011;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1012;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1013;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1014;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1015;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1016;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1017;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1018;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1019;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1020;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1021;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1022;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1023;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1024;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1025;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1026;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1027;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1028;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1029;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1030;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1031;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1032;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1033;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1034;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1035;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1036;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1037;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1038;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1039;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1040;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1041;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1042;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1043;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1044;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1045;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1046;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1047;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1048;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1049;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1050;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1051;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1052;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1053;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1054;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1055;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1056;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1057;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1058;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1059;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1060;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1061;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1062;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1063;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1064;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1065;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1066;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1067;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1068;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1069;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1070;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1071;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1072;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1073;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1074;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1075;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1076;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1077;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1078;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1079;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1080;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1081;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1082;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1083;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1084;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1085;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1086;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1087;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1088;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1089;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1090;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1091;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1092;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1093;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1094;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1095;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1096;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1097;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1098;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1099;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1100;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1101;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1102;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1103;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1104;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1105;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1106;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1107;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1108;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1109;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1110;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1111;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1112;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1113;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1114;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1115;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1116;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1117;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1118;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1119;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1120;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1121;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1122;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1123;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1124;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1125;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1126;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1127;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1128;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1129;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1130;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1131;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1132;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1133;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1134;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1135;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1136;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1137;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1138;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1139;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1140;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1141;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1142;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1143;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1144;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1145;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1146;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1147;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1148;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1149;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1150;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1151;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1152;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1153;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1154;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1155;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1156;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1157;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1158;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1159;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1160;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1161;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1162;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1163;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1164;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1165;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1166;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1167;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1168;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1169;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1170;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1171;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1172;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1173;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1174;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1175;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1176;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1177;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1178;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1179;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1180;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1181;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1182;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1183;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1184;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1185;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1186;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1187;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1188;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1189;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1190;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1191;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1192;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1193;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1194;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1195;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1196;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1197;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1198;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1199;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1200;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1201;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1202;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1203;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1204;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1205;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1206;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1207;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1208;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1209;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1210;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1211;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1212;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1213;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1214;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1215;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1216;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1217;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1218;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1219;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1220;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1221;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1222;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1223;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1224;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1225;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1226;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1227;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1228;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1229;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1230;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1231;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1232;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1233;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1234;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1235;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1236;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1237;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1238;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1239;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1240;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1241;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1242;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1243;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1244;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1245;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1246;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1247;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1248;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1249;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1250;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1251;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1252;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1253;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1254;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1255;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1256;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1257;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1258;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1259;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1260;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1261;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1262;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1263;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1264;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1265;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1266;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1267;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1268;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1269;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1270;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1271;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1272;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1273;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1274;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1275;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1276;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1277;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1278;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1279;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1280;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1281;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1282;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1283;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1284;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1285;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1286;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1287;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1288;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1289;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1290;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1291;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1292;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1293;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1294;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1295;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1296;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1297;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1298;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1299;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1300;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1301;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1302;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1303;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1304;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1305;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1306;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1307;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1308;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1309;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1310;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1311;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1312;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1313;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1314;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1315;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1316;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1317;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1318;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1319;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1320;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1321;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1322;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1323;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1324;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1325;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1326;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1327;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1328;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1329;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1330;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1331;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1332;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1333;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1334;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1335;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1336;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1337;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1338;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1339;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1340;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1341;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1342;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1343;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1344;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1345;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1346;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1347;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1348;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1349;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1350;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1351;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1352;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1353;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1354;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1355;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1356;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1357;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1358;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1359;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1360;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1361;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1362;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1363;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1364;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1365;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1366;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1367;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1368;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1369;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1370;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1371;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1372;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1373;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1374;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1375;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1376;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1377;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1378;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1379;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1380;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1381;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1382;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1383;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1384;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1385;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1386;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1387;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1388;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1389;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1390;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1391;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1392;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1393;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1394;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1395;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1396;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1397;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1398;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1399;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1400;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1401;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1402;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1403;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1404;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1405;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1406;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1407;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1408;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1409;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1410;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1411;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1412;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1413;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1414;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1415;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1416;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1417;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1418;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1419;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1420;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1421;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1422;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1423;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1424;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1425;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1426;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1427;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1428;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1429;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1430;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1431;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1432;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1433;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1434;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1435;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1436;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1437;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1438;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1439;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1440;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1441;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1442;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1443;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1444;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1445;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1446;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1447;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1448;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1449;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1450;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1451;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1452;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1453;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1454;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1455;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1456;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1457;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1458;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1459;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1460;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1461;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1462;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1463;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1464;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1465;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1466;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1467;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1468;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1469;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1470;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1471;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1472;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1473;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1474;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1475;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1476;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1477;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1478;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1479;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1480;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1481;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1482;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1483;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1484;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1485;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1486;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1487;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1488;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1489;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1490;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1491;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1492;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1493;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1494;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1495;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1496;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1497;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1498;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1499;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1500;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1501;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1502;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1503;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1504;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1505;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1506;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1507;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1508;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1509;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1510;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1511;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1512;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1513;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1514;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1515;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1516;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1517;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1518;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1519;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1520;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1521;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1522;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1523;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1524;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1525;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1526;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1527;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1528;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1529;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1530;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1531;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1532;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1533;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1534;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1535;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1536;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1537;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1538;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1539;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1540;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1541;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1542;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1543;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1544;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1545;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1546;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1547;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1548;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1549;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1550;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1551;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1552;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1553;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1554;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1555;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1556;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1557;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1558;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1559;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1560;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1561;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1562;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1563;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1564;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1565;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1566;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1567;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1568;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1569;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1570;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1571;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1572;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1573;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1574;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1575;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1576;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1577;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1578;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1579;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1580;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1581;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1582;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1583;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1584;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1585;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1586;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1587;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1588;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1589;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1590;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1591;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1592;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1593;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1594;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1595;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1596;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1597;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1598;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1599;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1600;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1601;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1602;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1603;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1604;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1605;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1606;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1607;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1608;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1609;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1610;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1611;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1612;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1613;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1614;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1615;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1616;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1617;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1618;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1619;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1620;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1621;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1622;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1623;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1624;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1625;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1626;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1627;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1628;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1629;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1630;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1631;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1632;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1633;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1634;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1635;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1636;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1637;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1638;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1639;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1640;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1641;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1642;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1643;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1644;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1645;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1646;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1647;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1648;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1649;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1650;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1651;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1652;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1653;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1654;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1655;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1656;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1657;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1658;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1659;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1660;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1661;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1662;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1663;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1664;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1665;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1666;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1667;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1668;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1669;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1670;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1671;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1672;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1673;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1674;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1675;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1676;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1677;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1678;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1679;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1680;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1681;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1682;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1683;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1684;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1685;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1686;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1687;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1688;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1689;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1690;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1691;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1692;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1693;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1694;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1695;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1696;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1697;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1698;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1699;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1700;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1701;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1702;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1703;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1704;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1705;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1706;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1707;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1708;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1709;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1710;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1711;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1712;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1713;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1714;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1715;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1716;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1717;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1718;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1719;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1720;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1721;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1722;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1723;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1724;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1725;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1726;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1727;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1728;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1729;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1730;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1731;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1732;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1733;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1734;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1735;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1736;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1737;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1738;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1739;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1740;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1741;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1742;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1743;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1744;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1745;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1746;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1747;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1748;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1749;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1750;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1751;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1752;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1753;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1754;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1755;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1756;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1757;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1758;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1759;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1760;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1761;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1762;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1763;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1764;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1765;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1766;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1767;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1768;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1769;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1770;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1771;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1772;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1773;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1774;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1775;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1776;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1777;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1778;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1779;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1780;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1781;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1782;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1783;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1784;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1785;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1786;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1787;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1788;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1789;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1790;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1791;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1792;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1793;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1794;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1795;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1796;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1797;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1798;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1799;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1800;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1801;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1802;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1803;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1804;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1805;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1806;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1807;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1808;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1809;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1810;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1811;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1812;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1813;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1814;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1815;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1816;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1817;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1818;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1819;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1820;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1821;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1822;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1823;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1824;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1825;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1826;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1827;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1828;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1829;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1830;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1831;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1832;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1833;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1834;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1835;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1836;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1837;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1838;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1839;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1840;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1841;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1842;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1843;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1844;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1845;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1846;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1847;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1848;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1849;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1850;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1851;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1852;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1853;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1854;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1855;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1856;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1857;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1858;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1859;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1860;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1861;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1862;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1863;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1864;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1865;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1866;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1867;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1868;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1869;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1870;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1871;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1872;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1873;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1874;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1875;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1876;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1877;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1878;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1879;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1880;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1881;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1882;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1883;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1884;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1885;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1886;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1887;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1888;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1889;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1890;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1891;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1892;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1893;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1894;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1895;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1896;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1897;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1898;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1899;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1900;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1901;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1902;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1903;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1904;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1905;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1906;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1907;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1908;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1909;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1910;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1911;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1912;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1913;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1914;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1915;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1916;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1917;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1918;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1919;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1920;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1921;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1922;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1923;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1924;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1925;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1926;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1927;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1928;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1929;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1930;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1931;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1932;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1933;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1934;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1935;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1936;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1937;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1938;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1939;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1940;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1941;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1942;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1943;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1944;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1945;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1946;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1947;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1948;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1949;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1950;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1951;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1952;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1953;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1954;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1955;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1956;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1957;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1958;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1959;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1960;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1961;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1962;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1963;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1964;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1965;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1966;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1967;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1968;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1969;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1970;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1971;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1972;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1973;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1974;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1975;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1976;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1977;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1978;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1979;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1980;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1981;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1982;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1983;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1984;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1985;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1986;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1987;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1988;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1989;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1990;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1991;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1992;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1993;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1994;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1995;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1996;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1997;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1998;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1999;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2000;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2001;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2002;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2003;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2004;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2005;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2006;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2007;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2008;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2009;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2010;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2011;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2012;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2013;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2014;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2015;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2016;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2017;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2018;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2019;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2020;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2021;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2022;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2023;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2024;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2025;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2026;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2027;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2028;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2029;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2030;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2031;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2032;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2033;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2034;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2035;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2036;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2037;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2038;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2039;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2040;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2041;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2042;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2043;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2044;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2045;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2046;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2047;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2048;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2049;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2050;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2051;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2052;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2053;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2054;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2055;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2056;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2057;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2058;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2059;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2060;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2061;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2062;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2063;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2064;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2065;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2066;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2067;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2068;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2069;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2070;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2071;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2072;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2073;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2074;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2075;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2076;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2077;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2078;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2079;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2080;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2081;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2082;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2083;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2084;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2085;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2086;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2087;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2088;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2089;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2090;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2091;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2092;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2093;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2094;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2095;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2096;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2097;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2098;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2099;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2100;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2101;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2102;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2103;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2104;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2105;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2106;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2107;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2108;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2109;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2110;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2111;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2112;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2113;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2114;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2115;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2116;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2117;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2118;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2119;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2120;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2121;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2122;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2123;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2124;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2125;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2126;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2127;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2128;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2129;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2130;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2131;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2132;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2133;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2134;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2135;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2136;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2137;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2138;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2139;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2140;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2141;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2142;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2143;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2144;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2145;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2146;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2147;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2148;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2149;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2150;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2151;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2152;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2153;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2154;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2155;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2156;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2157;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2158;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2159;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2160;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2161;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2162;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2163;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2164;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2165;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2166;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2167;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2168;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2169;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2170;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2171;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2172;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2173;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2174;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2175;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2176;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2177;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2178;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2179;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2180;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2181;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2182;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2183;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2184;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2185;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2186;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2187;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2188;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2189;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2190;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2191;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2192;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2193;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2194;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2195;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2196;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2197;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2198;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2199;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2200;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2201;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2202;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2203;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2204;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2205;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2206;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2207;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2208;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2209;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2210;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2211;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2212;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2213;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2214;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2215;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2216;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2217;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2218;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2219;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2220;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2221;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2222;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2223;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2224;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2225;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2226;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2227;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2228;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2229;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2230;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2231;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2232;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2233;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2234;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2235;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2236;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2237;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2238;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2239;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2240;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2241;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2242;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2243;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2244;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2245;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2246;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2247;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2248;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2249;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2250;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2251;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2252;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2253;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2254;
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2255;
extern const Il2CppTypeDefinitionSizes* g_Il2CppTypeDefinitionSizesTable[2256] =
{
(&g_typeDefinitionSize0),
(&g_typeDefinitionSize1),
(&g_typeDefinitionSize2),
(&g_typeDefinitionSize3),
(&g_typeDefinitionSize4),
(&g_typeDefinitionSize5),
(&g_typeDefinitionSize6),
(&g_typeDefinitionSize7),
(&g_typeDefinitionSize8),
(&g_typeDefinitionSize9),
(&g_typeDefinitionSize10),
(&g_typeDefinitionSize11),
(&g_typeDefinitionSize12),
(&g_typeDefinitionSize13),
(&g_typeDefinitionSize14),
(&g_typeDefinitionSize15),
(&g_typeDefinitionSize16),
(&g_typeDefinitionSize17),
(&g_typeDefinitionSize18),
(&g_typeDefinitionSize19),
(&g_typeDefinitionSize20),
(&g_typeDefinitionSize21),
(&g_typeDefinitionSize22),
(&g_typeDefinitionSize23),
(&g_typeDefinitionSize24),
(&g_typeDefinitionSize25),
(&g_typeDefinitionSize26),
(&g_typeDefinitionSize27),
(&g_typeDefinitionSize28),
(&g_typeDefinitionSize29),
(&g_typeDefinitionSize30),
(&g_typeDefinitionSize31),
(&g_typeDefinitionSize32),
(&g_typeDefinitionSize33),
(&g_typeDefinitionSize34),
(&g_typeDefinitionSize35),
(&g_typeDefinitionSize36),
(&g_typeDefinitionSize37),
(&g_typeDefinitionSize38),
(&g_typeDefinitionSize39),
(&g_typeDefinitionSize40),
(&g_typeDefinitionSize41),
(&g_typeDefinitionSize42),
(&g_typeDefinitionSize43),
(&g_typeDefinitionSize44),
(&g_typeDefinitionSize45),
(&g_typeDefinitionSize46),
(&g_typeDefinitionSize47),
(&g_typeDefinitionSize48),
(&g_typeDefinitionSize49),
(&g_typeDefinitionSize50),
(&g_typeDefinitionSize51),
(&g_typeDefinitionSize52),
(&g_typeDefinitionSize53),
(&g_typeDefinitionSize54),
(&g_typeDefinitionSize55),
(&g_typeDefinitionSize56),
(&g_typeDefinitionSize57),
(&g_typeDefinitionSize58),
(&g_typeDefinitionSize59),
(&g_typeDefinitionSize60),
(&g_typeDefinitionSize61),
(&g_typeDefinitionSize62),
(&g_typeDefinitionSize63),
(&g_typeDefinitionSize64),
(&g_typeDefinitionSize65),
(&g_typeDefinitionSize66),
(&g_typeDefinitionSize67),
(&g_typeDefinitionSize68),
(&g_typeDefinitionSize69),
(&g_typeDefinitionSize70),
(&g_typeDefinitionSize71),
(&g_typeDefinitionSize72),
(&g_typeDefinitionSize73),
(&g_typeDefinitionSize74),
(&g_typeDefinitionSize75),
(&g_typeDefinitionSize76),
(&g_typeDefinitionSize77),
(&g_typeDefinitionSize78),
(&g_typeDefinitionSize79),
(&g_typeDefinitionSize80),
(&g_typeDefinitionSize81),
(&g_typeDefinitionSize82),
(&g_typeDefinitionSize83),
(&g_typeDefinitionSize84),
(&g_typeDefinitionSize85),
(&g_typeDefinitionSize86),
(&g_typeDefinitionSize87),
(&g_typeDefinitionSize88),
(&g_typeDefinitionSize89),
(&g_typeDefinitionSize90),
(&g_typeDefinitionSize91),
(&g_typeDefinitionSize92),
(&g_typeDefinitionSize93),
(&g_typeDefinitionSize94),
(&g_typeDefinitionSize95),
(&g_typeDefinitionSize96),
(&g_typeDefinitionSize97),
(&g_typeDefinitionSize98),
(&g_typeDefinitionSize99),
(&g_typeDefinitionSize100),
(&g_typeDefinitionSize101),
(&g_typeDefinitionSize102),
(&g_typeDefinitionSize103),
(&g_typeDefinitionSize104),
(&g_typeDefinitionSize105),
(&g_typeDefinitionSize106),
(&g_typeDefinitionSize107),
(&g_typeDefinitionSize108),
(&g_typeDefinitionSize109),
(&g_typeDefinitionSize110),
(&g_typeDefinitionSize111),
(&g_typeDefinitionSize112),
(&g_typeDefinitionSize113),
(&g_typeDefinitionSize114),
(&g_typeDefinitionSize115),
(&g_typeDefinitionSize116),
(&g_typeDefinitionSize117),
(&g_typeDefinitionSize118),
(&g_typeDefinitionSize119),
(&g_typeDefinitionSize120),
(&g_typeDefinitionSize121),
(&g_typeDefinitionSize122),
(&g_typeDefinitionSize123),
(&g_typeDefinitionSize124),
(&g_typeDefinitionSize125),
(&g_typeDefinitionSize126),
(&g_typeDefinitionSize127),
(&g_typeDefinitionSize128),
(&g_typeDefinitionSize129),
(&g_typeDefinitionSize130),
(&g_typeDefinitionSize131),
(&g_typeDefinitionSize132),
(&g_typeDefinitionSize133),
(&g_typeDefinitionSize134),
(&g_typeDefinitionSize135),
(&g_typeDefinitionSize136),
(&g_typeDefinitionSize137),
(&g_typeDefinitionSize138),
(&g_typeDefinitionSize139),
(&g_typeDefinitionSize140),
(&g_typeDefinitionSize141),
(&g_typeDefinitionSize142),
(&g_typeDefinitionSize143),
(&g_typeDefinitionSize144),
(&g_typeDefinitionSize145),
(&g_typeDefinitionSize146),
(&g_typeDefinitionSize147),
(&g_typeDefinitionSize148),
(&g_typeDefinitionSize149),
(&g_typeDefinitionSize150),
(&g_typeDefinitionSize151),
(&g_typeDefinitionSize152),
(&g_typeDefinitionSize153),
(&g_typeDefinitionSize154),
(&g_typeDefinitionSize155),
(&g_typeDefinitionSize156),
(&g_typeDefinitionSize157),
(&g_typeDefinitionSize158),
(&g_typeDefinitionSize159),
(&g_typeDefinitionSize160),
(&g_typeDefinitionSize161),
(&g_typeDefinitionSize162),
(&g_typeDefinitionSize163),
(&g_typeDefinitionSize164),
(&g_typeDefinitionSize165),
(&g_typeDefinitionSize166),
(&g_typeDefinitionSize167),
(&g_typeDefinitionSize168),
(&g_typeDefinitionSize169),
(&g_typeDefinitionSize170),
(&g_typeDefinitionSize171),
(&g_typeDefinitionSize172),
(&g_typeDefinitionSize173),
(&g_typeDefinitionSize174),
(&g_typeDefinitionSize175),
(&g_typeDefinitionSize176),
(&g_typeDefinitionSize177),
(&g_typeDefinitionSize178),
(&g_typeDefinitionSize179),
(&g_typeDefinitionSize180),
(&g_typeDefinitionSize181),
(&g_typeDefinitionSize182),
(&g_typeDefinitionSize183),
(&g_typeDefinitionSize184),
(&g_typeDefinitionSize185),
(&g_typeDefinitionSize186),
(&g_typeDefinitionSize187),
(&g_typeDefinitionSize188),
(&g_typeDefinitionSize189),
(&g_typeDefinitionSize190),
(&g_typeDefinitionSize191),
(&g_typeDefinitionSize192),
(&g_typeDefinitionSize193),
(&g_typeDefinitionSize194),
(&g_typeDefinitionSize195),
(&g_typeDefinitionSize196),
(&g_typeDefinitionSize197),
(&g_typeDefinitionSize198),
(&g_typeDefinitionSize199),
(&g_typeDefinitionSize200),
(&g_typeDefinitionSize201),
(&g_typeDefinitionSize202),
(&g_typeDefinitionSize203),
(&g_typeDefinitionSize204),
(&g_typeDefinitionSize205),
(&g_typeDefinitionSize206),
(&g_typeDefinitionSize207),
(&g_typeDefinitionSize208),
(&g_typeDefinitionSize209),
(&g_typeDefinitionSize210),
(&g_typeDefinitionSize211),
(&g_typeDefinitionSize212),
(&g_typeDefinitionSize213),
(&g_typeDefinitionSize214),
(&g_typeDefinitionSize215),
(&g_typeDefinitionSize216),
(&g_typeDefinitionSize217),
(&g_typeDefinitionSize218),
(&g_typeDefinitionSize219),
(&g_typeDefinitionSize220),
(&g_typeDefinitionSize221),
(&g_typeDefinitionSize222),
(&g_typeDefinitionSize223),
(&g_typeDefinitionSize224),
(&g_typeDefinitionSize225),
(&g_typeDefinitionSize226),
(&g_typeDefinitionSize227),
(&g_typeDefinitionSize228),
(&g_typeDefinitionSize229),
(&g_typeDefinitionSize230),
(&g_typeDefinitionSize231),
(&g_typeDefinitionSize232),
(&g_typeDefinitionSize233),
(&g_typeDefinitionSize234),
(&g_typeDefinitionSize235),
(&g_typeDefinitionSize236),
(&g_typeDefinitionSize237),
(&g_typeDefinitionSize238),
(&g_typeDefinitionSize239),
(&g_typeDefinitionSize240),
(&g_typeDefinitionSize241),
(&g_typeDefinitionSize242),
(&g_typeDefinitionSize243),
(&g_typeDefinitionSize244),
(&g_typeDefinitionSize245),
(&g_typeDefinitionSize246),
(&g_typeDefinitionSize247),
(&g_typeDefinitionSize248),
(&g_typeDefinitionSize249),
(&g_typeDefinitionSize250),
(&g_typeDefinitionSize251),
(&g_typeDefinitionSize252),
(&g_typeDefinitionSize253),
(&g_typeDefinitionSize254),
(&g_typeDefinitionSize255),
(&g_typeDefinitionSize256),
(&g_typeDefinitionSize257),
(&g_typeDefinitionSize258),
(&g_typeDefinitionSize259),
(&g_typeDefinitionSize260),
(&g_typeDefinitionSize261),
(&g_typeDefinitionSize262),
(&g_typeDefinitionSize263),
(&g_typeDefinitionSize264),
(&g_typeDefinitionSize265),
(&g_typeDefinitionSize266),
(&g_typeDefinitionSize267),
(&g_typeDefinitionSize268),
(&g_typeDefinitionSize269),
(&g_typeDefinitionSize270),
(&g_typeDefinitionSize271),
(&g_typeDefinitionSize272),
(&g_typeDefinitionSize273),
(&g_typeDefinitionSize274),
(&g_typeDefinitionSize275),
(&g_typeDefinitionSize276),
(&g_typeDefinitionSize277),
(&g_typeDefinitionSize278),
(&g_typeDefinitionSize279),
(&g_typeDefinitionSize280),
(&g_typeDefinitionSize281),
(&g_typeDefinitionSize282),
(&g_typeDefinitionSize283),
(&g_typeDefinitionSize284),
(&g_typeDefinitionSize285),
(&g_typeDefinitionSize286),
(&g_typeDefinitionSize287),
(&g_typeDefinitionSize288),
(&g_typeDefinitionSize289),
(&g_typeDefinitionSize290),
(&g_typeDefinitionSize291),
(&g_typeDefinitionSize292),
(&g_typeDefinitionSize293),
(&g_typeDefinitionSize294),
(&g_typeDefinitionSize295),
(&g_typeDefinitionSize296),
(&g_typeDefinitionSize297),
(&g_typeDefinitionSize298),
(&g_typeDefinitionSize299),
(&g_typeDefinitionSize300),
(&g_typeDefinitionSize301),
(&g_typeDefinitionSize302),
(&g_typeDefinitionSize303),
(&g_typeDefinitionSize304),
(&g_typeDefinitionSize305),
(&g_typeDefinitionSize306),
(&g_typeDefinitionSize307),
(&g_typeDefinitionSize308),
(&g_typeDefinitionSize309),
(&g_typeDefinitionSize310),
(&g_typeDefinitionSize311),
(&g_typeDefinitionSize312),
(&g_typeDefinitionSize313),
(&g_typeDefinitionSize314),
(&g_typeDefinitionSize315),
(&g_typeDefinitionSize316),
(&g_typeDefinitionSize317),
(&g_typeDefinitionSize318),
(&g_typeDefinitionSize319),
(&g_typeDefinitionSize320),
(&g_typeDefinitionSize321),
(&g_typeDefinitionSize322),
(&g_typeDefinitionSize323),
(&g_typeDefinitionSize324),
(&g_typeDefinitionSize325),
(&g_typeDefinitionSize326),
(&g_typeDefinitionSize327),
(&g_typeDefinitionSize328),
(&g_typeDefinitionSize329),
(&g_typeDefinitionSize330),
(&g_typeDefinitionSize331),
(&g_typeDefinitionSize332),
(&g_typeDefinitionSize333),
(&g_typeDefinitionSize334),
(&g_typeDefinitionSize335),
(&g_typeDefinitionSize336),
(&g_typeDefinitionSize337),
(&g_typeDefinitionSize338),
(&g_typeDefinitionSize339),
(&g_typeDefinitionSize340),
(&g_typeDefinitionSize341),
(&g_typeDefinitionSize342),
(&g_typeDefinitionSize343),
(&g_typeDefinitionSize344),
(&g_typeDefinitionSize345),
(&g_typeDefinitionSize346),
(&g_typeDefinitionSize347),
(&g_typeDefinitionSize348),
(&g_typeDefinitionSize349),
(&g_typeDefinitionSize350),
(&g_typeDefinitionSize351),
(&g_typeDefinitionSize352),
(&g_typeDefinitionSize353),
(&g_typeDefinitionSize354),
(&g_typeDefinitionSize355),
(&g_typeDefinitionSize356),
(&g_typeDefinitionSize357),
(&g_typeDefinitionSize358),
(&g_typeDefinitionSize359),
(&g_typeDefinitionSize360),
(&g_typeDefinitionSize361),
(&g_typeDefinitionSize362),
(&g_typeDefinitionSize363),
(&g_typeDefinitionSize364),
(&g_typeDefinitionSize365),
(&g_typeDefinitionSize366),
(&g_typeDefinitionSize367),
(&g_typeDefinitionSize368),
(&g_typeDefinitionSize369),
(&g_typeDefinitionSize370),
(&g_typeDefinitionSize371),
(&g_typeDefinitionSize372),
(&g_typeDefinitionSize373),
(&g_typeDefinitionSize374),
(&g_typeDefinitionSize375),
(&g_typeDefinitionSize376),
(&g_typeDefinitionSize377),
(&g_typeDefinitionSize378),
(&g_typeDefinitionSize379),
(&g_typeDefinitionSize380),
(&g_typeDefinitionSize381),
(&g_typeDefinitionSize382),
(&g_typeDefinitionSize383),
(&g_typeDefinitionSize384),
(&g_typeDefinitionSize385),
(&g_typeDefinitionSize386),
(&g_typeDefinitionSize387),
(&g_typeDefinitionSize388),
(&g_typeDefinitionSize389),
(&g_typeDefinitionSize390),
(&g_typeDefinitionSize391),
(&g_typeDefinitionSize392),
(&g_typeDefinitionSize393),
(&g_typeDefinitionSize394),
(&g_typeDefinitionSize395),
(&g_typeDefinitionSize396),
(&g_typeDefinitionSize397),
(&g_typeDefinitionSize398),
(&g_typeDefinitionSize399),
(&g_typeDefinitionSize400),
(&g_typeDefinitionSize401),
(&g_typeDefinitionSize402),
(&g_typeDefinitionSize403),
(&g_typeDefinitionSize404),
(&g_typeDefinitionSize405),
(&g_typeDefinitionSize406),
(&g_typeDefinitionSize407),
(&g_typeDefinitionSize408),
(&g_typeDefinitionSize409),
(&g_typeDefinitionSize410),
(&g_typeDefinitionSize411),
(&g_typeDefinitionSize412),
(&g_typeDefinitionSize413),
(&g_typeDefinitionSize414),
(&g_typeDefinitionSize415),
(&g_typeDefinitionSize416),
(&g_typeDefinitionSize417),
(&g_typeDefinitionSize418),
(&g_typeDefinitionSize419),
(&g_typeDefinitionSize420),
(&g_typeDefinitionSize421),
(&g_typeDefinitionSize422),
(&g_typeDefinitionSize423),
(&g_typeDefinitionSize424),
(&g_typeDefinitionSize425),
(&g_typeDefinitionSize426),
(&g_typeDefinitionSize427),
(&g_typeDefinitionSize428),
(&g_typeDefinitionSize429),
(&g_typeDefinitionSize430),
(&g_typeDefinitionSize431),
(&g_typeDefinitionSize432),
(&g_typeDefinitionSize433),
(&g_typeDefinitionSize434),
(&g_typeDefinitionSize435),
(&g_typeDefinitionSize436),
(&g_typeDefinitionSize437),
(&g_typeDefinitionSize438),
(&g_typeDefinitionSize439),
(&g_typeDefinitionSize440),
(&g_typeDefinitionSize441),
(&g_typeDefinitionSize442),
(&g_typeDefinitionSize443),
(&g_typeDefinitionSize444),
(&g_typeDefinitionSize445),
(&g_typeDefinitionSize446),
(&g_typeDefinitionSize447),
(&g_typeDefinitionSize448),
(&g_typeDefinitionSize449),
(&g_typeDefinitionSize450),
(&g_typeDefinitionSize451),
(&g_typeDefinitionSize452),
(&g_typeDefinitionSize453),
(&g_typeDefinitionSize454),
(&g_typeDefinitionSize455),
(&g_typeDefinitionSize456),
(&g_typeDefinitionSize457),
(&g_typeDefinitionSize458),
(&g_typeDefinitionSize459),
(&g_typeDefinitionSize460),
(&g_typeDefinitionSize461),
(&g_typeDefinitionSize462),
(&g_typeDefinitionSize463),
(&g_typeDefinitionSize464),
(&g_typeDefinitionSize465),
(&g_typeDefinitionSize466),
(&g_typeDefinitionSize467),
(&g_typeDefinitionSize468),
(&g_typeDefinitionSize469),
(&g_typeDefinitionSize470),
(&g_typeDefinitionSize471),
(&g_typeDefinitionSize472),
(&g_typeDefinitionSize473),
(&g_typeDefinitionSize474),
(&g_typeDefinitionSize475),
(&g_typeDefinitionSize476),
(&g_typeDefinitionSize477),
(&g_typeDefinitionSize478),
(&g_typeDefinitionSize479),
(&g_typeDefinitionSize480),
(&g_typeDefinitionSize481),
(&g_typeDefinitionSize482),
(&g_typeDefinitionSize483),
(&g_typeDefinitionSize484),
(&g_typeDefinitionSize485),
(&g_typeDefinitionSize486),
(&g_typeDefinitionSize487),
(&g_typeDefinitionSize488),
(&g_typeDefinitionSize489),
(&g_typeDefinitionSize490),
(&g_typeDefinitionSize491),
(&g_typeDefinitionSize492),
(&g_typeDefinitionSize493),
(&g_typeDefinitionSize494),
(&g_typeDefinitionSize495),
(&g_typeDefinitionSize496),
(&g_typeDefinitionSize497),
(&g_typeDefinitionSize498),
(&g_typeDefinitionSize499),
(&g_typeDefinitionSize500),
(&g_typeDefinitionSize501),
(&g_typeDefinitionSize502),
(&g_typeDefinitionSize503),
(&g_typeDefinitionSize504),
(&g_typeDefinitionSize505),
(&g_typeDefinitionSize506),
(&g_typeDefinitionSize507),
(&g_typeDefinitionSize508),
(&g_typeDefinitionSize509),
(&g_typeDefinitionSize510),
(&g_typeDefinitionSize511),
(&g_typeDefinitionSize512),
(&g_typeDefinitionSize513),
(&g_typeDefinitionSize514),
(&g_typeDefinitionSize515),
(&g_typeDefinitionSize516),
(&g_typeDefinitionSize517),
(&g_typeDefinitionSize518),
(&g_typeDefinitionSize519),
(&g_typeDefinitionSize520),
(&g_typeDefinitionSize521),
(&g_typeDefinitionSize522),
(&g_typeDefinitionSize523),
(&g_typeDefinitionSize524),
(&g_typeDefinitionSize525),
(&g_typeDefinitionSize526),
(&g_typeDefinitionSize527),
(&g_typeDefinitionSize528),
(&g_typeDefinitionSize529),
(&g_typeDefinitionSize530),
(&g_typeDefinitionSize531),
(&g_typeDefinitionSize532),
(&g_typeDefinitionSize533),
(&g_typeDefinitionSize534),
(&g_typeDefinitionSize535),
(&g_typeDefinitionSize536),
(&g_typeDefinitionSize537),
(&g_typeDefinitionSize538),
(&g_typeDefinitionSize539),
(&g_typeDefinitionSize540),
(&g_typeDefinitionSize541),
(&g_typeDefinitionSize542),
(&g_typeDefinitionSize543),
(&g_typeDefinitionSize544),
(&g_typeDefinitionSize545),
(&g_typeDefinitionSize546),
(&g_typeDefinitionSize547),
(&g_typeDefinitionSize548),
(&g_typeDefinitionSize549),
(&g_typeDefinitionSize550),
(&g_typeDefinitionSize551),
(&g_typeDefinitionSize552),
(&g_typeDefinitionSize553),
(&g_typeDefinitionSize554),
(&g_typeDefinitionSize555),
(&g_typeDefinitionSize556),
(&g_typeDefinitionSize557),
(&g_typeDefinitionSize558),
(&g_typeDefinitionSize559),
(&g_typeDefinitionSize560),
(&g_typeDefinitionSize561),
(&g_typeDefinitionSize562),
(&g_typeDefinitionSize563),
(&g_typeDefinitionSize564),
(&g_typeDefinitionSize565),
(&g_typeDefinitionSize566),
(&g_typeDefinitionSize567),
(&g_typeDefinitionSize568),
(&g_typeDefinitionSize569),
(&g_typeDefinitionSize570),
(&g_typeDefinitionSize571),
(&g_typeDefinitionSize572),
(&g_typeDefinitionSize573),
(&g_typeDefinitionSize574),
(&g_typeDefinitionSize575),
(&g_typeDefinitionSize576),
(&g_typeDefinitionSize577),
(&g_typeDefinitionSize578),
(&g_typeDefinitionSize579),
(&g_typeDefinitionSize580),
(&g_typeDefinitionSize581),
(&g_typeDefinitionSize582),
(&g_typeDefinitionSize583),
(&g_typeDefinitionSize584),
(&g_typeDefinitionSize585),
(&g_typeDefinitionSize586),
(&g_typeDefinitionSize587),
(&g_typeDefinitionSize588),
(&g_typeDefinitionSize589),
(&g_typeDefinitionSize590),
(&g_typeDefinitionSize591),
(&g_typeDefinitionSize592),
(&g_typeDefinitionSize593),
(&g_typeDefinitionSize594),
(&g_typeDefinitionSize595),
(&g_typeDefinitionSize596),
(&g_typeDefinitionSize597),
(&g_typeDefinitionSize598),
(&g_typeDefinitionSize599),
(&g_typeDefinitionSize600),
(&g_typeDefinitionSize601),
(&g_typeDefinitionSize602),
(&g_typeDefinitionSize603),
(&g_typeDefinitionSize604),
(&g_typeDefinitionSize605),
(&g_typeDefinitionSize606),
(&g_typeDefinitionSize607),
(&g_typeDefinitionSize608),
(&g_typeDefinitionSize609),
(&g_typeDefinitionSize610),
(&g_typeDefinitionSize611),
(&g_typeDefinitionSize612),
(&g_typeDefinitionSize613),
(&g_typeDefinitionSize614),
(&g_typeDefinitionSize615),
(&g_typeDefinitionSize616),
(&g_typeDefinitionSize617),
(&g_typeDefinitionSize618),
(&g_typeDefinitionSize619),
(&g_typeDefinitionSize620),
(&g_typeDefinitionSize621),
(&g_typeDefinitionSize622),
(&g_typeDefinitionSize623),
(&g_typeDefinitionSize624),
(&g_typeDefinitionSize625),
(&g_typeDefinitionSize626),
(&g_typeDefinitionSize627),
(&g_typeDefinitionSize628),
(&g_typeDefinitionSize629),
(&g_typeDefinitionSize630),
(&g_typeDefinitionSize631),
(&g_typeDefinitionSize632),
(&g_typeDefinitionSize633),
(&g_typeDefinitionSize634),
(&g_typeDefinitionSize635),
(&g_typeDefinitionSize636),
(&g_typeDefinitionSize637),
(&g_typeDefinitionSize638),
(&g_typeDefinitionSize639),
(&g_typeDefinitionSize640),
(&g_typeDefinitionSize641),
(&g_typeDefinitionSize642),
(&g_typeDefinitionSize643),
(&g_typeDefinitionSize644),
(&g_typeDefinitionSize645),
(&g_typeDefinitionSize646),
(&g_typeDefinitionSize647),
(&g_typeDefinitionSize648),
(&g_typeDefinitionSize649),
(&g_typeDefinitionSize650),
(&g_typeDefinitionSize651),
(&g_typeDefinitionSize652),
(&g_typeDefinitionSize653),
(&g_typeDefinitionSize654),
(&g_typeDefinitionSize655),
(&g_typeDefinitionSize656),
(&g_typeDefinitionSize657),
(&g_typeDefinitionSize658),
(&g_typeDefinitionSize659),
(&g_typeDefinitionSize660),
(&g_typeDefinitionSize661),
(&g_typeDefinitionSize662),
(&g_typeDefinitionSize663),
(&g_typeDefinitionSize664),
(&g_typeDefinitionSize665),
(&g_typeDefinitionSize666),
(&g_typeDefinitionSize667),
(&g_typeDefinitionSize668),
(&g_typeDefinitionSize669),
(&g_typeDefinitionSize670),
(&g_typeDefinitionSize671),
(&g_typeDefinitionSize672),
(&g_typeDefinitionSize673),
(&g_typeDefinitionSize674),
(&g_typeDefinitionSize675),
(&g_typeDefinitionSize676),
(&g_typeDefinitionSize677),
(&g_typeDefinitionSize678),
(&g_typeDefinitionSize679),
(&g_typeDefinitionSize680),
(&g_typeDefinitionSize681),
(&g_typeDefinitionSize682),
(&g_typeDefinitionSize683),
(&g_typeDefinitionSize684),
(&g_typeDefinitionSize685),
(&g_typeDefinitionSize686),
(&g_typeDefinitionSize687),
(&g_typeDefinitionSize688),
(&g_typeDefinitionSize689),
(&g_typeDefinitionSize690),
(&g_typeDefinitionSize691),
(&g_typeDefinitionSize692),
(&g_typeDefinitionSize693),
(&g_typeDefinitionSize694),
(&g_typeDefinitionSize695),
(&g_typeDefinitionSize696),
(&g_typeDefinitionSize697),
(&g_typeDefinitionSize698),
(&g_typeDefinitionSize699),
(&g_typeDefinitionSize700),
(&g_typeDefinitionSize701),
(&g_typeDefinitionSize702),
(&g_typeDefinitionSize703),
(&g_typeDefinitionSize704),
(&g_typeDefinitionSize705),
(&g_typeDefinitionSize706),
(&g_typeDefinitionSize707),
(&g_typeDefinitionSize708),
(&g_typeDefinitionSize709),
(&g_typeDefinitionSize710),
(&g_typeDefinitionSize711),
(&g_typeDefinitionSize712),
(&g_typeDefinitionSize713),
(&g_typeDefinitionSize714),
(&g_typeDefinitionSize715),
(&g_typeDefinitionSize716),
(&g_typeDefinitionSize717),
(&g_typeDefinitionSize718),
(&g_typeDefinitionSize719),
(&g_typeDefinitionSize720),
(&g_typeDefinitionSize721),
(&g_typeDefinitionSize722),
(&g_typeDefinitionSize723),
(&g_typeDefinitionSize724),
(&g_typeDefinitionSize725),
(&g_typeDefinitionSize726),
(&g_typeDefinitionSize727),
(&g_typeDefinitionSize728),
(&g_typeDefinitionSize729),
(&g_typeDefinitionSize730),
(&g_typeDefinitionSize731),
(&g_typeDefinitionSize732),
(&g_typeDefinitionSize733),
(&g_typeDefinitionSize734),
(&g_typeDefinitionSize735),
(&g_typeDefinitionSize736),
(&g_typeDefinitionSize737),
(&g_typeDefinitionSize738),
(&g_typeDefinitionSize739),
(&g_typeDefinitionSize740),
(&g_typeDefinitionSize741),
(&g_typeDefinitionSize742),
(&g_typeDefinitionSize743),
(&g_typeDefinitionSize744),
(&g_typeDefinitionSize745),
(&g_typeDefinitionSize746),
(&g_typeDefinitionSize747),
(&g_typeDefinitionSize748),
(&g_typeDefinitionSize749),
(&g_typeDefinitionSize750),
(&g_typeDefinitionSize751),
(&g_typeDefinitionSize752),
(&g_typeDefinitionSize753),
(&g_typeDefinitionSize754),
(&g_typeDefinitionSize755),
(&g_typeDefinitionSize756),
(&g_typeDefinitionSize757),
(&g_typeDefinitionSize758),
(&g_typeDefinitionSize759),
(&g_typeDefinitionSize760),
(&g_typeDefinitionSize761),
(&g_typeDefinitionSize762),
(&g_typeDefinitionSize763),
(&g_typeDefinitionSize764),
(&g_typeDefinitionSize765),
(&g_typeDefinitionSize766),
(&g_typeDefinitionSize767),
(&g_typeDefinitionSize768),
(&g_typeDefinitionSize769),
(&g_typeDefinitionSize770),
(&g_typeDefinitionSize771),
(&g_typeDefinitionSize772),
(&g_typeDefinitionSize773),
(&g_typeDefinitionSize774),
(&g_typeDefinitionSize775),
(&g_typeDefinitionSize776),
(&g_typeDefinitionSize777),
(&g_typeDefinitionSize778),
(&g_typeDefinitionSize779),
(&g_typeDefinitionSize780),
(&g_typeDefinitionSize781),
(&g_typeDefinitionSize782),
(&g_typeDefinitionSize783),
(&g_typeDefinitionSize784),
(&g_typeDefinitionSize785),
(&g_typeDefinitionSize786),
(&g_typeDefinitionSize787),
(&g_typeDefinitionSize788),
(&g_typeDefinitionSize789),
(&g_typeDefinitionSize790),
(&g_typeDefinitionSize791),
(&g_typeDefinitionSize792),
(&g_typeDefinitionSize793),
(&g_typeDefinitionSize794),
(&g_typeDefinitionSize795),
(&g_typeDefinitionSize796),
(&g_typeDefinitionSize797),
(&g_typeDefinitionSize798),
(&g_typeDefinitionSize799),
(&g_typeDefinitionSize800),
(&g_typeDefinitionSize801),
(&g_typeDefinitionSize802),
(&g_typeDefinitionSize803),
(&g_typeDefinitionSize804),
(&g_typeDefinitionSize805),
(&g_typeDefinitionSize806),
(&g_typeDefinitionSize807),
(&g_typeDefinitionSize808),
(&g_typeDefinitionSize809),
(&g_typeDefinitionSize810),
(&g_typeDefinitionSize811),
(&g_typeDefinitionSize812),
(&g_typeDefinitionSize813),
(&g_typeDefinitionSize814),
(&g_typeDefinitionSize815),
(&g_typeDefinitionSize816),
(&g_typeDefinitionSize817),
(&g_typeDefinitionSize818),
(&g_typeDefinitionSize819),
(&g_typeDefinitionSize820),
(&g_typeDefinitionSize821),
(&g_typeDefinitionSize822),
(&g_typeDefinitionSize823),
(&g_typeDefinitionSize824),
(&g_typeDefinitionSize825),
(&g_typeDefinitionSize826),
(&g_typeDefinitionSize827),
(&g_typeDefinitionSize828),
(&g_typeDefinitionSize829),
(&g_typeDefinitionSize830),
(&g_typeDefinitionSize831),
(&g_typeDefinitionSize832),
(&g_typeDefinitionSize833),
(&g_typeDefinitionSize834),
(&g_typeDefinitionSize835),
(&g_typeDefinitionSize836),
(&g_typeDefinitionSize837),
(&g_typeDefinitionSize838),
(&g_typeDefinitionSize839),
(&g_typeDefinitionSize840),
(&g_typeDefinitionSize841),
(&g_typeDefinitionSize842),
(&g_typeDefinitionSize843),
(&g_typeDefinitionSize844),
(&g_typeDefinitionSize845),
(&g_typeDefinitionSize846),
(&g_typeDefinitionSize847),
(&g_typeDefinitionSize848),
(&g_typeDefinitionSize849),
(&g_typeDefinitionSize850),
(&g_typeDefinitionSize851),
(&g_typeDefinitionSize852),
(&g_typeDefinitionSize853),
(&g_typeDefinitionSize854),
(&g_typeDefinitionSize855),
(&g_typeDefinitionSize856),
(&g_typeDefinitionSize857),
(&g_typeDefinitionSize858),
(&g_typeDefinitionSize859),
(&g_typeDefinitionSize860),
(&g_typeDefinitionSize861),
(&g_typeDefinitionSize862),
(&g_typeDefinitionSize863),
(&g_typeDefinitionSize864),
(&g_typeDefinitionSize865),
(&g_typeDefinitionSize866),
(&g_typeDefinitionSize867),
(&g_typeDefinitionSize868),
(&g_typeDefinitionSize869),
(&g_typeDefinitionSize870),
(&g_typeDefinitionSize871),
(&g_typeDefinitionSize872),
(&g_typeDefinitionSize873),
(&g_typeDefinitionSize874),
(&g_typeDefinitionSize875),
(&g_typeDefinitionSize876),
(&g_typeDefinitionSize877),
(&g_typeDefinitionSize878),
(&g_typeDefinitionSize879),
(&g_typeDefinitionSize880),
(&g_typeDefinitionSize881),
(&g_typeDefinitionSize882),
(&g_typeDefinitionSize883),
(&g_typeDefinitionSize884),
(&g_typeDefinitionSize885),
(&g_typeDefinitionSize886),
(&g_typeDefinitionSize887),
(&g_typeDefinitionSize888),
(&g_typeDefinitionSize889),
(&g_typeDefinitionSize890),
(&g_typeDefinitionSize891),
(&g_typeDefinitionSize892),
(&g_typeDefinitionSize893),
(&g_typeDefinitionSize894),
(&g_typeDefinitionSize895),
(&g_typeDefinitionSize896),
(&g_typeDefinitionSize897),
(&g_typeDefinitionSize898),
(&g_typeDefinitionSize899),
(&g_typeDefinitionSize900),
(&g_typeDefinitionSize901),
(&g_typeDefinitionSize902),
(&g_typeDefinitionSize903),
(&g_typeDefinitionSize904),
(&g_typeDefinitionSize905),
(&g_typeDefinitionSize906),
(&g_typeDefinitionSize907),
(&g_typeDefinitionSize908),
(&g_typeDefinitionSize909),
(&g_typeDefinitionSize910),
(&g_typeDefinitionSize911),
(&g_typeDefinitionSize912),
(&g_typeDefinitionSize913),
(&g_typeDefinitionSize914),
(&g_typeDefinitionSize915),
(&g_typeDefinitionSize916),
(&g_typeDefinitionSize917),
(&g_typeDefinitionSize918),
(&g_typeDefinitionSize919),
(&g_typeDefinitionSize920),
(&g_typeDefinitionSize921),
(&g_typeDefinitionSize922),
(&g_typeDefinitionSize923),
(&g_typeDefinitionSize924),
(&g_typeDefinitionSize925),
(&g_typeDefinitionSize926),
(&g_typeDefinitionSize927),
(&g_typeDefinitionSize928),
(&g_typeDefinitionSize929),
(&g_typeDefinitionSize930),
(&g_typeDefinitionSize931),
(&g_typeDefinitionSize932),
(&g_typeDefinitionSize933),
(&g_typeDefinitionSize934),
(&g_typeDefinitionSize935),
(&g_typeDefinitionSize936),
(&g_typeDefinitionSize937),
(&g_typeDefinitionSize938),
(&g_typeDefinitionSize939),
(&g_typeDefinitionSize940),
(&g_typeDefinitionSize941),
(&g_typeDefinitionSize942),
(&g_typeDefinitionSize943),
(&g_typeDefinitionSize944),
(&g_typeDefinitionSize945),
(&g_typeDefinitionSize946),
(&g_typeDefinitionSize947),
(&g_typeDefinitionSize948),
(&g_typeDefinitionSize949),
(&g_typeDefinitionSize950),
(&g_typeDefinitionSize951),
(&g_typeDefinitionSize952),
(&g_typeDefinitionSize953),
(&g_typeDefinitionSize954),
(&g_typeDefinitionSize955),
(&g_typeDefinitionSize956),
(&g_typeDefinitionSize957),
(&g_typeDefinitionSize958),
(&g_typeDefinitionSize959),
(&g_typeDefinitionSize960),
(&g_typeDefinitionSize961),
(&g_typeDefinitionSize962),
(&g_typeDefinitionSize963),
(&g_typeDefinitionSize964),
(&g_typeDefinitionSize965),
(&g_typeDefinitionSize966),
(&g_typeDefinitionSize967),
(&g_typeDefinitionSize968),
(&g_typeDefinitionSize969),
(&g_typeDefinitionSize970),
(&g_typeDefinitionSize971),
(&g_typeDefinitionSize972),
(&g_typeDefinitionSize973),
(&g_typeDefinitionSize974),
(&g_typeDefinitionSize975),
(&g_typeDefinitionSize976),
(&g_typeDefinitionSize977),
(&g_typeDefinitionSize978),
(&g_typeDefinitionSize979),
(&g_typeDefinitionSize980),
(&g_typeDefinitionSize981),
(&g_typeDefinitionSize982),
(&g_typeDefinitionSize983),
(&g_typeDefinitionSize984),
(&g_typeDefinitionSize985),
(&g_typeDefinitionSize986),
(&g_typeDefinitionSize987),
(&g_typeDefinitionSize988),
(&g_typeDefinitionSize989),
(&g_typeDefinitionSize990),
(&g_typeDefinitionSize991),
(&g_typeDefinitionSize992),
(&g_typeDefinitionSize993),
(&g_typeDefinitionSize994),
(&g_typeDefinitionSize995),
(&g_typeDefinitionSize996),
(&g_typeDefinitionSize997),
(&g_typeDefinitionSize998),
(&g_typeDefinitionSize999),
(&g_typeDefinitionSize1000),
(&g_typeDefinitionSize1001),
(&g_typeDefinitionSize1002),
(&g_typeDefinitionSize1003),
(&g_typeDefinitionSize1004),
(&g_typeDefinitionSize1005),
(&g_typeDefinitionSize1006),
(&g_typeDefinitionSize1007),
(&g_typeDefinitionSize1008),
(&g_typeDefinitionSize1009),
(&g_typeDefinitionSize1010),
(&g_typeDefinitionSize1011),
(&g_typeDefinitionSize1012),
(&g_typeDefinitionSize1013),
(&g_typeDefinitionSize1014),
(&g_typeDefinitionSize1015),
(&g_typeDefinitionSize1016),
(&g_typeDefinitionSize1017),
(&g_typeDefinitionSize1018),
(&g_typeDefinitionSize1019),
(&g_typeDefinitionSize1020),
(&g_typeDefinitionSize1021),
(&g_typeDefinitionSize1022),
(&g_typeDefinitionSize1023),
(&g_typeDefinitionSize1024),
(&g_typeDefinitionSize1025),
(&g_typeDefinitionSize1026),
(&g_typeDefinitionSize1027),
(&g_typeDefinitionSize1028),
(&g_typeDefinitionSize1029),
(&g_typeDefinitionSize1030),
(&g_typeDefinitionSize1031),
(&g_typeDefinitionSize1032),
(&g_typeDefinitionSize1033),
(&g_typeDefinitionSize1034),
(&g_typeDefinitionSize1035),
(&g_typeDefinitionSize1036),
(&g_typeDefinitionSize1037),
(&g_typeDefinitionSize1038),
(&g_typeDefinitionSize1039),
(&g_typeDefinitionSize1040),
(&g_typeDefinitionSize1041),
(&g_typeDefinitionSize1042),
(&g_typeDefinitionSize1043),
(&g_typeDefinitionSize1044),
(&g_typeDefinitionSize1045),
(&g_typeDefinitionSize1046),
(&g_typeDefinitionSize1047),
(&g_typeDefinitionSize1048),
(&g_typeDefinitionSize1049),
(&g_typeDefinitionSize1050),
(&g_typeDefinitionSize1051),
(&g_typeDefinitionSize1052),
(&g_typeDefinitionSize1053),
(&g_typeDefinitionSize1054),
(&g_typeDefinitionSize1055),
(&g_typeDefinitionSize1056),
(&g_typeDefinitionSize1057),
(&g_typeDefinitionSize1058),
(&g_typeDefinitionSize1059),
(&g_typeDefinitionSize1060),
(&g_typeDefinitionSize1061),
(&g_typeDefinitionSize1062),
(&g_typeDefinitionSize1063),
(&g_typeDefinitionSize1064),
(&g_typeDefinitionSize1065),
(&g_typeDefinitionSize1066),
(&g_typeDefinitionSize1067),
(&g_typeDefinitionSize1068),
(&g_typeDefinitionSize1069),
(&g_typeDefinitionSize1070),
(&g_typeDefinitionSize1071),
(&g_typeDefinitionSize1072),
(&g_typeDefinitionSize1073),
(&g_typeDefinitionSize1074),
(&g_typeDefinitionSize1075),
(&g_typeDefinitionSize1076),
(&g_typeDefinitionSize1077),
(&g_typeDefinitionSize1078),
(&g_typeDefinitionSize1079),
(&g_typeDefinitionSize1080),
(&g_typeDefinitionSize1081),
(&g_typeDefinitionSize1082),
(&g_typeDefinitionSize1083),
(&g_typeDefinitionSize1084),
(&g_typeDefinitionSize1085),
(&g_typeDefinitionSize1086),
(&g_typeDefinitionSize1087),
(&g_typeDefinitionSize1088),
(&g_typeDefinitionSize1089),
(&g_typeDefinitionSize1090),
(&g_typeDefinitionSize1091),
(&g_typeDefinitionSize1092),
(&g_typeDefinitionSize1093),
(&g_typeDefinitionSize1094),
(&g_typeDefinitionSize1095),
(&g_typeDefinitionSize1096),
(&g_typeDefinitionSize1097),
(&g_typeDefinitionSize1098),
(&g_typeDefinitionSize1099),
(&g_typeDefinitionSize1100),
(&g_typeDefinitionSize1101),
(&g_typeDefinitionSize1102),
(&g_typeDefinitionSize1103),
(&g_typeDefinitionSize1104),
(&g_typeDefinitionSize1105),
(&g_typeDefinitionSize1106),
(&g_typeDefinitionSize1107),
(&g_typeDefinitionSize1108),
(&g_typeDefinitionSize1109),
(&g_typeDefinitionSize1110),
(&g_typeDefinitionSize1111),
(&g_typeDefinitionSize1112),
(&g_typeDefinitionSize1113),
(&g_typeDefinitionSize1114),
(&g_typeDefinitionSize1115),
(&g_typeDefinitionSize1116),
(&g_typeDefinitionSize1117),
(&g_typeDefinitionSize1118),
(&g_typeDefinitionSize1119),
(&g_typeDefinitionSize1120),
(&g_typeDefinitionSize1121),
(&g_typeDefinitionSize1122),
(&g_typeDefinitionSize1123),
(&g_typeDefinitionSize1124),
(&g_typeDefinitionSize1125),
(&g_typeDefinitionSize1126),
(&g_typeDefinitionSize1127),
(&g_typeDefinitionSize1128),
(&g_typeDefinitionSize1129),
(&g_typeDefinitionSize1130),
(&g_typeDefinitionSize1131),
(&g_typeDefinitionSize1132),
(&g_typeDefinitionSize1133),
(&g_typeDefinitionSize1134),
(&g_typeDefinitionSize1135),
(&g_typeDefinitionSize1136),
(&g_typeDefinitionSize1137),
(&g_typeDefinitionSize1138),
(&g_typeDefinitionSize1139),
(&g_typeDefinitionSize1140),
(&g_typeDefinitionSize1141),
(&g_typeDefinitionSize1142),
(&g_typeDefinitionSize1143),
(&g_typeDefinitionSize1144),
(&g_typeDefinitionSize1145),
(&g_typeDefinitionSize1146),
(&g_typeDefinitionSize1147),
(&g_typeDefinitionSize1148),
(&g_typeDefinitionSize1149),
(&g_typeDefinitionSize1150),
(&g_typeDefinitionSize1151),
(&g_typeDefinitionSize1152),
(&g_typeDefinitionSize1153),
(&g_typeDefinitionSize1154),
(&g_typeDefinitionSize1155),
(&g_typeDefinitionSize1156),
(&g_typeDefinitionSize1157),
(&g_typeDefinitionSize1158),
(&g_typeDefinitionSize1159),
(&g_typeDefinitionSize1160),
(&g_typeDefinitionSize1161),
(&g_typeDefinitionSize1162),
(&g_typeDefinitionSize1163),
(&g_typeDefinitionSize1164),
(&g_typeDefinitionSize1165),
(&g_typeDefinitionSize1166),
(&g_typeDefinitionSize1167),
(&g_typeDefinitionSize1168),
(&g_typeDefinitionSize1169),
(&g_typeDefinitionSize1170),
(&g_typeDefinitionSize1171),
(&g_typeDefinitionSize1172),
(&g_typeDefinitionSize1173),
(&g_typeDefinitionSize1174),
(&g_typeDefinitionSize1175),
(&g_typeDefinitionSize1176),
(&g_typeDefinitionSize1177),
(&g_typeDefinitionSize1178),
(&g_typeDefinitionSize1179),
(&g_typeDefinitionSize1180),
(&g_typeDefinitionSize1181),
(&g_typeDefinitionSize1182),
(&g_typeDefinitionSize1183),
(&g_typeDefinitionSize1184),
(&g_typeDefinitionSize1185),
(&g_typeDefinitionSize1186),
(&g_typeDefinitionSize1187),
(&g_typeDefinitionSize1188),
(&g_typeDefinitionSize1189),
(&g_typeDefinitionSize1190),
(&g_typeDefinitionSize1191),
(&g_typeDefinitionSize1192),
(&g_typeDefinitionSize1193),
(&g_typeDefinitionSize1194),
(&g_typeDefinitionSize1195),
(&g_typeDefinitionSize1196),
(&g_typeDefinitionSize1197),
(&g_typeDefinitionSize1198),
(&g_typeDefinitionSize1199),
(&g_typeDefinitionSize1200),
(&g_typeDefinitionSize1201),
(&g_typeDefinitionSize1202),
(&g_typeDefinitionSize1203),
(&g_typeDefinitionSize1204),
(&g_typeDefinitionSize1205),
(&g_typeDefinitionSize1206),
(&g_typeDefinitionSize1207),
(&g_typeDefinitionSize1208),
(&g_typeDefinitionSize1209),
(&g_typeDefinitionSize1210),
(&g_typeDefinitionSize1211),
(&g_typeDefinitionSize1212),
(&g_typeDefinitionSize1213),
(&g_typeDefinitionSize1214),
(&g_typeDefinitionSize1215),
(&g_typeDefinitionSize1216),
(&g_typeDefinitionSize1217),
(&g_typeDefinitionSize1218),
(&g_typeDefinitionSize1219),
(&g_typeDefinitionSize1220),
(&g_typeDefinitionSize1221),
(&g_typeDefinitionSize1222),
(&g_typeDefinitionSize1223),
(&g_typeDefinitionSize1224),
(&g_typeDefinitionSize1225),
(&g_typeDefinitionSize1226),
(&g_typeDefinitionSize1227),
(&g_typeDefinitionSize1228),
(&g_typeDefinitionSize1229),
(&g_typeDefinitionSize1230),
(&g_typeDefinitionSize1231),
(&g_typeDefinitionSize1232),
(&g_typeDefinitionSize1233),
(&g_typeDefinitionSize1234),
(&g_typeDefinitionSize1235),
(&g_typeDefinitionSize1236),
(&g_typeDefinitionSize1237),
(&g_typeDefinitionSize1238),
(&g_typeDefinitionSize1239),
(&g_typeDefinitionSize1240),
(&g_typeDefinitionSize1241),
(&g_typeDefinitionSize1242),
(&g_typeDefinitionSize1243),
(&g_typeDefinitionSize1244),
(&g_typeDefinitionSize1245),
(&g_typeDefinitionSize1246),
(&g_typeDefinitionSize1247),
(&g_typeDefinitionSize1248),
(&g_typeDefinitionSize1249),
(&g_typeDefinitionSize1250),
(&g_typeDefinitionSize1251),
(&g_typeDefinitionSize1252),
(&g_typeDefinitionSize1253),
(&g_typeDefinitionSize1254),
(&g_typeDefinitionSize1255),
(&g_typeDefinitionSize1256),
(&g_typeDefinitionSize1257),
(&g_typeDefinitionSize1258),
(&g_typeDefinitionSize1259),
(&g_typeDefinitionSize1260),
(&g_typeDefinitionSize1261),
(&g_typeDefinitionSize1262),
(&g_typeDefinitionSize1263),
(&g_typeDefinitionSize1264),
(&g_typeDefinitionSize1265),
(&g_typeDefinitionSize1266),
(&g_typeDefinitionSize1267),
(&g_typeDefinitionSize1268),
(&g_typeDefinitionSize1269),
(&g_typeDefinitionSize1270),
(&g_typeDefinitionSize1271),
(&g_typeDefinitionSize1272),
(&g_typeDefinitionSize1273),
(&g_typeDefinitionSize1274),
(&g_typeDefinitionSize1275),
(&g_typeDefinitionSize1276),
(&g_typeDefinitionSize1277),
(&g_typeDefinitionSize1278),
(&g_typeDefinitionSize1279),
(&g_typeDefinitionSize1280),
(&g_typeDefinitionSize1281),
(&g_typeDefinitionSize1282),
(&g_typeDefinitionSize1283),
(&g_typeDefinitionSize1284),
(&g_typeDefinitionSize1285),
(&g_typeDefinitionSize1286),
(&g_typeDefinitionSize1287),
(&g_typeDefinitionSize1288),
(&g_typeDefinitionSize1289),
(&g_typeDefinitionSize1290),
(&g_typeDefinitionSize1291),
(&g_typeDefinitionSize1292),
(&g_typeDefinitionSize1293),
(&g_typeDefinitionSize1294),
(&g_typeDefinitionSize1295),
(&g_typeDefinitionSize1296),
(&g_typeDefinitionSize1297),
(&g_typeDefinitionSize1298),
(&g_typeDefinitionSize1299),
(&g_typeDefinitionSize1300),
(&g_typeDefinitionSize1301),
(&g_typeDefinitionSize1302),
(&g_typeDefinitionSize1303),
(&g_typeDefinitionSize1304),
(&g_typeDefinitionSize1305),
(&g_typeDefinitionSize1306),
(&g_typeDefinitionSize1307),
(&g_typeDefinitionSize1308),
(&g_typeDefinitionSize1309),
(&g_typeDefinitionSize1310),
(&g_typeDefinitionSize1311),
(&g_typeDefinitionSize1312),
(&g_typeDefinitionSize1313),
(&g_typeDefinitionSize1314),
(&g_typeDefinitionSize1315),
(&g_typeDefinitionSize1316),
(&g_typeDefinitionSize1317),
(&g_typeDefinitionSize1318),
(&g_typeDefinitionSize1319),
(&g_typeDefinitionSize1320),
(&g_typeDefinitionSize1321),
(&g_typeDefinitionSize1322),
(&g_typeDefinitionSize1323),
(&g_typeDefinitionSize1324),
(&g_typeDefinitionSize1325),
(&g_typeDefinitionSize1326),
(&g_typeDefinitionSize1327),
(&g_typeDefinitionSize1328),
(&g_typeDefinitionSize1329),
(&g_typeDefinitionSize1330),
(&g_typeDefinitionSize1331),
(&g_typeDefinitionSize1332),
(&g_typeDefinitionSize1333),
(&g_typeDefinitionSize1334),
(&g_typeDefinitionSize1335),
(&g_typeDefinitionSize1336),
(&g_typeDefinitionSize1337),
(&g_typeDefinitionSize1338),
(&g_typeDefinitionSize1339),
(&g_typeDefinitionSize1340),
(&g_typeDefinitionSize1341),
(&g_typeDefinitionSize1342),
(&g_typeDefinitionSize1343),
(&g_typeDefinitionSize1344),
(&g_typeDefinitionSize1345),
(&g_typeDefinitionSize1346),
(&g_typeDefinitionSize1347),
(&g_typeDefinitionSize1348),
(&g_typeDefinitionSize1349),
(&g_typeDefinitionSize1350),
(&g_typeDefinitionSize1351),
(&g_typeDefinitionSize1352),
(&g_typeDefinitionSize1353),
(&g_typeDefinitionSize1354),
(&g_typeDefinitionSize1355),
(&g_typeDefinitionSize1356),
(&g_typeDefinitionSize1357),
(&g_typeDefinitionSize1358),
(&g_typeDefinitionSize1359),
(&g_typeDefinitionSize1360),
(&g_typeDefinitionSize1361),
(&g_typeDefinitionSize1362),
(&g_typeDefinitionSize1363),
(&g_typeDefinitionSize1364),
(&g_typeDefinitionSize1365),
(&g_typeDefinitionSize1366),
(&g_typeDefinitionSize1367),
(&g_typeDefinitionSize1368),
(&g_typeDefinitionSize1369),
(&g_typeDefinitionSize1370),
(&g_typeDefinitionSize1371),
(&g_typeDefinitionSize1372),
(&g_typeDefinitionSize1373),
(&g_typeDefinitionSize1374),
(&g_typeDefinitionSize1375),
(&g_typeDefinitionSize1376),
(&g_typeDefinitionSize1377),
(&g_typeDefinitionSize1378),
(&g_typeDefinitionSize1379),
(&g_typeDefinitionSize1380),
(&g_typeDefinitionSize1381),
(&g_typeDefinitionSize1382),
(&g_typeDefinitionSize1383),
(&g_typeDefinitionSize1384),
(&g_typeDefinitionSize1385),
(&g_typeDefinitionSize1386),
(&g_typeDefinitionSize1387),
(&g_typeDefinitionSize1388),
(&g_typeDefinitionSize1389),
(&g_typeDefinitionSize1390),
(&g_typeDefinitionSize1391),
(&g_typeDefinitionSize1392),
(&g_typeDefinitionSize1393),
(&g_typeDefinitionSize1394),
(&g_typeDefinitionSize1395),
(&g_typeDefinitionSize1396),
(&g_typeDefinitionSize1397),
(&g_typeDefinitionSize1398),
(&g_typeDefinitionSize1399),
(&g_typeDefinitionSize1400),
(&g_typeDefinitionSize1401),
(&g_typeDefinitionSize1402),
(&g_typeDefinitionSize1403),
(&g_typeDefinitionSize1404),
(&g_typeDefinitionSize1405),
(&g_typeDefinitionSize1406),
(&g_typeDefinitionSize1407),
(&g_typeDefinitionSize1408),
(&g_typeDefinitionSize1409),
(&g_typeDefinitionSize1410),
(&g_typeDefinitionSize1411),
(&g_typeDefinitionSize1412),
(&g_typeDefinitionSize1413),
(&g_typeDefinitionSize1414),
(&g_typeDefinitionSize1415),
(&g_typeDefinitionSize1416),
(&g_typeDefinitionSize1417),
(&g_typeDefinitionSize1418),
(&g_typeDefinitionSize1419),
(&g_typeDefinitionSize1420),
(&g_typeDefinitionSize1421),
(&g_typeDefinitionSize1422),
(&g_typeDefinitionSize1423),
(&g_typeDefinitionSize1424),
(&g_typeDefinitionSize1425),
(&g_typeDefinitionSize1426),
(&g_typeDefinitionSize1427),
(&g_typeDefinitionSize1428),
(&g_typeDefinitionSize1429),
(&g_typeDefinitionSize1430),
(&g_typeDefinitionSize1431),
(&g_typeDefinitionSize1432),
(&g_typeDefinitionSize1433),
(&g_typeDefinitionSize1434),
(&g_typeDefinitionSize1435),
(&g_typeDefinitionSize1436),
(&g_typeDefinitionSize1437),
(&g_typeDefinitionSize1438),
(&g_typeDefinitionSize1439),
(&g_typeDefinitionSize1440),
(&g_typeDefinitionSize1441),
(&g_typeDefinitionSize1442),
(&g_typeDefinitionSize1443),
(&g_typeDefinitionSize1444),
(&g_typeDefinitionSize1445),
(&g_typeDefinitionSize1446),
(&g_typeDefinitionSize1447),
(&g_typeDefinitionSize1448),
(&g_typeDefinitionSize1449),
(&g_typeDefinitionSize1450),
(&g_typeDefinitionSize1451),
(&g_typeDefinitionSize1452),
(&g_typeDefinitionSize1453),
(&g_typeDefinitionSize1454),
(&g_typeDefinitionSize1455),
(&g_typeDefinitionSize1456),
(&g_typeDefinitionSize1457),
(&g_typeDefinitionSize1458),
(&g_typeDefinitionSize1459),
(&g_typeDefinitionSize1460),
(&g_typeDefinitionSize1461),
(&g_typeDefinitionSize1462),
(&g_typeDefinitionSize1463),
(&g_typeDefinitionSize1464),
(&g_typeDefinitionSize1465),
(&g_typeDefinitionSize1466),
(&g_typeDefinitionSize1467),
(&g_typeDefinitionSize1468),
(&g_typeDefinitionSize1469),
(&g_typeDefinitionSize1470),
(&g_typeDefinitionSize1471),
(&g_typeDefinitionSize1472),
(&g_typeDefinitionSize1473),
(&g_typeDefinitionSize1474),
(&g_typeDefinitionSize1475),
(&g_typeDefinitionSize1476),
(&g_typeDefinitionSize1477),
(&g_typeDefinitionSize1478),
(&g_typeDefinitionSize1479),
(&g_typeDefinitionSize1480),
(&g_typeDefinitionSize1481),
(&g_typeDefinitionSize1482),
(&g_typeDefinitionSize1483),
(&g_typeDefinitionSize1484),
(&g_typeDefinitionSize1485),
(&g_typeDefinitionSize1486),
(&g_typeDefinitionSize1487),
(&g_typeDefinitionSize1488),
(&g_typeDefinitionSize1489),
(&g_typeDefinitionSize1490),
(&g_typeDefinitionSize1491),
(&g_typeDefinitionSize1492),
(&g_typeDefinitionSize1493),
(&g_typeDefinitionSize1494),
(&g_typeDefinitionSize1495),
(&g_typeDefinitionSize1496),
(&g_typeDefinitionSize1497),
(&g_typeDefinitionSize1498),
(&g_typeDefinitionSize1499),
(&g_typeDefinitionSize1500),
(&g_typeDefinitionSize1501),
(&g_typeDefinitionSize1502),
(&g_typeDefinitionSize1503),
(&g_typeDefinitionSize1504),
(&g_typeDefinitionSize1505),
(&g_typeDefinitionSize1506),
(&g_typeDefinitionSize1507),
(&g_typeDefinitionSize1508),
(&g_typeDefinitionSize1509),
(&g_typeDefinitionSize1510),
(&g_typeDefinitionSize1511),
(&g_typeDefinitionSize1512),
(&g_typeDefinitionSize1513),
(&g_typeDefinitionSize1514),
(&g_typeDefinitionSize1515),
(&g_typeDefinitionSize1516),
(&g_typeDefinitionSize1517),
(&g_typeDefinitionSize1518),
(&g_typeDefinitionSize1519),
(&g_typeDefinitionSize1520),
(&g_typeDefinitionSize1521),
(&g_typeDefinitionSize1522),
(&g_typeDefinitionSize1523),
(&g_typeDefinitionSize1524),
(&g_typeDefinitionSize1525),
(&g_typeDefinitionSize1526),
(&g_typeDefinitionSize1527),
(&g_typeDefinitionSize1528),
(&g_typeDefinitionSize1529),
(&g_typeDefinitionSize1530),
(&g_typeDefinitionSize1531),
(&g_typeDefinitionSize1532),
(&g_typeDefinitionSize1533),
(&g_typeDefinitionSize1534),
(&g_typeDefinitionSize1535),
(&g_typeDefinitionSize1536),
(&g_typeDefinitionSize1537),
(&g_typeDefinitionSize1538),
(&g_typeDefinitionSize1539),
(&g_typeDefinitionSize1540),
(&g_typeDefinitionSize1541),
(&g_typeDefinitionSize1542),
(&g_typeDefinitionSize1543),
(&g_typeDefinitionSize1544),
(&g_typeDefinitionSize1545),
(&g_typeDefinitionSize1546),
(&g_typeDefinitionSize1547),
(&g_typeDefinitionSize1548),
(&g_typeDefinitionSize1549),
(&g_typeDefinitionSize1550),
(&g_typeDefinitionSize1551),
(&g_typeDefinitionSize1552),
(&g_typeDefinitionSize1553),
(&g_typeDefinitionSize1554),
(&g_typeDefinitionSize1555),
(&g_typeDefinitionSize1556),
(&g_typeDefinitionSize1557),
(&g_typeDefinitionSize1558),
(&g_typeDefinitionSize1559),
(&g_typeDefinitionSize1560),
(&g_typeDefinitionSize1561),
(&g_typeDefinitionSize1562),
(&g_typeDefinitionSize1563),
(&g_typeDefinitionSize1564),
(&g_typeDefinitionSize1565),
(&g_typeDefinitionSize1566),
(&g_typeDefinitionSize1567),
(&g_typeDefinitionSize1568),
(&g_typeDefinitionSize1569),
(&g_typeDefinitionSize1570),
(&g_typeDefinitionSize1571),
(&g_typeDefinitionSize1572),
(&g_typeDefinitionSize1573),
(&g_typeDefinitionSize1574),
(&g_typeDefinitionSize1575),
(&g_typeDefinitionSize1576),
(&g_typeDefinitionSize1577),
(&g_typeDefinitionSize1578),
(&g_typeDefinitionSize1579),
(&g_typeDefinitionSize1580),
(&g_typeDefinitionSize1581),
(&g_typeDefinitionSize1582),
(&g_typeDefinitionSize1583),
(&g_typeDefinitionSize1584),
(&g_typeDefinitionSize1585),
(&g_typeDefinitionSize1586),
(&g_typeDefinitionSize1587),
(&g_typeDefinitionSize1588),
(&g_typeDefinitionSize1589),
(&g_typeDefinitionSize1590),
(&g_typeDefinitionSize1591),
(&g_typeDefinitionSize1592),
(&g_typeDefinitionSize1593),
(&g_typeDefinitionSize1594),
(&g_typeDefinitionSize1595),
(&g_typeDefinitionSize1596),
(&g_typeDefinitionSize1597),
(&g_typeDefinitionSize1598),
(&g_typeDefinitionSize1599),
(&g_typeDefinitionSize1600),
(&g_typeDefinitionSize1601),
(&g_typeDefinitionSize1602),
(&g_typeDefinitionSize1603),
(&g_typeDefinitionSize1604),
(&g_typeDefinitionSize1605),
(&g_typeDefinitionSize1606),
(&g_typeDefinitionSize1607),
(&g_typeDefinitionSize1608),
(&g_typeDefinitionSize1609),
(&g_typeDefinitionSize1610),
(&g_typeDefinitionSize1611),
(&g_typeDefinitionSize1612),
(&g_typeDefinitionSize1613),
(&g_typeDefinitionSize1614),
(&g_typeDefinitionSize1615),
(&g_typeDefinitionSize1616),
(&g_typeDefinitionSize1617),
(&g_typeDefinitionSize1618),
(&g_typeDefinitionSize1619),
(&g_typeDefinitionSize1620),
(&g_typeDefinitionSize1621),
(&g_typeDefinitionSize1622),
(&g_typeDefinitionSize1623),
(&g_typeDefinitionSize1624),
(&g_typeDefinitionSize1625),
(&g_typeDefinitionSize1626),
(&g_typeDefinitionSize1627),
(&g_typeDefinitionSize1628),
(&g_typeDefinitionSize1629),
(&g_typeDefinitionSize1630),
(&g_typeDefinitionSize1631),
(&g_typeDefinitionSize1632),
(&g_typeDefinitionSize1633),
(&g_typeDefinitionSize1634),
(&g_typeDefinitionSize1635),
(&g_typeDefinitionSize1636),
(&g_typeDefinitionSize1637),
(&g_typeDefinitionSize1638),
(&g_typeDefinitionSize1639),
(&g_typeDefinitionSize1640),
(&g_typeDefinitionSize1641),
(&g_typeDefinitionSize1642),
(&g_typeDefinitionSize1643),
(&g_typeDefinitionSize1644),
(&g_typeDefinitionSize1645),
(&g_typeDefinitionSize1646),
(&g_typeDefinitionSize1647),
(&g_typeDefinitionSize1648),
(&g_typeDefinitionSize1649),
(&g_typeDefinitionSize1650),
(&g_typeDefinitionSize1651),
(&g_typeDefinitionSize1652),
(&g_typeDefinitionSize1653),
(&g_typeDefinitionSize1654),
(&g_typeDefinitionSize1655),
(&g_typeDefinitionSize1656),
(&g_typeDefinitionSize1657),
(&g_typeDefinitionSize1658),
(&g_typeDefinitionSize1659),
(&g_typeDefinitionSize1660),
(&g_typeDefinitionSize1661),
(&g_typeDefinitionSize1662),
(&g_typeDefinitionSize1663),
(&g_typeDefinitionSize1664),
(&g_typeDefinitionSize1665),
(&g_typeDefinitionSize1666),
(&g_typeDefinitionSize1667),
(&g_typeDefinitionSize1668),
(&g_typeDefinitionSize1669),
(&g_typeDefinitionSize1670),
(&g_typeDefinitionSize1671),
(&g_typeDefinitionSize1672),
(&g_typeDefinitionSize1673),
(&g_typeDefinitionSize1674),
(&g_typeDefinitionSize1675),
(&g_typeDefinitionSize1676),
(&g_typeDefinitionSize1677),
(&g_typeDefinitionSize1678),
(&g_typeDefinitionSize1679),
(&g_typeDefinitionSize1680),
(&g_typeDefinitionSize1681),
(&g_typeDefinitionSize1682),
(&g_typeDefinitionSize1683),
(&g_typeDefinitionSize1684),
(&g_typeDefinitionSize1685),
(&g_typeDefinitionSize1686),
(&g_typeDefinitionSize1687),
(&g_typeDefinitionSize1688),
(&g_typeDefinitionSize1689),
(&g_typeDefinitionSize1690),
(&g_typeDefinitionSize1691),
(&g_typeDefinitionSize1692),
(&g_typeDefinitionSize1693),
(&g_typeDefinitionSize1694),
(&g_typeDefinitionSize1695),
(&g_typeDefinitionSize1696),
(&g_typeDefinitionSize1697),
(&g_typeDefinitionSize1698),
(&g_typeDefinitionSize1699),
(&g_typeDefinitionSize1700),
(&g_typeDefinitionSize1701),
(&g_typeDefinitionSize1702),
(&g_typeDefinitionSize1703),
(&g_typeDefinitionSize1704),
(&g_typeDefinitionSize1705),
(&g_typeDefinitionSize1706),
(&g_typeDefinitionSize1707),
(&g_typeDefinitionSize1708),
(&g_typeDefinitionSize1709),
(&g_typeDefinitionSize1710),
(&g_typeDefinitionSize1711),
(&g_typeDefinitionSize1712),
(&g_typeDefinitionSize1713),
(&g_typeDefinitionSize1714),
(&g_typeDefinitionSize1715),
(&g_typeDefinitionSize1716),
(&g_typeDefinitionSize1717),
(&g_typeDefinitionSize1718),
(&g_typeDefinitionSize1719),
(&g_typeDefinitionSize1720),
(&g_typeDefinitionSize1721),
(&g_typeDefinitionSize1722),
(&g_typeDefinitionSize1723),
(&g_typeDefinitionSize1724),
(&g_typeDefinitionSize1725),
(&g_typeDefinitionSize1726),
(&g_typeDefinitionSize1727),
(&g_typeDefinitionSize1728),
(&g_typeDefinitionSize1729),
(&g_typeDefinitionSize1730),
(&g_typeDefinitionSize1731),
(&g_typeDefinitionSize1732),
(&g_typeDefinitionSize1733),
(&g_typeDefinitionSize1734),
(&g_typeDefinitionSize1735),
(&g_typeDefinitionSize1736),
(&g_typeDefinitionSize1737),
(&g_typeDefinitionSize1738),
(&g_typeDefinitionSize1739),
(&g_typeDefinitionSize1740),
(&g_typeDefinitionSize1741),
(&g_typeDefinitionSize1742),
(&g_typeDefinitionSize1743),
(&g_typeDefinitionSize1744),
(&g_typeDefinitionSize1745),
(&g_typeDefinitionSize1746),
(&g_typeDefinitionSize1747),
(&g_typeDefinitionSize1748),
(&g_typeDefinitionSize1749),
(&g_typeDefinitionSize1750),
(&g_typeDefinitionSize1751),
(&g_typeDefinitionSize1752),
(&g_typeDefinitionSize1753),
(&g_typeDefinitionSize1754),
(&g_typeDefinitionSize1755),
(&g_typeDefinitionSize1756),
(&g_typeDefinitionSize1757),
(&g_typeDefinitionSize1758),
(&g_typeDefinitionSize1759),
(&g_typeDefinitionSize1760),
(&g_typeDefinitionSize1761),
(&g_typeDefinitionSize1762),
(&g_typeDefinitionSize1763),
(&g_typeDefinitionSize1764),
(&g_typeDefinitionSize1765),
(&g_typeDefinitionSize1766),
(&g_typeDefinitionSize1767),
(&g_typeDefinitionSize1768),
(&g_typeDefinitionSize1769),
(&g_typeDefinitionSize1770),
(&g_typeDefinitionSize1771),
(&g_typeDefinitionSize1772),
(&g_typeDefinitionSize1773),
(&g_typeDefinitionSize1774),
(&g_typeDefinitionSize1775),
(&g_typeDefinitionSize1776),
(&g_typeDefinitionSize1777),
(&g_typeDefinitionSize1778),
(&g_typeDefinitionSize1779),
(&g_typeDefinitionSize1780),
(&g_typeDefinitionSize1781),
(&g_typeDefinitionSize1782),
(&g_typeDefinitionSize1783),
(&g_typeDefinitionSize1784),
(&g_typeDefinitionSize1785),
(&g_typeDefinitionSize1786),
(&g_typeDefinitionSize1787),
(&g_typeDefinitionSize1788),
(&g_typeDefinitionSize1789),
(&g_typeDefinitionSize1790),
(&g_typeDefinitionSize1791),
(&g_typeDefinitionSize1792),
(&g_typeDefinitionSize1793),
(&g_typeDefinitionSize1794),
(&g_typeDefinitionSize1795),
(&g_typeDefinitionSize1796),
(&g_typeDefinitionSize1797),
(&g_typeDefinitionSize1798),
(&g_typeDefinitionSize1799),
(&g_typeDefinitionSize1800),
(&g_typeDefinitionSize1801),
(&g_typeDefinitionSize1802),
(&g_typeDefinitionSize1803),
(&g_typeDefinitionSize1804),
(&g_typeDefinitionSize1805),
(&g_typeDefinitionSize1806),
(&g_typeDefinitionSize1807),
(&g_typeDefinitionSize1808),
(&g_typeDefinitionSize1809),
(&g_typeDefinitionSize1810),
(&g_typeDefinitionSize1811),
(&g_typeDefinitionSize1812),
(&g_typeDefinitionSize1813),
(&g_typeDefinitionSize1814),
(&g_typeDefinitionSize1815),
(&g_typeDefinitionSize1816),
(&g_typeDefinitionSize1817),
(&g_typeDefinitionSize1818),
(&g_typeDefinitionSize1819),
(&g_typeDefinitionSize1820),
(&g_typeDefinitionSize1821),
(&g_typeDefinitionSize1822),
(&g_typeDefinitionSize1823),
(&g_typeDefinitionSize1824),
(&g_typeDefinitionSize1825),
(&g_typeDefinitionSize1826),
(&g_typeDefinitionSize1827),
(&g_typeDefinitionSize1828),
(&g_typeDefinitionSize1829),
(&g_typeDefinitionSize1830),
(&g_typeDefinitionSize1831),
(&g_typeDefinitionSize1832),
(&g_typeDefinitionSize1833),
(&g_typeDefinitionSize1834),
(&g_typeDefinitionSize1835),
(&g_typeDefinitionSize1836),
(&g_typeDefinitionSize1837),
(&g_typeDefinitionSize1838),
(&g_typeDefinitionSize1839),
(&g_typeDefinitionSize1840),
(&g_typeDefinitionSize1841),
(&g_typeDefinitionSize1842),
(&g_typeDefinitionSize1843),
(&g_typeDefinitionSize1844),
(&g_typeDefinitionSize1845),
(&g_typeDefinitionSize1846),
(&g_typeDefinitionSize1847),
(&g_typeDefinitionSize1848),
(&g_typeDefinitionSize1849),
(&g_typeDefinitionSize1850),
(&g_typeDefinitionSize1851),
(&g_typeDefinitionSize1852),
(&g_typeDefinitionSize1853),
(&g_typeDefinitionSize1854),
(&g_typeDefinitionSize1855),
(&g_typeDefinitionSize1856),
(&g_typeDefinitionSize1857),
(&g_typeDefinitionSize1858),
(&g_typeDefinitionSize1859),
(&g_typeDefinitionSize1860),
(&g_typeDefinitionSize1861),
(&g_typeDefinitionSize1862),
(&g_typeDefinitionSize1863),
(&g_typeDefinitionSize1864),
(&g_typeDefinitionSize1865),
(&g_typeDefinitionSize1866),
(&g_typeDefinitionSize1867),
(&g_typeDefinitionSize1868),
(&g_typeDefinitionSize1869),
(&g_typeDefinitionSize1870),
(&g_typeDefinitionSize1871),
(&g_typeDefinitionSize1872),
(&g_typeDefinitionSize1873),
(&g_typeDefinitionSize1874),
(&g_typeDefinitionSize1875),
(&g_typeDefinitionSize1876),
(&g_typeDefinitionSize1877),
(&g_typeDefinitionSize1878),
(&g_typeDefinitionSize1879),
(&g_typeDefinitionSize1880),
(&g_typeDefinitionSize1881),
(&g_typeDefinitionSize1882),
(&g_typeDefinitionSize1883),
(&g_typeDefinitionSize1884),
(&g_typeDefinitionSize1885),
(&g_typeDefinitionSize1886),
(&g_typeDefinitionSize1887),
(&g_typeDefinitionSize1888),
(&g_typeDefinitionSize1889),
(&g_typeDefinitionSize1890),
(&g_typeDefinitionSize1891),
(&g_typeDefinitionSize1892),
(&g_typeDefinitionSize1893),
(&g_typeDefinitionSize1894),
(&g_typeDefinitionSize1895),
(&g_typeDefinitionSize1896),
(&g_typeDefinitionSize1897),
(&g_typeDefinitionSize1898),
(&g_typeDefinitionSize1899),
(&g_typeDefinitionSize1900),
(&g_typeDefinitionSize1901),
(&g_typeDefinitionSize1902),
(&g_typeDefinitionSize1903),
(&g_typeDefinitionSize1904),
(&g_typeDefinitionSize1905),
(&g_typeDefinitionSize1906),
(&g_typeDefinitionSize1907),
(&g_typeDefinitionSize1908),
(&g_typeDefinitionSize1909),
(&g_typeDefinitionSize1910),
(&g_typeDefinitionSize1911),
(&g_typeDefinitionSize1912),
(&g_typeDefinitionSize1913),
(&g_typeDefinitionSize1914),
(&g_typeDefinitionSize1915),
(&g_typeDefinitionSize1916),
(&g_typeDefinitionSize1917),
(&g_typeDefinitionSize1918),
(&g_typeDefinitionSize1919),
(&g_typeDefinitionSize1920),
(&g_typeDefinitionSize1921),
(&g_typeDefinitionSize1922),
(&g_typeDefinitionSize1923),
(&g_typeDefinitionSize1924),
(&g_typeDefinitionSize1925),
(&g_typeDefinitionSize1926),
(&g_typeDefinitionSize1927),
(&g_typeDefinitionSize1928),
(&g_typeDefinitionSize1929),
(&g_typeDefinitionSize1930),
(&g_typeDefinitionSize1931),
(&g_typeDefinitionSize1932),
(&g_typeDefinitionSize1933),
(&g_typeDefinitionSize1934),
(&g_typeDefinitionSize1935),
(&g_typeDefinitionSize1936),
(&g_typeDefinitionSize1937),
(&g_typeDefinitionSize1938),
(&g_typeDefinitionSize1939),
(&g_typeDefinitionSize1940),
(&g_typeDefinitionSize1941),
(&g_typeDefinitionSize1942),
(&g_typeDefinitionSize1943),
(&g_typeDefinitionSize1944),
(&g_typeDefinitionSize1945),
(&g_typeDefinitionSize1946),
(&g_typeDefinitionSize1947),
(&g_typeDefinitionSize1948),
(&g_typeDefinitionSize1949),
(&g_typeDefinitionSize1950),
(&g_typeDefinitionSize1951),
(&g_typeDefinitionSize1952),
(&g_typeDefinitionSize1953),
(&g_typeDefinitionSize1954),
(&g_typeDefinitionSize1955),
(&g_typeDefinitionSize1956),
(&g_typeDefinitionSize1957),
(&g_typeDefinitionSize1958),
(&g_typeDefinitionSize1959),
(&g_typeDefinitionSize1960),
(&g_typeDefinitionSize1961),
(&g_typeDefinitionSize1962),
(&g_typeDefinitionSize1963),
(&g_typeDefinitionSize1964),
(&g_typeDefinitionSize1965),
(&g_typeDefinitionSize1966),
(&g_typeDefinitionSize1967),
(&g_typeDefinitionSize1968),
(&g_typeDefinitionSize1969),
(&g_typeDefinitionSize1970),
(&g_typeDefinitionSize1971),
(&g_typeDefinitionSize1972),
(&g_typeDefinitionSize1973),
(&g_typeDefinitionSize1974),
(&g_typeDefinitionSize1975),
(&g_typeDefinitionSize1976),
(&g_typeDefinitionSize1977),
(&g_typeDefinitionSize1978),
(&g_typeDefinitionSize1979),
(&g_typeDefinitionSize1980),
(&g_typeDefinitionSize1981),
(&g_typeDefinitionSize1982),
(&g_typeDefinitionSize1983),
(&g_typeDefinitionSize1984),
(&g_typeDefinitionSize1985),
(&g_typeDefinitionSize1986),
(&g_typeDefinitionSize1987),
(&g_typeDefinitionSize1988),
(&g_typeDefinitionSize1989),
(&g_typeDefinitionSize1990),
(&g_typeDefinitionSize1991),
(&g_typeDefinitionSize1992),
(&g_typeDefinitionSize1993),
(&g_typeDefinitionSize1994),
(&g_typeDefinitionSize1995),
(&g_typeDefinitionSize1996),
(&g_typeDefinitionSize1997),
(&g_typeDefinitionSize1998),
(&g_typeDefinitionSize1999),
(&g_typeDefinitionSize2000),
(&g_typeDefinitionSize2001),
(&g_typeDefinitionSize2002),
(&g_typeDefinitionSize2003),
(&g_typeDefinitionSize2004),
(&g_typeDefinitionSize2005),
(&g_typeDefinitionSize2006),
(&g_typeDefinitionSize2007),
(&g_typeDefinitionSize2008),
(&g_typeDefinitionSize2009),
(&g_typeDefinitionSize2010),
(&g_typeDefinitionSize2011),
(&g_typeDefinitionSize2012),
(&g_typeDefinitionSize2013),
(&g_typeDefinitionSize2014),
(&g_typeDefinitionSize2015),
(&g_typeDefinitionSize2016),
(&g_typeDefinitionSize2017),
(&g_typeDefinitionSize2018),
(&g_typeDefinitionSize2019),
(&g_typeDefinitionSize2020),
(&g_typeDefinitionSize2021),
(&g_typeDefinitionSize2022),
(&g_typeDefinitionSize2023),
(&g_typeDefinitionSize2024),
(&g_typeDefinitionSize2025),
(&g_typeDefinitionSize2026),
(&g_typeDefinitionSize2027),
(&g_typeDefinitionSize2028),
(&g_typeDefinitionSize2029),
(&g_typeDefinitionSize2030),
(&g_typeDefinitionSize2031),
(&g_typeDefinitionSize2032),
(&g_typeDefinitionSize2033),
(&g_typeDefinitionSize2034),
(&g_typeDefinitionSize2035),
(&g_typeDefinitionSize2036),
(&g_typeDefinitionSize2037),
(&g_typeDefinitionSize2038),
(&g_typeDefinitionSize2039),
(&g_typeDefinitionSize2040),
(&g_typeDefinitionSize2041),
(&g_typeDefinitionSize2042),
(&g_typeDefinitionSize2043),
(&g_typeDefinitionSize2044),
(&g_typeDefinitionSize2045),
(&g_typeDefinitionSize2046),
(&g_typeDefinitionSize2047),
(&g_typeDefinitionSize2048),
(&g_typeDefinitionSize2049),
(&g_typeDefinitionSize2050),
(&g_typeDefinitionSize2051),
(&g_typeDefinitionSize2052),
(&g_typeDefinitionSize2053),
(&g_typeDefinitionSize2054),
(&g_typeDefinitionSize2055),
(&g_typeDefinitionSize2056),
(&g_typeDefinitionSize2057),
(&g_typeDefinitionSize2058),
(&g_typeDefinitionSize2059),
(&g_typeDefinitionSize2060),
(&g_typeDefinitionSize2061),
(&g_typeDefinitionSize2062),
(&g_typeDefinitionSize2063),
(&g_typeDefinitionSize2064),
(&g_typeDefinitionSize2065),
(&g_typeDefinitionSize2066),
(&g_typeDefinitionSize2067),
(&g_typeDefinitionSize2068),
(&g_typeDefinitionSize2069),
(&g_typeDefinitionSize2070),
(&g_typeDefinitionSize2071),
(&g_typeDefinitionSize2072),
(&g_typeDefinitionSize2073),
(&g_typeDefinitionSize2074),
(&g_typeDefinitionSize2075),
(&g_typeDefinitionSize2076),
(&g_typeDefinitionSize2077),
(&g_typeDefinitionSize2078),
(&g_typeDefinitionSize2079),
(&g_typeDefinitionSize2080),
(&g_typeDefinitionSize2081),
(&g_typeDefinitionSize2082),
(&g_typeDefinitionSize2083),
(&g_typeDefinitionSize2084),
(&g_typeDefinitionSize2085),
(&g_typeDefinitionSize2086),
(&g_typeDefinitionSize2087),
(&g_typeDefinitionSize2088),
(&g_typeDefinitionSize2089),
(&g_typeDefinitionSize2090),
(&g_typeDefinitionSize2091),
(&g_typeDefinitionSize2092),
(&g_typeDefinitionSize2093),
(&g_typeDefinitionSize2094),
(&g_typeDefinitionSize2095),
(&g_typeDefinitionSize2096),
(&g_typeDefinitionSize2097),
(&g_typeDefinitionSize2098),
(&g_typeDefinitionSize2099),
(&g_typeDefinitionSize2100),
(&g_typeDefinitionSize2101),
(&g_typeDefinitionSize2102),
(&g_typeDefinitionSize2103),
(&g_typeDefinitionSize2104),
(&g_typeDefinitionSize2105),
(&g_typeDefinitionSize2106),
(&g_typeDefinitionSize2107),
(&g_typeDefinitionSize2108),
(&g_typeDefinitionSize2109),
(&g_typeDefinitionSize2110),
(&g_typeDefinitionSize2111),
(&g_typeDefinitionSize2112),
(&g_typeDefinitionSize2113),
(&g_typeDefinitionSize2114),
(&g_typeDefinitionSize2115),
(&g_typeDefinitionSize2116),
(&g_typeDefinitionSize2117),
(&g_typeDefinitionSize2118),
(&g_typeDefinitionSize2119),
(&g_typeDefinitionSize2120),
(&g_typeDefinitionSize2121),
(&g_typeDefinitionSize2122),
(&g_typeDefinitionSize2123),
(&g_typeDefinitionSize2124),
(&g_typeDefinitionSize2125),
(&g_typeDefinitionSize2126),
(&g_typeDefinitionSize2127),
(&g_typeDefinitionSize2128),
(&g_typeDefinitionSize2129),
(&g_typeDefinitionSize2130),
(&g_typeDefinitionSize2131),
(&g_typeDefinitionSize2132),
(&g_typeDefinitionSize2133),
(&g_typeDefinitionSize2134),
(&g_typeDefinitionSize2135),
(&g_typeDefinitionSize2136),
(&g_typeDefinitionSize2137),
(&g_typeDefinitionSize2138),
(&g_typeDefinitionSize2139),
(&g_typeDefinitionSize2140),
(&g_typeDefinitionSize2141),
(&g_typeDefinitionSize2142),
(&g_typeDefinitionSize2143),
(&g_typeDefinitionSize2144),
(&g_typeDefinitionSize2145),
(&g_typeDefinitionSize2146),
(&g_typeDefinitionSize2147),
(&g_typeDefinitionSize2148),
(&g_typeDefinitionSize2149),
(&g_typeDefinitionSize2150),
(&g_typeDefinitionSize2151),
(&g_typeDefinitionSize2152),
(&g_typeDefinitionSize2153),
(&g_typeDefinitionSize2154),
(&g_typeDefinitionSize2155),
(&g_typeDefinitionSize2156),
(&g_typeDefinitionSize2157),
(&g_typeDefinitionSize2158),
(&g_typeDefinitionSize2159),
(&g_typeDefinitionSize2160),
(&g_typeDefinitionSize2161),
(&g_typeDefinitionSize2162),
(&g_typeDefinitionSize2163),
(&g_typeDefinitionSize2164),
(&g_typeDefinitionSize2165),
(&g_typeDefinitionSize2166),
(&g_typeDefinitionSize2167),
(&g_typeDefinitionSize2168),
(&g_typeDefinitionSize2169),
(&g_typeDefinitionSize2170),
(&g_typeDefinitionSize2171),
(&g_typeDefinitionSize2172),
(&g_typeDefinitionSize2173),
(&g_typeDefinitionSize2174),
(&g_typeDefinitionSize2175),
(&g_typeDefinitionSize2176),
(&g_typeDefinitionSize2177),
(&g_typeDefinitionSize2178),
(&g_typeDefinitionSize2179),
(&g_typeDefinitionSize2180),
(&g_typeDefinitionSize2181),
(&g_typeDefinitionSize2182),
(&g_typeDefinitionSize2183),
(&g_typeDefinitionSize2184),
(&g_typeDefinitionSize2185),
(&g_typeDefinitionSize2186),
(&g_typeDefinitionSize2187),
(&g_typeDefinitionSize2188),
(&g_typeDefinitionSize2189),
(&g_typeDefinitionSize2190),
(&g_typeDefinitionSize2191),
(&g_typeDefinitionSize2192),
(&g_typeDefinitionSize2193),
(&g_typeDefinitionSize2194),
(&g_typeDefinitionSize2195),
(&g_typeDefinitionSize2196),
(&g_typeDefinitionSize2197),
(&g_typeDefinitionSize2198),
(&g_typeDefinitionSize2199),
(&g_typeDefinitionSize2200),
(&g_typeDefinitionSize2201),
(&g_typeDefinitionSize2202),
(&g_typeDefinitionSize2203),
(&g_typeDefinitionSize2204),
(&g_typeDefinitionSize2205),
(&g_typeDefinitionSize2206),
(&g_typeDefinitionSize2207),
(&g_typeDefinitionSize2208),
(&g_typeDefinitionSize2209),
(&g_typeDefinitionSize2210),
(&g_typeDefinitionSize2211),
(&g_typeDefinitionSize2212),
(&g_typeDefinitionSize2213),
(&g_typeDefinitionSize2214),
(&g_typeDefinitionSize2215),
(&g_typeDefinitionSize2216),
(&g_typeDefinitionSize2217),
(&g_typeDefinitionSize2218),
(&g_typeDefinitionSize2219),
(&g_typeDefinitionSize2220),
(&g_typeDefinitionSize2221),
(&g_typeDefinitionSize2222),
(&g_typeDefinitionSize2223),
(&g_typeDefinitionSize2224),
(&g_typeDefinitionSize2225),
(&g_typeDefinitionSize2226),
(&g_typeDefinitionSize2227),
(&g_typeDefinitionSize2228),
(&g_typeDefinitionSize2229),
(&g_typeDefinitionSize2230),
(&g_typeDefinitionSize2231),
(&g_typeDefinitionSize2232),
(&g_typeDefinitionSize2233),
(&g_typeDefinitionSize2234),
(&g_typeDefinitionSize2235),
(&g_typeDefinitionSize2236),
(&g_typeDefinitionSize2237),
(&g_typeDefinitionSize2238),
(&g_typeDefinitionSize2239),
(&g_typeDefinitionSize2240),
(&g_typeDefinitionSize2241),
(&g_typeDefinitionSize2242),
(&g_typeDefinitionSize2243),
(&g_typeDefinitionSize2244),
(&g_typeDefinitionSize2245),
(&g_typeDefinitionSize2246),
(&g_typeDefinitionSize2247),
(&g_typeDefinitionSize2248),
(&g_typeDefinitionSize2249),
(&g_typeDefinitionSize2250),
(&g_typeDefinitionSize2251),
(&g_typeDefinitionSize2252),
(&g_typeDefinitionSize2253),
(&g_typeDefinitionSize2254),
(&g_typeDefinitionSize2255),
};
| [
"rachelg@unity3d.com"
] | rachelg@unity3d.com |
34d28a61a0bc77796c2cc0f5950a98e9d83a2c33 | bf02e7bb2afb68bd3a2d09dc49f7dc01dd9d5c13 | /media/learning/common/labelled_example.cc | 76d08509298e8f083f91e84d7da29e404187ddd7 | [
"BSD-3-Clause"
] | permissive | omrishalev22/chromium | 10dd559a502257d85ad3eead54ab437e33a1ce4d | 219e3cba255e390615f340e72ca629c89bca993e | refs/heads/master | 2022-09-07T01:41:02.760889 | 2019-02-08T07:39:12 | 2019-02-08T07:39:12 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,985 | cc | // Copyright 2018 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 "media/learning/common/labelled_example.h"
#include "base/containers/flat_set.h"
namespace media {
namespace learning {
LabelledExample::LabelledExample() = default;
LabelledExample::LabelledExample(std::initializer_list<FeatureValue> init_list,
TargetValue target)
: features(init_list), target_value(target) {}
LabelledExample::LabelledExample(const LabelledExample& rhs) = default;
LabelledExample::LabelledExample(LabelledExample&& rhs) noexcept = default;
LabelledExample::~LabelledExample() = default;
std::ostream& operator<<(std::ostream& out, const LabelledExample& example) {
out << example.features << " => " << example.target_value;
return out;
}
std::ostream& operator<<(std::ostream& out, const FeatureVector& features) {
for (const auto& feature : features)
out << " " << feature;
return out;
}
bool LabelledExample::operator==(const LabelledExample& rhs) const {
// Do not check weight.
return target_value == rhs.target_value && features == rhs.features;
}
bool LabelledExample::operator!=(const LabelledExample& rhs) const {
// Do not check weight.
return !((*this) == rhs);
}
bool LabelledExample::operator<(const LabelledExample& rhs) const {
// Impose a somewhat arbitrary ordering.
// Do not check weight.
if (target_value != rhs.target_value)
return target_value < rhs.target_value;
// Note that we could short-circuit this if the feature vector lengths are
// unequal, since we don't particularly care how they compare as long as it's
// stable. In particular, we don't have any notion of a "prefix".
return features < rhs.features;
}
LabelledExample& LabelledExample::operator=(const LabelledExample& rhs) =
default;
LabelledExample& LabelledExample::operator=(LabelledExample&& rhs) = default;
TrainingData::TrainingData() = default;
TrainingData::TrainingData(const TrainingData& rhs) = default;
TrainingData::TrainingData(TrainingData&& rhs) = default;
TrainingData::~TrainingData() = default;
TrainingData& TrainingData::operator=(const TrainingData& rhs) = default;
TrainingData& TrainingData::operator=(TrainingData&& rhs) = default;
TrainingData TrainingData::DeDuplicate() const {
// flat_set has non-const iterators, while std::set does not. const_cast is
// not allowed by chromium style outside of getters, so flat_set it is.
base::flat_set<LabelledExample> example_set;
for (auto& example : examples_) {
auto iter = example_set.find(example);
if (iter != example_set.end())
iter->weight += example.weight;
else
example_set.insert(example);
}
TrainingData deduplicated_data;
for (auto& example : example_set)
deduplicated_data.push_back(example);
return deduplicated_data;
}
} // namespace learning
} // namespace media
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
f65f59f459be42fb7cb7f6097271ef32e2993727 | 32b934cb3ef99474b7295da510420ca4a03d6017 | /GamosRunManager/include/GmDeprecatedCommandsMessenger.hh | 8fb1a1d54027747d7cd06c13892114d905179cb0 | [] | no_license | ethanlarochelle/GamosCore | 450fc0eeb4a5a6666da7fdb75bcf5ee23a026238 | 70612e9a2e45b3b1381713503eb0f405530d44f0 | refs/heads/master | 2022-03-24T16:03:39.569576 | 2018-01-20T12:43:43 | 2018-01-20T12:43:43 | 116,504,426 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,093 | hh | //
// ********************************************************************
// * License and Disclaimer *
// * *
// * The GAMOS software is copyright of the Copyright Holders of *
// * the GAMOS Collaboration. It is provided under the terms and *
// * conditions of the GAMOS Software License, included in the file *
// * LICENSE and available at http://fismed.ciemat.es/GAMOS/license .*
// * These include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GAMOS collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the GAMOS Software license. *
// ********************************************************************
//
#ifndef GmDeprecatedCommandsMessenger_HH
#define GmDeprecatedCommandsMessenger_HH 1
#include "G4UImessenger.hh"
class G4UIcommand;
#include <map>
class GmDeprecatedCommandsMessenger: public G4UImessenger {
public:
GmDeprecatedCommandsMessenger();
~GmDeprecatedCommandsMessenger();
virtual void SetNewValue(G4UIcommand * command,G4String newValues);
private:
std::map<G4UIcommand*,G4String> theCommands;
};
#endif
| [
"ethanlarochelle@gmail.com"
] | ethanlarochelle@gmail.com |
151a7b3d1d028939de42f235a12b7e81a418f8f4 | 120b640cf0c673cd20387cda7b94219eb0b6bc4d | /src/BGL/BGLBounds.cc | c017e3cd1dbcdff7c50644ddfff3626e5d94821a | [] | no_license | giseburt/Miracle-Grue | a6ba431477c94e12e6f6cb269f6309895c33157a | e6aaa619d466b05d89f3026f0e694b74379bdfde | refs/heads/master | 2021-01-09T06:16:39.836293 | 2011-11-07T18:27:42 | 2011-11-07T18:27:42 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 419 | cc | #include "BGLBounds.h"
namespace BGL {
const Scalar Bounds::NONE = -9e9;
void Bounds::expand(const Point& pt)
{
if (minX == NONE) {
minX = maxX = pt.x;
minY = maxY = pt.y;
return;
}
if (pt.x < minX) {
minX = pt.x;
}
if (pt.x > maxX) {
maxX = pt.x;
}
if (pt.y < minY) {
minY = pt.y;
}
if (pt.y > maxY) {
maxY = pt.y;
}
}
}
| [
"phooky@gmail.com"
] | phooky@gmail.com |
d0c36eb1184e312e7f862948fdf069c8d274389a | b7b1f8b63c1f3ef92fa1a016e395b8565ea37242 | /online/include/net/InetAddress.h | 8ad96b76a098f85c927bc421fdd57256619416c4 | [] | no_license | NE0T12/mini_Search_Engine | b366786345b8c9702daed7c1159d952f50f5698a | 0e9b69c9e261986f45fb534db174cc50fa3eb94d | refs/heads/master | 2020-03-20T02:12:44.141690 | 2018-06-25T10:14:20 | 2018-06-25T10:14:20 | 137,103,793 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 575 | h | ///
/// @file InetAddress.h
/// @author lemon(haohb13@gmail.com)
/// @date 2015-11-04 17:08:29
///
#ifndef _WD_INETADDRESS_H
#define _WD_INETADDRESS_H
#include <netinet/in.h>
#include <string>
namespace wd
{
class InetAddress
{
public:
InetAddress(){}
InetAddress(short port);
InetAddress(const char * pIp, short port);
InetAddress(const struct sockaddr_in & addr);
const struct sockaddr_in * getSockAddrPtr() const;
std::string ip() const;
unsigned short port() const;
private:
struct sockaddr_in addr_;
};
}// end of namespace wd
#endif
| [
"xgwtruth@outlook.com"
] | xgwtruth@outlook.com |
6af2af62f6189da9f069abbfa856f8132950a8f6 | 21db378bdc4336e56bd4df3500de763f8490e4cc | /PubSubModule/module.hpp | 3083eb2381dd070c9c0944569889f50ff878b84b | [
"MIT"
] | permissive | zht043/inter-thread-publisher-subscriber-cpp | 91473d7228bf8afc01209cda75fc1b58be017fcc | c9862a438ae71ac3004daf4f6f7465184a1ee938 | refs/heads/master | 2022-12-17T11:52:52.459334 | 2020-09-16T06:13:11 | 2020-09-16T06:13:11 | 283,113,030 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,430 | hpp | #pragma once
#include <iostream>
#include "inter_thread_pubsub.hpp"
#include "oop_observer.hpp"
#include "thread_pool.hpp"
class Module {
public:
Module() {
}
~Module() {
}
virtual void task() = 0;
//======================Create New Thread Version=================================//
/* create a new thread and run the module in that thread */
void run() {
mthread = boost::shared_ptr<boost::thread>(
new boost::thread(boost::bind(&Module::task, this))
);
}
/* don't use this method if the threadpool version of Module::run() was used */
void idle() {
mthread->yield();
}
/* don't use this method if the threadpool version of Module::run() was used */
void join() {
mthread->join();
}
//================================================================================//
//============================Thread Pool Version=================================//
/* run the module as a task to be queued for a thread pool*/
void run(ThreadPool& thread_pool) {
thread_pool.execute(boost::bind(&Module::task, this));
}
//================================================================================//
private:
boost::shared_ptr<boost::thread> mthread;
};
| [
"hoz043@ucsd.edu"
] | hoz043@ucsd.edu |
37a106f0c68f898f2993e804c78f9f6abe0d4e82 | fbe77e9e2a53a4600a1d9b00b5f2c29ee3e8c59a | /contracts/libc++/upstream/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/uninitialized_default_construct_n.pass.cpp | e5b9eca439cf8099eb046b7a59b8ac8d8a7def2c | [
"NCSA",
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | permissive | AcuteAngleCloud/Acute-Angle-Chain | 8d4a1ad714f6de1493954326e109b6af112561b9 | 5ea50bee042212ccff797ece5018c64f3f50ceff | refs/heads/master | 2021-04-26T21:52:25.560457 | 2020-03-21T07:29:06 | 2020-03-21T07:29:06 | 124,164,376 | 10 | 5 | MIT | 2020-07-16T07:14:45 | 2018-03-07T02:03:53 | C++ | UTF-8 | C++ | false | false | 3,202 | cpp | //===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11, c++14
// <memory>
// template <class ForwardIt>
// void uninitialized_default_construct(ForwardIt, ForwardIt);
#include <memory>
#include <cstdlib>
#include <cassert>
#include "test_macros.h"
#include "test_iterators.h"
struct Counted {
static int count;
static int constructed;
static void reset() { count = constructed = 0; }
explicit Counted() { ++count; ++constructed; }
Counted(Counted const&) { assert(false); }
~Counted() { assert(count > 0); --count; }
friend void operator&(Counted) = delete;
};
int Counted::count = 0;
int Counted::constructed = 0;
struct ThrowsCounted {
static int count;
static int constructed;
static int throw_after;
static void reset() { throw_after = count = constructed = 0; }
explicit ThrowsCounted() {
++constructed;
if (throw_after > 0 && --throw_after == 0) {
TEST_THROW(1);
}
++count;
}
ThrowsCounted(ThrowsCounted const&) { assert(false); }
~ThrowsCounted() { assert(count > 0); --count; }
friend void operator&(ThrowsCounted) = delete;
};
int ThrowsCounted::count = 0;
int ThrowsCounted::constructed = 0;
int ThrowsCounted::throw_after = 0;
void test_ctor_throws()
{
#ifndef TEST_HAS_NO_EXCEPTIONS
using It = forward_iterator<ThrowsCounted*>;
const int N = 5;
alignas(ThrowsCounted) char pool[sizeof(ThrowsCounted)*N] = {};
ThrowsCounted* p = (ThrowsCounted*)pool;
try {
ThrowsCounted::throw_after = 4;
std::uninitialized_default_construct_n(It(p), N);
assert(false);
} catch (...) {}
assert(ThrowsCounted::count == 0);
assert(ThrowsCounted::constructed == 4); // forth construction throws
#endif
}
void test_counted()
{
using It = forward_iterator<Counted*>;
const int N = 5;
alignas(Counted) char pool[sizeof(Counted)*N] = {};
Counted* p = (Counted*)pool;
It e = std::uninitialized_default_construct_n(It(p), 1);
assert(e == It(p+1));
assert(Counted::count == 1);
assert(Counted::constructed == 1);
e = std::uninitialized_default_construct_n(It(p+1), 4);
assert(e == It(p+N));
assert(Counted::count == 5);
assert(Counted::constructed == 5);
std::destroy(p, p+N);
assert(Counted::count == 0);
}
void test_value_initialized()
{
using It = forward_iterator<int*>;
const int N = 5;
int pool[N] = {-1, -1, -1, -1, -1};
int* p = pool;
auto e = std::uninitialized_default_construct_n(It(p), 1);
assert(e == It(p+1));
assert(pool[0] == -1);
assert(pool[1] == -1);
e = std::uninitialized_default_construct_n(It(p+1), 4);
assert(e == It(p+N));
assert(pool[1] == -1);
assert(pool[2] == -1);
assert(pool[3] == -1);
assert(pool[4] == -1);
}
int main()
{
test_counted();
test_value_initialized();
test_ctor_throws();
}
| [
"caokun@acuteangle.cn"
] | caokun@acuteangle.cn |
3eb9baeb5be93d3009927d558703cdd676c0e4cc | 2cf838b54b556987cfc49f42935f8aa7563ea1f4 | /aws-cpp-sdk-sagemaker/include/aws/sagemaker/model/RepositoryAuthConfig.h | 13ac347436c9a8f0342438eb53d107031c3c991e | [
"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 | 7,004 | h | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sagemaker/SageMaker_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 SageMaker
{
namespace Model
{
/**
* <p>Specifies an authentication configuration for the private docker registry
* where your model image is hosted. Specify a value for this property only if you
* specified <code>Vpc</code> as the value for the
* <code>RepositoryAccessMode</code> field of the <code>ImageConfig</code> object
* that you passed to a call to <code>CreateModel</code> and the private Docker
* registry where the model image is hosted requires authentication.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/RepositoryAuthConfig">AWS
* API Reference</a></p>
*/
class AWS_SAGEMAKER_API RepositoryAuthConfig
{
public:
RepositoryAuthConfig();
RepositoryAuthConfig(Aws::Utils::Json::JsonView jsonValue);
RepositoryAuthConfig& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The Amazon Resource Name (ARN) of an Amazon Web Services Lambda function that
* provides credentials to authenticate to the private Docker registry where your
* model image is hosted. For information about how to create an Amazon Web
* Services Lambda function, see <a
* href="https://docs.aws.amazon.com/lambda/latest/dg/getting-started-create-function.html">Create
* a Lambda function with the console</a> in the <i>Amazon Web Services Lambda
* Developer Guide</i>.</p>
*/
inline const Aws::String& GetRepositoryCredentialsProviderArn() const{ return m_repositoryCredentialsProviderArn; }
/**
* <p>The Amazon Resource Name (ARN) of an Amazon Web Services Lambda function that
* provides credentials to authenticate to the private Docker registry where your
* model image is hosted. For information about how to create an Amazon Web
* Services Lambda function, see <a
* href="https://docs.aws.amazon.com/lambda/latest/dg/getting-started-create-function.html">Create
* a Lambda function with the console</a> in the <i>Amazon Web Services Lambda
* Developer Guide</i>.</p>
*/
inline bool RepositoryCredentialsProviderArnHasBeenSet() const { return m_repositoryCredentialsProviderArnHasBeenSet; }
/**
* <p>The Amazon Resource Name (ARN) of an Amazon Web Services Lambda function that
* provides credentials to authenticate to the private Docker registry where your
* model image is hosted. For information about how to create an Amazon Web
* Services Lambda function, see <a
* href="https://docs.aws.amazon.com/lambda/latest/dg/getting-started-create-function.html">Create
* a Lambda function with the console</a> in the <i>Amazon Web Services Lambda
* Developer Guide</i>.</p>
*/
inline void SetRepositoryCredentialsProviderArn(const Aws::String& value) { m_repositoryCredentialsProviderArnHasBeenSet = true; m_repositoryCredentialsProviderArn = value; }
/**
* <p>The Amazon Resource Name (ARN) of an Amazon Web Services Lambda function that
* provides credentials to authenticate to the private Docker registry where your
* model image is hosted. For information about how to create an Amazon Web
* Services Lambda function, see <a
* href="https://docs.aws.amazon.com/lambda/latest/dg/getting-started-create-function.html">Create
* a Lambda function with the console</a> in the <i>Amazon Web Services Lambda
* Developer Guide</i>.</p>
*/
inline void SetRepositoryCredentialsProviderArn(Aws::String&& value) { m_repositoryCredentialsProviderArnHasBeenSet = true; m_repositoryCredentialsProviderArn = std::move(value); }
/**
* <p>The Amazon Resource Name (ARN) of an Amazon Web Services Lambda function that
* provides credentials to authenticate to the private Docker registry where your
* model image is hosted. For information about how to create an Amazon Web
* Services Lambda function, see <a
* href="https://docs.aws.amazon.com/lambda/latest/dg/getting-started-create-function.html">Create
* a Lambda function with the console</a> in the <i>Amazon Web Services Lambda
* Developer Guide</i>.</p>
*/
inline void SetRepositoryCredentialsProviderArn(const char* value) { m_repositoryCredentialsProviderArnHasBeenSet = true; m_repositoryCredentialsProviderArn.assign(value); }
/**
* <p>The Amazon Resource Name (ARN) of an Amazon Web Services Lambda function that
* provides credentials to authenticate to the private Docker registry where your
* model image is hosted. For information about how to create an Amazon Web
* Services Lambda function, see <a
* href="https://docs.aws.amazon.com/lambda/latest/dg/getting-started-create-function.html">Create
* a Lambda function with the console</a> in the <i>Amazon Web Services Lambda
* Developer Guide</i>.</p>
*/
inline RepositoryAuthConfig& WithRepositoryCredentialsProviderArn(const Aws::String& value) { SetRepositoryCredentialsProviderArn(value); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of an Amazon Web Services Lambda function that
* provides credentials to authenticate to the private Docker registry where your
* model image is hosted. For information about how to create an Amazon Web
* Services Lambda function, see <a
* href="https://docs.aws.amazon.com/lambda/latest/dg/getting-started-create-function.html">Create
* a Lambda function with the console</a> in the <i>Amazon Web Services Lambda
* Developer Guide</i>.</p>
*/
inline RepositoryAuthConfig& WithRepositoryCredentialsProviderArn(Aws::String&& value) { SetRepositoryCredentialsProviderArn(std::move(value)); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of an Amazon Web Services Lambda function that
* provides credentials to authenticate to the private Docker registry where your
* model image is hosted. For information about how to create an Amazon Web
* Services Lambda function, see <a
* href="https://docs.aws.amazon.com/lambda/latest/dg/getting-started-create-function.html">Create
* a Lambda function with the console</a> in the <i>Amazon Web Services Lambda
* Developer Guide</i>.</p>
*/
inline RepositoryAuthConfig& WithRepositoryCredentialsProviderArn(const char* value) { SetRepositoryCredentialsProviderArn(value); return *this;}
private:
Aws::String m_repositoryCredentialsProviderArn;
bool m_repositoryCredentialsProviderArnHasBeenSet;
};
} // namespace Model
} // namespace SageMaker
} // namespace Aws
| [
"aws-sdk-cpp-automation@github.com"
] | aws-sdk-cpp-automation@github.com |
3ea5bb692acd201607d21732b4a208774794fb88 | 24c3b6ee3e2b06288bed587e34751969b4a73e31 | /AtCoder/Virtual/20200517/D.cpp | 9cbbef2c99c222a0f087b2b68d6c2e4eca195766 | [] | no_license | KatsuyaKikuchi/ProgrammingContest | 89afbda50d1cf59fc58d8a9e25e6660334f18a2a | d9254202eec56f96d8c5b508556464a3f87a0a4f | refs/heads/master | 2023-06-05T20:07:36.334182 | 2021-06-13T13:55:06 | 2021-06-13T13:55:06 | 318,641,671 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,576 | cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> pll;
#define FOR(i, n, m) for(ll (i)=(m);(i)<(n);++(i))
#define REP(i, n) FOR(i,n,0)
#define OF64 std::setprecision(10)
const ll MOD = 1000000007;
const ll INF = (ll) 1e15;
struct UnionFind {
UnionFind(int n) {
rank.assign(n, 0);
parent.resize(n);
for (int i = 0; i < n; ++i) {
parent[i] = i;
}
}
int find(int x) {
if (x == parent[x])
return x;
return parent[x] = find(parent[x]);
}
bool same(int x, int y) {
return find(x) == find(y);
}
void unit(int x, int y) {
x = find(x);
y = find(y);
if (x == y)
return;
if (rank[x] < rank[y]) {
parent[x] = y;
}
else {
parent[y] = x;
if (rank[x] == rank[y])
rank[x]++;
}
}
vector<int> rank;
vector<int> parent;
};
pll E[55];
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll N, M;
cin >> N >> M;
REP(i, M) {
cin >> E[i].first >> E[i].second;
E[i].first--;
E[i].second--;
}
ll ans = 0;
REP(i, M) {
UnionFind uf(N);
REP(j, M) {
if (j == i)
continue;
uf.unit(E[j].first, E[j].second);
}
REP(j, N - 1) {
if (uf.same(j, j + 1))
continue;
ans++;
break;
}
}
cout << ans << endl;
return 0;
} | [
"k.kikuchi.ah@gmail.com"
] | k.kikuchi.ah@gmail.com |
7161ee9cbaf4ed43ef1448dedebeadae307baa37 | 1e0dd1a7b19e8c8ee897709febb1f60409748e6e | /src/nes/mapper/mapper007.cpp | bb671d5eb1fc78a10018875f8182c91d6074ae85 | [] | no_license | rgegriff/EmuMasterPi | 1ba11d3e0c5257b9369175e3eb4a8807b48cb2b6 | d9402704a83c0b4e6810c4790cf1c42911ead1ab | refs/heads/master | 2021-01-21T01:06:39.410326 | 2012-11-23T19:53:19 | 2012-11-23T19:53:19 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,551 | cpp | /*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "mapper007.h"
#include "disk.h"
static u8 patch;
static void writeHigh(u16 addr, u8 data)
{
Q_UNUSED(addr)
nesSetRom32KBank(data & 0x07);
if (!patch) {
if (data & 0x10)
nesSetMirroring(SingleHigh);
else
nesSetMirroring(SingleLow);
}
}
void Mapper007::reset()
{
NesMapper::reset();
writeHigh = ::writeHigh;
patch = 0;
nesSetRom32KBank(0);
nesSetMirroring(SingleLow);
u32 crc = nesDiskCrc;
if( crc == 0x3c9fe649 ) { // WWF Wrestlemania Challenge(U)
nesSetMirroring(VerticalMirroring);
patch = 1;
}
if( crc == 0x09874777 ) { // Marble Madness(U)
nesEmuSetRenderMethod(NesEmu::TileRender);
}
if( crc == 0x279710dc // Battletoads (U)
|| crc == 0xceb65b06 ) { // Battletoads Double Dragon (U)
nesEmuSetRenderMethod(NesEmu::PreAllRender);
memset(nesWram, 0, sizeof(nesWram));
}
}
| [
"andy.nichols@nokia.com"
] | andy.nichols@nokia.com |
9346090cf569188c21112fdb88e28e4bf1b0453a | fe6f241c385dffa90bb9117717b0d31aa0d67472 | /src/lycon/transform/resize.h | dd6dd105d3485e55833bfb245fbd61cd8cc44797 | [
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | peter0749/lycon | 06bde7cbce75918d1148e0a1e38200345b8a8512 | 0e7b3e51f56140d68e0466d00be45d79b4de682b | refs/heads/master | 2022-07-03T13:40:59.218284 | 2020-05-16T15:28:12 | 2020-05-16T15:28:12 | 264,456,150 | 0 | 0 | NOASSERTION | 2020-05-16T14:34:11 | 2020-05-16T14:34:10 | null | UTF-8 | C++ | false | false | 1,379 | h | #pragma once
#include "lycon/mat/mat.h"
namespace lycon
{
enum InterpolationFlags
{
/** nearest neighbor interpolation */
INTER_NEAREST = 0,
/** bilinear interpolation */
INTER_LINEAR = 1,
/** bicubic interpolation */
INTER_CUBIC = 2,
/** resampling using pixel area relation. It may be a preferred method for
image decimation, as
it gives moire'-free results. But when the image is zoomed, it is similar to
the INTER_NEAREST
method. */
INTER_AREA = 3,
/** Lanczos interpolation over 8x8 neighborhood */
INTER_LANCZOS4 = 4,
/** mask for interpolation codes */
INTER_MAX = 7,
/** flag, fills all of the destination image pixels. If some of them
correspond to outliers in the
source image, they are set to zero */
WARP_FILL_OUTLIERS = 8,
/** flag, inverse transformation
For example, @ref cv::linearPolar or @ref cv::logPolar transforms:
- flag is __not__ set: \f$dst( \rho , \phi ) = src(x,y)\f$
- flag is set: \f$dst(x,y) = src( \rho , \phi )\f$
*/
WARP_INVERSE_MAP = 16
};
enum InterpolationMasks
{
INTER_BITS = 5,
INTER_BITS2 = INTER_BITS * 2,
INTER_TAB_SIZE = 1 << INTER_BITS,
INTER_TAB_SIZE2 = INTER_TAB_SIZE * INTER_TAB_SIZE
};
void resize(InputArray _src, OutputArray _dst, Size dsize, double inv_scale_x, double inv_scale_y, int interpolation);
}
| [
"sd@cs.stanford.edu"
] | sd@cs.stanford.edu |
fd8b84412110246bd4792849db171e4bacb205c9 | 0017c3b639bf1f90a616150a76897226ed087bba | /artg4tk/services/ActionHolder_service.cc | cf8d39f925bec3fc038fd2b70a2cf70bf575d805 | [] | no_license | yarba/artg4tk | a164c159aed0d728c6069782606ae15b0dbe4268 | e107fd8689f741279a3d371cd6b772b5cadd87e5 | refs/heads/master | 2021-06-25T03:55:57.106277 | 2020-07-15T16:31:32 | 2020-07-15T16:31:32 | 132,481,088 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,583 | cc | // Provides the implementation for the @ActionHolderService@ service.
// For more comprehensive documentation, see the header file ActionHolderService.hh
// Authors: Tasha Arvanitis, Adam Lyon
// Date: July 2012
// Includes
#include "artg4tk/services/ActionHolder_service.hh"
#include "art/Framework/Services/Registry/ServiceMacros.h"
#include "messagefacility/MessageLogger/MessageLogger.h"
#include "artg4tk/actionBase/RunActionBase.hh"
#include "artg4tk/actionBase/EventActionBase.hh"
#include "artg4tk/actionBase/TrackingActionBase.hh"
#include "artg4tk/actionBase/SteppingActionBase.hh"
#include "artg4tk/actionBase/StackingActionBase.hh"
#include "artg4tk/actionBase/PrimaryGeneratorActionBase.hh"
#include <algorithm>
// Don't type 'std::' all the time...
using std::string;
using std::map;
using std::pair;
///////////////////
using namespace std;
/////////////////////
// Message category
static std::string msgctg = "ActionHolderService";
// Constructor doesn't do much with the passed arguments, but does initialize
// the logger for the service
artg4tk::ActionHolderService::ActionHolderService(fhicl::ParameterSet const&,
art::ActivityRegistry&) :
runActionsMap_(),
eventActionsMap_(),
trackingActionsMap_(),
steppingActionsMap_(),
stackingActionsMap_(),
primaryGeneratorActionsMap_(),
currentArtEvent_(nullptr),
allActionsMap_()
{}
// Register actions
template <typename A>
void artg4tk::ActionHolderService::doRegisterAction(A * const action,
std::map<std::string, A *>& actionMap)
{
mf::LogDebug(msgctg) << "Registering action " << action->myName();
// Check if the name exists in the specific action map
if ( 0 == actionMap.count( action->myName() ) ) {
// Add the action!
actionMap.insert(
pair<string, A *>( action->myName(), action )
);
// Now, check whether the name exists in the overall map of all the actions
// If so, move on (don't throw an exception, since a single action may need
// to register in multiple maps). Otherwise, add it.
if ( 0 == allActionsMap_.count( action->myName() ) ) {
allActionsMap_.insert(
pair<string, ActionBase*>( action->myName(), dynamic_cast<ActionBase*>(action) ));
}
}
else {
// We already have this action in the specific action map - this is bad!
throw cet::exception("ActionHolderService")
<< "Duplicate action named " << action->myName() << ".\n";
}
}
void artg4tk::ActionHolderService::registerAction(RunActionBase * const action) {
cerr<< "registering to runActionsMap_"<<endl;
doRegisterAction(action, runActionsMap_);
}
void artg4tk::ActionHolderService::registerAction(EventActionBase * const action) {
cerr<< "registering to eventActionsMap_"<<endl;
doRegisterAction(action, eventActionsMap_);
}
void artg4tk::ActionHolderService::registerAction(TrackingActionBase * const action) {
cerr<< "registering to trackingActionsMap_"<<endl;
doRegisterAction(action, trackingActionsMap_);
}
void artg4tk::ActionHolderService::registerAction(SteppingActionBase * const action) {
cerr<< "registering to steppingActionsMap_"<<endl;
doRegisterAction(action, steppingActionsMap_);
}
void artg4tk::ActionHolderService::registerAction(StackingActionBase * const action) {
cerr<< "registering to stackingActionsMap_"<<endl;
doRegisterAction(action, stackingActionsMap_);
}
void artg4tk::ActionHolderService::registerAction(PrimaryGeneratorActionBase * const action) {
cerr<< "registering to primaryGeneratorActionsMap_"<<endl;
doRegisterAction(action, primaryGeneratorActionsMap_);
}
template <typename A>
A* artg4tk::ActionHolderService::doGetAction(std::string name, std::map<std::string, A*>& actionMap) {
// Make a typedef
typedef typename std::map<std::string, A*>::const_iterator map_const_iter;
// Find the action corresponding to the passed in name in the map
map_const_iter actionIter = actionMap.find(name);
if ( actionIter == actionMap.end() ) {
throw cet::exception("ActionHolderService") << "No action found with name "
<< name << ".\n";
}
return actionIter->second;
}
artg4tk::ActionBase* artg4tk::ActionHolderService::getAction(std::string name, RunActionBase* out) {
out = doGetAction(name, runActionsMap_);
return out;
}
artg4tk::ActionBase* artg4tk::ActionHolderService::getAction(std::string name, EventActionBase* out) {
out = doGetAction(name, eventActionsMap_);
return out;
}
artg4tk::ActionBase* artg4tk::ActionHolderService::getAction(std::string name, TrackingActionBase* out) {
out = doGetAction(name, trackingActionsMap_);
return out;
}
artg4tk::ActionBase* artg4tk::ActionHolderService::getAction(std::string name, SteppingActionBase* out) {
out = doGetAction(name, steppingActionsMap_);
return out;
}
artg4tk::ActionBase* artg4tk::ActionHolderService::getAction(std::string name, StackingActionBase* out) {
out = doGetAction(name, stackingActionsMap_);
return out;
}
artg4tk::ActionBase* artg4tk::ActionHolderService::getAction(std::string name, PrimaryGeneratorActionBase* out) {
out = doGetAction(name, primaryGeneratorActionsMap_);
return out;
}
// h3. Art-specific methods
void artg4tk::ActionHolderService::callArtProduces(art::EDProducer * prod)
{
// Loop over the "uber" activity map and call @callArtProduces@ on each
for ( auto entry : allActionsMap_) {
(entry.second)->callArtProduces(prod);
}
}
void artg4tk::ActionHolderService::initialize() {
for ( auto entry : allActionsMap_ ) {
(entry.second)->initialize();
}
}
void artg4tk::ActionHolderService::fillEventWithArtStuff()
{
// Loop over the "uber" activity map and call @fillEventWithArtStuff@ on each
for ( auto entry : allActionsMap_ ) {
(entry.second)->fillEventWithArtStuff(getCurrArtEvent());
}
}
void artg4tk::ActionHolderService::fillRunBeginWithArtStuff()
{
// Loop over the activities and call @fillRunBeginWithArtStuff@ on each
for ( auto entry : allActionsMap_ ) {
(entry.second)->fillRunBeginWithArtStuff(getCurrArtRun());
}
}
void artg4tk::ActionHolderService::fillRunEndWithArtStuff()
{
// Loop over the activities and call @fillRunEndWithArtStuff@ on each
for ( auto entry : allActionsMap_ ) {
(entry.second)->fillRunEndWithArtStuff(getCurrArtRun());
}
}
// h2. Action methods
// I tried to be good and use @std::for_each@ but it got really messy very
// quickly. Oh well.
// h3. Run action methods
void artg4tk::ActionHolderService::beginOfRunAction(const G4Run* theRun) {
// Loop over the runActionsMap and call @beginOfRunAction@ on each
for ( auto entry : runActionsMap_ ) {
(entry.second)->beginOfRunAction(theRun);
}
}
void artg4tk::ActionHolderService::endOfRunAction(const G4Run* theRun) {
// Loop over the runActionsMap and call @endOfRunAction@ on each
for ( auto entry : runActionsMap_ ) {
(entry.second)->endOfRunAction(theRun);
}
}
// h3. Event action methods
void artg4tk::ActionHolderService::beginOfEventAction(const G4Event* theEvent) {
for ( auto entry : eventActionsMap_ ) {
(entry.second)->beginOfEventAction(theEvent);
}
}
void artg4tk::ActionHolderService::endOfEventAction(const G4Event* theEvent) {
for ( auto entry : eventActionsMap_ ) {
(entry.second)->endOfEventAction(theEvent);
}
}
// h3. Tracking action methods
void artg4tk::ActionHolderService::preUserTrackingAction(const G4Track* theTrack) {
for ( auto entry : trackingActionsMap_ ) {
(entry.second)->preUserTrackingAction(theTrack);
}
}
void artg4tk::ActionHolderService::postUserTrackingAction(const G4Track* theTrack) {
for (auto entry : trackingActionsMap_ ) {
(entry.second)->postUserTrackingAction(theTrack);
}
}
// h3. Stepping actions
void artg4tk::ActionHolderService::userSteppingAction(const G4Step* theStep) {
for ( auto entry : steppingActionsMap_ ) {
(entry.second)->userSteppingAction(theStep);
}
}
// h3. Stacking actions
bool artg4tk::ActionHolderService::killNewTrack(const G4Track* newTrack) {
bool killTrack = false;
for (auto entry : stackingActionsMap_) {
if ( (entry.second)->killNewTrack(newTrack) ) {
killTrack = true;
break;
}
}
return killTrack;
}
// h3. Primary generator actions
void artg4tk::ActionHolderService::generatePrimaries(G4Event* theEvent) {
for ( auto entry : primaryGeneratorActionsMap_ ) {
(entry.second)->generatePrimaries(theEvent);
}
}
// Register the service with Art
using artg4tk::ActionHolderService;
DEFINE_ART_SERVICE(ActionHolderService)
| [
"yarba_j@fnal.gov"
] | yarba_j@fnal.gov |
2bc7b3b97d89f351b5f77c0de48a10b275bd2090 | bbda384ad8babc940bb0bd6a6326f3c026626abd | /optmethod.h | b7b34f67ea085e2d3e73864e98ad6021ba605a94 | [] | no_license | vulden/FuncOpt | 2e5ea96400cdf4c9a759fc53ebe68e27a2e8db69 | 238662d71107d0125cb609ad1300ab554e78c5e0 | refs/heads/main | 2023-08-06T05:38:56.519325 | 2021-09-03T16:53:51 | 2021-09-03T16:53:51 | 304,396,390 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,827 | h | #ifndef OPTMETHOD_H
#define OPTMETHOD_H
/*!
\file
\brief Заголовочный файл с описанием классов, относящихся к методам, с помощью которых будет искаться минимум.
*/
#include <random>
#include "funcOpt.h"
#include "area.h"
#include "stopCrit.h"
#pragma once
/*!
\brief Родительский виртуальный класс методов.
Метод позволяет находить аргумент минимума функции.
*/
class OptMethod {
public:
/*!
Ищет аргумент, на котором реализуется минимум функции на области.
\param[in] x Функция для которой ищется минимум.
\param[in] a Область, в которой ищется минимум.
\param[in] stop Критерий остановки процесса поиска минимума.
\param[in] start Точка, с которой начинается процесс поиска минимума.
\param[in] iternum Число итераций.
\return Вектор координат значения, на котором реализуется минимум.
*/
virtual std::vector<double> optimize(func * x, area * a, StopCriteria* stop, std::vector<double> start, int iternum) =0;
virtual void set_eps(double){}
virtual void set_p(double){}
virtual void set_delta(double){}
virtual void set_len_of_seg(double){}
/*!
Выводит в консоль название метода.
*/
virtual void name_youself()=0;
};
/*!
\brief Дочерний класс методов.
Реализует поиск минимума вероятностным методом.
Унаследован от ранее созданного класса OptMethod.
*/
class CoordDescent: public OptMethod {
public:
//! Вещественная переменная.
/*! Xранит длину отрезка. */
double len_of_seg;
//! Вещественная переменная.
/*! Xранит желаемую точность вычислений. */
double eps;
/*!
Устанавливает точность.
\param[in] x Точность.
*/
void set_eps(double t)override;
/*!
Устанавливает длину отрезка.
\param[in] x Длина отрезка.
*/
void set_len_of_seg(double t)override;
/*!
Ищет аргумент, на котором реализуется минимум функции на области.
\param[in] x Функция для которой ищется минимум.
\param[in] a Область, в которой ищется минимум.
\param[in] stop Критерий остановки процесса поиска минимума.
\param[in] start Точка, с которой начинается процесс поиска минимума.
\param[in] iternum Число итераций.
\param[in] len_of_seg Длина интервала, на который разбиваются исходные отрезки.
\param[in] eps Точность, с которой ищется минимум.
\return Вектор координат значения, на котором реализуется минимум.
*/
std::vector<double> optimize(func *f, area *a, StopCriteria* stop, std::vector<double>, int iternum)override;
/*!
Выводит в консоль название метода.
*/
void name_youself() override;
};
/*!
\brief Дочерний класс методов.
Реализует поиск минимума методом c спуска.
Унаследован от ранее созданного класса OptMethod.
*/
class Stochastic:public OptMethod {
public:
//! Вещественная переменная.
/*! Xранит вероятность выбора окрестности в качестве области.*/
double p;
//! Вещественная переменная.
/*! Xранит размер окрестности. */
double delta;
/*!
Устанавливает вероятность выбора окрестности в качестве области.
\param[in] x Вероятность.
*/
void set_p(double t)override;
/*!
Устанавливает размер окрестности.
\param[in] x Размер окрестности.
*/
void set_delta(double t)override;
/*!
Ищет аргумент, на котором реализуется минимум функции на области.
\param[in] x Функция для которой ищется минимум.
\param[in] a Область, в которой ищется минимум.
\param[in] stop Критерий остановки процесса поиска минимума.
\param[in] start Точка, с которой начинается процесс поиска минимума.
\param[in] iternum Число итераций.
\param[in] p Вероятность того, что поиск будет продолжен в окрестности предыдущей точки.
\param[in] delta Размер окрестности.
\return Вектор координат значения, на котором реализуется минимум.
*/
std::vector<double> optimize(func *f, area *a, StopCriteria* stop, std::vector<double>, int iternum)override;
/*!
Выводит в консоль название метода.
*/
void name_youself() override;
};
#endif // OPTMETHOD_H
| [
"popov99vlad@gmail.com"
] | popov99vlad@gmail.com |
eed71ce4bcf3aba9230cdfc7966b4ab150d92727 | be3167504c0e32d7708e7d13725c2dbc9232f2cb | /mame/src/mame/video/scn2674.h | 911abfe102390797ee44b8997a5c34368d7cc33f | [] | no_license | sysfce2/MAME-Plus-Plus-Kaillera | 83b52085dda65045d9f5e8a0b6f3977d75179e78 | 9692743849af5a808e217470abc46e813c9068a5 | refs/heads/master | 2023-08-10T06:12:47.451039 | 2016-08-01T09:44:21 | 2016-08-01T09:44:21 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,650 | h |
#define S674VERBOSE 0
#define LOG2674(x) do { if (S674VERBOSE) logerror x; } while (0)
typedef void (*s2574_interrupt_callback_func)(running_machine &machine);
static const UINT8 vsync_table[4] = {3,1,5,7}; //Video related
class scn2674_device : public device_t
{
public:
scn2674_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
static void set_irq_update_callback(device_t &device, s2574_interrupt_callback_func callback);
// int m_gfx_index;
DECLARE_READ16_MEMBER( mpu4_vid_scn2674_r );
DECLARE_WRITE16_MEMBER( mpu4_vid_scn2674_w );
UINT8 get_irq_state( void )
{
return m_scn2674_irq_state;
}
void scn2574_draw(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16* vid_mainram);
void scn2574_draw(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16* vid_mainram);
void init_stuff();
void scn2674_do_scanline(running_machine &machine, int scanline);
protected:
virtual void device_start();
virtual void device_reset();
s2574_interrupt_callback_func m_interrupt_callback;
UINT8 m_scn2674_IR_pointer;
UINT8 m_scn2674_screen1_l;
UINT8 m_scn2674_screen1_h;
UINT8 m_scn2674_cursor_l;
UINT8 m_scn2674_cursor_h;
UINT8 m_scn2674_screen2_l;
UINT8 m_scn2674_screen2_h;
UINT8 m_scn2674_irq_register;
UINT8 m_scn2674_status_register;
UINT8 m_scn2674_irq_mask;
UINT8 m_scn2674_gfx_enabled;
UINT8 m_scn2674_display_enabled;
UINT8 m_scn2674_display_enabled_field;
UINT8 m_scn2674_display_enabled_scanline;
UINT8 m_scn2674_cursor_enabled;
UINT8 m_IR0_scn2674_double_ht_wd;
UINT8 m_IR0_scn2674_scanline_per_char_row;
UINT8 m_IR0_scn2674_sync_select;
UINT8 m_IR0_scn2674_buffer_mode_select;
UINT8 m_IR1_scn2674_interlace_enable;
UINT8 m_IR1_scn2674_equalizing_constant;
UINT8 m_IR2_scn2674_row_table;
UINT8 m_IR2_scn2674_horz_sync_width;
UINT8 m_IR2_scn2674_horz_back_porch;
UINT8 m_IR3_scn2674_vert_front_porch;
UINT8 m_IR3_scn2674_vert_back_porch;
UINT8 m_IR4_scn2674_rows_per_screen;
UINT8 m_IR4_scn2674_character_blink_rate_divisor;
UINT8 m_IR5_scn2674_character_per_row;
UINT8 m_IR6_scn2674_cursor_first_scanline;
UINT8 m_IR6_scn2674_cursor_last_scanline;
UINT8 m_IR7_scn2674_cursor_underline_position;
UINT8 m_IR7_scn2674_cursor_rate_divisor;
UINT8 m_IR7_scn2674_cursor_blink;
UINT8 m_IR7_scn2674_vsync_width;
UINT8 m_IR8_scn2674_display_buffer_first_address_LSB;
UINT8 m_IR9_scn2674_display_buffer_first_address_MSB;
UINT8 m_IR9_scn2674_display_buffer_last_address;
UINT8 m_IR10_scn2674_display_pointer_address_lower;
UINT8 m_IR11_scn2674_display_pointer_address_upper;
UINT8 m_IR11_scn2674_reset_scanline_counter_on_scrollup;
UINT8 m_IR11_scn2674_reset_scanline_counter_on_scrolldown;
UINT8 m_IR12_scn2674_scroll_start;
UINT8 m_IR12_scn2674_split_register_1;
UINT8 m_IR13_scn2674_scroll_end;
UINT8 m_IR13_scn2674_split_register_2;
UINT8 m_IR14_scn2674_scroll_lines;
UINT8 m_IR14_scn2674_double_1;
UINT8 m_IR14_scn2674_double_2;
UINT8 m_scn2674_horz_front_porch;
UINT8 m_scn2674_spl1;
UINT8 m_scn2674_spl2;
UINT8 m_scn2674_dbl1;
int m_rowcounter;
int m_linecounter;
UINT8 m_scn2674_irq_state;
void scn2674_write_init_regs(UINT8 data);
void scn2674_write_command(running_machine &machine, UINT8 data);
void scn2674_line(running_machine &machine);
template<class _BitmapClass>
void scn2574_draw_common( running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, UINT16* vid_mainram );
private:
};
extern const device_type SCN2674_VIDEO;
| [
"mameppk@199a702f-54f1-4ac0-8451-560dfe28270b"
] | mameppk@199a702f-54f1-4ac0-8451-560dfe28270b |
f218202bbdd37300c3b2aa1eebb153a6b8cd8b1a | 5d01a2a16078b78fbb7380a6ee548fc87a80e333 | /ETS/EtsIvUpdate/DbInterfaceBo.cpp | 8e87f2de92adc3277e0406674601dce359284358 | [] | no_license | WilliamQf-AI/IVRMstandard | 2fd66ae6e81976d39705614cfab3dbfb4e8553c5 | 761bbdd0343012e7367ea111869bb6a9d8f043c0 | refs/heads/master | 2023-04-04T22:06:48.237586 | 2013-04-17T13:56:40 | 2013-04-17T13:56:40 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,990 | cpp | #include "StdAfx.h"
#include "dbinterfacebo.h"
#include ".\dbinterfacebo.h"
//**************************************************************************************************************//
// class CDbInterfaceBo
//**************************************************************************************************************//
#include "IVData.h"
CDbInterfaceBo* CDbInterfaceBo::m_pDbInterface(NULL);
_bstr_t CDbInterfaceBo::m_bsConnectionString("");
DWORD CDbInterfaceBo::m_nReconnectionAttempts(5);
DWORD CDbInterfaceBo::m_nReconnectionDelay(5000);
CDbInterfaceBo::CDbInterfaceBo(void)
{
}
CDbInterfaceBo::~CDbInterfaceBo(void)
{
}
void CDbInterfaceBo::GetInstance(CDbInterfaceBo** ppDbInterface)
{
if ( m_pDbInterface)
m_pDbInterface = new CDbInterfaceBo();
*ppDbInterface = m_pDbInterface;
}
//--------------------------------------------------------------------------------------------------------------//
void CDbInterfaceBo::SetConnectionString(const std::string& rsConnectionString)
{
m_bsConnectionString = rsConnectionString.c_str();
}
//--------------------------------------------------------------------------------------------------------------//
void CDbInterfaceBo::SetReconnectionAttempts(DWORD nReconnectionAttempts)
{
m_nReconnectionAttempts = nReconnectionAttempts;
}
//--------------------------------------------------------------------------------------------------------------//
void CDbInterfaceBo::SetReconnectionDelay(DWORD nReconnectionDelay)
{
m_nReconnectionDelay = nReconnectionDelay;
}
//--------------------------------------------------------------------------------------------------------------//
EgLib::CDBConnection& CDbInterfaceBo::GetConnection()
{
return m_Connection;
}
//--------------------------------------------------------------------------------------------------------------//
void CDbInterfaceBo::Connect()
{
try
{
m_Connection.Open(m_bsConnectionString, m_nReconnectionDelay, m_nReconnectionAttempts, 30, 120);
}
catch ( _com_error _e)
{
g_Logs.TraceToFile ( LogFaults , "Can't connect to DB %s" , (LPCTSTR)_e.Description() ) ;
throw _e ;
}
}
//--------------------------------------------------------------------------------------------------------------//
void CDbInterfaceBo::Disconnect()
{
m_Connection.Close();
}
DWORD CDbInterfaceBo::BeginOfDay(void)
{
DWORD dwResult = S_OK ;
_bstr_t sUsp(_T("usp_DatabaseCleanUp"));
try
{
EgLib::CStoredProc<> spCleanUp(m_Connection, sUsp);
spCleanUp.Execute () ;
}
catch (const _com_error& re)
{
//OMLIB_TRACE_EX(re.Error(), ERROR_OM_DB_STOREDPROC, (LPCTSTR)sUsp, re.Description().length()?(LPCTSTR)re.Description():re.ErrorMessage());
//AfxMessageBox(_T("Error checking DB Version."), MB_ICONERROR);
dwResult = re.Error();
}
return dwResult;
}
bool CDbInterfaceBo::SaveIVStockData(const CIVStockData& _IVData)
{
DWORD dwResult = S_OK ;
_bstr_t sUsp(_T("usp_InputStockData"));
try
{
EgLib::CStoredProc<> spSave (m_Connection, sUsp);
spSave << _IVData.m_lStockId
<< _IVData.m_dBidPrice
<< _IVData.m_dAskPrice
<< 0
<< _IVData.m_lAskSize
<< _IVData.m_dtBidTime
<< _IVData.m_dtAsktime
<< _IVData.m_cBidEx
<< _IVData.m_cAskEx
<< _IVData.m_lVolume ;
spSave.Execute () ;
}
catch (const _com_error& re)
{
//OMLIB_TRACE_EX(re.Error(), ERROR_OM_DB_STOREDPROC, (LPCTSTR)sUsp, re.Description().length()?(LPCTSTR)re.Description():re.ErrorMessage());
//AfxMessageBox(_T("Error checking DB Version."), MB_ICONERROR);
dwResult = re.Error();
g_Logs.TraceToFile ( LogFaults , "DB Error: %s" , re.Description().length()?(LPCTSTR)re.Description():(LPCTSTR)re.ErrorMessage() );
}
return dwResult == S_OK;
}
bool CDbInterfaceBo::SaveIVOptionData ( const CIVOptionData& _IVData )
{
DWORD dwResult = S_OK ;
_bstr_t sUsp(_T("usp_InputOptionData"));
try
{
EgLib::CStoredProc<> spSave (m_Connection, sUsp);
spSave << _IVData.m_lOptionID
<< _IVData.m_lUnderlyingID
<< _IVData.m_dModelIV
<< _IVData.m_dIV
<< _IVData.m_dDelta
<< _IVData.m_dGamma
<< _IVData.m_dVega
<< _IVData.m_dThetta
<< _IVData.m_dRho
<< _IVData.m_dBidPrice
<< _IVData.m_dAskPrice
<< _IVData.m_lBidSize
<< _IVData.m_lAskSize
<< _IVData.m_dtBidTime
<< _IVData.m_dtAskTime
<< _IVData.m_cBidExchange
<< _IVData.m_cAskExchange
<< _IVData.m_lVolume ;
spSave.Execute () ;
}
catch (const _com_error& re)
{
//OMLIB_TRACE_EX(re.Error(), ERROR_OM_DB_STOREDPROC, (LPCTSTR)sUsp, re.Description().length()?(LPCTSTR)re.Description():re.ErrorMessage());
//AfxMessageBox(_T("Error checking DB Version."), MB_ICONERROR);
dwResult = re.Error();
g_Logs.TraceToFile ( LogFaults , "DB Error: %s" , re.Description().length()?(LPCTSTR)re.Description():(LPCTSTR)re.ErrorMessage() );
}
return dwResult == S_OK;
}
| [
"chuchev@egartech.com"
] | chuchev@egartech.com |
7e7602096b17ce444442053a7560058b8a71dbfa | 1c444bdf16632d78a3801a7fe6b35c054c4cddde | /include/bds/bedrock/block/unmapped/BlockIntersectionConstraint.h | da4e84b3ea537fe992003b383697371b5f0a56cf | [] | no_license | maksym-pasichnyk/symbols | 962a082bf6a692563402c87eb25e268e7e712c25 | 7673aa52391ce93540f0e65081f16cd11c2aa606 | refs/heads/master | 2022-04-11T03:17:18.078103 | 2020-03-15T11:30:36 | 2020-03-15T11:30:36 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 583 | h | #pragma once
#include "../../../unmapped/IStructureConstraint.h"
class BlockIntersectionConstraint : public IStructureConstraint {
public:
~BlockIntersectionConstraint(); // _ZN27BlockIntersectionConstraintD2Ev
// virtual bool isSatisfied(IBlockPlacementTarget const&, BlockPos const&, Rotation const&)const; //TODO: incomplete function definition // _ZNK27BlockIntersectionConstraint11isSatisfiedERK21IBlockPlacementTargetRK8BlockPosRK8Rotation
BlockIntersectionConstraint(LegacyStructureTemplate &); // _ZN27BlockIntersectionConstraintC2ER23LegacyStructureTemplate
};
| [
"honzaxp01@gmail.com"
] | honzaxp01@gmail.com |
6bc09ffb45698262418be304d7249dd20d2d80d9 | f2d583420ecaf2cdfb5e30b3735063b5eefab49f | /demo8_6.cpp | d70fd0798c59ede04e660b6d21738dc93ef1ec33 | [] | no_license | 7er/T3DCHAP08 | 1e58eebe44d782a4e26a3b52ac501acdc14fdcaf | b9edda9a44473587bc803da2ea2785ad6ee47d2c | refs/heads/master | 2021-01-25T05:11:05.383498 | 2012-04-23T00:52:23 | 2012-04-23T00:52:23 | 3,539,908 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 34,744 | cpp | // DEMO8_6.CPP 8-bit polygon transformation demo with matrices
// INCLUDES ///////////////////////////////////////////////
#define WIN32_LEAN_AND_MEAN // just say no to MFC
#define INITGUID
#include <windows.h> // include important windows stuff
#include <windowsx.h>
#include <mmsystem.h>
//#include <iostream.h> // include important C/C++ stuff
#include <conio.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
#include <math.h>
#include <io.h>
#include <fcntl.h>
#include <ddraw.h> // include directdraw
// DEFINES ////////////////////////////////////////////////
// defines for windows
#define WINDOW_CLASS_NAME "WINCLASS1"
// default screen size
#define SCREEN_WIDTH 640 // size of screen
#define SCREEN_HEIGHT 480
#define SCREEN_BPP 8 // bits per pixel
#define BITMAP_ID 0x4D42 // universal id for a bitmap
#define MAX_COLORS_PALETTE 256
const double PI = 3.1415926535;
// TYPES //////////////////////////////////////////////////////
// basic unsigned types
typedef unsigned short USHORT;
typedef unsigned short WORD;
typedef unsigned char UCHAR;
typedef unsigned char BYTE;
// a 2D vertex
typedef struct VERTEX2DI_TYP
{
int x,y; // the vertex
} VERTEX2DI, *VERTEX2DI_PTR;
// a 2D vertex
typedef struct VERTEX2DF_TYP
{
float x,y; // the vertex
} VERTEX2DF, *VERTEX2DF_PTR;
// a 2D polygon
typedef struct POLYGON2D_TYP
{
int state; // state of polygon
int num_verts; // number of vertices
int x0,y0; // position of center of polygon
int xv,yv; // initial velocity
DWORD color; // could be index or PALETTENTRY
VERTEX2DF *vlist; // pointer to vertex list
} POLYGON2D, *POLYGON2D_PTR;
// matrices
typedef struct MATRIX1X2_TYP
{
float M[2]; // data storage
} MATRIX1X2, *MATRIX1X2_PTR;
// note that 1x2 has the same memory layout as a VERTEX2DF, hence we
// can use the matrix function written for a MATRIX1X2 to multiply a
// VERTEX2DF by casting
typedef struct MATRIX3X2_TYP
{
float M[3][2]; // data storage
} MATRIX3X2, *MATRIX3X2_PTR;
// PROTOTYPES //////////////////////////////////////////////
int Draw_Text_GDI(char *text, int x,int y,int color, LPDIRECTDRAWSURFACE7 lpdds);
int DDraw_Fill_Surface(LPDIRECTDRAWSURFACE7 lpdds,int color);
int Draw_Line(int x0, int y0, int x1, int y1, UCHAR color, UCHAR *vb_start, int lpitch);
int Draw_Clip_Line(int x0,int y0, int x1, int y1,UCHAR color,
UCHAR *dest_buffer, int lpitch);
int Clip_Line(int &x1,int &y1,int &x2, int &y2);
int Draw_Polygon2D(POLYGON2D_PTR poly, UCHAR *vbuffer, int lpitch);
int Translate_Polygon2D(POLYGON2D_PTR poly, int dx, int dy);
int Rotate_Polygon2D(POLYGON2D_PTR poly, int theta);
int Scale_Polygon2D(POLYGON2D_PTR poly, float sx, float sy);
int Translate_Polygon2D_Mat(POLYGON2D_PTR poly, int dx, int dy);
int Rotate_Polygon2D_Mat(POLYGON2D_PTR poly, int theta);
int Scale_Polygon2D_Mat(POLYGON2D_PTR poly, float sx, float sy);
int Mat_Mul1X2_3X2(MATRIX1X2_PTR ma,
MATRIX3X2_PTR mb,
MATRIX1X2_PTR mprod);
inline int Mat_Init_3X2(MATRIX3X2_PTR ma,
float m00, float m01,
float m10, float m11,
float m20, float m21);
// MACROS /////////////////////////////////////////////////
// tests if a key is up or down
#define KEYDOWN(vk_code) ((GetAsyncKeyState(vk_code) & 0x8000) ? 1 : 0)
#define KEYUP(vk_code) ((GetAsyncKeyState(vk_code) & 0x8000) ? 0 : 1)
// initializes a direct draw struct
#define DDRAW_INIT_STRUCT(ddstruct) { memset(&ddstruct,0,sizeof(ddstruct)); ddstruct.dwSize=sizeof(ddstruct); }
// some math macros
#define DEG_TO_RAD(ang) ((ang)*PI/180)
#define RAD_TO_DEG(rads) ((rads)*180/PI)
// GLOBALS ////////////////////////////////////////////////
HWND main_window_handle = NULL; // globally track main window
int window_closed = 0; // tracks if window is closed
HINSTANCE hinstance_app = NULL; // globally track hinstance
// directdraw stuff
LPDIRECTDRAW7 lpdd = NULL; // dd4 object
LPDIRECTDRAWSURFACE7 lpddsprimary = NULL; // dd primary surface
LPDIRECTDRAWSURFACE7 lpddsback = NULL; // dd back surface
LPDIRECTDRAWPALETTE lpddpal = NULL; // a pointer to the created dd palette
LPDIRECTDRAWCLIPPER lpddclipper = NULL; // dd clipper
PALETTEENTRY palette[256]; // color palette
PALETTEENTRY save_palette[256]; // used to save palettes
DDSURFACEDESC2 ddsd; // a direct draw surface description struct
DDBLTFX ddbltfx; // used to fill
DDSCAPS2 ddscaps; // a direct draw surface capabilities struct
HRESULT ddrval; // result back from dd calls
DWORD start_clock_count = 0; // used for timing
// global clipping region
int min_clip_x = 0, // clipping rectangle
max_clip_x = SCREEN_WIDTH - 1,
min_clip_y = 0,
max_clip_y = SCREEN_HEIGHT - 1;
char buffer[80]; // general printing buffer
// storage for our lookup tables
float cos_look[360];
float sin_look[360];
POLYGON2D ship; // the ship
// FUNCTIONS ////////////////////////////////////////////////
inline int Mat_Init_3X2(MATRIX3X2_PTR ma,
float m00, float m01,
float m10, float m11,
float m20, float m21)
{
// this function fills a 3x2 matrix with the sent data in row major form
ma->M[0][0] = m00; ma->M[0][1] = m01;
ma->M[1][0] = m10; ma->M[1][1] = m11;
ma->M[2][0] = m20; ma->M[2][1] = m21;
// return success
return(1);
} // end Mat_Init_3X2
/////////////////////////////////////////////////////////////////
int Mat_Mul1X2_3X2(MATRIX1X2_PTR ma,
MATRIX3X2_PTR mb,
MATRIX1X2_PTR mprod)
{
// this function multiplies a 1x2 matrix against a
// 3x2 matrix - ma*mb and stores the result
// using a dummy element for the 3rd element of the 1x2
// to make the matrix multiply valid i.e. 1x3 X 3x2
for (int col=0; col<2; col++)
{
// compute dot product from row of ma
// and column of mb
float sum = 0; // used to hold result
int index;
for (index=0; index<2; index++)
{
// add in next product pair
sum+=(ma->M[index]*mb->M[index][col]);
} // end for index
// add in last element * 1
sum+= mb->M[index][col];
// insert resulting col element
mprod->M[col] = sum;
} // end for col
return(1);
} // end Mat_Mul_1X2_3X2
///////////////////////////////////////////////////////////////////////
int Draw_Polygon2D(POLYGON2D_PTR poly, UCHAR *vbuffer, int lpitch)
{
// this function draws a POLYGON2D based on
// test if the polygon is visible
if (poly->state)
{
// loop thru and draw a line from vertices 1 to n
int index;
for (index=0; index < poly->num_verts-1; index++)
{
// draw line from ith to ith+1 vertex
Draw_Clip_Line(poly->vlist[index].x+poly->x0,
poly->vlist[index].y+poly->y0,
poly->vlist[index+1].x+poly->x0,
poly->vlist[index+1].y+poly->y0,
poly->color,
vbuffer, lpitch);
} // end for
// now close up polygon
// draw line from last vertex to 0th
Draw_Clip_Line(poly->vlist[0].x+poly->x0,
poly->vlist[0].y+poly->y0,
poly->vlist[index].x+poly->x0,
poly->vlist[index].y+poly->y0,
poly->color,
vbuffer, lpitch);
// return success
return(1);
} // end if
else
return(0);
} // end Draw_Polygon2D
///////////////////////////////////////////////////////////////
// the following 3 functions are the standard transforms (no matrices)
int Translate_Polygon2D(POLYGON2D_PTR poly, int dx, int dy)
{
// this function translates the center of a polygon
// test for valid pointer
if (!poly)
return(0);
// translate
poly->x0+=dx;
poly->y0+=dy;
// return success
return(1);
} // end Translate_Polygon2D
///////////////////////////////////////////////////////////////
int Rotate_Polygon2D(POLYGON2D_PTR poly, int theta)
{
// this function rotates the local coordinates of the polygon
// test for valid pointer
if (!poly)
return(0);
// test for negative rotation angle
if (theta < 0)
theta+=360;
// loop and rotate each point, very crude, no lookup!!!
for (int curr_vert = 0; curr_vert < poly->num_verts; curr_vert++)
{
// perform rotation
float xr = (float)poly->vlist[curr_vert].x*cos_look[theta] -
(float)poly->vlist[curr_vert].y*sin_look[theta];
float yr = (float)poly->vlist[curr_vert].x*sin_look[theta] +
(float)poly->vlist[curr_vert].y*cos_look[theta];
// store result back
poly->vlist[curr_vert].x = xr;
poly->vlist[curr_vert].y = yr;
} // end for curr_vert
// return success
return(1);
} // end Rotate_Polygon2D
////////////////////////////////////////////////////////
int Scale_Polygon2D(POLYGON2D_PTR poly, float sx, float sy)
{
// this function scalesthe local coordinates of the polygon
// test for valid pointer
if (!poly)
return(0);
// loop and scale each point
for (int curr_vert = 0; curr_vert < poly->num_verts; curr_vert++)
{
// scale and store result back
poly->vlist[curr_vert].x *= sx;
poly->vlist[curr_vert].y *= sy;
} // end for curr_vert
// return success
return(1);
} // end Scale_Polygon2D
///////////////////////////////////////////////////////////////////////
// these are the matrix versions, note they are more inefficient for
// single transforms, but their power comes into play when you concatenate
// multiple transformations, not to mention that all transforms are accomplished
// with the same code, just the matrix differs
int Translate_Polygon2D_Mat(POLYGON2D_PTR poly, int dx, int dy)
{
// this function translates the center of a polygon by using a matrix multiply
// on the the center point, this is incredibly inefficient, but for educational purposes
// if we had an object that wasn't in local coordinates then it would make more sense to
// use a matrix, but since the origin of the object is at x0,y0 then 2 lines of code can
// translate, but lets do it the hard way just to see :)
// test for valid pointer
if (!poly)
return(0);
MATRIX3X2 mt; // used to hold translation transform matrix
// initialize the matrix with translation values dx dy
Mat_Init_3X2(&mt,1,0, 0,1, dx, dy);
// create a 1x2 matrix to do the transform
MATRIX1X2 p0 = {poly->x0, poly->y0};
MATRIX1X2 p1 = {0,0}; // this will hold result
// now translate via a matrix multiply
Mat_Mul1X2_3X2(&p0, &mt, &p1);
// now copy the result back into polygon
poly->x0 = p1.M[0];
poly->y0 = p1.M[1];
// return success
return(1);
} // end Translate_Polygon2D_Mat
///////////////////////////////////////////////////////////////
int Rotate_Polygon2D_Mat(POLYGON2D_PTR poly, int theta)
{
// this function rotates the local coordinates of the polygon
// test for valid pointer
if (!poly)
return(0);
// test for negative rotation angle
if (theta < 0)
theta+=360;
MATRIX3X2 mr; // used to hold rotation transform matrix
// initialize the matrix with translation values dx dy
Mat_Init_3X2(&mr,cos_look[theta],sin_look[theta],
-sin_look[theta],cos_look[theta],
0, 0);
// loop and rotate each point, very crude, no lookup!!!
for (int curr_vert = 0; curr_vert < poly->num_verts; curr_vert++)
{
// create a 1x2 matrix to do the transform
MATRIX1X2 p0 = {poly->vlist[curr_vert].x, poly->vlist[curr_vert].y};
MATRIX1X2 p1 = {0,0}; // this will hold result
// now rotate via a matrix multiply
Mat_Mul1X2_3X2(&p0, &mr, &p1);
// now copy the result back into vertex
poly->vlist[curr_vert].x = p1.M[0];
poly->vlist[curr_vert].y = p1.M[1];
} // end for curr_vert
// return success
return(1);
} // end Rotate_Polygon2D_Mat
////////////////////////////////////////////////////////
int Scale_Polygon2D_Mat(POLYGON2D_PTR poly, float sx, float sy)
{
// this function scalesthe local coordinates of the polygon
// test for valid pointer
if (!poly)
return(0);
MATRIX3X2 ms; // used to hold scaling transform matrix
// initialize the matrix with translation values dx dy
Mat_Init_3X2(&ms,sx,0,
0,sy,
0, 0);
// loop and scale each point
for (int curr_vert = 0; curr_vert < poly->num_verts; curr_vert++)
{
// scale and store result back
// create a 1x2 matrix to do the transform
MATRIX1X2 p0 = {poly->vlist[curr_vert].x, poly->vlist[curr_vert].y};
MATRIX1X2 p1 = {0,0}; // this will hold result
// now scale via a matrix multiply
Mat_Mul1X2_3X2(&p0, &ms, &p1);
// now copy the result back into vertex
poly->vlist[curr_vert].x = p1.M[0];
poly->vlist[curr_vert].y = p1.M[1];
} // end for curr_vert
// return success
return(1);
} // end Scale_Polygon2D_Mat
///////////////////////////////////////////////////////////
inline int Draw_Pixel(int x, int y,int color,
UCHAR *video_buffer, int lpitch)
{
// this function plots a single pixel at x,y with color
video_buffer[x + y*lpitch] = color;
// return success
return(1);
} // end Draw_Pixel
/////////////////////////////////////////////////////////////
int Draw_Text_GDI(char *text, int x,int y,int color, LPDIRECTDRAWSURFACE7 lpdds)
{
// this function draws the sent text on the sent surface
// using color index as the color in the palette
HDC xdc; // the working dc
// get the dc from surface
if (FAILED(lpdds->GetDC(&xdc)))
return(0);
// set the colors for the text up
SetTextColor(xdc,RGB(palette[color].peRed,palette[color].peGreen,palette[color].peBlue) );
// set background mode to transparent so black isn't copied
SetBkMode(xdc, TRANSPARENT);
// draw the text a
TextOut(xdc,x,y,text,strlen(text));
// release the dc
lpdds->ReleaseDC(xdc);
// return success
return(1);
} // end Draw_Text_GDI
///////////////////////////////////////////////////////////////////
int DDraw_Fill_Surface(LPDIRECTDRAWSURFACE7 lpdds,int color)
{
DDBLTFX ddbltfx; // this contains the DDBLTFX structure
// clear out the structure and set the size field
DDRAW_INIT_STRUCT(ddbltfx);
// set the dwfillcolor field to the desired color
ddbltfx.dwFillColor = color;
// ready to blt to surface
lpdds->Blt(NULL, // ptr to dest rectangle
NULL, // ptr to source surface, NA
NULL, // ptr to source rectangle, NA
DDBLT_COLORFILL | DDBLT_WAIT, // fill and wait
&ddbltfx); // ptr to DDBLTFX structure
// return success
return(1);
} // end DDraw_Fill_Surface
///////////////////////////////////////////////////////////////
int Draw_Clip_Line(int x0,int y0, int x1, int y1,UCHAR color,
UCHAR *dest_buffer, int lpitch)
{
// this helper function draws a clipped line
int cxs, cys,
cxe, cye;
// clip and draw each line
cxs = x0;
cys = y0;
cxe = x1;
cye = y1;
// clip the line
if (Clip_Line(cxs,cys,cxe,cye))
Draw_Line(cxs, cys, cxe,cye,color,dest_buffer,lpitch);
// return success
return(1);
} // end Draw_Clip_Line
///////////////////////////////////////////////////////////
int Clip_Line(int &x1,int &y1,int &x2, int &y2)
{
// this function clips the sent line using the globally defined clipping
// region
// internal clipping codes
#define CLIP_CODE_C 0x0000
#define CLIP_CODE_N 0x0008
#define CLIP_CODE_S 0x0004
#define CLIP_CODE_E 0x0002
#define CLIP_CODE_W 0x0001
#define CLIP_CODE_NE 0x000a
#define CLIP_CODE_SE 0x0006
#define CLIP_CODE_NW 0x0009
#define CLIP_CODE_SW 0x0005
int xc1=x1,
yc1=y1,
xc2=x2,
yc2=y2;
int p1_code=0,
p2_code=0;
// determine codes for p1 and p2
if (y1 < min_clip_y)
p1_code|=CLIP_CODE_N;
else
if (y1 > max_clip_y)
p1_code|=CLIP_CODE_S;
if (x1 < min_clip_x)
p1_code|=CLIP_CODE_W;
else
if (x1 > max_clip_x)
p1_code|=CLIP_CODE_E;
if (y2 < min_clip_y)
p2_code|=CLIP_CODE_N;
else
if (y2 > max_clip_y)
p2_code|=CLIP_CODE_S;
if (x2 < min_clip_x)
p2_code|=CLIP_CODE_W;
else
if (x2 > max_clip_x)
p2_code|=CLIP_CODE_E;
// try and trivially reject
if ((p1_code & p2_code))
return(0);
// test for totally visible, if so leave points untouched
if (p1_code==0 && p2_code==0)
return(1);
// determine end clip point for p1
switch(p1_code)
{
case CLIP_CODE_C: break;
case CLIP_CODE_N:
{
yc1 = min_clip_y;
xc1 = x1 + 0.5+(min_clip_y-y1)*(x2-x1)/(y2-y1);
} break;
case CLIP_CODE_S:
{
yc1 = max_clip_y;
xc1 = x1 + 0.5+(max_clip_y-y1)*(x2-x1)/(y2-y1);
} break;
case CLIP_CODE_W:
{
xc1 = min_clip_x;
yc1 = y1 + 0.5+(min_clip_x-x1)*(y2-y1)/(x2-x1);
} break;
case CLIP_CODE_E:
{
xc1 = max_clip_x;
yc1 = y1 + 0.5+(max_clip_x-x1)*(y2-y1)/(x2-x1);
} break;
// these cases are more complex, must compute 2 intersections
case CLIP_CODE_NE:
{
// north hline intersection
yc1 = min_clip_y;
xc1 = x1 + 0.5+(min_clip_y-y1)*(x2-x1)/(y2-y1);
// test if intersection is valid, of so then done, else compute next
if (xc1 < min_clip_x || xc1 > max_clip_x)
{
// east vline intersection
xc1 = max_clip_x;
yc1 = y1 + 0.5+(max_clip_x-x1)*(y2-y1)/(x2-x1);
} // end if
} break;
case CLIP_CODE_SE:
{
// south hline intersection
yc1 = max_clip_y;
xc1 = x1 + 0.5+(max_clip_y-y1)*(x2-x1)/(y2-y1);
// test if intersection is valid, of so then done, else compute next
if (xc1 < min_clip_x || xc1 > max_clip_x)
{
// east vline intersection
xc1 = max_clip_x;
yc1 = y1 + 0.5+(max_clip_x-x1)*(y2-y1)/(x2-x1);
} // end if
} break;
case CLIP_CODE_NW:
{
// north hline intersection
yc1 = min_clip_y;
xc1 = x1 + 0.5+(min_clip_y-y1)*(x2-x1)/(y2-y1);
// test if intersection is valid, of so then done, else compute next
if (xc1 < min_clip_x || xc1 > max_clip_x)
{
xc1 = min_clip_x;
yc1 = y1 + 0.5+(min_clip_x-x1)*(y2-y1)/(x2-x1);
} // end if
} break;
case CLIP_CODE_SW:
{
// south hline intersection
yc1 = max_clip_y;
xc1 = x1 + 0.5+(max_clip_y-y1)*(x2-x1)/(y2-y1);
// test if intersection is valid, of so then done, else compute next
if (xc1 < min_clip_x || xc1 > max_clip_x)
{
xc1 = min_clip_x;
yc1 = y1 + 0.5+(min_clip_x-x1)*(y2-y1)/(x2-x1);
} // end if
} break;
default:break;
} // end switch
// determine clip point for p2
switch(p2_code)
{
case CLIP_CODE_C: break;
case CLIP_CODE_N:
{
yc2 = min_clip_y;
xc2 = x2 + (min_clip_y-y2)*(x1-x2)/(y1-y2);
} break;
case CLIP_CODE_S:
{
yc2 = max_clip_y;
xc2 = x2 + (max_clip_y-y2)*(x1-x2)/(y1-y2);
} break;
case CLIP_CODE_W:
{
xc2 = min_clip_x;
yc2 = y2 + (min_clip_x-x2)*(y1-y2)/(x1-x2);
} break;
case CLIP_CODE_E:
{
xc2 = max_clip_x;
yc2 = y2 + (max_clip_x-x2)*(y1-y2)/(x1-x2);
} break;
// these cases are more complex, must compute 2 intersections
case CLIP_CODE_NE:
{
// north hline intersection
yc2 = min_clip_y;
xc2 = x2 + 0.5+(min_clip_y-y2)*(x1-x2)/(y1-y2);
// test if intersection is valid, of so then done, else compute next
if (xc2 < min_clip_x || xc2 > max_clip_x)
{
// east vline intersection
xc2 = max_clip_x;
yc2 = y2 + 0.5+(max_clip_x-x2)*(y1-y2)/(x1-x2);
} // end if
} break;
case CLIP_CODE_SE:
{
// south hline intersection
yc2 = max_clip_y;
xc2 = x2 + 0.5+(max_clip_y-y2)*(x1-x2)/(y1-y2);
// test if intersection is valid, of so then done, else compute next
if (xc2 < min_clip_x || xc2 > max_clip_x)
{
// east vline intersection
xc2 = max_clip_x;
yc2 = y2 + 0.5+(max_clip_x-x2)*(y1-y2)/(x1-x2);
} // end if
} break;
case CLIP_CODE_NW:
{
// north hline intersection
yc2 = min_clip_y;
xc2 = x2 + 0.5+(min_clip_y-y2)*(x1-x2)/(y1-y2);
// test if intersection is valid, of so then done, else compute next
if (xc2 < min_clip_x || xc2 > max_clip_x)
{
xc2 = min_clip_x;
yc2 = y2 + 0.5+(min_clip_x-x2)*(y1-y2)/(x1-x2);
} // end if
} break;
case CLIP_CODE_SW:
{
// south hline intersection
yc2 = max_clip_y;
xc2 = x2 + 0.5+(max_clip_y-y2)*(x1-x2)/(y1-y2);
// test if intersection is valid, of so then done, else compute next
if (xc2 < min_clip_x || xc2 > max_clip_x)
{
xc2 = min_clip_x;
yc2 = y2 + 0.5+(min_clip_x-x2)*(y1-y2)/(x1-x2);
} // end if
} break;
default:break;
} // end switch
// do bounds check
if ((xc1 < min_clip_x) || (xc1 > max_clip_x) ||
(yc1 < min_clip_y) || (yc1 > max_clip_y) ||
(xc2 < min_clip_x) || (xc2 > max_clip_x) ||
(yc2 < min_clip_y) || (yc2 > max_clip_y) )
{
return(0);
} // end if
// store vars back
x1 = xc1;
y1 = yc1;
x2 = xc2;
y2 = yc2;
return(1);
} // end Clip_Line
/////////////////////////////////////////////////////////////
int Draw_Line(int x0, int y0, // starting position
int x1, int y1, // ending position
UCHAR color, // color index
UCHAR *vb_start, int lpitch) // video buffer and memory pitch
{
// this function draws a line from xo,yo to x1,y1 using differential error
// terms (based on Bresenahams work)
int dx, // difference in x's
dy, // difference in y's
dx2, // dx,dy * 2
dy2,
x_inc, // amount in pixel space to move during drawing
y_inc, // amount in pixel space to move during drawing
error, // the discriminant i.e. error i.e. decision variable
index; // used for looping
// pre-compute first pixel address in video buffer
vb_start = vb_start + x0 + y0*lpitch;
// compute horizontal and vertical deltas
dx = x1-x0;
dy = y1-y0;
// test which direction the line is going in i.e. slope angle
if (dx>=0)
{
x_inc = 1;
} // end if line is moving right
else
{
x_inc = -1;
dx = -dx; // need absolute value
} // end else moving left
// test y component of slope
if (dy>=0)
{
y_inc = lpitch;
} // end if line is moving down
else
{
y_inc = -lpitch;
dy = -dy; // need absolute value
} // end else moving up
// compute (dx,dy) * 2
dx2 = dx << 1;
dy2 = dy << 1;
// now based on which delta is greater we can draw the line
if (dx > dy)
{
// initialize error term
error = dy2 - dx;
// draw the line
for (index=0; index <= dx; index++)
{
// set the pixel
*vb_start = color;
// test if error has overflowed
if (error >= 0)
{
error-=dx2;
// move to next line
vb_start+=y_inc;
} // end if error overflowed
// adjust the error term
error+=dy2;
// move to the next pixel
vb_start+=x_inc;
} // end for
} // end if |slope| <= 1
else
{
// initialize error term
error = dx2 - dy;
// draw the line
for (index=0; index <= dy; index++)
{
// set the pixel
*vb_start = color;
// test if error overflowed
if (error >= 0)
{
error-=dy2;
// move to next line
vb_start+=x_inc;
} // end if error overflowed
// adjust the error term
error+=dx2;
// move to the next pixel
vb_start+=y_inc;
} // end for
} // end else |slope| > 1
// return success
return(1);
} // end Draw_Line
///////////////////////////////////////////////////////////////
LRESULT CALLBACK WindowProc(HWND hwnd,
UINT msg,
WPARAM wparam,
LPARAM lparam)
{
// this is the main message handler of the system
PAINTSTRUCT ps; // used in WM_PAINT
HDC hdc; // handle to a device context
char buffer[80]; // used to print strings
// what is the message
switch(msg)
{
case WM_CREATE:
{
// do initialization stuff here
// return success
return(0);
} break;
case WM_PAINT:
{
// simply validate the window
hdc = BeginPaint(hwnd,&ps);
// end painting
EndPaint(hwnd,&ps);
// return success
return(0);
} break;
case WM_DESTROY:
{
// kill the application, this sends a WM_QUIT message
PostQuitMessage(0);
// return success
return(0);
} break;
default:break;
} // end switch
// process any messages that we didn't take care of
return (DefWindowProc(hwnd, msg, wparam, lparam));
} // end WinProc
///////////////////////////////////////////////////////////
int Game_Main(void *parms = NULL, int num_parms = 0)
{
// this is the main loop of the game, do all your processing
// here
// make sure this isn't executed again
if (window_closed)
return(0);
// for now test if user is hitting ESC and send WM_CLOSE
if (KEYDOWN(VK_ESCAPE))
{
PostMessage(main_window_handle,WM_CLOSE,0,0);
window_closed = 1;
} // end if
// clear out the back buffer
DDraw_Fill_Surface(lpddsback, 0);
// lock primary buffer
DDRAW_INIT_STRUCT(ddsd);
if (FAILED(lpddsback->Lock(NULL,&ddsd,
DDLOCK_WAIT | DDLOCK_SURFACEMEMORYPTR,
NULL)))
return(0);
// do the graphics
Draw_Polygon2D(&ship, (UCHAR *)ddsd.lpSurface, ddsd.lPitch);
// test for scale
if (KEYDOWN('A')) // scale up
Scale_Polygon2D_Mat(&ship, 1.1, 1.1);
else
if (KEYDOWN('S')) // scale down
Scale_Polygon2D_Mat(&ship, 0.9, 0.9);
// test for rotate
if (KEYDOWN('Z')) // rotate left
Rotate_Polygon2D_Mat(&ship, -5);
else
if (KEYDOWN('X')) // rotate right
Rotate_Polygon2D_Mat(&ship, 5);
// test for translate
if (KEYDOWN(VK_RIGHT)) // translate right
Translate_Polygon2D_Mat(&ship, 5, 0);
else
if (KEYDOWN(VK_LEFT)) // translate left
Translate_Polygon2D_Mat(&ship, -5, 0);
// test for translate
if (KEYDOWN(VK_UP)) // translate up
Translate_Polygon2D_Mat(&ship, 0, -5);
else
if (KEYDOWN(VK_DOWN)) // translate left
Translate_Polygon2D_Mat(&ship, 0, 5);
// unlock primary buffer
if (FAILED(lpddsback->Unlock(NULL)))
return(0);
// draw some information
sprintf(buffer,"(x,y) = [%d, %d] ",ship.x0, ship.y0);
Draw_Text_GDI(buffer, 8,SCREEN_HEIGHT - 16,255, lpddsback);
Draw_Text_GDI("<A> and <S> - Scale <Z> and <X> - Rotate <Arrows> - Translate <ESC> - Exit", 8,8,255, lpddsback);
// perform the flip
while (FAILED(lpddsprimary->Flip(NULL, DDFLIP_WAIT)));
// wait a sec
Sleep(33);
// return success or failure or your own return code here
return(1);
} // end Game_Main
////////////////////////////////////////////////////////////
int Game_Init(void *parms = NULL, int num_parms = 0)
{
// this is called once after the initial window is created and
// before the main event loop is entered, do all your initialization
// here
// seed random number generator
srand(GetTickCount());
// create IDirectDraw interface 7.0 object and test for error
if (FAILED(DirectDrawCreateEx(NULL, (void **)&lpdd, IID_IDirectDraw7, NULL)))
return(0);
// set cooperation to full screen
if (FAILED(lpdd->SetCooperativeLevel(main_window_handle,
DDSCL_FULLSCREEN | DDSCL_ALLOWMODEX |
DDSCL_EXCLUSIVE | DDSCL_ALLOWREBOOT)))
return(0);
// set display mode to 640x480x8
if (FAILED(lpdd->SetDisplayMode(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP,0,0)))
return(0);
// clear ddsd and set size
DDRAW_INIT_STRUCT(ddsd);
// enable valid fields
ddsd.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT;
// set the backbuffer count field to 1, use 2 for triple buffering
ddsd.dwBackBufferCount = 1;
// request a complex, flippable
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP;
// create the primary surface
if (FAILED(lpdd->CreateSurface(&ddsd, &lpddsprimary, NULL)))
return(0);
// now query for attached surface from the primary surface
// this line is needed by the call
ddsd.ddsCaps.dwCaps = DDSCAPS_BACKBUFFER;
// get the attached back buffer surface
if (FAILED(lpddsprimary->GetAttachedSurface(&ddsd.ddsCaps, &lpddsback)))
return(0);
// build up the palette data array
for (int color=1; color < 255; color++)
{
// fill with random RGB values
palette[color].peRed = rand()%256;
palette[color].peGreen = rand()%256;
palette[color].peBlue = rand()%256;
// set flags field to PC_NOCOLLAPSE
palette[color].peFlags = PC_NOCOLLAPSE;
} // end for color
// now fill in entry 0 and 255 with black and white
palette[0].peRed = 0;
palette[0].peGreen = 0;
palette[0].peBlue = 0;
palette[0].peFlags = PC_NOCOLLAPSE;
palette[255].peRed = 255;
palette[255].peGreen = 255;
palette[255].peBlue = 255;
palette[255].peFlags = PC_NOCOLLAPSE;
// make some primary colors
palette[1].peRed = 255;
palette[1].peGreen = 0;
palette[1].peBlue = 0;
palette[1].peFlags = PC_NOCOLLAPSE;
palette[2].peRed = 0;
palette[2].peGreen = 255;
palette[2].peBlue = 0;
palette[2].peFlags = PC_NOCOLLAPSE;
palette[3].peRed = 0;
palette[3].peGreen = 0;
palette[3].peBlue = 255;
palette[3].peFlags = PC_NOCOLLAPSE;
// create the palette object
if (FAILED(lpdd->CreatePalette(DDPCAPS_8BIT | DDPCAPS_ALLOW256 |
DDPCAPS_INITIALIZE,
palette,&lpddpal, NULL)))
return(0);
// finally attach the palette to the primary surface
if (FAILED(lpddsprimary->SetPalette(lpddpal)))
return(0);
// clear the surfaces out
DDraw_Fill_Surface(lpddsprimary, 0 );
DDraw_Fill_Surface(lpddsback, 0 );
// define points of ship
VERTEX2DF ship_vertices[24] =
{1,11,
2,8,
1,7,
1,-1,
3,-1,
3,-2,
11,-3,
11,-6,
3,-7,
2,-8,
1,-8,
1,-7,
-1,-7,
-1,-8,
-2,-8,
-3,-7,
-11,-6,
-11,-3,
-3,-2,
-3,-1,
-1,-1,
-1,7,
-2,8,
-1, 11};
// initialize ship
ship.state = 1; // turn it on
ship.num_verts = 24;
ship.x0 = SCREEN_WIDTH/2; // position it
ship.y0 = SCREEN_HEIGHT/2;
ship.xv = 0;
ship.yv = 0;
ship.color = 2; // green
ship.vlist = new VERTEX2DF [ship.num_verts];
for (int index = 0; index < ship.num_verts; index++)
ship.vlist[index] = ship_vertices[index];
// do a quick scale on the vertices, they are a bit too small
Scale_Polygon2D(&ship, 3.0, 3.0);
// create sin/cos lookup table
// generate the tables
for (int ang = 0; ang < 360; ang++)
{
// convert ang to radians
float theta = (float)ang*PI/(float)180;
// insert next entry into table
cos_look[ang] = cos(theta);
sin_look[ang] = sin(theta);
} // end for ang
// hide the cursor
ShowCursor(0);
// return success or failure or your own return code here
return(1);
} // end Game_Init
/////////////////////////////////////////////////////////////
int Game_Shutdown(void *parms = NULL, int num_parms = 0)
{
// this is called after the game is exited and the main event
// loop while is exited, do all you cleanup and shutdown here
// first the palette
if (lpddpal)
{
lpddpal->Release();
lpddpal = NULL;
} // end if
// now the back buffer surface
if (lpddsback)
{
lpddsback->Release();
lpddsback = NULL;
} // end if
// now the primary surface
if (lpddsprimary)
{
lpddsprimary->Release();
lpddsprimary = NULL;
} // end if
// now blow away the IDirectDraw4 interface
if (lpdd)
{
lpdd->Release();
lpdd = NULL;
} // end if
// show the cursor
ShowCursor(1);
// return success or failure or your own return code here
return(1);
} // end Game_Shutdown
// WINMAIN ////////////////////////////////////////////////
int WINAPI WinMain( HINSTANCE hinstance,
HINSTANCE hprevinstance,
LPSTR lpcmdline,
int ncmdshow)
{
WNDCLASSEX winclass; // this will hold the class we create
HWND hwnd; // generic window handle
MSG msg; // generic message
HDC hdc; // graphics device context
// first fill in the window class stucture
winclass.cbSize = sizeof(WNDCLASSEX);
winclass.style = CS_DBLCLKS | CS_OWNDC |
CS_HREDRAW | CS_VREDRAW;
winclass.lpfnWndProc = WindowProc;
winclass.cbClsExtra = 0;
winclass.cbWndExtra = 0;
winclass.hInstance = hinstance;
winclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
winclass.hCursor = LoadCursor(NULL, IDC_ARROW);
winclass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
winclass.lpszMenuName = NULL;
winclass.lpszClassName = WINDOW_CLASS_NAME;
winclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
// save hinstance in global
hinstance_app = hinstance;
// register the window class
if (!RegisterClassEx(&winclass))
return(0);
// create the window
if (!(hwnd = CreateWindowEx(NULL, // extended style
WINDOW_CLASS_NAME, // class
"DirectDraw 8-Bit Polygon Matrix Transformation Demo", // title
WS_POPUP | WS_VISIBLE,
0,0, // initial x,y
SCREEN_WIDTH,SCREEN_HEIGHT, // initial width, height
NULL, // handle to parent
NULL, // handle to menu
hinstance,// instance of this application
NULL))) // extra creation parms
return(0);
// save main window handle
main_window_handle = hwnd;
// initialize game here
Game_Init();
// enter main event loop
while(TRUE)
{
// test if there is a message in queue, if so get it
if (PeekMessage(&msg,NULL,0,0,PM_REMOVE))
{
// test if this is a quit
if (msg.message == WM_QUIT)
break;
// translate any accelerator keys
TranslateMessage(&msg);
// send the message to the window proc
DispatchMessage(&msg);
} // end if
// main game processing goes here
Game_Main();
} // end while
// closedown game here
Game_Shutdown();
// return to Windows like this
return(msg.wParam);
} // end WinMain
///////////////////////////////////////////////////////////
| [
"syver.enstad@cisco.com"
] | syver.enstad@cisco.com |
669763b8c5970998134b66e5b26fa32b9b55dfdc | 680b88f875432c4d3fcf864b72e6833c6bc9c6fa | /Project1/ForkCompress.cpp | 4bedcfc554f37730a7644c04c8e17ac28dddda93 | [] | no_license | Joshmerm/OperatingSystems | 4b221a517a106f342c417ff2a018c279b91fead8 | 66064b5d985dfa8df80981a2b640f424b07b45a8 | refs/heads/main | 2023-04-22T11:43:46.109171 | 2021-05-07T20:15:48 | 2021-05-07T20:15:48 | 333,994,032 | 1 | 0 | null | 2021-05-07T20:15:48 | 2021-01-29T00:34:34 | C++ | UTF-8 | C++ | false | false | 980 | cpp | #include <iostream>
#include <unistd.h>
#include <sys/wait.h>
#include <sys/types.h>
using namespace std;
void child(char ** argv){
//Runs MyCompress with the two command line arguments
execl("MyCompress", "MyCompress", argv[1], argv[2], NULL);
}
void parent(){
//Parent function, runs once child is done
cout << "Child Is Done" << endl;
}
//Takes in two command Line arguments (input file path, output path)
// Example for running: ./ForkCompress source.txt destination.txt
int main(int argc, char** argv) {
pid_t pid;
//Forks the process, parent will wait until child executes
pid = fork();
if(pid < 0) {
//Error Forking
perror("Error");
exit(1);
}else if(pid == 0){
//Executes the child function
child(argv);
exit(1);
}else{
//Waits for child to finish
wait(&pid);
//Once child is done, executes the Parent Function
parent();
}
return 0;
} | [
"joshmerm@gmail.com"
] | joshmerm@gmail.com |
42b800171a8cf8ac51cd856acc863e9b96663f11 | 70c7cda5e769ac0aec001363a482bc24f50123b4 | /externals/thrust/system/cuda/detail/partition.h | 5dd9a8bca73e8e7a19a7a63a18cf8039a8f407f1 | [
"BSL-1.0",
"Apache-2.0",
"MIT"
] | permissive | Robadob/FLAMEGPU2_dev | a1509c73ffdec2d6bb1c978d0f936418e0892078 | 3e4106078f754ee90957519fa196a863fd257d1c | refs/heads/master | 2020-08-30T22:25:42.476365 | 2019-11-22T18:24:06 | 2019-11-25T11:33:59 | 218,506,894 | 0 | 0 | MIT | 2019-11-27T14:45:12 | 2019-10-30T10:59:22 | C++ | UTF-8 | C++ | false | false | 39,423 | h | /******************************************************************************
* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the NVIDIA CORPORATION nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION 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.
*
******************************************************************************/
#pragma once
#if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC
#include <thrust/system/cuda/config.h>
#include <thrust/detail/cstdint.h>
#include <thrust/detail/temporary_array.h>
#include <thrust/system/cuda/detail/util.h>
#include <thrust/system/cuda/detail/reverse.h>
#include <thrust/system/cuda/detail/find.h>
#include <thrust/system/cuda/detail/uninitialized_copy.h>
#include <cub/device/device_partition.cuh>
#include <thrust/system/cuda/detail/core/agent_launcher.h>
#include <thrust/system/cuda/detail/par_to_seq.h>
#include <thrust/partition.h>
#include <thrust/pair.h>
#include <thrust/distance.h>
THRUST_BEGIN_NS
namespace cuda_cub {
namespace __partition {
template <int _BLOCK_THREADS,
int _ITEMS_PER_THREAD = 1,
int _MIN_BLOCKS = 1,
cub::BlockLoadAlgorithm _LOAD_ALGORITHM = cub::BLOCK_LOAD_DIRECT,
cub::CacheLoadModifier _LOAD_MODIFIER = cub::LOAD_LDG,
cub::BlockScanAlgorithm _SCAN_ALGORITHM = cub::BLOCK_SCAN_WARP_SCANS>
struct PtxPolicy
{
enum
{
BLOCK_THREADS = _BLOCK_THREADS,
ITEMS_PER_THREAD = _ITEMS_PER_THREAD,
MIN_BLOCKS = _MIN_BLOCKS,
ITEMS_PER_TILE = _BLOCK_THREADS * _ITEMS_PER_THREAD,
};
static const cub::BlockLoadAlgorithm LOAD_ALGORITHM = _LOAD_ALGORITHM;
static const cub::CacheLoadModifier LOAD_MODIFIER = _LOAD_MODIFIER;
static const cub::BlockScanAlgorithm SCAN_ALGORITHM = _SCAN_ALGORITHM;
}; // struct PtxPolicy
template<class, class>
struct Tuning;
template<class T>
struct Tuning<sm35, T>
{
const static int INPUT_SIZE = sizeof(T);
enum
{
NOMINAL_4B_ITEMS_PER_THREAD = 10,
ITEMS_PER_THREAD = CUB_MIN(NOMINAL_4B_ITEMS_PER_THREAD, CUB_MAX(1, (NOMINAL_4B_ITEMS_PER_THREAD * 4 / sizeof(T)))),
};
typedef PtxPolicy<128,
ITEMS_PER_THREAD,
1,
cub::BLOCK_LOAD_WARP_TRANSPOSE,
cub::LOAD_LDG,
cub::BLOCK_SCAN_WARP_SCANS>
type;
}; // Tuning<350>
template<class T>
struct Tuning<sm30, T>
{
const static int INPUT_SIZE = sizeof(T);
enum
{
NOMINAL_4B_ITEMS_PER_THREAD = 7,
ITEMS_PER_THREAD = CUB_MIN(NOMINAL_4B_ITEMS_PER_THREAD, CUB_MAX(3, (NOMINAL_4B_ITEMS_PER_THREAD * 4 / sizeof(T)))),
};
typedef PtxPolicy<128,
ITEMS_PER_THREAD,
1,
cub::BLOCK_LOAD_WARP_TRANSPOSE,
cub::LOAD_DEFAULT,
cub::BLOCK_SCAN_WARP_SCANS>
type;
}; // Tuning<300>
template<int T>
struct __tag{};
struct no_stencil_tag_ {};
struct single_output_tag_
{
template<class T>
THRUST_DEVICE_FUNCTION T const& operator=(T const& t) const { return t; }
};
typedef no_stencil_tag_* no_stencil_tag;
typedef single_output_tag_* single_output_tag;;
template <class ItemsIt,
class StencilIt,
class SelectedOutIt,
class RejectedOutIt,
class Predicate,
class Size,
class NumSelectedOutIt>
struct PartitionAgent
{
typedef typename iterator_traits<ItemsIt>::value_type item_type;
typedef typename iterator_traits<StencilIt>::value_type stencil_type;
typedef cub::ScanTileState<Size> ScanTileState;
template <class Arch>
struct PtxPlan : Tuning<Arch, item_type>::type
{
typedef Tuning<Arch,item_type> tuning;
typedef typename core::LoadIterator<PtxPlan, ItemsIt>::type ItemsLoadIt;
typedef typename core::LoadIterator<PtxPlan, StencilIt>::type StencilLoadIt;
typedef typename core::BlockLoad<PtxPlan, ItemsLoadIt>::type BlockLoadItems;
typedef typename core::BlockLoad<PtxPlan, StencilLoadIt>::type BlockLoadStencil;
typedef cub::TilePrefixCallbackOp<Size,
cub::Sum,
ScanTileState,
Arch::ver>
TilePrefixCallback;
typedef cub::BlockScan<Size,
PtxPlan::BLOCK_THREADS,
PtxPlan::SCAN_ALGORITHM,
1,
1,
Arch::ver>
BlockScan;
union TempStorage
{
struct
{
typename BlockScan::TempStorage scan;
typename TilePrefixCallback::TempStorage prefix;
};
typename BlockLoadItems::TempStorage load_items;
typename BlockLoadStencil::TempStorage load_stencil;
core::uninitialized_array<item_type, PtxPlan::ITEMS_PER_TILE> raw_exchange;
}; // union TempStorage
}; // struct PtxPlan
typedef typename core::specialize_plan_msvc10_war<PtxPlan>::type::type ptx_plan;
typedef typename ptx_plan::ItemsLoadIt ItemsLoadIt;
typedef typename ptx_plan::StencilLoadIt StencilLoadIt;
typedef typename ptx_plan::BlockLoadItems BlockLoadItems;
typedef typename ptx_plan::BlockLoadStencil BlockLoadStencil;
typedef typename ptx_plan::TilePrefixCallback TilePrefixCallback;
typedef typename ptx_plan::BlockScan BlockScan;
typedef typename ptx_plan::TempStorage TempStorage;
enum
{
SINGLE_OUTPUT = thrust::detail::is_same<RejectedOutIt, single_output_tag>::value,
USE_STENCIL = !thrust::detail::is_same<StencilIt, no_stencil_tag>::value,
BLOCK_THREADS = ptx_plan::BLOCK_THREADS,
ITEMS_PER_THREAD = ptx_plan::ITEMS_PER_THREAD,
ITEMS_PER_TILE = ptx_plan::ITEMS_PER_TILE
};
struct impl
{
//---------------------------------------------------------------------
// Per-thread fields
//---------------------------------------------------------------------
TempStorage & temp_storage;
ScanTileState &tile_state;
ItemsLoadIt items_glob;
StencilLoadIt stencil_glob;
SelectedOutIt selected_out_glob;
RejectedOutIt rejected_out_glob;
Predicate predicate;
Size num_items;
//---------------------------------------------------------------------
// Utilities
//---------------------------------------------------------------------
template <bool IS_LAST_TILE>
THRUST_DEVICE_FUNCTION void
scatter(item_type (&items)[ITEMS_PER_THREAD],
Size (&selection_flags)[ITEMS_PER_THREAD],
Size (&selection_indices)[ITEMS_PER_THREAD],
int num_tile_items,
int num_tile_selections,
Size num_selections_prefix,
Size num_rejected_prefix,
Size /*num_selections*/)
{
int tile_num_rejections = num_tile_items - num_tile_selections;
// Scatter items to shared memory (rejections first)
#pragma unroll
for (int ITEM = 0; ITEM < ITEMS_PER_THREAD; ++ITEM)
{
int item_idx = (threadIdx.x * ITEMS_PER_THREAD) + ITEM;
int local_selection_idx = selection_indices[ITEM] - num_selections_prefix;
int local_rejection_idx = item_idx - local_selection_idx;
int local_scatter_offset = (selection_flags[ITEM])
? tile_num_rejections + local_selection_idx
: local_rejection_idx;
temp_storage.raw_exchange[local_scatter_offset] = items[ITEM];
}
core::sync_threadblock();
// Gather items from shared memory and scatter to global
#pragma unroll
for (int ITEM = 0; ITEM < ITEMS_PER_THREAD; ++ITEM)
{
int item_idx = (ITEM * BLOCK_THREADS) + threadIdx.x;
int rejection_idx = item_idx;
int selection_idx = item_idx - tile_num_rejections;
Size scatter_offset = (item_idx < tile_num_rejections)
? num_items -
num_rejected_prefix - rejection_idx - 1
: num_selections_prefix + selection_idx;
item_type item = temp_storage.raw_exchange[item_idx];
if (!IS_LAST_TILE || (item_idx < num_tile_items))
{
if (SINGLE_OUTPUT || item_idx >= tile_num_rejections)
{
selected_out_glob[scatter_offset] = item;
}
else // if !SINGLE_OUTPUT, scatter rejected items separately
{
rejected_out_glob[num_items - scatter_offset - 1] = item;
}
}
}
} // func scatter
//------------------------------------------
// specialize predicate on different types
//------------------------------------------
enum ItemStencil
{
ITEM,
STENCIL
};
template <bool TAG, class T>
struct wrap_value
{
T const & x;
THRUST_DEVICE_FUNCTION wrap_value(T const &x) : x(x) {}
THRUST_DEVICE_FUNCTION T const &operator()() const { return x; };
}; // struct wrap_type
//------- item
THRUST_DEVICE_FUNCTION bool
predicate_wrapper(wrap_value<ITEM, item_type> const &x,
__tag<false /* USE_STENCIL */>)
{
return predicate(x());
}
THRUST_DEVICE_FUNCTION bool
predicate_wrapper(wrap_value<ITEM, item_type> const &,
__tag<true>)
{
return false;
}
//-------- stencil
template <class T>
THRUST_DEVICE_FUNCTION bool
predicate_wrapper(wrap_value<STENCIL, T> const &x,
__tag<true>)
{
return predicate(x());
}
THRUST_DEVICE_FUNCTION bool
predicate_wrapper(wrap_value<STENCIL, no_stencil_tag_> const &,
__tag<true>)
{
return false;
}
THRUST_DEVICE_FUNCTION bool
predicate_wrapper(wrap_value<STENCIL, stencil_type> const &,
__tag<false>)
{
return false;
}
template <bool IS_LAST_TILE, ItemStencil TYPE, class T>
THRUST_DEVICE_FUNCTION void
compute_selection_flags(int num_tile_items,
T (&values)[ITEMS_PER_THREAD],
Size (&selection_flags)[ITEMS_PER_THREAD])
{
#pragma unroll
for (int ITEM = 0; ITEM < ITEMS_PER_THREAD; ++ITEM)
{
// Out-of-bounds items are selection_flags
selection_flags[ITEM] = 1;
if (!IS_LAST_TILE ||
(Size(threadIdx.x * ITEMS_PER_THREAD) + ITEM < num_tile_items))
{
selection_flags[ITEM] =
predicate_wrapper(wrap_value<TYPE, T>(values[ITEM]),
__tag<USE_STENCIL>());
}
}
}
//---------------------------------------------------------------------
// Tile processing
//---------------------------------------------------------------------
template <bool IS_LAST_TILE, bool IS_FIRST_TILE>
Size THRUST_DEVICE_FUNCTION
consume_tile_impl(int num_tile_items,
int tile_idx,
Size tile_base)
{
item_type items_loc[ITEMS_PER_THREAD];
Size selection_flags[ITEMS_PER_THREAD];
Size selection_idx[ITEMS_PER_THREAD];
if (IS_LAST_TILE)
{
BlockLoadItems(temp_storage.load_items)
.Load(items_glob + tile_base, items_loc, num_tile_items);
}
else
{
BlockLoadItems(temp_storage.load_items)
.Load(items_glob + tile_base, items_loc);
}
core::sync_threadblock();
if (USE_STENCIL)
{
stencil_type stencil_loc[ITEMS_PER_THREAD];
if (IS_LAST_TILE)
{
BlockLoadStencil(temp_storage.load_stencil)
.Load(stencil_glob + tile_base, stencil_loc, num_tile_items);
}
else
{
BlockLoadStencil(temp_storage.load_stencil)
.Load(stencil_glob + tile_base, stencil_loc);
}
compute_selection_flags<IS_LAST_TILE, STENCIL>(num_tile_items,
stencil_loc,
selection_flags);
}
else /* Use predicate on items rather then stencil */
{
compute_selection_flags<IS_LAST_TILE, ITEM>(num_tile_items,
items_loc,
selection_flags);
}
core::sync_threadblock();
Size num_tile_selections = 0;
Size num_selections = 0;
Size num_selections_prefix = 0;
Size num_rejected_prefix = 0;
if (IS_FIRST_TILE)
{
BlockScan(temp_storage.scan)
.ExclusiveSum(selection_flags,
selection_idx,
num_tile_selections);
if (threadIdx.x == 0)
{
// Update tile status if this is not the last tile
if (!IS_LAST_TILE)
tile_state.SetInclusive(0, num_tile_selections);
}
// Do not count any out-of-bounds selections
if (IS_LAST_TILE)
{
int num_discount = ITEMS_PER_TILE - num_tile_items;
num_tile_selections -= num_discount;
}
num_selections = num_tile_selections;
}
else
{
TilePrefixCallback prefix_cb(tile_state,
temp_storage.prefix,
cub::Sum(),
tile_idx);
BlockScan(temp_storage.scan)
.ExclusiveSum(selection_flags,
selection_idx,
prefix_cb);
num_selections = prefix_cb.GetInclusivePrefix();
num_tile_selections = prefix_cb.GetBlockAggregate();
num_selections_prefix = prefix_cb.GetExclusivePrefix();
num_rejected_prefix = tile_base - num_selections_prefix;
if (IS_LAST_TILE)
{
int num_discount = ITEMS_PER_TILE - num_tile_items;
num_tile_selections -= num_discount;
num_selections -= num_discount;
}
}
core::sync_threadblock();
scatter<IS_LAST_TILE>(items_loc,
selection_flags,
selection_idx,
num_tile_items,
num_tile_selections,
num_selections_prefix,
num_rejected_prefix,
num_selections);
return num_selections;
}
template <bool IS_LAST_TILE>
THRUST_DEVICE_FUNCTION Size
consume_tile(int num_tile_items,
int tile_idx,
Size tile_base)
{
if (tile_idx == 0)
{
return consume_tile_impl<IS_LAST_TILE, true>(num_tile_items,
tile_idx,
tile_base);
}
else
{
return consume_tile_impl<IS_LAST_TILE, false>(num_tile_items,
tile_idx,
tile_base);
}
}
//---------------------------------------------------------------------
// Constructor
//---------------------------------------------------------------------
THRUST_DEVICE_FUNCTION
impl(TempStorage & temp_storage_,
ScanTileState & tile_state_,
ItemsLoadIt items_glob_,
StencilLoadIt stencil_glob_,
SelectedOutIt selected_out_glob_,
RejectedOutIt rejected_out_glob_,
Predicate predicate_,
Size num_items_,
int num_tiles,
NumSelectedOutIt num_selected_out)
: temp_storage(temp_storage_),
tile_state(tile_state_),
items_glob(items_glob_),
stencil_glob(stencil_glob_),
selected_out_glob(selected_out_glob_),
rejected_out_glob(rejected_out_glob_),
predicate(predicate_),
num_items(num_items_)
{
int tile_idx = blockIdx.x;
Size tile_base = tile_idx * ITEMS_PER_TILE;
if (tile_idx < num_tiles - 1)
{
consume_tile<false>(ITEMS_PER_TILE,
tile_idx,
tile_base);
}
else
{
int num_remaining = static_cast<int>(num_items - tile_base);
Size num_selections = consume_tile<true>(num_remaining,
tile_idx,
tile_base);
if (threadIdx.x == 0)
{
*num_selected_out = num_selections;
}
}
} //
}; //struct impl
//---------------------------------------------------------------------
// Agent entry point
//---------------------------------------------------------------------
THRUST_AGENT_ENTRY(ItemsIt items,
StencilIt stencil,
SelectedOutIt selected_out,
RejectedOutIt rejected_out,
Predicate predicate,
Size num_items,
NumSelectedOutIt num_selected_out,
ScanTileState tile_state,
int num_tiles,
char * shmem)
{
TempStorage &storage = *reinterpret_cast<TempStorage *>(shmem);
impl(storage,
tile_state,
core::make_load_iterator(ptx_plan(), items),
core::make_load_iterator(ptx_plan(), stencil),
selected_out,
rejected_out,
predicate,
num_items,
num_tiles,
num_selected_out);
}
}; // struct PartitionAgent
template <class ScanTileState,
class NumSelectedIt,
class Size>
struct InitAgent
{
template <class Arch>
struct PtxPlan : PtxPolicy<128> {};
typedef core::specialize_plan<PtxPlan> ptx_plan;
//---------------------------------------------------------------------
// Agent entry point
//---------------------------------------------------------------------
THRUST_AGENT_ENTRY(ScanTileState tile_state,
Size num_tiles,
NumSelectedIt num_selected_out,
char * /*shmem*/)
{
tile_state.InitializeStatus(num_tiles);
if (blockIdx.x == 0 && threadIdx.x == 0)
*num_selected_out = 0;
}
}; // struct InitAgent
template <class ItemsIt,
class StencilIt,
class SelectedOutIt,
class RejectedOutIt,
class Predicate,
class Size,
class NumSelectedOutIt>
static cudaError_t THRUST_RUNTIME_FUNCTION
doit_step(void * d_temp_storage,
size_t & temp_storage_bytes,
ItemsIt items,
StencilIt stencil,
SelectedOutIt selected_out,
RejectedOutIt rejected_out,
Predicate predicate,
NumSelectedOutIt num_selected_out,
Size num_items,
cudaStream_t stream,
bool debug_sync)
{
using core::AgentLauncher;
using core::AgentPlan;
using core::get_agent_plan;
typedef AgentLauncher<
PartitionAgent<ItemsIt,
StencilIt,
SelectedOutIt,
RejectedOutIt,
Predicate,
Size,
NumSelectedOutIt> >
partition_agent;
typedef typename partition_agent::ScanTileState ScanTileState;
typedef AgentLauncher<
InitAgent<ScanTileState, NumSelectedOutIt, Size> >
init_agent;
using core::get_plan;
typename get_plan<init_agent>::type init_plan = init_agent::get_plan();
typename get_plan<partition_agent>::type partition_plan = partition_agent::get_plan(stream);
int tile_size = partition_plan.items_per_tile;
size_t num_tiles = (num_items + tile_size - 1) / tile_size;
size_t vshmem_storage = core::vshmem_size(partition_plan.shared_memory_size,
num_tiles);
cudaError_t status = cudaSuccess;
if (num_items == 0)
return status;
size_t allocation_sizes[2] = {0, vshmem_storage};
status = ScanTileState::AllocationSize(static_cast<int>(num_tiles), allocation_sizes[0]);
CUDA_CUB_RET_IF_FAIL(status);
void* allocations[2] = {NULL, NULL};
status = cub::AliasTemporaries(d_temp_storage,
temp_storage_bytes,
allocations,
allocation_sizes);
CUDA_CUB_RET_IF_FAIL(status);
if (d_temp_storage == NULL)
{
return status;
}
ScanTileState tile_status;
status = tile_status.Init(static_cast<int>(num_tiles), allocations[0], allocation_sizes[0]);
CUDA_CUB_RET_IF_FAIL(status);
init_agent ia(init_plan, num_tiles, stream, "partition::init_agent", debug_sync);
char *vshmem_ptr = vshmem_storage > 0 ? (char *)allocations[1] : NULL;
partition_agent pa(partition_plan, num_items, stream, vshmem_ptr, "partition::partition_agent", debug_sync);
ia.launch(tile_status, num_tiles, num_selected_out);
CUDA_CUB_RET_IF_FAIL(cudaPeekAtLastError());
pa.launch(items,
stencil,
selected_out,
rejected_out,
predicate,
num_items,
num_selected_out,
tile_status,
num_tiles);
CUDA_CUB_RET_IF_FAIL(cudaPeekAtLastError());
return status;
}
template <typename Derived,
typename InputIt,
typename StencilIt,
typename SelectedOutIt,
typename RejectedOutIt,
typename Predicate>
THRUST_RUNTIME_FUNCTION
pair<SelectedOutIt, RejectedOutIt>
partition(execution_policy<Derived>& policy,
InputIt first,
InputIt last,
StencilIt stencil,
SelectedOutIt selected_result,
RejectedOutIt rejected_result,
Predicate predicate)
{
typedef typename iterator_traits<InputIt>::difference_type size_type;
size_type num_items = static_cast<size_type>(thrust::distance(first, last));
size_t temp_storage_bytes = 0;
cudaStream_t stream = cuda_cub::stream(policy);
bool debug_sync = THRUST_DEBUG_SYNC_FLAG;
cudaError_t status;
status = doit_step(NULL,
temp_storage_bytes,
first,
stencil,
selected_result,
rejected_result,
predicate,
reinterpret_cast<size_type*>(NULL),
num_items,
stream,
debug_sync);
cuda_cub::throw_on_error(status, "partition failed on 1st step");
size_t allocation_sizes[2] = {sizeof(size_type), temp_storage_bytes};
void * allocations[2] = {NULL, NULL};
size_t storage_size = 0;
status = core::alias_storage(NULL,
storage_size,
allocations,
allocation_sizes);
cuda_cub::throw_on_error(status, "partition failed on 1st alias_storage");
// Allocate temporary storage.
thrust::detail::temporary_array<thrust::detail::uint8_t, Derived>
tmp(policy, storage_size);
void *ptr = static_cast<void*>(tmp.data().get());
status = core::alias_storage(ptr,
storage_size,
allocations,
allocation_sizes);
cuda_cub::throw_on_error(status, "partition failed on 2nd alias_storage");
size_type* d_num_selected_out
= thrust::detail::aligned_reinterpret_cast<size_type*>(allocations[0]);
status = doit_step(allocations[1],
temp_storage_bytes,
first,
stencil,
selected_result,
rejected_result,
predicate,
d_num_selected_out,
num_items,
stream,
debug_sync);
cuda_cub::throw_on_error(status, "partition failed on 2nd step");
status = cuda_cub::synchronize(policy);
cuda_cub::throw_on_error(status, "partition failed to synchronize");
size_type num_selected = 0;
if (num_items > 0)
{
num_selected = get_value(policy, d_num_selected_out);
}
return thrust::make_pair(selected_result + num_selected,
rejected_result + num_items - num_selected);
}
template <typename Derived,
typename Iterator,
typename StencilIt,
typename Predicate>
THRUST_RUNTIME_FUNCTION
Iterator partition_inplace(execution_policy<Derived>& policy,
Iterator first,
Iterator last,
StencilIt stencil,
Predicate predicate)
{
typedef typename iterator_traits<Iterator>::difference_type size_type;
typedef typename iterator_traits<Iterator>::value_type value_type;
size_type num_items = thrust::distance(first, last);
// Allocate temporary storage.
thrust::detail::temporary_array<value_type, Derived> tmp(policy, num_items);
cuda_cub::uninitialized_copy(policy, first, last, tmp.begin());
pair<Iterator, single_output_tag> result =
partition(policy,
tmp.data().get(),
tmp.data().get() + num_items,
stencil,
first,
single_output_tag(),
predicate);
size_type num_selected = result.first - first;
return first + num_selected;
}
} // namespace __partition
///// copy
//-------------------------
// Thrust API entry points
//-------------------------
__thrust_exec_check_disable__
template <class Derived,
class InputIt,
class StencilIt,
class SelectedOutIt,
class RejectedOutIt,
class Predicate>
pair<SelectedOutIt, RejectedOutIt> __host__ __device__
partition_copy(execution_policy<Derived> &policy,
InputIt first,
InputIt last,
StencilIt stencil,
SelectedOutIt selected_result,
RejectedOutIt rejected_result,
Predicate predicate)
{
pair<SelectedOutIt, RejectedOutIt> ret = thrust::make_pair(selected_result, rejected_result);
if (__THRUST_HAS_CUDART__)
{
ret = __partition::partition(policy,
first,
last,
stencil,
selected_result,
rejected_result,
predicate);
}
else
{
#if !__THRUST_HAS_CUDART__
ret = thrust::partition_copy(cvt_to_seq(derived_cast(policy)),
first,
last,
stencil,
selected_result,
rejected_result,
predicate);
#endif
}
return ret;
}
__thrust_exec_check_disable__
template <class Derived,
class InputIt,
class SelectedOutIt,
class RejectedOutIt,
class Predicate>
pair<SelectedOutIt, RejectedOutIt> __host__ __device__
partition_copy(execution_policy<Derived> &policy,
InputIt first,
InputIt last,
SelectedOutIt selected_result,
RejectedOutIt rejected_result,
Predicate predicate)
{
pair<SelectedOutIt, RejectedOutIt> ret = thrust::make_pair(selected_result, rejected_result);
if (__THRUST_HAS_CUDART__)
{
ret = __partition::partition(policy,
first,
last,
__partition::no_stencil_tag(),
selected_result,
rejected_result,
predicate);
}
else
{
#if !__THRUST_HAS_CUDART__
ret = thrust::partition_copy(cvt_to_seq(derived_cast(policy)),
first,
last,
selected_result,
rejected_result,
predicate);
#endif
}
return ret;
}
__thrust_exec_check_disable__
template <class Derived,
class InputIt,
class SelectedOutIt,
class RejectedOutIt,
class Predicate>
pair<SelectedOutIt, RejectedOutIt> __host__ __device__
stable_partition_copy(execution_policy<Derived> &policy,
InputIt first,
InputIt last,
SelectedOutIt selected_result,
RejectedOutIt rejected_result,
Predicate predicate)
{
pair<SelectedOutIt, RejectedOutIt> ret = thrust::make_pair(selected_result, rejected_result);
if (__THRUST_HAS_CUDART__)
{
ret = __partition::partition(policy,
first,
last,
__partition::no_stencil_tag(),
selected_result,
rejected_result,
predicate);
}
else
{
#if !__THRUST_HAS_CUDART__
ret = thrust::stable_partition_copy(cvt_to_seq(derived_cast(policy)),
first,
last,
selected_result,
rejected_result,
predicate);
#endif
}
return ret;
}
__thrust_exec_check_disable__
template <class Derived,
class InputIt,
class StencilIt,
class SelectedOutIt,
class RejectedOutIt,
class Predicate>
pair<SelectedOutIt, RejectedOutIt> __host__ __device__
stable_partition_copy(execution_policy<Derived> &policy,
InputIt first,
InputIt last,
StencilIt stencil,
SelectedOutIt selected_result,
RejectedOutIt rejected_result,
Predicate predicate)
{
pair<SelectedOutIt, RejectedOutIt> ret = thrust::make_pair(selected_result, rejected_result);
if (__THRUST_HAS_CUDART__)
{
ret = __partition::partition(policy,
first,
last,
stencil,
selected_result,
rejected_result,
predicate);
}
else
{
#if !__THRUST_HAS_CUDART__
ret = thrust::stable_partition_copy(cvt_to_seq(derived_cast(policy)),
first,
last,
stencil,
selected_result,
rejected_result,
predicate);
#endif
}
return ret;
}
/// inplace
__thrust_exec_check_disable__
template <class Derived,
class Iterator,
class StencilIt,
class Predicate>
Iterator __host__ __device__
partition(execution_policy<Derived> &policy,
Iterator first,
Iterator last,
StencilIt stencil,
Predicate predicate)
{
Iterator ret = first;
if (__THRUST_HAS_CUDART__)
{
ret = __partition::partition_inplace(policy, first, last, stencil, predicate);
}
else
{
#if !__THRUST_HAS_CUDART__
ret = thrust::partition(cvt_to_seq(derived_cast(policy)),
first,
last,
stencil,
predicate);
#endif
}
return ret;
}
__thrust_exec_check_disable__
template <class Derived,
class Iterator,
class Predicate>
Iterator __host__ __device__
partition(execution_policy<Derived> &policy,
Iterator first,
Iterator last,
Predicate predicate)
{
Iterator ret = first;
if (__THRUST_HAS_CUDART__)
{
ret = __partition::partition_inplace(policy,
first,
last,
__partition::no_stencil_tag(),
predicate);
}
else
{
#if !__THRUST_HAS_CUDART__
ret = thrust::partition(cvt_to_seq(derived_cast(policy)),
first,
last,
predicate);
#endif
}
return ret;
}
__thrust_exec_check_disable__
template <class Derived,
class Iterator,
class StencilIt,
class Predicate>
Iterator __host__ __device__
stable_partition(execution_policy<Derived> &policy,
Iterator first,
Iterator last,
StencilIt stencil,
Predicate predicate)
{
Iterator result = first;
if (__THRUST_HAS_CUDART__)
{
result = __partition::partition_inplace(policy,
first,
last,
stencil,
predicate);
// partition returns rejected values in reverese order
// so reverse the rejected elements to make it stable
cuda_cub::reverse(policy, result, last);
}
else
{
#if !__THRUST_HAS_CUDART__
result = thrust::stable_partition(cvt_to_seq(derived_cast(policy)),
first,
last,
stencil,
predicate);
#endif
}
return result;
}
__thrust_exec_check_disable__
template <class Derived,
class Iterator,
class Predicate>
Iterator __host__ __device__
stable_partition(execution_policy<Derived> &policy,
Iterator first,
Iterator last,
Predicate predicate)
{
Iterator result = first;
if (__THRUST_HAS_CUDART__)
{
result = __partition::partition_inplace(policy,
first,
last,
__partition::no_stencil_tag(),
predicate);
// partition returns rejected values in reverese order
// so reverse the rejected elements to make it stable
cuda_cub::reverse(policy, result, last);
}
else
{
#if !__THRUST_HAS_CUDART__
result = thrust::stable_partition(cvt_to_seq(derived_cast(policy)),
first,
last,
predicate);
#endif
}
return result;
}
template <class Derived,
class ItemsIt,
class Predicate>
bool __host__ __device__
is_partitioned(execution_policy<Derived> &policy,
ItemsIt first,
ItemsIt last,
Predicate predicate)
{
ItemsIt boundary = cuda_cub::find_if_not(policy, first, last, predicate);
ItemsIt end = cuda_cub::find_if(policy,boundary,last,predicate);
return end == last;
}
} // namespace cuda_cub
THRUST_END_NS
#endif
| [
"p.richmond@sheffield.ac.uk"
] | p.richmond@sheffield.ac.uk |
599f18d64e39542aea44b60164892261473097d8 | 553d0e216df86f616e242f1f7c1a18df56b04397 | /Source/CSGO/NetworkChannel.h | abee2e06ca19d7d0d02cfa6cd4cbdb059c90393e | [
"MIT",
"LicenseRef-scancode-free-unknown"
] | permissive | ClaudiuHKS/Osiris | ed2fc849daee4f5f7a88660fd7440c5a19bd1d17 | 189b97b1874108e75335272bfef5a15c442c0d19 | refs/heads/master | 2023-03-16T14:12:16.199569 | 2023-01-04T21:28:40 | 2023-01-04T21:28:40 | 209,620,977 | 1 | 0 | MIT | 2019-09-19T18:18:40 | 2019-09-19T18:18:40 | null | UTF-8 | C++ | false | false | 309 | h | #pragma once
#include "Pad.h"
#include "VirtualMethod.h"
namespace csgo
{
struct NetworkChannelPOD {
PAD(44);
int chokedPackets;
};
class NetworkChannel : public VirtualCallableFromPOD<NetworkChannel, NetworkChannelPOD> {
public:
VIRTUAL_METHOD(float, getLatency, 9, (int flow), (flow))
};
}
| [
"danielkrupinski@outlook.com"
] | danielkrupinski@outlook.com |
1496cc2d1210e564654941c5c8a3532843f01e89 | 36183993b144b873d4d53e7b0f0dfebedcb77730 | /GameDevelopment/Game Programming Gems 3/Source Code/06 Audio/04 Burk/src/Circuit_Wind.cpp | 21901ccbb2b1b1a798892f58721721b56327dea8 | [] | no_license | alecnunn/bookresources | b95bf62dda3eb9b0ba0fb4e56025c5c7b6d605c0 | 4562f6430af5afffde790c42d0f3a33176d8003b | refs/heads/master | 2020-04-12T22:28:54.275703 | 2018-12-22T09:00:31 | 2018-12-22T09:00:31 | 162,790,540 | 20 | 14 | null | null | null | null | UTF-8 | C++ | false | false | 1,133 | cpp | #include <math.h>
#include "ggsynth.h"
#include "Circuit_Wind.h"
/**
* Circuit_Winds uses a RedNoise modulated ringing LowpassFIlter
*
* @author (C) 2002 Phil Burk, SoftSynth.com, All Rights Reserved
*/
Circuit_Wind::Circuit_Wind()
{
modRate = 0.6f;
modDepth = 350.0f;
frequency = 1000.0f;
Q = 16.0f;
envelope.setRate( 0.3f );
outputs = filter.outputs;
}
Circuit_Wind::~Circuit_Wind()
{
}
/***********************************************************************/
void Circuit_Wind::gen( GGSynthFloat amplitude )
{
envelope.gen1( amplitude * 0.2f );
GGSynthFloat level = envelope.outputs[0];
// save some CPU cycles if integrator at bottom
if( level > 0.0f )
{
// Calculate LFO.
whiteNoise.gen( level );
redNoise.gen1( modDepth, modRate );
// Use control rate LFO signal to modulate filter frequency.
filter.calculateCoefficients( redNoise.outputs[0] + frequency, Q );
// Calculate filter.
filter.gen( whiteNoise.outputs );
outputs = filter.outputs;
}
else
{
outputs = envelope.outputs; // silent
}
}
| [
"alec.nunn@gmail.com"
] | alec.nunn@gmail.com |
d182b304bd07ffee1254ca71b1314136ecbf516b | 0f2fd8f256365d4a90e5a058629081ef91bb48a1 | /src/prototype1.cpp | a169bbaf968bbbadc6db01e16bcfec4468297af7 | [] | no_license | ging/payloader | 5c19f4ca647f04884d465eadf7041e3e8d6fa32f | 748c7cf157dc572b8dc9803413f9f78316f7b6b1 | refs/heads/master | 2020-07-22T17:39:20.759805 | 2018-06-11T16:16:12 | 2018-06-11T16:16:12 | 73,829,094 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 950 | cpp | #include <stdio.h>
#include <libavutil/time.h>
#include "libs/InputReader.h"
#include "libs/OutputWriter.h"
int main(int argc, const char* argv[]) {
if (argc != 3) {
printf("usage: %s input_file output_file\n"
"Example program to input-output a media file.\n"
"\n", argv[0]);
exit(1);
}
const char *input_file = argv[1];
const char *output_file = argv[2];
payloader::InputReader* reader = new payloader::InputReader(input_file);
payloader::OutputWriter* writer = new payloader::OutputWriter(output_file);
payloader::VideoCodecInfo videoInfo;
videoInfo.enabled = true;
videoInfo.codec = AV_CODEC_ID_MPEG4;
videoInfo.width = 704;
videoInfo.height = 396;
videoInfo.bitRate = 48000;
payloader::AudioCodecInfo audioInfo;
audioInfo.enabled = true;
audioInfo.codec = (AVCodecID)65536;
writer->init(audioInfo, videoInfo);
reader->setSink(writer);
reader->init();
} | [
"aalonsog@dit.upm.es"
] | aalonsog@dit.upm.es |
7c5da16ba0d57e6f9322c2e6f627e92702cba615 | 4b154e683c575081533db5af1941ea66dc6dc9bf | /gazebo/physics/bullet/BulletHinge2Joint.hh | f1f8adf2fcdc93575f0870a785accc2a4480d7be | [
"Apache-2.0"
] | permissive | jonbinney/gazebo_ros_wrapper | 60e8ce882462ec43a3320ef1fd4f720618eb856a | 1ee65727c79c6838cc940b0fe1a190b8e0b53e3b | refs/heads/indigo-devel | 2021-01-22T21:13:42.477373 | 2014-06-09T22:12:07 | 2014-06-09T22:12:07 | 20,611,038 | 1 | 0 | null | 2014-06-09T22:12:07 | 2014-06-08T06:30:47 | C++ | UTF-8 | C++ | false | false | 3,492 | hh | /*
* Copyright (C) 2012-2014 Open Source Robotics Foundation
*
* 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.
*
*/
/* Desc: A hinge joint with 2 degrees of freedom
* Author: Nate Koenig, Andrew Howard
* Date: 21 May 2003
*/
#ifndef _BULLETHINGE2JOINT_HH_
#define _BULLETHINGE2JOINT_HH_
#include "gazebo/math/Angle.hh"
#include "gazebo/math/Vector3.hh"
#include "gazebo/physics/Hinge2Joint.hh"
#include "gazebo/physics/bullet/BulletJoint.hh"
#include "gazebo/physics/bullet/BulletPhysics.hh"
class btHinge2Constraint;
namespace gazebo
{
namespace physics
{
/// \ingroup gazebo_physics
/// \addtogroup gazebo_physics_bullet Bullet Physics
/// \{
/// \brief A two axis hinge joint
class BulletHinge2Joint : public Hinge2Joint<BulletJoint>
{
/// \brief Constructor
public: BulletHinge2Joint(btDynamicsWorld *world, BasePtr _parent);
/// \brief Destructor
public: virtual ~BulletHinge2Joint();
// Documentation inherited.
protected: virtual void Load(sdf::ElementPtr _sdf);
// Documentation inherited.
public: virtual void Init();
/// \brief Get anchor point
public: virtual math::Vector3 GetAnchor(int _index) const;
/// \brief Set the first axis of rotation
public: virtual void SetAxis(int _index, const math::Vector3 &_axis);
/// \brief Get first axis of rotation
public: virtual math::Vector3 GetAxis(int _index) const;
/// \brief Get angle of rotation about first axis
public: math::Angle GetAngle(int _index) const;
/// \brief Get rate of rotation about first axis
public: double GetVelocity(int _index) const;
/// \brief Set the velocity of an axis(index).
public: virtual void SetVelocity(int _index, double _angle);
/// \brief Set the max allowed force of an axis(index).
public: virtual void SetMaxForce(int _index, double _t);
/// \brief Get the max allowed force of an axis(index).
public: virtual double GetMaxForce(int _index);
/// \brief Set the high stop of an axis(index).
public: virtual void SetHighStop(int _index, const math::Angle &_angle);
/// \brief Set the low stop of an axis(index).
public: virtual void SetLowStop(int _index, const math::Angle &_angle);
/// \brief Get the high stop of an axis(index).
public: virtual math::Angle GetHighStop(int _index);
/// \brief Get the low stop of an axis(index).
public: virtual math::Angle GetLowStop(int _index);
/// \brief Get the axis of rotation
public: virtual math::Vector3 GetGlobalAxis(int _index) const;
/// \brief Get the angle of rotation
public: virtual math::Angle GetAngleImpl(int _index) const;
/// \brief Set the torque
protected: virtual void SetForceImpl(int _index, double _torque);
/// \brief Pointer to bullet hinge2 constraint
private: btHinge2Constraint *bulletHinge2;
};
/// \}
}
}
#endif
| [
"jon.binney@gmail.com"
] | jon.binney@gmail.com |
713e5cfc2a8350e8b847cb91e3bdcff6c80a4d68 | 3611073adaa8c9736bbc1e158ed57108ef9d55f7 | /db/rocksdb/src/simple.cc | 0b9539b98bdfd9edbbb272b47e35efd43e03dce6 | [] | no_license | firejh/c-practice | e0ef4103f944d2eb7f6d237f6c85de6b77af710e | cd4d83321e023e79572ba36043065d407017047f | refs/heads/master | 2021-09-06T16:43:15.922540 | 2018-02-08T16:01:16 | 2018-02-08T16:01:16 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 18,359 | cc | /******************************************************
# DESC :
# AUTHOR : Alex Stocks
# VERSION : 1.0
# LICENCE : Apache License 2.0
# EMAIL : alexstocks@foxmail.com
# MOD : 2017-12-29 00:31
# FILE : simple.cc
******************************************************/
#include <stdint.h>
#include <unistd.h>
#include <cstdio>
#include <string>
#include <iostream>
#include <vector>
#include <chrono>
#include <thread>
#include "rocksdb/db.h"
#include "rocksdb/slice.h"
#include "rocksdb/table.h"
#include "rocksdb/options.h"
#include "rocksdb/compaction_filter.h"
#include "rocksdb/utilities/db_ttl.h"
#include "rocksdb/utilities/options_util.h"
using namespace std;
using namespace rocksdb;
DB* db = nullptr;
string kDBPath = "/tmp/rocksdb_data/";
const int32_t DB_TTL = 10;
enum RocksOp {
RO_WRITE = 1,
RO_DELETE = 2,
};
namespace {
// A dummy compaction filter
class DummyCompactionFilter : public CompactionFilter {
public:
virtual ~DummyCompactionFilter() {}
virtual bool Filter(int level, const Slice& key, const Slice& existing_value,
std::string* new_value, bool* value_changed) const {
return false;
}
virtual const char* Name() const { return "DummyCompactionFilter"; }
};
} // namespace
void err_exit(char *pre, char *err)
{
if (err) {
printf("%s:%s", pre, err);
if (db != nullptr) {
delete db;
}
_exit(1);
}
}
void err_exit(string pre, Status& s)
{
if (!s.ok()) {
printf("%s, err:%d-%d-%s\n", pre.data(), s.code(), s.subcode(), s.ToString().c_str());
if (db != nullptr) {
delete db;
}
_exit(1);
}
}
void put(DB* db, string key, int32_t value)
{
Status s = db->Put(WriteOptions(), key, Slice((char*)&value, sizeof(value)));
err_exit((char*)"DB::Put", s);
}
void batch_write(WriteBatch* db, RocksOp op, string key, int32_t value)
{
switch (op) {
case RO_WRITE: {
Status s = db->Put(key, Slice((char*)&value, sizeof(value)));
err_exit((char*)"DB::Put", s);
break;
}
case RO_DELETE: {
Status s = db->Delete(key);
err_exit((char*)"DB::Delete", s);
break;
}
}
}
int testDefaultCF()
{
Options options;
options.OptimizeLevelStyleCompaction();
options.IncreaseParallelism();
options.create_if_missing = true;
db = nullptr;
Status s = DB::Open(options, kDBPath, &db);
err_exit((char*)"DB::Open", s);
// Put key-value
cout << "----put------------" << endl;
WriteBatch batch;
batch_write(&batch, RO_WRITE, "/20171229/service0/attr0/0", 1234);
batch_write(&batch, RO_WRITE, "/20171228/service0/attr0/0", 989);
batch_write(&batch, RO_WRITE, "/20171227/service0/attr0/0", 4893949);
batch_write(&batch, RO_WRITE, "/20171226/service0/attr0/0", 83482384);
s = db->Write(WriteOptions(), &batch);
err_exit((char*)"DB::Write", s);
// get value
cout << "----get------------" << endl;
// string value;
// s = db->Get(ReadOptions(), "/20171226/service0/attr0/0", &value);
PinnableSlice value;
s = db->Get(ReadOptions(), db->DefaultColumnFamily(), "/20171226/service0/attr0/0", &value);
err_exit((char*)"DB::Get(\"/20171226/service0/attr0/0\")", s);
cout << *(int32_t*)(value.data()) << endl;
assert(*(int32_t*)(value.data()) == (int32_t)(83482384));
value.Reset();
// multi-get values
cout << "----multi-get -----" << endl;
vector<Status> statusArray;
vector<Slice> keyArray = {"/20171229/service0/attr0/0", "/20171226/service0/attr0/0"};
vector<string> valueArray;
statusArray = db->MultiGet(ReadOptions(), keyArray, &valueArray);
int idx = 0;
for (auto &s:statusArray) {
err_exit((char*)("MultiGet"), s);
cout << "key:" << keyArray[idx].data_ << ", value:" << *(int32_t*)(valueArray[idx].data()) << endl;
idx ++;
}
// for-range
cout << "----for-range -----" << endl;
Iterator* it = db->NewIterator(ReadOptions());
for (it->SeekToFirst(); it->Valid(); it->Next()) {
cout << "key:" << it->key().ToString() << ", value:" << *(int32_t*)(it->value().data()) << endl;
}
cout << "-reverse-for-range-" << endl;
for (it->SeekToLast(); it->Valid(); it->Prev()) {
cout << "key:" << it->key().ToString() << ", value:" << *(int32_t*)(it->value().data()) << endl;
}
// iterator
cout << "----iterator ------" << endl;
Slice sliceStart("/20171227");
string sliceEnd("/20171229");
for (it->Seek(sliceStart);
it->Valid() && it->key().ToString() < sliceEnd;
it->Next()) {
cout << "key:" << it->key().ToString() << ", value:" << *(int32_t*)(it->value().data()) << endl;
}
cout << "--reverse iterator-" << endl;
for (it->SeekForPrev(sliceEnd);
it->Valid() && it->key().ToString() > string(sliceStart.data_);
it->Prev()) {
cout << "key:" << it->key().ToString() << ", value:" << *(int32_t*)(it->value().data()) << endl;
}
// delete value
cout << "----delete---------" << endl;
// s = db->Delete(WriteOptions(), "/20171226/service0/attr0/0");
WriteBatch batch_delete;
batch_write(&batch_delete, RO_DELETE, "/20171226/service0/attr0/0", 0);
s = db->Write(WriteOptions(), &batch_delete);
err_exit((char*)"DB::Delete(\"/20171226/service0/attr0/0\")", s);
value.Reset();
// s = db->Get(ReadOptions(), "/20171226/service0/attr0/0", &value);
s = db->Get(ReadOptions(), db->DefaultColumnFamily(), "/20171226/service0/attr0/0", &value);
if (s.ok()) {
cout << "fail to delete key:" << "/20171226/service0/attr0/0" << endl;
}
delete db;
return 0;
}
void cf_batch_write(WriteBatch* batch, ColumnFamilyHandle* cf, RocksOp op, string key, int32_t value)
{
switch (op) {
case RO_WRITE: {
Status s = batch->Put(cf, key, Slice((char*)&value, sizeof(value)));
err_exit((char*)"Batch::Put", s);
break;
}
case RO_DELETE: {
Status s = batch->Delete(cf, key);
err_exit((char*)"Batch::Delete", s);
break;
}
}
}
int testColumnFamilies()
{
Options options;
options.OptimizeLevelStyleCompaction();
options.IncreaseParallelism();
options.create_if_missing = true;
ColumnFamilyOptions cf_options(options);
vector<string> column_family_names;
vector<ColumnFamilyDescriptor> descriptors;
vector<ColumnFamilyHandle*> handles;
string table = "test";
cout << "-create column family--" << endl;
Status s = DB::Open(options, kDBPath, &db);
err_exit((char*)"DB::Open", s);
// create column family
ColumnFamilyHandle* cf = NULL;
s = db->CreateColumnFamily(ColumnFamilyOptions(), table, &cf);
if (!s.ok()) {
printf("create table %s, err:%d-%d-%s\n", table.data(), s.code(), s.subcode(), s.ToString().c_str());
}
// close DB
delete cf;
cf = nullptr;
delete db;
db = nullptr;
// list column family
s = DB::ListColumnFamilies(options, kDBPath, &column_family_names);
// err_exit((char*)"DB::ListColumnFamilies", s);
for (auto name : column_family_names) {
cout << "column family: " << name << endl;
}
cout << "--open read only---" << endl;
// Open database
// open DB with two column families
descriptors.clear();
// have to open default column family
descriptors.push_back(ColumnFamilyDescriptor(kDefaultColumnFamilyName, ColumnFamilyOptions()));
// open the new one, too
descriptors.push_back(ColumnFamilyDescriptor(table, ColumnFamilyOptions()));
db = nullptr;
handles.clear();
s = DB::OpenForReadOnly(options, kDBPath, descriptors, &handles, &db);
err_exit((char*)"DB::OpenForReadOnly", s);
delete db;
cout << "----open-----------" << endl;
// Open database
// open DB with two column families
descriptors.clear();
// have to open default column family
descriptors.push_back(ColumnFamilyDescriptor(kDefaultColumnFamilyName, ColumnFamilyOptions()));
// open the new one, too
descriptors.push_back(ColumnFamilyDescriptor(table, ColumnFamilyOptions()));
db = nullptr;
handles.clear();
s = DB::Open(options, kDBPath, descriptors, &handles, &db);
err_exit((char*)"DB::Open", s);
// create column family
if (handles.size() > 0) {
for (auto &h:handles) {
if (h->GetName() == table) {
cf = h;
} else {
delete h;
}
}
}
if (!cf) {
s = db->CreateColumnFamily(ColumnFamilyOptions(), table, &cf);
err_exit((char*)"DB::CreateColumnFamily", s);
}
cout << "table name:" << cf->GetName() << endl;
// Put
cout << "----put------------" << endl;
string key = "/20180102/service0/attr0/720";
int value = 12345;
WriteBatch batch;
cf_batch_write(&batch, cf, RO_WRITE, key, value);
s = db->Write(WriteOptions(), &batch);
err_exit((char*)"DB::Write", s);
// Get
cout << "----get------------" << endl;
PinnableSlice ps;
cout << "hello0" << endl;
s = db->Get(ReadOptions(), cf, key, &ps);
cout << "hello1" << endl;
err_exit((char*)(("DB::Get(" + key + ")").data()), s);
cout << *(int32_t*)(ps.data()) << endl;
assert(*(int32_t*)(ps.data()) == (int32_t)(value));
ps.Reset();
// multi-get values
cout << "----multi-get -----" << endl;
vector<Status> statusArray;
vector<ColumnFamilyHandle*> cfArray = {cf};
vector<Slice> keyArray = {key};
vector<string> valueArray;
statusArray = db->MultiGet(ReadOptions(), cfArray, keyArray, &valueArray);
int idx = 0;
for (auto &s:statusArray) {
err_exit((char*)("MultiGet"), s);
cout << "key:" << keyArray[idx].data_ << ", value:" << *(int32_t*)(valueArray[idx].data()) << endl;
idx ++;
}
// for-range
cout << "----for-range -----" << endl;
Iterator* it = db->NewIterator(ReadOptions(), cf);
for (it->SeekToFirst(); it->Valid(); it->Next()) {
cout << "key:" << it->key().ToString() << ", value:" << *(int32_t*)(it->value().data()) << endl;
}
cout << "-reverse-for-range-" << endl;
for (it->SeekToLast(); it->Valid(); it->Prev()) {
cout << "key:" << it->key().ToString() << ", value:" << *(int32_t*)(it->value().data()) << endl;
}
// iterator
cout << "----iterator ------" << endl;
Slice sliceStart("/20171227");
string sliceEnd("/20181229");
for (it->Seek(sliceStart);
it->Valid() && it->key().ToString() < sliceEnd;
it->Next()) {
cout << "key:" << it->key().ToString() << ", value:" << *(int32_t*)(it->value().data()) << endl;
}
cout << "--reverse iterator-" << endl;
for (it->SeekForPrev(sliceEnd);
it->Valid() && it->key().ToString() > string(sliceStart.data_);
it->Prev()) {
cout << "key:" << it->key().ToString() << ", value:" << *(int32_t*)(it->value().data()) << endl;
}
// delete value
cout << "----delete---------" << endl;
// s = db->Delete(WriteOptions(), cf, key);
WriteBatch batch2;
cf_batch_write(&batch2, cf, RO_DELETE, key, 0);
s = db->Write(WriteOptions(), &batch2);
err_exit((char*)(("DB::Delete(" + key + ")").data()), s);
ps.Reset();
// s = db->Get(ReadOptions(), "/20171226/service0/attr0/0", &value);
s = db->Get(ReadOptions(), cf, key, &ps);
if (s.ok()) {
cout << "fail to delete key:" << key << endl;
}
// close column family
// db->DropColumnFamily(cf); // this api will delete all "test" column family's data
delete cf;
delete db;
// delete the DB
DestroyDB(kDBPath, Options());
return 0;
}
// rm -rf kDBPath before run this test
int testTTL()
{
Options options;
options.OptimizeLevelStyleCompaction();
options.IncreaseParallelism();
options.create_if_missing = true;
options.disable_auto_compactions = true;
ColumnFamilyOptions cf_options(options);
vector<string> column_family_names;
vector<ColumnFamilyDescriptor> descriptors;
vector<ColumnFamilyHandle*> handles;
string cfname = "test_cf";
vector<int32_t> TTL;
TTL.push_back(DB_TTL);
TTL.push_back(DB_TTL);
cout << "-create column family--" << endl;
DB* db = nullptr;
ColumnFamilyHandle* cf = nullptr;
Status s = DB::Open(options, kDBPath, &db);
err_exit((char*)"DB::Open", s);
s = db->CreateColumnFamily(ColumnFamilyOptions(), cfname, &cf);
assert(s.ok());
delete cf;
delete db;
descriptors.push_back(ColumnFamilyDescriptor(kDefaultColumnFamilyName, ColumnFamilyOptions()));
descriptors.push_back(ColumnFamilyDescriptor(cfname, ColumnFamilyOptions()));
rocksdb::DBWithTTL* ttlDB = nullptr;
s = DBWithTTL::Open(options, kDBPath, descriptors, &handles, &ttlDB, TTL, false);
err_exit((char*)"DB::Open", s);
db = ttlDB;
// create column family
// ColumnFamilyHandle* cf = NULL;
// s = db->CreateColumnFamily(ColumnFamilyOptions(), cfname, &cf);
// if (!s.ok()) {
// printf("create table %s, err:%d-%d-%s\n", cfname.data(), s.code(), s.subcode(), s.ToString().c_str());
// }
// Put
cout << "----put------------" << endl;
string key = "/20180102/service0/attr0/720";
int value = 12345;
s = db->Put(WriteOptions(), handles[1], key, Slice((char*)&value, sizeof(value)));
err_exit((char*)"DB::Put", s);
// Get
cout << "----get------------" << endl;
PinnableSlice ps;
s = db->Get(ReadOptions(), handles[1], key, &ps);
err_exit((char*)(("DB::Get(" + key + ")").data()), s);
cout << *(int32_t*)(ps.data()) << endl;
ps.Reset();
// Flush
FlushOptions flush_options;
flush_options.wait = true;
db->Flush(flush_options, handles[1]);
// Sleep
chrono::seconds dura(DB_TTL + 10);
this_thread::sleep_for(dura);
// Manual Compaction
// s = db->CompactFiles(rocksdb::CompactionOptions(), {kDBPath + "/000010.sst"}, 0);
// err_exit((char*)"DB::CompactFiles", s);
Slice sliceStart(key);
string end("/20181229");
Slice sliceEnd(end);
s = db->CompactRange(CompactRangeOptions(), handles[1], &sliceStart, &sliceEnd);
err_exit((char*)"DB::CompactRange", s);
// iterator
cout << "----iterator ------" << endl;
Iterator* it = db->NewIterator(ReadOptions(), handles[1]);
for (it->Seek(sliceStart);
it->Valid() && it->key().ToString() < end;
it->Next()) {
cout << "key:" << it->key().ToString() << ", value:" << *(int32_t*)(it->value().data()) << endl;
}
// Get
cout << "----get------------" << endl;
ps.Reset();
s = db->Get(ReadOptions(), handles[1], key, &ps);
err_exit((char*)(("DB::Get(" + key + ")").data()), s);
cout << *(int32_t*)(ps.data()) << endl;
ps.Reset();
// close DB
delete cf;
cf = nullptr;
delete db;
db = nullptr;
return 0;
}
int testBlockCache()
{
DBOptions db_opt;
db_opt.create_if_missing = true;
std::vector<ColumnFamilyDescriptor> cf_descs;
cf_descs.push_back({kDefaultColumnFamilyName, ColumnFamilyOptions()});
cf_descs.push_back({"new_cf", ColumnFamilyOptions()});
// initialize BlockBasedTableOptions
// auto cache = NewLRUCache(1 * 1024 * 1024 * 1024);
auto cache = NewLRUCache(1 * 1024);
BlockBasedTableOptions bbt_opts;
bbt_opts.block_size = 32 * 1024;
bbt_opts.block_cache = cache;
// initialize column families options
std::unique_ptr<CompactionFilter> compaction_filter;
compaction_filter.reset(new DummyCompactionFilter());
cf_descs[0].options.table_factory.reset(NewBlockBasedTableFactory(bbt_opts));
cf_descs[0].options.compaction_filter = compaction_filter.get();
cf_descs[1].options.table_factory.reset(NewBlockBasedTableFactory(bbt_opts));
// destroy and open DB
DB* db;
Status s = DestroyDB(kDBPath, Options(db_opt, cf_descs[0].options));
assert(s.ok());
s = DB::Open(Options(db_opt, cf_descs[0].options), kDBPath, &db);
assert(s.ok());
// Create column family, and rocksdb will persist the options.
ColumnFamilyHandle* cf;
s = db->CreateColumnFamily(ColumnFamilyOptions(), "new_cf", &cf);
assert(s.ok());
// close DB
delete cf;
delete db;
// In the following code, we will reopen the rocksdb instance using
// the options file stored in the db directory.
// Load the options file.
DBOptions loaded_db_opt;
std::vector<ColumnFamilyDescriptor> loaded_cf_descs;
s = LoadLatestOptions(kDBPath, Env::Default(), &loaded_db_opt, &loaded_cf_descs);
assert(s.ok());
assert(loaded_db_opt.create_if_missing == db_opt.create_if_missing);
// Initialize pointer options for each column family
for (size_t i = 0; i < loaded_cf_descs.size(); ++i) {
auto* loaded_bbt_opt = reinterpret_cast<BlockBasedTableOptions*>(
loaded_cf_descs[0].options.table_factory->GetOptions());
// Expect the same as BlockBasedTableOptions will be loaded form file.
assert(loaded_bbt_opt->block_size == bbt_opts.block_size);
// However, block_cache needs to be manually initialized as documented
// in rocksdb/utilities/options_util.h.
loaded_bbt_opt->block_cache = cache;
}
// In addition, as pointer options are initialized with default value,
// we need to properly initialized all the pointer options if non-defalut
// values are used before calling DB::Open().
assert(loaded_cf_descs[0].options.compaction_filter == nullptr);
loaded_cf_descs[0].options.compaction_filter = compaction_filter.get();
// reopen the db using the loaded options.
std::vector<ColumnFamilyHandle*> handles;
s = DB::Open(loaded_db_opt, kDBPath, loaded_cf_descs, &handles, &db);
assert(s.ok());
// close DB
for (auto* handle : handles) {
delete handle;
}
delete db;
return 0;
}
int main(int argc, char** argv)
{
// testDefaultCF();
// testColumnFamilies();
// testTTL();
testBlockCache();
return 0;
}
| [
"alexstocks@foxmail.com"
] | alexstocks@foxmail.com |
fb604ac64aa3269e01fb3884592f0bab2adc49fb | 6b40e9dccf2edc767c44df3acd9b626fcd586b4d | /NT/printscan/wia/drivers/video/filter/stillf.cpp | 9baadcffb097dad107ec1020329f27ec53a10d91 | [] | no_license | jjzhang166/WinNT5_src_20201004 | 712894fcf94fb82c49e5cd09d719da00740e0436 | b2db264153b80fbb91ef5fc9f57b387e223dbfc2 | refs/heads/Win2K3 | 2023-08-12T01:31:59.670176 | 2021-10-14T15:14:37 | 2021-10-14T15:14:37 | 586,134,273 | 1 | 0 | null | 2023-01-07T03:47:45 | 2023-01-07T03:47:44 | null | UTF-8 | C++ | false | false | 19,547 | cpp | /*****************************************************************************
*
* (C) COPYRIGHT MICROSOFT CORPORATION, 1998-2000
*
* TITLE: stillf.cpp
*
* VERSION: 1.1
*
* AUTHOR: WilliamH (created)
* RickTu
*
* DATE: 9/7/98
*
* DESCRIPTION: This module implements video stream capture filter.
* It implements CStillFilter objects.
* implements IID_IStillGraph interface provided for the caller
*
*****************************************************************************/
#include <precomp.h>
#pragma hdrstop
HINSTANCE g_hInstance;
extern "C" BOOL WINAPI DllEntryPoint(HINSTANCE hInstance, ULONG ulReason, LPVOID pv);
/*****************************************************************************
DllMain
<Notes>
*****************************************************************************/
BOOL
DllMain(HINSTANCE hInstance,
DWORD dwReason,
LPVOID lpReserved)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
{
//
// Init Debug subsystem
//
DBG_INIT(hInstance);
//
// Requires '{' and '}' since DBG_FN is an object with a
// constructor and a destructor.
//
DBG_FN("DllMain - ProcessAttach");
//
// We do not need thread attach/detach calls
//
DisableThreadLibraryCalls(hInstance);
//
// Record what instance we are
//
g_hInstance = hInstance;
}
break;
case DLL_PROCESS_DETACH:
{
//
// Requires '{' and '}' since DBG_FN is an object with a
// constructor and a destructor.
//
DBG_FN("DllMain - ProcessDetach");
}
break;
}
return DllEntryPoint(hInstance, dwReason, lpReserved);
}
///////////////////////////////
// sudPinTypes
//
// template definitions for CClassFactorySample
//
const AMOVIESETUP_MEDIATYPE sudPinTypes =
{
&MEDIATYPE_Video, // major media type GUID
&MEDIASUBTYPE_NULL // subtype GUID
};
///////////////////////////////
// psudPins
//
const AMOVIESETUP_PIN psudPins[] =
{
{
// CStillInputPin
L"Input", // pin name
FALSE, // not rendered
FALSE, // not output pin
FALSE, // not allow none
FALSE, // not allow many
&CLSID_NULL, // connect to any filter
L"Output", // connect to output pin
1, // one media type
&sudPinTypes // the media type
},
{
// CStillInputPin
L"Output", // pin name
FALSE, // not rendered
TRUE, // not output pin
FALSE, // not allow none
FALSE, // not allow many
&CLSID_NULL, // connect to any filter
L"Input", // connect to input pin
1, // one media type
&sudPinTypes // the media type
}
};
///////////////////////////////
// sudStillFilter
//
const AMOVIESETUP_FILTER sudStillFilter =
{
&CLSID_STILL_FILTER, // filter clsid
L"WIA Stream Snapshot Filter", // filter name
MERIT_DO_NOT_USE, //
2, // two pins
psudPins, // our pins
};
///////////////////////////////
// g_Templates
//
CFactoryTemplate g_Templates[1] =
{
{
L"WIA Stream Snapshot Filter", // filter name
&CLSID_STILL_FILTER, // filter clsid
CStillFilter::CreateInstance, // API used to create filter instances
NULL, // no init function provided.
&sudStillFilter // the filter itself
},
};
int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]);
/*****************************************************************************
DllRegisterServer
Used to register the classes provided in this dll.
*****************************************************************************/
STDAPI DllRegisterServer()
{
return AMovieDllRegisterServer2(TRUE);
}
/*****************************************************************************
DllUnregisterServer
Used to unregister classes provided by this dll.
*****************************************************************************/
STDAPI
DllUnregisterServer()
{
return AMovieDllRegisterServer2(FALSE);
}
/*****************************************************************************
CStillFilter::CreateInstance
CreateInstance API to create CStillFilter instances
*****************************************************************************/
CUnknown* WINAPI CStillFilter::CreateInstance(LPUNKNOWN pUnk,
HRESULT *phr )
{
return new CStillFilter(TEXT("Stream Snapshot Filter"), pUnk, phr );
}
#ifdef DEBUG
/*****************************************************************************
DisplayMediaType
<Notes>
*****************************************************************************/
void DisplayMediaType(const CMediaType *pmt)
{
//
// Dump the GUID types and a short description
//
DBG_TRC(("<--- CMediaType 0x%x --->",pmt));
DBG_PRT(("Major type == %S",
GuidNames[*pmt->Type()]));
DBG_PRT(("Subtype == %S (%S)",
GuidNames[*pmt->Subtype()],GetSubtypeName(pmt->Subtype())));
DBG_PRT(("Format size == %d",pmt->cbFormat));
DBG_PRT(("Sample size == %d",pmt->GetSampleSize()));
//
// Dump the generic media types
//
if (pmt->IsFixedSize())
{
DBG_PRT(("==> This media type IS a fixed size sample"));
}
else
{
DBG_PRT(("==> This media type IS NOT a fixed size sample >"));
}
if (pmt->IsTemporalCompressed())
{
DBG_PRT(("==> This media type IS temporally compressed"));
}
else
{
DBG_PRT(("==> This media type IS NOT temporally compressed"));
}
}
#endif
/*****************************************************************************
DefaultGetBitsCallback
<Notes>
*****************************************************************************/
void DefaultGetBitsCallback(int Count,
LPARAM lParam)
{
SetEvent((HANDLE)lParam);
}
/*****************************************************************************
CStillFilter constructor
<Notes>
*****************************************************************************/
CStillFilter::CStillFilter(TCHAR *pObjName,
LPUNKNOWN pUnk,
HRESULT *phr) :
m_pInputPin(NULL),
m_pOutputPin(NULL),
m_pbmi(NULL),
m_pBits(NULL),
m_BitsSize(0),
m_bmiSize(0),
m_pCallback(NULL),
CBaseFilter(pObjName, pUnk, &m_Lock, CLSID_STILL_FILTER)
{
DBG_FN("CStillFilter::CStillFilter");
// create our input and output pin
m_pInputPin = new CStillInputPin(TEXT("WIA Still Input Pin"),
this,
phr,
L"Input");
if (!m_pInputPin)
{
DBG_ERR(("Unable to create new CStillInputPin!"));
*phr = E_OUTOFMEMORY;
return;
}
m_pOutputPin = new CStillOutputPin(TEXT("WIA Still Output Pin"),
this,
phr,
L"Output");
if (!m_pOutputPin)
{
DBG_ERR(("Unable to create new CStillOutputPin!"));
*phr = E_OUTOFMEMORY;
return;
}
}
/*****************************************************************************
CStillFilter desctructor
<Notes>
*****************************************************************************/
CStillFilter::~CStillFilter()
{
DBG_FN("CStillFilter::~CStillFilter");
if (m_pInputPin)
{
delete m_pInputPin;
m_pInputPin = NULL;
}
if (m_pOutputPin)
{
if (m_pOutputPin->m_pMediaUnk)
{
m_pOutputPin->m_pMediaUnk->Release();
m_pOutputPin->m_pMediaUnk = NULL;
}
delete m_pOutputPin;
m_pOutputPin = NULL;
}
if (m_pbmi)
{
delete [] m_pbmi;
m_pbmi = NULL;
}
if (m_pBits)
{
delete [] m_pBits;
m_pBits = NULL;
}
}
/*****************************************************************************
CStillFilter::NonDelegatingQueryInterface
Add our logic to the base class QI.
*****************************************************************************/
STDMETHODIMP
CStillFilter::NonDelegatingQueryInterface(REFIID riid,
void **ppv)
{
DBG_FN("CStillFilter::NonDelegatingQueryInterface");
ASSERT(this!=NULL);
ASSERT(ppv!=NULL);
HRESULT hr;
if (!ppv)
{
hr = E_INVALIDARG;
}
else if (riid == IID_IStillSnapshot)
{
hr = GetInterface((IStillSnapshot *)this, ppv);
}
else
{
hr = CBaseFilter::NonDelegatingQueryInterface(riid, ppv);
}
return hr;
}
/*****************************************************************************
CStillFilter::GetPinCount
<Notes>
*****************************************************************************/
int
CStillFilter::GetPinCount()
{
return 2; // input & output
}
/*****************************************************************************
CStillFilter::GetPin
<Notes>
*****************************************************************************/
CBasePin*
CStillFilter::GetPin( int n )
{
ASSERT(this!=NULL);
if (0 == n)
{
ASSERT(m_pInputPin!=NULL);
return (CBasePin *)m_pInputPin;
}
else if (1 == n)
{
ASSERT(m_pOutputPin!=NULL);
return (CBasePin *)m_pOutputPin;
}
return NULL;
}
/*****************************************************************************
CStillFilter::Snapshot
<Notes>
*****************************************************************************/
STDMETHODIMP
CStillFilter::Snapshot( ULONG TimeStamp )
{
DBG_FN("CStillFilter::Snapshot");
ASSERT(this!=NULL);
ASSERT(m_pInputPin!=NULL);
HRESULT hr = E_POINTER;
if (m_pInputPin)
{
hr = m_pInputPin->Snapshot(TimeStamp);
}
CHECK_S_OK(hr);
return hr;
}
/*****************************************************************************
CStillFilter::GetBitsSize
<Notes>
*****************************************************************************/
STDMETHODIMP_(DWORD)
CStillFilter::GetBitsSize()
{
DBG_FN("CStillFilter::GetBitsSize");
ASSERT(this!=NULL);
return m_BitsSize;
}
/*****************************************************************************
CStillFilter::GetBitmapInfoSize
<Notes>
*****************************************************************************/
STDMETHODIMP_(DWORD)
CStillFilter::GetBitmapInfoSize()
{
DBG_FN("CStillFilter::GetBitmapInfoSize");
ASSERT(this!=NULL);
return m_bmiSize;
}
/*****************************************************************************
CStillFilter::GetBitmapInfo
<Notes>
*****************************************************************************/
STDMETHODIMP
CStillFilter::GetBitmapInfo( BYTE* Buffer, DWORD BufferSize )
{
DBG_FN("CStillFilter::GetBitmapInfo");
ASSERT(this !=NULL);
ASSERT(m_pbmi !=NULL);
if (BufferSize && !Buffer)
return E_INVALIDARG;
if (BufferSize < m_bmiSize)
return HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
if (!m_pbmi)
return E_UNEXPECTED;
memcpy(Buffer, m_pbmi, m_bmiSize);
return NOERROR;
}
/*****************************************************************************
CStillFilter::GetBitmapInfoHeader
<Notes>
*****************************************************************************/
STDMETHODIMP
CStillFilter::GetBitmapInfoHeader( BITMAPINFOHEADER *pbmih )
{
DBG_FN("CStillFilter::GetBitmapInfoHeader");
ASSERT(this !=NULL);
ASSERT(m_pbmi !=NULL);
ASSERT(pbmih !=NULL);
HRESULT hr;
if (!pbmih)
{
hr = E_INVALIDARG;
}
else if (!m_pbmi)
{
hr = E_POINTER;
}
else
{
*pbmih = *(BITMAPINFOHEADER*)m_pbmi;
hr = S_OK;
}
CHECK_S_OK(hr);
return hr;
}
/*****************************************************************************
CStillFilter::SetSamplingSize
<Notes>
*****************************************************************************/
STDMETHODIMP
CStillFilter::SetSamplingSize( int Size )
{
DBG_FN("CStillFilter::SetSamplingSize");
ASSERT(this !=NULL);
ASSERT(m_pInputPin !=NULL);
HRESULT hr = E_POINTER;
if (m_pInputPin)
{
hr = m_pInputPin->SetSamplingSize(Size);
}
CHECK_S_OK(hr);
return hr;
}
/*****************************************************************************
CStillFilter::GetSamplingSize
<Notes>
*****************************************************************************/
STDMETHODIMP_(int)
CStillFilter::GetSamplingSize()
{
DBG_FN("CStillFilter::GetSamplingSize");
ASSERT(this !=NULL);
ASSERT(m_pInputPin !=NULL);
HRESULT hr = E_POINTER;
if (m_pInputPin)
{
hr = m_pInputPin->GetSamplingSize();
}
CHECK_S_OK(hr);
return hr;
}
/*****************************************************************************
CStillFilter::RegisterSnapshotCallback
This function registers a notification callback for newly
arrived frames. Without registering a callback, all captured
frames are discarded.
*****************************************************************************/
STDMETHODIMP
CStillFilter::RegisterSnapshotCallback( LPSNAPSHOTCALLBACK pCallback,
LPARAM lParam
)
{
DBG_FN("CStillFilter::RegisterSnapshotCallback");
ASSERT(this != NULL);
HRESULT hr = S_OK;
m_Lock.Lock();
if (pCallback && !m_pCallback)
{
m_pCallback = pCallback;
m_CallbackParam = lParam;
}
else if (!pCallback)
{
m_pCallback = NULL;
m_CallbackParam = 0;
}
else if (m_pCallback)
{
DBG_TRC(("registering snapshot callback when it is already registered"));
hr = E_INVALIDARG;
}
m_Lock.Unlock();
CHECK_S_OK(hr);
return hr;
}
/*****************************************************************************
CStillFilter::DeliverSnapshot
This function is called from the input pin whenever a new frame is captured.
The given parameter points to the pixel data (BITMAPINFOHEADER is already
cached in *m_pbmi). A new DIB is allocated to store away the newly arrived
bits. The new bits are ignored, however, if the callback is not registered.
*****************************************************************************/
HRESULT
CStillFilter::DeliverSnapshot(HGLOBAL hDib)
{
DBG_FN("CStillFilter::DeliverSnapshot");
ASSERT(this !=NULL);
ASSERT(hDib !=NULL);
HRESULT hr = S_OK;
if (hDib == NULL)
{
hr = E_POINTER;
CHECK_S_OK2(hr, ("CStillFilter::DeliverSnapshot received NULL param"));
}
if (hr == S_OK)
{
m_Lock.Lock();
if (m_pCallback && hDib)
{
BOOL bSuccess = TRUE;
bSuccess = (*m_pCallback)(hDib, m_CallbackParam);
}
m_Lock.Unlock();
}
return hr;
}
/*****************************************************************************
CStillFilter::InitializeBitmapInfo
This function intialize allocates a BITMAPINFO and copies BITMAPINFOHEADER
and necessary color table or color mask fromt the given VIDEOINFO.
*****************************************************************************/
HRESULT
CStillFilter::InitializeBitmapInfo( BITMAPINFOHEADER *pbmiHeader )
{
DBG_FN("CStillFilter::InitializeBitmapInfo");
ASSERT(this !=NULL);
ASSERT(pbmiHeader !=NULL);
HRESULT hr = E_OUTOFMEMORY;
if (!pbmiHeader)
{
hr = E_INVALIDARG;
}
else
{
int ColorTableSize = 0;
m_bmiSize = pbmiHeader->biSize;
if (pbmiHeader->biBitCount <= 8)
{
//
// If biClrUsed is zero, it indicates (1 << biBitCount) entries
//
if (pbmiHeader->biClrUsed)
ColorTableSize = pbmiHeader->biClrUsed * sizeof(RGBQUAD);
else
ColorTableSize = ((DWORD)1 << pbmiHeader->biBitCount) *
sizeof(RGBQUAD);
m_bmiSize += ColorTableSize;
}
//
// color mask
//
if (BI_BITFIELDS == pbmiHeader->biCompression)
{
//
// 3 dword of mask
//
m_bmiSize += 3 * sizeof(DWORD);
}
//
// now calculate bits size
// each scanline must be 32 bits aligned.
//
m_BitsSize = (((pbmiHeader->biWidth * pbmiHeader->biBitCount + 31)
& ~31) >> 3)
* ((pbmiHeader->biHeight < 0) ? -pbmiHeader->biHeight:
pbmiHeader->biHeight);
m_DIBSize = m_bmiSize + m_BitsSize;
if (m_pbmi)
{
delete [] m_pbmi;
}
m_pbmi = new BYTE[m_bmiSize];
if (m_pbmi)
{
BYTE *pColorTable = ((BYTE*)pbmiHeader + (WORD)(pbmiHeader->biSize));
//
// Copy BITMAPINFOHEADER
//
memcpy(m_pbmi, pbmiHeader, pbmiHeader->biSize);
//
// copy the color table or color masks if there are any
//
if (BI_BITFIELDS == pbmiHeader->biCompression)
{
memcpy(m_pbmi + pbmiHeader->biSize,
pColorTable,
3 * sizeof(DWORD));
}
if (ColorTableSize)
{
memcpy(m_pbmi + pbmiHeader->biSize,
pColorTable,
ColorTableSize);
}
hr = S_OK;
}
}
CHECK_S_OK(hr);
return hr;
}
| [
"seta7D5@protonmail.com"
] | seta7D5@protonmail.com |
b6c082617cb677ee2d380bbcf9039e0296be6010 | 8570aaf4c66fadb8aaaca8e7f3e7b37c70076f0a | /lcluster/lcluster/Cluster.h | 597162ec96110c4cfe9dcb984d813fb78e3e5553 | [] | no_license | laerad84/Analysis | 7d668f4d77a8f01110245a7cd0e1c38f9d6f22a0 | 26525a6467430354ff7ff4ad809e68964d116a08 | refs/heads/master | 2021-01-22T23:26:28.217804 | 2014-07-01T05:38:40 | 2014-07-01T05:38:40 | 4,693,150 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,887 | h | // -*- C++ -*-
//
// Cluster.h
// cluster container class ( imported from E391a library)
//
// Author: Kazufumi Ssato
// Created: Sun Nov 25 16:02 JST 2011
//
// $Id: Cluster.h,v 1.1 2011/11/25 16:02 sato Exp $
//
//
// $Log: Cluster.h,v $
//
//
#ifndef CLUSTER_H_INCLUDED
#define CLUSTER_H_INCLUDED
#include <iostream>
#include <list>
#include <vector>
#include <cstdlib>
#include "GsimPersistency/GsimMessage.h"
#include "CLHEP/Vector/ThreeVector.h"
class Cluster {
public:
// constructor
Cluster();
// destructor
~Cluster();
// operator
bool operator<( const Cluster& ) const;
bool operator==( const Cluster& ) const;
// extractor
int id() const { return m_id; }
int status() const { return m_status; }
double threshold() const{ return m_threshold; }
double e() const { return m_energy; }
const CLHEP::Hep3Vector& pos() const { return m_pos; }
double x() const { return m_pos.x(); }
double y() const { return m_pos.y(); }
double z() const { return m_pos.z(); }
double t() const { return m_time; }
double rms() const { return m_rms; }
// const std::list<int>& clusterIdList() const { return m_cidList; }
const std::vector<int>& clusterIdVec() const { return m_cidVec; }
const std::vector<double>& clusterEVec() const { return m_eVec; }
const std::vector<double>& clusterTimeVec() const { return m_timeVec; }
// method
void setId( int id ) { m_id = id; }
void setStatus(int stat){ m_status = stat; }
void setThreshold(double thre){ m_threshold = thre; }
void setEnergy( double energy ){m_energy = energy;}
void setPos( const CLHEP::Hep3Vector& pos ){m_pos = pos;}
void setPos( double x, double y, double z )
{ setPos(CLHEP::Hep3Vector( x,y,z )); }
void setTime( double time ){m_time = time;}
void setRms( double rms ) { m_rms = rms; }
void setClusterIdList( const std::list<int>& cidList ){m_cidList = cidList;}
void setClusterIdVec( const std::vector<int>& cidVec ){m_cidVec = cidVec;}
void setClusterEVec( const std::vector<double>& eVec ){m_eVec = eVec;}
void setClusterTimeVec( const std::vector<double>& timeVec ){m_timeVec = timeVec;}
// friend functions
friend std::ostream& operator<<( std::ostream& out, const Cluster& clus );
private:
int m_id;
int m_status;
double m_threshold;
double m_energy;
CLHEP::Hep3Vector m_pos;
double m_time;
double m_rms;
std::vector<int> m_cidVec;
std::vector<double> m_eVec;
std::vector<double> m_timeVec;
std::list<int> m_cidList; // <- for ClusterFinderKoShi
int compare( const Cluster& ) const;
};
//
#endif // CLUSTER_H_INCLUDED
| [
"laerad84@gmail.com"
] | laerad84@gmail.com |
8cd56224cd88c0f56fcd45fab4279353e3cab531 | c48dcd857a3369a7a86fd0eaef971bff9633b67f | /trunk/zat/lib/zstring.cc | 90ad3bcb68dccdbb3088e157b0bc5e8267e7a002 | [] | no_license | BackupTheBerlios/zat-dev-svn | fae6db3477cae636cff8147c59d9c3ee17c76681 | cf86ec1a6a90fff3c822446fda5884ef1c61d4a1 | refs/heads/master | 2020-04-14T21:08:26.085862 | 2005-04-18T08:27:46 | 2005-04-18T08:27:46 | 40,802,317 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,721 | cc | // Zat Assembler Toolchain.
// Copyright (C) 2004-2005 Justin Forest <justin.forest@gmail.com>
//
// $Id$
#include <stdarg.h>
#include <stdio.h>
#include "zstring.h"
void zstring::capsize()
{
for (std::string::iterator it = begin(); it != end(); ++it)
*it = ::toupper(*it);
}
unsigned int zstring::hash() const
{
unsigned int value = 0;
for (std::string::const_iterator it = begin(); it != end(); ++it)
value = value * 31 + static_cast<unsigned char>(*it);
return value;
}
bool zstring::has_path() const
{
for (std::string::const_iterator it = begin(); it != end(); ++it) {
#ifdef _WIN32
if (*it == '\\')
return true;
#endif
if (*it == '/')
return true;
}
return false;
}
zstring zstring::gettok(const char *&src, char sep)
{
const char *org = src, *end;
while (*src != '\0' && *src != sep)
++src;
end = src;
if (*src == sep)
++src;
return zstring(org, end - org);
}
bool zstring::operator == (const char *src) const
{
const_iterator it;
for (it = begin(); it != end() && *src != 0; ++it, ++src)
if (::toupper(*it) != ::toupper(*src))
break;
return (it == end() && *src == 0);
}
zstring& zstring::operator = (const zstring &src)
{
*(std::string *)this = src;
return *this;
}
zstring& zstring::format(const char *format, ...)
{
char *tmp;
va_list vl;
va_start(vl, format);
vasprintf(&tmp, format, vl);
va_end(vl);
*this = tmp;
free(tmp);
return *this;
}
zstring& zstring::trim(char c)
{
std::string::const_iterator src = begin();
std::string::iterator dst = begin();
while (src != end() && *src == ' ')
++src;
while (src != end())
*dst++ = *src++;
while (dst != begin() && *(dst - 1) == c)
--dst;
resize(dst - begin());
return *this;
}
| [
"hex@75074d0f-cef1-0310-aeb8-8f850d70955c"
] | hex@75074d0f-cef1-0310-aeb8-8f850d70955c |
2add73e180461126874ceaf47ca640a9871c3000 | d6face59a153b062f1a86b75fc377fdb5f5a52d4 | /src/out/linux-x64x11_devel/gen/bindings/browser/source/cobalt/h5vcc/v8c_h5vcc_deep_link_event_target.h | f99b89fa0f6c71fc1b75f775ec609dd07ab7f35b | [
"BSD-3-Clause"
] | permissive | blockspacer/cobalt-clone-28052019 | 27fd44e64104e84a4a72d67ceaa8bafcfa72b4a8 | b94e4f78f0ba877fc15310648c72c9c4df8b0ae2 | refs/heads/master | 2022-10-26T04:35:33.702874 | 2019-05-29T11:07:12 | 2019-05-29T11:54:58 | 188,976,123 | 0 | 2 | null | 2022-10-03T12:37:17 | 2019-05-28T07:22:56 | null | UTF-8 | C++ | false | false | 1,628 | h |
// Copyright 2019 The Cobalt Authors. 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.
// clang-format off
// This file has been auto-generated by bindings/code_generator_cobalt.py. DO NOT MODIFY!
// Auto-generated from template: bindings/v8c/templates/interface.h.template
#ifndef V8cH5vccDeepLinkEventTarget_h
#define V8cH5vccDeepLinkEventTarget_h
#include "base/containers/hash_tables.h"
#include "base/lazy_instance.h"
#include "base/memory/ref_counted.h"
#include "base/threading/thread_checker.h"
#include "cobalt/base/polymorphic_downcast.h"
#include "cobalt/script/wrappable.h"
#include "cobalt/h5vcc/h5vcc_deep_link_event_target.h"
#include "cobalt/script/v8c/v8c_global_environment.h"
#include "v8/include/v8.h"
namespace cobalt {
namespace h5vcc {
class V8cH5vccDeepLinkEventTarget {
public:
static v8::Local<v8::Object> CreateWrapper(v8::Isolate* isolate, const scoped_refptr<script::Wrappable>& wrappable);
static v8::Local<v8::FunctionTemplate> GetTemplate(v8::Isolate* isolate);
};
} // namespace h5vcc
} // namespace cobalt
#endif // V8cH5vccDeepLinkEventTarget_h
| [
"trofimov_d_a@magnit.ru"
] | trofimov_d_a@magnit.ru |
dddd30b2b27f01a62e5f886babe68243c9d1fb74 | 6754fedd87afba36ec8f004825bb852b00ac8fb2 | /src/boost/functional/hash/deque.hpp | 06d23c2200847925d44180b7a169e4732c376694 | [
"BSD-3-Clause",
"BSL-1.0"
] | permissive | cpmech/vismatrix | 4e7b8a3e0448f4c9565fa649e9c9af0e05707346 | a4994864d3592cfa2db24119427fad096303fb4f | refs/heads/main | 2021-08-15T21:52:56.975004 | 2020-09-24T00:55:35 | 2020-09-24T00:55:35 | 54,020,206 | 5 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 921 | hpp |
// Copyright 2005-2008 Daniel James.
// 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)
// Based on Peter Dimov's proposal
// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf
// issue 6.18.
#if !defined(BOOST_FUNCTIONAL_HASH_DEQUE_HPP)
#define BOOST_FUNCTIONAL_HASH_DEQUE_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#if defined(__EDG__)
#elif defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
#pragma message("Warning: boost/functional/hash/deque.hpp is deprecated, use boost/functional/hash.hpp instead.")
#elif defined(__GNUC__) || defined(__HP_aCC) || \
defined(__SUNPRO_CC) || defined(__IBMCPP__)
#warning "boost/functional/hash/deque.hpp is deprecated, use boost/functional/hash.hpp instead."
#endif
#include <boost/functional/hash.hpp>
#endif
| [
"dorival.pedroso@gmail.com"
] | dorival.pedroso@gmail.com |
be39afe2c12a6c530fa1cd4d748f7e63e10d55b2 | 5251c97dca338de263d75f987df4db3774e820fa | /C++/include/MNRLNetwork.hpp | d430d1429cb25710614f461b777ad46b48375514 | [
"BSD-3-Clause"
] | permissive | jackwadden/mnrl | 52da2517eaba0ffb3ab5fe23bafb592e4e1b9bd7 | 23a8bf8164e381686f74299b5650bb65010cf92b | refs/heads/master | 2023-05-26T22:55:39.871613 | 2017-08-04T16:04:34 | 2017-08-04T16:04:34 | 99,261,487 | 0 | 0 | null | 2017-08-03T18:06:18 | 2017-08-03T18:06:18 | null | UTF-8 | C++ | false | false | 4,559 | hpp | // Kevin Angstadt
// angstadt {at} virginia.edu
//
// MNRLNetwork Object
#ifndef MNRLNETWORK_HPP
#define MNRLNETWORK_HPP
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include <fstream>
#include "MNRLDefs.hpp"
#include "MNRLError.hpp"
#include "MapIterator.hpp"
namespace MNRL {
class MNRLNode;
class MNRLState;
class MNRLHState;
class MNRLUpCounter;
class MNRLBoolean;
class MNRLNetwork {
public:
MNRLNetwork(std::string id);
virtual ~MNRLNetwork();
virtual void exportToFile(std::string filename);
MapIterator<std::map<std::string,std::shared_ptr<MNRLNode>>> getNodeIterator();
std::map<std::string,std::shared_ptr<MNRLNode>> getNodes();
std::shared_ptr<MNRLNode> getNodeById(std::string id);
std::shared_ptr<MNRLNode> addNode(std::shared_ptr<MNRLNode> theNode);
std::shared_ptr<MNRLState> addState(
std::shared_ptr<std::vector<std::pair<std::string,std::string>>> outputSymbols,
MNRLDefs::EnableType enable,
std::string id,
bool report,
int reportId,
bool latched,
std::shared_ptr<std::map<std::string,std::string>> attributes
);
std::shared_ptr<MNRLState> addState(
std::shared_ptr<std::vector<std::pair<std::string,std::string>>> outputSymbols,
MNRLDefs::EnableType enable,
std::string id,
bool report,
int reportId,
bool latched
);
std::shared_ptr<MNRLHState> addHState(
std::string symbols,
MNRLDefs::EnableType enable,
std::string id,
bool report,
int reportId,
bool latched,
std::shared_ptr<std::map<std::string,std::string>> attributes
);
std::shared_ptr<MNRLHState> addHState(
std::string symbols,
MNRLDefs::EnableType enable,
std::string id,
bool report,
std::string reportId,
bool latched,
std::shared_ptr<std::map<std::string,std::string>> attributes
);
std::shared_ptr<MNRLHState> addHState(
std::string symbols,
MNRLDefs::EnableType enable,
std::string id,
bool report,
bool latched,
std::shared_ptr<std::map<std::string,std::string>> attributes
);
std::shared_ptr<MNRLHState> addHState(
std::string symbols,
MNRLDefs::EnableType enable,
std::string id,
bool report,
int reportId,
bool latched
);
std::shared_ptr<MNRLHState> addHState(
std::string symbols,
MNRLDefs::EnableType enable,
std::string id,
bool report,
std::string reportId,
bool latched
);
std::shared_ptr<MNRLHState> addHState(
std::string symbols,
MNRLDefs::EnableType enable,
std::string id,
bool report,
bool latched
);
std::shared_ptr<MNRLUpCounter> addUpCounter(
int threshold,
MNRLDefs::CounterMode mode,
std::string id,
bool report,
int reportId,
std::shared_ptr<std::map<std::string,std::string>> attributes
);
std::shared_ptr<MNRLUpCounter> addUpCounter(
int threshold,
MNRLDefs::CounterMode mode,
std::string id,
bool report,
int reportId
);
std::shared_ptr<MNRLBoolean> addBoolean(
MNRLDefs::BooleanMode booleanType,
MNRLDefs::EnableType enable,
std::string id,
bool report,
int reportId,
std::shared_ptr<std::map<std::string,std::string>> attributes
);
std::shared_ptr<MNRLBoolean> addBoolean(
MNRLDefs::BooleanMode booleanType,
MNRLDefs::EnableType enable,
std::string id,
bool report,
int reportId
);
void addConnection(std::string src, std::string src_port, std::string dest, std::string dest_port);
void removeConnection(std::string src, std::string src_port, std::string dest, std::string dest_port);
std::string getId();
protected:
std::string id;
std::map <std::string,std::shared_ptr<MNRLNode>> nodes;
unsigned long nodes_added;
std::string getUniqueNodeId(std::string id);
};
}
#endif
| [
"kaa2nx@virginia.edu"
] | kaa2nx@virginia.edu |
1d10bde8c3609e8db320b46c58a498f649f8332b | eb40a068cef3cabd7a0df37a0ec2bde3c1e4e5ae | /dnn/src/rocm/relayout/relayout_contiguous.cpp | bc4314836ca31ca26b4557e411cfc061c2c87aae | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | tpoisonooo/MegEngine | ccb5c089a951e848344f136eaf10a5c66ae8eb6f | b8f7ad47419ef287a1ca17323fd6362c6c69445c | refs/heads/master | 2022-11-07T04:50:40.987573 | 2021-05-27T08:55:50 | 2021-05-27T08:55:50 | 249,964,363 | 1 | 0 | NOASSERTION | 2021-05-27T08:55:50 | 2020-03-25T11:48:35 | null | UTF-8 | C++ | false | false | 2,947 | cpp | /**
* \file dnn/src/rocm/relayout/relayout_contiguous.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#include "hcc_detail/hcc_defs_prologue.h"
#include "src/rocm/relayout/relayout_contiguous.h.hip"
#include "src/common/utils.h"
namespace megdnn {
namespace rocm {
namespace contiguous_intl {
template <int ndim, typename ctype>
void ParamElemVisitor<ndim, ctype, CONTIG_OTHER>::host_init(
const TensorND& rv, int /*grid_size*/, int /*block_size*/) {
megdnn_assert(rv.layout.ndim && rv.layout.ndim <= ndim);
m_ptr = rv.ptr<ctype>();
for (size_t i = 0; i < rv.layout.ndim; ++i) {
m_stride[i] = rv.layout.stride[i];
if (i + 1 < rv.layout.ndim)
m_shape_highdim[i] = rv.layout.shape[i + 1];
}
for (int i = rv.layout.ndim - 1; i < ndim - 1; ++i) {
m_shape_highdim[i] = 1;
}
for (int i = rv.layout.ndim; i < ndim; ++i) {
m_stride[i] = 0;
}
}
template <int ndim, typename ctype>
void ParamElemVisitor<ndim, ctype, CONTIG_FULL>::host_init(const TensorND& rv,
int /*grid_size*/,
int /*block_size*/) {
megdnn_assert_contiguous(rv.layout);
m_ptr = rv.ptr<ctype>();
}
#define INST(ndim, ctype, ctg) template class ParamElemVisitor<ndim, ctype, ctg>
#define INST_FOR_CTYPE MEGDNN_FOREACH_TENSOR_NDIM(ndim_cb)
#define ndim_cb(_ndim) \
INST(_ndim, ct, CONTIG_OTHER); \
INST(_ndim, ct, CONTIG_FULL);
#define ct dt_byte
INST_FOR_CTYPE
#undef ct
#define ct dt_int32
INST_FOR_CTYPE
#undef ct
#define ct dt_float16
INST_FOR_CTYPE
#undef ct
#undef ndim_cb
#undef INST_FOR_CTYPE
#undef INST
} // namespace contiguous_intl
void get_last_contiguous_launch_spec(const void* /*kern*/, size_t size,
size_t contiguous_size, int* grid_size,
int* block_size) {
safe_size_in_kern(size);
const uint32_t blocks = 256;
*block_size = blocks;
int a = size / (blocks * (contiguous_size - 1)),
b = (size - 1) / (blocks * contiguous_size) + 1;
*grid_size = std::max(a, b);
if (!*grid_size) {
*block_size = std::min<int>(std::max<int>(size / 64, 1) * 32, 1024);
*grid_size = std::max<int>(size / *block_size, 1);
}
// because we unroll contiguous_size times in the kernel
megdnn_assert(static_cast<size_t>(*block_size) * *grid_size *
contiguous_size >=
size);
}
} // namespace rocm
} // namespace megdnn
// vim: ft=cpp syntax=cpp.doxygen
| [
"megengine@megvii.com"
] | megengine@megvii.com |
78ee1a61b7ecba3dc2a4b72da4c10d5d0b885fc9 | dbcd2006f283fcb469524d92d884024fa11345ac | /storage/diskmgr/services/storage_service/interface/src/storage_service_stub.cpp | 15c2e389d0046de18df33ffb5839530470582b37 | [
"Apache-2.0"
] | permissive | openharmony-gitee-mirror/distributeddatamgr_file | 380e4841a943d548f810081d86b661d6b099a9b6 | 1e624bbc3850815fa1b2642c67123b7785bec6a1 | refs/heads/master | 2023-08-20T11:39:22.117760 | 2021-10-25T01:53:50 | 2021-10-25T01:53:50 | 400,051,638 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 16,845 | cpp | /*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* 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 "fbe_crypto.h"
#include "interface/storage_service_callback_proxy.h"
#include "ipc/storage_service_task_proxy.h"
#include "storage_hilog.h"
#include "storage_service_stub.h"
namespace OHOS {
void RemoteReturnInt(MessageParcel &reply, int32_t errcode)
{
reply.WriteInt32(errcode);
if (errcode != ERR_NONE) {
SSLOG_E("remote error code =%{public}d ", errcode);
}
}
int32_t StorageServiceStub::OnRemoteRequest(uint32_t code,
MessageParcel &data,
MessageParcel &reply,
MessageOption &option)
{
auto remoteDescriptor = data.ReadInterfaceToken();
if (GetDescriptor() != remoteDescriptor) {
return ERR_INVALID_STATE;
}
int32_t errCode = ERR_NONE;
SSLOG_I("StorageServiceStub::OnRemoteRequest code : %{public}d", code);
switch (code) {
case SS_DOMOUNT: errCode = StorageServiceStub::HandleMount(data, reply); break;
case SS_UNMOUNT: errCode = StorageServiceStub::HandleUnMount(data, reply); break;
case SS_FORMAT: errCode = HandleFormat(data, reply); break;
case SS_REGISTERCALLBACK: errCode = HandleRegisterStorageServiceCallback(data, reply); break;
case SS_PARTITION: errCode = HandlePartition(data, reply); break;
case SS_RESET: errCode = HandleReset(reply); break;
case SS_USERADDED: errCode = HandleUserAdded(data, reply); break;
case SS_USERREMOVED: errCode = HandleUserRemoved(data, reply); break;
case SS_USERSTARTED: errCode = HandleUserStarted(data, reply); break;
case SS_USERSTOPED: errCode = HandleUserStoped(data, reply); break;
case SS_MOVESTORAGE: errCode = HandleMoveStorage(data, reply); break;
case SS_BENCHMARK: errCode = HandleBenchMark(data, reply); break;
case SS_CRYPTO_ENABLE: errCode = HandleCryptoEnable(reply); break;
case SS_CRYPTO_INITIALIZE: errCode = HandleCryptoInitialize(reply); break;
case SS_CRYPTO_CREATEKEY: errCode = HandleCryptoCreateKey(data, reply); break;
case SS_CRYPTO_DELETEKEY: errCode = HandleCryptoDeleteKey(data, reply); break;
case SS_CRYPTO_ADDAUTHKEY: errCode = HandleCryptoAddAuthKey(data, reply); break;
case SS_CRYPTO_DELAUTHKEY: errCode = HandleCryptoDelAuthKey(data, reply); break;
case SS_CRYPTO_UNLOCKKEY: errCode = HandleCryptoUnlockKey(data, reply); break;
case SS_CRYPTO_LOCKKEY: errCode = HandleCryptoLockKey(data, reply); break;
case SS_CRYPTO_INITUSERSPACE: errCode = HandleCryptoInitUserSpace(data, reply); break;
case SS_CRYPTO_REMOVEUSERSPACE: errCode = HandleCryptoRemoveUserSpace(data, reply); break;
case SS_CRYPTO_UPDATEAUTHKEY: errCode = HandleCryptoUpdateAuthKey(data, reply); break;
case SS_IDLEFSTRIM: errCode = HandleIdleFsTrim(reply); break;
case SS_RUNIDLEMAINTAIN: errCode = HandleRunIdleMaintain(reply); break;
case SS_ABORTIDLEMAINTAIN: errCode = HandleAbortIdleMaintain(reply); break;
case SS_PERSISTFSTAB: errCode = HandlePersistFstab(data, reply); break;
case SS_ISENCRYPTED: errCode = HandleIsEncrypted(data, reply); break;
default: {
SSLOG_I("StorageServiceStub::OnRemoteRequest default");
errCode = IPCObjectStub::OnRemoteRequest(code, data, reply, option);
break;
}
}
return errCode;
}
int32_t StorageServiceStub::HandleMount(MessageParcel &data, MessageParcel &reply)
{
SSLOG_I("StorageServiceStub::OnRemoteRequest SS_DOMount");
bool ret = false;
std::string volId = data.ReadString();
int32_t mountFlags = data.ReadInt32();
int32_t mountUserId = data.ReadInt32();
SSLOG_I("StorageServiceStub::OnRemoteRequest: %{public}s MountFlags %{public}d MountUserId "
"%{public}d",
volId.c_str(), mountFlags, mountUserId);
ret = Mount(volId, mountFlags, mountUserId);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
return NO_ERROR;
}
int32_t StorageServiceStub::HandleUnMount(MessageParcel &data, MessageParcel &reply)
{
SSLOG_I("StorageServiceStub::OnRemoteRequest SS_UNMOUNT");
bool ret = false;
std::string volId = data.ReadString();
SSLOG_I("StorageServiceStub::OnRemoteRequest: %{public}s", volId.c_str());
ret = UnMount(volId);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
return NO_ERROR;
}
int32_t StorageServiceStub::HandleFormat(MessageParcel &data, MessageParcel &reply)
{
SSLOG_I("StorageServiceStub::OnRemoteRequest SS_FORMAT");
std::string volId = data.ReadString();
std::string fsType = data.ReadString();
SSLOG_I("StorageServiceStub::OnRemoteRequest:volId is %{public}s,fsType is %{public}s", volId.c_str(),
fsType.c_str());
bool ret = false;
ret = Format(volId, fsType);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
return NO_ERROR;
}
int32_t StorageServiceStub::HandlePersistFstab(MessageParcel &data, MessageParcel &reply)
{
SSLOG_I("StorageServiceStub::OnRemoteRequest SS_PERSISTFSTAB");
bool ret = false;
std::string fstab = data.ReadString();
SSLOG_I("StorageServiceStub::OnRemoteRequest: fstab::%{public}s ", fstab.c_str());
ret = PersistFstab(fstab);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
return NO_ERROR;
}
int32_t StorageServiceStub::HandleIsEncrypted(MessageParcel &data, MessageParcel &reply)
{
SSLOG_I("StorageServiceStub::OnRemoteRequest SS_ISENCRYPTED");
bool ret = false;
std::string filePath = data.ReadString();
SSLOG_I("StorageServiceStub::OnRemoteRequest: SS_ISENCRYPTED::%{public}s ", filePath.c_str());
ret = IsEncrypted(filePath);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
return NO_ERROR;
}
int32_t StorageServiceStub::HandleRegisterStorageServiceCallback(MessageParcel &data, MessageParcel &reply)
{
sptr<IRemoteObject> object = data.ReadRemoteObject();
if (object != nullptr) {
SSLOG_E("remote object is not null");
}
sptr<IStorageServiceCallback> storageServiceCallback = iface_cast<IStorageServiceCallback>(object);
bool ret = false;
if (!storageServiceCallback) {
SSLOG_E("Get IStorageServiceCallback failed");
return TRANSACTION_ERR;
} else {
ret = RegisterStorageServiceCallback(storageServiceCallback);
}
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
return NO_ERROR;
}
int32_t StorageServiceStub::HandlePartition(MessageParcel &data, MessageParcel &reply)
{
bool ret = false;
std::string diskId = data.ReadString();
int32_t partitionType = data.ReadInt32();
int32_t ratio = data.ReadInt32();
ret = Partition(diskId, partitionType, ratio);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
return NO_ERROR;
}
int32_t StorageServiceStub::HandleUserAdded(MessageParcel &data, MessageParcel &reply)
{
bool ret = false;
int32_t userId = data.ReadInt32();
int32_t userSerial = data.ReadInt32();
ret = UserAdded(userId, userSerial);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
return NO_ERROR;
}
int32_t StorageServiceStub::HandleUserRemoved(MessageParcel &data, MessageParcel &reply)
{
bool ret = false;
int32_t userId = data.ReadInt32();
ret = UserRemoved(userId);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
return NO_ERROR;
}
int32_t StorageServiceStub::HandleUserStarted(MessageParcel &data, MessageParcel &reply)
{
bool ret = false;
int32_t userId = data.ReadInt32();
SSLOG_E("__func%{public}s, userId is %{public}d", __func__, userId);
ret = UserStarted(userId);
SSLOG_E(" __func%{public}s, ret is %{public}d", __func__, ret);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
return NO_ERROR;
}
int32_t StorageServiceStub::HandleUserStoped(MessageParcel &data, MessageParcel &reply)
{
bool ret = false;
int32_t userId = data.ReadInt32();
ret = UserStoped(userId);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
return NO_ERROR;
}
int32_t StorageServiceStub::HandleMoveStorage(MessageParcel &data, MessageParcel &reply)
{
bool ret = false;
std::string fromVolId = data.ReadString();
std::string toVolId = data.ReadString();
sptr<IRemoteObject> object = data.ReadRemoteObject();
sptr<IStorageServiceTask> storageServiceTask = iface_cast<IStorageServiceTask>(object);
ret = MoveStorage(fromVolId, toVolId, storageServiceTask);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
return NO_ERROR;
}
int32_t StorageServiceStub::HandleBenchMark(MessageParcel &data, MessageParcel &reply)
{
bool ret = false;
std::string volId = data.ReadString();
sptr<IRemoteObject> object = data.ReadRemoteObject();
sptr<IStorageServiceTask> storageServiceTask = iface_cast<IStorageServiceTask>(object);
ret = BenchMark(volId, storageServiceTask);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
return NO_ERROR;
}
int32_t StorageServiceStub::HandleReset(MessageParcel &reply)
{
SSLOG_E("HandleReset");
bool ret = false;
ret = Reset();
SSLOG_E("HandleReset: %{public}d", ret);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
return NO_ERROR;
}
int32_t StorageServiceStub::HandleCryptoEnable(MessageParcel &reply)
{
SSLOG_I("HandleFbeEnable STARTING....(From gby)");
bool ret = false;
ret = CryptoEnable();
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
SSLOG_I("HandleFbeEnable END....(From gby)");
return NO_ERROR;
}
int32_t StorageServiceStub::HandleCryptoInitialize(MessageParcel &reply)
{
SSLOG_I("HandleInitUser0 STARTING....(From gby)");
bool ret = false;
ret = CryptoInitialize();
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
SSLOG_I("HandleInitUser0 END....(From gby)");
return NO_ERROR;
}
int32_t StorageServiceStub::HandleCryptoCreateKey(MessageParcel &data, MessageParcel &reply)
{
SSLOG_I("HandleInitUser0 STARTING....(From gby)");
bool ret = false;
int32_t userId = data.ReadInt32();
ret = CryptoCreateKey(userId);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
SSLOG_I("HandleInitUser0 END....(From gby)");
return NO_ERROR;
}
int32_t StorageServiceStub::HandleCryptoDeleteKey(MessageParcel &data, MessageParcel &reply)
{
SSLOG_I("HandleInitUser0 STARTING....(From gby)");
bool ret = false;
int32_t userId = data.ReadInt32();
ret = CryptoDeleteKey(userId);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
SSLOG_I("HandleInitUser0 END....(From gby)");
return NO_ERROR;
}
int32_t StorageServiceStub::HandleCryptoAddAuthKey(MessageParcel &data, MessageParcel &reply)
{
SSLOG_I("HandleInitUser0 STARTING....(From gby)");
bool ret = false;
int32_t userId = data.ReadInt32();
const std::string token = data.ReadString();
const std::string secret = data.ReadString();
ret = CryptoAddAuthKey(userId, token, secret);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
SSLOG_I("HandleInitUser0 END....(From gby)");
return NO_ERROR;
}
int32_t StorageServiceStub::HandleCryptoDelAuthKey(MessageParcel &data, MessageParcel &reply)
{
SSLOG_I("HandleInitUser0 STARTING....(From gby)");
bool ret = false;
int32_t userId = data.ReadInt32();
const std::string token = data.ReadString();
const std::string secret = data.ReadString();
ret = CryptoDelAuthKey(userId, token, secret);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
SSLOG_I("HandleInitUser0 END....(From gby)");
return NO_ERROR;
}
int32_t StorageServiceStub::HandleCryptoUnlockKey(MessageParcel &data, MessageParcel &reply)
{
SSLOG_I("HandleInitUser0 STARTING....(From gby)");
bool ret = false;
int32_t userId = data.ReadInt32();
const std::string token = data.ReadString();
const std::string secret = data.ReadString();
ret = CryptoUnlockKey(userId, token, secret);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
SSLOG_I("HandleInitUser0 END....(From gby)");
return NO_ERROR;
}
int32_t StorageServiceStub::HandleCryptoLockKey(MessageParcel &data, MessageParcel &reply)
{
SSLOG_I("HandleInitUser0 STARTING....(From gby)");
bool ret = false;
int32_t userId = data.ReadInt32();
ret = CryptoLockKey(userId);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
SSLOG_I("HandleInitUser0 END....(From gby)");
return NO_ERROR;
}
int32_t StorageServiceStub::HandleCryptoUpdateAuthKey(MessageParcel &data, MessageParcel &reply)
{
SSLOG_I("HandleInitUser0 STARTING....(From gby)");
bool ret = false;
int32_t userId = data.ReadInt32();
const std::string token = data.ReadString();
const std::string secret = data.ReadString();
ret = CryptoUpdateAuthKey(userId, token, secret);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
SSLOG_I("HandleInitUser0 END....(From gby)");
return NO_ERROR;
}
int32_t StorageServiceStub::HandleCryptoInitUserSpace(MessageParcel &data, MessageParcel &reply)
{
SSLOG_I("HandleInitUser0 STARTING....(From gby)");
bool ret = false;
const std::string uuid = data.ReadString();
int32_t userId = data.ReadInt32();
int32_t flag = data.ReadInt32();
ret = CryptoInitUserSpace(uuid, userId, flag);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
SSLOG_I("HandleInitUser0 END....(From gby)");
return NO_ERROR;
}
int32_t StorageServiceStub::HandleCryptoRemoveUserSpace(MessageParcel &data, MessageParcel &reply)
{
SSLOG_I("HandleInitUser0 STARTING....(From gby)");
bool ret = false;
const std::string uuid = data.ReadString();
int32_t userId = data.ReadInt32();
int32_t flag = data.ReadInt32();
ret = CryptoRemoveUserSpace(uuid, userId, flag);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
SSLOG_I("HandleInitUser0 END....(From gby)");
return NO_ERROR;
}
int32_t StorageServiceStub::HandleIdleFsTrim(MessageParcel &reply)
{
bool ret = false;
sptr<IStorageServiceTask> storageServiceTask;
ret = IdleFsTrim(storageServiceTask);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
return NO_ERROR;
}
int32_t StorageServiceStub::HandleRunIdleMaintain(MessageParcel &reply)
{
bool ret = false;
sptr<IStorageServiceTask> storageServiceTask;
ret = RunIdleMaintain(storageServiceTask);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
return NO_ERROR;
}
int32_t StorageServiceStub::HandleAbortIdleMaintain(MessageParcel &reply)
{
bool ret = false;
sptr<IStorageServiceTask> storageServiceTask;
ret = AbortIdleMaintain(storageServiceTask);
if (!reply.WriteBool(ret)) {
SSLOG_E("write failed");
return TRANSACTION_ERR;
}
return NO_ERROR;
}
} // namespace OHOS
| [
"panqiangbiao@163.com"
] | panqiangbiao@163.com |
949404c346850ed8b8d914554377a60517da57b6 | a9e923353fac938e7ad83b05ae1fa7717c240343 | /nofx/nofx_ofStyle/nofx_dependencies.cc | 3eeff231f39455fbdb5135843d3958dcfefc8e62 | [
"MIT"
] | permissive | 3p3r/nofx | f7dfc5cc8d283aa1e4e9cf53068c1016a99b30c1 | 7abc9da3d4fc0f5b72c6b3d591a08cf44d00277e | refs/heads/master | 2021-05-30T07:49:50.985812 | 2015-07-13T17:35:14 | 2015-07-13T17:35:14 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 583 | cc | #include "nofx_dependencies.h"
v8::Persistent<v8::Function> DEP_ofColor;
namespace nofx
{
namespace ClassWrappers
{
NAN_METHOD(nofx_dependencies)
{
if (args.Length() != 1)
{
NanThrowTypeError("ofStyle module has dependencies. Please pass the right dependencies first.");
}
NanAssignPersistent(DEP_ofColor, v8::Handle<v8::Function>::Cast(
args[0]->ToObject()->Get(NanNew("ofColor"))));
NanReturnValue(args.This());
} // !nofx_dependencies
} // !namespace OfMatrix4x4
} // !namespace nofx | [
"sepehr.laal@gmail.com"
] | sepehr.laal@gmail.com |
f4b611f878cd68acc0a95e6be465ae5c426328c0 | 731f016c6823c3a3d340b5f4f82fcfdb2fcaf025 | /FlameShot/selectiontool.cpp | 4d9a8d9f3d0a6e16f5b69ec8788fcf109fbd4cd6 | [] | no_license | SindenDev/ScreenShot | 536f390fb3759e6afb66ba71fd68be9f75e00ee9 | 15756e5b4ecede3c082f6e31773e527d37cde2ad | refs/heads/master | 2022-07-25T18:41:21.169560 | 2020-05-15T11:38:00 | 2020-05-15T11:38:00 | 259,273,203 | 1 | 0 | null | null | null | null | GB18030 | C++ | false | false | 1,576 | cpp |
#include "selectiontool.h"
#include <QPainter>
namespace {
#define PADDING_VALUE 2
}
SelectionTool::SelectionTool(QObject *parent) : AbstractTwoPointTool(parent) {
m_supportsDiagonalAdj = true;
}
bool SelectionTool::closeOnButtonPressed() const {
return false;
}
QIcon SelectionTool::icon(const QColor &background, bool inEditor) const {
Q_UNUSED(inEditor);
return QIcon(iconPath(background) + "square-outline.svg");
}
QString SelectionTool::name() const {
return QStringLiteral("矩形选择");
}
QString SelectionTool::nameID() {
return QLatin1String("");
}
QString SelectionTool::description() const {
return QStringLiteral("设置选区");
}
CaptureTool* SelectionTool::copy(QObject *parent) {
return new SelectionTool(parent);
}
void SelectionTool::process(QPainter &painter, const QPixmap &pixmap, bool recordUndo) {
if (recordUndo) {
updateBackup(pixmap);
}
painter.setPen(QPen(m_color, m_thickness));
painter.drawRect(QRect(m_points.first, m_points.second));
}
void SelectionTool::paintMousePreview(QPainter &painter, const CaptureContext &context) {
painter.setPen(QPen(context.color, PADDING_VALUE + context.thickness));
painter.drawLine(context.mousePos, context.mousePos);
}
void SelectionTool::drawStart(const CaptureContext &context) {
m_color = context.color;
m_thickness = context.thickness + PADDING_VALUE;
m_points.first = context.mousePos;
m_points.second = context.mousePos;
}
void SelectionTool::pressed(const CaptureContext &context) {
Q_UNUSED(context);
}
| [
"zhangxintian@imsightmed.com"
] | zhangxintian@imsightmed.com |
3f8fbae2e2ce0065a24389b75d1c6bb1fa34c525 | e6b695c9b0ab3eca8f5424c80db936e6e3f7be72 | /quazipfile.h | 6d19933ea66f5f565be75d19eb539c0eb82bf858 | [] | no_license | DriftMind/NTUMEMSOpenVPN | a9bba50db42542423b1736a65911f9d4d6e9099e | 7964c4be8cfddfb403fa00e2f3b14eec6d3f8e60 | refs/heads/master | 2021-01-11T14:45:25.102786 | 2014-06-09T15:35:42 | 2014-06-09T15:35:42 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 18,969 | h | #ifndef QUA_ZIPFILE_H
#define QUA_ZIPFILE_H
/*
-- A kind of "standard" GPL license statement --
QuaZIP - a Qt/C++ wrapper for the ZIP/UNZIP package
Copyright (C) 2005-2008 Sergey A. Tachenov
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-- A kind of "standard" GPL license statement ends here --
See COPYING file for GPL.
You are also permitted to use QuaZIP under the terms of LGPL (see
COPYING.LGPL). You are free to choose either license, but please note
that QuaZIP makes use of Qt, which is not licensed under LGPL. So if
you are using Open Source edition of Qt, you therefore MUST use GPL for
your code based on QuaZIP, since it would be also based on Qt in this
case. If you are Qt commercial license owner, then you are free to use
QuaZIP as long as you respect either GPL or LGPL for QuaZIP code.
**/
#include <QIODevice>
#include "quazip_global.h"
#include "quazip.h"
#include "quazipnewinfo.h"
class QuaZipFilePrivate;
/// A file inside ZIP archive.
/** \class QuaZipFile quazipfile.h <quazip/quazipfile.h>
* This is the most interesting class. Not only it provides C++
* interface to the ZIP/UNZIP package, but also integrates it with Qt by
* subclassing QIODevice. This makes possible to access files inside ZIP
* archive using QTextStream or QDataStream, for example. Actually, this
* is the main purpose of the whole QuaZIP library.
*
* You can either use existing QuaZip instance to create instance of
* this class or pass ZIP archive file name to this class, in which case
* it will create internal QuaZip object. See constructors' descriptions
* for details. Writing is only possible with the existing instance.
*
* \section quazipfile-sequential Sequential or random-access?
*
* At the first thought, QuaZipFile has fixed size, the start and the
* end and should be therefore considered random-access device. But
* there is one major obstacle to making it random-access: ZIP/UNZIP API
* does not support seek() operation and the only way to implement it is
* through reopening the file and re-reading to the required position,
* but this is prohibitely slow.
*
* Therefore, QuaZipFile is considered to be a sequential device. This
* has advantage of availability of the ungetChar() operation (QIODevice
* does not implement it properly for non-sequential devices unless they
* support seek()). Disadvantage is a somewhat strange behaviour of the
* size() and pos() functions. This should be kept in mind while using
* this class.
*
**/
class QUAZIP_EXPORT QuaZipFile: public QIODevice {
friend class QuaZipFilePrivate;
Q_OBJECT
private:
QuaZipFilePrivate *p;
// these are not supported nor implemented
QuaZipFile(const QuaZipFile& that);
QuaZipFile& operator=(const QuaZipFile& that);
protected:
/// Implementation of the QIODevice::readData().
qint64 readData(char *data, qint64 maxSize);
/// Implementation of the QIODevice::writeData().
qint64 writeData(const char *data, qint64 maxSize);
public:
/// Constructs a QuaZipFile instance.
/** You should use setZipName() and setFileName() or setZip() before
* trying to call open() on the constructed object.
**/
QuaZipFile();
/// Constructs a QuaZipFile instance.
/** \a parent argument specifies this object's parent object.
*
* You should use setZipName() and setFileName() or setZip() before
* trying to call open() on the constructed object.
**/
QuaZipFile(QObject *parent);
/// Constructs a QuaZipFile instance.
/** \a parent argument specifies this object's parent object and \a
* zipName specifies ZIP archive file name.
*
* You should use setFileName() before trying to call open() on the
* constructed object.
*
* QuaZipFile constructed by this constructor can be used for read
* only access. Use QuaZipFile(QuaZip*,QObject*) for writing.
**/
QuaZipFile(const QString& zipName, QObject *parent =NULL);
/// Constructs a QuaZipFile instance.
/** \a parent argument specifies this object's parent object, \a
* zipName specifies ZIP archive file name and \a fileName and \a cs
* specify a name of the file to open inside archive.
*
* QuaZipFile constructed by this constructor can be used for read
* only access. Use QuaZipFile(QuaZip*,QObject*) for writing.
*
* \sa QuaZip::setCurrentFile()
**/
QuaZipFile(const QString& zipName, const QString& fileName,
QuaZip::CaseSensitivity cs =QuaZip::csDefault, QObject *parent =NULL);
/// Constructs a QuaZipFile instance.
/** \a parent argument specifies this object's parent object.
*
* \a zip is the pointer to the existing QuaZip object. This
* QuaZipFile object then can be used to read current file in the
* \a zip or to write to the file inside it.
*
* \warning Using this constructor for reading current file can be
* tricky. Let's take the following example:
* \code
* QuaZip zip("archive.zip");
* zip.open(QuaZip::mdUnzip);
* zip.setCurrentFile("file-in-archive");
* QuaZipFile file(&zip);
* file.open(QIODevice::ReadOnly);
* // ok, now we can read from the file
* file.read(somewhere, some);
* zip.setCurrentFile("another-file-in-archive"); // oops...
* QuaZipFile anotherFile(&zip);
* anotherFile.open(QIODevice::ReadOnly);
* anotherFile.read(somewhere, some); // this is still ok...
* file.read(somewhere, some); // and this is NOT
* \endcode
* So, what exactly happens here? When we change current file in the
* \c zip archive, \c file that references it becomes invalid
* (actually, as far as I understand ZIP/UNZIP sources, it becomes
* closed, but QuaZipFile has no means to detect it).
*
* Summary: do not close \c zip object or change its current file as
* long as QuaZipFile is open. Even better - use another constructors
* which create internal QuaZip instances, one per object, and
* therefore do not cause unnecessary trouble. This constructor may
* be useful, though, if you already have a QuaZip instance and do
* not want to access several files at once. Good example:
* \code
* QuaZip zip("archive.zip");
* zip.open(QuaZip::mdUnzip);
* // first, we need some information about archive itself
* QByteArray comment=zip.getComment();
* // and now we are going to access files inside it
* QuaZipFile file(&zip);
* for(bool more=zip.goToFirstFile(); more; more=zip.goToNextFile()) {
* file.open(QIODevice::ReadOnly);
* // do something cool with file here
* file.close(); // do not forget to close!
* }
* zip.close();
* \endcode
**/
QuaZipFile(QuaZip *zip, QObject *parent =NULL);
/// Destroys a QuaZipFile instance.
/** Closes file if open, destructs internal QuaZip object (if it
* exists and \em is internal, of course).
**/
virtual ~QuaZipFile();
/// Returns the ZIP archive file name.
/** If this object was created by passing QuaZip pointer to the
* constructor, this function will return that QuaZip's file name
* (or null string if that object does not have file name yet).
*
* Otherwise, returns associated ZIP archive file name or null
* string if there are no name set yet.
*
* \sa setZipName() getFileName()
**/
QString getZipName()const;
/// Returns a pointer to the associated QuaZip object.
/** Returns \c NULL if there is no associated QuaZip or it is
* internal (so you will not mess with it).
**/
QuaZip* getZip()const;
/// Returns file name.
/** This function returns file name you passed to this object either
* by using
* QuaZipFile(const QString&,const QString&,QuaZip::CaseSensitivity,QObject*)
* or by calling setFileName(). Real name of the file may differ in
* case if you used case-insensitivity.
*
* Returns null string if there is no file name set yet. This is the
* case when this QuaZipFile operates on the existing QuaZip object
* (constructor QuaZipFile(QuaZip*,QObject*) or setZip() was used).
*
* \sa getActualFileName
**/
QString getFileName() const;
/// Returns case sensitivity of the file name.
/** This function returns case sensitivity argument you passed to
* this object either by using
* QuaZipFile(const QString&,const QString&,QuaZip::CaseSensitivity,QObject*)
* or by calling setFileName().
*
* Returns unpredictable value if getFileName() returns null string
* (this is the case when you did not used setFileName() or
* constructor above).
*
* \sa getFileName
**/
QuaZip::CaseSensitivity getCaseSensitivity() const;
/// Returns the actual file name in the archive.
/** This is \em not a ZIP archive file name, but a name of file inside
* archive. It is not necessary the same name that you have passed
* to the
* QuaZipFile(const QString&,const QString&,QuaZip::CaseSensitivity,QObject*),
* setFileName() or QuaZip::setCurrentFile() - this is the real file
* name inside archive, so it may differ in case if the file name
* search was case-insensitive.
*
* Equivalent to calling getCurrentFileName() on the associated
* QuaZip object. Returns null string if there is no associated
* QuaZip object or if it does not have a current file yet. And this
* is the case if you called setFileName() but did not open the
* file yet. So this is perfectly fine:
* \code
* QuaZipFile file("somezip.zip");
* file.setFileName("somefile");
* QString name=file.getName(); // name=="somefile"
* QString actual=file.getActualFileName(); // actual is null string
* file.open(QIODevice::ReadOnly);
* QString actual=file.getActualFileName(); // actual can be "SoMeFiLe" on Windows
* \endcode
*
* \sa getZipName(), getFileName(), QuaZip::CaseSensitivity
**/
QString getActualFileName()const;
/// Sets the ZIP archive file name.
/** Automatically creates internal QuaZip object and destroys
* previously created internal QuaZip object, if any.
*
* Will do nothing if this file is already open. You must close() it
* first.
**/
void setZipName(const QString& zipName);
/// Returns \c true if the file was opened in raw mode.
/** If the file is not open, the returned value is undefined.
*
* \sa open(OpenMode,int*,int*,bool,const char*)
**/
bool isRaw() const;
/// Binds to the existing QuaZip instance.
/** This function destroys internal QuaZip object, if any, and makes
* this QuaZipFile to use current file in the \a zip object for any
* further operations. See QuaZipFile(QuaZip*,QObject*) for the
* possible pitfalls.
*
* Will do nothing if the file is currently open. You must close()
* it first.
**/
void setZip(QuaZip *zip);
/// Sets the file name.
/** Will do nothing if at least one of the following conditions is
* met:
* - ZIP name has not been set yet (getZipName() returns null
* string).
* - This QuaZipFile is associated with external QuaZip. In this
* case you should call that QuaZip's setCurrentFile() function
* instead!
* - File is already open so setting the name is meaningless.
*
* \sa QuaZip::setCurrentFile
**/
void setFileName(const QString& fileName, QuaZip::CaseSensitivity cs =QuaZip::csDefault);
/// Opens a file for reading.
/** Returns \c true on success, \c false otherwise.
* Call getZipError() to get error code.
*
* \note Since ZIP/UNZIP API provides buffered reading only,
* QuaZipFile does not support unbuffered reading. So do not pass
* QIODevice::Unbuffered flag in \a mode, or open will fail.
**/
virtual bool open(OpenMode mode);
/// Opens a file for reading.
/** \overload
* Argument \a password specifies a password to decrypt the file. If
* it is NULL then this function behaves just like open(OpenMode).
**/
inline bool open(OpenMode mode, const char *password)
{return open(mode, NULL, NULL, false, password);}
/// Opens a file for reading.
/** \overload
* Argument \a password specifies a password to decrypt the file.
*
* An integers pointed by \a method and \a level will receive codes
* of the compression method and level used. See unzip.h.
*
* If raw is \c true then no decompression is performed.
*
* \a method should not be \c NULL. \a level can be \c NULL if you
* don't want to know the compression level.
**/
bool open(OpenMode mode, int *method, int *level, bool raw, const char *password =NULL);
/// Opens a file for writing.
/** \a info argument specifies information about file. It should at
* least specify a correct file name. Also, it is a good idea to
* specify correct timestamp (by default, current time will be
* used). See QuaZipNewInfo.
*
* Arguments \a password and \a crc provide necessary information
* for crypting. Note that you should specify both of them if you
* need crypting. If you do not, pass \c NULL as password, but you
* still need to specify \a crc if you are going to use raw mode
* (see below).
*
* Arguments \a method and \a level specify compression method and
* level.
*
* If \a raw is \c true, no compression is performed. In this case,
* \a crc and uncompressedSize field of the \a info are required.
*
* Arguments \a windowBits, \a memLevel, \a strategy provide zlib
* algorithms tuning. See deflateInit2() in zlib.
**/
bool open(OpenMode mode, const QuaZipNewInfo& info,
const char *password =NULL, quint32 crc =0,
int method =Z_DEFLATED, int level =Z_DEFAULT_COMPRESSION, bool raw =false,
int windowBits =-MAX_WBITS, int memLevel =DEF_MEM_LEVEL, int strategy =Z_DEFAULT_STRATEGY);
/// Returns \c true, but \ref quazipfile-sequential "beware"!
virtual bool isSequential()const;
/// Returns current position in the file.
/** Implementation of the QIODevice::pos(). When reading, this
* function is a wrapper to the ZIP/UNZIP unztell(), therefore it is
* unable to keep track of the ungetChar() calls (which is
* non-virtual and therefore is dangerous to reimplement). So if you
* are using ungetChar() feature of the QIODevice, this function
* reports incorrect value until you get back characters which you
* ungot.
*
* When writing, pos() returns number of bytes already written
* (uncompressed unless you use raw mode).
*
* \note Although
* \ref quazipfile-sequential "QuaZipFile is a sequential device"
* and therefore pos() should always return zero, it does not,
* because it would be misguiding. Keep this in mind.
*
* This function returns -1 if the file or archive is not open.
*
* Error code returned by getZipError() is not affected by this
* function call.
**/
virtual qint64 pos()const;
/// Returns \c true if the end of file was reached.
/** This function returns \c false in the case of error. This means
* that you called this function on either not open file, or a file
* in the not open archive or even on a QuaZipFile instance that
* does not even have QuaZip instance associated. Do not do that
* because there is no means to determine whether \c false is
* returned because of error or because end of file was reached.
* Well, on the other side you may interpret \c false return value
* as "there is no file open to check for end of file and there is
* no end of file therefore".
*
* When writing, this function always returns \c true (because you
* are always writing to the end of file).
*
* Error code returned by getZipError() is not affected by this
* function call.
**/
virtual bool atEnd()const;
/// Returns file size.
/** This function returns csize() if the file is open for reading in
* raw mode, usize() if it is open for reading in normal mode and
* pos() if it is open for writing.
*
* Returns -1 on error, call getZipError() to get error code.
*
* \note This function returns file size despite that
* \ref quazipfile-sequential "QuaZipFile is considered to be sequential device",
* for which size() should return bytesAvailable() instead. But its
* name would be very misguiding otherwise, so just keep in mind
* this inconsistence.
**/
virtual qint64 size()const;
/// Returns compressed file size.
/** Equivalent to calling getFileInfo() and then getting
* compressedSize field, but more convenient and faster.
*
* File must be open for reading before calling this function.
*
* Returns -1 on error, call getZipError() to get error code.
**/
qint64 csize()const;
/// Returns uncompressed file size.
/** Equivalent to calling getFileInfo() and then getting
* uncompressedSize field, but more convenient and faster. See
* getFileInfo() for a warning.
*
* File must be open for reading before calling this function.
*
* Returns -1 on error, call getZipError() to get error code.
**/
qint64 usize()const;
/// Gets information about current file.
/** This function does the same thing as calling
* QuaZip::getCurrentFileInfo() on the associated QuaZip object,
* but you can not call getCurrentFileInfo() if the associated
* QuaZip is internal (because you do not have access to it), while
* you still can call this function in that case.
*
* File must be open for reading before calling this function.
*
* Returns \c false in the case of an error.
**/
bool getFileInfo(QuaZipFileInfo *info);
/// Closes the file.
/** Call getZipError() to determine if the close was successful.
**/
virtual void close();
/// Returns the error code returned by the last ZIP/UNZIP API call.
int getZipError() const;
};
#endif
| [
"jrywjwu@gmail.com"
] | jrywjwu@gmail.com |
46aec409877fc714bf7424e36c435a9003c76a73 | 94fd014cbe631100439127fc90a175e39c1d7366 | /Sem Título4.cpp | 87b1cd826fa81f052cddf8687f2fd42c426ef4fe | [
"MIT"
] | permissive | Mraimundo/Programa-o-II | 4ca1a80eb7fd74004c75066d5e0fb27c83735970 | 6b908ce99a22ff887884f2b07b65e83c6e456200 | refs/heads/master | 2020-06-26T02:01:02.984011 | 2019-07-29T16:45:56 | 2019-07-29T16:45:56 | 199,491,501 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 509 | cpp | #include <stdio.h>
#include <stdlib.h>
#include <conio.h>
int verifica (int n1, int n2){
int result;
if(n1>n2)
return n1;
else
return n2;
}
int verifica_2 (int n1, int n2, int n3){
int result;
if(verifica(n1, n2) > n3){
return verifica(n1, n2);
}
else
return n3;
}
int main(){
int resultado, num, num2, num3;
printf("Digite 3 numeros:\n");
scanf("%d %d %d", &num, &num2, &num3);
resultado=verifica_2(num, num2, num3);
printf("O maior numero eh: %d", resultado);
}
| [
"mouzinho.raimundo@idsestudantes.org"
] | mouzinho.raimundo@idsestudantes.org |
449cd4ab0c5d06a54cb35aaf9c9a7ab3e1170224 | 6408cfc725bc63d4cc0f3bafa231be2a968d7323 | /ReadData_Matlab/write_data.cpp | 676545689877a1263ce1aabaec3c6dcfe1d40b99 | [] | no_license | FrancesZhou/XMTC_SLEEC | c9f90b3eec23aadd0410005fca192c2943171a0c | bc9d74ff4aaf6d662039b484e09e632b7c447357 | refs/heads/master | 2021-09-15T00:41:07.152519 | 2018-05-23T03:14:29 | 2018-05-23T03:14:29 | 113,753,521 | 2 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,229 | cpp | #include <iostream>
#include <string>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <mex.h>
#define NAME_LEN 100000
using namespace std;
void mexFunction(int nlhs, mxArray* plhs[], int rlhs, const mxArray* prhs[])
{
mxAssert(nrhs==3,"Required and allowed arguments: mex_feature_mat, mex_label_mat, text_data_file_name");
mxArray* ft_mat = (mxArray*) prhs[0];
mxArray* lbl_mat = (mxArray*) prhs[1];
char file_name[NAME_LEN];
mxGetString(prhs[2],file_name,NAME_LEN);
FILE* fout = fopen(file_name,"w");
int num_inst = mxGetN(ft_mat);
int num_ft = mxGetM(ft_mat);
int num_lbl = mxGetM(lbl_mat);
fprintf(fout,"%d %d %d\n",num_inst,num_ft,num_lbl);
mwIndex* ft_Ir = mxGetIr(ft_mat);
mwIndex* ft_Jc = mxGetJc(ft_mat);
double* ft_Pr = mxGetPr(ft_mat);
mwIndex* lbl_Ir = mxGetIr(lbl_mat);
mwIndex* lbl_Jc = mxGetJc(lbl_mat);
double* lbl_Pr = mxGetPr(lbl_mat);
for(int i=0; i<num_inst; i++)
{
for(int j=lbl_Jc[i]; j<lbl_Jc[i+1]; j++)
{
int lbl = lbl_Ir[j];
if(j==lbl_Jc[i])
fprintf(fout,"%d",lbl);
else
fprintf(fout,",%d",lbl);
}
for(int j=ft_Jc[i]; j<ft_Jc[i+1]; j++)
{
fprintf(fout," %d:%f",ft_Ir[j],ft_Pr[j]);
}
fprintf(fout,"\n");
}
fclose(fout);
}
| [
"zhouxian@sjtu.edu.cn"
] | zhouxian@sjtu.edu.cn |
7d1c7a32672e74fef63f838b8a08eec7bdda917f | bd36ae032ff4ee898964a735158d2d6ff7880a6e | /main/music/MIDIPlayer.h | 7b36e2b9be2fac1933c1e088a3b5f8457bc63fa2 | [] | no_license | RandyParedis/autoplay | c377ad07e64320113483a478cefd77186ecca1a8 | fa5a5a742b122ecb46c8d1608296f0b8dfd78840 | refs/heads/master | 2020-03-30T13:29:02.898049 | 2019-01-25T16:24:23 | 2019-01-25T16:24:23 | 151,274,363 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,779 | h | /*
* This is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
* The software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with the software. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2018, Randy Paredis
*
* Created on 27/10/2018
*/
#ifndef AUTOPLAY_MIDIPLAYER_H
#define AUTOPLAY_MIDIPLAYER_H
#include "../util/Config.h"
#include "Score.h"
#include <memory>
namespace autoplay {
namespace music {
/**
* The MIDIPlayer class makes use of the RtMidi library, which allows for output
* ports to be detected and
* sound to be played.
*
* @note This class is a singleton class, e.g. it can/should only be
* instantiated once!
*
* @note It is possible some static is generated when first playing the
* sound.
* Also, sometimes the sound may not be played at all.
*/
class MIDIPlayer
{
public:
/**
* Deleted copy constructor
*/
MIDIPlayer(const MIDIPlayer&) = delete;
/**
* Deleted copy assignment
*/
MIDIPlayer& operator=(const MIDIPlayer&) = delete;
public:
/**
* Gets the instance of the MIDIPlayer in a thread-safe way.
* @return The singleton instance.
*/
static std::shared_ptr<MIDIPlayer> instance();
/**
* Log all output port information.
* @param config The Config of the system
*
* @note The implementation of this function is based upon the midiprobe file from RtMidi,
* created by Gary Scavone, 2003-2012.
*/
void probe(const util::Config& config) const;
/**
* Play a certain Score
* @param score The Score to play
* @param config The Config of the system
*/
void play(const Score& score, const util::Config& config) const;
private:
/**
* The default constructor is private, which allows this class to be
* instantiated only once.
*/
MIDIPlayer() = default;
};
}
}
#endif // AUTOPLAY_MIDIPLAYER_H
| [
"randy.paredis@student.uantwerpen.be"
] | randy.paredis@student.uantwerpen.be |
fab914b9405043bdd859dbda2fd0561e99086c5b | ac1c9fbc1f1019efb19d0a8f3a088e8889f1e83c | /out/release/gen/third_party/blink/public/mojom/service_worker/service_worker_provider.mojom-shared.cc | 1d12cc8b9c9ed59d35be20b057168b934fb8a290 | [
"BSD-3-Clause"
] | permissive | xueqiya/chromium_src | 5d20b4d3a2a0251c063a7fb9952195cda6d29e34 | d4aa7a8f0e07cfaa448fcad8c12b29242a615103 | refs/heads/main | 2022-07-30T03:15:14.818330 | 2021-01-16T16:47:22 | 2021-01-16T16:47:22 | 330,115,551 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 11,767 | cc | // third_party/blink/public/mojom/service_worker/service_worker_provider.mojom-shared.cc is auto generated by mojom_bindings_generator.py, do not edit
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4065)
#endif
#include "third_party/blink/public/mojom/service_worker/service_worker_provider.mojom-shared.h"
#include <utility>
#include "base/logging.h"
#include "base/stl_util.h" // for base::size()
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_context.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/lib/validation_util.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_provider.mojom-params-data.h"
namespace blink {
namespace mojom {
namespace internal {
// static
bool ServiceWorkerProviderInfoForClient_Data::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) {
if (!data)
return true;
if (!ValidateStructHeaderAndClaimMemory(data, validation_context))
return false;
// NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if
// the message comes from an older version.
const ServiceWorkerProviderInfoForClient_Data* object = static_cast<const ServiceWorkerProviderInfoForClient_Data*>(data);
static constexpr struct {
uint32_t version;
uint32_t num_bytes;
} kVersionSizes[] = {{ 0, 24 }};
if (object->header_.version <=
kVersionSizes[base::size(kVersionSizes) - 1].version) {
// Scan in reverse order to optimize for more recent versions.
for (int i = base::size(kVersionSizes) - 1; i >= 0; --i) {
if (object->header_.version >= kVersionSizes[i].version) {
if (object->header_.num_bytes == kVersionSizes[i].num_bytes)
break;
ReportValidationError(
validation_context,
mojo::internal::VALIDATION_ERROR_UNEXPECTED_STRUCT_HEADER);
return false;
}
}
} else if (object->header_.num_bytes <
kVersionSizes[base::size(kVersionSizes) - 1].num_bytes) {
ReportValidationError(
validation_context,
mojo::internal::VALIDATION_ERROR_UNEXPECTED_STRUCT_HEADER);
return false;
}
if (!mojo::internal::ValidateHandleOrInterfaceNonNullable(
object->host_remote, 1, validation_context)) {
return false;
}
if (!mojo::internal::ValidateHandleOrInterface(object->host_remote,
validation_context)) {
return false;
}
if (!mojo::internal::ValidateHandleOrInterfaceNonNullable(
object->client_receiver, 2, validation_context)) {
return false;
}
if (!mojo::internal::ValidateHandleOrInterface(object->client_receiver,
validation_context)) {
return false;
}
return true;
}
ServiceWorkerProviderInfoForClient_Data::ServiceWorkerProviderInfoForClient_Data()
: header_({sizeof(*this), 0}) {}
// static
bool ServiceWorkerProviderInfoForStartWorker_Data::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) {
if (!data)
return true;
if (!ValidateStructHeaderAndClaimMemory(data, validation_context))
return false;
// NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if
// the message comes from an older version.
const ServiceWorkerProviderInfoForStartWorker_Data* object = static_cast<const ServiceWorkerProviderInfoForStartWorker_Data*>(data);
static constexpr struct {
uint32_t version;
uint32_t num_bytes;
} kVersionSizes[] = {{ 0, 40 }};
if (object->header_.version <=
kVersionSizes[base::size(kVersionSizes) - 1].version) {
// Scan in reverse order to optimize for more recent versions.
for (int i = base::size(kVersionSizes) - 1; i >= 0; --i) {
if (object->header_.version >= kVersionSizes[i].version) {
if (object->header_.num_bytes == kVersionSizes[i].num_bytes)
break;
ReportValidationError(
validation_context,
mojo::internal::VALIDATION_ERROR_UNEXPECTED_STRUCT_HEADER);
return false;
}
}
} else if (object->header_.num_bytes <
kVersionSizes[base::size(kVersionSizes) - 1].num_bytes) {
ReportValidationError(
validation_context,
mojo::internal::VALIDATION_ERROR_UNEXPECTED_STRUCT_HEADER);
return false;
}
if (!mojo::internal::ValidateHandleOrInterfaceNonNullable(
object->host_remote, 1, validation_context)) {
return false;
}
if (!mojo::internal::ValidateHandleOrInterface(object->host_remote,
validation_context)) {
return false;
}
if (!mojo::internal::ValidateHandleOrInterface(object->script_loader_factory_remote,
validation_context)) {
return false;
}
if (!mojo::internal::ValidateHandleOrInterface(object->cache_storage,
validation_context)) {
return false;
}
if (!mojo::internal::ValidateHandleOrInterfaceNonNullable(
object->browser_interface_broker, 4, validation_context)) {
return false;
}
if (!mojo::internal::ValidateHandleOrInterface(object->browser_interface_broker,
validation_context)) {
return false;
}
return true;
}
ServiceWorkerProviderInfoForStartWorker_Data::ServiceWorkerProviderInfoForStartWorker_Data()
: header_({sizeof(*this), 0}) {}
// static
bool ServiceWorkerWorkerClient_OnControllerChanged_Params_Data::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) {
if (!data)
return true;
if (!ValidateStructHeaderAndClaimMemory(data, validation_context))
return false;
// NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if
// the message comes from an older version.
const ServiceWorkerWorkerClient_OnControllerChanged_Params_Data* object = static_cast<const ServiceWorkerWorkerClient_OnControllerChanged_Params_Data*>(data);
static constexpr struct {
uint32_t version;
uint32_t num_bytes;
} kVersionSizes[] = {{ 0, 16 }};
if (object->header_.version <=
kVersionSizes[base::size(kVersionSizes) - 1].version) {
// Scan in reverse order to optimize for more recent versions.
for (int i = base::size(kVersionSizes) - 1; i >= 0; --i) {
if (object->header_.version >= kVersionSizes[i].version) {
if (object->header_.num_bytes == kVersionSizes[i].num_bytes)
break;
ReportValidationError(
validation_context,
mojo::internal::VALIDATION_ERROR_UNEXPECTED_STRUCT_HEADER);
return false;
}
}
} else if (object->header_.num_bytes <
kVersionSizes[base::size(kVersionSizes) - 1].num_bytes) {
ReportValidationError(
validation_context,
mojo::internal::VALIDATION_ERROR_UNEXPECTED_STRUCT_HEADER);
return false;
}
if (!::blink::mojom::internal::ControllerServiceWorkerMode_Data
::Validate(object->mode, validation_context))
return false;
return true;
}
ServiceWorkerWorkerClient_OnControllerChanged_Params_Data::ServiceWorkerWorkerClient_OnControllerChanged_Params_Data()
: header_({sizeof(*this), 0}) {}
// static
bool ServiceWorkerWorkerClientRegistry_RegisterWorkerClient_Params_Data::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) {
if (!data)
return true;
if (!ValidateStructHeaderAndClaimMemory(data, validation_context))
return false;
// NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if
// the message comes from an older version.
const ServiceWorkerWorkerClientRegistry_RegisterWorkerClient_Params_Data* object = static_cast<const ServiceWorkerWorkerClientRegistry_RegisterWorkerClient_Params_Data*>(data);
static constexpr struct {
uint32_t version;
uint32_t num_bytes;
} kVersionSizes[] = {{ 0, 16 }};
if (object->header_.version <=
kVersionSizes[base::size(kVersionSizes) - 1].version) {
// Scan in reverse order to optimize for more recent versions.
for (int i = base::size(kVersionSizes) - 1; i >= 0; --i) {
if (object->header_.version >= kVersionSizes[i].version) {
if (object->header_.num_bytes == kVersionSizes[i].num_bytes)
break;
ReportValidationError(
validation_context,
mojo::internal::VALIDATION_ERROR_UNEXPECTED_STRUCT_HEADER);
return false;
}
}
} else if (object->header_.num_bytes <
kVersionSizes[base::size(kVersionSizes) - 1].num_bytes) {
ReportValidationError(
validation_context,
mojo::internal::VALIDATION_ERROR_UNEXPECTED_STRUCT_HEADER);
return false;
}
if (!mojo::internal::ValidateHandleOrInterfaceNonNullable(
object->client, 1, validation_context)) {
return false;
}
if (!mojo::internal::ValidateHandleOrInterface(object->client,
validation_context)) {
return false;
}
return true;
}
ServiceWorkerWorkerClientRegistry_RegisterWorkerClient_Params_Data::ServiceWorkerWorkerClientRegistry_RegisterWorkerClient_Params_Data()
: header_({sizeof(*this), 0}) {}
// static
bool ServiceWorkerWorkerClientRegistry_CloneWorkerClientRegistry_Params_Data::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) {
if (!data)
return true;
if (!ValidateStructHeaderAndClaimMemory(data, validation_context))
return false;
// NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if
// the message comes from an older version.
const ServiceWorkerWorkerClientRegistry_CloneWorkerClientRegistry_Params_Data* object = static_cast<const ServiceWorkerWorkerClientRegistry_CloneWorkerClientRegistry_Params_Data*>(data);
static constexpr struct {
uint32_t version;
uint32_t num_bytes;
} kVersionSizes[] = {{ 0, 16 }};
if (object->header_.version <=
kVersionSizes[base::size(kVersionSizes) - 1].version) {
// Scan in reverse order to optimize for more recent versions.
for (int i = base::size(kVersionSizes) - 1; i >= 0; --i) {
if (object->header_.version >= kVersionSizes[i].version) {
if (object->header_.num_bytes == kVersionSizes[i].num_bytes)
break;
ReportValidationError(
validation_context,
mojo::internal::VALIDATION_ERROR_UNEXPECTED_STRUCT_HEADER);
return false;
}
}
} else if (object->header_.num_bytes <
kVersionSizes[base::size(kVersionSizes) - 1].num_bytes) {
ReportValidationError(
validation_context,
mojo::internal::VALIDATION_ERROR_UNEXPECTED_STRUCT_HEADER);
return false;
}
if (!mojo::internal::ValidateHandleOrInterfaceNonNullable(
object->host, 1, validation_context)) {
return false;
}
if (!mojo::internal::ValidateHandleOrInterface(object->host,
validation_context)) {
return false;
}
return true;
}
ServiceWorkerWorkerClientRegistry_CloneWorkerClientRegistry_Params_Data::ServiceWorkerWorkerClientRegistry_CloneWorkerClientRegistry_Params_Data()
: header_({sizeof(*this), 0}) {}
} // namespace internal
} // namespace mojom
} // namespace blink
#if defined(_MSC_VER)
#pragma warning(pop)
#endif | [
"xueqi@zjmedia.net"
] | xueqi@zjmedia.net |
69191c2683872ab1447c7069272b20ed5d7dd427 | 7e896ad5558f838c89c65ab9d6559b35071acd27 | /P04/Source/Datos/Delincuente.cpp | 8df9a3aaadaf7b94faa79d1be8b572a87f1c566b | [
"MIT"
] | permissive | gorkinovich/LP2 | 6aa17d797ca377447070d997a695758f20376af1 | a756b2e064a29a7f624885299c082e9c02e384ea | refs/heads/master | 2022-06-17T01:43:47.641358 | 2022-06-08T14:09:30 | 2022-06-08T14:09:30 | 49,684,302 | 0 | 0 | null | null | null | null | ISO-8859-1 | C++ | false | false | 2,280 | cpp | //----------------------------------------------------------------------
// Gorka Suárez García - Ing. Tec. Inf. de Gestión 2º B.
// Práctica 04 - Grupo 03.
//----------------------------------------------------------------------
#pragma hdrstop
#include "Delincuente.h"
#pragma package(smart_init)
Delincuente::Delincuente ()
{
this->delitosCometidos = new ListaOrdenada<Delitos>();
this->delitosConcretos = new ListaOrdenada<std::string>();
}
Delincuente::Delincuente (std::string id, std::string nombre, CaraComun * cara,
ListaOrdenada<Delitos> * cometidos,
ListaOrdenada<std::string> * concretos)
: Persona (id, nombre, cara)
{
this->delitosCometidos = cometidos;
this->delitosConcretos = concretos;
}
Delincuente::Delincuente (const Delincuente & obj)
{
this->CopyFrom(obj);
}
Delincuente::~Delincuente ()
{
if(this->delitosCometidos != NULL)
delete this->delitosCometidos;
if(this->delitosConcretos != NULL)
delete this->delitosConcretos;
}
void Delincuente::CopyFrom (const Delincuente & obj)
{
*(this->delitosCometidos) = *(obj.delitosCometidos);
*(this->delitosConcretos) = *(obj.delitosConcretos);
this->Persona::CopyFrom(obj);
}
Persona & Delincuente::operator = (const Persona & obj)
{
this->CopyFrom((Delincuente &) obj);
return (*this);
}
Delincuente & Delincuente::operator = (const Delincuente & obj)
{
this->CopyFrom(obj);
return (*this);
}
bool Delincuente::estaDelitosCometidos (const Delito unDelito) const
{
Delitos aux(unDelito);
return this->delitosCometidos->estaElemento(aux);
}
ListaOrdenada<Delitos> * Delincuente::getDelitosCometidos (void)
{
return this->delitosCometidos;
}
ListaOrdenada<std::string> * Delincuente::getDelitosConcretos (void)
{
return this->delitosConcretos;
}
void Delincuente::setDelitosCometidos (ListaOrdenada<Delitos> * delitos)
{
if(this->delitosCometidos != NULL)
delete this->delitosCometidos;
this->delitosCometidos = delitos;
}
void Delincuente::setDelitosConcretos (ListaOrdenada<std::string> * delitos)
{
if(this->delitosConcretos != NULL)
delete this->delitosConcretos;
this->delitosConcretos = delitos;
}
void Delincuente::setCara (CaraComun * cara)
{
this->Persona::setCara(cara);
} | [
"alexander.lessman@gmail.com"
] | alexander.lessman@gmail.com |
d1828468970eafb3e06d258243168fd00cb53bc7 | 4cbcff3fc9e753ae7a043ce442f52b0524117d82 | /GoBang/Resources.hpp | 238cec6c6da1db9abda18be436521550183e1aa0 | [] | no_license | scyxiaoh/GoBang | d4ea51530676dd000f522f7d95e8b9dc57cd3df8 | d3a60160c84388ab0c59d5ea3049dc1aacc9d72d | refs/heads/master | 2020-03-26T02:47:04.708439 | 2018-10-24T20:53:13 | 2018-10-24T20:53:13 | 144,423,761 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 417 | hpp | //
// Resources.hpp
// GoBang
//
// Created by Kevin Sun on 2018/10/15.
//
#ifndef Resources_hpp
#define Resources_hpp
#include <stdio.h>
#include <QGraphicsObject>
class Resources {
public:
class Image {
public:
static QImage whitePiece();
static QImage blackPiece();
static QImage titleBackGround();
static QImage gameBackGround();
};
};
#endif /* Resources_hpp */
| [
"cykevinsun@gmail.com"
] | cykevinsun@gmail.com |
1e21656747d3b18938896a6eef13052a61cfbd64 | c53695d1a2f7de2ae6e3555c8dd098e2b99e0b16 | /interface.cpp | 99ff75e59d9b75a93f94317b14602133026889bd | [] | no_license | mkmik/myindex | 2bfb76c3e13f4ea11a616b10bd834c0bdf9efd3a | 369fdda309d4d3cc3c5b60cb531f85566275c0c5 | refs/heads/master | 2021-05-26T15:28:02.763468 | 2010-09-09T09:31:53 | 2010-09-09T09:31:53 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 812 | cpp | #include "soapindexServiceObject.h"
struct Namespace namespaces[] =
{ // {"ns-prefix", "ns-name"}
{"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"}, // MUST be first
{"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"}, // MUST be second
{"xsi", "http://www.w3.org/2001/XMLSchema-instance"}, // MUST be third
{"xsd", "http://www.w3.org/2001/XMLSchema"}, // 2001 XML Schema
{"ns1", "urn:xmethods-delayed-quotes"}, // given by the service description
{"ns", "urn:driver"},
{NULL, NULL} // end of table
};
int main()
{
// create soap context and serve one CGI-based request:
soap_serve(soap_new());
/*
indexServiceService service;
service.serve();
*/
return 0;
}
int ns__lookup(struct soap *soap, char * &response)
{
response = "ciao";
return SOAP_OK;
}
| [
"marko.mikulicic@isti.cnr.it"
] | marko.mikulicic@isti.cnr.it |
28d20c4ed82b078bc2c9fc71043fbb5da520a705 | 785739694ad05053f7ded3b60dcd8e46b2ab0505 | /LiFi textReader/blink_led.ino/blink_led.ino.ino | e1ea5498c1c6f7af035bbae1fb63311e3e110d41 | [] | no_license | premangshuC/LiFi | e5425e4c5c7ac5165820552e3dc78b1142cbb0d9 | 7df5e72b4b28d0ed8006381743ec7641b6f38069 | refs/heads/master | 2020-04-12T09:00:19.017061 | 2018-05-09T08:03:47 | 2018-05-09T08:03:47 | 63,570,246 | 2 | 3 | null | null | null | null | UTF-8 | C++ | false | false | 404 | ino | void setup() {
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
| [
"premangshuchanda@gmail.com"
] | premangshuchanda@gmail.com |
f2b04e88a23488252d9734bea5fac34ff476caf1 | a4253c9ba4d188969daca9a180a61ce631741965 | /old codes/_290104_UGVcontroler7/OperationMode.ino | 8b8af998ac917719a1c0c6e416559d9674f2f901 | [
"BSD-3-Clause"
] | permissive | KTD-prototype/Lambda | 7e52310325526c01ebb12fd23dd256801b821358 | ca45bb8d68251b7871e5edf58253b76f0898d272 | refs/heads/master | 2020-04-29T18:42:40.361967 | 2019-04-14T12:53:04 | 2019-04-14T12:53:04 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,365 | ino | /*
ロボットからの返答に基づき、ロボットの動作モードを判定
*/
void OperationMode(byte value) {
switch (value) {
case 0:
lcd.setCursor(0, 0);
lcd.println("mode : stop");
lcd.setCursor(0, 1);
lcd.println(" ");
break;
case 1:
lcd.setCursor(0, 0);
lcd.print("mode : remote");
lcd.setCursor(0, 1);
lcd.println(RMotor1);
lcd.setCursor(4, 1);
lcd.println(RMotor2);
lcd.setCursor(8, 1);
lcd.println(LMotor1);
lcd.setCursor(12, 1);
lcd.println(LMotor2);
break;
case 2:
lcd.setCursor(0, 0);
lcd.println("mode : stop");
lcd.setCursor(0, 1);
lcd.println(" ");
break;
case 3:
/*
if (JOY_send.read() == 'H') {
low = JOY_send.read();
high = JOY_send.read();
faceX = makeWord(high, low);
}
else{
faceX = JOY_send.read();
}
if (JOY_send.read() == 'H') {
low = JOY_send.read();
high = JOY_send.read();
faceY = makeWord(high, low);
}
else{
faceY = JOY_send.read();
}
*/
lcd.setCursor(0, 0);
lcd.println("mode : auto");
/*
lcd.setCursor(0, 1);
lcd.println(faceX);
lcd.setCursor(5, 1);
lcd.println(faceY);
*/
break;
case 'S':
lcd.println("S");
break;
default:
lcd.println("wait");
}
}
/*
モータードライバへの指令値をプリントアウト
もっと直感的にわかりやすい数字にしたいなあ。。。
*/
void PrintMotor(int value1, int value2, int value3, int value4) {
Serial.print(value1);
Serial.print(" || ");
Serial.print(value2);
Serial.print(" || ");
Serial.print(value3);
Serial.print(" || ");
Serial.print(value4);
Serial.print(" || ");
}
/*
ジョイスティックの読み取りデータ(を4で割ったもの)を出力
*/
void PrintJOYsignal(int val1, int val2, int val3, int val4, int val5, int val6) {
Serial.print(val1);
Serial.print(" || ");
Serial.print(val2);
Serial.print(" || ");
Serial.print(val3);
Serial.print(" || ");
Serial.print(val4);
Serial.print(" || ");
Serial.print(val5);
Serial.print(" || ");
Serial.print(val6);
Serial.println("");
}
| [
"hozu.kazu.hozu@gmail.com"
] | hozu.kazu.hozu@gmail.com |
a36d04c76a3109634121c2580d504745bcfc6ac5 | 4090aed9b69d1e355b40a6db6a138f34353197a0 | /excursion.cpp | be33131bb53ff6efe12d33f7579aacc16c2ff063 | [] | no_license | HongyuHe/OJ | 0ecb72c4a87ac8ac5dc90210be0fbd71c6843f64 | f8713ed4e374fdbc783c7c683020a1c23f42b3ad | refs/heads/master | 2020-03-31T17:14:30.991344 | 2018-10-10T01:17:27 | 2018-10-10T01:17:27 | 152,414,016 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 551 | cpp | #include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
vector<ll> count(3, 0);
string s;
cin >> s;
for(auto& i : s) {
count[i-'0']++;
}
ll swaps = 0;
for(auto& i : s) {
if(i == '0') {
count[0]--;
}
else {
swaps += count[0];
}
}
for(auto& i : s) {
if(i == '1') {
count[1]--;
}
if(i == '2') {
swaps += count[1];
}
}
cout << swaps << endl;
}
| [
"mikepf97@gmail.com"
] | mikepf97@gmail.com |
df3612facfc6218f65a273eb6cb54840c50ada01 | f3941393ecaa96f8a55ef0cee84e5b174cf44715 | /devel/include/industrial_msgs/StopMotionResponse.h | 2a785cbbfce4e960897ef507cc62f1d037953a04 | [] | no_license | BareSteffen/ROSGRP6 | d46c7de97a732adf66b88986dfec3529c8fdbbaa | aa5f11d0118cf071e43a068c0ee07ae98ec0f04e | refs/heads/master | 2023-01-29T02:00:38.403893 | 2020-12-16T09:24:03 | 2020-12-16T09:24:03 | 321,366,070 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,985 | h | // Generated by gencpp from file industrial_msgs/StopMotionResponse.msg
// DO NOT EDIT!
#ifndef INDUSTRIAL_MSGS_MESSAGE_STOPMOTIONRESPONSE_H
#define INDUSTRIAL_MSGS_MESSAGE_STOPMOTIONRESPONSE_H
#include <string>
#include <vector>
#include <map>
#include <ros/types.h>
#include <ros/serialization.h>
#include <ros/builtin_message_traits.h>
#include <ros/message_operations.h>
#include <industrial_msgs/ServiceReturnCode.h>
namespace industrial_msgs
{
template <class ContainerAllocator>
struct StopMotionResponse_
{
typedef StopMotionResponse_<ContainerAllocator> Type;
StopMotionResponse_()
: code() {
}
StopMotionResponse_(const ContainerAllocator& _alloc)
: code(_alloc) {
(void)_alloc;
}
typedef ::industrial_msgs::ServiceReturnCode_<ContainerAllocator> _code_type;
_code_type code;
typedef boost::shared_ptr< ::industrial_msgs::StopMotionResponse_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::industrial_msgs::StopMotionResponse_<ContainerAllocator> const> ConstPtr;
}; // struct StopMotionResponse_
typedef ::industrial_msgs::StopMotionResponse_<std::allocator<void> > StopMotionResponse;
typedef boost::shared_ptr< ::industrial_msgs::StopMotionResponse > StopMotionResponsePtr;
typedef boost::shared_ptr< ::industrial_msgs::StopMotionResponse const> StopMotionResponseConstPtr;
// constants requiring out of line definition
template<typename ContainerAllocator>
std::ostream& operator<<(std::ostream& s, const ::industrial_msgs::StopMotionResponse_<ContainerAllocator> & v)
{
ros::message_operations::Printer< ::industrial_msgs::StopMotionResponse_<ContainerAllocator> >::stream(s, "", v);
return s;
}
} // namespace industrial_msgs
namespace ros
{
namespace message_traits
{
// BOOLTRAITS {'IsFixedSize': True, 'IsMessage': True, 'HasHeader': False}
// {'industrial_msgs': ['/home/ros/catkin_ws/src/industrial_core/industrial_msgs/msg'], 'trajectory_msgs': ['/opt/ros/kinetic/share/trajectory_msgs/cmake/../msg'], 'std_msgs': ['/opt/ros/kinetic/share/std_msgs/cmake/../msg'], 'geometry_msgs': ['/opt/ros/kinetic/share/geometry_msgs/cmake/../msg']}
// !!!!!!!!!!! ['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_parsed_fields', 'constants', 'fields', 'full_name', 'has_header', 'header_present', 'names', 'package', 'parsed_fields', 'short_name', 'text', 'types']
template <class ContainerAllocator>
struct IsFixedSize< ::industrial_msgs::StopMotionResponse_<ContainerAllocator> >
: TrueType
{ };
template <class ContainerAllocator>
struct IsFixedSize< ::industrial_msgs::StopMotionResponse_<ContainerAllocator> const>
: TrueType
{ };
template <class ContainerAllocator>
struct IsMessage< ::industrial_msgs::StopMotionResponse_<ContainerAllocator> >
: TrueType
{ };
template <class ContainerAllocator>
struct IsMessage< ::industrial_msgs::StopMotionResponse_<ContainerAllocator> const>
: TrueType
{ };
template <class ContainerAllocator>
struct HasHeader< ::industrial_msgs::StopMotionResponse_<ContainerAllocator> >
: FalseType
{ };
template <class ContainerAllocator>
struct HasHeader< ::industrial_msgs::StopMotionResponse_<ContainerAllocator> const>
: FalseType
{ };
template<class ContainerAllocator>
struct MD5Sum< ::industrial_msgs::StopMotionResponse_<ContainerAllocator> >
{
static const char* value()
{
return "50b1f38f75f5677e5692f3b3e7e1ea48";
}
static const char* value(const ::industrial_msgs::StopMotionResponse_<ContainerAllocator>&) { return value(); }
static const uint64_t static_value1 = 0x50b1f38f75f5677eULL;
static const uint64_t static_value2 = 0x5692f3b3e7e1ea48ULL;
};
template<class ContainerAllocator>
struct DataType< ::industrial_msgs::StopMotionResponse_<ContainerAllocator> >
{
static const char* value()
{
return "industrial_msgs/StopMotionResponse";
}
static const char* value(const ::industrial_msgs::StopMotionResponse_<ContainerAllocator>&) { return value(); }
};
template<class ContainerAllocator>
struct Definition< ::industrial_msgs::StopMotionResponse_<ContainerAllocator> >
{
static const char* value()
{
return "industrial_msgs/ServiceReturnCode code\n\
\n\
\n\
================================================================================\n\
MSG: industrial_msgs/ServiceReturnCode\n\
# Service return codes for simple requests. All ROS-Industrial service\n\
# replies are required to have a return code indicating success or failure\n\
# Specific return codes for different failure should be negative.\n\
int8 val\n\
\n\
int8 SUCCESS = 1\n\
int8 FAILURE = -1\n\
\n\
";
}
static const char* value(const ::industrial_msgs::StopMotionResponse_<ContainerAllocator>&) { return value(); }
};
} // namespace message_traits
} // namespace ros
namespace ros
{
namespace serialization
{
template<class ContainerAllocator> struct Serializer< ::industrial_msgs::StopMotionResponse_<ContainerAllocator> >
{
template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
{
stream.next(m.code);
}
ROS_DECLARE_ALLINONE_SERIALIZER
}; // struct StopMotionResponse_
} // namespace serialization
} // namespace ros
namespace ros
{
namespace message_operations
{
template<class ContainerAllocator>
struct Printer< ::industrial_msgs::StopMotionResponse_<ContainerAllocator> >
{
template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::industrial_msgs::StopMotionResponse_<ContainerAllocator>& v)
{
s << indent << "code: ";
s << std::endl;
Printer< ::industrial_msgs::ServiceReturnCode_<ContainerAllocator> >::stream(s, indent + " ", v.code);
}
};
} // namespace message_operations
} // namespace ros
#endif // INDUSTRIAL_MSGS_MESSAGE_STOPMOTIONRESPONSE_H
| [
"steffenlarsen78@gmail.com"
] | steffenlarsen78@gmail.com |
b75a78fb2024d5ae4436e16dc19b05b4a646e044 | 21ed6143340b9ab7f9c5937898f65b9914c0d6c0 | /include/Thread/ACond.hh | 6bef73576ba10aff142e76f111e9dba171f71594 | [] | no_license | guitehub/tek2-cpp_bomberman | 71486f8edd58778a5b11c6a112eb7e35bf47439c | d4a74ef32072269c841d5a1bf2a1a0f6d2a7b56f | refs/heads/master | 2022-09-09T12:18:10.440460 | 2020-04-19T14:56:08 | 2020-04-19T14:56:08 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 723 | hh | //
// ACond.hh for bomber in /home/chanut_g/rendu/cpp_bomberman/include/Thread
//
// Made by Guillaume
// Login <chanut_g@epitech.net>
//
// Started on Mon May 26 15:50:45 2014 Guillaume
// Last update Mon May 26 15:51:00 2014 Guillaume
//
#ifndef ACOND_HH_
# define ACOND_HH_
class ACond
{
protected:
bool _isLock;
bool _isInit;
public:
ACond();
virtual ~ACond() {}
virtual void create(void) = 0;
virtual void destroy(void) = 0;
virtual void wait(void) = 0;
virtual int waitTimer(long) = 0;
virtual void signal(void) = 0;
virtual void broadcast(void) = 0;
virtual void unlock(void) = 0;
virtual bool getIsInit(void) const;
virtual bool getIsLock(void) const;
};
#endif
| [
"guillaume.p.chanut@gmail.com"
] | guillaume.p.chanut@gmail.com |
d2799e4c6e25309adc50b74ff774d3d7a6c0a490 | 7601f733578ce0a7017d13579ae32bd666327436 | /PixelConfigDBInterface/include/PixelConfigInterface.h | 7248fb05d8e5745a14734a10f986fd7a8a725b72 | [] | no_license | radtek/PixelOnlineSoftware | 03c50f9cda443f95b83b2f5709edeb39e4cad148 | 7a7ae00f724df4998135f3176db60dfc81cfeb3b | refs/heads/master | 2021-02-26T12:08:27.890083 | 2015-08-20T21:38:35 | 2015-08-20T21:38:35 | 245,524,297 | 1 | 0 | null | 2020-03-06T22:01:13 | 2020-03-06T22:01:12 | null | UTF-8 | C++ | false | false | 39,055 | h | #ifndef PixelConfigInterface_h
#define PixelConfigInterface_h
/*
$Author: menasce $
$Date: 2009/11/17 15:12:22 $
$Revision: 1.77 $
*/
#include <stdlib.h>
#include <iostream>
#include <string>
#include <set>
#include "PixelConfigDBInterface/include/PixelConfigDBInterface.h" // was DB
#include "CalibFormats/SiPixelObjects/interface/PixelTimeFormatter.h"
#include "CalibFormats/SiPixelObjects/interface/PixelConfigFile.h"
#include "CalibFormats/SiPixelObjects/interface/PixelConfigKey.h"
#include "CalibFormats/SiPixelObjects/interface/PixelConfigDoc.info"
#include <cstdlib>
//typedef int PixelConfigKey;
/*template <class K> */
/*! \defgroup AbstractConfigurationInterface "Configuration Objects Interface"
* \brief The class describing an abstact interface to the "Configuration Objects".
*
* Configuration Objects represent the knowledge of the whole CMS Pixel %Detector at
* any given time. This knowledge is made persistent in two alternative ways:<br/>
* <ul>
* <li> a file-based set of configurations, stored in an appropriate hierarchy of
* folders, indexed by a main "configuration key"
* <li> a full fledged Oracle Database, were the %Detector status is represented by
* a complex set of relational tables.
* </ul>
* The "Configuration Objects Interface" encompasses both of these persistency methodologies.
* In particular ...
*
* @{
* \class PixelConfigInterface PixelConfigInterface.h "interface/PixelConfigInterface.h"
* \brief The concrete class describing the "file-based configuration" interface
*/
class PixelConfigInterface {
public:
PixelConfigInterface(){getMode();}
PixelConfigInterface(bool mode){setMode(mode);}
//==============================================================================
static void setMode(bool m)
{
//cout << __LINE__ << "]\t[PixelConfigInterface::setMode()]\t\t " << endl ;
if(getMode() != m)
{
getMode() = m;
if(getMode() == true)
{
pixelConfigDB().connect();
}
else
{
pixelConfigDB().disconnect();
}
}
}
//==============================================================================
static void setKeyAlias(pos::PixelConfigKey key, std::string theAlias)
{
if(getMode())
{
pixelConfigDB().setKeyAlias(key, theAlias);
}
else
{;}
}
//==============================================================================
static void setGlobalKey(pos::PixelConfigKey key)
{
if(getGlobalKey().key() != key.key())
{
getGlobalKey() = key;
}
}
//==============================================================================
template <class T>
static void get(T* &pixelObject,
std::string path,
pos::PixelConfigKey key)
{
std::string mthn = "[PixelConfigInterface.h::get(scalar)]\t\t\t " ;
std::stringstream arg ; arg << "PixelConfigInterface::get(T*) T=" << typeid(pixelObject).name() ;
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter(arg.str()) ;
setGlobalKey(key) ;
if(getMode())
{
pixelConfigDB().connect();
pixelConfigDB().get(pixelObject,path,key);
}
else
{
pos::PixelConfigFile::get(pixelObject,path,key);
}
timer->stopTimer() ;
delete timer ;
}
//==============================================================================
template <class T>
static void get(T* &pixelObject,std::string path,unsigned int version)
{
if(getMode())
{
//pixelConfigDB().connect();
pixelConfigDB().getByVersion(pixelObject,path,version);
}
else{
pos::PixelConfigFile::get(pixelObject,path,version);
}
}
//==============================================================================
template <class T>
static void get(std::map<std::string, T*> &objects,pos::PixelConfigKey key)
{
setGlobalKey(key) ;
std::stringstream arg ; arg << "PixelConfigInterface::get(map<string,T*>) T=" << typeid(objects).name() ;
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter(arg.str()) ;
if(getMode())
{
pixelConfigDB().get(objects, key) ;
}
else
{
pos::PixelConfigFile::get(objects,key);
}
timer->stopTimer() ;
delete timer ;
}
//==============================================================================
template <class T>
static bool configurationDataExists(T* &pixelObject,
std::string path,
pos::PixelConfigKey key)
{
std::stringstream arg ; arg << "PixelConfigInterface::configurationDataExists(T*) T=" << typeid(pixelObject).name() ;
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter(arg.str()) ;
bool retStatus = false ;
if(getMode())
{
retStatus = pixelConfigDB().configurationDataExists(pixelObject,path,key);
}
else
{
retStatus = pos::PixelConfigFile::configurationDataExists(pixelObject,path,key);
}
timer->stopTimer() ;
delete timer ;
return retStatus ;
}
//==============================================================================
static std::vector<std::pair<std::string, unsigned int> > getAliases()
{
std::string mthn = "]\t[PixelConfigInterface::getAliases()]\t\t\t " ;
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigInterface::getAliases()") ;
std::vector<std::pair<std::string, unsigned int> > aliases ;
if(getMode())
{
if( DEBUG_CONFIG_DB ) cout << __LINE__ << mthn << "Using DataBase connection" << endl ;
aliases = pixelConfigDB().getAliases() ;
}
else
{
if( DEBUG_CONFIG_DB ) cout << __LINE__ << mthn << "Using files " << endl ;
aliases = pos::PixelConfigFile::getAliases();
}
timer->stopTimer() ;
delete timer ;
return aliases ;
}
//==============================================================================
static std::vector<std::vector<std::string> > getAliasesWithCommentsAndDate()
{
std::string mthn = "]\t[PixelConfigInterface::getAliasesWithCommentsAndDate()]\t " ;
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("[PixelConfigInterface::getAliasesWithCommentsAndDate()]") ;
std::vector<std::vector<std::string > > aliases ;
if(getMode())
{
if( DEBUG_CONFIG_DB ) cout << __LINE__ << mthn << "Using DataBase connection" << endl ;
aliases = pixelConfigDB().getAliasesWithCommentsAndDate() ;
}
else
{
if( DEBUG_CONFIG_DB ) cout << __LINE__ << mthn << "Using files " << endl ;
vector<string> tmp ;
tmp.push_back("CONFIG_KEY_ID" ) ; // 0
tmp.push_back("CONFIG_KEY" ) ; // 1
tmp.push_back("KEY_ALIAS_ID" ) ; // 2
tmp.push_back("CONFIG_ALIAS" ) ; // 3
tmp.push_back("CONFIG_KEY_TYPE" ) ; // 4
tmp.push_back("RECORD_INSERTION_TIME") ; // 5
tmp.push_back("COMMENT_DESCRIPTION" ) ; // 6
tmp.push_back("PROVENANCE" ) ; // 7
tmp.push_back("AUTHOR" ) ; // 8
aliases.push_back(tmp) ;
std::vector<std::pair<std::string, unsigned int> > aliasesNoCommentsAndDate = pos::PixelConfigFile::getAliases();
for(std::vector<std::pair<std::string, unsigned int> >::iterator it = aliasesNoCommentsAndDate.begin();
it != aliasesNoCommentsAndDate.end() ; it++)
{
tmp.clear() ;
stringstream ss ;
ss.str("") ;
ss << it->second ;
tmp.push_back("Unavailable for files") ; // 0 CONFIG_KEY_ID, fake for files
tmp.push_back(ss.str()) ; // 1 CONFIG_KEY, GLOBAL KEY NUMBER
tmp.push_back("Unavailable for files") ; // 2 KEY_ALIAS_ID, fake for files
tmp.push_back(it->first) ; // 3 CONFIG_KEY_ALIAS, Alias
tmp.push_back("Unavailable for files") ; // 4 CONFIG_KEY_TYPE, fake for files
tmp.push_back("01/01/1970 00:00:00") ; // 5 RECORD_INSERTION_TYPE, fake for files
tmp.push_back("Q29tbWVudHMgYXJlIHVuYXZhaWxhYmxlIGZvciBmaWxlcw==") ; // 6 COMMENT_DESCRIPTION, fake for files (base64 encoded)
tmp.push_back("Provenance unavailable for files") ; // 7 PROVENANCE, fake for files
tmp.push_back("Author is unavailable for files") ; // 8 AUTHOR, fake for files
aliases.push_back(tmp) ;
}
}
timer->stopTimer() ;
delete timer ;
return aliases ;
}
//==============================================================================
static bool getVersionAliases(std::string configAlias,
unsigned int &key,
std::vector<std::pair<std::string,std::string> > &versionAliases)
{
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigInterface::getVersionAliases()") ;
bool retStatus = false ;
if(getMode())
{
retStatus = pixelConfigDB().getVersionAliases(configAlias, key, versionAliases) ;
}
else
{
retStatus = pos::PixelConfigFile::getVersionAliases(configAlias,
key,
versionAliases);
}
timer->stopTimer() ;
delete timer ;
return retStatus ;
}
//==============================================================================
static void forceAliasesReload(bool mode)
{
if(getMode())
{
cout << __LINE__ << "]\t[PixelConfigInterface::forceAliasesReload()]\t\t No such function implemented yet for DB access" << endl ;
}
else
{
pos::PixelConfigFile::forceAliasesReload(mode);
}
}
//==============================================================================
static std::map<std::string, unsigned int> getAliases_map()
{
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigInterface::getAliases_map()") ;
std::map<std::string, unsigned int> aliasMap ;
if(getMode())
{
aliasMap = pixelConfigDB().getAliases_map() ;
}
else
{
aliasMap = pos::PixelConfigFile::getAliases_map();
}
timer->stopTimer() ;
delete timer ;
return aliasMap ;
}
//==============================================================================
static void addAlias(std::string alias, unsigned int key)
{
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigInterface::addAlias(string,unsigned int)") ;
if(getMode())
{
pixelConfigDB().addAlias(alias, key) ;
}
else
{
pos::PixelConfigFile::addAlias(alias,key);
}
timer->stopTimer() ;
delete timer ;
return ;
}
//==============================================================================
static void addAlias(std::string alias, unsigned int key,
std::vector<std::pair<std::string, std::string> > versionaliases)
{
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigInterface::addAlias(string,unsigned int,vector)") ;
if(getMode())
{
pixelConfigDB().addAlias(alias,key,versionaliases);
}
else
{
pos::PixelConfigFile::addAlias(alias,key,versionaliases);
}
timer->stopTimer() ;
delete timer ;
return ;
}
//==============================================================================
static void addVersionAlias(std::string path, unsigned int version, std::string alias)
{
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigInterface::addVersionAlias()") ;
if(getMode())
{
pixelConfigDB().addVersionAlias(path, version, alias) ;
}
else
{
pos::PixelConfigFile::addVersionAlias(path,version,alias);
}
timer->stopTimer() ;
delete timer ;
return ;
}
//==============================================================================
static void addComment(std::string comment)
{
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigInterface::addComment(string)") ;
if(getMode())
{
pixelConfigDB().addComment( comment) ;
}
else
{
std::cout << __LINE__ << "]\t[PixelConfigInterface::addComment()]\t\t Not implemented for file-based repository" << std::endl ;
}
timer->stopTimer() ;
delete timer ;
return ;
}
//==============================================================================
static void addAuthor(std::string author)
{
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigInterface::addAuthor(string)") ;
if(getMode())
{
pixelConfigDB().addAuthor( author) ;
}
else
{
std::cout << __LINE__ << "]\t[PixelConfigInterface::addAuthor()]\t\t Not implemented for file-based repository" << std::endl ;
}
timer->stopTimer() ;
delete timer ;
return ;
}
//==============================================================================
static unsigned int clone(unsigned int oldkey, std::string path, unsigned int version)
{
unsigned int newkey ;
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigInterface::clone()") ;
if(getMode())
{
newkey = pixelConfigDB().clone(oldkey, path, version) ;
}
else
{
pos::PixelConfigList iList = pos::PixelConfigFile::getConfig() ;
newkey = iList.clone(oldkey,path,version);
iList.writefile() ;
}
timer->stopTimer() ;
delete timer ;
return newkey ;
}
//==============================================================================
static unsigned int makeKey(std::vector<std::pair<std::string, unsigned int> > versions)
{
unsigned int newkey ;
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigInterface::makeKey()") ;
if(getMode())
{
newkey = pixelConfigDB().makeKey(versions);
}
else
{
newkey = pos::PixelConfigFile::makeKey(versions);
}
timer->stopTimer() ;
delete timer ;
return newkey ;
}
//==============================================================================
static unsigned int getVersion(std::string path,std::string alias)
{
if(getMode())
{
pos::pathVersionAliasMmap vData ;
vData = pixelConfigDB().getVersionData() ;
for(pos::pathVersionAliasMmap::iterator it = vData.begin() ; it != vData.end() ; it++)
{
/* cout << "|" << it->first << "|\t" */
/* << "|" << path << "|" << endl ; */
if(it->first == path)
{
for(pos::vectorVAPairs::iterator va = it->second.begin() ; va != it->second.end() ; va++)
{
/* cout << "|" << va->second << "|\t" */
/* << "|" << alias << "|" << endl ; */
if(va->second == alias)
return va->first ;
}
}
}
std::cout << __LINE__ << "]\t[PixelConfigInterface::getVersion(path, alias)]\t Fatal, no version found for path "
<< "|" << path << "|" << " and alias |" << alias << "|" << std::endl ;
assert(0) ;
}
else
{
return pos::PixelConfigFile::getVersion(path, alias);
}
}
//==============================================================================
//Returns the different objects and their versions for a given configuration
static std::vector<std::pair< std::string, unsigned int> > getVersions(pos::PixelConfigKey key)
{
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigInterface::getVersions()") ;
std::vector<std::pair< std::string, unsigned int> > versions ;
if(getMode())
{
versions = pixelConfigDB().getVersions(key) ;
}
else
{
versions = pos::PixelConfigFile::getVersions(key);
}
timer->stopTimer() ;
delete timer ;
return versions ;
}
//==============================================================================
static std::vector<std::vector< std::string> > getVersionsWithCommentsAndDate(pos::PixelConfigKey key)
{
/**
View: CMS_PXL_PIXEL_VIEW_OWNER.CONF_KEY_DATASET_MAP_V
Name Null? Type
0 CONFIG_KEY_ID NOT NULL NUMBER(38)
1 KEY_NAME NOT NULL VARCHAR2(80)
2 CONDITION_DATA_SET_ID NOT NULL NUMBER(38)
3 KIND_OF_CONDITION_ID NOT NULL NUMBER(38)
4 KIND_OF_CONDITION_NAME NOT NULL VARCHAR2(40)
5 CONDITION_VERSION VARCHAR2(40)
6 IS_MOVED_TO_HISTORY NOT NULL CHAR(1)
7 INSERTI_TIME
8 COMMENT_DESCRIPTION
9 AUTHOR
*/
std::string mthn = "]\t[PixelConfigInterface::getVersionsWithCommentsAndDate()]\t " ;
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigInterface::getVersionsWithCommentsAndDate()") ;
std::vector<std::vector< std::string> > versions ;
if(getMode())
{
versions = pixelConfigDB().getVersionsWithCommentsAndDate(key) ;
}
else
{
std::vector<std::pair< std::string, unsigned int> > versionsPartial ;
vector<string> header,tmp ;
header.push_back("CONFIG_KEY_ID");
header.push_back("KEY_NAME");
header.push_back("CONDITION_DATA_SET_ID");
header.push_back("KIND_OF_CONDITION_ID");
header.push_back("KIND_OF_CONDITION_NAME");
header.push_back("CONDITION_VERSION");
header.push_back("IS_MOVED_TO_HISTORY");
header.push_back("INSERT_TIME");
header.push_back("COMMENT_DESCRIPTION");
header.push_back("AUTHOR");
versions.push_back(header) ;
versionsPartial = pos::PixelConfigFile::getVersions(key);
for(std::vector<std::pair<std::string, unsigned int> >::iterator it = versionsPartial.begin();
it != versionsPartial.end() ; it++)
{
tmp.clear() ;
stringstream ss ;
ss.str("") ;
tmp.push_back("fake") ; // CONFIG_KEY_ID
tmp.push_back("fake") ; // KEY_NAME
tmp.push_back("fake") ; // CONDITION_DATA_SET_ID
tmp.push_back("fake") ; // KIND_OF_CONDITION_ID
tmp.push_back(it->first) ; // KIND_OF_CONDITION_NAME
ss << it->second ; //
tmp.push_back(ss.str()) ; // CONDITION_VERSION
tmp.push_back("fake") ; // IS_MOVED_TO_HISTORY
tmp.push_back("01/01/1970 00:00:00") ; // RECORD_INSERTION_TIME
tmp.push_back("Q29tbWVudHMgYXJlIHVuYXZhaWxhYmxlIGZvciBmaWxlcw==") ; // COMMENT_DESCRIPTION base64_encode("Comments are unavailable for files")
tmp.push_back("Author is unavailable for files") ; // AUTHOR "QXV0aG9yIGlzIHVuYXZhaWxhYmxlIGZvciBmaWxlcw=="
versions.push_back(tmp) ;
}
}
timer->stopTimer() ;
delete timer ;
return versions ;
}
//==============================================================================
//Returns the different objects and their versions for a given configuration
static std::map<std::string,std::vector<std::pair< std::string, unsigned int> > > getFullVersions()
{
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigInterface::getFullVersions()") ;
std::map<std::string,std::vector<std::pair< std::string, unsigned int> > > result ;
if(getMode())
{
return pixelConfigDB().getFullVersions() ;
}
else
{
std::vector <std::pair<std::string, unsigned int> > aList = pos::PixelConfigFile::getAliases();
for(std::vector<std::pair<std::string, unsigned int> >::iterator itKey=aList.begin(); itKey!=aList.end(); itKey++ )
{
{
pos::PixelConfigKey globalKey((*itKey).second) ;
vector<pair<string, unsigned int> > vList = pos::PixelConfigFile::getVersions(globalKey) ;
std::stringstream keyString ;
keyString.str("") ;
keyString << globalKey.key() ;
result[keyString.str()] = vList ;
}
}
}
timer->stopTimer() ;
delete timer ;
return result ;
}
//==============================================================================
static std::map<std::string,std::vector<std::pair< std::string, std::string> > > getKeyAliasVersionAliases(int start, int howMany, int &total)
{
std::string mthn = "]\t[PixelConfigInterface::getKeyAliasVersionAliases()] " ;
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigInterface::getKeyAliasVersionAliases()") ;
std::map<std::string,std::vector<std::pair< std::string, std::string> > > result ;
if(getMode())
{
result = pixelConfigDB().getKeyAliasVersionAliases(start, howMany, total) ;
}
else
{
pos::PixelAliasList aList = pos::PixelConfigFile::getAlias() ;
total = aList.nAliases() ;
cout << __LINE__ << mthn << "Total aliases found: " << total << endl ;
std::map<std::string, std::vector<std::pair<std::string, std::string> > > serviceMap ;
for(int i = 0 ; i < total ; i++)
{
serviceMap[aList.name(i)] = aList.operator[](i).versionAliases() ;
std::cout << __LINE__ << mthn << i << "\t" << aList.name(i) << "\t" << aList.key(i) << std::endl ;
}
std::map<std::string, std::vector<std::pair<std::string, std::string> > >::iterator kakv_it = serviceMap.begin() ;
int count = 0 ;
for(; kakv_it != serviceMap.end() ; kakv_it++)
{
std::cout << __LINE__ << mthn << " " << (*kakv_it).first << " <- " << std::endl ;
if(count >= start && count < (start+howMany))
{
result[(*kakv_it).first] = (*kakv_it).second ;
}
count++ ;
}
}
timer->stopTimer() ;
delete timer ;
return result ;
}
//==============================================================================
static std::map<std::string,std::vector<std::string> > getKeyAliasVersionAliases(int &total)
{
std::string mthn = "]\t[PixelConfigInterface::getKeyAliasVersionAliases()] " ;
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigInterface::getKeyAliasVersionAliases(int&)") ;
std::map<std::string,std::vector<std::string> > result ;
if(getMode())
{
result = pixelConfigDB().getKeyAliasVersionAliases(total) ;
}
else
{
pos::PixelAliasList aList = pos::PixelConfigFile::getAlias() ;
total = aList.nAliases() ;
for(int i = 0 ; i < total ; i++)
{
std::vector<std::pair<std::string, std::string> > vaPair = aList.operator[](i).versionAliases() ;
for(std::vector<std::pair<std::string, std::string> >::iterator it=vaPair.begin(); it!=vaPair.end(); it++)
{
stringstream ss ;
result[aList.name(i)].push_back((*it).first ) ;
result[aList.name(i)].push_back((*it).second ) ;
result[aList.name(i)].push_back("1970, Jan 01 - 00:00:00" ) ;
result[aList.name(i)].push_back("Q29tbWVudHMgYXJlIHVuYXZhaWxhYmxlIGZvciBmaWxlcw==") ;
result[aList.name(i)].push_back("Author is not available for files" ) ;
ss.str("") ;
ss << aList.key(i) ;
result[aList.name(i)].push_back(ss.str()) ;
}
}
}
timer->stopTimer() ;
delete timer ;
return result ;
}
//==============================================================================
static std::map<unsigned int, std::vector<std::vector< std::string> > > getConfGivenKoc(std::map<std::string, std::string> kocs,
int start,
int howMany,
int from,
int to,
int &total)
{
std::string mthn = "]\t[PixelConfigInterface::getConfGivenKoc()]\t\t " ;
std::string mode = kocs["MODE"] ;
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigInterface::getConfGivenKoc()") ;
std::map<unsigned int, std::vector<std::vector< std::string> > > result ;
if(getMode())
{
std::map<std::string, std::string> query;
for(std::map<std::string, std::string>::iterator it=kocs.begin(); it!=kocs.end(); it++)
{
if( (*it).first == "start" ||
(*it).first == "limit" ||
(*it).first == "MODE" ||
(*it).second == "ANY" ) continue ;
query[(*it).first] = (*it).second ;
}
result = pixelConfigDB().getConfGivenKoc(query, start, howMany, from, to, total) ;
}
else
{
unsigned int expected = 0 ;
for(std::map<std::string, std::string>::iterator it=kocs.begin(); it!=kocs.end(); it++)
{
if( (*it).first != "start" &&
(*it).first != "limit" &&
(*it).first != "MODE" &&
(*it).second != "ANY" ) expected++ ;
}
static pos::PixelConfigList &list = pos::PixelConfigFile::getConfig() ;
total = list.size();
int counter = 0 ;
for(unsigned int key=0; key<(unsigned int)total; key++)
{
pos::PixelConfigKey globalKey(key) ;
vector<pair<string, unsigned int> > vList = pos::PixelConfigFile::getVersions(globalKey) ;
std::vector<std::vector< std::string> > newvList ;
bool accept = true ;
unsigned int found = 0 ;
for(vector<pair<string, unsigned int> >::iterator i=vList.begin(); i!=vList.end(); i++)
{
std::string fieldName = (*i).first ;
for(unsigned int k=0; k<fieldName.size(); k++)
{
fieldName[k] = std::toupper(fieldName[k]) ;
}
if( kocs[fieldName] == "ANY" || ( kocs[fieldName].size() > 0 &&
(unsigned int)atoi(kocs[fieldName].c_str()) == (*i).second) )
{
if( kocs[fieldName] != "ANY" && (unsigned int)atoi(kocs[fieldName].c_str()) == (*i).second) found++ ;
}
else
{
accept = false ;
}
//if( key == 6753 ) cout << __LINE__ << mthn << key << "]\t" << (*i).first << " --> " << kocs[fieldName] << endl ;
std::vector< std::string> tmp ;
std::stringstream s ; s << (*i).second ;
tmp.push_back("") ; // 0 CONFIG_KEY_ID
tmp.push_back("") ; // 1 KEY_NAME
tmp.push_back("") ; // 2 CONDITION_DATA_SET_ID
tmp.push_back("") ; // 3 KIND_OF_CONDITION_ID
tmp.push_back((*i).first) ; // 4 KIND_OF_CONDITION_NAME
tmp.push_back(s.str()) ; // 5 CONDITION_VERSION
tmp.push_back("") ; // 6 IS_MOVED_TO_HISTORY
tmp.push_back("") ; // 7 RECORD_INSERTION_TIME
tmp.push_back("") ; // 8 COMMENT_DESCRIPTION base46_encode("Comments are unavailable for files")
tmp.push_back("") ; // 9 AUTHOR
if( i == vList.begin() ) newvList.push_back(tmp) ; // Add a dummy record: this is to comply with DB version,
newvList.push_back(tmp) ; // where first vector element is actually a list of FIELD names
}
if( accept )
{
// cout << __LINE__ << mthn << key << "]\tmode: " << mode << endl ;
if( mode == "STRICT" )
{
if( found != expected )
{
// cout << __LINE__ << mthn << key << "]\tExpected: " << expected << " found: " << found << endl ;
continue ;
}
}
counter++ ;
if( counter < start || counter > start + howMany ) continue ;
// std::stringstream keyString ;
// keyString.str("") ;
// keyString << globalKey.key() ;
result[globalKey.key()] = newvList ;
}
}
}
timer->stopTimer() ;
delete timer ;
return result ;
}
//==============================================================================
static std::map<std::string,std::vector<std::vector< std::string> > > getFullCfgs(int start,
int howMany,
int from,
int to,
int &total)
{
std::string mthn = "]\t[PixelConfigInterface::getFullCfgs()]\t\t\t " ;
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigInterface::getFullCfgs()") ;
std::map<std::string,std::vector<std::vector< std::string> > > result ;
if(getMode())
{
result = pixelConfigDB().getFullCfgs(start, howMany, from, to, total) ;
}
else
{
// if( from < start ) {from = start ;}
// if( to > start+howMany ) {to = start+howMany;}
static pos::PixelConfigList &list = pos::PixelConfigFile::getConfig() ;
total = list.size();
for(unsigned int key=0; key<(unsigned int)total; key++)
{
if( from == -2147483647 && (key >= (unsigned int)start && key < (unsigned int)(start+howMany)) ||
from != -2147483647 && (key >= (unsigned int)from && key <= (unsigned int)to) )
{
pos::PixelConfigKey globalKey(key) ;
vector<pair<string, unsigned int> > vList = pos::PixelConfigFile::getVersions(globalKey) ;
std::vector<std::vector< std::string> > newvList ;
for(vector<pair<string, unsigned int> >::iterator i=vList.begin(); i!=vList.end(); i++)
{
std::vector< std::string> tmp ;
std::stringstream s ; s << (*i).second ;
tmp.push_back("") ; // 0 CONFIG_KEY_ID
tmp.push_back("") ; // 1 KEY_NAME
tmp.push_back("") ; // 2 CONDITION_DATA_SET_ID
tmp.push_back("") ; // 3 KIND_OF_CONDITION_ID
tmp.push_back((*i).first) ; // 4 KIND_OF_CONDITION_NAME
tmp.push_back(s.str()) ; // 5 CONDITION_VERSION
tmp.push_back("") ; // 6 IS_MOVED_TO_HISTORY
tmp.push_back("1970, Jan 01 - 00:00:00") ; // 7 RECORD_INSERTION_TIME
tmp.push_back("Q29tbWVudHMgYXJlIHVuYXZhaWxhYmxlIGZvciBmaWxlcw==") ; // 8 COMMENT_DESCRIPTION base46_encode("Comments are unavailable for files")
tmp.push_back("Author is unavailable for files") ; // 9 AUTHOR
newvList.push_back(tmp) ;
}
std::stringstream keyString ;
keyString.str("") ;
keyString << globalKey.key() ;
result[keyString.str()] = newvList ;
}
}
}
timer->stopTimer() ;
delete timer ;
return result ;
}
//==============================================================================
static std::string uploadStatus(std::string uploadedFile)
{
if(getMode())
{
return pixelConfigDB().uploadStatus(uploadedFile) ;
}
else
{
return std::string("true") ;
}
}
//==============================================================================
template <class T>
static int put( T* pixelObject,int configurationFileVersion, std::string path)
{
std::stringstream arg ; arg << "PixelConfigInterface::put(T*,int,string) T=" << typeid(pixelObject).name() ;
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter(arg.str()) ;
int retStatus = 0 ;
if(getMode())
{
retStatus = pixelConfigDB().put(pixelObject,configurationFileVersion) ;
}
else
{
retStatus = put(pixelObject, path) ;
}
timer->stopTimer() ;
delete timer ;
return retStatus;
}
//==============================================================================
template <class T>
static int put(T* pixelObject,std::string label)
{
std::stringstream arg ; arg << "PixelConfigInterface::put(T*,string) T=" << typeid(pixelObject).name() ;
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter(arg.str()) ;
int retStatus = 0 ;
if(getMode())
{
retStatus = pixelConfigDB().put(pixelObject,getGlobalKey()) ;
}
else
{
retStatus = pos::PixelConfigFile::put(pixelObject, label);
}
timer->stopTimer() ;
delete timer ;
return retStatus;
}
//==============================================================================
static std::vector<std::string> getVersionAliases(std::string path)
{
if(getMode())
{
return pixelConfigDB().getVersionAliases(path);
}
else
{
//assert(0);
return pos::PixelConfigFile::getVersionAliases(path);
}
}
//==============================================================================
template <class T>
static int put(std::vector<T*> objects,std::string label)
{
std::stringstream arg ; arg << "PixelConfigInterface::put(vector<T*>,string) T=" << typeid(objects).name() ;
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter(arg.str()) ;
int retStatus = 0 ;
if(getMode())
{
retStatus = pixelConfigDB().put(objects,getGlobalKey()) ;
}
else
{
retStatus = pos::PixelConfigFile::put(objects, label);
}
timer->stopTimer() ;
delete timer ;
return retStatus;
}
//==============================================================================
template <class T>
static int put(std::vector<T*> objects, int configurationFileVersion, std::string path)
{
std::stringstream arg ; arg << "PixelConfigInterface::put(vector<T*>,int,string) T=" << typeid(objects).name() ;
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter(arg.str()) ;
int retStatus = 0 ;
if(getMode())
{
retStatus = pixelConfigDB().put(objects,configurationFileVersion) ;
}
else
{
retStatus = put(objects, path) ;
}
timer->stopTimer() ;
delete timer ;
return retStatus;
}
//==============================================================================
static pos::pathVersionAliasMmap getVersionData()
{
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigInterface::getVersionData()") ;
pos::pathVersionAliasMmap vData ;
if(getMode())
{
vData = pixelConfigDB().getVersionData() ;
}
else
{
vData = pos::PixelConfigFile::getVersionData();
}
timer->stopTimer() ;
delete timer ;
return vData ;
}
//==============================================================================
static pos::pathVersionAliasMmap getVersionData(string koc)
{
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigInterface::getVersionData(string)") ;
pos::pathVersionAliasMmap vData ;
if(getMode())
{
vData = pixelConfigDB().getVersionData(koc) ;
}
else
{
vData = pos::PixelConfigFile::getVersionData(koc);
}
timer->stopTimer() ;
delete timer ;
return vData ;
}
//==============================================================================
static std::vector<std::vector<std::string> > getVersionDataWithComments(string koc)
{
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigInterface::getVersionDataWithComments(string)") ;
std::map<std::string, std::vector<std::pair< unsigned int, string> > > vData ;
std::vector<std::vector<std::string> > result ;
if(getMode())
{
result = pixelConfigDB().getVersionDataWithComments(koc) ;
}
else
{
std::vector<std::string> tmp ;
tmp.push_back("VERSION_ALIAS");
tmp.push_back("VERSION");
tmp.push_back("COMMENT_DESCRIPTION");
tmp.push_back("RECORD_INSERTION_TIME");
tmp.push_back("RECORD_INSERTION_USER");
tmp.push_back("KIND_OF_CONDITION");
result.push_back(tmp) ;
tmp.clear() ;
stringstream ss ;
pos::PixelConfigFile::forceAliasesReload(true) ;
vData = pos::PixelConfigFile::getVersionData(koc);
for(std::map<std::string, std::vector<std::pair< unsigned int, string> > >::iterator it = vData.begin() ;
it != vData.end() ; it++)
{
for(std::vector<std::pair< unsigned int, string> >::iterator itt = it->second.begin() ;
itt != it->second.end() ; itt++)
{
tmp.clear() ;
tmp.push_back(itt->second) ;
ss.str("") ;
ss << itt->first ;
tmp.push_back(ss.str()) ;
tmp.push_back("Q29tbWVudHMgYXJlIHVuYXZhaWxhYmxlIGZvciBmaWxlcw==") ;
tmp.push_back("01/01/1970 00:00:00") ;
tmp.push_back("Author is unavailable for files") ;
tmp.push_back(it->first) ;
result.push_back(tmp) ;
}
}
return result ;
}
timer->stopTimer() ;
delete timer ;
return result;
}
//==============================================================================
static std::set<unsigned int> getExistingVersions(string koc)
{
pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigInterface::getExistingVersions(string)") ;
std::set<unsigned int> result ;
if(getMode())
{
result = pixelConfigDB().getExistingVersions(koc) ;
}
else
{
pos::PixelConfigList iList = pos::PixelConfigFile::getConfig();
for(unsigned int i = 0 ; i < iList.size() ; i++)
{
unsigned int version ;
if(iList[i].find(koc, version) != -1)
{
result.insert(version) ;
}
}
}
timer->stopTimer() ;
delete timer ;
return result ;
}
//==============================================================================
static std::vector<pos::pathAliasPair> getConfigAliases(std::string path)
{
// if(getMode())
// {
// return PixelConfigDBInterface::getConfigAliases(path);
// }
// else
// {
return pos::PixelConfigFile::getConfigAliases(path);
// }
}
//==============================================================================
static bool& getMode()
{
static bool mode = std::string(getenv("PIXELCONFIGURATIONBASE"))=="DB";
// cout << __LINE__ << "]\t[PixelconfigInterface::getMode()]\t\t " << "Setting mode to: " << mode << endl ;
if(mode) pixelConfigDB().connect();
// static bool mode = false ;
return mode;
}
//==============================================================================
static pos::PixelConfigKey& getGlobalKey()
{
static pos::PixelConfigKey lastUsedKey_(0); //for now make -1 initial value
return lastUsedKey_;
}
//==============================================================================
static std::string commit(int newKey)
{
if(getMode())
{
return pixelConfigDB().commitToDB(newKey) ;
}
else
{
std::cout << __LINE__ << "]\t[PixelConfigFile::commit()]\t\t\t Not implemented for file-based repository" << std::endl ;
return ("") ;
}
}
private:
static PixelConfigDBInterface& pixelConfigDB(){
static PixelConfigDBInterface aPixelConfigDB;
return aPixelConfigDB;
}
};
/* @} */
#endif
| [
"oaz2@cornell.edu"
] | oaz2@cornell.edu |
d9f8b2172fe2e39d1d7c9535e5424b5511196158 | 5c34abe10630b23da8ba7d1cbce38bda53a4b6fa | /CalibSvc/src/test/UseTkrAlign.cxx | 47229bd2c46f7d6cb30bcd47cde9381d07c81fac | [] | no_license | fermi-lat/GlastRelease-scons-old | cde76202f706b1c8edbf47b52ff46fe6204ee608 | 95f1daa22299272314025a350f0c6ef66eceda08 | refs/heads/master | 2021-07-23T02:41:48.198247 | 2017-05-09T17:27:58 | 2017-05-09T17:27:58 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,975 | cxx | //$Header$
#include <stdio.h>
#include "GaudiKernel/Algorithm.h"
#include "GaudiKernel/AlgFactory.h"
#include "GaudiKernel/IDataProviderSvc.h"
#include "GaudiKernel/Service.h"
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/SmartDataPtr.h"
#include "CalibSvc/ICalibPathSvc.h"
#include "CalibData/Tkr/TkrTowerAlignCalib.h"
#include "CalibData/Tkr/TkrInternalAlignCalib.h"
#include "CalibData/CalibTime.h"
#include "idents/TkrId.h"
/**
@file UseTkr.cxx
Simple algorithm to test functioning of "the other" TDS,
Tkr alignment (both inter-tower and internal to towers)
*/
/**
@class UseTkrAlign
Algorithm exemplifying retrieval and use of Tkr calibration quantities
*/
namespace {
void outputAlign(MsgStream& log, const CLHEP::Hep3Vector& disp,
const CLHEP::Hep3Vector& rot) {
double x = disp.x(), y = disp.y(), z = disp.z();
log << " disp=(" << x << ", " << y << ", " << z << ") " << endreq;
x = rot.x(); y = rot.y(); z = rot.z();
log << " rot=(" << x << ", " << y << ", " << z << ") ";
log << endreq << endreq;
}
}
class UseTkrAlign : public Algorithm {
public:
UseTkrAlign(const std::string& name, ISvcLocator* pSvcLocator);
StatusCode initialize();
StatusCode execute();
StatusCode finalize();
private:
/// Helper functions called by execute
void processInter(CalibData::TkrTowerAlignCalib* pNew,
const std::string& path);
void processIntra(CalibData::TkrInternalAlignCalib* pNew,
const std::string& path);
IDataProviderSvc* m_pCalibDataSvc;
ICalibPathSvc* m_pCalibPathSvc;
std::string m_pathInter;
std::string m_pathIntra;
int m_towerSer;
int m_internalSer;
};
/// Instantiation of a static factory to create instances of this algorithm
//static const AlgFactory<UseTkrAlign> Factory;
//const IAlgFactory& UseTkrAlignFactory = Factory;
DECLARE_ALGORITHM_FACTORY(UseTkrAlign);
UseTkrAlign::UseTkrAlign(const std::string& name,
ISvcLocator* pSvcLocator )
: Algorithm(name, pSvcLocator), m_pCalibDataSvc(0),
m_towerSer(-1), m_internalSer(-1)
{
// Declare properties here.
}
StatusCode UseTkrAlign::initialize() {
StatusCode sc;
MsgStream log(msgSvc(), name());
log << MSG::INFO << "Initialize()" << endreq;
// So far don't have any properties, but in case we do some day..
setProperties();
sc = service("CalibDataSvc", m_pCalibDataSvc, true);
if ( !sc.isSuccess() ) {
log << MSG::ERROR
<< "Could not get IDataProviderSvc interface of CalibDataSvc"
<< endreq;
return sc;
}
sc = service("CalibDataSvc", m_pCalibPathSvc, true);
if ( !sc.isSuccess() ) {
log << MSG::ERROR
<< "Could not get ICalibPathSvc interface of CalibDataSvc"
<< endreq;
return sc;
}
m_pathInter =
m_pCalibPathSvc->getCalibPath(ICalibPathSvc::Calib_TKR_TowerAlign,
std::string("vanilla") );
m_pathIntra =
m_pCalibPathSvc->getCalibPath(ICalibPathSvc::Calib_TKR_InternalAlign,
std::string("vanilla") );
// Get properties from the JobOptionsSvc
sc = setProperties();
return StatusCode::SUCCESS;
}
StatusCode UseTkrAlign::execute( ) {
MsgStream log(msgSvc(), name());
DataObject *pObject;
m_pCalibDataSvc->retrieveObject(m_pathInter, pObject);
CalibData::TkrTowerAlignCalib* pTowerAlign = 0;
pTowerAlign = dynamic_cast<CalibData::TkrTowerAlignCalib *> (pObject);
if (!pTowerAlign) {
log << MSG::ERROR << "Dynamic cast to TkrTowerAlignCalib failed" << endreq;
return StatusCode::FAILURE;
}
int newSerNo = pTowerAlign->getSerNo();
if (newSerNo != m_towerSer) {
log << MSG::INFO << "Processing new tower align after retrieveObject"
<< endreq;
m_towerSer = newSerNo;
processInter(pTowerAlign, m_pathInter);
}
m_pCalibDataSvc->updateObject(pObject);
pTowerAlign = 0;
try {
pTowerAlign = dynamic_cast<CalibData::TkrTowerAlignCalib *> (pObject);
}
catch (...) {
log << MSG::ERROR
<< "Dynamic cast to TkrTowerAlignCalib after update failed" << endreq;
return StatusCode::FAILURE;
}
newSerNo = pTowerAlign->getSerNo();
if (newSerNo != m_towerSer) {
log << MSG::INFO << "Processing new tower align after update"
<< endreq;
m_towerSer = newSerNo;
processInter(pTowerAlign, m_pathInter);
}
DataObject *pObject2;
CalibData::TkrInternalAlignCalib* pInternalAlign = 0;
m_pCalibDataSvc->retrieveObject(m_pathIntra, pObject2);
pInternalAlign = dynamic_cast<CalibData::TkrInternalAlignCalib *> (pObject2);
if (!pInternalAlign) {
log << MSG::ERROR << "Dynamic cast to TkrInternalAlignCalib failed"
<< endreq;
return StatusCode::FAILURE;
}
newSerNo = pInternalAlign->getSerNo();
if (newSerNo != m_internalSer) {
log << MSG::INFO << "Processing new internal align after retrieveObject"
<< endreq;
m_internalSer = newSerNo;
processIntra(pInternalAlign, m_pathIntra);
}
m_pCalibDataSvc->updateObject(pObject2);
pInternalAlign = 0;
try {
pInternalAlign = dynamic_cast<CalibData::TkrInternalAlignCalib *> (pObject2);
}
catch (...) {
log << MSG::ERROR
<< "Dynamic cast to TkrInternalAlignCalib after update failed" << endreq;
return StatusCode::FAILURE;
}
newSerNo = pInternalAlign->getSerNo();
if (newSerNo != m_internalSer) {
log << MSG::INFO << "Processing new internal align after update"
<< endreq;
m_internalSer = newSerNo;
processIntra(pInternalAlign, m_pathIntra);
}
return StatusCode::SUCCESS;
}
void UseTkrAlign::processInter(CalibData::TkrTowerAlignCalib* pNew,
const std::string& path) {
bool done = false;
MsgStream log(msgSvc(), name());
log << MSG::INFO << "Retrieved with path " << path << endreq
<< "Serial #" << pNew->getSerNo() << endreq;
log << MSG::INFO << "Vstart: " << (pNew->validSince()).hour(true)
<< " Vend: " << (pNew->validTill()).hour(true) << endreq;
std::string vStart = pNew->getValidStart()->getString();
std::string vEnd = pNew->getValidEnd()->getString();
log << MSG::INFO << "(Vstart, Vend) as ascii from CalibTime objects: "
<< endreq;
log << MSG::INFO << "(" << vStart << ", " << vEnd << ")" << endreq;
CLHEP::Hep3Vector disp, rot;
if (!done) {
done = true;
for (unsigned ix = 0; ix < 16; ix++) {
pNew->getTowerAlign(ix, disp, rot);
log << MSG::INFO << "Tower alignment for tower #" << ix << ":"
<< endreq;
outputAlign(log, disp, rot);
}
}
}
void UseTkrAlign::processIntra(CalibData::TkrInternalAlignCalib* pNew,
const std::string& path) {
bool done = false;
MsgStream log(msgSvc(), name());
log << MSG::INFO << "Retrieved with path " << path << endreq
<< "Serial #" << pNew->getSerNo() << endreq;
log << MSG::INFO << "Vstart: " << (pNew->validSince()).hour(true)
<< " Vend: " << (pNew->validTill()).hour(true) << endreq;
std::string vStart = pNew->getValidStart()->getString();
std::string vEnd = pNew->getValidEnd()->getString();
log << MSG::INFO << "(Vstart, Vend) as ascii from CalibTime objects: "
<< endreq;
log << MSG::INFO << "(" << vStart << ", " << vEnd << ")" << endreq;
if (!done) {
// fetch some random values
done = true;
unsigned tower = 1;
unsigned tray = 1;
CLHEP::Hep3Vector disp, rot;
StatusCode ok = pNew->getTrayAlign(tower, tray, disp, rot);
log << "Constants for tower" << tower << ", tray " << tray << ": "
<< endreq;
outputAlign(log, disp, rot);
tray = 3;
ok = pNew->getTrayAlign(tower, tray, disp, rot);
log << "Constants for tower" << tower << ", tray " << tray << ": "
<< endreq;
outputAlign(log, disp, rot);
tray = 5;
unsigned face = 0;
ok = pNew->getFaceAlign(tower, tray, face, disp, rot);
log << "Constants for tower" << tower << ", tray " << tray
<< "face " << face << ": "
<< endreq;
outputAlign(log, disp, rot);
tower = 6; tray=16; face=0;
unsigned ladder = 1;
unsigned wafer = 2;
ok = pNew->getLadderAlign(tower, tray, face, ladder, disp, rot);
log << "Constants for tower" << tower << ", tray " << tray
<< "face " << face << "ladder " << ladder << ": "
<< endreq;
outputAlign(log, disp, rot);
ok = pNew->getWaferAlign(tower, tray, face, ladder, wafer, disp, rot);
log << "Constants for tower" << tower << ", tray " << tray
<< "face " << face << "ladder " << ladder << "wafer " << wafer
<< ": "
<< endreq;
outputAlign(log, disp, rot);
}
}
StatusCode UseTkrAlign::finalize( ) {
MsgStream log(msgSvc(), name());
log << MSG::INFO
<< " Finalize UseTkrAlign "
<< endreq;
return StatusCode::SUCCESS;
}
| [
""
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.