repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
ZiminGrigory/trik-studio
qrgui/editor/propertyEditorView.cpp
/* Copyright 2007-2015 QReal Research Group * * 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...
ZiminGrigory/trik-studio
qrgui/models/details/modelsImplementation/abstractModel.cpp
/* Copyright 2007-2016 QReal Research Group * * 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...
ZiminGrigory/trik-studio
plugins/robots/generators/ev3/ev3GeneratorBase/src/converters/outputPortNameConverter.cpp
<filename>plugins/robots/generators/ev3/ev3GeneratorBase/src/converters/outputPortNameConverter.cpp /* Copyright 2007-2015 QReal Research Group * * 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 Licens...
ZiminGrigory/trik-studio
qrutils/fileSystemUtils.cpp
/* Copyright 2007-2015 QReal Research Group, <NAME> * * 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 applicabl...
ZiminGrigory/trik-studio
plugins/tools/refactoring/refactoringSupport/refactoringPlugin.cpp
/* Copyright 2007-2015 QReal Research Group * * 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...
ZiminGrigory/trik-studio
plugins/ubiq/ubiqGenerator/dispatcherGenerator.cpp
<filename>plugins/ubiq/ubiqGenerator/dispatcherGenerator.cpp /* Copyright 2007-2015 QReal Research Group * * 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/li...
ZiminGrigory/trik-studio
plugins/blockDiagram/visualDebugSupport/interpreter/visualDebugger.cpp
/* Copyright 2007-2015 QReal Research Group * * 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...
ZiminGrigory/trik-studio
qrrepo/private/folderCompressor.cpp
<filename>qrrepo/private/folderCompressor.cpp /* Copyright 2007-2015 QReal Research Group * * 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-...
ZiminGrigory/trik-studio
thirdparty/qscintilla/Qt4Qt5/ListBoxQt.cpp
// This module implements the specialisation of QListBox that handles the // Scintilla double-click callback. // // Copyright (c) 2017 Riverbank Computing Limited <<EMAIL>> // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published ...
ZiminGrigory/trik-studio
thirdparty/qscintilla/Qt4Qt5/qscilexerpascal.cpp
// This module implements the QsciLexerPascal class. // // Copyright (c) 2017 Riverbank Computing Limited <<EMAIL>> // // This file is part of QScintilla. // // 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 f...
ZiminGrigory/trik-studio
plugins/robots/generators/generatorBase/src/structuralControlFlowGenerator.cpp
<reponame>ZiminGrigory/trik-studio /* Copyright 2018 <NAME> * * 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 a...
ZiminGrigory/trik-studio
qrutils/widgets/imagePicker.cpp
<filename>qrutils/widgets/imagePicker.cpp /* Copyright 2017 CyberTech Labs 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 * * ...
ZiminGrigory/trik-studio
plugins/robots/common/twoDModel/src/engine/model/physics/simplePhysicsEngine.cpp
<gh_stars>10-100 /* Copyright 2007-2015 QReal Research Group * * 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 ...
zyb2013/shiny-engine
cache_server/src/CacheMemoryManager.cpp
#include "CacheMemoryManager.h" #include "CacheOperateHelper.h" #include "TimerManager.h" #include "GuidFactory.h" #include "CallBack.h" #include "Log.h" using namespace util; using namespace evt; using namespace thd; void CCacheMemoryManager::Init() { if(m_bInit) { OutputError("m_bInit"); return; } m_bI...
zyb2013/shiny-engine
shared/source/threading/SpinRecursiveRWLock.cpp
<gh_stars>10-100 #include "SpinRecursiveRWLock.h" namespace thd { SHARED_DLL_DECL CSpinRecursiveRWLock::thread_table_t CSpinRecursiveRWLock::s_thdContext; SHARED_DLL_DECL CSpinRecursiveRWLock::instc_table_t CSpinRecursiveRWLock::s_instcIdxs; }
zyb2013/shiny-engine
shared/deps/memcacheclient/Socket.cpp
<reponame>zyb2013/shiny-engine /*! @file Socket.cpp @version 2.0 @brief Basic socket wrapper */ //#include "stdafx.h" #include <errno.h> #ifdef _WIN32 // C4127: conditional expression is constant # pragma warning(disable: 4127) # pragma warning(push) // C4702: unreachable code // C4706: assign...
zyb2013/shiny-engine
shared/deps/luaplus/src/LuaState.inl
/////////////////////////////////////////////////////////////////////////////// // This source file is part of the LuaPlus source distribution and is Copyright // 2001-2010 by <NAME> (<EMAIL>). // // The latest version may be obtained from http://luaplus.org/. // // The code presented in this file may be used in any en...
zyb2013/shiny-engine
login_server/src/framework/LoginServer.cpp
<gh_stars>10-100 /* * File: LoginServer.cpp * Author: <NAME> * * Created on 2010_9_6 PM 3:23 */ #include <zmq.hpp> #include "Log.h" #include "TimerManager.h" #include "NodeDefines.h" #include "AppConfig.h" #include "LoginServer.h" #include "ModuleManager.h" #include "CacheOperateHelper.h" #include "WorkerOperate...
zyb2013/shiny-engine
master_server/src/framework/NodeDefines.cpp
#include "NodeDefines.h" volatile bool g_bExit = false; volatile long g_serverStatus = SERVER_STATUS_IDLE; volatile bool g_bAutoRestart = false;
zyb2013/shiny-engine
agent_server/src/framework/worker.pb.cc
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: worker.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "worker.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/once.h> #include <google/protobuf/io/coded_stream.h> #include ...
zyb2013/shiny-engine
master_server/src/msg_game_send_mail.pb.cc
<reponame>zyb2013/shiny-engine // Generated by the protocol buffer compiler. DO NOT EDIT! // source: msg_game_send_mail.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "msg_game_send_mail.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/once.h>...
zyb2013/shiny-engine
game_server/src/template/CharacterLvTemplate.cpp
#include "CharacterLvTemplate.h" #include "CsvParser.h" #define FIRST_FIELD_NAME std::string("Lv") #define SECOND_FIELD_NAME std::string("Exp") #define THIRD_FIELD_NAME std::string("Power_Gain") #define FOURTH_FIELD_NAME std::string("Power_Toplimit") #define FIFTH_FIELD_NAME std::string("General_Lv_Toplimit") void C...
zyb2013/shiny-engine
shared/source/database/Database.cpp
/* * File: Database.cpp * Author: <NAME> * */ #include "DatabaseEnv.h" using namespace util; using namespace thd; namespace db { Database::Database() : CThread(), m_queQuery(32), m_queExecute(32) , m_arrConnections(NULL), m_nConnectionSize(-1), m_nCurConCount(0) , m_nCurThdCount(0) { #if COMPILER == COMPILE...
zyb2013/shiny-engine
agent_server/src/framework/controlcentre.pb.cc
<gh_stars>10-100 // Generated by the protocol buffer compiler. DO NOT EDIT! // source: controlcentre.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "controlcentre.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/once.h> #include <google/protob...
zyb2013/shiny-engine
shared/source/network/NetworkTrace.cpp
/* * File: NetworkTrace.cpp * Author: <NAME> * * Created on March 22, 2011, 4:43 PM */ #include "NetworkTrace.h" #include <stdio.h> #include <stdarg.h> #ifdef WIN32 #define snprintf _snprintf #endif namespace ntwk { static void stderrTrace(const char* msg) { fputs(msg, stderr); fflush(...
zyb2013/shiny-engine
game_server/src/protocol/msg_game_login.pb.cc
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: msg_game_login.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "msg_game_login.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/once.h> #include <google/protobuf/io/coded_str...
zyb2013/shiny-engine
shared/deps/rpcz/remote_response_wrapper.hpp
#ifndef RPCZ_REMOTE_RESPONSE_WRAPPER_H #define RPCZ_REMOTE_RESPONSE_WRAPPER_H #include "rpcz/common.hpp" #include "client_request_callback.hpp" namespace rpcz { struct remote_response_wrapper { int64 deadline_ms; uint64 start_time; client_request_callback callback; }; } // namespace rpcz #endif // RPCZ_REM...
zyb2013/shiny-engine
agent_server/src/framework/AgentServiceImp.cpp
#include "AgentServiceImp.h" #include "AgentServer.h" #include "PlayerBase.h" #include "WorkerOperateHelper.h" CAgentServiceImp::CAgentServiceImp( const std::string& strServerBind, const std::string& servantAddress, const std::string& serverName, uint16_t serverId, CreatePlayerMethod createPlayerMethod /*= NULL*...
zyb2013/shiny-engine
shared/deps/rpcz/server.cc
<filename>shared/deps/rpcz/server.cc // Copyright 2011 Google Inc. 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....
zyb2013/shiny-engine
shared/deps/rpcz/client_connection.cc
<filename>shared/deps/rpcz/client_connection.cc<gh_stars>10-100 #include "client_connection.hpp" #include <zmq.hpp> #include "connection_manager.hpp" #include "internal_commands.hpp" #include "zmq_utils.hpp" namespace rpcz { void client_connection::reply(message_vector* v) { zmq::socket_t& socket = manager_->get_...
zyb2013/shiny-engine
game_server/src/framework/LoggingModule.cpp
/* * File: LoggingModule.cpp * Author: <NAME> * * Created on 2014_7_9, 16:00 */ #include "LoggingModule.h" #include "NodeDefines.h" #include "Log.h" #include "SeparatedStream.h" #include "CacheOperateHelper.h" #include "GuidFactory.h" #define SPN_MAX_LOG_TABLE_SIZE "game_log_max_table_num" #define SPN_SHOW_LO...
zyb2013/shiny-engine
shared/source/timerevent/TimerEvent.cpp
/* * File: TimerEvent.cpp * Author: <NAME> * * Created on 2010_9_17, 9:45 */ #include "TimerEvent.h" #include <assert.h> #include <stdio.h> #include <stdexcept> #include <time.h> #include <math.h> #include "TimestampManager.h" #include "SysTickCount.h" #include "SysCurrentThreadId.h" using namespace util; nam...
zyb2013/shiny-engine
agent_server/src/framework/CacheModule.cpp
#include "CacheModule.h" #include "SpinRWLock.h" #include "worker.rpcz.h" #include "ChannelManager.h" #include "rpc_controller.hpp" #include "Log.h" #include "BodyMessage.h" #include "NodeDefines.h" #include "CacheChannel.h" #include "CacheOperateHelper.h" using namespace mdl; using namespace rpcz; using namespace uti...
zyb2013/shiny-engine
agent_server/src/framework/NodeDefines.cpp
<gh_stars>10-100 #include "NodeDefines.h" volatile bool g_bExit = false; volatile long g_serverStatus = SERVER_STATUS_IDLE;
zyb2013/shiny-engine
agent_server/src/framework/interest_packet.pb.cc
<filename>agent_server/src/framework/interest_packet.pb.cc<gh_stars>10-100 // Generated by the protocol buffer compiler. DO NOT EDIT! // source: interest_packet.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "interest_packet.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #...
zyb2013/shiny-engine
master_server/src/MasterLogic.cpp
<gh_stars>10-100 /* * File: MasterLogic.cpp * Author: <NAME> * * Created on 2010_9_6 PM 3:23 */ #include "MasterLogic.h" #include "Log.h" #include "Md5.h" #include "CacheOperateHelper.h" #include "WorkerOperateHelper.h" #include "msg_master_login.pb.h" #include "msg_client_login.pb.h" #include "TimerManager.h" ...
zyb2013/shiny-engine
cache_server/src/framework/NodeDefines.cpp
#include "NodeDefines.h" volatile bool g_bExit = false; volatile long g_serverStatus = SERVER_STATUS_IDLE; int64_t g_recordExpireSec = 1;
zyb2013/shiny-engine
master_server/src/framework/NodeModule.cpp
/* * File: NodeModule.cpp * Author: <NAME> * * Created on 2014_4_28, 13:15 */ #include "NodeModule.h" #include "SpinRWLock.h" #include "worker.rpcz.h" #include "ChannelManager.h" #include "rpc_controller.hpp" #include "BodyMessage.h" #include "Log.h" #include "NodeChannel.h" #include "SmallBuffer.h" using names...
zyb2013/shiny-engine
agent_server/src/framework/void_packet.pb.cc
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: void_packet.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "void_packet.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/once.h> #include <google/protobuf/io/coded_stream.h>...
zyb2013/shiny-engine
cache_server/src/framework/CacheServerRegister.cpp
/* * File: CacheServerRegister.cpp * Author: <NAME> * * Created on 2010_9_6 PM 3:23 */ #include "Log.h" #include "NodeDefines.h" #include "AppConfig.h" #include "CacheServerRegister.h" #include "ModuleManager.h" #include "ControlCentreStubImpEx.h" #include "CommandManager.h" #include "ProcessStatus.h" #include ...
zyb2013/shiny-engine
shared/deps/rpcz/zmq_utils.cc
// Copyright 2011 Google Inc. 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 applica...
zyb2013/shiny-engine
shared/source/utility/TransferStream.cpp
#include "TransferStream.h" #include <assert.h> #include <string.h> #ifdef _WIN32 #include <stdlib.h> #include <memory.h> #include <stdio.h> #include <float.h> #endif #if defined ( __APPLE__ ) || defined ( __APPLE_CC__ ) #include <malloc/malloc.h> #else #include <malloc.h> #include <string> #endif static bo...
zyb2013/shiny-engine
shared/deps/rpcz/rpcz.hpp
<filename>shared/deps/rpcz/rpcz.hpp<gh_stars>10-100 // Copyright 2011 Google Inc. 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/li...
zyb2013/shiny-engine
servant_server/src/framework/ServantServiceImp.cpp
#include "ServantServiceImp.h" #include "ModuleManager.h" #include "BodyMessage.h" #include "NodeDefines.h" #include "SpinLock.h" #include "NodeModule.h" #include <assert.h> #include "rpc_channel.hpp" #include "rpc_controller.hpp" #include "ServantStubImp.h" #include "TimerManager.h" using namespace mdl; using namespa...
zyb2013/shiny-engine
shared/source/timerevent/TimestampManager.cpp
<filename>shared/source/timerevent/TimestampManager.cpp<gh_stars>10-100 /* * File: TimestampManager.cpp * Author: <NAME> * * Created on 2011_7_26, 11:09 */ #ifdef _WIN32 #include <winsock2.h> #endif #include "TimestampManager.h" #include <time.h> #include "Log.h" #include "AtomicLock.h" #ifdef _WIN32 #pragm...
zyb2013/shiny-engine
shared/source/threading/ReadWriteLock.cpp
#include "ReadWriteLock.h" namespace thd { /* */ CReadWriteLock::CReadWriteLock() throw() : m_readersReading(0) , m_writerWriting(0) { } /* */ CReadWriteLock::~CReadWriteLock() throw() { } /* */ void CReadWriteLock::LockWrite() throw() { m_mutex.Lock(); while(m_writerWriting || m_readersReading) { m_l...
zyb2013/shiny-engine
login_server/src/framework/LoginWebRequest.cpp
#include "LoginWebRequest.h" #include "Common.h" #include "Log.h" #include "ModuleOperateHelper.h" #include "json/json.h" CLoginWebRequest::CLoginWebRequest(const char *pUrl, uint64_t account, unsigned int socketIdx) : m_url(pUrl), m_account(account), m_socketIdx(socketIdx) { } CLoginWebRequest::~CLoginWebReques...
zyb2013/shiny-engine
shared/deps/rpcz/client_connection.hpp
<reponame>zyb2013/shiny-engine // Copyright 2011 Google Inc. 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 //...
zyb2013/shiny-engine
shared/deps/rpcz/rpc_channel.cc
<reponame>zyb2013/shiny-engine<gh_stars>10-100 #include "rpcz/rpc_channel.hpp" #include "connection_manager.hpp" #include "rpc_channel_impl.hpp" namespace rpcz { rpc_channel* rpc_channel::create(connection connect) { return new rpc_channel_impl(connect); } rpc_channel* rpc_channel::create(const std::string& endpo...
zyb2013/shiny-engine
shared/source/utility/StoreStream.cpp
<gh_stars>10-100 #include "StoreStream.h" #include "TransferStream.h" namespace util { size_t GetStoreStreamSize(uint8_t nType) { if(STREAM_DATA_NIL < nType && nType < STREAM_DATA_INT16) { return 1; } else if(STREAM_DATA_INT16 <= nType && nType < STREAM_DATA_INT32) { return 2; } else if(STREAM_D...
zyb2013/shiny-engine
shared/deps/rpcz/connection_manager_ptr.hpp
<reponame>zyb2013/shiny-engine<gh_stars>10-100 #ifndef RPCZ_CONNECTION_MANAGER_PTR_H #define RPCZ_CONNECTION_MANAGER_PTR_H #include <boost/shared_ptr.hpp> namespace rpcz { class connection_manager; typedef boost::shared_ptr<connection_manager> connection_manager_ptr; } // namespace rpcz #endif // RPCZ_CONNECTION_M...
zyb2013/shiny-engine
shared/deps/rpcz/rpc_channel_impl.cc
<gh_stars>10-100 // Copyright 2011 Google Inc. 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 requi...
zyb2013/shiny-engine
shared/cbproject/Shared/main.cpp
// The functions contained in this file are pretty dummy // and are included only as a placeholder. Nevertheless, // they *will* get included in the shared library if you // don't remove them :) // // Obviously, you 'll have to write yourself the super-duper // functions to include in the resulting library... // Also, ...
zyb2013/shiny-engine
agent_server/src/framework/worker.rpcz.cc
// Generated by the protocol buffer compiler. DO NOT EDIT! #include "worker.rpcz.h" #include "worker.pb.h" #include <google/protobuf/descriptor.h> #include <google/protobuf/stubs/once.h> #include <rpcz/rpcz.hpp> namespace { const ::google::protobuf::ServiceDescriptor* WorkerService_descriptor_ = NULL; } // anonymous...
zyb2013/shiny-engine
master_server/src/framework/MasterServer.cpp
/* * File: MasterServer.cpp * Author: <NAME> * * Created on 2010_9_6 PM 3:23 */ #include <zmq.hpp> #include "Log.h" #include "TimerManager.h" #include "NodeDefines.h" #include "AppConfig.h" #include "MasterServer.h" #include "ModuleManager.h" #include "ControlCentreStubImp.h" #include "MasterStubImp.h" #include ...
zyb2013/shiny-engine
master_server/src/msg_master_login.pb.cc
<reponame>zyb2013/shiny-engine // Generated by the protocol buffer compiler. DO NOT EDIT! // source: msg_master_login.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "msg_master_login.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/once.h> #in...
zyb2013/shiny-engine
shared/source/utility/TimeSeries.cpp
/* * File: TimeSeries.cpp * Author: <NAME> * * Created on 2016_5_13, 17:38 */ #include "TimeSeries.h" #include "AtomicLock.h" #include "TimestampManager.h" // 2014-1-1 00:00:00 #define START_FILETIME (1391184000) #define TIMESTAMP_MASK 0xFFFFFFFF #define TIMESTAMP_BIT 32 using namespace util; using namespa...
zyb2013/shiny-engine
shared/source/network/NetworkTypes.cpp
<filename>shared/source/network/NetworkTypes.cpp #include "NetworkTypes.h" #include <string.h> #include <stdio.h> #if defined( __WIN32__) || defined( WIN32 ) || defined ( _WIN32 ) #include <winsock2.h> #else #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> char* _itoa( int value, char* result,...
zyb2013/shiny-engine
shared/source/threading/CondVar.cpp
<reponame>zyb2013/shiny-engine #include "CondVar.h" #include "Mutex.h" namespace thd { /* */ CCondVar::CCondVar() throw() #if COMPILER == COMPILER_MICROSOFT : m_waitersCount(0) , m_broadcast(0) #endif { #if COMPILER == COMPILER_MICROSOFT m_sem = ::CreateSemaphore(NULL, 0, 0x7FFFFFFF, NULL); m_waitersDone = ...
zyb2013/shiny-engine
shared/source/utility/Log.cpp
/* * File: Log.cpp * Author: <NAME> * */ #include "Log.h" #include "AtomicLock.h" #include "SpinLock.h" #include <cstdarg> #if defined( __WIN32__) || defined( WIN32 ) || defined ( _WIN32 ) #include <io.h> #include <direct.h> #include <process.h> #else #include <sys/types.h> #include <sys/stat.h> #include <pthre...
zyb2013/shiny-engine
shared/deps/rpcz/server.hpp
<gh_stars>10-100 // Copyright 2011 Google Inc. 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 re...
zyb2013/shiny-engine
shared/source/network/TCPThreadPool.cpp
<reponame>zyb2013/shiny-engine /* * File: TCPThreadPool.cpp * Author: <NAME> * * Created on 2011.10.15 */ #if !(defined( __WIN32__) || defined( WIN32 ) || defined ( _WIN32 )) #include <assert.h> #include <string.h> #include <stdlib.h> #include <errno.h> #include <unistd.h> #include "TCPThreadList.h" #include ...
zyb2013/shiny-engine
shared/deps/rpcz/broker_thread.cc
<gh_stars>10-100 // Copyright 2011 Google Inc. 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 re...
zyb2013/shiny-engine
game_client/src/framework/LoginModule.cpp
<filename>game_client/src/framework/LoginModule.cpp /* * File: LoginModule.cpp * Author: <NAME> * * Created on 2014_4_28, 13:15 */ #include "LoginModule.h" #include "Log.h" #include "NodeDefines.h" #include "msg_login_login.pb.h" #include "InnerOperateHelper.h" #include "GameClient.h" using namespace mdl; us...
zyb2013/shiny-engine
agent_server/src/framework/ControlCentreServiceImp.cpp
<filename>agent_server/src/framework/ControlCentreServiceImp.cpp<gh_stars>10-100 #include "ControlCentreServiceImp.h" #include "ModuleManager.h" #include "BodyMessage.h" #include "NodeDefines.h" #include "WorkerModule.h" #include "CacheModule.h" #include "SpinLock.h" #include "rpc_channel.hpp" #include "TimerMa...
zyb2013/shiny-engine
master_server/src/framework/MasterServerRegister.cpp
/* * File: MasterServerRegister.cpp * Author: <NAME> * * Created on 2010_9_6 PM 3:23 */ #include "Log.h" #include "NodeDefines.h" #include "AppConfig.h" #include "MasterServerRegister.h" #include "MasterStubImp.h" #include "CommandManager.h" #include "IncludeModule.h" #include "ProcessStatus.h" #include "MasterS...
zyb2013/shiny-engine
game_server/src/Player.cpp
#include "Player.h" #include "CacheOperateHelper.h" #include "WorkerOperateHelper.h" #include "NodeDefines.h" #include "Log.h" #include "CacheRecordManager.h" #include "CharacterLvTemplate.h" #include "TimestampManager.h" using namespace util; using namespace evt; CPlayer::CPlayer(uint64_t userId) : m_userId(us...
zyb2013/shiny-engine
agent_server/src/framework/WorkerServiceImp.cpp
<gh_stars>10-100 #include "WorkerServiceImp.h" #include "ModuleManager.h" #include "BodyMessage.h" #include "ChannelManager.h" #include "rpc_controller.hpp" #include "WorkerOperateHelper.h" #include "ControlCentreStubImpEx.h" #include "Log.h" #include "msg_client_login.pb.h" using namespace mdl; using namespace util; ...
zyb2013/shiny-engine
master_server/src/MasterCmdManager.cpp
<filename>master_server/src/MasterCmdManager.cpp #include "MasterCmdManager.h" #include "NodeModule.h" #include "CacheOperateHelper.h" #include "AppConfig.h" #include "Log.h" #include "MasterServiceImp.h" using namespace util; int CMasterCmdManager::SendByUserId( const std::string& strServerName, uint64_t nUserId,...
zyb2013/shiny-engine
master_server/src/framework/MasterModule.cpp
/* * File: MasterModule.cpp * Author: <NAME> * * Created on 2014_7_9, 16:00 */ #include "MasterModule.h" #include "NodeDefines.h" #include "Log.h" #include "MasterServer.h" #include "MasterChannel.h" #include "MasterCmdManager.h" using namespace mdl; using namespace util; CMasterModule::CMasterModule(const c...
zyb2013/shiny-engine
shared/deps/rpcz/server_impl.hpp
<gh_stars>10-100 // Copyright 2011 Google Inc. 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 re...
zyb2013/shiny-engine
shared/deps/luaplus/IScriptOperation.cpp
<filename>shared/deps/luaplus/IScriptOperation.cpp /* * File: IScirptOperation.cpp * Author: denghp * * Created on 2011年4月20日, 下午1:52 */ #include "IScriptOperation.h" #include <unistd.h> #include "../../../defines.h" IScriptOperation::IScriptOperation() { m_luaScript = LuaState::Create(true); } IScriptOpe...
zyb2013/shiny-engine
shared/deps/memcacheclient/MemCacheClient.cpp
<reponame>zyb2013/shiny-engine /*! @file MemCacheClient.cpp @version 2.0 @brief Basic memcached client */ //#include "stdafx.h" #include <algorithm> #ifdef _WIN32 # include <winsock2.h> # define strtoull _strtoui64 #else # include <stdint.h> #endif // If OpenSSL is available, better to use it ...
zyb2013/shiny-engine
agent_server/src/framework/WorkerModule.cpp
<gh_stars>10-100 #include "WorkerModule.h" #include "NodeDefines.h" #include "SpinRWLock.h" #include "ChannelManager.h" #include "rpc_controller.hpp" #include "BodyMessage.h" #include "WorkerOperateHelper.h" #include "worker.rpcz.h" #include "WorkerChannel.h" #include "dbstl_common.h" #include "TimerManagerHelper.h" u...
zyb2013/shiny-engine
shared/source/Common.cpp
#include "Common.h" uint64_t AddressToInteger(const char * str) { const char* address = strstr(str, "://"); if(NULL == address) { address = str; } else { address += 3; } uint64_t res = 0; char* p = NULL; int nCount = 0; while(nCount < 5) { p = (char*)strchr(address, '.'); if(NULL == p) { break; ...
zyb2013/shiny-engine
shared/source/threading/SysCurrentThreadId.cpp
<filename>shared/source/threading/SysCurrentThreadId.cpp #include "Common.h" #include "SysCurrentThreadId.h" #if COMPILER != COMPILER_MICROSOFT && PLATFORM != PLATFORM_APPLE #ifdef USE_GETTID #include <unistd.h> #include <sys/syscall.h> #endif #endif uint32_t GetSysCurrentThreadId(void) { #if COMPILER == COMPILER_MI...
zyb2013/shiny-engine
shared/source/threading/RecursiveRWLock.cpp
#include "RecursiveRWLock.h" namespace thd { SHARED_DLL_DECL CRecursiveRWLock::thread_table_t CRecursiveRWLock::s_thdContext; SHARED_DLL_DECL CRecursiveRWLock::instc_table_t CRecursiveRWLock::s_instcIdxs; /* */ CRecursiveRWLock::CRecursiveRWLock() throw() : m_readersReading(0) , m_writerWriting(0) , m_threadId(0...
zyb2013/shiny-engine
master_server/src/MasterWebRequest.cpp
#include "MasterWebRequest.h" #include "Common.h" #include "Log.h" #include "json/json.h" #include "SessionEventManager.h" using namespace util; CMasterWebRequest::CMasterWebRequest(const char *pUrl, unsigned int socketIdx, unsigned int account) : m_url(pUrl), m_socketIdx(socketIdx), m_account(account) { } CMas...
zyb2013/shiny-engine
shared/source/database/MySQLDatabase.cpp
<gh_stars>10-100 /* * File: MySQLDatabase.cpp * Author: <NAME> * */ #include "DatabaseEnv.h" #if defined(ENABLE_DATABASE_MYSQL) #include "MySQLDatabase.h" using namespace util; namespace db { MySQLDatabase::~MySQLDatabase() { } MySQLDatabase::MySQLDatabase() : Database() { } void MySQLDatabase::BeginTrans...
zyb2013/shiny-engine
game_client/src/framework/LoginWebRequest.cpp
#include "LoginWebRequest.h" #include "Common.h" #include "Log.h" #include "json/json.h" #include "GameClient.h" CLoginWebRequest::CLoginWebRequest(const char *pUrl) : m_url(pUrl) { } CLoginWebRequest::~CLoginWebRequest() { } CLoginWebRequest * CLoginWebRequest::Create(const char *pUrl) { return new CLoginWe...
zyb2013/shiny-engine
shared/deps/luaplus/IScriptEngine.cpp
#include <string> #include "IScriptEngine.h" #include "GlobalAlgorithm.h" #include "IScriptOperation.h" #include "../../../defines.h" void IScriptEngine::Init(const char* scriptconfigPath ) { LuaStateOwner luaScript; char buffer[256]; sprintf(buffer,"%s",scriptconfigPath); if(!luaScript->LoadFil...
zyb2013/shiny-engine
servant_server/src/ServantModule.cpp
<gh_stars>10-100 /* * File: ServantModule.cpp * Author: <NAME> * * Created on 2014_4_28, 13:15 */ #include "ServantModule.h" #if defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) #include <process.h> #include <direct.h> #include <ShellAPI.h> #else #include <unistd.h> #endif #include "ServantService...
zyb2013/shiny-engine
shared/deps/rpcz/application.hpp
// Copyright 2011 Google Inc. 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 applica...
zyb2013/shiny-engine
servant_server/src/framework/ServantServer.cpp
/* * File: ServantServer.cpp * Author: <NAME> * * Created on 2010_9_6 PM 3:23 */ #include "Log.h" #include "TimerManager.h" #include "NodeDefines.h" #include "AppConfig.h" #include "ServantServer.h" #include "ModuleManager.h" #include "ServantStubImp.h" #include "GuidFactory.h" #include "ProtoRpczServiceImpl.h" ...
zyb2013/shiny-engine
shared/source/httpclient/HttpRequest.cpp
<gh_stars>10-100 /* * File: HttpRequest.h * Author: <NAME> * */ #include "HttpRequest.h" #include "curl.h" namespace ntwk { int HttpRequest::GetServerReturnCode() { long ret = 0; if (NULL == m_curlHandle) { return ret; } curl_easy_getinfo(m_curlHandle, CURLINFO_RESPONSE_CODE, &ret); return ret; ...
zyb2013/shiny-engine
shared/deps/stacktrace/MapFileEntry.cpp
#include "MapFileEntry.h" #include <string.h> //----------------------------------------------------------------------------- namespace dev { MapFileEntry::MapFileEntry() { m_sec = 0; m_addr = 0; m_len = 0; m_name[0] = 0; } MapFileEntry::MapFileEntry( long section, long offset, long length, const char* name )...
zyb2013/shiny-engine
shared/deps/rpcz/broker_thread.hpp
// Copyright 2011 Google Inc. 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 applica...
zyb2013/shiny-engine
agent_server/src/framework/ControlCentreModule.cpp
<reponame>zyb2013/shiny-engine /* * File: ControlCentreModule.cpp * Author: <NAME> * * Created on 2014_7_9, 16:00 */ #include "ControlCentreModule.h" #include "NodeDefines.h" #include "Log.h" #include "WorkerOperateHelper.h" #include "ControlArgument.h" using namespace mdl; using namespace util; using namespa...
zyb2013/shiny-engine
servant_server/src/msg_master_transport.pb.cc
<gh_stars>10-100 // Generated by the protocol buffer compiler. DO NOT EDIT! // source: msg_master_transport.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "msg_master_transport.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/once.h> #include ...
zyb2013/shiny-engine
shared/source/network/TCPLinkInterface.cpp
<filename>shared/source/network/TCPLinkInterface.cpp /* * File: TCPLinkInterface.cpp * Author: <NAME> * * Created on 2011_9_13 14:50 */ #include "TCPLinkInterface.h" #include "NetworkTypes.h" #include "NetworkTrace.h" #include <algorithm> #include <string.h> namespace ntwk { #if defined( __WIN32__ ) || define...
zyb2013/shiny-engine
rank_server/src/framework/main.cpp
<gh_stars>10-100 /* * File: main.cpp * Author: <NAME> * * Created on 2014_3_1 PM 10:32 */ #include "Common.h" #if defined( __WIN32__ ) || defined( WIN32 ) || defined( _WIN32 ) #include "ExceptionManager.h" #include "CrashDump.h" #include <conio.h> #define CH_ESC 27 #define CH_BACKSPACE 8 #define CH_ENTER 13 #d...
zyb2013/shiny-engine
shared/deps/rpcz/event_id_generator.hpp
// Copyright 2011 Google Inc. 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 applica...
zyb2013/shiny-engine
game_server/src/framework/CacheRecordManager.cpp
#include "CacheRecordManager.h" #include "CacheOperateHelper.h" #include "TimerManager.h" #include "GuidFactory.h" #include "CallBack.h" #include "Log.h" using namespace util; using namespace evt; using namespace thd; void CCacheRecordManager::Init() { if(m_bInit) { return; } m_bInit = true; m_timerId = CGu...
zyb2013/shiny-engine
shared/source/timerevent/SysTickCount.cpp
#include "Common.h" #if COMPILER == COMPILER_MICROSOFT #include <windows.h> #include "SysTickCount.h" #include "AtomicLock.h" typedef ULONGLONG (WINAPI *GETTICKCOUNT64)(void); #ifdef _UNICODE const static GETTICKCOUNT64 pGetTickCount64 = (GETTICKCOUNT64)GetProcAddress(GetModuleHandle(L"Kernel32.dll"), "GetTickCount64...
zyb2013/shiny-engine
shared/deps/memcacheclient/Matilda.cpp
/*! @file Matilda.cpp @version 2.0 @brief Internal wrapper */ #ifdef _WIN32 # include <windows.h> #else # include <time.h> #endif #include "Matilda.h" namespace xplatform { unsigned long GetCurrentTickCount() { #ifdef _WIN32 return ::GetTickCount(); #else struct timespe...
zyb2013/shiny-engine
rank_server/src/RankModule.cpp
/* * File: RankModule.cpp * Author: <NAME> * * Created on 2014_7_9, 16:00 */ #include "RankModule.h" #include "NodeDefines.h" #include "ThreadPool.h" #include "Log.h" #include "BodyMessage.h" #include "ChannelManager.h" #include "WorkerOperateHelper.h" #include "CacheOperateHelper.h" #include "TimestampManager...
zyb2013/shiny-engine
rank_server/src/memcache/RankData.cpp
<filename>rank_server/src/memcache/RankData.cpp #include "RankData.h" #include "CacheOperateHelper.h" #include "Log.h" #include "TransferStream.h" #include "ValueStream.h" #define CACHE_TABLE_NAME "rank_fighting_rank" MCResult CRankData::LoadAllRecord(CResponseRows& outRecords, uint64_t u64Route, const util::CValue...
zyb2013/shiny-engine
game_server/src/protocol/msg_game_player_addexp.pb.cc
<filename>game_server/src/protocol/msg_game_player_addexp.pb.cc // Generated by the protocol buffer compiler. DO NOT EDIT! // source: msg_game_player_addexp.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "msg_game_player_addexp.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h...
zyb2013/shiny-engine
login_server/src/framework/LoginServerRegister.cpp
/* * File: LoginServerRegister.cpp * Author: <NAME> * * Created on 2010_9_6 PM 3:23 */ #include "Log.h" #include "NodeDefines.h" #include "LoginServerRegister.h" #include "ModuleManager.h" #include "ControlCentreModule.h" #include "ControlCentreStubImpEx.h" #include "AgentMethod.h" #include "IncludeModule.h" #i...
zyb2013/shiny-engine
servant_server/src/framework/ServantServerRegister.cpp
/* * File: ServantServerRegister.cpp * Author: <NAME> * * Created on 2010_9_6 PM 3:23 */ #include "Log.h" #include "NodeDefines.h" #include "AppConfig.h" #include "ServantServerRegister.h" #include "ServantStubImp.h" #include "ProcessStatus.h" #include "ServantModule.h" using namespace mdl; using namespace evt;...