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
// (C) Copyright Gennadiy Rozental 2005-2007. // Use, modification, and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. // // File : $RCSfile$ // // Version : $Revision: 43798 $ // // Description : defines models configuration file, it's parameter and parameter namespaces // *************************************************************************** #ifndef BOOST_RT_FILE_CONFIG_FILE_HPP_010105GER #define BOOST_RT_FILE_CONFIG_FILE_HPP_010105GER // Boost.Runtime.Parameter #include
#include
// Boost.Test #include
#include
// Boost #include
// STL #include
namespace boost { namespace BOOST_RT_PARAM_NAMESPACE { namespace file { // ************************************************************************** // // ************** runtime::file::parameter ************** // // ************************************************************************** // class param_namespace; class parameter { public: // Constructor parameter( cstring name, cstring value, param_namespace const& parent ); BOOST_READONLY_PROPERTY( dstring, (parameter)) p_name; BOOST_READONLY_PROPERTY( dstring, (parameter)) p_value; friend std::ostream& operator<<( std::ostream& os, parameter const& ); private: // Data members param_namespace const& m_parent; }; // ************************************************************************** // // ************** runtime::file::modifiers ************** // // ************************************************************************** // namespace { nfp::typed_keyword
value_marker; nfp::typed_keyword
value_delimeter; nfp::typed_keyword
namespace_delimeter; } // local namespace // ************************************************************************** // // ************** runtime::file::param_namespace ************** // // ************************************************************************** // class param_namespace { public: typedef std::list
::iterator iterator; typedef std::list
::const_iterator const_iterator; typedef std::list
::iterator sub_ns_iterator; typedef std::list
::const_iterator sub_ns_const_iterator; // Public properties BOOST_READONLY_PROPERTY( dstring, (param_namespace)) p_name; unit_test::readonly_property
p_parent; void load( config_file_iterator cf_it ) { load( cf_it, nfp::no_params ); } template
void load( config_file_iterator cf_it, Modifier const& m ) { cstring vm = m.has( value_marker ) ? m[value_marker] : BOOST_RT_PARAM_CSTRING_LITERAL( "\"" ); cstring vd = m.has( value_delimeter ) ? m[value_delimeter] : BOOST_RT_PARAM_CSTRING_LITERAL( "= \t\n\r" ); cstring nd = m.has( namespace_delimeter ) ? m[namespace_delimeter] : BOOST_RT_PARAM_CSTRING_LITERAL( "::" ); load_impl( cf_it, vm, vd, nd ); } void load( cstring file_name ) { load( file_name, nfp::no_params ); } template
void load( cstring file_name, Modifier const& m ) { config_file_iterator cfi( file_name, m ); load( cfi, m ); } void insert_param( cstring param_name, cstring param_value ); param_namespace& subnamespace( cstring namespace_name ); // find and insert if not present void clear(); iterator begin() { return m_parameters.begin(); } const_iterator begin() const { return m_parameters.begin(); } iterator end() { return m_parameters.end(); } const_iterator end() const { return m_parameters.end(); } sub_ns_iterator sub_ns_begin() { return m_subnamespaces.begin(); } sub_ns_const_iterator sub_ns_begin() const { return m_subnamespaces.begin(); } sub_ns_iterator sub_ns_end() { return m_subnamespaces.end(); } sub_ns_const_iterator sub_ns_end() const { return m_subnamespaces.end(); } void print_full_name( std::ostream& os ) const; protected: explicit param_namespace( cstring name, param_namespace const* parent = 0 ); private: void load_impl( config_file_iterator cf_it, cstring value_marker_, cstring value_delimeter_, cstring namespace_delimeter_ ); // Data members std::list
m_parameters; std::list
m_subnamespaces; }; //____________________________________________________________________________// boost::optional
get_param_value( param_namespace const& where_from, cstring name_part1, cstring name_part2 = cstring(), cstring name_part3 = cstring(), cstring name_part4 = cstring(), cstring name_part5 = cstring() ); //____________________________________________________________________________// cstring get_requ_param_value( param_namespace const& where_from, cstring name_part1, cstring name_part2 = cstring(), cstring name_part3 = cstring(), cstring name_part4 = cstring(), cstring name_part5 = cstring() ); //____________________________________________________________________________// param_namespace const* get_param_subns( param_namespace const& where_from, cstring namespace_name ); //____________________________________________________________________________// // ************************************************************************** // // ************** runtime::file::config_file ************** // // ************************************************************************** // class config_file : public param_namespace { public: // Constructor config_file(); config_file( cstring file_name ); }; } // namespace file } // namespace BOOST_RT_PARAM_NAMESPACE } // namespace boost #endif // BOOST_RT_FILE_CONFIG_FILE_HPP_010105GER
config_file.hpp
Page URL
File URL
Prev
2/4
Next
Download
( 7 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.