aboutsummaryrefslogtreecommitdiff
path: root/sp/src/vgui2/vgui_controls/BuildFactoryHelper.cpp
diff options
context:
space:
mode:
authorJørgen P. Tjernø <[email protected]>2013-12-02 19:31:46 -0800
committerJørgen P. Tjernø <[email protected]>2013-12-02 19:46:31 -0800
commitf56bb35301836e56582a575a75864392a0177875 (patch)
treede61ddd39de3e7df52759711950b4c288592f0dc /sp/src/vgui2/vgui_controls/BuildFactoryHelper.cpp
parentMark some more files as text. (diff)
downloadsource-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz
source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip
Fix line endings. WHAMMY.
Diffstat (limited to 'sp/src/vgui2/vgui_controls/BuildFactoryHelper.cpp')
-rw-r--r--sp/src/vgui2/vgui_controls/BuildFactoryHelper.cpp208
1 files changed, 104 insertions, 104 deletions
diff --git a/sp/src/vgui2/vgui_controls/BuildFactoryHelper.cpp b/sp/src/vgui2/vgui_controls/BuildFactoryHelper.cpp
index 6d3743d3..46f38cd1 100644
--- a/sp/src/vgui2/vgui_controls/BuildFactoryHelper.cpp
+++ b/sp/src/vgui2/vgui_controls/BuildFactoryHelper.cpp
@@ -1,104 +1,104 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose: Helper for the CHudElement class to add themselves to the list of hud elements
-//
-// $NoKeywords: $
-//=============================================================================//
-#include "vgui/IVGui.h"
-#include "vgui_controls/MessageMap.h"
-
-// memdbgon must be the last include file in a .cpp file!!!
-#include "tier0/memdbgon.h"
-
-using namespace vgui;
-
-// Start with empty list
-CBuildFactoryHelper *CBuildFactoryHelper::m_sHelpers = NULL;
-
-//-----------------------------------------------------------------------------
-// Purpose: Constructs a panel factory
-// Input : pfnCreate - fn Ptr to a function which generates a panel
-//-----------------------------------------------------------------------------
-CBuildFactoryHelper::CBuildFactoryHelper( char const *className, PANELCREATEFUNC func )
-{
- // Make this fatal
- if ( HasFactory( className ) )
- {
- Error( "CBuildFactoryHelper: Factory for '%s' already exists!!!!\n", className );
- }
-
- //List is empty, or element belongs at front, insert here
- m_pNext = m_sHelpers;
- m_sHelpers = this;
-
- Assert( func );
- m_CreateFunc = func;
- Assert( className );
- m_pClassName = className;
-}
-
-//-----------------------------------------------------------------------------
-// Purpose: Returns next object in list
-// Output : CBuildFactoryHelper
-//-----------------------------------------------------------------------------
-CBuildFactoryHelper *CBuildFactoryHelper::GetNext( void )
-{
- return m_pNext;
-}
-
-char const *CBuildFactoryHelper::GetClassName() const
-{
- return m_pClassName;
-}
-
-vgui::Panel *CBuildFactoryHelper::CreatePanel()
-{
- if ( !m_CreateFunc )
- return NULL;
-
- return ( *m_CreateFunc )();
-}
-
-// private static meethod
-bool CBuildFactoryHelper::HasFactory( char const *className )
-{
- CBuildFactoryHelper *p = m_sHelpers;
- while ( p )
- {
- if ( !Q_stricmp( className, p->GetClassName() ) )
- return true;
-
- p = p->GetNext();
- }
- return false;
-}
-
-// static method
-vgui::Panel *CBuildFactoryHelper::InstancePanel( char const *className )
-{
- CBuildFactoryHelper *p = m_sHelpers;
- while ( p )
- {
- if ( !Q_stricmp( className, p->GetClassName() ) )
- return p->CreatePanel();
-
- p = p->GetNext();
- }
- return NULL;
-}
-
-// static method
-void CBuildFactoryHelper::GetFactoryNames( CUtlVector< char const * >& list )
-{
- list.RemoveAll();
-
- CBuildFactoryHelper *p = m_sHelpers;
- while ( p )
- {
- list.AddToTail( p->GetClassName() );
- p = p->GetNext();
- }
-}
-
-
-
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Helper for the CHudElement class to add themselves to the list of hud elements
+//
+// $NoKeywords: $
+//=============================================================================//
+#include "vgui/IVGui.h"
+#include "vgui_controls/MessageMap.h"
+
+// memdbgon must be the last include file in a .cpp file!!!
+#include "tier0/memdbgon.h"
+
+using namespace vgui;
+
+// Start with empty list
+CBuildFactoryHelper *CBuildFactoryHelper::m_sHelpers = NULL;
+
+//-----------------------------------------------------------------------------
+// Purpose: Constructs a panel factory
+// Input : pfnCreate - fn Ptr to a function which generates a panel
+//-----------------------------------------------------------------------------
+CBuildFactoryHelper::CBuildFactoryHelper( char const *className, PANELCREATEFUNC func )
+{
+ // Make this fatal
+ if ( HasFactory( className ) )
+ {
+ Error( "CBuildFactoryHelper: Factory for '%s' already exists!!!!\n", className );
+ }
+
+ //List is empty, or element belongs at front, insert here
+ m_pNext = m_sHelpers;
+ m_sHelpers = this;
+
+ Assert( func );
+ m_CreateFunc = func;
+ Assert( className );
+ m_pClassName = className;
+}
+
+//-----------------------------------------------------------------------------
+// Purpose: Returns next object in list
+// Output : CBuildFactoryHelper
+//-----------------------------------------------------------------------------
+CBuildFactoryHelper *CBuildFactoryHelper::GetNext( void )
+{
+ return m_pNext;
+}
+
+char const *CBuildFactoryHelper::GetClassName() const
+{
+ return m_pClassName;
+}
+
+vgui::Panel *CBuildFactoryHelper::CreatePanel()
+{
+ if ( !m_CreateFunc )
+ return NULL;
+
+ return ( *m_CreateFunc )();
+}
+
+// private static meethod
+bool CBuildFactoryHelper::HasFactory( char const *className )
+{
+ CBuildFactoryHelper *p = m_sHelpers;
+ while ( p )
+ {
+ if ( !Q_stricmp( className, p->GetClassName() ) )
+ return true;
+
+ p = p->GetNext();
+ }
+ return false;
+}
+
+// static method
+vgui::Panel *CBuildFactoryHelper::InstancePanel( char const *className )
+{
+ CBuildFactoryHelper *p = m_sHelpers;
+ while ( p )
+ {
+ if ( !Q_stricmp( className, p->GetClassName() ) )
+ return p->CreatePanel();
+
+ p = p->GetNext();
+ }
+ return NULL;
+}
+
+// static method
+void CBuildFactoryHelper::GetFactoryNames( CUtlVector< char const * >& list )
+{
+ list.RemoveAll();
+
+ CBuildFactoryHelper *p = m_sHelpers;
+ while ( p )
+ {
+ list.AddToTail( p->GetClassName() );
+ p = p->GetNext();
+ }
+}
+
+
+