mirror of https://github.com/lianthony/NT4.0
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
1.9 KiB
86 lines
1.9 KiB
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
Copyright (c) 1989 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
cgcls.cxx
|
|
|
|
Abstract:
|
|
|
|
Routines for the cgcls code generation class.
|
|
|
|
Notes:
|
|
|
|
|
|
History:
|
|
|
|
Aug-31-1993 VibhasC Created.
|
|
----------------------------------------------------------------------------*/
|
|
|
|
/****************************************************************************
|
|
* include files
|
|
***************************************************************************/
|
|
|
|
#include "becls.hxx"
|
|
#pragma hdrstop
|
|
/****************************************************************************
|
|
* local definitions
|
|
***************************************************************************/
|
|
/****************************************************************************
|
|
* local data
|
|
***************************************************************************/
|
|
|
|
/****************************************************************************
|
|
* externs
|
|
***************************************************************************/
|
|
/****************************************************************************/
|
|
|
|
short
|
|
CG_CLASS::GetMembers(
|
|
ITERATOR& I )
|
|
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
Routine Description:
|
|
|
|
GetMembers (list of child+its siblings) of the code generation class.
|
|
|
|
Arguments:
|
|
|
|
I - An iterator for the member list.
|
|
|
|
Return Value:
|
|
|
|
Count of number of members.
|
|
|
|
Notes:
|
|
|
|
----------------------------------------------------------------------------*/
|
|
{
|
|
CG_CLASS * pC;
|
|
short Count = 0;
|
|
|
|
if( pC = GetChild() )
|
|
{
|
|
ITERATOR_INSERT( I, pC );
|
|
|
|
Count++;
|
|
while( pC = pC->GetSibling() )
|
|
{
|
|
ITERATOR_INSERT( I, pC );
|
|
Count++;
|
|
}
|
|
}
|
|
|
|
return Count;
|
|
}
|
|
|
|
CG_CLASS *
|
|
CG_CLASS::GetLastSibling()
|
|
{
|
|
CG_CLASS * pLast = this;
|
|
CG_CLASS * pS;
|
|
|
|
while( pS = pLast->GetSibling() )
|
|
pLast = pS;
|
|
return pLast;
|
|
}
|