summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-11-15 12:42:51 +0000
committerOliver Bolte <obo@openoffice.org>2004-11-15 12:42:51 +0000
commitfd6ddf8bb5ff7ac4d9a990a3a777bde4b20b1f91 (patch)
tree3084e0002d7335cfb4a4dccc2d8e63d244f88b21
parentINTEGRATION: CWS adc9 (1.2.6); FILE MERGED (diff)
downloadcore-fd6ddf8bb5ff7ac4d9a990a3a777bde4b20b1f91.tar.gz
core-fd6ddf8bb5ff7ac4d9a990a3a777bde4b20b1f91.zip
INTEGRATION: CWS adc9 (1.2.114); FILE MERGED
2004/11/09 17:29:36 np 1.2.114.1: #i33253#
-rw-r--r--autodoc/source/parser_i/idl/pe_excp.cxx8
-rw-r--r--autodoc/source/parser_i/idl/pe_selem.cxx56
-rw-r--r--autodoc/source/parser_i/idl/pe_struc.cxx42
3 files changed, 86 insertions, 20 deletions
diff --git a/autodoc/source/parser_i/idl/pe_excp.cxx b/autodoc/source/parser_i/idl/pe_excp.cxx
index 9a27279ae6ab..98e4ff6f655c 100644
--- a/autodoc/source/parser_i/idl/pe_excp.cxx
+++ b/autodoc/source/parser_i/idl/pe_excp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: pe_excp.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: np $ $Date: 2002-11-01 17:15:37 $
+ * last change: $Author: obo $ $Date: 2004-11-15 13:41:23 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -135,8 +135,6 @@ PE_Exception::ReceiveData()
Stati().pCurStatus->On_SubPE_Left();
}
-const bool C_bIsExceptionElement = true; // Means:Yes, is an ExceptionElement.
-
PE_Exception::S_Work::S_Work()
: sData_Name(),
bIsPreDeclaration(false),
@@ -147,7 +145,7 @@ PE_Exception::S_Work::S_Work()
nCurParsed_Base(0)
{
- pPE_Element = new PE_StructElement(nCurParsed_ElementRef,nCurStruct,C_bIsExceptionElement);
+ pPE_Element = new PE_StructElement(nCurParsed_ElementRef,nCurStruct);
pPE_Type = new PE_Type(nCurParsed_Base);
}
diff --git a/autodoc/source/parser_i/idl/pe_selem.cxx b/autodoc/source/parser_i/idl/pe_selem.cxx
index 2d2cc0454459..7597dec5d847 100644
--- a/autodoc/source/parser_i/idl/pe_selem.cxx
+++ b/autodoc/source/parser_i/idl/pe_selem.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: pe_selem.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: np $ $Date: 2002-11-01 17:15:38 $
+ * last change: $Author: obo $ $Date: 2004-11-15 13:42:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -64,6 +64,7 @@
// NOT FULLY DECLARED SERVICES
#include <ary/idl/i_gate.hxx>
+#include <ary/idl/i_struct.hxx>
#include <ary/idl/i_structelem.hxx>
#include <ary/idl/ip_ce.hxx>
#include <ary_i/codeinf2.hxx>
@@ -77,17 +78,36 @@ namespace csi
namespace uidl
{
+namespace
+{
+ const String C_sNone;
+}
PE_StructElement::PE_StructElement( RStructElement & o_rResult,
const RStruct & i_rCurStruct,
- bool i_IsExceptionElement )
+ const String & i_rCurStructTemplateParam )
: eState(e_none),
pResult(&o_rResult),
pCurStruct(&i_rCurStruct),
+ bIsExceptionElement(false),
pPE_Type(0),
nType(0),
sName(),
- bIsExceptionElement(i_IsExceptionElement)
+ pCurStructTemplateParam(&i_rCurStructTemplateParam)
+{
+ pPE_Type = new PE_Type(nType);
+}
+
+PE_StructElement::PE_StructElement( RStructElement & o_rResult,
+ const RStruct & i_rCurExc )
+ : eState(e_none),
+ pResult(&o_rResult),
+ pCurStruct(&i_rCurExc),
+ bIsExceptionElement(true),
+ pPE_Type(0),
+ nType(0),
+ sName(),
+ pCurStructTemplateParam(&C_sNone)
{
pPE_Type = new PE_Type(nType);
}
@@ -111,7 +131,6 @@ PE_StructElement::ProcessToken( const Token & i_rToken )
i_rToken.Trigger(*this);
}
-
void
PE_StructElement::Process_Default()
{
@@ -127,10 +146,21 @@ PE_StructElement::Process_Default()
void
PE_StructElement::Process_Identifier( const TokIdentifier & i_rToken )
{
+ csv_assert(*i_rToken.Text() != 0);
+
if (eState == expect_type)
{
- SetResult( not_done, push_sure, pPE_Type.Ptr() );
- eState = expect_name;
+ if ( *pCurStructTemplateParam == i_rToken.Text() )
+ {
+ nType = lhf_FindTemplateParamType();
+ SetResult( done, stay );
+ eState = expect_name;
+ }
+ else // No template parameter type existing, or not matching:
+ {
+ SetResult( not_done, push_sure, pPE_Type.Ptr() );
+ eState = expect_name;
+ }
}
else if (eState == expect_name)
{
@@ -195,6 +225,16 @@ PE_StructElement::MyPE()
return *this;
}
+ary::idl::Type_id
+PE_StructElement::lhf_FindTemplateParamType() const
+{
+ const ary::idl::CodeEntity &
+ rCe = Gate().Ces().Find_Ce(*pCurStruct);
+ const ary::idl::Struct &
+ rStruct = static_cast< const ary::idl::Struct& >(rCe);
+ return rStruct.TemplateParameterType();
+}
+
+
} // namespace uidl
} // namespace csi
-
diff --git a/autodoc/source/parser_i/idl/pe_struc.cxx b/autodoc/source/parser_i/idl/pe_struc.cxx
index 37ec214908d7..56d26a766903 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.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: np $ $Date: 2002-11-01 17:15:40 $
+ * last change: $Author: obo $ $Date: 2004-11-15 13:42:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -134,10 +134,9 @@ PE_Struct::ReceiveData()
Stati().pCurStatus->On_SubPE_Left();
}
-const bool C_bIsStructElement = false; // Means: not ExceptionElement.
-
PE_Struct::S_Work::S_Work()
: sData_Name(),
+ sData_TemplateParam(),
bIsPreDeclaration(false),
nCurStruct(0),
pPE_Element(0),
@@ -146,7 +145,7 @@ PE_Struct::S_Work::S_Work()
nCurParsed_Base(0)
{
- pPE_Element = new PE_StructElement(nCurParsed_ElementRef,nCurStruct,C_bIsStructElement);
+ pPE_Element = new PE_StructElement(nCurParsed_ElementRef,nCurStruct,sData_TemplateParam);
pPE_Type = new PE_Type(nCurParsed_Base);
}
@@ -154,6 +153,7 @@ void
PE_Struct::S_Work::InitData()
{
sData_Name.clear();
+ sData_TemplateParam.clear();
bIsPreDeclaration = false;
nCurStruct = 0;
nCurParsed_ElementRef = 0;
@@ -178,10 +178,18 @@ PE_Struct::S_Work::Data_Set_Name( const char * i_sName )
sData_Name = i_sName;
}
+void
+PE_Struct::S_Work::Data_Set_TemplateParam( const char * i_sTemplateParam )
+{
+ sData_TemplateParam = i_sTemplateParam;
+}
+
PE_Struct::S_Stati::S_Stati(PE_Struct & io_rStruct)
: aNone(io_rStruct),
aWaitForName(io_rStruct),
aGotName(io_rStruct),
+ aWaitForTemplateParam(io_rStruct),
+ aWaitForTemplateEnd(io_rStruct),
aWaitForBase(io_rStruct),
aGotBase(io_rStruct),
aWaitForElement(io_rStruct),
@@ -227,6 +235,10 @@ PE_Struct::State_GotName::Process_Punctuation( const TokPunctuation & i_rToken )
MoveState( Stati().aWaitForElement );
SetResult(done,stay);
break;
+ case TokPunctuation::Lesser:
+ MoveState( Stati().aWaitForTemplateParam );
+ SetResult(done,stay);
+ break;
default:
SetResult(not_done,pop_failure);
} // end switch
@@ -239,6 +251,22 @@ PE_Struct::State_GotName::Process_Punctuation( const TokPunctuation & i_rToken )
}
void
+PE_Struct::State_WaitForTemplateParam::Process_Identifier( const TokIdentifier & i_rToken )
+{
+ Work().Data_Set_TemplateParam(i_rToken.Text());
+ MoveState( Stati().aWaitForTemplateEnd );
+ SetResult(done,stay);
+}
+
+void
+PE_Struct::State_WaitForTemplateEnd::Process_Punctuation( const TokPunctuation & i_rToken )
+{
+ // Assume: TokPunctuation::Greater
+ MoveState( Stati().aGotName );
+ SetResult(done,stay);
+}
+
+void
PE_Struct::State_WaitForBase::On_SubPE_Left()
{
MoveState(Stati().aGotBase);
@@ -322,7 +350,8 @@ PE_Struct::store_Struct()
rCe = Gate().Ces().Store_Struct(
CurNamespace().CeId(),
Work().sData_Name,
- Work().nCurParsed_Base );
+ Work().nCurParsed_Base,
+ Work().sData_TemplateParam );
PassDocuAt(rCe);
Work().nCurStruct = rCe.CeId();
}
@@ -330,4 +359,3 @@ PE_Struct::store_Struct()
} // namespace uidl
} // namespace csi
-