DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
Cloud Backup
True Drop Box
FTP/SFTP Hosting
Group Account
DriveHQ Start Menu
Online File Server
My Storage
|
Manage Shares
|
Publishes
|
Drop Boxes
|
Group Account
WebDAV Drive Mapping
Cloud Drive Home
|
WebDAV Guide
|
Drive Mapping Tool
|
Drive Mapping URL
Complete Data Backup
Backup Guide
|
Online Backup Tool
|
Cloud-to-Cloud Backup
FTP, Email & Web Service
FTP Home
|
FTP Hosting FAQ
|
Email Hosting
|
EmailManager
|
Web Hosting
Help & Resources
About
|
Enterprise Service
|
Partnership
|
Comparisons
|
Support
Quick Links
Security and Privacy
Download Software
Service Manual
Use Cases
Group Account
Online Help
Blog
Contact
Cloud Surveillance
Sign Up
Login
Features
Business Features
Online File Server
FTP Hosting
Cloud Drive Mapping
Cloud File Backup
Email Backup & Hosting
Cloud File Sharing
Folder Synchronization
Group Management
True Drop Box
Full-text Search
AD Integration/SSO
Mobile Access
IP Camera & DVR Solution
More...
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
More...
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Mobile Apps
Pricing
Business Plans & Pricing
Personal Plans & Pricing
Price Comparison with Others
Feature Comparison with Others
Install Mobile App
Sign up
Creating account...
Invalid character in username! Only 0-9, a-z, A-Z, _, -, . allowed.
Username is required!
Invalid email address!
E-mail is required!
Password is required!
Password is invalid!
Password and confirmation do not match.
Confirm password is required!
I accept
Membership Agreement
Please read the Membership Agreement and check "I accept"!
Free Quick Sign-up
Sign-up Page
Log in
Signing in...
Username or e-mail address is required!
Password is required!
Keep me logged in
Quick Login
Forgot Password
Up
Upload
Download
Share
Publish
New Folder
New File
Copy
Cut
Delete
Paste
Rate
Upgrade
Rotate
Effect
Edit
Slide
History
#ifndef BOOST_STATECHART_DETAIL_STATE_BASE_HPP_INCLUDED #define BOOST_STATECHART_DETAIL_STATE_BASE_HPP_INCLUDED ////////////////////////////////////////////////////////////////////////////// // Copyright 2002-2006 Andreas Huber Doenni // Distributed under the Boost Software License, Version 1.0. (See accompany- // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ////////////////////////////////////////////////////////////////////////////// #include
#include
#include
#include
#include
#include
#include
// BOOST_MSVC #include
#include
#ifdef BOOST_MSVC # pragma warning( push ) # pragma warning( disable: 4702 ) // unreachable code (in release mode only) #endif #include
#ifdef BOOST_MSVC # pragma warning( pop ) #endif #ifdef BOOST_MSVC // We permanently turn off the following level 4 warnings because users will // have to do so themselves anyway if we turn them back on # pragma warning( disable: 4511 ) // copy constructor could not be generated # pragma warning( disable: 4512 ) // assignment operator could not be generated #endif namespace boost { namespace statechart { namespace detail { template< class Allocator, class RttiPolicy > class leaf_state; template< class Allocator, class RttiPolicy > class node_state_base; typedef unsigned char orthogonal_position_type; ////////////////////////////////////////////////////////////////////////////// template< class Allocator, class RttiPolicy > class state_base : #ifndef NDEBUG noncopyable, #endif public RttiPolicy::template rtti_base_type< // Derived class objects will be created, handled and destroyed by exactly // one thread --> locking is not necessary counted_base< false > > { typedef typename RttiPolicy::template rtti_base_type< counted_base< false > > base_type; public: ////////////////////////////////////////////////////////////////////////// void exit() {} virtual const state_base * outer_state_ptr() const = 0; protected: ////////////////////////////////////////////////////////////////////////// state_base( typename RttiPolicy::id_provider_type idProvider ) : base_type( idProvider ), deferredEvents_( false ) { } #if BOOST_WORKAROUND( __GNUC__, BOOST_TESTED_AT( 4 ) ) // We make the destructor virtual for GCC because with this compiler there // is currently no way to disable the "has virtual functions but // non-virtual destructor" warning on a class by class basis. Although it // can be done on the compiler command line with -Wno-non-virtual-dtor, // this is undesirable as this would also suppress legitimate warnings for // types that are not states. virtual ~state_base() {} #else // This destructor is not virtual for performance reasons. The library // ensures that a state object is never deleted through a state_base // pointer but only through a pointer to the most-derived type. ~state_base() {} #endif protected: ////////////////////////////////////////////////////////////////////////// // The following declarations should be private. // They are only protected because many compilers lack template friends. ////////////////////////////////////////////////////////////////////////// void defer_event() { deferredEvents_ = true; } bool deferred_events() const { return deferredEvents_; } template< class Context > void set_context( orthogonal_position_type position, Context * pContext ) { pContext->add_inner_state( position, this ); } public: ////////////////////////////////////////////////////////////////////////// // The following declarations should be private. // They are only public because many compilers lack template friends. ////////////////////////////////////////////////////////////////////////// virtual detail::reaction_result react_impl( const event_base & evt, typename RttiPolicy::id_type eventType ) = 0; typedef intrusive_ptr< node_state_base< Allocator, RttiPolicy > > node_state_base_ptr_type; typedef intrusive_ptr< leaf_state< Allocator, RttiPolicy > > leaf_state_ptr_type; typedef std::list< leaf_state_ptr_type, typename boost::detail::allocator::rebind_to< Allocator, leaf_state_ptr_type >::type > state_list_type; virtual void remove_from_state_list( typename state_list_type::iterator & statesEnd, node_state_base_ptr_type & pOutermostUnstableState, bool performFullExit ) = 0; private: ////////////////////////////////////////////////////////////////////////// bool deferredEvents_; }; #ifdef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP } // namespace detail } // namespace statechart #endif template< class Allocator, class RttiPolicy > inline void intrusive_ptr_add_ref( const ::boost::statechart::detail::state_base< Allocator, RttiPolicy > * pBase ) { pBase->add_ref(); } template< class Allocator, class RttiPolicy > inline void intrusive_ptr_release( const ::boost::statechart::detail::state_base< Allocator, RttiPolicy > * pBase ) { if ( pBase->release() ) { // The state_base destructor is *not* virtual for performance reasons // but intrusive_ptr< state_base > objects are nevertheless used to point // to states. This assert ensures that such a pointer is never the last // one referencing a state object. BOOST_ASSERT( false ); } } #ifndef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP } // namespace detail } // namespace statechart #endif } // namespace boost #endif
state_base.hpp
Page URL
File URL
Prev
8/8 Next
Download
( 5 KB )
Note: The DriveHQ service banners will NOT be displayed if the file owner is a paid member.
Comments
Total ratings:
0
Average rating:
Not Rated
Would you like to comment?
Join DriveHQ
for a free account, or
Logon
if you are already a member.