00001 /*00002 * The Software License00003 * =================================================================================00004 * Copyright (c) 2003-.The Terimber Corporation. All rights reserved.00005 * =================================================================================00006 * Redistributions of source code must retain the above copyright notice, 00007 * this list of conditions and the following disclaimer.00008 * Redistributions in binary form must reproduce the above copyright notice, 00009 * this list of conditions and the following disclaimer in the documentation 00010 * and/or other materials provided with the distribution.00011 * The end-user documentation included with the redistribution, if any, 00012 * must include the following acknowledgment:00013 * "This product includes software developed by the Terimber Corporation."00014 * =================================================================================00015 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, 00016 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 00017 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 00018 * IN NO EVENT SHALL THE TERIMBER CORPORATION OR ITS CONTRIBUTORS BE LIABLE FOR 00019 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00020 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00021 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 00022 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT00023 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE00024 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.00025 * ================================================================================00026 */00027
00028 #ifndef _terimber_vardatabase_h_00029 #define _terimber_vardatabase_h_00030
00031 #include "allinc.h"00032 #include "smart/varaccess.h"00033 #include "smart/varobj.h"00034 #include "base/map.h"00035 #include "base/keymaker.h"00036
00037 BEGIN_TERIMBER_NAMESPACE00038 #pragma pack(4)00039
00042class vardatabase : publicterimber_vardatabase00043 {
00046class vartable00047 {
00049 vartable&
00050 operator=(constvartable& x);
00051 public:
00053vartable() :
00054 _tbl(_schema)
00055 {
00056 }
00058vartable(constvartable& x) :
00059 _tbl(_schema)
00060 {
00061 }
00062
00063byte_allocator_all;
00064byte_allocator_tmp_all;
00065byte_allocator_inl_all;
00066var_container::sorted_container_allocator_t_con_all;
00067var_object_schema_schema;
00068var_object_repository_tbl;
00069keylocker_key;
00070 };
00071
00074typedefmap< string_t, vartable >table_map_t;
00075 public:
00077 vardatabase();
00079 virtual00080 ~vardatabase();
00081
00083 virtual00084 bool00085 process_xml_request(constchar* request,
00086 size_t len,
00087 xml_designer* parser
00088 );
00089
00090 private:
00092 bool00093 fill_schema( vartable& tbl,
00094 xml_designer* parser
00095 );
00096 private:
00097keylocker_masterkey;
00098mutex_table_mtx;
00099table_map_t_table_map;
00100 };
00101
00102 #pragma pack()00103 END_TERIMBER_NAMESPACE00104
00105 #endif