Skip to content

Commit

Permalink
C++側整理。Issue #43 作業中
Browse files Browse the repository at this point in the history
------ auto generated message by Theolizer
TheolizerDriver  : 6c53ef20c964c17f46239caa662fb77a
TheolizerLibrary : 2040eb742423f16db70cd2d7054ec745
Library's Header : d41d8cd98f00b204e9800998ecf8427e
------ end of message
  • Loading branch information
yossi-tahara committed Nov 20, 2017
1 parent 62fed37 commit b766bd9
Show file tree
Hide file tree
Showing 8 changed files with 607 additions and 481 deletions.
5 changes: 2 additions & 3 deletions source/cs_integration_test/cpp_server/cpp_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include <sstream>

// 固有ヘッダ
#define DLL_EXPORT
#include "cpp_server.h"
#include "exchange.h"
#include "cpp_server.cpp.theolizer.hpp"
Expand All @@ -63,7 +62,7 @@ int main()
/// theolizer::JsonOSerializer<> jos(std::cout); // シリアライザを生成
}
{
/*exchange::*/func0Theolizer afunc0Theolizer;
exchange::func0Theolizer afunc0Theolizer;
afunc0Theolizer.mThis.mIntMain=123;
afunc0Theolizer.miUserClassSub.mUIntSub=456;
afunc0Theolizer.miUserClassSub.mStringSub="test";
Expand All @@ -90,7 +89,7 @@ int main()
getline(aRequestStream, aLine);
aResponseStream << aLine << std::endl;
#else
/*exchange::*/func0Theolizer afunc0Theolizer;
exchange::func0Theolizer afunc0Theolizer;
THEOLIZER_PROCESS(jis, afunc0Theolizer);
THEOLIZER_PROCESS(debug, afunc0Theolizer);
THEOLIZER_PROCESS(jos, afunc0Theolizer);
Expand Down
1 change: 0 additions & 1 deletion source/cs_integration_test/cpp_server/exchange.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#include <string>

// 固有ヘッダ
#define DLL_EXPORT
#include "exchange.h"
#include "exchange.cpp.theolizer.hpp"

Expand Down
6 changes: 3 additions & 3 deletions source/cs_integration_test/cpp_server/exchange.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
// データ処理用クラス群
// ***************************************************************************

//namespace exchange
//{
namespace exchange
{

class UserClassSub
{
Expand Down Expand Up @@ -78,6 +78,6 @@ class func0Theolizer
THEOLIZER_INTRUSIVE_ORDER(CS, (func0Theolizer), 1);
};

//} // namespace exchange
} // namespace exchange

#endif // THEOLIZER_INTERNAL_TYPE_H
13 changes: 5 additions & 8 deletions source/cs_integration_test/theolizer/integrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@
*/
//############################################################################

#define THEOLIZER_NO_ANALYZE

#define NOMINMAX
#include <windows.h>

#define DLL_EXPORT
#include "integrator.h"

// ***************************************************************************
// C++DLL用連携処理統括クラス
// DLLの場合、通常1つしかインスタンス不要なのでシングルトンとする
// ***************************************************************************
//############################################################################
// C# I/F
//############################################################################

//----------------------------------------------------------------------------
// スレッド起動処理(main()呼び出し)
Expand All @@ -48,9 +48,6 @@ extern "C" int main();
void CppInitialize(theolizer::Streams* oStreams)
{
auto& aDllIntegrator = theolizer::DllIntegrator::getInstance();
DEBUG_PRINT("mRequest = ", aDllIntegrator.getStreams()->mRequest);
DEBUG_PRINT("mResponse = ", aDllIntegrator.getStreams()->mResponse);
DEBUG_PRINT("mNotify = ", aDllIntegrator.getStreams()->mNotify);
*oStreams = *aDllIntegrator.getStreams();

aDllIntegrator.startThread(main);
Expand Down
19 changes: 9 additions & 10 deletions source/cs_integration_test/theolizer/integrator.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,32 +38,31 @@
#include "memory_stream.h"

//############################################################################
// C# I/F
// C++内部処理
//############################################################################

// ***************************************************************************
// Friend指定用
// ***************************************************************************

namespace theolizer
{
struct Streams;
}

extern "C"
{
THEOLIZER_EXPORT_DLL void CppInitialize(theolizer::Streams* oStreams);
THEOLIZER_INTERNAL_EXPORT void CppInitialize(theolizer::Streams* oStreams);
}
extern "C" int main();

//############################################################################
// C++内部処理
//############################################################################

namespace theolizer
{

// ***************************************************************************
// C++DLL用連携処理統括クラス
// DLLの場合、通常1つしかインスタンス不要なのでシングルトンとする
// ***************************************************************************

namespace theolizer
{

//----------------------------------------------------------------------------
// C#への接続情報
//----------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit b766bd9

Please sign in to comment.