Click here to Skip to main content
11,575,798 members (49,154 online)
Click here to Skip to main content
Add your own
alternative version

RMI for C++

, 6 Aug 2009 CPOL 524.9K 3.9K 147
User-friendly remote method invocation in C++.
rcf.zip
RCF
demo
vs2003
RCF
Client
Server
doc
include
RCF
Connection.inl
Marshal.inl
Multiplexer.inl
RCF.inl
RcfServer.inl
ServerStub.inl
Protocol
util
Platform
Compiler
bcc55
cw80
gcc32
icl70
msvc71
Library
bcc55
cw80
gcc32
msvc60
msvc71
Machine
SPARC
x86
OS
Cygwin
Unix
Windows
System
NonWindows
Windows
Threads
SF
src
RCF
Protocol
util
SF
test
Jamfile
Jamrules
borland
Jamfile
Jamrules
vs2003
RCF
RCF
RCFTest
#ifndef _UTIL_PLATFORM_THREADS_BOOSTTHREADS_HPP_
#define _UTIL_PLATFORM_THREADS_BOOSTTHREADS_HPP_

#ifdef _MSC_VER
#pragma warning( push )
#pragma warning( disable : 4275 ) // warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'boost::thread_resource_error'
#pragma warning( disable : 4251 ) // warning C4251: 'boost::thread_group::m_threads' : class 'std::list<_Ty>' needs to have dll-interface to be used by clients of class 'boost::thread_group'
#endif

#include <boost/thread/thread.hpp>
#include <boost/thread/tss.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/read_write_mutex.hpp>
#include <boost/thread/recursive_mutex.hpp>
#include <boost/thread/condition.hpp>

#ifdef _MSC_VER
#pragma warning( pop )
#endif

namespace Platform {

    namespace Threads {

        typedef boost::thread thread;
        typedef boost::thread_group thread_group;

        template<typename T>
        struct thread_specific_ptr {
            typedef boost::thread_specific_ptr<T> Val;
        };

        typedef boost::mutex                    mutex;
        typedef boost::try_mutex                try_mutex;
        typedef boost::recursive_mutex          recursive_mutex;
        typedef boost::recursive_try_mutex      recursive_try_mutex;
        typedef boost::condition                condition;

        enum read_write_scheduling_policy { 
            writer_priority = boost::read_write_scheduling_policy::writer_priority, 
            reader_priority = boost::read_write_scheduling_policy::reader_priority, 
            alternating_many_reads = boost::read_write_scheduling_policy::alternating_many_reads, 
            alternating_single_read = boost::read_write_scheduling_policy::alternating_single_read 
        };

        class read_write_mutex : public boost::read_write_mutex
        {
        public:
            read_write_mutex(read_write_scheduling_policy policy) : 
                boost::read_write_mutex(
                    boost::read_write_scheduling_policy::read_write_scheduling_policy_enum(policy))
            {}
        };

    } // namespace Threads

} // namespace Platform

#endif // ! _UTIL_PLATFORM_THREADS_BOOSTTHREADS_HPP_

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Jarl Lindrud
Australia Australia
Software developer, ex-resident of Sweden and now living in Canberra, Australia, working on distributed C++ applications. Jarl enjoys programming, but prefers skiing and playing table tennis. He derives immense satisfaction from referring to himself in third person.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150624.2 | Last Updated 6 Aug 2009
Article Copyright 2005 by Jarl Lindrud
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid