00001 00002 /* 00003 | Author: Michael Schmidt; 00004 | Gunnar Jehl 00005 | 00006 | ************************* SOFTWARE LICENSE AGREEMENT *********************** 00007 | This source code is published under the BSD License. 00008 | 00009 | See file 'LICENSE.txt' that comes with this distribution or 00010 | http://dbis.informatik.uni-freiburg.de/index.php?project=GCX/license.php 00011 | for the full license agreement. 00012 | 00013 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00014 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00015 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00016 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 00017 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00018 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 00019 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00020 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00021 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00022 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00023 | POSSIBILITY OF SUCH DAMAGE. 00024 | **************************************************************************** 00025 */ 00026 00035 #ifndef PATHEXPRESSSIONADORNMENT_H 00036 #define PATHEXPRESSSIONADORNMENT_H 00037 00038 #include "pathexpression.h" 00039 #include "pathstepstarexpression.h" 00040 00047 #define TAG_SHADOW_FRONT ".shadow_front" 00048 00054 #define TAG_SHADOW_TAIL ".shadow_tail" 00055 00072 class PathExpressionAdornment { 00073 00074 public: 00079 PathExpressionAdornment(PathExpression * _path); 00080 00084 virtual ~ PathExpressionAdornment(); 00085 00092 void print(OutputStream & dos) const; 00093 00100 inline PathExpression *getAdornedPath() { 00101 return adorned_path; 00102 } inline PathExpression *getRewrittenPath() { 00110 return rewritten_path; 00111 } 00112 00120 inline vector < unsigned >*getPathAdornments() { 00121 return &path_adornments; 00122 } 00123 00131 inline bool isChildNodePath() { 00132 return is_child_node_path; 00133 } 00134 00142 inline bool isDescendantNodePath() { 00143 return is_descendant_node_path; 00144 } 00145 00153 inline bool isDosNodePath() { 00154 return is_dos_node_path; 00155 } 00156 00164 inline bool isChildTextPath() { 00165 return is_child_text_path; 00166 } 00167 00175 inline bool isDescendantTextPath() { 00176 return is_descendant_text_path; 00177 } 00178 00179 private: 00186 PathExpression * adorned_path; 00187 00196 PathExpression *rewritten_path; 00197 00203 vector < unsigned >path_adornments; 00204 00210 bool is_child_node_path; 00211 00217 bool is_descendant_node_path; 00218 00224 bool is_dos_node_path; 00225 00231 bool is_child_text_path; 00232 00238 bool is_descendant_text_path; 00239 }; 00240 00241 #endif // PATHEXPRESSSIONADORNMENT_H