diff options
Diffstat (limited to 'autodoc/source/parser_i/idl/pe_struc.cxx')
-rw-r--r-- | autodoc/source/parser_i/idl/pe_struc.cxx | 81 |
1 files changed, 39 insertions, 42 deletions
diff --git a/autodoc/source/parser_i/idl/pe_struc.cxx b/autodoc/source/parser_i/idl/pe_struc.cxx index 24e5d0f6c438..37ec214908d7 100644 --- a/autodoc/source/parser_i/idl/pe_struc.cxx +++ b/autodoc/source/parser_i/idl/pe_struc.cxx @@ -2,9 +2,9 @@ * * $RCSfile: pe_struc.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: np $ $Date: 2002-03-08 14:45:34 $ + * last change: $Author: np $ $Date: 2002-11-01 17:15:40 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -64,15 +64,15 @@ // NOT FULLY DECLARED SERVICES +#include <ary/idl/i_gate.hxx> +#include <ary/idl/i_struct.hxx> +#include <ary/idl/ip_ce.hxx> #include <ary_i/codeinf2.hxx> #include <s2_luidl/tk_ident.hxx> #include <s2_luidl/tk_punct.hxx> #include <s2_luidl/tk_keyw.hxx> #include <s2_luidl/pe_type2.hxx> #include <s2_luidl/pe_selem.hxx> -#include <csi/l_uidl/struct.hxx> -#include <csi/l_uidl/struelem.hxx> -#include <ary_i/uidl/gate.hxx> @@ -91,7 +91,7 @@ PE_Struct::PE_Struct() void PE_Struct::EstablishContacts( UnoIDL_PE * io_pParentPE, - ary::Repository & io_rRepository, + ary::n22::Repository & io_rRepository, TokenProcessing_Result & o_rResult ) { UnoIDL_PE::EstablishContacts(io_pParentPE,io_rRepository,o_rResult); @@ -122,8 +122,8 @@ PE_Struct::TransferData() { if (NOT Work().bIsPreDeclaration) { - csv_assert(Work().pData != 0); - csv_assert(Work().pCurStruct); + csv_assert(Work().sData_Name.size() > 0); + csv_assert(Work().nCurStruct.IsValid()); } Stati().pCurStatus = &Stati().aNone; } @@ -134,53 +134,50 @@ PE_Struct::ReceiveData() Stati().pCurStatus->On_SubPE_Left(); } +const bool C_bIsStructElement = false; // Means: not ExceptionElement. + PE_Struct::S_Work::S_Work() - : // pData + : sData_Name(), bIsPreDeclaration(false), - pCurStruct(0), + nCurStruct(0), pPE_Element(0), - aCurParsed_ElementRef(0), - pPE_Type(0) - // aCurParsed_Base + nCurParsed_ElementRef(0), + pPE_Type(0), + nCurParsed_Base(0) { - pPE_Element = new PE_StructElement(aCurParsed_ElementRef,pCurStruct); - pPE_Type = new PE_Type(aCurParsed_Base); + pPE_Element = new PE_StructElement(nCurParsed_ElementRef,nCurStruct,C_bIsStructElement); + pPE_Type = new PE_Type(nCurParsed_Base); } void PE_Struct::S_Work::InitData() { - pData = new Struct; + sData_Name.clear(); bIsPreDeclaration = false; - pCurStruct = 0; + nCurStruct = 0; + nCurParsed_ElementRef = 0; + nCurParsed_Base = 0; } void PE_Struct::S_Work::Prepare_PE_QualifiedName() { - aCurParsed_ElementRef = 0; + nCurParsed_ElementRef = 0; } void PE_Struct::S_Work::Prepare_PE_Element() { - aCurParsed_Base = 0; + nCurParsed_Base = 0; } void PE_Struct::S_Work::Data_Set_Name( const char * i_sName ) { - pData->Data().sName = i_sName; -} - -void -PE_Struct::S_Work::Data_Add_CurParsed_ElementRef() -{ - pData->Data().aElements.push_back(aCurParsed_ElementRef); + sData_Name = i_sName; } - PE_Struct::S_Stati::S_Stati(PE_Struct & io_rStruct) : aNone(io_rStruct), aWaitForName(io_rStruct), @@ -218,13 +215,6 @@ PE_Struct::State_GotName::Process_Punctuation( const TokPunctuation & i_rToken ) { if ( i_rToken.Id() != TokPunctuation::Semicolon ) { - Work().pCurStruct = - PE().Gate().Store_Struct( - PE().CurNamespace().Id(), - *Work().pData ); - PE().PassDocuAt(Work().pCurStruct.Id()); - - switch (i_rToken.Id()) { case TokPunctuation::Colon: @@ -233,6 +223,7 @@ PE_Struct::State_GotName::Process_Punctuation( const TokPunctuation & i_rToken ) Work().Prepare_PE_QualifiedName(); break; case TokPunctuation::CurledBracketOpen: + PE().store_Struct(); MoveState( Stati().aWaitForElement ); SetResult(done,stay); break; @@ -242,7 +233,7 @@ PE_Struct::State_GotName::Process_Punctuation( const TokPunctuation & i_rToken ) } else { - Delete_dyn(Work().pData); + Work().sData_Name.clear(); SetResult(done,pop_success); } } @@ -250,7 +241,6 @@ PE_Struct::State_GotName::Process_Punctuation( const TokPunctuation & i_rToken ) void PE_Struct::State_WaitForBase::On_SubPE_Left() { - Work().pData->Data().pBase = Work().aCurParsed_Base; MoveState(Stati().aGotBase); } @@ -259,6 +249,7 @@ PE_Struct::State_GotBase::Process_Punctuation( const TokPunctuation & i_rToken ) { if ( i_rToken.Id() == TokPunctuation::CurledBracketOpen ) { + PE().store_Struct(); MoveState( Stati().aWaitForElement ); SetResult(done,stay); } @@ -311,12 +302,6 @@ PE_Struct::State_WaitForElement::Process_Punctuation( const TokPunctuation & i_r } void -PE_Struct::State_WaitForElement::On_SubPE_Left() -{ - Work().Data_Add_CurParsed_ElementRef(); -} - -void PE_Struct::State_WaitForFinish::Process_Punctuation( const TokPunctuation & i_rToken ) { if (i_rToken.Id() == TokPunctuation::Semicolon) @@ -330,6 +315,18 @@ PE_Struct::State_WaitForFinish::Process_Punctuation( const TokPunctuation & i_rT } } +void +PE_Struct::store_Struct() +{ + ary::idl::Struct & + rCe = Gate().Ces().Store_Struct( + CurNamespace().CeId(), + Work().sData_Name, + Work().nCurParsed_Base ); + PassDocuAt(rCe); + Work().nCurStruct = rCe.CeId(); +} + } // namespace uidl } // namespace csi |