Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
wildcard_group.h
Go to the documentation of this file.
1 /*
2  * Copyright 2010 Google Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http:///www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
18 
21 
22 #ifndef PAGESPEED_KERNEL_BASE_WILDCARD_GROUP_H_
23 #define PAGESPEED_KERNEL_BASE_WILDCARD_GROUP_H_
24 
25 #include <vector>
29 
30 namespace net_instaweb {
31 
32 class Wildcard;
33 
51  public:
52  WildcardGroup() {}
53  ~WildcardGroup();
54 
57  bool Match(const StringPiece& str, bool allow_by_default) const;
58 
61  void Allow(const StringPiece& wildcard);
62 
65  void Disallow(const StringPiece& wildcard);
66 
67  void CopyFrom(const WildcardGroup& src);
68  void AppendFrom(const WildcardGroup& src);
69 
70  GoogleString Signature() const;
71 
72  private:
73  void Clear();
74 
78  std::vector<Wildcard*> wildcards_;
79  std::vector<bool> allow_;
80 
81 };
82 
83 }
84 
85 #endif
void Disallow(const StringPiece &wildcard)
Definition: signature.h:42
void Allow(const StringPiece &wildcard)
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
bool Match(const StringPiece &str, bool allow_by_default) const
Definition: wildcard_group.h:50