store_consts.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_STORE_STORE_CONSTS_H
00017 #define ZORBA_STORE_STORE_CONSTS_H
00018 
00019 #include <string>
00020 #include <zorba/config.h>
00021 
00022 namespace zorba { namespace store {
00023 
00024 class ZORBA_DLL_PUBLIC StoreConsts
00025 {
00026  public:
00027 
00028   enum NodeKind
00029   {
00030     anyNode        = 0,
00031     documentNode   = 1,
00032     elementNode    = 2,
00033     attributeNode  = 3,
00034     textNode       = 4,
00035     piNode         = 5,
00036     commentNode    = 6
00037   };
00038 
00039   enum NsScoping 
00040   {
00041     ALL_NAMESPACES,
00042     ONLY_LOCAL_NAMESPACES,
00043     ONLY_PARENT_NAMESPACES
00044   };
00045 
00046   static std::string toString(NodeKind k)
00047   {
00048     switch(k) {
00049       case anyNode:
00050         return "anyNode";
00051 
00052       case documentNode:
00053         return "documentNode";
00054 
00055       case elementNode:
00056         return "elementNode";
00057 
00058       case attributeNode:
00059         return "attributeNode";
00060 
00061       case textNode:
00062         return "textNode";
00063 
00064       case piNode:
00065         return "piNode";
00066 
00067       case commentNode:
00068         return "commentNode";
00069 
00070       default:
00071         return "<unknown NodeKind>";
00072     }
00073   }
00074 };
00075 
00076 } // namespace store
00077 } // namespace zorba
00078 #endif
00079 /* vim:set et sw=2 ts=2: */
blog comments powered by Disqus