mount_point.h
//
// Copyright (C) 2008-2012 Artyom Beilis (Tonkikh) <artyomtnk@yahoo.com>
//
// See accompanying file COPYING.TXT file for licensing details.
//
#ifndef CPPCMS_MOUNT_POINT_H
#define CPPCMS_MOUNT_POINT_H
#include <cppcms/defs.h>
#include <string>
#include <booster/perl_regex.h>
#include <booster/copy_ptr.h>
namespace cppcms {
class CPPCMS_API mount_point {
public:
typedef enum {
match_path_info,
match_script_name
} selection_type;
booster::regex host() const;
booster::regex script_name() const;
booster::regex path_info() const;
int group() const;
selection_type selection() const;
void host(booster::regex const &);
void script_name(booster::regex const &);
void path_info(booster::regex const &);
void group(int);
void selection(selection_type);
std::pair<bool,std::string> match(std::string const &h,std::string const &s,std::string const &p) const;
std::pair<bool,std::string> match(char const *h,char const *s,char const *p) const;
mount_point();
~mount_point();
mount_point(mount_point const &);
mount_point const &operator=(mount_point const &);
mount_point(std::string const &path,int group);
mount_point(std::string const &script);
mount_point(std::string const &script,std::string const &path,int group);
mount_point( selection_type sel,
std::string const &selected_part,
int group);
mount_point( selection_type sel,
std::string const &non_selected_part);
mount_point( selection_type sel,
std::string const &non_selected_part,
std::string const &selected_part,
int group);
mount_point( selection_type sel,
booster::regex const &http_host,
booster::regex const &script,
booster::regex const &path,
int group);
private:
booster::regex host_;
booster::regex script_name_;
booster::regex path_info_;
int group_;
selection_type selection_;
struct _data;
booster::copy_ptr<_data> d;
};
} // cppcms
#endif
booster::regex
This is a simple wrapper of PCRE library.
Definition: perl_regex.h:35
booster::copy_ptr< _data >
cppcms::mount_point
This class represents application's mount point or the rule on which specific application is selected...
Definition: mount_point.h:24
cppcms::mount_point::match_path_info
Pass PATH_INFO to applications.
Definition: mount_point.h:46