2010-10-12 15:46:24 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2002-03-08 13:45:36 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 14:46:20 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2002-03-08 13:45:36 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2002-03-08 13:45:36 +00:00
|
|
|
*
|
2008-04-10 14:46:20 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2002-03-08 13:45:36 +00:00
|
|
|
*
|
2008-04-10 14:46:20 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2002-03-08 13:45:36 +00:00
|
|
|
*
|
2008-04-10 14:46:20 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2002-03-08 13:45:36 +00:00
|
|
|
*
|
2008-04-10 14:46:20 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2002-03-08 13:45:36 +00:00
|
|
|
*
|
2008-04-10 14:46:20 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2002-03-08 13:45:36 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#include <precomp.h>
|
|
|
|
#include <s2_luidl/parsenv2.hxx>
|
|
|
|
|
|
|
|
|
|
|
|
// NOT FULLY DEFINED SERVICES
|
2004-11-15 12:41:10 +00:00
|
|
|
#include <ary/ary.hxx>
|
2007-11-02 16:05:26 +00:00
|
|
|
#include <ary/getncast.hxx>
|
2002-11-01 16:15:51 +00:00
|
|
|
#include <ary/qualiname.hxx>
|
2007-11-02 16:05:26 +00:00
|
|
|
#include <ary/doc/d_oldidldocu.hxx>
|
2002-11-01 16:15:51 +00:00
|
|
|
#include <ary/idl/i_gate.hxx>
|
|
|
|
#include <ary/idl/i_ce.hxx>
|
2007-11-02 16:05:26 +00:00
|
|
|
#include <ary/idl/i_enum.hxx>
|
2005-01-27 10:28:04 +00:00
|
|
|
#include <ary/idl/i_enumvalue.hxx>
|
2007-11-02 16:05:26 +00:00
|
|
|
#include <ary/idl/i_module.hxx>
|
2002-11-01 16:15:51 +00:00
|
|
|
#include <ary/idl/ip_ce.hxx>
|
2005-01-27 10:28:04 +00:00
|
|
|
#include <parser/parserinfo.hxx>
|
|
|
|
#include <adc_msg.hxx>
|
2002-11-01 16:15:51 +00:00
|
|
|
#include <s2_luidl/uidl_tok.hxx>
|
|
|
|
#include <x_parse2.hxx>
|
2002-03-08 13:45:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace csi
|
|
|
|
{
|
|
|
|
namespace uidl
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
UnoIDL_PE::~UnoIDL_PE()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
UnoIDL_PE::EstablishContacts( UnoIDL_PE * io_pParentPE,
|
2007-11-02 16:05:26 +00:00
|
|
|
ary::Repository & io_rRepository,
|
2002-03-08 13:45:36 +00:00
|
|
|
TokenProcessing_Result & o_rResult )
|
|
|
|
{
|
2006-06-19 11:06:21 +00:00
|
|
|
pRepository = &io_rRepository;
|
2004-11-15 12:41:10 +00:00
|
|
|
aMyNode.EstablishContacts(io_pParentPE, io_rRepository.Gate_Idl(), o_rResult);
|
|
|
|
}
|
|
|
|
|
2006-06-19 11:06:21 +00:00
|
|
|
//void
|
|
|
|
//UnoIDL_PE::EstablishContacts( UnoIDL_PE * io_pParentPE,
|
|
|
|
// ary::idl::Gate & io_rGate,
|
|
|
|
// TokenProcessing_Result & o_rResult )
|
|
|
|
//{
|
|
|
|
// aMyNode.EstablishContacts(io_pParentPE, io_rGate, o_rResult);
|
|
|
|
//}
|
2002-03-08 13:45:36 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
UnoIDL_PE::Enter( E_EnvStackAction i_eWayOfEntering )
|
|
|
|
{
|
|
|
|
switch (i_eWayOfEntering)
|
|
|
|
{
|
|
|
|
case push_sure:
|
|
|
|
InitData();
|
|
|
|
break;
|
|
|
|
case push_try:
|
|
|
|
csv_assert(false);
|
|
|
|
break;
|
|
|
|
case pop_success:
|
|
|
|
ReceiveData();
|
|
|
|
break;
|
|
|
|
case pop_failure:
|
2002-11-01 16:15:51 +00:00
|
|
|
throw X_AutodocParser(X_AutodocParser::x_Any);
|
2006-06-19 11:06:21 +00:00
|
|
|
// no break because of throw
|
2002-03-08 13:45:36 +00:00
|
|
|
default:
|
|
|
|
csv_assert(false);
|
|
|
|
} // end switch
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
UnoIDL_PE::Leave( E_EnvStackAction i_eWayOfLeaving )
|
|
|
|
{
|
|
|
|
switch (i_eWayOfLeaving)
|
|
|
|
{
|
|
|
|
case push_sure:
|
|
|
|
break;
|
|
|
|
case push_try:
|
|
|
|
csv_assert(false);
|
|
|
|
break;
|
|
|
|
case pop_success:
|
|
|
|
TransferData();
|
|
|
|
break;
|
|
|
|
case pop_failure:
|
2002-11-01 16:15:51 +00:00
|
|
|
throw X_AutodocParser(X_AutodocParser::x_Any);
|
2006-06-19 11:06:21 +00:00
|
|
|
// no break because of throw
|
2002-03-08 13:45:36 +00:00
|
|
|
default:
|
|
|
|
csv_assert(false);
|
|
|
|
} // end switch
|
|
|
|
}
|
|
|
|
|
2003-03-18 13:11:43 +00:00
|
|
|
void
|
2007-11-02 16:05:26 +00:00
|
|
|
UnoIDL_PE::SetDocu( DYN ary::doc::OldIdlDocu * let_dpDocu )
|
2003-03-18 13:11:43 +00:00
|
|
|
{
|
|
|
|
pDocu = let_dpDocu;
|
|
|
|
}
|
|
|
|
|
2002-03-08 13:45:36 +00:00
|
|
|
void
|
2004-07-12 14:40:14 +00:00
|
|
|
UnoIDL_PE::SetPublished()
|
2002-03-08 13:45:36 +00:00
|
|
|
{
|
|
|
|
if (NOT pDocu)
|
|
|
|
{
|
2007-11-02 16:05:26 +00:00
|
|
|
pDocu = new ary::doc::OldIdlDocu;
|
2002-03-08 13:45:36 +00:00
|
|
|
}
|
2004-07-12 14:40:14 +00:00
|
|
|
pDocu->SetPublished();
|
|
|
|
}
|
2002-03-08 13:45:36 +00:00
|
|
|
|
2004-07-12 14:40:14 +00:00
|
|
|
void
|
|
|
|
UnoIDL_PE::SetOptional()
|
|
|
|
{
|
|
|
|
if (NOT pDocu)
|
|
|
|
{
|
2007-11-02 16:05:26 +00:00
|
|
|
pDocu = new ary::doc::OldIdlDocu;
|
2004-07-12 14:40:14 +00:00
|
|
|
}
|
2002-03-08 13:45:36 +00:00
|
|
|
pDocu->SetOptional();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2002-11-01 16:15:51 +00:00
|
|
|
UnoIDL_PE::PassDocuAt( ary::idl::CodeEntity & io_rCe )
|
2002-03-08 13:45:36 +00:00
|
|
|
{
|
|
|
|
if (pDocu)
|
|
|
|
{
|
2007-11-02 16:05:26 +00:00
|
|
|
io_rCe.Set_Docu(*pDocu.Release());
|
2002-11-01 16:15:51 +00:00
|
|
|
}
|
2005-01-27 10:28:04 +00:00
|
|
|
else if // KORR_FUTURE
|
|
|
|
// Re-enable doc-warning for Enum Values, as soon as there is a
|
|
|
|
// @option -no-doc-for-enumvalues.
|
2007-11-02 16:05:26 +00:00
|
|
|
( NOT ary::is_type<ary::idl::Module>(io_rCe)
|
|
|
|
AND NOT ary::is_type<ary::idl::Enum>(io_rCe) )
|
2002-11-01 16:15:51 +00:00
|
|
|
{
|
2005-01-27 10:28:04 +00:00
|
|
|
TheMessages().Out_MissingDoc(
|
|
|
|
io_rCe.LocalName(),
|
|
|
|
ParseInfo().CurFile(),
|
|
|
|
ParseInfo().CurLine() );
|
2002-03-08 13:45:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
UnoIDL_PE::InitData()
|
|
|
|
{
|
|
|
|
// Needs not anything to do.
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
UnoIDL_PE::ReceiveData()
|
|
|
|
{
|
|
|
|
// Needs not anything to do.
|
|
|
|
}
|
|
|
|
|
2002-11-01 16:15:51 +00:00
|
|
|
const ary::idl::Module &
|
2002-03-08 13:45:36 +00:00
|
|
|
UnoIDL_PE::CurNamespace() const
|
|
|
|
{
|
|
|
|
if ( Parent() != 0 )
|
|
|
|
return Parent()->CurNamespace();
|
|
|
|
else
|
|
|
|
{
|
|
|
|
csv_assert(false);
|
2002-11-01 16:15:51 +00:00
|
|
|
return *(const ary::idl::Module*)0;
|
2002-03-08 13:45:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-01-27 10:28:04 +00:00
|
|
|
const ParserInfo &
|
|
|
|
UnoIDL_PE::ParseInfo() const
|
|
|
|
{
|
|
|
|
if ( Parent() != 0 )
|
|
|
|
return Parent()->ParseInfo();
|
|
|
|
else
|
|
|
|
{
|
|
|
|
csv_assert(false);
|
|
|
|
return *(const ParserInfo*)0;
|
|
|
|
}
|
|
|
|
}
|
2002-03-08 13:45:36 +00:00
|
|
|
|
2006-06-19 11:06:21 +00:00
|
|
|
UnoIDL_PE::UnoIDL_PE()
|
|
|
|
: aMyNode(),
|
|
|
|
pDocu(),
|
|
|
|
pRepository(0)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-03-08 13:45:36 +00:00
|
|
|
} // namespace uidl
|
|
|
|
} // namespace csi
|
2010-10-12 15:46:24 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|