• R/O
  • SSH

WSGIHttpFilter: 提交

メインプロジェクトレポジトリ


Commit MetaInfo

修訂0afb89bd731a4bad0547f3121c053ad887607f1a (tree)
時間2011-04-16 19:51:44
作者S.P <love2hina@user...>
CommiterS.P

Log Message

スマートポインタの変更

Change Summary

差異

diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter.cpp
--- a/WSGIHttpFilter/WSGIHttpFilter.cpp Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter.cpp Sat Apr 16 19:51:44 2011 +0900
@@ -59,8 +59,10 @@
5959 using namespace WSGIHttpFilter::Python;
6060
6161 DWORD dwResult = HSE_STATUS_ERROR;
62- boost::shared_ptr<clsExtensionSession> ptrSession;
63- boost::shared_ptr<clsRoot> ptrWSGIAppConfig;
62+ std::tr1::shared_ptr<clsExtensionSession> ptrSession;
63+ std::tr1::shared_ptr<clsRoot> ptrWSGIAppConfig;
64+
65+WSGIHttpFilter::Logger.outputLog(WSGIHttpFilter::clsLogger::DebugLevel, L"[VALUE] Proc thread: %x", ::GetCurrentThreadId());
6466
6567 // リクエストオブジェクトの作成
6668 ptrSession.reset(new clsExtensionSession(pECB));
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter.vcproj
--- a/WSGIHttpFilter/WSGIHttpFilter.vcproj Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter.vcproj Sat Apr 16 19:51:44 2011 +0900
@@ -43,7 +43,7 @@
4343 <Tool
4444 Name="VCCLCompilerTool"
4545 Optimization="0"
46- AdditionalIncludeDirectories=".;&quot;$(SolutionDir)boost1.40.0&quot;;&quot;$(SolutionDir)Python2.6.2\include&quot;"
46+ AdditionalIncludeDirectories=".;&quot;$(SolutionDir)boost1.40.0&quot;;&quot;$(SolutionDir)Python2.7.1\include&quot;"
4747 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL"
4848 MinimalRebuild="false"
4949 BasicRuntimeChecks="0"
@@ -66,7 +66,7 @@
6666 <Tool
6767 Name="VCLinkerTool"
6868 LinkIncremental="2"
69- AdditionalLibraryDirectories="&quot;$(SolutionDir)boost1.40.0\stage\lib&quot;;&quot;$(SolutionDir)Python2.6.2\libs&quot;"
69+ AdditionalLibraryDirectories="&quot;$(SolutionDir)boost1.40.0\stage\lib&quot;;&quot;$(SolutionDir)Python2.7.1\libs&quot;"
7070 ModuleDefinitionFile="$(ProjectName).def"
7171 GenerateDebugInformation="true"
7272 AssemblyDebug="1"
@@ -124,7 +124,7 @@
124124 Name="VCCLCompilerTool"
125125 Optimization="2"
126126 EnableIntrinsicFunctions="true"
127- AdditionalIncludeDirectories=".;&quot;$(SolutionDir)boost1.40.0&quot;;&quot;$(SolutionDir)Python2.6.2\include&quot;"
127+ AdditionalIncludeDirectories=".;&quot;$(SolutionDir)boost1.40.0&quot;;&quot;$(SolutionDir)Python2.7.1\include&quot;"
128128 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
129129 RuntimeLibrary="2"
130130 EnableFunctionLevelLinking="true"
@@ -146,7 +146,7 @@
146146 <Tool
147147 Name="VCLinkerTool"
148148 LinkIncremental="1"
149- AdditionalLibraryDirectories="&quot;$(SolutionDir)boost1.40.0\stage\lib&quot;;&quot;$(SolutionDir)Python2.6.2\libs&quot;"
149+ AdditionalLibraryDirectories="&quot;$(SolutionDir)boost1.40.0\stage\lib&quot;;&quot;$(SolutionDir)Python2.7.1\libs&quot;"
150150 ModuleDefinitionFile="$(ProjectName).def"
151151 GenerateDebugInformation="true"
152152 SubSystem="2"
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsApplication.cpp
--- a/WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsApplication.cpp Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsApplication.cpp Sat Apr 16 19:51:44 2011 +0900
@@ -13,7 +13,7 @@
1313
1414 using WSGIHttpFilter::Config::WSGIAppConfig::clsApplication;
1515
16-clsApplication::clsApplication(const boost::shared_ptr<stWSGIAppConfig> & ptrConfig)
16+clsApplication::clsApplication(const std::tr1::shared_ptr<stWSGIAppConfig> & ptrConfig)
1717 : clsInterface(ptrConfig)
1818 {
1919 }
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsApplication.h
--- a/WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsApplication.h Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsApplication.h Sat Apr 16 19:51:44 2011 +0900
@@ -29,7 +29,7 @@
2929 *
3030 * @param ptrConfig 設定構造体
3131 */
32- clsApplication(const boost::shared_ptr<stWSGIAppConfig> & ptrConfig);
32+ clsApplication(const std::tr1::shared_ptr<stWSGIAppConfig> & ptrConfig);
3333
3434 /**
3535 * デストラクタ.
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsInterface.cpp
--- a/WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsInterface.cpp Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsInterface.cpp Sat Apr 16 19:51:44 2011 +0900
@@ -12,7 +12,7 @@
1212
1313 using WSGIHttpFilter::Config::WSGIAppConfig::clsInterface;
1414
15-clsInterface::clsInterface(const boost::shared_ptr<stWSGIAppConfig> & ptrConfig)
15+clsInterface::clsInterface(const std::tr1::shared_ptr<stWSGIAppConfig> & ptrConfig)
1616 {
1717 this->m_ptrConfig = ptrConfig;
1818 }
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsInterface.h
--- a/WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsInterface.h Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsInterface.h Sat Apr 16 19:51:44 2011 +0900
@@ -38,7 +38,7 @@
3838
3939 protected:
4040 /** 設定データ */
41- boost::shared_ptr<stWSGIAppConfig> m_ptrConfig;
41+ std::tr1::shared_ptr<stWSGIAppConfig> m_ptrConfig;
4242
4343 public:
4444 /**
@@ -46,7 +46,7 @@
4646 *
4747 * @param ptrConfig 設定構造体
4848 */
49- clsInterface(const boost::shared_ptr<stWSGIAppConfig> & ptrConfig);
49+ clsInterface(const std::tr1::shared_ptr<stWSGIAppConfig> & ptrConfig);
5050
5151 /**
5252 * デストラクタ.
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsRoot.cpp
--- a/WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsRoot.cpp Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsRoot.cpp Sat Apr 16 19:51:44 2011 +0900
@@ -18,7 +18,7 @@
1818 using WSGIHttpFilter::Config::WSGIAppConfig::clsInterface;
1919
2020 clsRoot::clsRoot(void)
21-: clsInterface(boost::shared_ptr<clsInterface::stWSGIAppConfig>(new clsInterface::stWSGIAppConfig()))
21+: clsInterface(std::tr1::shared_ptr<clsInterface::stWSGIAppConfig>(new clsInterface::stWSGIAppConfig()))
2222 {
2323 }
2424
@@ -26,7 +26,7 @@
2626 {
2727 }
2828
29-boost::shared_ptr<clsInterface::stWSGIAppConfig> clsRoot::getConfig(void)
29+std::tr1::shared_ptr<clsInterface::stWSGIAppConfig> clsRoot::getConfig(void)
3030 {
3131 return this->m_ptrConfig;
3232 }
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsRoot.h
--- a/WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsRoot.h Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsRoot.h Sat Apr 16 19:51:44 2011 +0900
@@ -37,7 +37,7 @@
3737 /**
3838 * 設定値取得.
3939 */
40- virtual boost::shared_ptr<stWSGIAppConfig> getConfig(void);
40+ virtual std::tr1::shared_ptr<stWSGIAppConfig> getConfig(void);
4141
4242 // -- Start UOC(User Own Coding) Interfaces --
4343 public:
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsWSGIAppConfig.cpp
--- a/WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsWSGIAppConfig.cpp Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsWSGIAppConfig.cpp Sat Apr 16 19:51:44 2011 +0900
@@ -15,7 +15,7 @@
1515
1616 using WSGIHttpFilter::Config::WSGIAppConfig::clsWSGIAppConfig;
1717
18-clsWSGIAppConfig::clsWSGIAppConfig(const boost::shared_ptr<stWSGIAppConfig> & ptrConfig)
18+clsWSGIAppConfig::clsWSGIAppConfig(const std::tr1::shared_ptr<stWSGIAppConfig> & ptrConfig)
1919 : clsInterface(ptrConfig)
2020 {
2121 }
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsWSGIAppConfig.h
--- a/WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsWSGIAppConfig.h Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/Config/WSGIAppConfig/clsWSGIAppConfig.h Sat Apr 16 19:51:44 2011 +0900
@@ -29,7 +29,7 @@
2929 *
3030 * @param ptrConfig 設定構造体
3131 */
32- clsWSGIAppConfig(const boost::shared_ptr<stWSGIAppConfig> & ptrConfig);
32+ clsWSGIAppConfig(const std::tr1::shared_ptr<stWSGIAppConfig> & ptrConfig);
3333
3434 /**
3535 * デストラクタ.
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/Config/clsXmlElementParser.cpp
--- a/WSGIHttpFilter/WSGIHttpFilter/Config/clsXmlElementParser.cpp Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/Config/clsXmlElementParser.cpp Sat Apr 16 19:51:44 2011 +0900
@@ -126,7 +126,7 @@
126126 void clsXmlElementParser::addElementHandler(const clsXmlElementParser * ptrHandler,
127127 unsigned int intSequenceTerms, unsigned int intSequenceForward, signed int intCount)
128128 {
129- boost::shared_ptr<clsXmlElementParser> spHandler(const_cast<clsXmlElementParser *>(ptrHandler));
129+ std::tr1::shared_ptr<clsXmlElementParser> spHandler(const_cast<clsXmlElementParser *>(ptrHandler));
130130 dic_elements::value_type infoHandler(spHandler->getElementName(), stElementHandler());
131131
132132 // 登録情報の設定
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/Config/clsXmlElementParser.h
--- a/WSGIHttpFilter/WSGIHttpFilter/Config/clsXmlElementParser.h Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/Config/clsXmlElementParser.h Sat Apr 16 19:51:44 2011 +0900
@@ -37,7 +37,7 @@
3737 signed int intCount;
3838
3939 /** エレメントパーサー */
40- boost::shared_ptr<clsXmlElementParser> ptrElementParser;
40+ std::tr1::shared_ptr<clsXmlElementParser> ptrElementParser;
4141
4242 };
4343
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/Definition/WSGIHttpFilterDefine.h
--- a/WSGIHttpFilter/WSGIHttpFilter/Definition/WSGIHttpFilterDefine.h Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/Definition/WSGIHttpFilterDefine.h Sat Apr 16 19:51:44 2011 +0900
@@ -22,7 +22,7 @@
2222 // イベントログ名
2323 static const wchar_t EventLogName[] = L"WSGIHttpFilter";
2424 // ログファイル名
25- static const wchar_t LogFileName[] = L"WSGIHttpFilter_log.txt";
25+ static const wchar_t LogFilePrefix[] = L"WSGIHttpFilterLog_";
2626
2727 // Python のモジュールパッケージ名
2828 static const char PythonPackageName[] = "WSGIHttpFilter";
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/ISAPI/clsExtensionSession.cpp
--- a/WSGIHttpFilter/WSGIHttpFilter/ISAPI/clsExtensionSession.cpp Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/ISAPI/clsExtensionSession.cpp Sat Apr 16 19:51:44 2011 +0900
@@ -22,11 +22,11 @@
2222 {
2323 }
2424
25-boost::shared_ptr<WSGIHttpFilter::Config::WSGIAppConfig::clsRoot> clsExtensionSession::loadWSGIAppConfig(void)
25+std::tr1::shared_ptr<WSGIHttpFilter::Config::WSGIAppConfig::clsRoot> clsExtensionSession::loadWSGIAppConfig(void)
2626 {
2727 using namespace boost::filesystem;
2828
29- boost::shared_ptr<Config::WSGIAppConfig::clsRoot> configResult;
29+ std::tr1::shared_ptr<Config::WSGIAppConfig::clsRoot> configResult;
3030 path pathDirSearch(this->m_ptrControlBlock->lpszPathTranslated);
3131 path pathWSGIAppConfig("");
3232 bool bolFind = false;
@@ -60,11 +60,11 @@
6060 return configResult;
6161 }
6262
63-boost::shared_ptr<WSGIHttpFilter::Config::WSGIAppConfig::clsRoot> clsExtensionSession::loadWSGIAppConfig(const boost::filesystem::path & pathWSGIAppConfig)
63+std::tr1::shared_ptr<WSGIHttpFilter::Config::WSGIAppConfig::clsRoot> clsExtensionSession::loadWSGIAppConfig(const boost::filesystem::path & pathWSGIAppConfig)
6464 {
6565 CComPtr<IXmlReader> pXmlReader;
6666 CComPtr<IStream> pStreamXml;
67- boost::shared_ptr<Config::WSGIAppConfig::clsRoot> ptrAppConfig(new Config::WSGIAppConfig::clsRoot());
67+ std::tr1::shared_ptr<Config::WSGIAppConfig::clsRoot> ptrAppConfig(new Config::WSGIAppConfig::clsRoot());
6868
6969 // XMLReaderの作成
7070 CreateXmlReader(IID_IXmlReader, reinterpret_cast<void **>(&pXmlReader), nullptr);
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/ISAPI/clsExtensionSession.h
--- a/WSGIHttpFilter/WSGIHttpFilter/ISAPI/clsExtensionSession.h Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/ISAPI/clsExtensionSession.h Sat Apr 16 19:51:44 2011 +0900
@@ -40,7 +40,7 @@
4040 stdext::hash_map<std::string, std::string> m_mapServerVariable;
4141
4242 /** 要求データ */
43- boost::shared_array<unsigned char> m_ptrBodyData;
43+ std::tr1::shared_ptr<unsigned char> m_ptrBodyData;
4444
4545 protected:
4646 /**
@@ -77,7 +77,7 @@
7777
7878 std::string getContentType(void);
7979
80- boost::shared_array<unsigned char> getBodyData(void);
80+ std::tr1::shared_ptr<unsigned char> getBodyData(void);
8181
8282 protected:
8383 std::string getServerVariableProc(const std::string & strName);
@@ -104,10 +104,10 @@
104104 std::string m_strStatus;
105105
106106 /** HTTPヘッダー */
107- stdext::hash_map<std::string, std::string> m_mapHeaders;
107+ stdext::hash_map<std::string, std::string> m_mapHeaders;
108108
109109 /** 応答データ */
110- std::deque<boost::shared_array<unsigned char> > m_queueBodyData;
110+ std::deque<std::tr1::shared_ptr<unsigned char> > m_queueBodyData;
111111
112112 protected:
113113 /**
@@ -153,7 +153,7 @@
153153 *
154154 * @param bytesData 本体データ
155155 */
156- virtual void writeBodyData(const boost::shared_array<unsigned char> & bytesData);
156+ virtual void writeBodyData(const std::tr1::shared_ptr<unsigned char> & bytesData);
157157
158158 /**
159159 * クリア.
@@ -210,7 +210,7 @@
210210 *
211211 * @return アプリケーション設定オブジェクト(無い場合は null)
212212 */
213- boost::shared_ptr<Config::WSGIAppConfig::clsRoot> loadWSGIAppConfig(void);
213+ std::tr1::shared_ptr<Config::WSGIAppConfig::clsRoot> loadWSGIAppConfig(void);
214214
215215 /**
216216 * ログ出力.
@@ -230,7 +230,7 @@
230230 * @param pathWSGIAppConfig WSGI アプリケーション設定ファイルへのパス
231231 * @return アプリケーション設定オブジェクト
232232 */
233- boost::shared_ptr<Config::WSGIAppConfig::clsRoot> loadWSGIAppConfig(const boost::filesystem::path & pathWSGIAppConfig);
233+ std::tr1::shared_ptr<Config::WSGIAppConfig::clsRoot> loadWSGIAppConfig(const boost::filesystem::path & pathWSGIAppConfig);
234234
235235 };
236236
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/ISAPI/clsRequest.cpp
--- a/WSGIHttpFilter/WSGIHttpFilter/ISAPI/clsRequest.cpp Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/ISAPI/clsRequest.cpp Sat Apr 16 19:51:44 2011 +0900
@@ -24,7 +24,7 @@
2424 size_t sizeAvailable = this->m_ptrSession->m_ptrControlBlock->cbAvailable;
2525
2626 // バッファの取得
27- this->m_ptrBodyData = boost::shared_array<unsigned char>(new unsigned char[sizeTotalLength]);
27+ this->m_ptrBodyData = std::tr1::shared_ptr<unsigned char>(new unsigned char[sizeTotalLength]);
2828 // データコピー
2929 memcpy_s(this->m_ptrBodyData.get(), sizeTotalLength, this->m_ptrSession->m_ptrControlBlock->lpbData, sizeAvailable);
3030
@@ -64,7 +64,7 @@
6464 {
6565 std::string strResult;
6666 DWORD dwBufSize = 256;
67- boost::shared_array<char> pchrBuffer(new char[dwBufSize]);
67+ std::tr1::shared_ptr<char> pchrBuffer(new char[dwBufSize]);
6868
6969 while (true) {
7070 if (this->m_ptrSession->m_ptrControlBlock->GetServerVariable(this->m_ptrSession->m_ptrControlBlock->ConnID,
@@ -79,7 +79,7 @@
7979 {
8080 case ERROR_INSUFFICIENT_BUFFER:
8181 // バッファ不足
82- pchrBuffer = boost::shared_array<char>(new char[dwBufSize]);
82+ pchrBuffer = std::tr1::shared_ptr<char>(new char[dwBufSize]);
8383 break;
8484 case ERROR_INVALID_INDEX:
8585 case ERROR_NO_DATA:
@@ -115,7 +115,7 @@
115115 return std::string(this->m_ptrSession->m_ptrControlBlock->lpszContentType);
116116 }
117117
118-boost::shared_array<unsigned char> clsExtensionSession::clsRequest::getBodyData(void)
118+std::tr1::shared_ptr<unsigned char> clsExtensionSession::clsRequest::getBodyData(void)
119119 {
120120 return this->m_ptrBodyData;
121121 }
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/ISAPI/clsResponse.cpp
--- a/WSGIHttpFilter/WSGIHttpFilter/ISAPI/clsResponse.cpp Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/ISAPI/clsResponse.cpp Sat Apr 16 19:51:44 2011 +0900
@@ -49,7 +49,7 @@
4949 this->m_mapHeaders.insert(std::pair<std::string, std::string>(strName, strValue));
5050 }
5151
52-void clsExtensionSession::clsResponse::writeBodyData(const boost::shared_array<unsigned char> & bytesData)
52+void clsExtensionSession::clsResponse::writeBodyData(const std::tr1::shared_ptr<unsigned char> & bytesData)
5353 {
5454 this->checkSendFlag();
5555
@@ -101,7 +101,7 @@
101101 // 本体データの送信
102102 while (this->m_queueBodyData.size() > 0) {
103103 // 取り出す
104- boost::shared_array<unsigned char> bytes = this->m_queueBodyData.front();
104+ std::tr1::shared_ptr<unsigned char> bytes = this->m_queueBodyData.front();
105105
106106 // 長さ
107107 DWORD dwBytes = sizeof(bytes.get());
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/Python/ExceptionHandle.cpp
--- a/WSGIHttpFilter/WSGIHttpFilter/Python/ExceptionHandle.cpp Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/Python/ExceptionHandle.cpp Sat Apr 16 19:51:44 2011 +0900
@@ -87,7 +87,7 @@
8787
8888 // 確保
8989 intLength++;
90- boost::scoped_array<char> pchrMessage(new char[intLength]);
90+ std::tr1::shared_ptr<char> pchrMessage(new char[intLength]);
9191
9292 // 編集
9393 va_start(args, format);
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/WSGIHttpFilterPackage.cpp
--- a/WSGIHttpFilter/WSGIHttpFilter/WSGIHttpFilterPackage.cpp Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/WSGIHttpFilterPackage.cpp Sat Apr 16 19:51:44 2011 +0900
@@ -21,7 +21,7 @@
2121 using namespace WSGIHttpFilter::Python;
2222
2323 try {
24- WSGIHttpFilter::Logger.outputLog(WSGIHttpFilter::clsLogger::DebugLevel, L"[START] initWSGIHttpFilter called...");
24+ WSGIHttpFilter::Logger.outputLog(WSGIHttpFilter::clsLogger::DebugLevel, L"[VALUE] initWSGIHttpFilter thread: %x", ::GetCurrentThreadId());
2525
2626 PyAPICall(PyType_Ready(&WSGIHttpFilter::typeWSGIServer));
2727 PyAPICall(PyType_Ready(&WSGIHttpFilter::typeWSGIInputStream));
@@ -36,8 +36,6 @@
3636 PyAPICall(PyModule_AddObject(module.get(), "WSGIServer", (PyObject *)&WSGIHttpFilter::typeWSGIServer));
3737 PyAPICall(PyModule_AddObject(module.get(), "WSGIInputStream", (PyObject *)&WSGIHttpFilter::typeWSGIInputStream));
3838 PyAPICall(PyModule_AddObject(module.get(), "WSGIErrorStream", (PyObject *)&WSGIHttpFilter::typeWSGIErrorStream));
39-
40- WSGIHttpFilter::Logger.outputLog(WSGIHttpFilter::clsLogger::DebugLevel, L"[RETURN] initWSGIHttpFilter completed.");
4139 }
4240 catch (WSGIHttpFilter::Python::ExceptionHandle e)
4341 {
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/clsCommonUtility.cpp
--- a/WSGIHttpFilter/WSGIHttpFilter/clsCommonUtility.cpp Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/clsCommonUtility.cpp Sat Apr 16 19:51:44 2011 +0900
@@ -20,7 +20,7 @@
2020 // TODO: エラー処理
2121 mbstowcs_s(&sizeBuffer, nullptr, 0, str.c_str(), str.size());
2222
23- boost::scoped_array<wchar_t> wchrBuffer(new wchar_t[sizeBuffer]);
23+ std::tr1::shared_ptr<wchar_t> wchrBuffer(new wchar_t[sizeBuffer]);
2424
2525 // 実変換処理
2626 mbstowcs_s(nullptr, wchrBuffer.get(), sizeBuffer, str.c_str(), str.size());
@@ -35,7 +35,7 @@
3535 // 変換後サイズの取得
3636 wcstombs_s(&sizeBuffer, nullptr, 0, wstr.c_str(), wstr.size());
3737
38- boost::scoped_array<char> chrBuffer(new char[sizeBuffer]);
38+ std::tr1::shared_ptr<char> chrBuffer(new char[sizeBuffer]);
3939
4040 // 実変換処理
4141 wcstombs_s(nullptr, chrBuffer.get(), sizeBuffer, wstr.c_str(), wstr.size());
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/clsLogger.cpp
--- a/WSGIHttpFilter/WSGIHttpFilter/clsLogger.cpp Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/clsLogger.cpp Sat Apr 16 19:51:44 2011 +0900
@@ -22,21 +22,24 @@
2222 // イベントログを開く
2323 this->m_hndEventLog = ::RegisterEventSource(nullptr, Definition::EventLogName);
2424
25- // モジュールのファイル名取得
26- wchar_t wchrModuleFile[1024];
27- unsigned long lngModuleFileLength;
28-
29- lngModuleFileLength = ::GetModuleFileName(nullptr, wchrModuleFile, sizeof(wchrModuleFile) / sizeof(wchar_t));
25+ // ログファイル名生成
26+ wchar_t wchrTempDirectory[MAX_PATH];
27+ wchar_t wchrTempFile[MAX_PATH];
28+ unsigned long dwResult;
3029
31- if (lngModuleFileLength > 0) {
32- // ディレクトリ名とログファイル名を連結
33- wpath pathLogFile = wpath(std::wstring(wchrModuleFile, lngModuleFileLength)).parent_path() / Definition::LogFileName;
30+ // テンポラリディレクトリの取得
31+ dwResult = ::GetTempPath(MAX_PATH, wchrTempDirectory);
32+ if (dwResult > 0 && dwResult <= MAX_PATH) {
33+ // テンポラリファイル名生成
34+ dwResult = ::GetTempFileName(wchrTempDirectory, Definition::LogFilePrefix, 0, wchrTempFile);
3435
35- // ロケールの設定
36- this->m_streamLogFile.imbue(std::locale("japanese_jpn", LC_ALL));
36+ if (dwResult != 0) {
37+ // ロケールの設定
38+ this->m_streamLogFile.imbue(std::locale("japanese_jpn", LC_ALL));
3739
38- // ファイルのオープン
39- this->m_streamLogFile.open(pathLogFile.string().c_str(), std::ios_base::out | std::ios_base::app);
40+ // ファイルのオープン
41+ this->m_streamLogFile.open(wchrTempFile, std::ios_base::out | std::ios_base::app);
42+ }
4043 }
4144 }
4245
@@ -66,7 +69,7 @@
6669 int length = _vscwprintf(message.c_str(), args) + 1;
6770
6871 // 出力バッファの作成
69- boost::scoped_array<wchar_t> pchMessage(new wchar_t[length]);
72+ std::tr1::shared_ptr<wchar_t> pchMessage(new wchar_t[length]);
7073 memset(pchMessage.get(), 0, sizeof(wchar_t) * length);
7174
7275 if (length > 0) {
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/clsWSGIErrorStream.cpp
--- a/WSGIHttpFilter/WSGIHttpFilter/clsWSGIErrorStream.cpp Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/clsWSGIErrorStream.cpp Sat Apr 16 19:51:44 2011 +0900
@@ -22,7 +22,7 @@
2222 {
2323 }
2424
25-void clsWSGIErrorStream::setSession(boost::shared_ptr<ISAPI::clsExtensionSession> & ptrSession)
25+void clsWSGIErrorStream::setSession(std::tr1::shared_ptr<ISAPI::clsExtensionSession> & ptrSession)
2626 {
2727 this->m_ptrSession = ptrSession;
2828 }
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/clsWSGIErrorStream.h
--- a/WSGIHttpFilter/WSGIHttpFilter/clsWSGIErrorStream.h Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/clsWSGIErrorStream.h Sat Apr 16 19:51:44 2011 +0900
@@ -19,7 +19,7 @@
1919 struct clsWSGIErrorStream : public Python::clsPythonClass<clsWSGIErrorStream>
2020 {
2121 protected:
22- boost::shared_ptr<clsExtensionSession> m_ptrSession;
22+ std::tr1::shared_ptr<clsExtensionSession> m_ptrSession;
2323
2424 public:
2525 /**
@@ -27,7 +27,7 @@
2727 */
2828 clsWSGIErrorStream(PyObject * args, PyObject * keywords);
2929
30- void setSession(boost::shared_ptr<clsExtensionSession> & ptrSession);
30+ void setSession(std::tr1::shared_ptr<clsExtensionSession> & ptrSession);
3131
3232 PyClsFuncArgsDef(write);
3333 PyObject * write(const std::string & message);
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/clsWSGIInputStream.cpp
--- a/WSGIHttpFilter/WSGIHttpFilter/clsWSGIInputStream.cpp Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/clsWSGIInputStream.cpp Sat Apr 16 19:51:44 2011 +0900
@@ -22,7 +22,7 @@
2222 {
2323 }
2424
25-void clsWSGIInputStream::setSession(boost::shared_ptr<ISAPI::clsExtensionSession> & ptrSession)
25+void clsWSGIInputStream::setSession(std::tr1::shared_ptr<ISAPI::clsExtensionSession> & ptrSession)
2626 {
2727 // リクエストデータの取得
2828 this->m_ptrBuffer = ptrSession->request.getBodyData();
@@ -60,10 +60,10 @@
6060 else
6161 sizeAvailable = size;
6262
63- boost::scoped_array<char> ptrBuffer(new char[sizeAvailable]);
63+ std::tr1::shared_ptr<char> ptrBuffer(new char[sizeAvailable]);
6464
6565 // 領域をコピー
66- memcpy_s(ptrBuffer.get(), sizeAvailable, &this->m_ptrBuffer[this->m_intPosition], sizeAvailable);
66+ memcpy_s(ptrBuffer.get(), sizeAvailable, &this->m_ptrBuffer.get()[this->m_intPosition], sizeAvailable);
6767 // カーソルの移動
6868 this->m_intPosition += sizeAvailable;
6969
@@ -98,7 +98,7 @@
9898 while (this->m_intPosition < this->m_intLength && (size < 0 || intBytesCount < size))
9999 {
100100 // 1文字取り出す
101- chrCurrent = this->m_ptrBuffer[this->m_intPosition];
101+ chrCurrent = this->m_ptrBuffer.get()[this->m_intPosition];
102102 // カーソルのインクリメント
103103 this->m_intPosition++;
104104 intBytesCount++;
@@ -146,7 +146,7 @@
146146 while (this->m_intPosition < this->m_intLength && (sizehint < 0 || intBytesCount < sizehint))
147147 {
148148 // 1文字取り出す
149- chrCurrent = this->m_ptrBuffer[this->m_intPosition];
149+ chrCurrent = this->m_ptrBuffer.get()[this->m_intPosition];
150150 // カーソルのインクリメント
151151 this->m_intPosition++;
152152 intBytesCount++;
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/clsWSGIInputStream.h
--- a/WSGIHttpFilter/WSGIHttpFilter/clsWSGIInputStream.h Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/clsWSGIInputStream.h Sat Apr 16 19:51:44 2011 +0900
@@ -20,7 +20,7 @@
2020 {
2121 protected:
2222 /** バッファ */
23- boost::shared_array<unsigned char> m_ptrBuffer;
23+ std::tr1::shared_ptr<unsigned char> m_ptrBuffer;
2424
2525 /** 読み込みカーソル */
2626 unsigned int m_intPosition;
@@ -34,7 +34,7 @@
3434 */
3535 clsWSGIInputStream(PyObject * args, PyObject * keywords);
3636
37- void setSession(boost::shared_ptr<clsExtensionSession> & ptrSession);
37+ void setSession(std::tr1::shared_ptr<clsExtensionSession> & ptrSession);
3838
3939 PyClsFuncArgsDef(read);
4040 PyObject * read(int size);
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/clsWSGIServer.cpp
--- a/WSGIHttpFilter/WSGIHttpFilter/clsWSGIServer.cpp Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/clsWSGIServer.cpp Sat Apr 16 19:51:44 2011 +0900
@@ -26,7 +26,7 @@
2626 this->m_bolSetHeaders = false;
2727 }
2828
29-void clsWSGIServer::SetupEnviroment(const boost::shared_ptr<ISAPI::clsExtensionSession> & ptrSession)
29+void clsWSGIServer::SetupEnviroment(const std::tr1::shared_ptr<ISAPI::clsExtensionSession> & ptrSession)
3030 {
3131 using namespace WSGIHttpFilter::Python;
3232
@@ -88,7 +88,7 @@
8888 this->m_dicEnviron.setItem(string("SERVER_PROTOCOL"), string(this->m_ptrSession->request.getServerVariable("SERVER_PROTOCOL")));
8989 }
9090
91-void clsWSGIServer::InvokeApplication(const boost::shared_ptr<Config::WSGIAppConfig::clsInterface::stWSGIAppConfig> & ptrWSGIAppConfig)
91+void clsWSGIServer::InvokeApplication(const std::tr1::shared_ptr<Config::WSGIAppConfig::clsInterface::stWSGIAppConfig> & ptrWSGIAppConfig)
9292 {
9393 using namespace WSGIHttpFilter::Python;
9494
@@ -223,7 +223,7 @@
223223 Python::PyAPICall(PyArg_ParseTuple(args, "s#", &pchData, &intLength));
224224
225225 // バッファの確保
226- boost::shared_array<unsigned char> byteData(new unsigned char[intLength]);
226+ std::tr1::shared_ptr<unsigned char> byteData(new unsigned char[intLength]);
227227 // コピー
228228 memcpy_s(byteData.get(), intLength, pchData, intLength);
229229
@@ -236,7 +236,7 @@
236236 }
237237 }
238238
239-PyObject * clsWSGIServer::write(boost::shared_array<unsigned char> & data)
239+PyObject * clsWSGIServer::write(std::tr1::shared_ptr<unsigned char> & data)
240240 {
241241
242242 // データを書き出すだけ
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/WSGIHttpFilter/clsWSGIServer.h
--- a/WSGIHttpFilter/WSGIHttpFilter/clsWSGIServer.h Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/WSGIHttpFilter/clsWSGIServer.h Sat Apr 16 19:51:44 2011 +0900
@@ -30,7 +30,7 @@
3030
3131 protected:
3232 /** リクエストオブジェクト */
33- boost::shared_ptr<clsExtensionSession> m_ptrSession;
33+ std::tr1::shared_ptr<clsExtensionSession> m_ptrSession;
3434
3535 /** 環境変数辞書オブジェクト */
3636 Python::dictionary m_dicEnviron;
@@ -52,14 +52,14 @@
5252 *
5353 * @param ptrSession セッション
5454 */
55- void SetupEnviroment(const boost::shared_ptr<clsExtensionSession> & ptrSession);
55+ void SetupEnviroment(const std::tr1::shared_ptr<clsExtensionSession> & ptrSession);
5656
5757 /**
5858 * アプリケーション起動.
5959 *
6060 * @param ptrWSGIAppConfig アプリケーション設定情報
6161 */
62- void InvokeApplication(const boost::shared_ptr<Config::WSGIAppConfig::clsInterface::stWSGIAppConfig> & ptrWSGIAppConfig);
62+ void InvokeApplication(const std::tr1::shared_ptr<Config::WSGIAppConfig::clsInterface::stWSGIAppConfig> & ptrWSGIAppConfig);
6363
6464 PyClsFuncArgsDef(start_response);
6565
@@ -83,7 +83,7 @@
8383 *
8484 * @param data 出力値
8585 */
86- PyObject * write(boost::shared_array<unsigned char> & data);
86+ PyObject * write(std::tr1::shared_ptr<unsigned char> & data);
8787
8888 /**
8989 * 環境変数辞書取得.
diff -r 32b48aafaeca -r 0afb89bd731a WSGIHttpFilter/stdafx.h
--- a/WSGIHttpFilter/stdafx.h Sun Jul 11 17:53:21 2010 +0900
+++ b/WSGIHttpFilter/stdafx.h Sat Apr 16 19:51:44 2011 +0900
@@ -26,9 +26,6 @@
2626
2727 #define WIN32_LEAN_AND_MEAN
2828
29-// Python
30-#include <python.h>
31-
3229 // Standard C Libraries
3330 #include <stdio.h>
3431 #include <stdlib.h>
@@ -46,11 +43,16 @@
4643 #include <fstream>
4744 #include <iomanip>
4845
46+#include <memory>
47+
48+// Active Template Libraries
49+#include <atlbase.h>
50+
4951 // Windows Headers
5052 #include <windows.h>
5153
52-// Active Template Libraries
53-#include <atlbase.h>
54+// Python
55+#include <python.h>
5456
5557 // XmlLite
5658 #include <xmllite.h>
@@ -63,10 +65,6 @@
6365 #include "WSGIHttpFilter/Definition/WSGIHttpFilterDefine.h"
6466
6567 // boost C++ Libraries
66-#include <boost/scoped_ptr.hpp>
67-#include <boost/scoped_array.hpp>
68-#include <boost/shared_ptr.hpp>
69-#include <boost/shared_array.hpp>
7068 #include <boost/filesystem.hpp>
7169
7270 // logger
Show on old repository browser