Changeset 617
- Timestamp:
- 07/29/08 09:10:03 (4 months ago)
- Files:
-
- trunk/rphp/runtime/CMakeLists.txt (modified) (1 diff)
- trunk/rphp/runtime/include/pExtBase.h (added)
- trunk/rphp/runtime/include/pExtManager.h (added)
- trunk/rphp/runtime/include/pFunctionManager.h (added)
- trunk/rphp/runtime/include/pRuntime.h (modified) (4 diffs)
- trunk/rphp/runtime/pExtBase.cpp (added)
- trunk/rphp/runtime/pExtManager.cpp (added)
- trunk/rphp/runtime/pFunctionManager.cpp (added)
- trunk/rphp/runtime/pHash.cpp (modified) (8 diffs)
- trunk/rphp/runtime/pRuntime.cpp (modified) (1 diff)
- trunk/rphp/runtime/standard (added)
- trunk/rphp/runtime/standard/pStandardExt.cpp (added)
- trunk/rphp/runtime/standard/pStandardExt.h (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/rphp/runtime/CMakeLists.txt
r611 r617 12 12 pOutputBuffer.cpp 13 13 pOutputManager.cpp 14 pFunctionManager.cpp 15 pExtBase.cpp 16 pExtManager.cpp 17 standard/pStandardExt.cpp 14 18 ) 15 19 trunk/rphp/runtime/include/pRuntime.h
r610 r617 21 21 22 22 #include "pTypes.h" 23 #include "pOutputManager.h"24 23 25 24 namespace rphp { 25 26 class pOutputManager; 27 class pExtManager; 28 class pFunctionManager; 26 29 27 30 class pRuntimeEngine { … … 30 33 31 34 // output buffering management 32 pOutputManager outputManager;35 pOutputManager* outputManager; 33 36 34 // function manager 35 // --> store list of available functions, including builtins (from extension manager) which stay on page reset, 36 // and the currently defined via php code, which are reset each page 37 // --> interface for new function definition 37 // extension manager 38 // --> for loading and registering dynamic extensions (pcre, mysql, etc) and their associated functions, classes 39 pExtManager* extManager; 38 40 39 41 // class manager … … 41 43 // --> interface for new class definition 42 44 43 // extension manager44 // --> for loading and registering dynamic extensions (pcre, mysql, etc) and their associated functions, classes45 45 46 46 // global data: … … 59 59 60 60 public: 61 pRuntimeEngine() { } 61 62 pRuntimeEngine(); 63 ~pRuntimeEngine(); 64 65 // function manager 66 // --> store list of available functions, including builtins (from extension manager) which stay on page reset, 67 // and the currently defined via php code, which are reset each page 68 // --> interface for new function definition 69 pFunctionManager* functionManager; 62 70 63 71 }; trunk/rphp/runtime/pHash.cpp
r602 r617 22 22 23 23 namespace boost { 24 std::size_t hash_value(rphp::hKeyVar const& k) {24 std::size_t hash_value(rphp::hKeyVar const& k) { 25 25 return boost::apply_visitor(rphp::hKeyHasher(), k); 26 26 } … … 28 28 29 29 namespace rphp { 30 30 31 31 void pHash::insert(const pUString &key, pVarP data) { 32 32 // TODO check numeric string, set maxIntKey accordingly … … 46 46 hashData.insert(h_container(key, data)); 47 47 } 48 48 49 49 void pHash::insertNext(pVarP data) { 50 50 hashData.insert(h_container(maxIntKey++, data)); … … 54 54 return hashData.erase(key); 55 55 } 56 56 57 57 pHash::size_type pHash::remove(const pInt &key) { 58 58 return hashData.erase(key); 59 59 } 60 60 61 61 62 62 // query 63 63 const bool pHash::keyExists(const pUString &key) { … … 75 75 return (k != hashData.end()); 76 76 } 77 77 78 78 // lookup 79 79 pVarP pHash::operator[] ( const pUString &key ) { … … 94 94 } 95 95 */ 96 96 97 97 pVarP pHash::operator[] ( const pInt &key ) { 98 98 stableHash::iterator k = hashData.find(key); … … 117 117 118 118 hKeyType kType; 119 119 120 120 for (seq_index::iterator it = ot.begin(); it!=ot.end(); it++) { 121 121 kType = boost::apply_visitor(rphp::hKeyGetType(), (*it).key); … … 130 130 } 131 131 132 132 133 133 } /* namespace rphp */ 134 134 trunk/rphp/runtime/pRuntime.cpp
r598 r617 19 19 #include <iostream> 20 20 #include "pRuntime.h" 21 #include "pExtManager.h" 22 #include "pFunctionManager.h" 21 23 22 24 namespace rphp { 23 25 26 pRuntimeEngine::pRuntimeEngine() : extManager(new pExtManager(this)), 27 functionManager(new pFunctionManager(this)) 28 { 29 // runtime initialization 30 31 // load standard extension 32 33 } 34 35 36 pRuntimeEngine::~pRuntimeEngine() { 37 // runtime shutdown 38 delete functionManager; 39 delete extManager; 40 } 24 41 25 42 }
