diff options
Diffstat (limited to 'examples/Log_Msg')
24 files changed, 0 insertions, 1770 deletions
diff --git a/examples/Log_Msg/Callback.dsp b/examples/Log_Msg/Callback.dsp deleted file mode 100644 index cb0dff3b8cf..00000000000 --- a/examples/Log_Msg/Callback.dsp +++ /dev/null @@ -1,63 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Callback" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Callback - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "Callback.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "Callback.mak" CFG="Callback - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Callback - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\ace"
-# Begin Target
-
-# Name "Callback - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=test_callback.cpp
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/examples/Log_Msg/Log_Msg.dsp b/examples/Log_Msg/Log_Msg.dsp deleted file mode 100644 index 62665a36aef..00000000000 --- a/examples/Log_Msg/Log_Msg.dsp +++ /dev/null @@ -1,63 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Log_Msg" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Log_Msg - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "Log_Msg.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "Log_Msg.mak" CFG="Log_Msg - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Log_Msg - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\Debug"
-# PROP BASE Intermediate_Dir ".\Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /out:".\test_log_msg.exe" /libpath:"..\..\ace"
-# Begin Target
-
-# Name "Log_Msg - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\test_log_msg.cpp
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFC.cpp b/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFC.cpp deleted file mode 100644 index f25141b48a7..00000000000 --- a/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFC.cpp +++ /dev/null @@ -1,90 +0,0 @@ -// Log_Msg_MFC.cpp : Defines the class behaviors for the application. -// $Id$ - -#include "stdafx.h" -#include "Log_Msg_MFC.h" -#include "Log_Msg_MFCDlg.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -#include <ace/ACE.h> - -///////////////////////////////////////////////////////////////////////////// -// CLog_Msg_MFCApp - -BEGIN_MESSAGE_MAP(CLog_Msg_MFCApp, CWinApp) - //{{AFX_MSG_MAP(CLog_Msg_MFCApp) - // NOTE - the ClassWizard will add and remove mapping macros here. - // DO NOT EDIT what you see in these blocks of generated code! - //}}AFX_MSG - ON_COMMAND(ID_HELP, CWinApp::OnHelp) -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CLog_Msg_MFCApp construction - -CLog_Msg_MFCApp::CLog_Msg_MFCApp() -{ - // TODO: add construction code here, - // Place all significant initialization in InitInstance -} - -///////////////////////////////////////////////////////////////////////////// -// The one and only CLog_Msg_MFCApp object - -CLog_Msg_MFCApp theApp; - -///////////////////////////////////////////////////////////////////////////// -// CLog_Msg_MFCApp initialization - -BOOL CLog_Msg_MFCApp::InitInstance() -{ - // Standard initialization - // If you are not using these features and wish to reduce the size - // of your final executable, you should remove from the following - // the specific initialization routines you do not need. - -#ifdef _AFXDLL - Enable3dControls(); // Call this when using MFC in a shared DLL -#else - Enable3dControlsStatic(); // Call this when linking to MFC statically -#endif - - // Need to call ACE::init() before calling any functions in ACE. - // If we were writing a console based application, the ACE macros which - // re-define main() would automatically call this. However, since - // we are running inside an MFC application, we need to explicitly call this. - ACE::init(); - - // Call to set the ACE Log_Msg class here. - // From now on, whenever we use ACE_DEBUG macros, the output - // will be sent to the log() method of our MFC_Log class. - ACE_Log_Msg::instance()->msg_callback( &m_mfc_logger ); - ACE_Log_Msg::instance()->set_flags( ACE_Log_Msg::MSG_CALLBACK ); - - CLog_Msg_MFCDlg dlg; - m_pMainWnd = &dlg; - int nResponse = dlg.DoModal(); - if (nResponse == IDOK) - { - // TODO: Place code here to handle when the dialog is - // dismissed with OK - } - else if (nResponse == IDCANCEL) - { - // TODO: Place code here to handle when the dialog is - // dismissed with Cancel - } - - // Since we called ACE::init(), we need to call ACE:fini(), otherwise - // the debugger will complain about memory leaks. - ACE::fini(); - - // Since the dialog has been closed, return FALSE so that we exit the - // application, rather than start the application's message pump. - return FALSE; -} diff --git a/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFC.dsp b/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFC.dsp deleted file mode 100644 index 8d859be187a..00000000000 --- a/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFC.dsp +++ /dev/null @@ -1,124 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Log_Msg_MFC" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Application" 0x0101
-
-CFG=Log_Msg_MFC - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "Log_Msg_MFC.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "Log_Msg_MFC.mak" CFG="Log_Msg_MFC - Win32 MFC Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Log_Msg_MFC - Win32 MFC Debug" (based on "Win32 (x86) Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-# PROP BASE Use_MFC 6
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 6
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\.." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
-# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 acemfcd.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\ace"
-
-
-# Begin Target
-
-# Name "Log_Msg_MFC - Win32 MFC Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\Log_Msg_MFC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Log_Msg_MFC.rc
-# End Source File
-# Begin Source File
-
-SOURCE=.\Log_Msg_MFCDlg.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\MFC_Log.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\StdAfx.cpp
-# ADD CPP /Yc"stdafx.h"
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\Log_Msg_MFC.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Log_Msg_MFCDlg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\MFC_Log.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Resource.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\StdAfx.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=.\res\Log_Msg_MFC.ico
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\Log_Msg_MFC.rc2
-# End Source File
-# End Group
-# Begin Source File
-
-SOURCE=.\ReadMe.txt
-# End Source File
-# End Target
-# End Project
diff --git a/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFC.dsw b/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFC.dsw deleted file mode 100644 index d7193327e8a..00000000000 --- a/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFC.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "Log_Msg_MFC"=.\Log_Msg_MFC.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFC.h b/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFC.h deleted file mode 100644 index b93d09bde02..00000000000 --- a/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFC.h +++ /dev/null @@ -1,57 +0,0 @@ -// Log_Msg_MFC.h : main header file for the LOG_MSG_MFC application -// $Id$ - -#if !defined(AFX_LOG_MSG_MFC_H__03FA2C60_71EA_44F9_AC4C_2F19168B4755__INCLUDED_) -#define AFX_LOG_MSG_MFC_H__03FA2C60_71EA_44F9_AC4C_2F19168B4755__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#ifndef __AFXWIN_H__ - #error include 'stdafx.h' before including this file for PCH -#endif - -#include "resource.h" // main symbols - -// Add some includes here for our Logger -#include <ace/Log_Msg.h> -#include "MFC_Log.h" - -///////////////////////////////////////////////////////////////////////////// -// CLog_Msg_MFCApp: -// See Log_Msg_MFC.cpp for the implementation of this class -// - -class CLog_Msg_MFCApp : public CWinApp -{ -public: - CLog_Msg_MFCApp(); - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CLog_Msg_MFCApp) - public: - virtual BOOL InitInstance(); - //}}AFX_VIRTUAL - -// Implementation - - //{{AFX_MSG(CLog_Msg_MFCApp) - // NOTE - the ClassWizard will add and remove member functions here. - // DO NOT EDIT what you see in these blocks of generated code ! - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - - // MFC Log class for ACE_Log_Msg. To be used by ACE_DEBUG - MFC_Log m_mfc_logger; - -}; - - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_LOG_MSG_MFC_H__03FA2C60_71EA_44F9_AC4C_2F19168B4755__INCLUDED_) diff --git a/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFC.rc b/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFC.rc deleted file mode 100644 index 5f2f04dce74..00000000000 --- a/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFC.rc +++ /dev/null @@ -1,207 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "#define _AFX_NO_SPLITTER_RESOURCES\r\n" - "#define _AFX_NO_OLE_RESOURCES\r\n" - "#define _AFX_NO_TRACKER_RESOURCES\r\n" - "#define _AFX_NO_PROPERTY_RESOURCES\r\n" - "\r\n" - "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" - "#ifdef _WIN32\r\n" - "LANGUAGE 9, 1\r\n" - "#pragma code_page(1252)\r\n" - "#endif //_WIN32\r\n" - "#include ""res\\Log_Msg_MFC.rc2"" // non-Microsoft Visual C++ edited resources\r\n" - "#include ""afxres.rc"" // Standard components\r\n" - "#endif\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDR_MAINFRAME ICON DISCARDABLE "res\\Log_Msg_MFC.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "About Log_Msg_MFC" -FONT 8, "MS Sans Serif" -BEGIN - ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 - LTEXT "Log_Msg_MFC Version 1.0",IDC_STATIC,40,10,119,8, - SS_NOPREFIX - LTEXT "Copyright (C) 2002",IDC_STATIC,40,25,119,8 - DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP -END - -IDD_LOG_MSG_MFC_DIALOG DIALOGEX 0, 0, 320, 200 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -EXSTYLE WS_EX_APPWINDOW -CAPTION "Log_Msg_MFC" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,241,170,50,14 - PUSHBUTTON "DebugMe",IDC_BUTTON1,92,96,50,14 - LTEXT "Run this program inside the Visual Studio debugger. Press the DebugMe button and see the ACE_DEBUG messages appear in the Visual Studio debug console.", - IDC_STATIC,83,28,116,56 -END - - -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904B0" - BEGIN - VALUE "CompanyName", "\0" - VALUE "FileDescription", "Log_Msg_MFC MFC Application\0" - VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "InternalName", "Log_Msg_MFC\0" - VALUE "LegalCopyright", "Copyright (C) 2002\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "Log_Msg_MFC.EXE\0" - VALUE "ProductName", "Log_Msg_MFC Application\0" - VALUE "ProductVersion", "1, 0, 0, 1\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // !_MAC - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN - IDD_ABOUTBOX, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 228 - TOPMARGIN, 7 - BOTTOMMARGIN, 48 - END - - IDD_LOG_MSG_MFC_DIALOG, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 313 - TOPMARGIN, 7 - BOTTOMMARGIN, 193 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE DISCARDABLE -BEGIN - IDS_ABOUTBOX "&About Log_Msg_MFC..." -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// -#define _AFX_NO_SPLITTER_RESOURCES -#define _AFX_NO_OLE_RESOURCES -#define _AFX_NO_TRACKER_RESOURCES -#define _AFX_NO_PROPERTY_RESOURCES - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE 9, 1 -#pragma code_page(1252) -#endif //_WIN32 -#include "res\Log_Msg_MFC.rc2" // non-Microsoft Visual C++ edited resources -#include "afxres.rc" // Standard components -#endif - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFCDlg.cpp b/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFCDlg.cpp deleted file mode 100644 index 7d0b23d77ed..00000000000 --- a/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFCDlg.cpp +++ /dev/null @@ -1,183 +0,0 @@ -// Log_Msg_MFCDlg.cpp : implementation file -// $Id$ - -#include "stdafx.h" -#include "Log_Msg_MFC.h" -#include "Log_Msg_MFCDlg.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -#include <ace/OS.h> -#include <ace/ACE.h> - -///////////////////////////////////////////////////////////////////////////// -// CAboutDlg dialog used for App About - -class CAboutDlg : public CDialog -{ -public: - CAboutDlg(); - -// Dialog Data - //{{AFX_DATA(CAboutDlg) - enum { IDD = IDD_ABOUTBOX }; - //}}AFX_DATA - - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CAboutDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - //{{AFX_MSG(CAboutDlg) - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) -{ - //{{AFX_DATA_INIT(CAboutDlg) - //}}AFX_DATA_INIT -} - -void CAboutDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CAboutDlg) - //}}AFX_DATA_MAP -} - -BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) - //{{AFX_MSG_MAP(CAboutDlg) - // No message handlers - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CLog_Msg_MFCDlg dialog - -CLog_Msg_MFCDlg::CLog_Msg_MFCDlg(CWnd* pParent /*=NULL*/) - : CDialog(CLog_Msg_MFCDlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(CLog_Msg_MFCDlg) - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT - // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 - m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); -} - -void CLog_Msg_MFCDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CLog_Msg_MFCDlg) - // NOTE: the ClassWizard will add DDX and DDV calls here - //}}AFX_DATA_MAP -} - -BEGIN_MESSAGE_MAP(CLog_Msg_MFCDlg, CDialog) - //{{AFX_MSG_MAP(CLog_Msg_MFCDlg) - ON_WM_SYSCOMMAND() - ON_WM_PAINT() - ON_WM_QUERYDRAGICON() - ON_BN_CLICKED(IDC_BUTTON1, OnDebugButtonClicked) - ON_WM_CLOSE() - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CLog_Msg_MFCDlg message handlers - -BOOL CLog_Msg_MFCDlg::OnInitDialog() -{ - CDialog::OnInitDialog(); - - - // Add "About..." menu item to system menu. - - // IDM_ABOUTBOX must be in the system command range. - ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); - ASSERT(IDM_ABOUTBOX < 0xF000); - - CMenu* pSysMenu = GetSystemMenu(FALSE); - if (pSysMenu != NULL) - { - CString strAboutMenu; - strAboutMenu.LoadString(IDS_ABOUTBOX); - if (!strAboutMenu.IsEmpty()) - { - pSysMenu->AppendMenu(MF_SEPARATOR); - pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); - } - } - - // Set the icon for this dialog. The framework does this automatically - // when the application's main window is not a dialog - SetIcon(m_hIcon, TRUE); // Set big icon - SetIcon(m_hIcon, FALSE); // Set small icon - - // TODO: Add extra initialization here - - return TRUE; // return TRUE unless you set the focus to a control -} - -void CLog_Msg_MFCDlg::OnSysCommand(UINT nID, LPARAM lParam) -{ - if ((nID & 0xFFF0) == IDM_ABOUTBOX) - { - CAboutDlg dlgAbout; - dlgAbout.DoModal(); - } - else - { - CDialog::OnSysCommand(nID, lParam); - } -} - -// If you add a minimize button to your dialog, you will need the code below -// to draw the icon. For MFC applications using the document/view model, -// this is automatically done for you by the framework. - -void CLog_Msg_MFCDlg::OnPaint() -{ - if (IsIconic()) - { - CPaintDC dc(this); // device context for painting - - SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); - - // Center icon in client rectangle - int cxIcon = GetSystemMetrics(SM_CXICON); - int cyIcon = GetSystemMetrics(SM_CYICON); - CRect rect; - GetClientRect(&rect); - int x = (rect.Width() - cxIcon + 1) / 2; - int y = (rect.Height() - cyIcon + 1) / 2; - - // Draw the icon - dc.DrawIcon(x, y, m_hIcon); - } - else - { - CDialog::OnPaint(); - } -} - -// The system calls this to obtain the cursor to display while the user drags -// the minimized window. -HCURSOR CLog_Msg_MFCDlg::OnQueryDragIcon() -{ - return (HCURSOR) m_hIcon; -} - -void CLog_Msg_MFCDlg::OnDebugButtonClicked() -{ - ACE_DEBUG(( LM_DEBUG, "Debug message sent!\n" )); - -} - diff --git a/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFCDlg.h b/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFCDlg.h deleted file mode 100644 index adf21616732..00000000000 --- a/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFCDlg.h +++ /dev/null @@ -1,53 +0,0 @@ -// Log_Msg_MFCDlg.h : header file -// $Id$ - -#if !defined(AFX_LOG_MSG_MFCDLG_H__5BB9CACE_CBCE_40DD_B57F_ED05B79DB033__INCLUDED_) -#define AFX_LOG_MSG_MFCDLG_H__5BB9CACE_CBCE_40DD_B57F_ED05B79DB033__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - - - -///////////////////////////////////////////////////////////////////////////// -// CLog_Msg_MFCDlg dialog - -class CLog_Msg_MFCDlg : public CDialog -{ -// Construction -public: - CLog_Msg_MFCDlg(CWnd* pParent = NULL); // standard constructor - -// Dialog Data - //{{AFX_DATA(CLog_Msg_MFCDlg) - enum { IDD = IDD_LOG_MSG_MFC_DIALOG }; - // NOTE: the ClassWizard will add data members here - //}}AFX_DATA - - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CLog_Msg_MFCDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - HICON m_hIcon; - - // Generated message map functions - //{{AFX_MSG(CLog_Msg_MFCDlg) - virtual BOOL OnInitDialog(); - afx_msg void OnSysCommand(UINT nID, LPARAM lParam); - afx_msg void OnPaint(); - afx_msg HCURSOR OnQueryDragIcon(); - afx_msg void OnDebugButtonClicked(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_LOG_MSG_MFCDLG_H__5BB9CACE_CBCE_40DD_B57F_ED05B79DB033__INCLUDED_) diff --git a/examples/Log_Msg/Log_Msg_MFC/MFC_Log.cpp b/examples/Log_Msg/Log_Msg_MFC/MFC_Log.cpp deleted file mode 100644 index 37fe90091ce..00000000000 --- a/examples/Log_Msg/Log_Msg_MFC/MFC_Log.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// $Id$ -// MFC_Log.cpp: implementation of the MFC_Log class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "MFC_Log.h" - -#include "ace/Log_Record.h" - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - -MFC_Log::MFC_Log() -{ - -} - -void -MFC_Log::log(ACE_Log_Record& log_record) -{ - unsigned long priority = log_record.type(); - char Message[512]; - - ACE_OS::sprintf(Message,"%d.%03ld %s", log_record.time_stamp().sec(), - log_record.time_stamp().usec()/ 1000, log_record.msg_data()); - ::OutputDebugString(Message); -} - -MFC_Log::~MFC_Log() -{ - -} diff --git a/examples/Log_Msg/Log_Msg_MFC/MFC_Log.h b/examples/Log_Msg/Log_Msg_MFC/MFC_Log.h deleted file mode 100644 index 1b887a402c3..00000000000 --- a/examples/Log_Msg/Log_Msg_MFC/MFC_Log.h +++ /dev/null @@ -1,45 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file MFC_Log.h - * - * $Id$ - * - * @author Craig Rodrigues <crodrigu@bbn.com> - * @author Chris Hafey <chafey@stentor.com> - * @author Don Hinton <dhinton@ieee.org> - */ -//============================================================================= - -#ifndef MFC_LOG_H -#define MFC_LOG_H - -#include "ace/Log_Msg_Callback.h" - -class ACE_Log_Record; - -/** - * @class MFC_Log - * - * @brief A callback class for ACE_Log_Msg which sends output to Microsoft debugger - * - * Register this class as a MSG_CALLBACK with the ACE_Log_Msg singleton and - * send debug output to the Microsoft debugger console window with ACE_DEBUG macros. - */ -class MFC_Log : public virtual ACE_Log_Msg_Callback -{ -public: - /// Constructor - MFC_Log(); - - /// method called by ACE_Log_Msg to log an event - void log(ACE_Log_Record& log_record); - - /// destructor - virtual ~MFC_Log(); - -}; - -#endif /* MFC_LOG_H */ - diff --git a/examples/Log_Msg/Log_Msg_MFC/README b/examples/Log_Msg/Log_Msg_MFC/README deleted file mode 100644 index 8c20059ba42..00000000000 --- a/examples/Log_Msg/Log_Msg_MFC/README +++ /dev/null @@ -1,40 +0,0 @@ - MFC Logging Example documentation - ================================= - by Craig Rodrigues <crodrigu@bbn.com> - 2002/08/02 - -The example in this directory is a Microsoft -Foundation Class (MFC) example which illustrates how to -write an ACE_Log_Msg_Callback which can -send debug output to the Microsoft debugger console. - -This is very useful when debugging an MFC GUI-based application -which uses ACE. - -NOTES -===== - - Make sure that $ACE_ROOT/ace/acemfcd.lib is built before building this - example. Follow the instructions in $ACE_ROOT/ACE-INSTALL.html for building - ACE with Visual C++. Do a Batch Build of ACE, and make sure that you build - the target "ACE DLL - Win32 MFC Debug". - - We must call ACE::init() and ACE::fini() in the right places - otherwise we will get strange crashes and memory leaks - when invoking ACE_Log_Msg::instance(). - A good place to invoke these methods is in the method which overrides - CWinApp::InitInstance(). - In this example, we invoke these methods in CLog_Msg_MFCApp::InitInstance(). - - - We must set the ACE_Log_Msg singleton to use our callback with: - ACE_Log_Msg::instance()->msg_callback( &m_mfc_logger ); - ACE_Log_Msg::instance()->set_flags( ACE_Log_Msg::MSG_CALLBACK ); - - This is also done in CLog_Msg_MFCApp::InitInstance(). - - -THANKS -====== -Thanks to the following people who provided assistance on the ACE -mailing list: -Chris Hafey <chafey@stentor.com> -Don Hinton <dhinton@ieee.org> - diff --git a/examples/Log_Msg/Log_Msg_MFC/Resource.h b/examples/Log_Msg/Log_Msg_MFC/Resource.h deleted file mode 100644 index d1aa3df6ce1..00000000000 --- a/examples/Log_Msg/Log_Msg_MFC/Resource.h +++ /dev/null @@ -1,21 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by Log_Msg_MFC.rc -// $Id$ -#define IDM_ABOUTBOX 0x0010 -#define IDD_ABOUTBOX 100 -#define IDS_ABOUTBOX 101 -#define IDD_LOG_MSG_MFC_DIALOG 102 -#define IDR_MAINFRAME 128 -#define IDC_BUTTON1 1000 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 129 -#define _APS_NEXT_COMMAND_VALUE 32771 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/examples/Log_Msg/Log_Msg_MFC/StdAfx.cpp b/examples/Log_Msg/Log_Msg_MFC/StdAfx.cpp deleted file mode 100644 index 7325df7a861..00000000000 --- a/examples/Log_Msg/Log_Msg_MFC/StdAfx.cpp +++ /dev/null @@ -1,9 +0,0 @@ -// $Id$ -// stdafx.cpp : source file that includes just the standard includes -// Log_Msg_MFC.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - - - diff --git a/examples/Log_Msg/Log_Msg_MFC/StdAfx.h b/examples/Log_Msg/Log_Msg_MFC/StdAfx.h deleted file mode 100644 index 2e6d2140caf..00000000000 --- a/examples/Log_Msg/Log_Msg_MFC/StdAfx.h +++ /dev/null @@ -1,26 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// $Id$ - -#if !defined(AFX_STDAFX_H__41816CD6_CE58_4714_8C74_1C67651B50ED__INCLUDED_) -#define AFX_STDAFX_H__41816CD6_CE58_4714_8C74_1C67651B50ED__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers - -#include <afxwin.h> // MFC core and standard components -#include <afxext.h> // MFC extensions -#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls -#ifndef _AFX_NO_AFXCMN_SUPPORT -#include <afxcmn.h> // MFC support for Windows Common Controls -#endif // _AFX_NO_AFXCMN_SUPPORT - - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_STDAFX_H__41816CD6_CE58_4714_8C74_1C67651B50ED__INCLUDED_) diff --git a/examples/Log_Msg/Log_Msg_MFC/res/Log_Msg_MFC.ico b/examples/Log_Msg/Log_Msg_MFC/res/Log_Msg_MFC.ico Binary files differdeleted file mode 100644 index 7eef0bcbe65..00000000000 --- a/examples/Log_Msg/Log_Msg_MFC/res/Log_Msg_MFC.ico +++ /dev/null diff --git a/examples/Log_Msg/Log_Msg_MFC/res/Log_Msg_MFC.rc2 b/examples/Log_Msg/Log_Msg_MFC/res/Log_Msg_MFC.rc2 deleted file mode 100644 index f8d03632acf..00000000000 --- a/examples/Log_Msg/Log_Msg_MFC/res/Log_Msg_MFC.rc2 +++ /dev/null @@ -1,13 +0,0 @@ -// -// LOG_MSG_MFC.RC2 - resources Microsoft Visual C++ does not edit directly -// - -#ifdef APSTUDIO_INVOKED - #error this file is not editable by Microsoft Visual C++ -#endif //APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// Add manually edited resources here... - -///////////////////////////////////////////////////////////////////////////// diff --git a/examples/Log_Msg/Makefile b/examples/Log_Msg/Makefile deleted file mode 100644 index e8fbea85bf7..00000000000 --- a/examples/Log_Msg/Makefile +++ /dev/null @@ -1,140 +0,0 @@ -#---------------------------------------------------------------------------- -# $Id$ -# -# Makefile for testing the Log_Msg logger -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = test_log_msg test_ostream test_callback - -LSRC = $(addsuffix .cpp,$(BIN)) - -LDLIBS = - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - - -.obj/test_log_msg.o .obj/test_log_msg.so .shobj/test_log_msg.o .shobj/test_log_msg.so: test_log_msg.cpp $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/pre.h \ - $(ACE_ROOT)/ace/post.h \ - $(ACE_ROOT)/ace/ace_wchar.h \ - $(ACE_ROOT)/ace/ace_wchar.inl \ - $(ACE_ROOT)/ace/OS_Dirent.h \ - $(ACE_ROOT)/ace/OS_Export.h \ - $(ACE_ROOT)/ace/OS_Errno.h \ - $(ACE_ROOT)/ace/OS_Errno.inl \ - $(ACE_ROOT)/ace/OS_Dirent.inl \ - $(ACE_ROOT)/ace/OS_String.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/ACE_export.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS_String.inl \ - $(ACE_ROOT)/ace/OS_Memory.h \ - $(ACE_ROOT)/ace/OS_Memory.inl \ - $(ACE_ROOT)/ace/OS_TLI.h \ - $(ACE_ROOT)/ace/OS_TLI.inl \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/Time_Value.inl \ - $(ACE_ROOT)/ace/Default_Constants.h \ - $(ACE_ROOT)/ace/Global_Macros.h \ - $(ACE_ROOT)/ace/Min_Max.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Trace.h $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl - -.obj/test_ostream.o .obj/test_ostream.so .shobj/test_ostream.o .shobj/test_ostream.so: test_ostream.cpp $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/pre.h \ - $(ACE_ROOT)/ace/post.h \ - $(ACE_ROOT)/ace/ace_wchar.h \ - $(ACE_ROOT)/ace/ace_wchar.inl \ - $(ACE_ROOT)/ace/OS_Dirent.h \ - $(ACE_ROOT)/ace/OS_Export.h \ - $(ACE_ROOT)/ace/OS_Errno.h \ - $(ACE_ROOT)/ace/OS_Errno.inl \ - $(ACE_ROOT)/ace/OS_Dirent.inl \ - $(ACE_ROOT)/ace/OS_String.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/ACE_export.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS_String.inl \ - $(ACE_ROOT)/ace/OS_Memory.h \ - $(ACE_ROOT)/ace/OS_Memory.inl \ - $(ACE_ROOT)/ace/OS_TLI.h \ - $(ACE_ROOT)/ace/OS_TLI.inl \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/Time_Value.inl \ - $(ACE_ROOT)/ace/Default_Constants.h \ - $(ACE_ROOT)/ace/Global_Macros.h \ - $(ACE_ROOT)/ace/Min_Max.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Trace.h $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl - -.obj/test_callback.o .obj/test_callback.so .shobj/test_callback.o .shobj/test_callback.so: test_callback.cpp $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/pre.h \ - $(ACE_ROOT)/ace/post.h \ - $(ACE_ROOT)/ace/ace_wchar.h \ - $(ACE_ROOT)/ace/ace_wchar.inl \ - $(ACE_ROOT)/ace/OS_Dirent.h \ - $(ACE_ROOT)/ace/OS_Export.h \ - $(ACE_ROOT)/ace/OS_Errno.h \ - $(ACE_ROOT)/ace/OS_Errno.inl \ - $(ACE_ROOT)/ace/OS_Dirent.inl \ - $(ACE_ROOT)/ace/OS_String.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/ACE_export.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS_String.inl \ - $(ACE_ROOT)/ace/OS_Memory.h \ - $(ACE_ROOT)/ace/OS_Memory.inl \ - $(ACE_ROOT)/ace/OS_TLI.h \ - $(ACE_ROOT)/ace/OS_TLI.inl \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/Time_Value.inl \ - $(ACE_ROOT)/ace/Default_Constants.h \ - $(ACE_ROOT)/ace/Global_Macros.h \ - $(ACE_ROOT)/ace/Min_Max.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Trace.h $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl \ - $(ACE_ROOT)/ace/Log_Msg_Callback.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Record.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Log_Msg/Ostream.dsp b/examples/Log_Msg/Ostream.dsp deleted file mode 100644 index 93d0101b0e8..00000000000 --- a/examples/Log_Msg/Ostream.dsp +++ /dev/null @@ -1,63 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Ostream" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Ostream - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "Ostream.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "Ostream.mak" CFG="Ostream - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Ostream - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\ace"
-# Begin Target
-
-# Name "Ostream - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\test_ostream.cpp
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/examples/Log_Msg/README b/examples/Log_Msg/README deleted file mode 100644 index 047caf9ca77..00000000000 --- a/examples/Log_Msg/README +++ /dev/null @@ -1,65 +0,0 @@ -This directory contains program(s) that demonstrate how to use ACE's -Log_Msg class to record various information. - - * test_callback.cpp: This program tests the Log_Msg - abstraction wrt writing to user defined callback objects. - - * test_ostream.cpp: This program illustrates how the - ACE_Log_Msg abstraction can be used to write to - stderr and to a file. For even more sophisticated - use-cases of ACE_Log_Msg please see the - $ACE_ROOT/netsvcs/clients/Logger/ examples. - - * test_log_msg.cpp: This program tests various feature of the - Log_Msg facility. It opens a log file and writes some - messages using different log priorities and output stream. - - You can invoke the program with or without command - parameters. When invoked with any parameters like, - - ./Log_Msg foobar - - the log messages are direct to stdout (or, ostream in C++.) - In this case, the program simulates an error EWOULDBLOCK and - write an error log to stdout as, - - would block - op_status and errnum work! - - When invoked without any parameters, except does the same - test as above but logs to default log stream "stderr," the - program also demonstrates logging messages/errors with - different priority and changing the logging destination. A - sample output is, - - would block - op_status and errnum work! - 3.141600, hello = 10000 - 6.283200, world = 20000 - 6.283200, world = 20000 - 9.424800, world = 30000 - 12.566400, world = 40000 - 15.708000, world = 50000 - HEXDUMP 48 bytes - 01 00 00 00 02 00 00 00 04 00 00 00 08 00 00 00 ................ - 10 00 00 00 20 00 00 00 40 00 00 00 80 00 00 00 .... ...@....... - 00 01 00 00 00 02 00 00 00 04 00 00 00 08 00 00 ................ - ./Log_Msg.EXE: (2710), badname: Function not implemented - - In this test, there are two lines containing "world` = - 20000." That's because in the program, both stderr and - stdout are "turned on" for logging before writing this log - message. The line containing "world = 30000" is written to - stdout only. Rest of the lines are all to the stderr. You - can examine this behavior by redirecting stderr and stdout - to different files. - - The HEXDUMP output shows how to take an arbitrary object and - hexdump its content for debugging. Finally, the program - shows an ordinary use case of logging error messages using - the ACE_ERROR macro. - - If you look into the program, there is also a demonstration - showing how to disable certain priorities of error message - temporarily. - diff --git a/examples/Log_Msg/makefile.bor b/examples/Log_Msg/makefile.bor deleted file mode 100644 index 9868323d17c..00000000000 --- a/examples/Log_Msg/makefile.bor +++ /dev/null @@ -1,19 +0,0 @@ -# -# Makefile for building the log_msg ace examples -# - -NAMES = \ - test_callback \ - test_log_msg \ - test_ostream - -OBJFILES = $(OBJDIR)\$(NAME).obj - -CFLAGS = $(ACE_CFLAGS) - -CPPDIR = . - -LIBFILES = $(ACE_LIB) - -!include <$(ACE_ROOT)\include\makeinclude\recurse.bor> -!include <$(ACE_ROOT)\include\makeinclude\build_exe.bor> diff --git a/examples/Log_Msg/test_callback.cpp b/examples/Log_Msg/test_callback.cpp deleted file mode 100644 index a3057a88824..00000000000 --- a/examples/Log_Msg/test_callback.cpp +++ /dev/null @@ -1,162 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// examples/Log_Msg -// -// = FILENAME -// test_callback.cpp -// -// = DESCRIPTION -// This program tests the <ACE_Log_Msg> class wrt writing to user -// defined callback objects. In particular, it tests to make sure -// that nested callbacks don't deadlock. -// -// = AUTHOR -// Irfan Pyarali <irfan@cs.wustl.edu> -// -// ============================================================================ - -#include "ace/OS.h" -#include "ace/Log_Msg.h" -#include "ace/Log_Msg_Callback.h" -#include "ace/Log_Record.h" - -ACE_RCSID(Log_Msg, test_callback, "$Id$") - -class Logger : public ACE_Log_Msg_Callback -{ -public: - Logger (int be_recursive = 1); - // Constructor sets whether we're testing "recursive" callback - // logging! - - void log (ACE_Log_Record &log_record); - // Logging callback - - void verbose (int be_verbose); - -private: - int verbose_logging_; - // Flag for testing verbose logging. - - int recursive_; - // Flag for testing recursive callback logging. -}; - -void -Logger::verbose (int be_verbose) -{ - this->verbose_logging_ = be_verbose; -} - -Logger::Logger (int be_recursive) - : recursive_ (be_recursive) -{ -} - -void -Logger::log (ACE_Log_Record &log_record) -{ - int use_log_msg = 0; - if (this->recursive_) - { - this->recursive_ = 0; - use_log_msg = 1; - } - - if (!this->verbose_logging_) - { - if (use_log_msg) - ACE_DEBUG ((LM_DEBUG, - "Logger::log->%s\n", - log_record.msg_data ())); - else - ACE_OS::printf ("Recursive Logger callback = %s\n", - log_record.msg_data ()); - } - else - { - ACE_TCHAR verbose_msg[ACE_Log_Record::MAXVERBOSELOGMSGLEN]; - int result = log_record.format_msg (ACE_LOG_MSG->local_host (), - ACE_LOG_MSG->flags (), - verbose_msg); - if (result == 0) - { - if (use_log_msg) - ACE_DEBUG ((LM_DEBUG, - "Logger::log->%s\n", - verbose_msg)); - else - ACE_OS::printf ("Recursive Logger callback = %s\n", - verbose_msg); - } - } - - // Cleanup on the way out. - if (use_log_msg) - this->recursive_ = 1; -} - -int -ACE_TMAIN (int, ACE_TCHAR *[]) -{ - // This message should show up in stderr. - ACE_DEBUG ((LM_DEBUG, - "(%t) first message\n")); - - ACE_LOG_MSG->clr_flags (ACE_Log_Msg::STDERR); - - // This message should not show up anywhere. - ACE_DEBUG ((LM_DEBUG, - "(%t) second message\n")); - - ACE_LOG_MSG->set_flags (ACE_Log_Msg::MSG_CALLBACK); - - // This message should not show up anywhere since no callback object - // has been specified. - ACE_DEBUG ((LM_DEBUG, - "(%t) third message\n")); - - // Create a callback object and make it "verbose". - Logger logger; - logger.verbose (1); - - // Set the callback object. - ACE_LOG_MSG->msg_callback (&logger); - - // This message should show up via the Logger callback. - ACE_DEBUG ((LM_DEBUG, - "(%t) forth message\n")); - - ACE_LOG_MSG->set_flags (ACE_Log_Msg::VERBOSE_LITE); - - // This message should show up via the Logger callback (somewhat - // verbosely). - ACE_DEBUG ((LM_DEBUG, - "(%t) fifth message\n")); - - ACE_LOG_MSG->set_flags (ACE_Log_Msg::VERBOSE); - - // This message should show up via the Logger callback (really - // verbosely). - ACE_DEBUG ((LM_DEBUG, - "(%t) sixth message\n")); - - logger.verbose (0); - - // This message should show up via the Logger callback (not - // verbosely). - ACE_DEBUG ((LM_DEBUG, - "(%t) seventh message\n")); - - ACE_LOG_MSG->set_flags (ACE_Log_Msg::STDERR); - - // This message should show up in stderr and the Logger callback. - // The one from the Logger callback will not be verbose, but the one - // from stderr should be verbose. - ACE_DEBUG ((LM_DEBUG, - "(%t) eight message\n")); - return 0; -} diff --git a/examples/Log_Msg/test_log_msg.cpp b/examples/Log_Msg/test_log_msg.cpp deleted file mode 100644 index 035520105d5..00000000000 --- a/examples/Log_Msg/test_log_msg.cpp +++ /dev/null @@ -1,193 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// examples/Log_Msg -// -// = FILENAME -// test_log_msg.cpp -// -// = DESCRIPTION -// This program tests the Log_Msg abstraction and demontrates -// several use cases. -// -// = AUTHOR -// Douglas Schmidt <schmidt@cs.wustl.edu> -// -// ============================================================================ - -#include "ace/OS.h" -#include "ace/streams.h" -#include "ace/Log_Msg.h" - -ACE_RCSID(Log_Msg, test_log_msg, "$Id$") - -static void -cleanup (void) -{ - ACE_DEBUG ((LM_INFO, - "leaving (%P)!\n")); -} - -static void -cause_error (void) -{ - errno = EWOULDBLOCK; - ACE_ERROR ((LM_DEBUG, - "would block\n")); -} - -int -ACE_TMAIN (int argc, ACE_TCHAR *argv[]) -{ - // Note that the default behavior is to log to STDERR... - - int counter = 1 ; - - if (argc > 1) - { - if (ACE_LOG_MSG->open (argv[0], - ACE_Log_Msg::OSTREAM) == -1) - ACE_ERROR ((LM_ERROR, - "cannot open logger!!!\n")); - - cause_error (); - // Check to see what happened. - if (ACE_LOG_MSG->op_status () == -1 - && ACE_LOG_MSG->errnum () == EWOULDBLOCK) - ACE_DEBUG ((LM_DEBUG, - "op_status and errnum work!\n")); - else - ACE_ERROR ((LM_ERROR, - "op_status and errnum failed!\n")); - } - else - { - if (ACE_LOG_MSG->open (argv[0]) == -1) - ACE_ERROR ((LM_ERROR, - "cannot open logger!!!\n")); - - cause_error (); - - // Check to see what happened. - if (ACE_LOG_MSG->op_status () == -1 - && ACE_LOG_MSG->errnum () == EWOULDBLOCK) - ACE_DEBUG ((LM_DEBUG, - "op_status and errnum work!\n")); - else - ACE_ERROR ((LM_ERROR, - "op_status and errnum failed!\n")); - - // Exercise many different combinations of STDERR and OSTREAM. - - ACE_DEBUG ((LM_INFO, - "%10f, %*s%s = %d\n", - 3.1416 * counter++, - 8, - "", - "hello", - 10000)); - - ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); - ACE_LOG_MSG->msg_ostream (&cout); - - ACE_DEBUG ((LM_INFO, - "%10f, %*s%s = %d\n", - 3.1416 * counter, - 8, - "", - "world", - 10000 * counter++)); - - ACE_LOG_MSG->clr_flags (ACE_Log_Msg::STDERR); - - ACE_DEBUG ((LM_INFO, - "%10f, %*s%s = %d\n", - 3.1416 * counter, - 8, - "", - "world", - 10000 * counter++)); - - ACE_LOG_MSG->msg_ostream (0); - - ACE_LOG_MSG->set_flags (ACE_Log_Msg::STDERR); - - ACE_DEBUG ((LM_INFO, - "%10f, %*s%s = %d\n", - 3.1416 * counter, - 8, - "", - "world", - 10000 * counter++)); - - ACE_LOG_MSG->clr_flags (ACE_Log_Msg::OSTREAM); - ACE_LOG_MSG->msg_ostream (&cerr); - - ACE_DEBUG ((LM_INFO, - "%10f, %*s%s = %d\n", - 3.1416 * counter, - 8, - "", - "world", - 10000 * counter++)); - - static int array[] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048}; - - // Print out the binary bytes of the array in hex form. - ACE_LOG_MSG->log_hexdump (LM_DEBUG, - (char *) array, - sizeof array); - - // Disable the LM_DEBUG and LM_INFO messages at the process level. - u_long priority_mask = - ACE_LOG_MSG->priority_mask (ACE_Log_Msg::PROCESS); - ACE_CLR_BITS (priority_mask, - LM_DEBUG | LM_INFO); - ACE_LOG_MSG->priority_mask (priority_mask, - ACE_Log_Msg::PROCESS); - - ACE_DEBUG ((LM_INFO, - "This LM_INFO message should not print!\n")); - ACE_DEBUG ((LM_DEBUG, - "This LM_DEBUG message should not print!\n")); - - ACE_SET_BITS (priority_mask, - LM_INFO); - ACE_LOG_MSG->priority_mask (priority_mask, - ACE_Log_Msg::PROCESS); - - ACE_DEBUG ((LM_INFO, - "This LM_INFO message should print!\n")); - ACE_DEBUG ((LM_DEBUG, - "This LM_DEBUG message should not print!\n")); - - ACE_CLR_BITS (priority_mask, LM_INFO); - ACE_LOG_MSG->priority_mask (priority_mask, - ACE_Log_Msg::PROCESS); - - ACE_DEBUG ((LM_INFO, - "This LM_INFO message should not print!\n")); - ACE_DEBUG ((LM_DEBUG, - "This LM_DEBUG message should not print!\n")); - - char badname[] = "badname"; - - char *l_argv[2]; - l_argv[0] = badname; - l_argv[1] = 0; - - if (ACE_OS::execv (badname, - l_argv) == -1) - { - ACE_ERROR ((LM_ERROR, - "%n: (%x), %p%r\n", - 10000, - badname, - cleanup)); - ACE_OS::_exit (); - } - } - return 0; -} diff --git a/examples/Log_Msg/test_ostream.cpp b/examples/Log_Msg/test_ostream.cpp deleted file mode 100644 index 6bc0bee4fa8..00000000000 --- a/examples/Log_Msg/test_ostream.cpp +++ /dev/null @@ -1,71 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// examples/Log_Msg -// -// = FILENAME -// test_ostream.cpp -// -// = DESCRIPTION -// This program tests the Log_Msg abstraction wrt writing to -// stderr and to a file. -// -// = AUTHOR -// Irfan Pyarali -// -// ============================================================================ - -#include "ace/OS.h" -#include "ace/streams.h" -#include "ace/Log_Msg.h" - -ACE_RCSID(Log_Msg, test_ostream, "$Id$") - -int -ACE_TMAIN (int, ACE_TCHAR *[]) -{ - // This message should show up in stderr. - ACE_DEBUG ((LM_DEBUG, - "first message\n")); - - ACE_LOG_MSG->clr_flags (ACE_Log_Msg::STDERR); - - // This message should not show up anywhere. - ACE_DEBUG ((LM_DEBUG, - "second message\n")); - - ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); - - // This message should not show up anywhere since no ostream has - // been specified. - ACE_DEBUG ((LM_DEBUG, - "third message\n")); - -#if !defined (ACE_LACKS_IOSTREAM_TOTALLY) - // Create a persistent store. - const char *filename = "output"; - ofstream myostream (filename, ios::out | ios::trunc); - - // Check for errors. - if (myostream.bad ()) - return 1; - - // Set the ostream. - ACE_LOG_MSG->msg_ostream (&myostream); - - // This message should show up in the ostream. - ACE_DEBUG ((LM_DEBUG, - "fourth message\n")); -#endif /* ACE_LACKS_IOSTREAM_TOTALLY */ - - ACE_LOG_MSG->set_flags (ACE_Log_Msg::STDERR); - - // This message should show up in stderr and the ostream (without - // ACE_LACKS_IOSTREAM_TOTALLY). - ACE_DEBUG ((LM_DEBUG, - "fifth message\n")); - - return 0; -} |