blob: a2a61b351404190bf95c1c7575af49f8257317e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
// @file wxNamingViewer.cpp
// A wxWindows-based CORBA naming viewer.
// Based on NamingViewer Version 1.0 by Chris Hafey (chris@stentorsoft.com)
//
// @author: Charlie Frasch (cfrasch@atdesk.com)
//
// $Id$
#include "ace/Init_ACE.h"
#include "pch.h"
#include "wx/resource.h"
#include "wxNamingViewerFrame.h"
#include "wxNamingViewer.wxr"
#if defined(wxUSE_RESOURCES) && (wxUSE_RESOURCES == 1)
#include "wxNamingViewer.wxr"
#endif // defined(wxUSE_RESOURCES)
// Stuff for the C++Builder IDE
#define USEUNIT(x)
#define USERC(x)
#define USEFILE(x)
USEFILE("Readme");
USEUNIT("wxNamingViewerFrame.cpp");
USEUNIT("wxNamingTree.cpp");
USEUNIT("wxNamingObject.cpp");
USEFILE("wxNamingViewer.wxr");
USEUNIT("wxSelectNSDialog.cpp");
USEUNIT("wxBindNewContext.cpp");
USEUNIT("wxAddNameServerDlg.cpp");
USEUNIT("wxBindDialog.cpp");
USEUNIT("wxViewIORDialog.cpp");
USERC("wxNamingViewer.rc");
//---------------------------------------------------------------------------
class WxNamingViewer:
public wxApp
{
public:
virtual bool OnInit();
virtual int OnExit();
};
IMPLEMENT_APP(WxNamingViewer)
// Need this to keep C++Builder 4 happy
#ifdef __BORLANDC__
extern WINAPI WinMain( HINSTANCE, HINSTANCE, LPSTR, int);
#endif
int WxNamingViewer::OnExit()
{
ACE::fini();
return 0;
}
bool WxNamingViewer::OnInit()
{
ACE::init();
CORBA::ORB_var orb = CORBA::ORB_init(
argc,
argv);
#if defined(wxUSE_RESOURCES) && (wxUSE_RESOURCES == 1)
wxResourceParseData( bindObject);
wxResourceParseData( selectNS);
wxResourceParseData( addNameServer);
wxResourceParseData( bindNewContext);
wxResourceParseData( viewIOR);
#endif // defined(wxUSE_WX_RESOURCES)
WxNamingViewerFrame* frame = new WxNamingViewerFrame(
"wxNamingViewer",
wxDefaultPosition,
wxSize( 248, 198),
orb.in ());
frame->Show( TRUE);
return TRUE;
}
|