diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-03-05 16:44:50 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2017-03-05 16:44:50 +0100 |
commit | 5dbf1809c6e3e905b94b8764e99491e608122261 (patch) | |
tree | 5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /servers/server_wrap_mt_common.h | |
parent | 45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff) | |
download | redot-engine-5dbf1809c6e3e905b94b8764e99491e608122261.tar.gz |
A Whole New World (clang-format edition)
I can show you the code
Pretty, with proper whitespace
Tell me, coder, now when did
You last write readable code?
I can open your eyes
Make you see your bad indent
Force you to respect the style
The core devs agreed upon
A whole new world
A new fantastic code format
A de facto standard
With some sugar
Enforced with clang-format
A whole new world
A dazzling style we all dreamed of
And when we read it through
It's crystal clear
That now we're in a whole new world of code
Diffstat (limited to 'servers/server_wrap_mt_common.h')
-rw-r--r-- | servers/server_wrap_mt_common.h | 1397 |
1 files changed, 678 insertions, 719 deletions
diff --git a/servers/server_wrap_mt_common.h b/servers/server_wrap_mt_common.h index fbc68fc879..cfb65cf161 100644 --- a/servers/server_wrap_mt_common.h +++ b/servers/server_wrap_mt_common.h @@ -27,763 +27,722 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#define FUNC0R(m_r,m_type)\ - virtual m_r m_type() { \ - if (Thread::get_caller_ID()!=server_thread) {\ - m_r ret;\ - command_queue.push_and_ret( server_name, &ServerName::m_type,&ret);\ - SYNC_DEBUG\ - return ret;\ - } else {\ - return server_name->m_type();\ - }\ - } - - -#define FUNCRID(m_type)\ - int m_type##allocn() {\ - for(int i=0;i<m_type##_pool_max_size;i++) {\ - m_type##_id_pool.push_back( server_name->m_type##_create() );\ - }\ - return 0;\ - }\ - void m_type##_free_cached_ids() {\ - while (m_type##_id_pool.size()) {\ - free(m_type##_id_pool.front()->get());\ - m_type##_id_pool.pop_front();\ - }\ - }\ - virtual RID m_type##_create() { \ - if (Thread::get_caller_ID()!=server_thread) {\ - RID rid;\ - alloc_mutex->lock();\ - if (m_type##_id_pool.size()==0) {\ - int ret;\ - command_queue.push_and_ret( this, &ServerNameWrapMT::m_type##allocn,&ret);\ - }\ - rid=m_type##_id_pool.front()->get();\ - m_type##_id_pool.pop_front();\ - alloc_mutex->unlock();\ - return rid;\ - } else {\ - return server_name->m_type##_create();\ - }\ - } - -#define FUNC1RID(m_type,m_arg1)\ - int m_type##allocn() {\ - for(int i=0;i<m_type##_pool_max_size;i++) {\ - m_type##_id_pool.push_back( server_name->m_type##_create() );\ - }\ - return 0;\ - }\ - void m_type##_free_cached_ids() {\ - while (m_type##_id_pool.size()) {\ - free(m_type##_id_pool.front()->get());\ - m_type##_id_pool.pop_front();\ - }\ - }\ - virtual RID m_type##_create(m_arg1 p1) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - RID rid;\ - alloc_mutex->lock();\ - if (m_type##_id_pool.size()==0) {\ - int ret;\ - command_queue.push_and_ret( this, &ServerNameWrapMT::m_type##allocn,p1,&ret);\ - }\ - rid=m_type##_id_pool.front()->get();\ - m_type##_id_pool.pop_front();\ - alloc_mutex->unlock();\ - return rid;\ - } else {\ - return server_name->m_type##_create(p1);\ - }\ - } - -#define FUNC2RID(m_type,m_arg1,m_arg2)\ - int m_type##allocn() {\ - for(int i=0;i<m_type##_pool_max_size;i++) {\ - m_type##_id_pool.push_back( server_name->m_type##_create() );\ - }\ - return 0;\ - }\ - void m_type##_free_cached_ids() {\ - while (m_type##_id_pool.size()) {\ - free(m_type##_id_pool.front()->get());\ - m_type##_id_pool.pop_front();\ - }\ - }\ - virtual RID m_type##_create(m_arg1 p1,m_arg2 p2) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - RID rid;\ - alloc_mutex->lock();\ - if (m_type##_id_pool.size()==0) {\ - int ret;\ - command_queue.push_and_ret( this, &ServerNameWrapMT::m_type##allocn,p1,p2,&ret);\ - }\ - rid=m_type##_id_pool.front()->get();\ - m_type##_id_pool.pop_front();\ - alloc_mutex->unlock();\ - return rid;\ - } else {\ - return server_name->m_type##_create(p1,p2);\ - }\ - } - -#define FUNC3RID(m_type,m_arg1,m_arg2,m_arg3)\ - int m_type##allocn() {\ - for(int i=0;i<m_type##_pool_max_size;i++) {\ - m_type##_id_pool.push_back( server_name->m_type##_create() );\ - }\ - return 0;\ - }\ - void m_type##_free_cached_ids() {\ - while (m_type##_id_pool.size()) {\ - free(m_type##_id_pool.front()->get());\ - m_type##_id_pool.pop_front();\ - }\ - }\ - virtual RID m_type##_create(m_arg1 p1,m_arg2 p2,m_arg3 p3) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - RID rid;\ - alloc_mutex->lock();\ - if (m_type##_id_pool.size()==0) {\ - int ret;\ - command_queue.push_and_ret( this, &ServerNameWrapMT::m_type##allocn,p1,p2,p3,&ret);\ - }\ - rid=m_type##_id_pool.front()->get();\ - m_type##_id_pool.pop_front();\ - alloc_mutex->unlock();\ - return rid;\ - } else {\ - return server_name->m_type##_create(p1,p2,p3);\ - }\ - } - - -#define FUNC4RID(m_type,m_arg1,m_arg2,m_arg3,m_arg4)\ - int m_type##allocn() {\ - for(int i=0;i<m_type##_pool_max_size;i++) {\ - m_type##_id_pool.push_back( server_name->m_type##_create() );\ - }\ - return 0;\ - }\ - void m_type##_free_cached_ids() {\ - while (m_type##_id_pool.size()) {\ - free(m_type##_id_pool.front()->get());\ - m_type##_id_pool.pop_front();\ - }\ - }\ - virtual RID m_type##_create(m_arg1 p1,m_arg2 p2,m_arg3 p3,m_arg4 p4) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - RID rid;\ - alloc_mutex->lock();\ - if (m_type##_id_pool.size()==0) {\ - int ret;\ - command_queue.push_and_ret( this, &ServerNameWrapMT::m_type##allocn,p1,p2,p3,p4,&ret);\ - }\ - rid=m_type##_id_pool.front()->get();\ - m_type##_id_pool.pop_front();\ - alloc_mutex->unlock();\ - return rid;\ - } else {\ - return server_name->m_type##_create(p1,p2,p3,p4);\ - }\ - } - - -#define FUNC5RID(m_type,m_arg1,m_arg2,m_arg3,m_arg4,m_arg5)\ - int m_type##allocn() {\ - for(int i=0;i<m_type##_pool_max_size;i++) {\ - m_type##_id_pool.push_back( server_name->m_type##_create() );\ - }\ - return 0;\ - }\ - void m_type##_free_cached_ids() {\ - while (m_type##_id_pool.size()) {\ - free(m_type##_id_pool.front()->get());\ - m_type##_id_pool.pop_front();\ - }\ - }\ - virtual RID m_type##_create(m_arg1 p1,m_arg2 p2,m_arg3 p3,m_arg4 p4,m_arg5 p5) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - RID rid;\ - alloc_mutex->lock();\ - if (m_type##_id_pool.size()==0) {\ - int ret;\ - command_queue.push_and_ret( this, &ServerNameWrapMT::m_type##allocn,p1,p2,p3,p4,p5,&ret);\ - }\ - rid=m_type##_id_pool.front()->get();\ - m_type##_id_pool.pop_front();\ - alloc_mutex->unlock();\ - return rid;\ - } else {\ - return server_name->m_type##_create(p1,p2,p3,p4,p5);\ - }\ - } - -#define FUNC0RC(m_r,m_type)\ - virtual m_r m_type() const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - m_r ret;\ - command_queue.push_and_ret( server_name, &ServerName::m_type,&ret);\ - SYNC_DEBUG\ - return ret;\ - } else {\ - return server_name->m_type();\ - }\ - } - - -#define FUNC0(m_type)\ - virtual void m_type() { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push( server_name, &ServerName::m_type);\ - } else {\ - server_name->m_type();\ - }\ - } - -#define FUNC0C(m_type)\ - virtual void m_type() const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push( server_name, &ServerName::m_type);\ - } else {\ - server_name->m_type();\ - }\ - } - - -#define FUNC0S(m_type)\ - virtual void m_type() { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push_and_sync( server_name, &ServerName::m_type);\ - } else {\ - server_name->m_type();\ - }\ - } - -#define FUNC0SC(m_type)\ - virtual void m_type() const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push_and_sync( server_name, &ServerName::m_type);\ - } else {\ - server_name->m_type();\ - }\ +#define FUNC0R(m_r, m_type) \ + virtual m_r m_type() { \ + if (Thread::get_caller_ID() != server_thread) { \ + m_r ret; \ + command_queue.push_and_ret(server_name, &ServerName::m_type, &ret); \ + SYNC_DEBUG \ + return ret; \ + } else { \ + return server_name->m_type(); \ + } \ + } + +#define FUNCRID(m_type) \ + int m_type##allocn() { \ + for (int i = 0; i < m_type##_pool_max_size; i++) { \ + m_type##_id_pool.push_back(server_name->m_type##_create()); \ + } \ + return 0; \ + } \ + void m_type##_free_cached_ids() { \ + while (m_type##_id_pool.size()) { \ + free(m_type##_id_pool.front()->get()); \ + m_type##_id_pool.pop_front(); \ + } \ + } \ + virtual RID m_type##_create() { \ + if (Thread::get_caller_ID() != server_thread) { \ + RID rid; \ + alloc_mutex->lock(); \ + if (m_type##_id_pool.size() == 0) { \ + int ret; \ + command_queue.push_and_ret(this, &ServerNameWrapMT::m_type##allocn, &ret); \ + } \ + rid = m_type##_id_pool.front()->get(); \ + m_type##_id_pool.pop_front(); \ + alloc_mutex->unlock(); \ + return rid; \ + } else { \ + return server_name->m_type##_create(); \ + } \ + } + +#define FUNC1RID(m_type, m_arg1) \ + int m_type##allocn() { \ + for (int i = 0; i < m_type##_pool_max_size; i++) { \ + m_type##_id_pool.push_back(server_name->m_type##_create()); \ + } \ + return 0; \ + } \ + void m_type##_free_cached_ids() { \ + while (m_type##_id_pool.size()) { \ + free(m_type##_id_pool.front()->get()); \ + m_type##_id_pool.pop_front(); \ + } \ + } \ + virtual RID m_type##_create(m_arg1 p1) { \ + if (Thread::get_caller_ID() != server_thread) { \ + RID rid; \ + alloc_mutex->lock(); \ + if (m_type##_id_pool.size() == 0) { \ + int ret; \ + command_queue.push_and_ret(this, &ServerNameWrapMT::m_type##allocn, p1, &ret); \ + } \ + rid = m_type##_id_pool.front()->get(); \ + m_type##_id_pool.pop_front(); \ + alloc_mutex->unlock(); \ + return rid; \ + } else { \ + return server_name->m_type##_create(p1); \ + } \ + } + +#define FUNC2RID(m_type, m_arg1, m_arg2) \ + int m_type##allocn() { \ + for (int i = 0; i < m_type##_pool_max_size; i++) { \ + m_type##_id_pool.push_back(server_name->m_type##_create()); \ + } \ + return 0; \ + } \ + void m_type##_free_cached_ids() { \ + while (m_type##_id_pool.size()) { \ + free(m_type##_id_pool.front()->get()); \ + m_type##_id_pool.pop_front(); \ + } \ + } \ + virtual RID m_type##_create(m_arg1 p1, m_arg2 p2) { \ + if (Thread::get_caller_ID() != server_thread) { \ + RID rid; \ + alloc_mutex->lock(); \ + if (m_type##_id_pool.size() == 0) { \ + int ret; \ + command_queue.push_and_ret(this, &ServerNameWrapMT::m_type##allocn, p1, p2, &ret); \ + } \ + rid = m_type##_id_pool.front()->get(); \ + m_type##_id_pool.pop_front(); \ + alloc_mutex->unlock(); \ + return rid; \ + } else { \ + return server_name->m_type##_create(p1, p2); \ + } \ + } + +#define FUNC3RID(m_type, m_arg1, m_arg2, m_arg3) \ + int m_type##allocn() { \ + for (int i = 0; i < m_type##_pool_max_size; i++) { \ + m_type##_id_pool.push_back(server_name->m_type##_create()); \ + } \ + return 0; \ + } \ + void m_type##_free_cached_ids() { \ + while (m_type##_id_pool.size()) { \ + free(m_type##_id_pool.front()->get()); \ + m_type##_id_pool.pop_front(); \ + } \ + } \ + virtual RID m_type##_create(m_arg1 p1, m_arg2 p2, m_arg3 p3) { \ + if (Thread::get_caller_ID() != server_thread) { \ + RID rid; \ + alloc_mutex->lock(); \ + if (m_type##_id_pool.size() == 0) { \ + int ret; \ + command_queue.push_and_ret(this, &ServerNameWrapMT::m_type##allocn, p1, p2, p3, &ret); \ + } \ + rid = m_type##_id_pool.front()->get(); \ + m_type##_id_pool.pop_front(); \ + alloc_mutex->unlock(); \ + return rid; \ + } else { \ + return server_name->m_type##_create(p1, p2, p3); \ + } \ + } + +#define FUNC4RID(m_type, m_arg1, m_arg2, m_arg3, m_arg4) \ + int m_type##allocn() { \ + for (int i = 0; i < m_type##_pool_max_size; i++) { \ + m_type##_id_pool.push_back(server_name->m_type##_create()); \ + } \ + return 0; \ + } \ + void m_type##_free_cached_ids() { \ + while (m_type##_id_pool.size()) { \ + free(m_type##_id_pool.front()->get()); \ + m_type##_id_pool.pop_front(); \ + } \ + } \ + virtual RID m_type##_create(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) { \ + if (Thread::get_caller_ID() != server_thread) { \ + RID rid; \ + alloc_mutex->lock(); \ + if (m_type##_id_pool.size() == 0) { \ + int ret; \ + command_queue.push_and_ret(this, &ServerNameWrapMT::m_type##allocn, p1, p2, p3, p4, &ret); \ + } \ + rid = m_type##_id_pool.front()->get(); \ + m_type##_id_pool.pop_front(); \ + alloc_mutex->unlock(); \ + return rid; \ + } else { \ + return server_name->m_type##_create(p1, p2, p3, p4); \ + } \ + } + +#define FUNC5RID(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \ + int m_type##allocn() { \ + for (int i = 0; i < m_type##_pool_max_size; i++) { \ + m_type##_id_pool.push_back(server_name->m_type##_create()); \ + } \ + return 0; \ + } \ + void m_type##_free_cached_ids() { \ + while (m_type##_id_pool.size()) { \ + free(m_type##_id_pool.front()->get()); \ + m_type##_id_pool.pop_front(); \ + } \ + } \ + virtual RID m_type##_create(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) { \ + if (Thread::get_caller_ID() != server_thread) { \ + RID rid; \ + alloc_mutex->lock(); \ + if (m_type##_id_pool.size() == 0) { \ + int ret; \ + command_queue.push_and_ret(this, &ServerNameWrapMT::m_type##allocn, p1, p2, p3, p4, p5, &ret); \ + } \ + rid = m_type##_id_pool.front()->get(); \ + m_type##_id_pool.pop_front(); \ + alloc_mutex->unlock(); \ + return rid; \ + } else { \ + return server_name->m_type##_create(p1, p2, p3, p4, p5); \ + } \ + } + +#define FUNC0RC(m_r, m_type) \ + virtual m_r m_type() const { \ + if (Thread::get_caller_ID() != server_thread) { \ + m_r ret; \ + command_queue.push_and_ret(server_name, &ServerName::m_type, &ret); \ + SYNC_DEBUG \ + return ret; \ + } else { \ + return server_name->m_type(); \ + } \ + } + +#define FUNC0(m_type) \ + virtual void m_type() { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push(server_name, &ServerName::m_type); \ + } else { \ + server_name->m_type(); \ + } \ + } + +#define FUNC0C(m_type) \ + virtual void m_type() const { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push(server_name, &ServerName::m_type); \ + } else { \ + server_name->m_type(); \ + } \ + } + +#define FUNC0S(m_type) \ + virtual void m_type() { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push_and_sync(server_name, &ServerName::m_type); \ + } else { \ + server_name->m_type(); \ + } \ + } + +#define FUNC0SC(m_type) \ + virtual void m_type() const { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push_and_sync(server_name, &ServerName::m_type); \ + } else { \ + server_name->m_type(); \ + } \ } - /////////////////////////////////////////////// - -#define FUNC1R(m_r,m_type,m_arg1)\ - virtual m_r m_type(m_arg1 p1) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - m_r ret;\ - command_queue.push_and_ret( server_name, &ServerName::m_type,p1,&ret);\ - SYNC_DEBUG\ - return ret;\ - } else {\ - return server_name->m_type(p1);\ - }\ - } - -#define FUNC1RC(m_r,m_type,m_arg1)\ - virtual m_r m_type(m_arg1 p1) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - m_r ret;\ - command_queue.push_and_ret( server_name, &ServerName::m_type,p1,&ret);\ - SYNC_DEBUG\ - return ret;\ - } else {\ - return server_name->m_type(p1);\ - }\ - } - - -#define FUNC1S(m_type,m_arg1)\ - virtual void m_type(m_arg1 p1) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push_and_sync( server_name, &ServerName::m_type,p1);\ - } else {\ - server_name->m_type(p1);\ - }\ - } - -#define FUNC1SC(m_type,m_arg1)\ - virtual void m_type(m_arg1 p1) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push_and_sync( server_name, &ServerName::m_type,p1);\ - } else {\ - server_name->m_type(p1);\ - }\ - } - - -#define FUNC1(m_type,m_arg1)\ - virtual void m_type(m_arg1 p1) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push( server_name, &ServerName::m_type,p1);\ - } else {\ - server_name->m_type(p1);\ - }\ - } - -#define FUNC1C(m_type,m_arg1)\ - virtual void m_type(m_arg1 p1) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push( server_name, &ServerName::m_type,p1);\ - } else {\ - server_name->m_type(p1);\ - }\ - } - - - - -#define FUNC2R(m_r,m_type,m_arg1, m_arg2)\ - virtual m_r m_type(m_arg1 p1, m_arg2 p2) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - m_r ret;\ - command_queue.push_and_ret( server_name, &ServerName::m_type,p1, p2,&ret);\ - SYNC_DEBUG\ - return ret;\ - } else {\ - return server_name->m_type(p1, p2);\ - }\ - } - -#define FUNC2RC(m_r,m_type,m_arg1, m_arg2)\ - virtual m_r m_type(m_arg1 p1, m_arg2 p2) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - m_r ret;\ - command_queue.push_and_ret( server_name, &ServerName::m_type,p1, p2,&ret);\ - SYNC_DEBUG\ - return ret;\ - } else {\ - return server_name->m_type(p1, p2);\ - }\ - } - - -#define FUNC2S(m_type,m_arg1, m_arg2)\ - virtual void m_type(m_arg1 p1, m_arg2 p2) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push_and_sync( server_name, &ServerName::m_type,p1, p2);\ - } else {\ - server_name->m_type(p1, p2);\ - }\ - } - -#define FUNC2SC(m_type,m_arg1, m_arg2)\ - virtual void m_type(m_arg1 p1, m_arg2 p2) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push_and_sync( server_name, &ServerName::m_type,p1, p2);\ - } else {\ - server_name->m_type(p1, p2);\ - }\ - } - - -#define FUNC2(m_type,m_arg1, m_arg2)\ - virtual void m_type(m_arg1 p1, m_arg2 p2) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push( server_name, &ServerName::m_type,p1, p2);\ - } else {\ - server_name->m_type(p1, p2);\ - }\ - } - -#define FUNC2C(m_type,m_arg1, m_arg2)\ - virtual void m_type(m_arg1 p1, m_arg2 p2) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push( server_name, &ServerName::m_type,p1, p2);\ - } else {\ - server_name->m_type(p1, p2);\ - }\ - } - - - - -#define FUNC3R(m_r,m_type,m_arg1, m_arg2, m_arg3)\ - virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - m_r ret;\ - command_queue.push_and_ret( server_name, &ServerName::m_type,p1, p2, p3,&ret);\ - SYNC_DEBUG\ - return ret;\ - } else {\ - return server_name->m_type(p1, p2, p3);\ - }\ - } - -#define FUNC3RC(m_r,m_type,m_arg1, m_arg2, m_arg3)\ - virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - m_r ret;\ - command_queue.push_and_ret( server_name, &ServerName::m_type,p1, p2, p3,&ret);\ - return ret;\ - } else {\ - return server_name->m_type(p1, p2, p3);\ - }\ - } - - -#define FUNC3S(m_type,m_arg1, m_arg2, m_arg3)\ - virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push_and_sync( server_name, &ServerName::m_type,p1, p2, p3);\ - } else {\ - server_name->m_type(p1, p2, p3);\ - }\ - } - -#define FUNC3SC(m_type,m_arg1, m_arg2, m_arg3)\ - virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push_and_sync( server_name, &ServerName::m_type,p1, p2, p3);\ - } else {\ - server_name->m_type(p1, p2, p3);\ - }\ - } - - -#define FUNC3(m_type,m_arg1, m_arg2, m_arg3)\ - virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push( server_name, &ServerName::m_type,p1, p2, p3);\ - } else {\ - server_name->m_type(p1, p2, p3);\ - }\ - } - -#define FUNC3C(m_type,m_arg1, m_arg2, m_arg3)\ - virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push( server_name, &ServerName::m_type,p1, p2, p3);\ - } else {\ - server_name->m_type(p1, p2, p3);\ - }\ - } - - - - -#define FUNC4R(m_r,m_type,m_arg1, m_arg2, m_arg3, m_arg4)\ - virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - m_r ret;\ - command_queue.push_and_ret( server_name, &ServerName::m_type,p1, p2, p3, p4,&ret);\ - SYNC_DEBUG\ - return ret;\ - } else {\ - return server_name->m_type(p1, p2, p3, p4);\ - }\ - } - -#define FUNC4RC(m_r,m_type,m_arg1, m_arg2, m_arg3, m_arg4)\ - virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - m_r ret;\ - command_queue.push_and_ret( server_name, &ServerName::m_type,p1, p2, p3, p4,&ret);\ - SYNC_DEBUG\ - return ret;\ - } else {\ - return server_name->m_type(p1, p2, p3, p4);\ - }\ - } - - -#define FUNC4S(m_type,m_arg1, m_arg2, m_arg3, m_arg4)\ - virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push_and_sync( server_name, &ServerName::m_type,p1, p2, p3, p4);\ - } else {\ - server_name->m_type(p1, p2, p3, p4);\ - }\ - } - -#define FUNC4SC(m_type,m_arg1, m_arg2, m_arg3, m_arg4)\ - virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push_and_sync( server_name, &ServerName::m_type,p1, p2, p3, p4);\ - } else {\ - server_name->m_type(p1, p2, p3, p4);\ - }\ - } - - -#define FUNC4(m_type,m_arg1, m_arg2, m_arg3, m_arg4)\ - virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push( server_name, &ServerName::m_type,p1, p2, p3, p4);\ - } else {\ - server_name->m_type(p1, p2, p3, p4);\ - }\ - } - -#define FUNC4C(m_type,m_arg1, m_arg2, m_arg3, m_arg4)\ - virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push( server_name, &ServerName::m_type,p1, p2, p3, p4);\ - } else {\ - server_name->m_type(p1, p2, p3, p4);\ - }\ - } - - - - -#define FUNC5R(m_r,m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5)\ - virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - m_r ret;\ - command_queue.push_and_ret( server_name, &ServerName::m_type,p1, p2, p3, p4, p5,&ret);\ - SYNC_DEBUG\ - return ret;\ - } else {\ - return server_name->m_type(p1, p2, p3, p4, p5);\ - }\ - } - -#define FUNC5RC(m_r,m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5)\ - virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - m_r ret;\ - command_queue.push_and_ret( server_name, &ServerName::m_type,p1, p2, p3, p4, p5,&ret);\ - SYNC_DEBUG\ - return ret;\ - } else {\ - return server_name->m_type(p1, p2, p3, p4, p5);\ - }\ - } - - -#define FUNC5S(m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5)\ - virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push_and_sync( server_name, &ServerName::m_type,p1, p2, p3, p4, p5);\ - } else {\ - server_name->m_type(p1, p2, p3, p4, p5);\ - }\ - } - -#define FUNC5SC(m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5)\ +#define FUNC1R(m_r, m_type, m_arg1) \ + virtual m_r m_type(m_arg1 p1) { \ + if (Thread::get_caller_ID() != server_thread) { \ + m_r ret; \ + command_queue.push_and_ret(server_name, &ServerName::m_type, p1, &ret); \ + SYNC_DEBUG \ + return ret; \ + } else { \ + return server_name->m_type(p1); \ + } \ + } + +#define FUNC1RC(m_r, m_type, m_arg1) \ + virtual m_r m_type(m_arg1 p1) const { \ + if (Thread::get_caller_ID() != server_thread) { \ + m_r ret; \ + command_queue.push_and_ret(server_name, &ServerName::m_type, p1, &ret); \ + SYNC_DEBUG \ + return ret; \ + } else { \ + return server_name->m_type(p1); \ + } \ + } + +#define FUNC1S(m_type, m_arg1) \ + virtual void m_type(m_arg1 p1) { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push_and_sync(server_name, &ServerName::m_type, p1); \ + } else { \ + server_name->m_type(p1); \ + } \ + } + +#define FUNC1SC(m_type, m_arg1) \ + virtual void m_type(m_arg1 p1) const { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push_and_sync(server_name, &ServerName::m_type, p1); \ + } else { \ + server_name->m_type(p1); \ + } \ + } + +#define FUNC1(m_type, m_arg1) \ + virtual void m_type(m_arg1 p1) { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push(server_name, &ServerName::m_type, p1); \ + } else { \ + server_name->m_type(p1); \ + } \ + } + +#define FUNC1C(m_type, m_arg1) \ + virtual void m_type(m_arg1 p1) const { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push(server_name, &ServerName::m_type, p1); \ + } else { \ + server_name->m_type(p1); \ + } \ + } + +#define FUNC2R(m_r, m_type, m_arg1, m_arg2) \ + virtual m_r m_type(m_arg1 p1, m_arg2 p2) { \ + if (Thread::get_caller_ID() != server_thread) { \ + m_r ret; \ + command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, &ret); \ + SYNC_DEBUG \ + return ret; \ + } else { \ + return server_name->m_type(p1, p2); \ + } \ + } + +#define FUNC2RC(m_r, m_type, m_arg1, m_arg2) \ + virtual m_r m_type(m_arg1 p1, m_arg2 p2) const { \ + if (Thread::get_caller_ID() != server_thread) { \ + m_r ret; \ + command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, &ret); \ + SYNC_DEBUG \ + return ret; \ + } else { \ + return server_name->m_type(p1, p2); \ + } \ + } + +#define FUNC2S(m_type, m_arg1, m_arg2) \ + virtual void m_type(m_arg1 p1, m_arg2 p2) { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2); \ + } else { \ + server_name->m_type(p1, p2); \ + } \ + } + +#define FUNC2SC(m_type, m_arg1, m_arg2) \ + virtual void m_type(m_arg1 p1, m_arg2 p2) const { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2); \ + } else { \ + server_name->m_type(p1, p2); \ + } \ + } + +#define FUNC2(m_type, m_arg1, m_arg2) \ + virtual void m_type(m_arg1 p1, m_arg2 p2) { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push(server_name, &ServerName::m_type, p1, p2); \ + } else { \ + server_name->m_type(p1, p2); \ + } \ + } + +#define FUNC2C(m_type, m_arg1, m_arg2) \ + virtual void m_type(m_arg1 p1, m_arg2 p2) const { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push(server_name, &ServerName::m_type, p1, p2); \ + } else { \ + server_name->m_type(p1, p2); \ + } \ + } + +#define FUNC3R(m_r, m_type, m_arg1, m_arg2, m_arg3) \ + virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) { \ + if (Thread::get_caller_ID() != server_thread) { \ + m_r ret; \ + command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, &ret); \ + SYNC_DEBUG \ + return ret; \ + } else { \ + return server_name->m_type(p1, p2, p3); \ + } \ + } + +#define FUNC3RC(m_r, m_type, m_arg1, m_arg2, m_arg3) \ + virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) const { \ + if (Thread::get_caller_ID() != server_thread) { \ + m_r ret; \ + command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, &ret); \ + return ret; \ + } else { \ + return server_name->m_type(p1, p2, p3); \ + } \ + } + +#define FUNC3S(m_type, m_arg1, m_arg2, m_arg3) \ + virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3); \ + } else { \ + server_name->m_type(p1, p2, p3); \ + } \ + } + +#define FUNC3SC(m_type, m_arg1, m_arg2, m_arg3) \ + virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) const { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3); \ + } else { \ + server_name->m_type(p1, p2, p3); \ + } \ + } + +#define FUNC3(m_type, m_arg1, m_arg2, m_arg3) \ + virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push(server_name, &ServerName::m_type, p1, p2, p3); \ + } else { \ + server_name->m_type(p1, p2, p3); \ + } \ + } + +#define FUNC3C(m_type, m_arg1, m_arg2, m_arg3) \ + virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) const { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push(server_name, &ServerName::m_type, p1, p2, p3); \ + } else { \ + server_name->m_type(p1, p2, p3); \ + } \ + } + +#define FUNC4R(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4) \ + virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) { \ + if (Thread::get_caller_ID() != server_thread) { \ + m_r ret; \ + command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, &ret); \ + SYNC_DEBUG \ + return ret; \ + } else { \ + return server_name->m_type(p1, p2, p3, p4); \ + } \ + } + +#define FUNC4RC(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4) \ + virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) const { \ + if (Thread::get_caller_ID() != server_thread) { \ + m_r ret; \ + command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, &ret); \ + SYNC_DEBUG \ + return ret; \ + } else { \ + return server_name->m_type(p1, p2, p3, p4); \ + } \ + } + +#define FUNC4S(m_type, m_arg1, m_arg2, m_arg3, m_arg4) \ + virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4); \ + } else { \ + server_name->m_type(p1, p2, p3, p4); \ + } \ + } + +#define FUNC4SC(m_type, m_arg1, m_arg2, m_arg3, m_arg4) \ + virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) const { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4); \ + } else { \ + server_name->m_type(p1, p2, p3, p4); \ + } \ + } + +#define FUNC4(m_type, m_arg1, m_arg2, m_arg3, m_arg4) \ + virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4); \ + } else { \ + server_name->m_type(p1, p2, p3, p4); \ + } \ + } + +#define FUNC4C(m_type, m_arg1, m_arg2, m_arg3, m_arg4) \ + virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) const { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4); \ + } else { \ + server_name->m_type(p1, p2, p3, p4); \ + } \ + } + +#define FUNC5R(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \ + virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) { \ + if (Thread::get_caller_ID() != server_thread) { \ + m_r ret; \ + command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, &ret); \ + SYNC_DEBUG \ + return ret; \ + } else { \ + return server_name->m_type(p1, p2, p3, p4, p5); \ + } \ + } + +#define FUNC5RC(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \ + virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) const { \ + if (Thread::get_caller_ID() != server_thread) { \ + m_r ret; \ + command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, &ret); \ + SYNC_DEBUG \ + return ret; \ + } else { \ + return server_name->m_type(p1, p2, p3, p4, p5); \ + } \ + } + +#define FUNC5S(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \ + virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5); \ + } else { \ + server_name->m_type(p1, p2, p3, p4, p5); \ + } \ + } + +#define FUNC5SC(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \ + virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) const { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5); \ + } else { \ + server_name->m_type(p1, p2, p3, p4, p5); \ + } \ + } + +#define FUNC5(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \ + virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5); \ + } else { \ + server_name->m_type(p1, p2, p3, p4, p5); \ + } \ + } + +#define FUNC5C(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push_and_sync( server_name, &ServerName::m_type,p1, p2, p3, p4, p5);\ - } else {\ - server_name->m_type(p1, p2, p3, p4, p5);\ - }\ - } - - -#define FUNC5(m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5)\ - virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push( server_name, &ServerName::m_type,p1, p2, p3, p4, p5);\ - } else {\ - server_name->m_type(p1, p2, p3, p4, p5);\ - }\ - } - -#define FUNC5C(m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5)\ - virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push( server_name, &ServerName::m_type,p1, p2, p3, p4, p5);\ - } else {\ - server_name->m_type(p1, p2, p3, p4, p5);\ - }\ - } - - - - -#define FUNC6R(m_r,m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6)\ - virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - m_r ret;\ - command_queue.push_and_ret( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6,&ret);\ - SYNC_DEBUG\ - return ret;\ - } else {\ - return server_name->m_type(p1, p2, p3, p4, p5, p6);\ - }\ - } - -#define FUNC6RC(m_r,m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6)\ - virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - m_r ret;\ - command_queue.push_and_ret( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6,&ret);\ - return ret;\ - } else {\ - return server_name->m_type(p1, p2, p3, p4, p5, p6);\ - }\ - } - - -#define FUNC6S(m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6)\ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5); \ + } else { \ + server_name->m_type(p1, p2, p3, p4, p5); \ + } \ + } + +#define FUNC6R(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \ + virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) { \ + if (Thread::get_caller_ID() != server_thread) { \ + m_r ret; \ + command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, &ret); \ + SYNC_DEBUG \ + return ret; \ + } else { \ + return server_name->m_type(p1, p2, p3, p4, p5, p6); \ + } \ + } + +#define FUNC6RC(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \ + virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) const { \ + if (Thread::get_caller_ID() != server_thread) { \ + m_r ret; \ + command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, &ret); \ + return ret; \ + } else { \ + return server_name->m_type(p1, p2, p3, p4, p5, p6); \ + } \ + } + +#define FUNC6S(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \ + virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6); \ + } else { \ + server_name->m_type(p1, p2, p3, p4, p5, p6); \ + } \ + } + +#define FUNC6SC(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \ + virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) const { \ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6); \ + } else { \ + server_name->m_type(p1, p2, p3, p4, p5, p6); \ + } \ + } + +#define FUNC6(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push_and_sync( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6);\ - } else {\ - server_name->m_type(p1, p2, p3, p4, p5, p6);\ - }\ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6); \ + } else { \ + server_name->m_type(p1, p2, p3, p4, p5, p6); \ + } \ } -#define FUNC6SC(m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6)\ +#define FUNC6C(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push_and_sync( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6);\ - } else {\ - server_name->m_type(p1, p2, p3, p4, p5, p6);\ - }\ - } - - -#define FUNC6(m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6)\ - virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6);\ - } else {\ - server_name->m_type(p1, p2, p3, p4, p5, p6);\ - }\ - } - -#define FUNC6C(m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6)\ - virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6);\ - } else {\ - server_name->m_type(p1, p2, p3, p4, p5, p6);\ - }\ - } - - - - -#define FUNC7R(m_r,m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7)\ - virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - m_r ret;\ - command_queue.push_and_ret( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6, p7,&ret);\ - SYNC_DEBUG\ - return ret;\ - } else {\ - return server_name->m_type(p1, p2, p3, p4, p5, p6, p7);\ - }\ - } - -#define FUNC7RC(m_r,m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7)\ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6); \ + } else { \ + server_name->m_type(p1, p2, p3, p4, p5, p6); \ + } \ + } + +#define FUNC7R(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \ + virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) { \ + if (Thread::get_caller_ID() != server_thread) { \ + m_r ret; \ + command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, &ret); \ + SYNC_DEBUG \ + return ret; \ + } else { \ + return server_name->m_type(p1, p2, p3, p4, p5, p6, p7); \ + } \ + } + +#define FUNC7RC(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - m_r ret;\ - command_queue.push_and_ret( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6, p7,&ret);\ - SYNC_DEBUG\ - return ret;\ - } else {\ - return server_name->m_type(p1, p2, p3, p4, p5, p6, p7);\ - }\ + if (Thread::get_caller_ID() != server_thread) { \ + m_r ret; \ + command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, &ret); \ + SYNC_DEBUG \ + return ret; \ + } else { \ + return server_name->m_type(p1, p2, p3, p4, p5, p6, p7); \ + } \ } - -#define FUNC7S(m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7)\ +#define FUNC7S(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push_and_sync( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6, p7);\ - } else {\ - server_name->m_type(p1, p2, p3, p4, p5, p6, p7);\ - }\ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7); \ + } else { \ + server_name->m_type(p1, p2, p3, p4, p5, p6, p7); \ + } \ } -#define FUNC7SC(m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7)\ +#define FUNC7SC(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push_and_sync( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6, p7);\ - } else {\ - server_name->m_type(p1, p2, p3, p4, p5, p6, p7);\ - }\ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7); \ + } else { \ + server_name->m_type(p1, p2, p3, p4, p5, p6, p7); \ + } \ } - -#define FUNC7(m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7)\ +#define FUNC7(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6, p7);\ - } else {\ - server_name->m_type(p1, p2, p3, p4, p5, p6, p7);\ - }\ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7); \ + } else { \ + server_name->m_type(p1, p2, p3, p4, p5, p6, p7); \ + } \ } -#define FUNC7C(m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7)\ +#define FUNC7C(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6, p7);\ - } else {\ - server_name->m_type(p1, p2, p3, p4, p5, p6, p7);\ - }\ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7); \ + } else { \ + server_name->m_type(p1, p2, p3, p4, p5, p6, p7); \ + } \ } -#define FUNC8R(m_r,m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8)\ +#define FUNC8R(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - m_r ret;\ - command_queue.push_and_ret( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6, p7, p8, &ret);\ - SYNC_DEBUG\ - return ret;\ - } else {\ - return server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8);\ - }\ + if (Thread::get_caller_ID() != server_thread) { \ + m_r ret; \ + command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, &ret); \ + SYNC_DEBUG \ + return ret; \ + } else { \ + return server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8); \ + } \ } -#define FUNC8RC(m_r,m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8)\ +#define FUNC8RC(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - m_r ret;\ - command_queue.push_and_ret( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6, p7, p8, &ret);\ - SYNC_DEBUG\ - return ret;\ - } else {\ - return server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8);\ - }\ + if (Thread::get_caller_ID() != server_thread) { \ + m_r ret; \ + command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, &ret); \ + SYNC_DEBUG \ + return ret; \ + } else { \ + return server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8); \ + } \ } - -#define FUNC8S(m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8)\ +#define FUNC8S(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push_and_sync( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6, p7, p8);\ - } else {\ - server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8);\ - }\ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8); \ + } else { \ + server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8); \ + } \ } -#define FUNC8SC(m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8)\ +#define FUNC8SC(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push_and_sync( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6, p7, p8);\ - } else {\ - server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8);\ - }\ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8); \ + } else { \ + server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8); \ + } \ } - -#define FUNC8(m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8)\ +#define FUNC8(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6, p7, p8);\ - } else {\ - server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8);\ - }\ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8); \ + } else { \ + server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8); \ + } \ } -#define FUNC8C(m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8)\ +#define FUNC8C(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) const { \ - if (Thread::get_caller_ID()!=server_thread) {\ - command_queue.push( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6, p7, p8);\ - } else {\ - server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8);\ - }\ + if (Thread::get_caller_ID() != server_thread) { \ + command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8); \ + } else { \ + server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8); \ + } \ } |