SAGA C++ API 1.6
permissions.hpp
Go to the documentation of this file.
00001 //  Copyright (c) 2005-2009 Hartmut Kaiser
00002 //  Copyright (c) 2007 Ole Weidner (oweidner@cct.lsu.edu)
00003 // 
00004 //  Distributed under the Boost Software License, Version 1.0. (See accompanying 
00005 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
00006 
00007 #ifndef SAGA_PERMISSIONS_HPP
00008 #define SAGA_PERMISSIONS_HPP
00009 
00010 // include STL
00011 #include <string>
00012 #include <vector>
00013 
00014 // include dependent spec sections
00015 #include <saga/saga/util.hpp>
00016 #include <saga/saga/base.hpp>
00017 
00018 #include <saga/saga/detail/permissions.hpp>
00019 
00020 // suppress warnings about dependent classes not being exported from the dll
00021 #if defined(BOOST_MSVC)
00022 #pragma warning(push)
00023 #pragma warning(disable : 4251 4231 4660)
00024 #endif
00025 
00027 namespace saga
00028 {    
00032     class SAGA_EXPORT permissions
00033       : public saga::detail::permissions<permissions>
00034     {
00035         
00036     public:
00037         
00041         enum permission
00042         {
00043             None   = 0,
00044             Query  = 1,
00045             Read   = 2,
00046             Write  = 4,
00047             Exec   = 8,
00048             Owner  = 0x10,
00049             All    = 0x1F
00050         };
00051     
00052     protected:
00054 
00055         friend struct saga::detail::permissions<permissions>;  // needs to access get_impl()
00056         TR1::shared_ptr <saga::impl::object> impl_;
00057 
00058         TR1::shared_ptr<saga::impl::object> get_impl_sp (void) const { return impl_; }
00059         saga::impl::object* get_impl (void) const { return impl_.get(); }
00060 
00061         bool is_impl_valid() const { return impl_ ? true : false; }
00063 
00064     public:
00069         permissions (saga::object rhs);
00070 
00075         explicit permissions (saga::impl::object *impl);    // adaptor interface
00076 
00081         ~permissions (void);
00082     };
00083 
00085 } // namespace saga
00086                                                                              
00087 #if defined(BOOST_MSVC)
00088 #pragma warning(pop)
00089 #endif
00090 
00091 #endif // SAGA_PERMISSIONS_HPP
00092 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines