identtypes.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2006-2008 The FLWOR Foundation.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  * 
00008  * http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 #ifndef ZORBA_TYPEIDENT_TYPES_API_H
00017 #define ZORBA_TYPEIDENT_TYPES_API_H
00018 
00019 #include <zorba/config.h>
00020 #include <iostream>
00021 
00022 namespace zorba {
00023 class ZORBA_DLL_PUBLIC IdentTypes {
00024 public:
00025   typedef enum {
00026     NAMED_TYPE,     // builtin atomic type
00027     ELEMENT_TYPE,
00028     ATTRIBUTE_TYPE,
00029     DOCUMENT_TYPE,
00030     PI_TYPE,
00031     TEXT_TYPE,
00032     COMMENT_TYPE,
00033     ANY_NODE_TYPE, // node()
00034     ITEM_TYPE,     // item()
00035     EMPTY_TYPE,    // empty-sequence()
00036     SCHEMA_ELEMENT_TYPE,
00037     SCHEMA_ATTRIBUTE_TYPE,
00038     INVALID_TYPE
00039   } kind_t;
00040   
00041   static char const *const kind_string_of[];
00042 
00043   typedef enum {
00044     QUANT_ONE,
00045     QUANT_QUESTION,
00046     QUANT_PLUS,
00047     QUANT_STAR
00048   } quantifier_t;
00049   
00050   static char const *const quantifier_string_of[];
00051 };
00052 }
00053 
00054 namespace std {
00055 
00056 ZORBA_DLL_PUBLIC ostream& operator<<(ostream& o, const zorba::IdentTypes::kind_t ik);
00057 ZORBA_DLL_PUBLIC ostream& operator<<(ostream& o, const zorba::IdentTypes::quantifier_t iq);
00058 
00059 }
00060 
00061 #endif
00062 /* vim:set et sw=2 ts=2: */
blog comments powered by Disqus