|
00001 /* ///////////////////////////////////////////////////////////////////////// 00002 * File: pantheios/backends/bec.test.h 00003 * 00004 * Purpose: Declaration of the be.test library. 00005 * 00006 * Created: 1st November 2006 00007 * Updated: 22nd March 2010 00008 * 00009 * Home: http://www.pantheios.org/ 00010 * 00011 * Copyright (c) 2006-2009, Matthew Wilson and Synesis Software 00012 * All rights reserved. 00013 * 00014 * Redistribution and use in source and binary forms, with or without 00015 * modification, are permitted provided that the following conditions are 00016 * met: 00017 * 00018 * - Redistributions of source code must retain the above copyright notice, 00019 * this list of conditions and the following disclaimer. 00020 * - Redistributions in binary form must reproduce the above copyright 00021 * notice, this list of conditions and the following disclaimer in the 00022 * documentation and/or other materials provided with the distribution. 00023 * - Neither the name(s) of Matthew Wilson and Synesis Software nor the 00024 * names of any contributors may be used to endorse or promote products 00025 * derived from this software without specific prior written permission. 00026 * 00027 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 00028 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00029 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00030 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 00031 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00032 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00033 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00034 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00035 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00036 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00037 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00038 * 00039 * ////////////////////////////////////////////////////////////////////// */ 00040 00041 00047 #ifndef PANTHEIOS_INCL_BACKENDS_H_BEC_TEST 00048 #define PANTHEIOS_INCL_BACKENDS_H_BEC_TEST 00049 00050 /* ///////////////////////////////////////////////////////////////////////// 00051 * Version information 00052 */ 00053 00054 #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION 00055 # define PANTHEIOS_VER_BACKENDS_H_BEC_TEST_MAJOR 2 00056 # define PANTHEIOS_VER_BACKENDS_H_BEC_TEST_MINOR 2 00057 # define PANTHEIOS_VER_BACKENDS_H_BEC_TEST_REVISION 1 00058 # define PANTHEIOS_VER_BACKENDS_H_BEC_TEST_EDIT 24 00059 #endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */ 00060 00061 /* ///////////////////////////////////////////////////////////////////////// 00062 * Includes 00063 */ 00064 00065 #ifndef PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS 00066 # include <pantheios/pantheios.h> 00067 #endif /* !PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS */ 00068 00069 #ifndef STLSOFT_INCL_STLSOFT_H_STLSOFT 00070 # include <stlsoft/stlsoft.h> 00071 #endif /* !STLSOFT_INCL_STLSOFT_H_STLSOFT */ 00072 00073 #ifdef __cplusplus 00074 /* We include threading.h to prevent the definition of _REENTRANT via 00075 * <string> on some UNIX operating systems from confusing the feature 00076 * discrimination in UNIXSTL and having it think that we're multithreading 00077 * when we're not. 00078 */ 00079 # include <pantheios/internal/threading.h> 00080 # include <string> 00081 #endif /* __cplusplus */ 00082 00083 /* ///////////////////////////////////////////////////////////////////////// 00084 * API 00085 */ 00086 00097 PANTHEIOS_CALL(int) pantheios_be_test_init( 00098 PAN_CHAR_T const* processIdentity 00099 , int id 00100 , void* unused 00101 , void* reserved 00102 , void** ptoken 00103 ); 00104 00108 PANTHEIOS_CALL(void) pantheios_be_test_uninit( 00109 void* token 00110 ); 00111 00115 PANTHEIOS_CALL(int) pantheios_be_test_logEntry( 00116 void* feToken 00117 , void* beToken 00118 , int severity 00119 , PAN_CHAR_T const* entry 00120 , size_t cchEntry 00121 ); 00122 00134 #define pantheios_be_test_parseArgs NULL 00135 00136 /* ///////////////////////////////////////////////////////////////////////// 00137 * Namespace 00138 */ 00139 00140 #ifdef __cplusplus 00141 00142 namespace pantheios 00143 { 00144 namespace be 00145 { 00146 namespace test 00147 { 00148 00154 class Time 00155 { 00156 public: 00158 static Time now(); 00159 }; 00160 00163 struct Entry 00164 { 00165 public: /* Member Types */ 00167 typedef std::basic_string<pan_char_t> string_type; 00168 00169 public: /* Member Variables */ 00170 /* const */ Time time; 00171 /* const */ int severity; 00172 /* const */ string_type statement; 00174 public: /* Construction */ 00176 Entry(int severity, pan_char_t const* entry, size_t cchEntry); 00177 }; 00178 00182 class Results 00183 { 00184 public: /* Member Types */ 00186 typedef Results class_type; 00188 typedef Entry value_type; 00189 protected: 00190 # if defined(STLSOFT_COMPILER_IS_DMC) 00191 public: 00192 # endif /* compiler */ 00193 00194 struct ResultsImpl; 00195 00196 protected: /* Construction */ 00197 # ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION 00198 Results(ResultsImpl* impl); 00199 # endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */ 00200 public: 00202 Results(class_type const& rhs); 00204 ~Results() stlsoft_throw_0(); 00205 00206 public: /* Accessors */ 00208 bool empty() const; 00210 size_t size() const; 00215 value_type const& operator [](size_t index) const; 00216 00217 private: /* Implementation */ 00218 ResultsImpl* const m_impl; 00219 00220 private: /* Not to be implemented */ 00221 class_type& operator= (class_type const& rhs); 00222 }; 00223 00225 void reset(); 00226 00228 Results results(); 00229 00230 /* ///////////////////////////////////////////////////////////////////////// 00231 * Namespace 00232 */ 00233 00234 } /* namespace test */ 00235 } /* namespace be */ 00236 } /* namespace pantheios */ 00237 00238 #endif /* __cplusplus */ 00239 00240 /* ////////////////////////////////////////////////////////////////////// */ 00241 00242 #endif /* PANTHEIOS_INCL_BACKENDS_H_BEC_TEST */ 00243 00244 /* ///////////////////////////// end of file //////////////////////////// */
|
|
pantheios Library documentation © Matthew Wilson & Synesis Software, 2006-2011 |