//-----------------------------------------------------------------------------
/// Handles any internal commands that a CommandProcessor must respond to
//-----------------------------------------------------------------------------
void CommandProcessor::HandleInternalCommands()
{
    if (m_commandTreeResponse.IsActive())
    {

#ifdef USE_C3_STREAMLOG
        StreamLog::Ref() << "\n CommandProcessor: HandleInternalCommands: Enter." << "--------------------------------------------" << "\n";
#endif

        string strTree;
        strTree += "<CommandTree>";

#ifdef USE_C3_STREAMLOG
        StreamLog::Ref() << "\n CommandProcessor: About to call GetCommandTree()." << "--------------------------------------------" << "\n";
#endif

        strTree += GetCommandTree();

#ifdef USE_C3_STREAMLOG
        StreamLog::Ref() << "\n CommandProcessor: Finished GetCommandTree()." << "--------------------------------------------" << "\n";
#endif

        strTree += "</CommandTree>";

#ifdef USE_C3_STREAMLOG
        StreamLog::Ref() << "\n CommandProcessor: About to send data back through command." << "--------------------------------------------" << "\n";
#endif

        m_commandTreeResponse.Send(strTree.c_str());
    }

    if (m_xmlResponse.IsActive())
    {
        m_xmlResponse.Send(GetEditableCommandValues().c_str());
    }

    if (m_commandListResponse.IsActive())
    {
        // Create a Visitor object
        CommandVisitor myVisitor;
        // Send the visitor off to fetch all of the available commands
        Accept(myVisitor);
        // Send the commands back to the client.
        m_commandListResponse.Send((char*)(myVisitor.GetCommandStrings()).asCharArray());
    }
}