Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Attributes
CMfcEmbedCommandLine Class Reference
Collaboration diagram for CMfcEmbedCommandLine:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CMfcEmbedCommandLine (CMfcEmbedApp &app)
virtual void ParseParam (LPCTSTR szParam, BOOL bFlag, BOOL bLast)
void HandleFlag (const nsACString &flag, const TCHAR *param=nsnull)
void HandleNakedParameter (const char *flag)
void DoConsole ()
void DoChrome ()

Private Attributes

nsEmbedCString mLastFlag
CMfcEmbedAppmApp

Detailed Description

Definition at line 112 of file MfcEmbed.cpp.


Constructor & Destructor Documentation

Definition at line 116 of file MfcEmbed.cpp.

                                            : CCommandLineInfo(),
                                              mApp(app)
    {
    }

Member Function Documentation

Definition at line 181 of file MfcEmbed.cpp.

Here is the caller graph for this function:

Definition at line 177 of file MfcEmbed.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CMfcEmbedCommandLine::HandleFlag ( const nsACString &  flag,
const TCHAR param = nsnull 
) [inline]

Definition at line 155 of file MfcEmbed.cpp.

    {
        if (_tcscmp(flag.BeginReading(), _T("console")) == 0)
            DoConsole();
        else if (_tcscmp(flag.BeginReading(), _T("chrome")) == 0)
            DoChrome();
#ifdef NS_TRACE_MALLOC
        else if (_tcscmp(flag.BeginReading(), _T("trace-malloc")) == 0)
        {
            USES_CONVERSION;
            DoTraceMalloc(flag, T2CA(param));
        }
#endif
        // add new flag handlers here (please add a DoFoo() method below!)
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 172 of file MfcEmbed.cpp.

                                                {
        // handle non-flag arguments here
    }
virtual void CMfcEmbedCommandLine::ParseParam ( LPCTSTR  szParam,
BOOL  bFlag,
BOOL  bLast 
) [inline, virtual]

Definition at line 125 of file MfcEmbed.cpp.

    {
        CCommandLineInfo::ParseParam(szParam, bFlag, bLast);
        if (bFlag) {
            // advance past extra stuff like --foo
            while (*szParam && *szParam == '-')
                szParam++;

            // previous argument was a flag too, so process that first
            if (mLastFlag.Length() != 0)
                HandleFlag(mLastFlag);
            
            mLastFlag = szParam;

            // oops, no more arguments coming, so handle this now
            if (bLast)
                HandleFlag(mLastFlag);
            
        } else {
            if (mLastFlag.Length() != 0)
                HandleFlag(mLastFlag, szParam);
                
            mLastFlag.Cut(0, PR_UINT32_MAX);
        }
    }

Here is the call graph for this function:


Member Data Documentation

Definition at line 209 of file MfcEmbed.cpp.

Definition at line 206 of file MfcEmbed.cpp.


The documentation for this class was generated from the following file: