|
From: <rus...@us...> - 2008-11-10 05:15:14
|
Revision: 363
http://gearbox.svn.sourceforge.net/gearbox/?rev=363&view=rev
Author: russo2503v
Date: 2008-11-10 05:15:08 +0000 (Mon, 10 Nov 2008)
Log Message:
-----------
toString() for the subsys type and a convenicence function to set it
Modified Paths:
--------------
gearbox/trunk/src/gbxutilacfr/status.cpp
gearbox/trunk/src/gbxutilacfr/status.h
gearbox/trunk/src/gbxutilacfr/substatus.h
Modified: gearbox/trunk/src/gbxutilacfr/status.cpp
===================================================================
--- gearbox/trunk/src/gbxutilacfr/status.cpp 2008-11-08 05:19:57 UTC (rev 362)
+++ gearbox/trunk/src/gbxutilacfr/status.cpp 2008-11-10 05:15:08 UTC (rev 363)
@@ -60,4 +60,17 @@
return ss.str();
}
+std::string toString( SubsystemType type )
+{
+ switch ( type )
+ {
+ case SubsystemStandard :
+ return "Standard";
+ case SubsystemEarlyExit :
+ return "EarlyExit";
+ default:
+ assert( !"gbxutilacfr::toString(SubsystemType) should never get to default" );
+ }
+}
+
} // namespace
Modified: gearbox/trunk/src/gbxutilacfr/status.h
===================================================================
--- gearbox/trunk/src/gbxutilacfr/status.h 2008-11-08 05:19:57 UTC (rev 362)
+++ gearbox/trunk/src/gbxutilacfr/status.h 2008-11-10 05:15:08 UTC (rev 363)
@@ -86,6 +86,9 @@
SubsystemEarlyExit
};
+//! Returns string equivalent of subsystem type enumerator.
+std::string toString( SubsystemType type );
+
/*!
@brief Local interface to component status.
Modified: gearbox/trunk/src/gbxutilacfr/substatus.h
===================================================================
--- gearbox/trunk/src/gbxutilacfr/substatus.h 2008-11-08 05:19:57 UTC (rev 362)
+++ gearbox/trunk/src/gbxutilacfr/substatus.h 2008-11-10 05:15:08 UTC (rev 363)
@@ -47,6 +47,9 @@
void setMaxHeartbeatInterval( double interval ) { status_.setMaxHeartbeatInterval( subsysName_, interval ); };
//! Passes this information to the system Status.
+ void setSubsystemType( SubsystemType type ) { status_.setSubsystemType( subsysName_, type ); };
+
+ //! Passes this information to the system Status.
void heartbeat() { status_.heartbeat( subsysName_ ); };
//! Passes this information to the system Status.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|