Beispiel #1
0
		/**************************************

		  INPUT:                                                                                      

		  name - static string pointer to the name of the node we are searching for                   

		                                                                                              

		  WARNINGS:                                                                                   

		  All profile names are assumed to be static strings so this function uses pointer compares   

		  to find the named node.                                                                     

		 =============================================================================================*/
		public CProfileNode Get_Sub_Node( string name )
		{
			// Try to find this sub node
			CProfileNode child = Child;
			while( child != null )
			{
				if( String.Compare( child.Name, name ) == 0 )
				{
					return child;
				}
				child = child.Sibling;
			}
			// We didn't find it, so add it

			CProfileNode node = new CProfileNode( name, this );
			node.Sibling = Child;
			Child = node;
			return node;
		}
Beispiel #2
0
		internal CProfileIterator( CProfileNode start )
		{
			CurrentParent = start;
			CurrentChild = CurrentParent.Get_Child();
		}
Beispiel #3
0
		/**************************************

		  INPUT:                                                                                      

		  name - pointer to a static string which is the name of this profile node                    

		  parent - parent pointer                                                                     

		                                                                                              

		  WARNINGS:                                                                                   

		  The name is assumed to be a static pointer, only the pointer is stored and compared for     

		  efficiency reasons.                                                                         

		 =============================================================================================*/
		public CProfileNode( string name, CProfileNode parent )
		{
			Name = name;
			TotalCalls = 0;
			TotalTime = 0;
			StartTime = 0;
			RecursionCounter = 0;
			Parent = parent;
			Child = null;
			Sibling = null;
			m_userPtr = null;
			Reset();
		}