diff options
Diffstat (limited to 'autodoc/source/ary')
50 files changed, 7233 insertions, 53 deletions
diff --git a/autodoc/source/ary/idl/i_attribute.cxx b/autodoc/source/ary/idl/i_attribute.cxx new file mode 100644 index 000000000000..8612d98003ca --- /dev/null +++ b/autodoc/source/ary/idl/i_attribute.cxx @@ -0,0 +1,157 @@ +/************************************************************************* + * + * $RCSfile: i_attribute.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:12:38 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include <precomp.h> +#include <ary/idl/i_attribute.hxx> +#include <ary/idl/ik_attribute.hxx> + + +// NOT FULLY DECLARED SERVICES +#include <ary/idl/ihost_ce.hxx> + + +namespace ary +{ +namespace idl +{ + + +Attribute::Attribute( const String & i_sName, + Ce_id i_nService, + Ce_id i_nModule, + Type_id i_nType, + bool i_bReadonly ) + : sName(i_sName), + nOwner(i_nService), + nNameRoom(i_nModule), + nType(i_nType), + bReadonly(i_bReadonly) +{ +} + +Attribute::~Attribute() +{ +} + + +void +Attribute::do_Visit_CeHost( CeHost & o_rHost ) const +{ + o_rHost.Do_Attribute(*this); +} + +RCid +Attribute::inq_ClassId() const +{ + return class_id; +} + +const String & +Attribute::inq_LocalName() const +{ + return sName; +} + +Ce_id +Attribute::inq_NameRoom() const +{ + return nNameRoom; +} + +Ce_id +Attribute::inq_Owner() const +{ + return nOwner; +} + +E_SightLevel +Attribute::inq_SightLevel() const +{ + return sl_Member; +} + +namespace ifc_attribute +{ + +inline const Attribute & +attribute_cast( const CodeEntity & i_ce ) +{ + csv_assert( i_ce.ClassId() == Attribute::class_id ); + return static_cast< const Attribute& >(i_ce); +} + +bool +attr::IsReadOnly( const CodeEntity & i_ce ) +{ + return attribute_cast(i_ce).bReadonly; +} + +Type_id +attr::Type( const CodeEntity & i_ce ) +{ + return attribute_cast(i_ce).nType; +} + +} // namespace ifc_attribute + + +} // namespace idl +} // namespace ary diff --git a/autodoc/source/ary/idl/i_ce.cxx b/autodoc/source/ary/idl/i_ce.cxx new file mode 100644 index 000000000000..781931315a8e --- /dev/null +++ b/autodoc/source/ary/idl/i_ce.cxx @@ -0,0 +1,131 @@ +/************************************************************************* + * + * $RCSfile: i_ce.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:12:39 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + + +#include <precomp.h> +#include <ary/idl/i_ce.hxx> + + +// NOT FULLY DEFINED SERVICES +#include <ary/idl/ihost_ce.hxx> +#include <ary_i/codeinf2.hxx> +#include <getncast.hxx> + + +namespace ary +{ +namespace idl +{ + +namespace +{ + const Ce_2s aConstCe2sDummy; +} + + + +CodeEntity::CodeEntity() + : pDocu(0), + p2s(0) +{ +} + +CodeEntity::~CodeEntity() +{ +} + +const Ce_2s & +CodeEntity::Secondaries() const +{ + if (p2s) + return *p2s; + return aConstCe2sDummy; +} + +Ce_2s & +CodeEntity::Secondaries() +{ + if (p2s) + return *p2s; + p2s = Ce_2s::Create_(ClassId()); + return *p2s; +} + +void +CodeEntity::Set_Docu( DYN ary::info::CodeInformation * pass_dpDocu ) +{ + pDocu = pass_dpDocu; +} + +void +CodeEntity::do_Visit(::ary::Host & o_rHost) const +{ + CeHost * + pHost = ptr_cast( &o_rHost, T2T<CeHost>() ); + if ( pHost != 0 ) + do_Visit_CeHost(*pHost); +} + + +} // namespace idl +} // namespace ary + + diff --git a/autodoc/source/ary/idl/i_ce2s.cxx b/autodoc/source/ary/idl/i_ce2s.cxx new file mode 100644 index 000000000000..305e2dc77542 --- /dev/null +++ b/autodoc/source/ary/idl/i_ce2s.cxx @@ -0,0 +1,120 @@ +/************************************************************************* + * + * $RCSfile: i_ce2s.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:12:40 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + + +#include <precomp.h> +#include <ary/idl/i_ce.hxx> + + +// NOT FULLY DEFINED SERVICES +#include <cosv/template/tpltools.hxx> +#include <ary/idl/ihost_ce.hxx> +#include <ary_i/codeinf2.hxx> +#include <getncast.hxx> + + +namespace ary +{ +namespace idl +{ + +namespace +{ +const std::vector<Ce_id> C_sNullVector_Ce_ids; +} + + +Ce_2s::~Ce_2s() +{ + csv::erase_container_of_heap_ptrs(aXrefLists); +} + +DYN Ce_2s * +Ce_2s::Create_( RCid i_nCeClass) +{ + return new Ce_2s; +} + + +std::vector<Ce_id> & +Ce_2s::Access_List( int i_indexOfList ) +{ + csv_assert(i_indexOfList >= 0 AND i_indexOfList < 1000); + + while (i_indexOfList >= (int) aXrefLists.size()) + { + aXrefLists.push_back(new std::vector<Ce_id>); + } + return *aXrefLists[i_indexOfList]; +} + +const std::vector<Ce_id> & +Ce_2s::List( int i_indexOfList ) const +{ + if (uintt(i_indexOfList) < aXrefLists.size()) + return *aXrefLists[i_indexOfList]; + else + return C_sNullVector_Ce_ids; +} + + +} // namespace idl +} // namespace ary diff --git a/autodoc/source/ary/idl/i_constant.cxx b/autodoc/source/ary/idl/i_constant.cxx new file mode 100644 index 000000000000..826c44e0d690 --- /dev/null +++ b/autodoc/source/ary/idl/i_constant.cxx @@ -0,0 +1,187 @@ +/************************************************************************* + * + * $RCSfile: i_constant.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:12:42 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include <precomp.h> +#include <ary/idl/i_constant.hxx> + + +// NOT FULLY DECLARED SERVICES +#include <ary/idl/ihost_ce.hxx> +#include <ary/idl/ik_constant.hxx> + + +namespace ary +{ +namespace idl +{ + +Constant::Constant( const String & i_sName, + Ce_id i_nOwner, + Ce_id i_nNameRoom, + Type_id i_nType, + const String & i_sInitValue ) + : sName(i_sName), + nOwner(i_nOwner), + nNameRoom(i_nNameRoom), + nType(i_nType), + sInitValue(i_sInitValue) +{ +} + +Constant::~Constant() +{ +} + +#if ENABLE_UDM + +namespace +{ +enum E_Data_Constant +{ + mid_Base = 0, + mid_Name, + mid_Owner, + mid_NameRoom, + mid_Type, + mid_InitValue, + mid_MAX +}; +} + +void +Constant::SetupUdmTraits_( udm::struct_traits<Constant> & o_rTraits ) +{ + o_rTraits.reserve( mid_MAX ); + udm::add_traits_base( o_rTraits, csv::Type2Type<CodeEntity>(), mid_Base ); + udm::add_traits_member( o_rTraits, &Constant::sName, mid_Name ); + udm::add_traits_member( o_rTraits, &Constant::nOwner, mid_Owner ); + udm::add_traits_member( o_rTraits, &Constant::nNameRoom, mid_NameRoom ); + udm::add_traits_member( o_rTraits, &Constant::nType, mid_Type ); + udm::add_traits_member( o_rTraits, &Constant::sInitValue, mid_InitValue ); +} +#endif // ENABLE_UDM + + +void +Constant::do_Visit_CeHost( CeHost & o_rHost ) const +{ + o_rHost.Do_Constant(*this); +} + + +RCid +Constant::inq_ClassId() const +{ + return class_id; +} + +const String & +Constant::inq_LocalName() const +{ + return sName; +} + +Ce_id +Constant::inq_NameRoom() const +{ + return nNameRoom; +} + +Ce_id +Constant::inq_Owner() const +{ + return nOwner; +} + +E_SightLevel +Constant::inq_SightLevel() const +{ + return sl_Member; +} + + +namespace ifc_constant +{ + +inline const Constant & +constant_cast( const CodeEntity & i_ce ) +{ + csv_assert( i_ce.ClassId() == Constant::class_id ); + return static_cast< const Constant& >(i_ce); +} + +Type_id +attr::Type( const CodeEntity & i_ce ) +{ + return constant_cast(i_ce).nType; +} + +const String & +attr::Value( const CodeEntity & i_ce ) +{ + return constant_cast(i_ce).sInitValue; +} + +} // namespace ifc_constant + + +} // namespace idl +} // namespace ary diff --git a/autodoc/source/ary/idl/i_constgroup.cxx b/autodoc/source/ary/idl/i_constgroup.cxx new file mode 100644 index 000000000000..a1c094ebf856 --- /dev/null +++ b/autodoc/source/ary/idl/i_constgroup.cxx @@ -0,0 +1,148 @@ +/************************************************************************* + * + * $RCSfile: i_constgroup.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:12:43 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include <precomp.h> +#include <ary/idl/i_constgroup.hxx> +#include <ary/idl/ik_constgroup.hxx> + + +// NOT FULLY DECLARED SERVICES +#include <ary/idl/ihost_ce.hxx> +#include <sci_impl.hxx> + + +namespace ary +{ +namespace idl +{ + + +ConstantsGroup::ConstantsGroup( const String & i_sName, + Ce_id i_nModule ) + : sName(i_sName), + nModule(i_nModule), + aConstants() +{ +} + +ConstantsGroup::~ConstantsGroup() +{ +} + +void +ConstantsGroup::do_Visit_CeHost( CeHost & o_rHost ) const +{ + o_rHost.Do_ConstantsGroup(*this); +} + +RCid +ConstantsGroup::inq_ClassId() const +{ + return class_id; +} + +const String & +ConstantsGroup::inq_LocalName() const +{ + return sName; +} + +Ce_id +ConstantsGroup::inq_NameRoom() const +{ + return nModule; +} + +Ce_id +ConstantsGroup::inq_Owner() const +{ + return nModule; +} + +E_SightLevel +ConstantsGroup::inq_SightLevel() const +{ + return sl_File; +} + + +namespace ifc_constgroup +{ + +inline const ConstantsGroup & +constgroup_cast( const CodeEntity & i_ce ) +{ + csv_assert( i_ce.ClassId() == ConstantsGroup::class_id ); + return static_cast< const ConstantsGroup& >(i_ce); +} + +void +attr::Get_Constants( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(constgroup_cast(i_ce).aConstants); +} + +} // namespace ifc_constgroup + + +} // namespace idl +} // namespace ary diff --git a/autodoc/source/ary/idl/i_enum.cxx b/autodoc/source/ary/idl/i_enum.cxx new file mode 100644 index 000000000000..ba6ff69fd1ad --- /dev/null +++ b/autodoc/source/ary/idl/i_enum.cxx @@ -0,0 +1,170 @@ +/************************************************************************* + * + * $RCSfile: i_enum.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:12:43 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include <precomp.h> +#include <ary/idl/i_enum.hxx> +#include <ary/idl/ik_enum.hxx> + + +// NOT FULLY DECLARED SERVICES +#include <ary/idl/ihost_ce.hxx> +#include <sci_impl.hxx> +#include "ipi_2s.hxx" + + +namespace ary +{ +namespace idl +{ + +Enum::Enum( const String & i_sName, + Ce_id i_nOwner ) + : sName(i_sName), + nOwner(i_nOwner), + aValues() +{ +} + +Enum::~Enum() +{ +} + +void +Enum::do_Visit_CeHost( CeHost & o_rHost ) const +{ + o_rHost.Do_Enum(*this); +} + +RCid +Enum::inq_ClassId() const +{ + return class_id; +} + +const String & +Enum::inq_LocalName() const +{ + return sName; +} + +Ce_id +Enum::inq_NameRoom() const +{ + return nOwner; +} + +Ce_id +Enum::inq_Owner() const +{ + return nOwner; +} + +E_SightLevel +Enum::inq_SightLevel() const +{ + return sl_File; +} + + +namespace ifc_enum +{ + +inline const Enum & +enum_cast( const CodeEntity & i_ce ) +{ + csv_assert( i_ce.ClassId() == Enum::class_id ); + return static_cast< const Enum& >(i_ce); +} + +void +attr::Get_Values( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(enum_cast(i_ce).aValues); +} + + +void +xref::Get_SynonymTypedefs( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(enum_2s_SynonymTypedefs)); +} + +void +xref::Get_AsReturns( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(enum_2s_AsReturns)); +} + +void +xref::Get_AsParameters( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(enum_2s_AsParameters)); +} + +} // namespace ifc_enum + + +} // namespace idl +} // namespace ary diff --git a/autodoc/source/ary/idl/i_enumvalue.cxx b/autodoc/source/ary/idl/i_enumvalue.cxx new file mode 100644 index 000000000000..dbaae2300f44 --- /dev/null +++ b/autodoc/source/ary/idl/i_enumvalue.cxx @@ -0,0 +1,150 @@ +/************************************************************************* + * + * $RCSfile: i_enumvalue.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:12:45 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include <precomp.h> +#include <ary/idl/i_enumvalue.hxx> + + +// NOT FULLY DECLARED SERVICES +#include <ary/idl/ihost_ce.hxx> +#include <ary/idl/ik_enumvalue.hxx> + + +namespace ary +{ +namespace idl +{ + +EnumValue::EnumValue( const String & i_sName, + Ce_id i_nOwner, + Ce_id i_nNameRoom, + const String & i_sInitValue ) + : sName(i_sName), + nOwner(i_nOwner), + nNameRoom(i_nNameRoom), + sValue(i_sInitValue) +{ +} + +EnumValue::~EnumValue() +{ +} + +void +EnumValue::do_Visit_CeHost( CeHost & o_rHost ) const +{ + o_rHost.Do_EnumValue(*this); +} + +RCid +EnumValue::inq_ClassId() const +{ + return class_id; +} + +const String & +EnumValue::inq_LocalName() const +{ + return sName; +} + +Ce_id +EnumValue::inq_NameRoom() const +{ + return nNameRoom; +} + +Ce_id +EnumValue::inq_Owner() const +{ + return nOwner; +} + +E_SightLevel +EnumValue::inq_SightLevel() const +{ + return sl_Member; +} + + + +namespace ifc_enumvalue +{ + +inline const EnumValue & +enumvalue_cast( const CodeEntity & i_ce ) +{ + csv_assert( i_ce.ClassId() == EnumValue::class_id ); + return static_cast< const EnumValue& >(i_ce); +} + +const String & +attr::Value( const CodeEntity & i_ce ) +{ + return enumvalue_cast(i_ce).sValue; +} + + +} // namespace ifc_enumvalue + + +} // namespace idl +} // namespace ary diff --git a/autodoc/source/ary/idl/i_exception.cxx b/autodoc/source/ary/idl/i_exception.cxx new file mode 100644 index 000000000000..4370dfa92b38 --- /dev/null +++ b/autodoc/source/ary/idl/i_exception.cxx @@ -0,0 +1,173 @@ +/************************************************************************* + * + * $RCSfile: i_exception.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:12:46 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include <precomp.h> +#include <ary/idl/i_exception.hxx> +#include <ary/idl/ik_exception.hxx> + + +// NOT FULLY DECLARED SERVICES +#include <ary/idl/ihost_ce.hxx> +#include <sci_impl.hxx> +#include "ipi_2s.hxx" + +namespace ary +{ +namespace idl +{ + +Exception::Exception( const String & i_sName, + Ce_id i_nOwner, + Type_id i_nBase ) + : sName(i_sName), + nOwner(i_nOwner), + nBase(i_nBase), + aElements() +{ +} + +Exception::~Exception() +{ +} + +void +Exception::do_Visit_CeHost( CeHost & o_rHost ) const +{ + SCI_Vector<Ce_id> + itElements(aElements); + o_rHost.Do_Exception(*this); +} + +RCid +Exception::inq_ClassId() const +{ + return class_id; +} + +const String & +Exception::inq_LocalName() const +{ + return sName; +} + +Ce_id +Exception::inq_NameRoom() const +{ + return nOwner; +} + +Ce_id +Exception::inq_Owner() const +{ + return nOwner; +} + +E_SightLevel +Exception::inq_SightLevel() const +{ + return sl_File; +} + + +namespace ifc_exception +{ + +inline const Exception & +exception_cast( const CodeEntity & i_ce ) +{ + csv_assert( i_ce.ClassId() == Exception::class_id ); + return static_cast< const Exception& >(i_ce); +} + +Type_id +attr::Base( const CodeEntity & i_ce ) +{ + return exception_cast(i_ce).nBase; +} + +void +attr::Get_Elements( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>( exception_cast(i_ce).aElements ); +} + + +void +xref::Get_Derivations( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(exception_2s_Derivations)); +} + +void +xref::Get_RaisingFunctions( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(exception_2s_RaisingFunctions)); +} + + +} // namespace ifc_exception + + +} // namespace idl +} // namespace ary diff --git a/autodoc/source/ary/idl/i_function.cxx b/autodoc/source/ary/idl/i_function.cxx new file mode 100644 index 000000000000..0e5bcb8b8d64 --- /dev/null +++ b/autodoc/source/ary/idl/i_function.cxx @@ -0,0 +1,187 @@ +/************************************************************************* + * + * $RCSfile: i_function.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:12:47 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include <precomp.h> +#include <ary/idl/i_function.hxx> + + +// NOT FULLY DECLARED SERVICES +#include <ary/idl/ihost_ce.hxx> +#include <sci_impl.hxx> + + + +namespace ary +{ +namespace idl +{ + +Function::Function( const String & i_sName, + Ce_id i_nOwner, + Ce_id i_nNameRoom, + Type_id i_nReturnType, + bool i_bConst, + bool i_bOneWay ) + : sName(i_sName), + nOwner(i_nOwner), + nNameRoom(i_nNameRoom), + nReturnType(i_nReturnType), + aParameters(), + aExceptions(), + bConst(i_bConst), + bOneWay(i_bOneWay) +{ +} + +Function::~Function() +{ +} + +void +Function::do_Visit_CeHost( CeHost & o_rHost ) const +{ + o_rHost.Do_Function( *this ); +} + + +RCid +Function::inq_ClassId() const +{ + return class_id; +} + +const String & +Function::inq_LocalName() const +{ + return sName; +} + +Ce_id +Function::inq_NameRoom() const +{ + return nNameRoom; +} + +Ce_id +Function::inq_Owner() const +{ + return nOwner; +} + +E_SightLevel +Function::inq_SightLevel() const +{ + return sl_Member; +} + + +namespace ifc_function +{ + +inline const Function & +function_cast( const CodeEntity & i_ce ) +{ + csv_assert( i_ce.ClassId() == Function::class_id ); + return static_cast< const Function& >(i_ce); +} + +Type_id +attr::ReturnType( const CodeEntity & i_ce ) +{ + return function_cast(i_ce).nReturnType; +} + +bool +attr::IsConst( const CodeEntity & i_ce ) +{ + return function_cast(i_ce).bConst; +} + +bool +attr::IsOneway( const CodeEntity & i_ce ) +{ + return function_cast(i_ce).bOneWay; +} + +void +attr::Get_Parameters( Dyn_StdConstIterator<ary::idl::Parameter> & o_result, + const CodeEntity & i_ce ) +{ + o_result + = new SCI_Vector<Parameter>( function_cast(i_ce).aParameters ); +} + +void +attr::Get_Exceptions( Dyn_TypeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result + = new SCI_Vector<Type_id>( function_cast(i_ce).aExceptions ); +} + + + + + +} // namespace ifc_function + +} // namespace idl +} // namespace ary diff --git a/autodoc/source/ary/idl/i_interface.cxx b/autodoc/source/ary/idl/i_interface.cxx new file mode 100644 index 000000000000..2c9833a77333 --- /dev/null +++ b/autodoc/source/ary/idl/i_interface.cxx @@ -0,0 +1,222 @@ +/************************************************************************* + * + * $RCSfile: i_interface.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:12:47 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include <precomp.h> +#include <ary/idl/i_interface.hxx> + + +// NOT FULLY DECLARED SERVICES +#include <ary/idl/ihost_ce.hxx> +#include <ary/idl/ik_interface.hxx> +#include <sci_impl.hxx> +#include "ipi_2s.hxx" + + +namespace ary +{ +namespace idl +{ + + +class Interface_2s +{ +}; + + +Interface::Interface( const String & i_sName, + Ce_id i_nOwner, + Type_id i_nBase ) + : sName(i_sName), + nOwner(i_nOwner), + nBase(i_nBase), + aFunctions() +{ +} + +Interface::~Interface() +{ +} + +void +Interface::do_Visit_CeHost( CeHost & o_rHost ) const +{ + o_rHost.Do_Interface(*this); +} + +RCid +Interface::inq_ClassId() const +{ + return class_id; +} + +const String & +Interface::inq_LocalName() const +{ + return sName; +} + +Ce_id +Interface::inq_NameRoom() const +{ + return nOwner; +} + +Ce_id +Interface::inq_Owner() const +{ + return nOwner; +} + +E_SightLevel +Interface::inq_SightLevel() const +{ + return sl_File; +} + + +namespace ifc_interface +{ + +inline const Interface & +interface_cast( const CodeEntity & i_ce ) +{ + csv_assert( i_ce.ClassId() == Interface::class_id ); + return static_cast< const Interface& >(i_ce); +} + + +Type_id +attr::Base( const CodeEntity & i_ce ) +{ + return interface_cast(i_ce).nBase; +} + + +void +attr::Get_Functions( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(interface_cast(i_ce).aFunctions); +} + +void +attr::Get_Attributes( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(interface_cast(i_ce).aAttributes); +} + +void +xref::Get_Derivations( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(interface_2s_Derivations)); +} + +void +xref::Get_SynonymTypedefs( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(interface_2s_SynonymTypedefs)); +} + +void +xref::Get_ExportingServices( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(interface_2s_ExportingServices)); +} + +void +xref::Get_AsReturns( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(interface_2s_AsReturns)); +} + +void +xref::Get_AsParameters( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(interface_2s_AsParameters)); +} + + +#if 0 + static void Get_UsingTypedefs( /// like: typedef sequence<i_ce.LocalName()> newNameSeq; + Dyn_CeIterator & o_result, + const CodeEntity & i_ce ); + static void Get_AsIndirectReturns( + Dyn_CeIterator & o_result, + const CodeEntity & i_ce ); + static void Get_AsIndirectParameters( + Dyn_CeIterator & o_result, + const CodeEntity & i_ce ); +#endif // 0 + + + +} // namespace ifc_interface + + +} // namespace idl +} // namespace ary + diff --git a/autodoc/source/ary/idl/i_module.cxx b/autodoc/source/ary/idl/i_module.cxx new file mode 100644 index 000000000000..4e0ad4123900 --- /dev/null +++ b/autodoc/source/ary/idl/i_module.cxx @@ -0,0 +1,279 @@ +/************************************************************************* + * + * $RCSfile: i_module.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:12:48 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include <precomp.h> +#include <ary/idl/i_module.hxx> +#include <ary/idl/ik_module.hxx> + +// NOT FULLY DECLARED SERVICES +#include <ary/idl/i_gate.hxx> +#include <ary/idl/i_module.hxx> +#include <ary/idl/i_service.hxx> +#include <ary/idl/i_interface.hxx> +#include <ary/idl/i_struct.hxx> +#include <ary/idl/i_exception.hxx> +#include <ary/idl/i_enum.hxx> +#include <ary/idl/i_typedef.hxx> +#include <ary/idl/i_constgroup.hxx> +#include <ary/idl/i_singleton.hxx> +#include <ary/idl/ihost_ce.hxx> +#include <ary/idl/ip_ce.hxx> +#include <nametreenode.hxx> +#include "i_strconst.hxx" + + +namespace ary +{ +namespace idl +{ + +Module::Module() + : pImpl( new NameTreeNode<Ce_id> ) +{ +} + +Module::Module( const String & i_sName, + const Module & i_rParent ) + : pImpl( new NameTreeNode<Ce_id>( i_sName, + *i_rParent.pImpl, + i_rParent.CeId() ) ) +{ +} + +Module::~Module() +{ +} + +void +Module::Add_Name( const String & i_sName, + Ce_id i_nCodeEntity ) +{ + pImpl->Add_Name(i_sName, i_nCodeEntity); +} + + +//void +//Module::Get_FullName( StringVector & o_rText, +// Ce_idList * o_pRelatedCes, +// const Gate & i_rGate ) const +//{ +// if (pImpl->Depth() < 1) +// return; +// +// if (o_pRelatedCes == 0) +// { +// for ( StringVector::const_iterator it = pImpl->NameChain_Begin(); +// it != pImpl->NameChain_End(); +// ++it ) +// { +// o_rText.push_back(strconst::NamespaceSeparator()); +// o_rText.push_back(*it); +// } +// } +// else +// { +// if (pImpl->Depth() > 1) +// { +// i_rGate.Ces().Find_Module(pImpl->Parent()) +// .Get_FullName( o_rText, +// o_pRelatedCes, +// i_rGate ); +// } +// +// o_rText.push_back(strconst::NamespaceSeparator()); +// o_rText.push_back(pImpl->Name()); +// o_pRelatedCes->push_back(CeId()); +// } +//} + +Ce_id +Module::Search_Name( const String & i_sName ) const +{ + return pImpl->Search_Name(i_sName); +} + +void +Module::Get_Names( Dyn_StdConstIterator<Ce_id> & o_rResult ) const +{ + pImpl->Get_Names( o_rResult ); +} + +intt +Module::Depth() const +{ + return pImpl->Depth(); +} + +void +Module::do_Visit_CeHost( CeHost & o_rHost ) const +{ + Dyn_StdConstIterator<Ce_id> + pLocalNames; + pImpl->Get_Names(pLocalNames); + o_rHost.Do_Module(*this); +} + +RCid +Module::inq_ClassId() const +{ + return class_id; +} + +const String & +Module::inq_LocalName() const +{ + return pImpl->Name(); +} + +Ce_id +Module::inq_NameRoom() const +{ + return pImpl->Parent(); +} + +Ce_id +Module::inq_Owner() const +{ + return pImpl->Parent(); +} + +E_SightLevel +Module::inq_SightLevel() const +{ + return sl_Module; +} + + +namespace ifc_module +{ + +inline const Module & +module_cast( const CodeEntity & i_ce ) +{ + csv_assert( i_ce.ClassId() == Module::class_id ); + return static_cast< const Module& >(i_ce); +} + +typedef NameTreeNode<Ce_id>::Map_LocalNames NameMap; + +void +attr::Get_AllChildrenSeparated( std::vector< const CodeEntity* > & o_nestedModules, + std::vector< const CodeEntity* > & o_services, + std::vector< const CodeEntity* > & o_interfaces, + std::vector< const CodeEntity* > & o_structs, + std::vector< const CodeEntity* > & o_exceptions, + std::vector< const CodeEntity* > & o_enums, + std::vector< const CodeEntity* > & o_typedefs, + std::vector< const CodeEntity* > & o_constantGroups, + std::vector< const CodeEntity* > & o_singletons, + const CePilot & i_pilot, + const CodeEntity & i_ce ) +{ + const CodeEntity * + pCe = 0; + NameMap::const_iterator + itEnd = module_cast(i_ce).pImpl->LocalNames().end(); + for ( NameMap::const_iterator + it = module_cast(i_ce).pImpl->LocalNames().begin(); + it != itEnd; + ++it ) + { + pCe = &i_pilot.Find_Ce( (*it).second ); + switch (pCe->ClassId()) + { + case Module::class_id: + o_nestedModules.push_back(pCe); + break; + case Service::class_id: + o_services.push_back(pCe); + break; + case Interface::class_id: + o_interfaces.push_back(pCe); + break; + case Struct::class_id: + o_structs.push_back(pCe); + break; + case Exception::class_id: + o_exceptions.push_back(pCe); + break; + case Enum::class_id: + o_enums.push_back(pCe); + break; + case Typedef::class_id: + o_typedefs.push_back(pCe); + break; + case ConstantsGroup::class_id: + o_constantGroups.push_back(pCe); + break; + case Singleton::class_id: + o_singletons.push_back(pCe); + break; + } + } // end for +} + + +} // namespace ifc_module + + + +} // namespace idl +} // namespace ary diff --git a/autodoc/source/ary/idl/i_nnfinder.hxx b/autodoc/source/ary/idl/i_nnfinder.hxx new file mode 100644 index 000000000000..8824284f9950 --- /dev/null +++ b/autodoc/source/ary/idl/i_nnfinder.hxx @@ -0,0 +1,157 @@ +/************************************************************************* + * + * $RCSfile: i_nnfinder.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:12:50 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifndef ARY_IDL_NNFINDER_HXX +#define ARY_IDL_NNFINDER_HXX + + +// USED SERVICES + // BASE CLASSES + // COMPONENTS + // PARAMETERS +#include <store/st_access.hxx> +#include <store/st_root.hxx> +#include <store/st_unit.hxx> +#include "is_ce.hxx" + +namespace ary +{ +namespace idl +{ + + +/** +*/ +class Find_ModuleNode +{ + public: + typedef Ce_id id_type; + typedef Module node_type; + typedef StringVector::const_iterator name_iterator; + + // LIFECYCLE + Find_ModuleNode( + const Ce_Storage & i_rStorage, + StringVector::const_iterator + it_begin, + StringVector::const_iterator + it_end, + const String & i_sName ) + : rStorage(i_rStorage), + itBegin(it_begin), + itEnd(it_end), + sName2Search(i_sName) { if (itBegin != itEnd ? (*itBegin).empty() : false) ++itBegin; } + // OPERATIONS + const node_type * operator()( + id_type i_nId ) const + { return store::search( rStorage, i_nId, T2T<Module>()); } + + name_iterator Begin() const { return itBegin; } + name_iterator End() const { return itEnd; } + const String & Name2Search() const { return sName2Search; } + + private: + // DATA + const Ce_Storage & rStorage; + name_iterator itBegin; + name_iterator itEnd; + String sName2Search; +}; + + + + +/** Implementation of a node in a namespace-tree. +*/ +class Types_forSetCe_Id +{ + public: + typedef Ce_id element_type; + typedef Ce_Storage find_type; + + struct sort_type + { + sort_type( + const find_type & i_rFinder ) + : rFinder(i_rFinder) {} + + bool operator()( + const element_type & + i_r1, + const element_type & + i_r2 ) const + { + return rFinder[i_r1].Entity().LocalName() + < rFinder[i_r2].Entity().LocalName(); + } + + private: + const find_type & rFinder; + + }; +}; + + +} // namespace idl +} // namespace ary + + +#endif diff --git a/autodoc/source/ary/idl/i_param.cxx b/autodoc/source/ary/idl/i_param.cxx new file mode 100644 index 000000000000..5e417a08ddec --- /dev/null +++ b/autodoc/source/ary/idl/i_param.cxx @@ -0,0 +1,131 @@ +/************************************************************************* + * + * $RCSfile: i_param.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:12:51 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include <precomp.h> +#include <ary/idl/i_param.hxx> + + +// NOT FULLY DEFINED SERVICES +#if ENABLE_UDM +#include <udm/tt_incl.hxx> +#endif // ENABLE_UDM + + + +namespace ary +{ +namespace idl +{ + + +Parameter::Parameter() + : sName(), + nType(0), + eDirection(param_in) +{ +} + + +Parameter::Parameter( const String & i_sName, + Type_id i_nType, + E_ParameterDirection i_eDirection ) + : sName(i_sName), + nType(i_nType), + eDirection(i_eDirection) +{ +} + +Parameter::~Parameter() +{ +} + + +#if ENABLE_UDM +namespace +{ +enum E_Data_Parameter +{ + mid_Name, + mid_Type, + mid_Direction, + mid_MAX +}; +} + +void +Parameter::SetupUdmTraits_( udm::struct_traits<Parameter> & o_rTraits ) +{ + o_rTraits.reserve( mid_MAX ); + udm::add_traits_member( o_rTraits, &Parameter::sName, mid_Name ); + udm::add_traits_member( o_rTraits, &Parameter::nType, mid_Type ); + udm::add_traits_member( o_rTraits, &Parameter::eDirection, mid_Direction ); +} +#endif // ENABLE_UDM + + +} // namespace idl +} // namespace ary + + + +#if ENABLE_UDM +IMPL_UDM_GET_TRAITS( ary::idl::Parameter ); +#endif // ENABLE_UDM diff --git a/autodoc/source/ary/idl/i_property.cxx b/autodoc/source/ary/idl/i_property.cxx new file mode 100644 index 000000000000..88562545e3be --- /dev/null +++ b/autodoc/source/ary/idl/i_property.cxx @@ -0,0 +1,212 @@ +/************************************************************************* + * + * $RCSfile: i_property.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:12:53 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include <precomp.h> +#include <ary/idl/i_property.hxx> +#include <ary/idl/ik_property.hxx> + + +// NOT FULLY DECLARED SERVICES +#include <ary/idl/ihost_ce.hxx> + + +namespace ary +{ +namespace idl +{ + + +Property::Property( const String & i_sName, + Ce_id i_nService, + Ce_id i_nModule, + Type_id i_nType, + Stereotypes i_stereotypes ) + : sName(i_sName), + nOwner(i_nService), + nNameRoom(i_nModule), + nType(i_nType), + aStereotypes(i_stereotypes) +{ +} + +Property::~Property() +{ +} + + +void +Property::do_Visit_CeHost( CeHost & o_rHost ) const +{ + o_rHost.Do_Property(*this); +} + +RCid +Property::inq_ClassId() const +{ + return class_id; +} + +const String & +Property::inq_LocalName() const +{ + return sName; +} + +Ce_id +Property::inq_NameRoom() const +{ + return nNameRoom; +} + +Ce_id +Property::inq_Owner() const +{ + return nOwner; +} + +E_SightLevel +Property::inq_SightLevel() const +{ + return sl_Member; +} + +namespace ifc_property +{ + +inline const Property & +property_cast( const CodeEntity & i_ce ) +{ + csv_assert( i_ce.ClassId() == Property::class_id ); + return static_cast< const Property& >(i_ce); +} + +bool +attr::HasAnyStereotype( const CodeEntity & i_ce ) +{ + return property_cast(i_ce).aStereotypes.HasAny(); +} + +bool +attr::IsReadOnly( const CodeEntity & i_ce ) +{ + return property_cast(i_ce).aStereotypes.IsReadOnly(); +} + +bool +attr::IsBound( const CodeEntity & i_ce ) +{ + return property_cast(i_ce).aStereotypes.IsBound(); +} + +bool +attr::IsConstrained( const CodeEntity & i_ce ) +{ + return property_cast(i_ce).aStereotypes.IsConstrained(); +} + +bool +attr::IsMayBeAmbigious( const CodeEntity & i_ce ) +{ + return property_cast(i_ce).aStereotypes.IsMayBeAmbigious(); +} + +bool +attr::IsMayBeDefault( const CodeEntity & i_ce ) +{ + return property_cast(i_ce).aStereotypes.IsMayBeDefault(); +} + +bool +attr::IsMayBeVoid( const CodeEntity & i_ce ) +{ + return property_cast(i_ce).aStereotypes.IsMayBeVoid(); +} + +bool +attr::IsRemovable( const CodeEntity & i_ce ) +{ + return property_cast(i_ce).aStereotypes.IsRemovable(); +} + +bool +attr::IsTransient( const CodeEntity & i_ce ) +{ + return property_cast(i_ce).aStereotypes.IsTransient(); +} + +Type_id +attr::Type( const CodeEntity & i_ce ) +{ + return property_cast(i_ce).nType; +} + +} // namespace ifc_property + + +} // namespace idl +} // namespace ary + + + + +#if ENABLE_UDM +IMPL_UDM_GET_TRAITS( ary::idl::Property ); +#endif // ENABLE_UDM diff --git a/autodoc/source/ary/idl/i_reposypart.cxx b/autodoc/source/ary/idl/i_reposypart.cxx new file mode 100644 index 000000000000..27010942f1cb --- /dev/null +++ b/autodoc/source/ary/idl/i_reposypart.cxx @@ -0,0 +1,166 @@ +/************************************************************************* + * + * $RCSfile: i_reposypart.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:12:54 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2002 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + + +#include <precomp.h> +#include <idl/i_reposypart.hxx> + + +// NOT FULLY DEFINED SERVICES +#include <commonpart.hxx> +#include "ii_gate.hxx" +#include "ipi_ce.hxx" +#include "ipi_type.hxx" +#include "ipi_2s.hxx" +#include "is_ce.hxx" +#include "is_type.hxx" + + + + +namespace ary +{ +namespace idl +{ + + +//************** CheshireCat *****************// + +struct RepositoryPartition::CheshireCat +{ + public: + // LIFECYCLE + CheshireCat( + const n22::RepositoryCenter & + i_rRepository ); + ~CheshireCat(); + + // DATA + Ce_Storage aCeStorage; + Type_Storage aTypeStorage; + + Dyn<CePilot_Inst> pCePilot; + Dyn<TypePilot_Inst> pTypePilot; + Dyn<SecondariesPilot_Inst> + pSecondariesPilot; + + Dyn<Gate_Inst> pGate; + + const n22::RepositoryCenter * + pCenter; +}; + +RepositoryPartition:: +CheshireCat::CheshireCat( const n22::RepositoryCenter & i_rRepository ) + : aCeStorage(), + aTypeStorage(), + pCePilot(), + pTypePilot(), + pSecondariesPilot(), + pGate(), + pCenter(&i_rRepository) +{ + pCePilot = new CePilot_Inst( aCeStorage ); + pTypePilot = new TypePilot_Inst( aTypeStorage, *pCePilot ); + pSecondariesPilot = new SecondariesPilot_Inst( aCeStorage, aTypeStorage ); + pGate = new Gate_Inst( *pCePilot, *pTypePilot, *pSecondariesPilot ); +} + +RepositoryPartition:: +CheshireCat::~CheshireCat() +{ +} + + +//************** RepositoryPartition *****************// + +RepositoryPartition::RepositoryPartition( const n22::RepositoryCenter & i_rRepository ) + : cat(new CheshireCat(i_rRepository)) +{ +} + +RepositoryPartition::~RepositoryPartition() +{ +} + +const Gate & +RepositoryPartition::TheGate() const +{ + return * cat->pGate; +} + + +Gate & +RepositoryPartition::TheGate() +{ + return * cat->pGate; +} + + + + + + + + +} // namespace idl +} // namespace ary + diff --git a/autodoc/source/ary/idl/i_service.cxx b/autodoc/source/ary/idl/i_service.cxx new file mode 100644 index 000000000000..5d08af347f52 --- /dev/null +++ b/autodoc/source/ary/idl/i_service.cxx @@ -0,0 +1,192 @@ +/************************************************************************* + * + * $RCSfile: i_service.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:12:55 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include <precomp.h> +#include <ary/idl/i_service.hxx> + + +// NOT FULLY DECLARED SERVICES +#include <ary/idl/ihost_ce.hxx> +#include <ary/idl/ik_service.hxx> +#include <sci_impl.hxx> +#include "ipi_2s.hxx" + + +namespace ary +{ +namespace idl +{ + +Service::Service( const String & i_sName, + Ce_id i_nOwner ) + : sName(i_sName), + nOwner(i_nOwner), + aIncludedServices(), + aSupportedInterfaces(), + aProperties() +{ +} + +Service::~Service() +{ +} + +void +Service::Get_SupportedInterfaces( Dyn_StdConstIterator<CommentedReference> & o_rResult ) const +{ + o_rResult = new SCI_Vector<CommentedReference>(aSupportedInterfaces); +} + +void +Service::Get_IncludedServices( Dyn_StdConstIterator<CommentedReference> & o_rResult ) const +{ + o_rResult = new SCI_Vector<CommentedReference>(aIncludedServices); +} + +void +Service::do_Visit_CeHost( CeHost & o_rHost ) const +{ + o_rHost.Do_Service(*this); +} + +RCid +Service::inq_ClassId() const +{ + return class_id; +} + +const String & +Service::inq_LocalName() const +{ + return sName; +} + +Ce_id +Service::inq_NameRoom() const +{ + return nOwner; +} + +Ce_id +Service::inq_Owner() const +{ + return nOwner; +} + +E_SightLevel +Service::inq_SightLevel() const +{ + return sl_File; +} + + +namespace ifc_service +{ + +inline const Service & +service_cast( const CodeEntity & i_ce ) +{ + csv_assert( i_ce.ClassId() == Service::class_id ); + return static_cast< const Service& >(i_ce); +} + +void +attr::Get_IncludedServices( Dyn_StdConstIterator<CommentedReference> & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<CommentedReference>( service_cast(i_ce).aIncludedServices ); +} + +void +attr::Get_ExportedInterfaces( Dyn_StdConstIterator<CommentedReference> & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<CommentedReference>( service_cast(i_ce).aSupportedInterfaces ); +} + +void +attr::Get_Properties( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>( service_cast(i_ce).aProperties ); +} + +void +xref::Get_IncludingServices( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(service_2s_IncludingServices)); +} + +void +xref::Get_InstantiatingSingletons( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(service_2s_InstantiatingSingletons)); +} + + +} // namespace ifc_service + + +} // namespace idl +} // namespace ary + diff --git a/autodoc/source/ary/idl/i_singleton.cxx b/autodoc/source/ary/idl/i_singleton.cxx new file mode 100644 index 000000000000..ae5e5ef7d14a --- /dev/null +++ b/autodoc/source/ary/idl/i_singleton.cxx @@ -0,0 +1,147 @@ +/************************************************************************* + * + * $RCSfile: i_singleton.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:12:56 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include <precomp.h> +#include <ary/idl/i_singleton.hxx> + + +// NOT FULLY DECLARED SERVICES +#include <ary/idl/ihost_ce.hxx> +#include <ary/idl/ik_singleton.hxx> +#include <sci_impl.hxx> + + +namespace ary +{ +namespace idl +{ + +Singleton::Singleton( const String & i_sName, + Ce_id i_nOwner ) + : sName(i_sName), + nOwner(i_nOwner), + nService() +{ +} + +Singleton::~Singleton() +{ +} + +void +Singleton::do_Visit_CeHost( CeHost & o_rHost ) const +{ + o_rHost.Do_Singleton(*this); +} + +RCid +Singleton::inq_ClassId() const +{ + return class_id; +} + +const String & +Singleton::inq_LocalName() const +{ + return sName; +} + +Ce_id +Singleton::inq_NameRoom() const +{ + return nOwner; +} + +Ce_id +Singleton::inq_Owner() const +{ + return nOwner; +} + +E_SightLevel +Singleton::inq_SightLevel() const +{ + return sl_File; +} + + +namespace ifc_singleton +{ + +inline const Singleton & +singleton_cast( const CodeEntity & i_ce ) +{ + csv_assert( i_ce.ClassId() == Singleton::class_id ); + return static_cast< const Singleton& >(i_ce); +} + +Type_id +attr::AssociatedService( const CodeEntity & i_ce ) +{ + return singleton_cast(i_ce).nService; +} + +} // namespace ifc_singleton + + +} // namespace idl +} // namespace ary + diff --git a/autodoc/source/ary/idl/i_strconst.cxx b/autodoc/source/ary/idl/i_strconst.cxx new file mode 100644 index 000000000000..e1f687a2a905 --- /dev/null +++ b/autodoc/source/ary/idl/i_strconst.cxx @@ -0,0 +1,108 @@ +/************************************************************************* + * + * $RCSfile: i_strconst.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:12:57 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include <precomp.h> +// #include <ary/idl/i_strconst.hxx> + + +// NOT FULLY DECLARED SERVICES + + + + +namespace ary +{ +namespace idl +{ +namespace strconst +{ + + +const String C_sNamespaceSeparator("::"); +const String C_sSequenceBegin("sequence< "); +const String C_sSequenceEnd(" >"); + + +const String & +NamespaceSeparator() +{ + return C_sNamespaceSeparator; +} + +const String & +SequenceBegin() +{ + return C_sSequenceBegin; +} +const String & +SequenceEnd() +{ + return C_sSequenceEnd; +} + + +} // namespace strconst +} // namespace idl +} // namespace ary + + + + diff --git a/autodoc/source/ary/idl/i_strconst.hxx b/autodoc/source/ary/idl/i_strconst.hxx new file mode 100644 index 000000000000..184122abd14f --- /dev/null +++ b/autodoc/source/ary/idl/i_strconst.hxx @@ -0,0 +1,99 @@ +/************************************************************************* + * + * $RCSfile: i_strconst.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:12:58 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifndef ARY_IDL_I_STRCONST_HXX +#define ARY_IDL_I_STRCONST_HXX + + + +// USED SERVICES + // BASE CLASSES + // COMPONENTS + // PARAMETERS + + + +namespace ary +{ +namespace idl +{ + +namespace strconst +{ + +const String & +NamespaceSeparator(); // "::" +const String & +SequenceBegin(); // "sequence< " +const String & +SequenceEnd(); // " >" + + +} // namespace strconst + + + +} // namespace idl +} // namespace ary + +#endif + + diff --git a/autodoc/source/ary/idl/i_struct.cxx b/autodoc/source/ary/idl/i_struct.cxx new file mode 100644 index 000000000000..14d288a13f66 --- /dev/null +++ b/autodoc/source/ary/idl/i_struct.cxx @@ -0,0 +1,189 @@ +/************************************************************************* + * + * $RCSfile: i_struct.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:12:59 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include <precomp.h> +#include <ary/idl/i_struct.hxx> +#include <ary/idl/ik_struct.hxx> + + +// NOT FULLY DECLARED SERVICES +#include <ary/idl/ihost_ce.hxx> +#include <sci_impl.hxx> +#include "ipi_2s.hxx" + + +namespace ary +{ +namespace idl +{ + +Struct::Struct( const String & i_sName, + Ce_id i_nOwner, + Type_id i_nBase ) + : sName(i_sName), + nOwner(i_nOwner), + nBase(i_nBase), + aElements() +{ +} + +Struct::~Struct() +{ +} + +void +Struct::do_Visit_CeHost( CeHost & o_rHost ) const +{ + SCI_Vector<Ce_id> + itElements(aElements); + o_rHost.Do_Struct(*this); +} + +RCid +Struct::inq_ClassId() const +{ + return class_id; +} + +const String & +Struct::inq_LocalName() const +{ + return sName; +} + +Ce_id +Struct::inq_NameRoom() const +{ + return nOwner; +} + +Ce_id +Struct::inq_Owner() const +{ + return nOwner; +} + +E_SightLevel +Struct::inq_SightLevel() const +{ + return sl_File; +} + + +namespace ifc_struct +{ + +inline const Struct & +struct_cast( const CodeEntity & i_ce ) +{ + csv_assert( i_ce.ClassId() == Struct::class_id ); + return static_cast< const Struct& >(i_ce); +} + +Type_id +attr::Base( const CodeEntity & i_ce ) +{ + return struct_cast(i_ce).nBase; +} + +void +attr::Get_Elements( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>( struct_cast(i_ce).aElements ); +} + + +void +xref::Get_Derivations( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(struct_2s_Derivations)); +} + +void +xref::Get_SynonymTypedefs( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(struct_2s_SynonymTypedefs)); +} + +void +xref::Get_AsReturns( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(struct_2s_AsReturns)); +} + +void +xref::Get_AsParameters( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(struct_2s_AsParameters)); +} + +} // namespace ifc_struct + + + +} // namespace idl +} // namespace ary + diff --git a/autodoc/source/ary/idl/i_structelem.cxx b/autodoc/source/ary/idl/i_structelem.cxx new file mode 100644 index 000000000000..9a11d24b9804 --- /dev/null +++ b/autodoc/source/ary/idl/i_structelem.cxx @@ -0,0 +1,151 @@ +/************************************************************************* + * + * $RCSfile: i_structelem.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:13:01 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include <precomp.h> +#include <ary/idl/i_structelem.hxx> +#include <ary/idl/ik_structelem.hxx> + + +// NOT FULLY DECLARED SERVICES +#include <ary/idl/ihost_ce.hxx> +#include <sci_impl.hxx> + + +namespace ary +{ +namespace idl +{ + + +StructElement::StructElement( const String & i_sName, + Ce_id i_nOwner, + Ce_id i_nNameRoom, + Type_id i_nType ) + : sName(i_sName), + nOwner(i_nOwner), + nNameRoom(i_nNameRoom), + nType(i_nType) +{ +} + +StructElement::~StructElement() +{ +} + +void +StructElement::do_Visit_CeHost( CeHost & o_rHost ) const +{ + o_rHost.Do_StructElement(*this); +} + +RCid +StructElement::inq_ClassId() const +{ + return class_id; +} + +const String & +StructElement::inq_LocalName() const +{ + return sName; +} + +Ce_id +StructElement::inq_NameRoom() const +{ + return nNameRoom; +} + +Ce_id +StructElement::inq_Owner() const +{ + return nOwner; +} + +E_SightLevel +StructElement::inq_SightLevel() const +{ + return sl_Member; +} + + +namespace ifc_structelement +{ + +inline const StructElement & +selem_cast( const CodeEntity & i_ce ) +{ + csv_assert( i_ce.ClassId() == StructElement::class_id ); + return static_cast< const StructElement& >(i_ce); +} + +Type_id +attr::Type( const CodeEntity & i_ce ) +{ + return selem_cast(i_ce).nType; +} + +} // namespace ifc_structelement + + + +} // namespace idl +} // namespace ary diff --git a/autodoc/source/ary/idl/i_typedef.cxx b/autodoc/source/ary/idl/i_typedef.cxx new file mode 100644 index 000000000000..0ce6a8e165af --- /dev/null +++ b/autodoc/source/ary/idl/i_typedef.cxx @@ -0,0 +1,172 @@ +/************************************************************************* + * + * $RCSfile: i_typedef.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:13:02 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include <precomp.h> +#include <ary/idl/i_typedef.hxx> +#include <ary/idl/ik_typedef.hxx> + + +// NOT FULLY DECLARED SERVICES +#include <ary/idl/ihost_ce.hxx> +#include <sci_impl.hxx> +#include "ipi_2s.hxx" + + +namespace ary +{ +namespace idl +{ + + +Typedef::Typedef( const String & i_sName, + Ce_id i_nOwner, + Type_id i_nDefiningType ) + : sName(i_sName), + nOwner(i_nOwner), + nDefiningType(i_nDefiningType) +{ +} + +Typedef::~Typedef() +{ +} + +void +Typedef::do_Visit_CeHost( CeHost & o_rHost ) const +{ + o_rHost.Do_Typedef(*this); +} + +RCid +Typedef::inq_ClassId() const +{ + return class_id; +} + +const String & +Typedef::inq_LocalName() const +{ + return sName; +} + +Ce_id +Typedef::inq_NameRoom() const +{ + return nOwner; +} + +Ce_id +Typedef::inq_Owner() const +{ + return nOwner; +} + +E_SightLevel +Typedef::inq_SightLevel() const +{ + return sl_File; +} + + +namespace ifc_typedef +{ + +inline const Typedef & +typedef_cast( const CodeEntity & i_ce ) +{ + csv_assert( i_ce.ClassId() == Typedef::class_id ); + return static_cast< const Typedef& >(i_ce); +} + +Type_id +attr::DefiningType( const CodeEntity & i_ce ) +{ + return typedef_cast(i_ce).nDefiningType; +} + + +void +xref::Get_SynonymTypedefs( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(typedef_2s_SynonymTypedefs)); +} + +void +xref::Get_AsReturns( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(typedef_2s_AsReturns)); +} + +void +xref::Get_AsParameters( Dyn_CeIterator & o_result, + const CodeEntity & i_ce ) +{ + o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(typedef_2s_AsParameters)); +} + +} // namespace ifc_typedef + + + +} // namespace idl +} // namespace ary diff --git a/autodoc/source/ary/idl/is_ce.cxx b/autodoc/source/ary/idl/is_ce.cxx new file mode 100644 index 000000000000..71d2aa99a69f --- /dev/null +++ b/autodoc/source/ary/idl/is_ce.cxx @@ -0,0 +1,113 @@ +/************************************************************************* + * + * $RCSfile: is_ce.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:13:11 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + + +#include <precomp.h> +#include "is_ce.hxx" + +// NOT FULLY DEFINED SERVICES + + + +namespace ary +{ +namespace idl +{ + + +namespace +{ +const uintt C_nReservedElements = predefined::ce_MAX; // Skipping "0" and the GlobalNamespace +} + + +Ce_Storage::Ce_Storage( uintt i_nBLOCK_SIZE_LOG_2, + uintt i_nInitialNrOfBlocks ) + : aContainer(i_nBLOCK_SIZE_LOG_2, C_nReservedElements, i_nInitialNrOfBlocks) +{ +} + +Ce_Storage::~Ce_Storage() +{ +} + +void +Ce_Storage::EraseAll() +{ + aContainer.EraseAll(); +} + +void +Ce_Storage::Save( PersistenceAdmin & io_rSaver ) const +{ + // KORR_FUTURE +} + +void +Ce_Storage::Load( PersistenceAdmin & io_rLoader ) +{ + // KORR_FUTURE +} + + +} // namespace idl +} // namespace ary + diff --git a/autodoc/source/ary/idl/is_ce.hxx b/autodoc/source/ary/idl/is_ce.hxx new file mode 100644 index 000000000000..e70db14185ad --- /dev/null +++ b/autodoc/source/ary/idl/is_ce.hxx @@ -0,0 +1,144 @@ +/************************************************************************* + * + * $RCSfile: is_ce.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:13:12 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifndef ARY_IDL_IS_CE_HXX +#define ARY_IDL_IS_CE_HXX + + + +// USED SERVICES + // BASE CLASSES +#include <store/storage.hxx> + // COMPONENTS +#include <ary/idl/i_ce.hxx> +#include <store/st_root.hxx> +#include "is_ce_indices.hxx" + // PARAMETERS + + + +namespace ary +{ +namespace idl +{ + +class PersistenceAdmin; + + +class Ce_Storage : public ::ary::store22::Storage +{ + public: + typedef CodeEntity element_base_type; + typedef ary::store::StorageUnit<element_base_type> unit; + typedef ary::store::Root<unit> container; + typedef TypedId<element_base_type> key; + + // LIFECYCLE + Ce_Storage( + uintt i_nBLOCK_SIZE_LOG_2 = 10, + uintt i_nInitialNrOfBlocks = 2 ); + ~Ce_Storage(); + + // OPERATORS + const unit & operator[]( + key i_nId ) const + { return aContainer[i_nId]; } + unit & operator[]( + key i_nId ) + { return aContainer[i_nId]; } + // OPERATIONS + void EraseAll(); + void Save( + PersistenceAdmin & io_rSaver ) const; + void Load( + PersistenceAdmin & io_rLoader ); + // INQUIRY + const container & Container() const { return aContainer; } + // ACCESS + container & Container() { return aContainer; } + + private: + // DATA + container aContainer; +}; + + + + +namespace predefined +{ + +enum E_CodeEntity +{ + ce_GlobalNamespace = 1, + ce_MAX +}; + +} // namespace predefined + + + +} // namespace idl +} // namespace ary + +#endif + + diff --git a/autodoc/source/ary/idl/is_type.cxx b/autodoc/source/ary/idl/is_type.cxx new file mode 100644 index 000000000000..93305e0b33e0 --- /dev/null +++ b/autodoc/source/ary/idl/is_type.cxx @@ -0,0 +1,114 @@ +/************************************************************************* + * + * $RCSfile: is_type.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:13:15 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + + +#include <precomp.h> +#include "is_type.hxx" + + +// NOT FULLY DEFINED SERVICES + + + +namespace ary +{ +namespace idl +{ + +namespace +{ +const uintt C_nReservedElements = predefined::type_MAX; // Skipping "0" and the GlobalNamespace +} + + +Type_Storage::Type_Storage( uintt i_nBLOCK_SIZE_LOG_2, + uintt i_nInitialNrOfBlocks ) + : aContainer(i_nBLOCK_SIZE_LOG_2, C_nReservedElements, i_nInitialNrOfBlocks) +{ +} + +Type_Storage::~Type_Storage() +{ +} + +void +Type_Storage::EraseAll() +{ + aContainer.EraseAll(); +} + +void +Type_Storage::Save( PersistenceAdmin & io_rSaver ) const +{ + // KORR_FUTURE +} + +void +Type_Storage::Load( PersistenceAdmin & io_rLoader ) +{ + // KORR_FUTURE +} + + + +} // namespace idl +} // namespace ary + diff --git a/autodoc/source/ary/idl/is_type.hxx b/autodoc/source/ary/idl/is_type.hxx new file mode 100644 index 000000000000..ab3ce195ccbe --- /dev/null +++ b/autodoc/source/ary/idl/is_type.hxx @@ -0,0 +1,160 @@ +/************************************************************************* + * + * $RCSfile: is_type.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:13:16 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifndef ARY_IDL_IS_TYPE_HXX +#define ARY_IDL_IS_TYPE_HXX + + + +// USED SERVICES + // BASE CLASSES +#include <store/storage.hxx> + // COMPONENTS +#include <ary/idl/i_type.hxx> +#include <store/st_root.hxx> +#include "is_type_indices.hxx" + // PARAMETERS + + +namespace ary +{ +namespace idl +{ + + +class PersistenceAdmin; + + +class Type_Storage : public ::ary::store22::Storage +{ + public: + typedef Type element_base_type; + typedef ary::store::StorageUnit<element_base_type> unit; + typedef ary::store::Root<unit> container; + typedef TypedId<element_base_type> key; + + // LIFECYCLE + Type_Storage( + uintt i_nBLOCK_SIZE_LOG_2 = 10, + uintt i_nInitialNrOfBlocks = 2 ); + ~Type_Storage(); + + // OPERATORS + const unit & operator[]( + key i_nId ) const + { return aContainer[i_nId]; } + unit & operator[]( + key i_nId ) + { return aContainer[i_nId]; } + // OPERATIONS + void EraseAll(); + void Save( + PersistenceAdmin & io_rSaver ) const; + void Load( + PersistenceAdmin & io_rLoader ); + // INQUIRY + const container & Container() const { return aContainer; } + // ACCESS + container & Container() { return aContainer; } + Type_StorageIndices & + Indices() { return aIndices; } + private: + // DATA + container aContainer; + Type_StorageIndices aIndices; +}; + + + +namespace predefined +{ + +enum E_Type +{ + type_Root_ofXNameRooms = 1, + type_GlobalXNameRoom, + type_any, + type_boolean, + type_byte, + type_char, + type_double, + type_float, + type_hyper, + type_long, + type_short, + type_string, + type_type, + type_void, + type_u_hyper, + type_u_long, + type_u_short, + type_MAX +}; + + +} // namespace predefined + +} // namespace idl +} // namespace ary + +#endif + + diff --git a/autodoc/source/ary/idl/it_builtin.cxx b/autodoc/source/ary/idl/it_builtin.cxx new file mode 100644 index 000000000000..b2d82325d8be --- /dev/null +++ b/autodoc/source/ary/idl/it_builtin.cxx @@ -0,0 +1,114 @@ +/************************************************************************* + * + * $RCSfile: it_builtin.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:13:19 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + + +#include <precomp.h> +#include "it_builtin.hxx" + + +// NOT FULLY DEFINED SERVICES +#include "i_strconst.hxx" + + + +namespace ary +{ +namespace idl +{ + + + +BuiltInType::BuiltInType( const char * i_sName ) + : Named_Type(i_sName) +{ +} + +BuiltInType::~BuiltInType() +{ +} + +void +BuiltInType::do_Visit( Host & io_rHost ) const +{ + // yet unused. +} + +RCid +BuiltInType::inq_ClassId() const +{ + return class_id; +} + +void +BuiltInType::inq_Get_Text( StringVector & o_module, + String & o_name, + Ce_id & o_nRelatedCe, + int & o_nSequemceCount, + const Gate & i_rGate ) const +{ + o_name = Name(); +} + + + +} // namespace idl +} // namespace ary + diff --git a/autodoc/source/ary/idl/it_builtin.hxx b/autodoc/source/ary/idl/it_builtin.hxx new file mode 100644 index 000000000000..9aec1665ef23 --- /dev/null +++ b/autodoc/source/ary/idl/it_builtin.hxx @@ -0,0 +1,115 @@ +/************************************************************************* + * + * $RCSfile: it_builtin.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:13:20 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifndef ARY_IDL_IT_BUILTIN_HXX +#define ARY_IDL_IT_BUILTIN_HXX + + + +// USED SERVICES + // BASE CLASSES +#include "it_named.hxx" + // COMPONENTS + // PARAMETERS + + +namespace ary +{ +namespace idl +{ + + + +/** A type defined by the IDL language. +*/ +class BuiltInType : public Named_Type +{ + public: + enum E_ClassId { class_id = 2200 }; + + // LIFECYCLE + BuiltInType( + const char * i_sName ); + virtual ~BuiltInType(); + + private: + // Interface RepositoryEntity: + virtual void do_Visit( Host & io_rHost ) const; + virtual RCid inq_ClassId() const; + + // Interface Type: + virtual void inq_Get_Text( + StringVector & o_module, + String & o_name, + Ce_id & o_nRelatedCe, + int & o_nSequemceCount, + const Gate & i_rGate ) const; +}; + + + + +} // namespace idl +} // namespace ary + + +#endif + diff --git a/autodoc/source/ary/idl/it_ce.cxx b/autodoc/source/ary/idl/it_ce.cxx new file mode 100644 index 000000000000..013502331585 --- /dev/null +++ b/autodoc/source/ary/idl/it_ce.cxx @@ -0,0 +1,127 @@ +/************************************************************************* + * + * $RCSfile: it_ce.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:13:21 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + + +#include <precomp.h> +#include "it_ce.hxx" + + +// NOT FULLY DEFINED SERVICES +#include <ary/idl/i_ce.hxx> +#include <ary/idl/i_gate.hxx> +#include <ary/idl/i_module.hxx> +#include <ary/idl/ip_ce.hxx> +#include "i_strconst.hxx" + + + +namespace ary +{ +namespace idl +{ + + +Ce_Type::Ce_Type( Ce_id i_nRelatedCe ) + : nRelatedCe(i_nRelatedCe) +{ +} + +Ce_Type::~Ce_Type() +{ +} + +void +Ce_Type::do_Visit( Host & io_rHost ) const +{ + // yet unused. +} + +RCid +Ce_Type::inq_ClassId() const +{ + return class_id; +} + +void +Ce_Type::inq_Get_Text( StringVector & o_module, + String & o_name, + Ce_id & o_nRelatedCe, + int & o_nSequemceCount, + const Gate & i_rGate ) const +{ + String sDummyMember; + + const CodeEntity & + rCe = i_rGate.Ces().Find_Ce(nRelatedCe); + i_rGate.Ces().Get_Text( o_module, + o_name, + sDummyMember, + rCe ); + o_nRelatedCe = nRelatedCe; +} + + + + + +} // namespace idl +} // namespace ary + diff --git a/autodoc/source/ary/idl/it_ce.hxx b/autodoc/source/ary/idl/it_ce.hxx new file mode 100644 index 000000000000..dfd711d8f586 --- /dev/null +++ b/autodoc/source/ary/idl/it_ce.hxx @@ -0,0 +1,121 @@ +/************************************************************************* + * + * $RCSfile: it_ce.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:13:22 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifndef ARY_IDL_IT_CE_HXX +#define ARY_IDL_IT_CE_HXX + + + +// USED SERVICES + // BASE CLASSES +#include <ary/idl/i_type.hxx> + // COMPONENTS + // PARAMETERS + + +namespace ary +{ +namespace idl +{ + + + + +/** A named @->Type related to its corresponding + @->CodeEntity. +*/ +class Ce_Type : public Type +{ + public: + enum E_ClassId { class_id = 2201 }; + + // LIFECYCLE + Ce_Type( + Ce_id i_nRelatedCe ); + virtual ~Ce_Type(); + + // INQUIRY + Ce_id RelatedCe() const { return nRelatedCe; } + + private: + // Interface RepositoryEntity: + virtual void do_Visit( Host & io_rHost ) const; + virtual RCid inq_ClassId() const; + + // Interface Type: + virtual void inq_Get_Text( + StringVector & o_module, + String & o_name, + Ce_id & o_nRelatedCe, + int & o_nSequemceCount, + const Gate & i_rGate ) const; + // DATA + Ce_id nRelatedCe; +}; + + + +} // namespace idl +} // namespace ary + + +#endif + diff --git a/autodoc/source/ary/idl/it_explicit.cxx b/autodoc/source/ary/idl/it_explicit.cxx new file mode 100644 index 000000000000..cb4c3eaeca3e --- /dev/null +++ b/autodoc/source/ary/idl/it_explicit.cxx @@ -0,0 +1,128 @@ +/************************************************************************* + * + * $RCSfile: it_explicit.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:13:23 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + + +#include <precomp.h> +#include "it_explicit.hxx" + + +// NOT FULLY DEFINED SERVICES +#include <ary/idl/i_module.hxx> +#include <ary/idl/i_gate.hxx> +#include <ary/idl/ip_ce.hxx> +#include <ary/idl/ip_type.hxx> +#include "i_strconst.hxx" +#include "it_xnameroom.hxx" + + + +namespace ary +{ +namespace idl +{ + + +ExplicitType::ExplicitType( const String & i_sName, + Type_id i_nXNameRoom, + Ce_id i_nModuleOfOccurrence ) + : Named_Type(i_sName), + nXNameRoom(i_nXNameRoom), + nModuleOfOccurrence(i_nModuleOfOccurrence) +{ +} + +ExplicitType::~ExplicitType() +{ +} + +void +ExplicitType::do_Visit( Host & io_rHost ) const +{ + // yet unused. +} + +RCid +ExplicitType::inq_ClassId() const +{ + return class_id; +} + +void +ExplicitType::inq_Get_Text( StringVector & o_module, + String & o_name, + Ce_id & o_nRelatedCe, + int & o_nSequenceCount, + const Gate & i_rGate ) const +{ + const ExplicitNameRoom & + rNameRoom = i_rGate.Types().Find_XNameRoom(nXNameRoom); + rNameRoom.Get_Text(o_module,o_name,o_nRelatedCe,o_nSequenceCount,i_rGate); + + o_name = Name(); +} + + + + + +} // namespace idl +} // namespace ary + diff --git a/autodoc/source/ary/idl/it_explicit.hxx b/autodoc/source/ary/idl/it_explicit.hxx new file mode 100644 index 000000000000..ba1d966b5fc7 --- /dev/null +++ b/autodoc/source/ary/idl/it_explicit.hxx @@ -0,0 +1,125 @@ +/************************************************************************* + * + * $RCSfile: it_explicit.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:13:23 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifndef ARY_IDL_IT_EXPLICIT_HXX +#define ARY_IDL_IT_EXPLICIT_HXX + + + +// USED SERVICES + // BASE CLASSES +#include "it_named.hxx" + // COMPONENTS + // PARAMETERS + + +namespace ary +{ +namespace idl +{ + + + +/** A named @->Type, not yet related to its corresponding + @->CodeEntity. +*/ +class ExplicitType : public Named_Type +{ + public: + enum E_ClassId { class_id = 2203 }; + + // LIFECYCLE + ExplicitType( + const String & i_sName, + Type_id i_nXNameRoom, + Ce_id i_nModuleOfOccurrence ); + virtual ~ExplicitType(); + + // INQUIRY + Ce_id ModuleOfOccurrence() const + { return nModuleOfOccurrence; } + Type_id NameRoom() const { return nXNameRoom; } + + private: + // Interface RepositoryEntity: + virtual void do_Visit( Host & io_rHost ) const; + virtual RCid inq_ClassId() const; + + // Interface Type: + virtual void inq_Get_Text( + StringVector & o_module, + String & o_name, + Ce_id & o_nRelatedCe, + int & o_nSequemceCount, + const Gate & i_rGate ) const; + // DATA + Type_id nXNameRoom; // As written in code. + Ce_id nModuleOfOccurrence; +}; + + + +} // namespace idl +} // namespace ary + + +#endif + diff --git a/autodoc/source/ary/idl/it_named.hxx b/autodoc/source/ary/idl/it_named.hxx new file mode 100644 index 000000000000..dc0199e136d3 --- /dev/null +++ b/autodoc/source/ary/idl/it_named.hxx @@ -0,0 +1,110 @@ +/************************************************************************* + * + * $RCSfile: it_named.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:13:24 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifndef ARY_IDL_IT_NAMED_HXX +#define ARY_IDL_IT_NAMED_HXX + + + +// USED SERVICES + // BASE CLASSES +#include <ary/idl/i_type.hxx> + // COMPONENTS + // PARAMETERS + + +namespace ary +{ +namespace idl +{ + + + + +/** Represents types with a name - in opposite to e.g. sequences, + which do not have one. +*/ +class Named_Type : public Type +{ + public: + // LIFECYCLE + virtual ~Named_Type() {} + + // INQUIRY + const String & Name() const { return sName; } + + protected: + Named_Type( + const String & i_sName ) + : sName(i_sName) { } + private: + // DATA + String sName; +}; + + + +} // namespace idl +} // namespace ary + + +#endif + diff --git a/autodoc/source/ary/idl/it_sequence.cxx b/autodoc/source/ary/idl/it_sequence.cxx new file mode 100644 index 000000000000..5c021e5929cd --- /dev/null +++ b/autodoc/source/ary/idl/it_sequence.cxx @@ -0,0 +1,122 @@ +/************************************************************************* + * + * $RCSfile: it_sequence.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:13:25 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + + +#include <precomp.h> +#include "it_sequence.hxx" + + +// NOT FULLY DEFINED SERVICES +#include <ary/idl/i_gate.hxx> +#include <ary/idl/ip_type.hxx> +#include "i_strconst.hxx" + + + +namespace ary +{ +namespace idl +{ + + +Sequence::Sequence( Type_id i_nRelatedType ) + : nRelatedType(i_nRelatedType) +{ +} + +Sequence::~Sequence() +{ +} + +void +Sequence::do_Visit( Host & io_rHost ) const +{ + // yet unused. +} + +RCid +Sequence::inq_ClassId() const +{ + return class_id; +} + +void +Sequence::inq_Get_Text( StringVector & o_module, + String & o_name, + Ce_id & o_nRelatedCe, + int & o_nSequenceCount, + const Gate & i_rGate ) const +{ + ++o_nSequenceCount; + + i_rGate.Types().Find_Type(nRelatedType) + .Get_Text( o_module, + o_name, + o_nRelatedCe, + o_nSequenceCount, + i_rGate ); +} + + + +} // namespace idl +} // namespace ary + diff --git a/autodoc/source/ary/idl/it_sequence.hxx b/autodoc/source/ary/idl/it_sequence.hxx new file mode 100644 index 000000000000..9cf9466d33ca --- /dev/null +++ b/autodoc/source/ary/idl/it_sequence.hxx @@ -0,0 +1,117 @@ +/************************************************************************* + * + * $RCSfile: it_sequence.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:13:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifndef ARY_IDL_IT_SEQUENCE_HXX +#define ARY_IDL_IT_SEQUENCE_HXX + + + +// USED SERVICES + // BASE CLASSES +#include <ary/idl/i_type.hxx> + // COMPONENTS + // PARAMETERS + + +namespace ary +{ +namespace idl +{ + + +/** A sequence (an array of a type). +*/ +class Sequence : public Type +{ + public: + enum E_ClassId { class_id = 2202 }; + + // LIFECYCLE + Sequence( + Type_id i_nRelatedType ); + virtual ~Sequence(); + + // INQUIRY + Type_id RelatedType() const { return nRelatedType; } + + private: + // Interface RepositoryEntity: + virtual void do_Visit( Host & io_rHost ) const; + virtual RCid inq_ClassId() const; + + // Interface Type: + virtual void inq_Get_Text( + StringVector & o_module, + String & o_name, + Ce_id & o_nRelatedCe, + int & o_nSequemceCount, + const Gate & i_rGate ) const; + // DATA + Type_id nRelatedType; +}; + + +} // namespace idl +} // namespace ary + + +#endif + diff --git a/autodoc/source/ary/idl/it_xnameroom.cxx b/autodoc/source/ary/idl/it_xnameroom.cxx new file mode 100644 index 000000000000..c3f6fb0072f0 --- /dev/null +++ b/autodoc/source/ary/idl/it_xnameroom.cxx @@ -0,0 +1,135 @@ +/************************************************************************* + * + * $RCSfile: it_xnameroom.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:13:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + + +#include <precomp.h> +#include "it_xnameroom.hxx" + + +// NOT FULLY DEFINED SERVICES +#include <cosv/template/tpltools.hxx> +#include <ary/idl/i_gate.hxx> +#include <ary/idl/ip_type.hxx> +#include "i_strconst.hxx" + + + +namespace ary +{ +namespace idl +{ + +ExplicitNameRoom::ExplicitNameRoom() + : aImpl() +{ +} + +ExplicitNameRoom::ExplicitNameRoom( const String & i_sName, + const ExplicitNameRoom & i_rParent ) + : aImpl( i_sName, i_rParent.aImpl, i_rParent.TypeId() ) +{ +} + +ExplicitNameRoom::~ExplicitNameRoom() +{ +} + +void +ExplicitNameRoom::do_Visit( Host & //io_rHost + ) const +{ + // yet unused. +} + +RCid +ExplicitNameRoom::inq_ClassId() const +{ + return class_id; +} + +void +ExplicitNameRoom::inq_Get_Text( StringVector & o_module, + String & o_name, + Ce_id & o_nRelatedCe, + int & o_nSequemceCount, + const Gate & i_rGate ) const +{ + StringVector::const_iterator it = NameChain_Begin(); + if ( it != NameChain_End() + ? (*it).empty() + : false ) + { // Don't put out the root global namespace + ++it; + } + + for ( ; + it != NameChain_End(); + ++it ) + { + o_module.push_back(*it); + } +} + + + + +} // namespace idl +} // namespace ary diff --git a/autodoc/source/ary/idl/it_xnameroom.hxx b/autodoc/source/ary/idl/it_xnameroom.hxx new file mode 100644 index 000000000000..419a849a9162 --- /dev/null +++ b/autodoc/source/ary/idl/it_xnameroom.hxx @@ -0,0 +1,143 @@ +/************************************************************************* + * + * $RCSfile: it_xnameroom.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:13:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifndef ARY_IDL_IT_XNAMEROOM_HXX +#define ARY_IDL_IT_XNAMEROOM_HXX + + +// USED SERVICES + // BASE CLASSES +#include <ary/idl/i_type.hxx> +#include <nametreenode.hxx> + // COMPONENTS + // PARAMETERS + + +namespace ary +{ +namespace idl +{ + + +/** A namespace for @->Type s, as they are explicitely written in code. +*/ +class ExplicitNameRoom : public Type +{ + public: + enum E_ClassId { class_id = 2204 }; + + // LIFECYCLE + ExplicitNameRoom(); + ExplicitNameRoom( + const String & i_sName, + const ExplicitNameRoom & + i_rParent ); + virtual ~ExplicitNameRoom(); + + // OPERATIONS + void Add_Name( + const String & i_sName, + Type_id i_nId ) + { aImpl.Add_Name(i_sName,i_nId); } + // INQUIRY + const String & Name() const { return aImpl.Name(); } + intt Depth() const { return aImpl.Depth(); } + void Get_FullName( + StringVector & o_rText, + Ce_idList * o_pRelatedCes, + const Gate & i_rGate ) const; + bool IsAbsolute() const { return Depth() > 0 + ? (*NameChain_Begin()).empty() + : false; } + Type_id Search_Name( + const String & i_sName ) const + { return aImpl.Search_Name(i_sName); } + + StringVector::const_iterator + NameChain_Begin() const + { return aImpl.NameChain_Begin(); } + StringVector::const_iterator + NameChain_End() const + { return aImpl.NameChain_End(); } + private: + // Interface RepositoryEntity: + virtual void do_Visit( Host & io_rHost ) const; + virtual RCid inq_ClassId() const; + + // Interface Type: + virtual void inq_Get_Text( + StringVector & o_module, + String & o_name, + Ce_id & o_nRelatedCe, + int & o_nSequemceCount, + const Gate & i_rGate ) const; + // Locals + NameTreeNode<Type_id> + aImpl; +}; + + +} // namespace idl +} // namespace ary + + +#endif + diff --git a/autodoc/source/ary/idl/makefile.mk b/autodoc/source/ary/idl/makefile.mk new file mode 100644 index 000000000000..e35b16f231be --- /dev/null +++ b/autodoc/source/ary/idl/makefile.mk @@ -0,0 +1,124 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1 $ +# +# last change: $Author: np $ $Date: 2002-11-01 17:13:30 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library 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 for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRUNTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=autodoc +TARGET=ary_idl + + +# --- Settings ----------------------------------------------------- + +ENABLE_EXCEPTIONS=true +PRJINC=$(PRJ)$/source + +.INCLUDE : settings.mk +.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk + + +# --- Files -------------------------------------------------------- + + +OBJFILES= \ + $(OBJ)$/i_attribute.obj \ + $(OBJ)$/i_ce.obj \ + $(OBJ)$/i_ce2s.obj \ + $(OBJ)$/i_constant.obj \ + $(OBJ)$/i_constgroup.obj \ + $(OBJ)$/i_enum.obj \ + $(OBJ)$/i_enumvalue.obj \ + $(OBJ)$/i_exception.obj \ + $(OBJ)$/i_function.obj \ + $(OBJ)$/i_interface.obj \ + $(OBJ)$/i_module.obj \ + $(OBJ)$/i_param.obj \ + $(OBJ)$/i_property.obj \ + $(OBJ)$/i_reposypart.obj \ + $(OBJ)$/i_service.obj \ + $(OBJ)$/i_singleton.obj \ + $(OBJ)$/i_strconst.obj \ + $(OBJ)$/i_struct.obj \ + $(OBJ)$/i_structelem.obj \ + $(OBJ)$/i_typedef.obj \ + $(OBJ)$/ihost_ce.obj \ + $(OBJ)$/ii_gate.obj \ + $(OBJ)$/ipi_ce.obj \ + $(OBJ)$/ipi_type.obj \ + $(OBJ)$/ipi_2s.obj \ + $(OBJ)$/is_ce.obj \ + $(OBJ)$/is_ce_indices.obj \ + $(OBJ)$/is_type.obj \ + $(OBJ)$/is_type_indices.obj \ + $(OBJ)$/it_builtin.obj \ + $(OBJ)$/it_ce.obj \ + $(OBJ)$/it_explicit.obj \ + $(OBJ)$/it_sequence.obj \ + $(OBJ)$/it_xnameroom.obj + + + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk + + + diff --git a/autodoc/source/ary/inc/cross_refs.hxx b/autodoc/source/ary/inc/cross_refs.hxx new file mode 100644 index 000000000000..1a91f2cfd092 --- /dev/null +++ b/autodoc/source/ary/inc/cross_refs.hxx @@ -0,0 +1,133 @@ +/************************************************************************* + * + * $RCSfile: cross_refs.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:13:40 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifndef ARY_CROSS_REFS_HXX +#define ARY_CROSS_REFS_HXX + + + +// USED SERVICES + // BASE CLASSES + // COMPONENTS + // PARAMETERS +#include "sorted_idset.hxx" + + +template <class VALUE_LIST, class TYPES> +class CrossReferences +{ + public: + typedef TYPES::element_type element; + + /// Checks for double occurences + void Add( + VALUE_LIST::index_type + i_nPosition + const element & i_rElem ); + void Get_List( + Dyn_StdConstIterator<element> & + o_rResult ) const; + private: + SortedIdSet<TYPES> aData[VALUE_LIST::max]; +}; + + + +namespace ary +{ + +template <class TYPES> +class SortedIdSet +{ + public: + typedef typename TYPES::element_type element; + typedef typename TYPES::sort_type sorter; + typedef typename TYPES::find_type finder; + + SortedIdSet( + const finder & i_rFinder ) + : aSorter(i_rFinder), + aData(aSorter) {} + ~SortedIdSet() {} + + void Get_Begin( + Dyn_StdConstIterator<element> & + o_rResult ) + { o_rResult = new SCI_Set<FINDER>(aData); } + void Add( + const element & i_rElement ) + { aData.insert(i_rElement); } + + private: + typedef std::set<element, sorter> Set; + + // DATA + sorter aSorter; + Set aData; +}; + + +} // namespace ary + + + +#endif + diff --git a/autodoc/source/ary/inc/nametree.hxx b/autodoc/source/ary/inc/nametree.hxx index 0fb76629c3ca..6240387fca67 100644 --- a/autodoc/source/ary/inc/nametree.hxx +++ b/autodoc/source/ary/inc/nametree.hxx @@ -2,9 +2,9 @@ * * $RCSfile: nametree.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: np $ $Date: 2002-03-08 14:45:18 $ + * last change: $Author: np $ $Date: 2002-11-01 17:13:43 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -69,6 +69,7 @@ // COMPONENTS #include <ary/ids.hxx> #include "instlist.hxx" +#include "namesort.hxx" // PARAMETERS @@ -79,15 +80,17 @@ namespace ary class NameTree { public: +#if 0 // Test new comparison struct Less_Name { bool operator()( const udmstri & i_r1, const udmstri & i_r2 ) const; }; +#endif // 0 typedef std::map< udmstri, InstanceList, - Less_Name > Map_Name2Inst; + CompareCeNames > Map_Name2Inst; typedef Map_Name2Inst::const_iterator const_iterator; typedef Map_Name2Inst::iterator iterator; diff --git a/autodoc/source/ary/inc/nametreenode.hxx b/autodoc/source/ary/inc/nametreenode.hxx new file mode 100644 index 000000000000..ccee21738a49 --- /dev/null +++ b/autodoc/source/ary/inc/nametreenode.hxx @@ -0,0 +1,262 @@ +/************************************************************************* + * + * $RCSfile: nametreenode.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:13:44 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifndef ARY_NAMETREENODE_HXX +#define ARY_NAMETREENODE_HXX + + +// USED SERVICES + // BASE CLASSES + // COMPONENTS + // PARAMETERS +#include <cosv/template/tpltools.hxx> +#include <sci_impl.hxx> +// HACK because of SunPro 5.2 compiler bug with templates: +#include <ary/idl/i_module.hxx> + + + +namespace ary +{ + + + +/** Implementation of a node in a namespace-tree. +*/ +template<class ITEM_ID> +class NameTreeNode +{ + public: + typedef NameTreeNode self; + typedef ITEM_ID item_id; + typedef StringVector::const_iterator name_iterator; + typedef std::map<String, item_id> Map_LocalNames; + + // LIFECYCLE + NameTreeNode(); + NameTreeNode( + const String & i_sName, + const self & i_rParent, + ITEM_ID i_nParentId ); + virtual ~NameTreeNode(); + + // OPERATIONS + void Add_Name( + const String & i_sName, + item_id i_nId ); + // INQUIRY + const String & Name() const { return Depth() > 0 ? aCompleteNameChain.back() : String::Null_(); } + item_id Parent() const { return nParent; } + intt Depth() const { return aCompleteNameChain.size(); } + + bool IsEquivalent( + const NameTreeNode & + i_rNode ) const; + name_iterator NameChain_Begin() const { return aCompleteNameChain.begin(); } + name_iterator NameChain_End() const { return aCompleteNameChain.end(); } + + item_id Search_Name( + const String & i_sName ) const; + void Get_Names( + Dyn_StdConstIterator<ITEM_ID> & + o_rResult ) const; + const Map_LocalNames & + LocalNames() const { return aLocalNames; } + private: + // Locals + Map_LocalNames & LocalNames() { return aLocalNames; } + + // DATA + Map_LocalNames aLocalNames; + StringVector aCompleteNameChain; + item_id nParent; +}; + + +#if 0 +// Prototypes have to be left out, because of a VC++ 6 compiler bug +// ( compiler reports ambigious overload ). + +template <class FIND_NODE> +typename FIND_NODE::id_type +Search_SubTree( const typename FIND_NODE::node_type & i_rStart, + const FIND_NODE & i_rNodeFinder ); + +template <class FIND_NODE> +typename FIND_NODE::id_type +Search_SubTree_UpTillRoot( const typename FIND_NODE::node_type & i_rStart, + const FIND_NODE & i_rNodeFinder ); +#endif // 0 + + + +// IMPLEMENTATION + +template<class ITEM_ID> +NameTreeNode<ITEM_ID>::NameTreeNode() + : aLocalNames(), + aCompleteNameChain(), + nParent(0) +{ +} + +template<class ITEM_ID> +NameTreeNode<ITEM_ID>::NameTreeNode( const String & i_sName, + const self & i_rParent, + ITEM_ID i_nParentId ) + : aLocalNames(), + aCompleteNameChain(), + nParent(i_nParentId) +{ + aCompleteNameChain.reserve(i_rParent.Depth()+1); + for ( name_iterator it = i_rParent.NameChain_Begin(); + it != i_rParent.NameChain_End(); + ++it ) + { + aCompleteNameChain.push_back(*it); + } + aCompleteNameChain.push_back(i_sName); +} + +template<class ITEM_ID> +NameTreeNode<ITEM_ID>::~NameTreeNode() +{ +} + + +template<class ITEM_ID> +inline void +NameTreeNode<ITEM_ID>::Add_Name( const String & i_sName, + item_id i_nId ) +{ + LocalNames().insert( Map_LocalNames::value_type(i_sName, i_nId) ); +} + + +template<class ITEM_ID> +inline bool +NameTreeNode<ITEM_ID>::IsEquivalent( const NameTreeNode & i_rNode ) const +{ + return aCompleteNameChain == i_rNode.aCompleteNameChain; +} + +template<class ITEM_ID> +inline ITEM_ID +NameTreeNode<ITEM_ID>::Search_Name( const String & i_sName ) const +{ + return csv::value_from_map(LocalNames(),i_sName); +} + +template<class ITEM_ID> +inline void +NameTreeNode<ITEM_ID>::Get_Names( Dyn_StdConstIterator<ITEM_ID> & o_rResult ) const +{ + o_rResult = new SCI_Map<String,item_id>(LocalNames()); +} + + +// HACK because of SunPro 5.2 compiler bug with templates: +// ary::idl::Module has to be "FIND_NODE::node_type" +// must be solved later somehow. +template <class FIND_NODE> +typename FIND_NODE::id_type +Search_SubTree( const ary::idl::Module & i_rStart, + const FIND_NODE & i_rNodeFinder ) +{ + const typename FIND_NODE::node_type * + ret = &i_rStart; + + for ( StringVector::const_iterator it = i_rNodeFinder.Begin(); + it != i_rNodeFinder.End() AND ret != 0; + ++it ) + { + ret = i_rNodeFinder(ret->Search_Name(*it)); + } + + typename FIND_NODE::id_type nret(0); + return ret != 0 + ? ret->Search_Name(i_rNodeFinder.Name2Search()) + : nret; +} + +template <class FIND_NODE> +typename FIND_NODE::id_type +Search_SubTree_UpTillRoot( const ary::idl::Module & i_rStart, + const FIND_NODE & i_rNodeFinder ) +{ + typename FIND_NODE::id_type + ret(0); + for ( const typename FIND_NODE::node_type * start = &i_rStart; + start != 0 AND NOT ret.IsValid(); + start = i_rNodeFinder(start->Owner()) ) + { + ret = Search_SubTree( *start, + i_rNodeFinder ); + } + return ret; +} +// END Hack for SunPro 5.2 compiler bug. + + +} // namespace ary + + +#endif diff --git a/autodoc/source/ary/inc/reposy.hxx b/autodoc/source/ary/inc/reposy.hxx index acd4c724e18f..9b109ce1dfaa 100644 --- a/autodoc/source/ary/inc/reposy.hxx +++ b/autodoc/source/ary/inc/reposy.hxx @@ -2,9 +2,9 @@ * * $RCSfile: reposy.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: np $ $Date: 2002-03-08 14:45:18 $ + * last change: $Author: np $ $Date: 2002-11-01 17:13:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -62,17 +62,99 @@ #ifndef ARY_REPOSY_HXX #define ARY_REPOSY_HXX +// VERSION: Autodoc 2.2 // USED SERVICES // BASE CLASSES #include <ary/ary.hxx> // COMPONENTS +#include <cosv/ploc_dir.hxx> // PARAMETERS + + namespace ary { +namespace cpp +{ +class RepositoryPartition; +} + +namespace idl +{ +class RepositoryPartition; +} + +namespace phyloc +{ +class RepositoryLocation; +} + +namespace action +{ +class Statistic; +} + + +namespace n22 +{ + +/** Implements ::ary::Repository. + + @see Repository +*/ + +class RepositoryCenter : public ::ary::n22::Repository +{ + public: + // LIFECYCLE + RepositoryCenter( + const String & i_sDisplayedName ); + virtual ~RepositoryCenter(); + + // OPERATIONS + void RunCommand_ProduceAllSecondaries(); + void RunCommand_Statistic( + action::Statistic & io_rCommand ); + private: + // Interface Repository: + virtual void do_Perform( ::ary::Command & io_rCommand); + virtual const String & inq_Name() const; + virtual const idl::Gate & inq_Gate_Idl() const; + virtual idl::Gate & access_Gate_Idl(); + +#if 0 // Version 2.2 + virtual const cpp::Gate & inq_Gate_Cpp() const; + virtual cpp::Gate & access_Gate_Cpp(); +#endif // Version 2.2 + + // Local + + // DATA + String sDisplayedName; /// Name to be displayed for human users. + csv::ploc::Directory + aLocation; + Dyn< idl::RepositoryPartition > + pIdlPartition; + +#if 0 // Version 2.2 + Dyn<cpp::RepositoryPartition> + pCppPartition; +#endif // Version 2.2 +}; + + +} // namespace n22 + + + + + + + + /** @task */ @@ -95,9 +177,6 @@ class RepositoryCenter : public Repository inq_Name() const; virtual cpp::RwGate & access_RwGate_Cpp(); - virtual uidl::Gate & - access_RwGate_Idl(); - struct CheshireCat; // DATA diff --git a/autodoc/source/ary/inc/sci_impl.hxx b/autodoc/source/ary/inc/sci_impl.hxx new file mode 100644 index 000000000000..daf3a5e6987f --- /dev/null +++ b/autodoc/source/ary/inc/sci_impl.hxx @@ -0,0 +1,290 @@ +/************************************************************************* + * + * $RCSfile: sci_impl.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:13:48 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifndef ARY_SCI_IMPL_HXX +#define ARY_SCI_IMPL_HXX + + + +// USED SERVICES + // BASE CLASSES +#include <ary/stdconstiter.hxx> + // COMPONENTS + // PARAMETERS + + +namespace ary +{ + + +//************************* SCI_Vector **********************************// + +template <class ELEM> +class SCI_Vector : public StdConstIterator<ELEM> +{ + public: + typedef std::vector<ELEM> source; + typedef source::const_iterator source_iterator; + + SCI_Vector( + const source & i_rSource ); + virtual ~SCI_Vector(); + + private: + // Interface StdConstIterator<>: + virtual void do_Advance(); + virtual const ELEM * + inq_CurElement() const; + virtual bool inq_IsSorted() const; + + // DATA + source_iterator itRun; + source_iterator itEnd; +}; + + + +//************************* SCI_Vector **********************************// + +template <class KEY, class VALUE> +class SCI_Map : public StdConstIterator<VALUE> +{ + public: + typedef std::map<KEY,VALUE> source; + typedef source::const_iterator source_iterator; + + SCI_Map( + const source & i_rSource ); + virtual ~SCI_Map(); + + private: + // Interface StdConstIterator<>: + virtual void do_Advance(); + virtual const VALUE * + inq_CurElement() const; + virtual bool inq_IsSorted() const; + + // DATA + source_iterator itRun; + source_iterator itEnd; +}; + + + +//************************* SCI_Set **********************************// + + +template <class TYPES> +class SCI_Set : public StdConstIterator<typename TYPES::element_type> +{ + public: + typedef typename TYPES::element_type element; + typedef typename TYPES::sort_type sorter; + typedef std::set<element, sorter> source; + typedef source::const_iterator source_iterator; + + SCI_Set( + const source & i_rSource ); + virtual ~SCI_Set(); + + private: + // Interface StdConstIterator<>: + virtual void do_Advance(); + virtual const element * + inq_CurElement() const; + virtual bool inq_IsSorted() const; + + // DATA + source_iterator itRun; + source_iterator itEnd; +}; + + + +// IMPLEMENTATION + +template <class ELEM> +SCI_Vector<ELEM>::SCI_Vector( const source & i_rSource ) + : itRun(i_rSource.begin()), + itEnd(i_rSource.end()) +{ +} + +template <class ELEM> +SCI_Vector<ELEM>::~SCI_Vector() +{ +} + + +template <class ELEM> +void +SCI_Vector<ELEM>::do_Advance() +{ + if (itRun != itEnd) + ++itRun; +} + +template <class ELEM> +const ELEM * +SCI_Vector<ELEM>::inq_CurElement() const +{ + if (itRun != itEnd) + return &(*itRun); + return 0; +} + +template <class ELEM> +bool +SCI_Vector<ELEM>::inq_IsSorted() const +{ + return false; +} + + + + +template <class KEY, class VALUE> +SCI_Map<KEY,VALUE>::SCI_Map( const source & i_rSource ) + : itRun(i_rSource.begin()), + itEnd(i_rSource.end()) +{ +} + +template <class KEY, class VALUE> +SCI_Map<KEY,VALUE>::~SCI_Map() +{ +} + +template <class KEY, class VALUE> +void +SCI_Map<KEY,VALUE>::do_Advance() +{ + if (itRun != itEnd) + ++itRun; +} + +template <class KEY, class VALUE> +const VALUE * +SCI_Map<KEY,VALUE>::inq_CurElement() const +{ + if (itRun != itEnd) + return &(*itRun).second; + return 0; +} + + +template <class KEY, class VALUE> +bool +SCI_Map<KEY,VALUE>::inq_IsSorted() const +{ + return true; +} + + + + + +template <class ELEM> +SCI_Set<ELEM>::SCI_Set( const source & i_rSource ) + : itRun(i_rSource.begin()), + itEnd(i_rSource.end()) +{ +} + +template <class ELEM> +SCI_Set<ELEM>::~SCI_Set() +{ +} + + +template <class ELEM> +void +SCI_Set<ELEM>::do_Advance() +{ + if (itRun != itEnd) + ++itRun; +} + +template <class ELEM> +const typename SCI_Set<ELEM>::element * +SCI_Set<ELEM>::inq_CurElement() const +{ + if (itRun != itEnd) + return &(*itRun); + return 0; +} + +template <class ELEM> +bool +SCI_Set<ELEM>::inq_IsSorted() const +{ + return true; +} + + + + + + +} // namespace ary + + +#endif diff --git a/autodoc/source/ary/inc/sorted_idset.hxx b/autodoc/source/ary/inc/sorted_idset.hxx new file mode 100644 index 000000000000..b4d159a05f5b --- /dev/null +++ b/autodoc/source/ary/inc/sorted_idset.hxx @@ -0,0 +1,131 @@ +/************************************************************************* + * + * $RCSfile: sorted_idset.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:13:49 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifndef ARY_SORTED_IDSET_HXX +#define ARY_SORTED_IDSET_HXX + + + +// USED SERVICES + // BASE CLASSES + // COMPONENTS +#include <set> + // PARAMETERS +#include "csi_impl.hxx" + + +template <class XY> class SortedIdSet; + +class Interface_2s +{ + public: + /// Checks for double occurences + void Add_ExportingService( + Ce_id i_nId ); + void Get_ExportingServices( + Dyn_StdConstIterator<Ce_id> & + o_rResult ) const; + private: + Dyn<SortedIdSet> pExportingServices; +}; + + + +namespace ary +{ + +template <class TYPES> +class SortedIdSet +{ + public: + typedef typename TYPES::element_type element; + typedef typename TYPES::sort_type sorter; + typedef typename TYPES::find_type finder; + + SortedIdSet( + const finder & i_rFinder ) + : aSorter(i_rFinder), + aData(aSorter) {} + ~SortedIdSet() {} + + void Get_Begin( + Dyn_StdConstIterator<element> & + o_rResult ) + { o_rResult = new SCI_Set<FINDER>(aData); } + void Add( + const element & i_rElement ) + { aData.insert(i_rElement); } + + private: + typedef std::set<element, sorter> Set; + + // DATA + sorter aSorter; + Set aData; +}; + + +} // namespace ary + + + +#endif + diff --git a/autodoc/source/ary/kernel/makefile.mk b/autodoc/source/ary/kernel/makefile.mk index 5ff48f90d73f..9670db8f1557 100644 --- a/autodoc/source/ary/kernel/makefile.mk +++ b/autodoc/source/ary/kernel/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.1.1.1 $ +# $Revision: 1.2 $ # -# last change: $Author: np $ $Date: 2002-03-08 14:45:19 $ +# last change: $Author: np $ $Date: 2002-11-01 17:14:07 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -81,17 +81,21 @@ PRJINC=$(PRJ)$/source OBJFILES= \ - $(OBJ)$/ary_disp.obj \ - $(OBJ)$/ce_null.obj \ - $(OBJ)$/cessentl.obj \ - $(OBJ)$/id_gener.obj \ - $(OBJ)$/instlist.obj \ - $(OBJ)$/nametree.obj \ - $(OBJ)$/opertype.obj \ - $(OBJ)$/project.obj \ - $(OBJ)$/quname.obj \ - $(OBJ)$/reposy.obj \ - $(OBJ)$/slots.obj + $(OBJ)$/ary_disp.obj \ + $(OBJ)$/ce_null.obj \ + $(OBJ)$/cessentl.obj \ + $(OBJ)$/id_gener.obj \ + $(OBJ)$/inheritgraph.obj \ + $(OBJ)$/inheritnode.obj \ + $(OBJ)$/instlist.obj \ + $(OBJ)$/namesort.obj \ + $(OBJ)$/nametree.obj \ + $(OBJ)$/opertype.obj \ + $(OBJ)$/project.obj \ + $(OBJ)$/qualiname.obj \ + $(OBJ)$/reposy.obj \ + $(OBJ)$/slots.obj \ + $(OBJ)$/x_ary.obj diff --git a/autodoc/source/ary/kernel/namesort.cxx b/autodoc/source/ary/kernel/namesort.cxx new file mode 100644 index 000000000000..be498017799e --- /dev/null +++ b/autodoc/source/ary/kernel/namesort.cxx @@ -0,0 +1,139 @@ +/************************************************************************* + * + * $RCSfile: namesort.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:14:08 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + + +#include <precomp.h> +#include <namesort.hxx> + + +// NOT FULLY DEFINED SERVICES + + + +namespace +{ + +int C_cAryNameOrdering1[256] = + { 0,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, // 0 .. + 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, + 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, // 32 .. + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,255,255, 255,255,255,255, + + 255, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, // 64 .. + 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61,255, 255,255,255, 63, + 255, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, // 96 .. + 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61,255, 255,255,255,255, + + 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, //128 .. + 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, + 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, //160 .. + 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, + + 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, + 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, + 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, + 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255 + }; + +int C_cAryNameOrdering2[256] = + { 0,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, // 0 .. + 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, + 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, // 32 .. + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,255,255, 255,255,255,255, + + 255, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, // 64 .. + 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61,255, 255,255,255, 63, + 255, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, // 96 .. + 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62,255, 255,255,255,255, + + 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, //128 .. + 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, + 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, //160 .. + 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, + + 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, + 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, + 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, + 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255 + }; +} + + +namespace ary +{ + + + + + +CompareCeNames::CompareCeNames() + : aOrdering1(C_cAryNameOrdering1), + aOrdering2(C_cAryNameOrdering2) +{ +} + + + + +} // namespace ary + + + diff --git a/autodoc/source/ary/kernel/nametree.cxx b/autodoc/source/ary/kernel/nametree.cxx index 2c8cc602ff29..ee4add9de2f7 100644 --- a/autodoc/source/ary/kernel/nametree.cxx +++ b/autodoc/source/ary/kernel/nametree.cxx @@ -2,9 +2,9 @@ * * $RCSfile: nametree.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: np $ $Date: 2002-03-08 14:45:20 $ + * last change: $Author: np $ $Date: 2002-11-01 17:14:09 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -88,27 +88,40 @@ int cCompareValues[128] = }; +#if 0 +#ifdef WNT +#define strcmp_nocase stricmp +#elif (UNX) +#define strcmp_nocase strcasecmp +#else +#error For running Autodoc, 'WNT' or 'UNX' must be defined. +#endif + bool NameTree:: Less_Name::operator()( const udmstri & i_r1, const udmstri & i_r2 ) const { - const unsigned char * - p1 = reinterpret_cast< const unsigned char* >( i_r1.c_str() ); - const unsigned char * - p2 = reinterpret_cast< const unsigned char* >( i_r2.c_str() ); - int cp = 0; - - do { - cp = cCompareValues[*p1] - cCompareValues[*p2++]; - if ( cp < 0 ) - return true; - if ( cp > 0 ) - return false; - } while (*p1++ != 0); - - return false; + int result = strcmp_nocase(i_r1.c_str(),i_r2.c_str()); + if (result != 0) + return result < 0; + + const unsigned char * + p1 = reinterpret_cast< const unsigned char* >( i_r1.c_str() ); + const unsigned char * + p2 = reinterpret_cast< const unsigned char* >( i_r2.c_str() ); + + int cp = 0; + do { + cp = cCompareValues[*p1] - cCompareValues[*p2++]; + if ( cp < 0 ) + return true; + if ( cp > 0 ) + return false; + } while (*p1++ != 0); + return false; } +#endif // 0 NameTree::NameTree() diff --git a/autodoc/source/ary/kernel/qualiname.cxx b/autodoc/source/ary/kernel/qualiname.cxx new file mode 100644 index 000000000000..938fadff1670 --- /dev/null +++ b/autodoc/source/ary/kernel/qualiname.cxx @@ -0,0 +1,139 @@ +/************************************************************************* + * + * $RCSfile: qualiname.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:14:10 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include <precomp.h> +#include <ary/qualiname.hxx> + + +// NOT FULLY DECLARED SERVICES + + +namespace ary +{ + + +QualifiedName::QualifiedName( uintt i_nSize ) + : aNamespace(), + sLocalName(), + bIsAbsolute(false), + bIsFunction() +{ + if (i_nSize > 0) + aNamespace.reserve(i_nSize); +} + +QualifiedName::QualifiedName( const char * i_sText, + const char * i_sSeparator ) + : aNamespace(), + sLocalName(), + bIsAbsolute(false), + bIsFunction() +{ + AssignText(i_sText,i_sSeparator); +} + +QualifiedName::~QualifiedName() +{ +} + +void +QualifiedName::AssignText( const char * i_sText, + const char * i_sSeparator ) +{ + csv_assert(NOT csv::no_str(i_sText) AND NOT csv::no_str(i_sSeparator)); + bIsAbsolute = false; + bIsFunction = false; + csv::erase_container( aNamespace ); + + uintt nSepLen = strlen(i_sSeparator); + const char * sNext = i_sText; + + const char * ps = strstr( i_sText, i_sSeparator ); + if (ps == i_sText) + { + bIsAbsolute = true; + sNext = ps + nSepLen; + } + + for ( ps = strstr(sNext, i_sSeparator); + ps != 0; + ps = strstr(sNext, i_sSeparator) ) + { + String sPart(sNext, ps - sNext); + aNamespace.push_back(sPart); + sNext = ps + nSepLen; + } + + uintt sNameLen = strlen(sNext); + if ( sNameLen > 2 ) + { + ps = sNext + sNameLen - 2; + if (*ps == '(' AND *(ps+1) == ')') + { + sNameLen -= 2; + bIsFunction = true; + } + } + sLocalName = String(sNext,sNameLen); +} + + +} // namespace ary diff --git a/autodoc/source/ary/kernel/reposy.cxx b/autodoc/source/ary/kernel/reposy.cxx index 8f6070212114..419eb90491cf 100644 --- a/autodoc/source/ary/kernel/reposy.cxx +++ b/autodoc/source/ary/kernel/reposy.cxx @@ -2,9 +2,9 @@ * * $RCSfile: reposy.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: np $ $Date: 2002-03-08 14:45:20 $ + * last change: $Author: np $ $Date: 2002-11-01 17:14:11 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -59,24 +59,253 @@ * ************************************************************************/ +// VERSION: Autodoc 2.2 + + #include <precomp.h> #include <reposy.hxx> // NOT FULLY DECLARED SERVICES +#include <ary/x_ary.hxx> +#include <ary/actions.hxx> +#include <idl/i_reposypart.hxx> + + // S P L I T // + #include <store/storage.hxx> #include <store/strg_ifc.hxx> #include <id_gener.hxx> #include <cpp/c_gate.hxx> #include <loc/l_gate.hxx> -#include <store/storage.hxx> -#include "../../ary_i/inc/uidl/gate_i.hxx" namespace ary { + +namespace n22 +{ + +using ::ary::Command; +using ::ary::X_Ary; + +//***************** Repository ************// + +namespace +{ + static Dyn<RepositoryCenter> pTheInstance_(0); +} + +Repository & +Repository::Create_( const String & i_sName ) +{ + if ( pTheInstance_ ) + throw X_Ary(X_Ary::x_MultipleRepository); + + pTheInstance_ = new RepositoryCenter( i_sName ); + return *pTheInstance_; +} + +Repository & +Repository::The_() +{ + if ( pTheInstance_ ) + throw X_Ary(X_Ary::x_MissingRepository); + + return *pTheInstance_; +} + +void +Repository::Destroy_() +{ + pTheInstance_ = 0; +} + + +//***************** RepositoryCenter ************// + + +RepositoryCenter::RepositoryCenter( const String & i_sName ) + : sDisplayedName(i_sName), + aLocation(), +#if 0 // Version 2.2 + pCppPartition(), +#endif // Version 2.2 + pIdlPartition() +{ +} + +RepositoryCenter::~RepositoryCenter() +{ +} + +void +RepositoryCenter::RunCommand_ProduceAllSecondaries() +{ + // KORR_FUTURE +} + +void +RepositoryCenter::RunCommand_Statistic( ::ary::action::Statistic & io_rCommand ) +{ + // KORR_FUTURE +} + +void +RepositoryCenter::do_Perform( Command & io_rCommand ) +{ + io_rCommand.Run(*this); +} + +const String & +RepositoryCenter::inq_Name() const +{ + return sDisplayedName; +} + +const ::ary::idl::Gate & +RepositoryCenter::inq_Gate_Idl() const +{ + return const_cast< RepositoryCenter& >(*this).access_Gate_Idl(); +} + + +::ary::idl::Gate & +RepositoryCenter::access_Gate_Idl() +{ + if (NOT pIdlPartition) + pIdlPartition = new idl::RepositoryPartition(*this); + + return pIdlPartition->TheGate(); +} + + +#if 0 // Version 2.2 +/* +cpp::Gate & +RepositoryCenter::access_Gate_Cpp() +{ + csv_assert( pCppPartition ); + return pCppPartition->TheGate(); +} +const cpp::Gate & +RepositoryCenter::inq_Gate_Cpp() const +{ + csv_assert( pCppPartition ); + return pCppPartition->TheGate(); +} +*/ +#endif // Version 2.2 + + +} // namespace n22 + + + +/* ClassType-Ids + ------------- + + + cpp 1000 + idl 2000 + corba 3000 + java 4000 + information 5000 + logic location 6000 + phys location 7000 + sec. prod. 8000 + + + cpp + --- + Namespace 1000 + Class 1001 + Enum 1002 + Typedef 1003 + Function 1004 + Variable 1005 + EnumValue 1006 + NamespaceAlias 1007 + + BuiltInType 1200 + CeType_Final 1201 + CeType_Extern 1202 + PtrType 1211 + RefType 1212 + ConstType 1221 + VolatileType 1222 + ArrayType 1230 + TemplateInstance 1235 + FunctionPtr 1240 + DataMemberPtr 1250 + OperationMemberPtr 1260 + + TplParam_Type 1301 + TplParam_Value 1302 + + OpSignature 1400 + + Define 1601 + Macro 1602 + + + idl + --- + + Module 2000 + Interface 2001 + Function 2002 + Service 2003 + Property 2004 + Enum 2005 + EnumValue 2006 + Typedef 2007 + Struct 2008 + StructElement 2009 + Exception 2010 + ConstantGroup 2011 + Constant 2012 + Singleton 2013 + Attribute 2014 + + BuiltInType 2200 + CeType 2201 + Sequence 2202 + ExplicitType 2203 + ExplicitNameRoom 2204 + + java + ---- + Package 4000 + Interface 4001 + Class 4002 + + + + + info + ---- + CodeInformation + (IDL) 11002 +*/ + + + + + + + + + + + + // S P L I T // + + + + namespace { static Dyn<RepositoryCenter> pTheInstance_(0); @@ -91,8 +320,6 @@ struct RepositoryCenter::CheshireCat Dyn<IdGenerator> pIdGenerator; Dyn<cpp::Gate> pGate_Cpp; - Dyn<uidl::Gate_Impl> - pGate_Idl; Dyn<loc::Gate> pGate_Locations; CheshireCat( @@ -148,7 +375,7 @@ RepositoryCenter::inq_DisplayGate_Cpp() const const udmstri & RepositoryCenter::inq_Name() const { - return pi->sName; + return pi->sName; } cpp::RwGate & @@ -157,12 +384,6 @@ RepositoryCenter::access_RwGate_Cpp() return *pi->pGate_Cpp; } -uidl::Gate & -RepositoryCenter::access_RwGate_Idl() -{ - return *pi->pGate_Idl; -} - RepositoryCenter:: CheshireCat::CheshireCat( const udmstri & i_sName, @@ -172,7 +393,6 @@ CheshireCat::CheshireCat( const udmstri & i_sName, pStorage_Ifc(0), pIdGenerator( &let_drIds ), pGate_Cpp(0), - pGate_Idl(0), pGate_Locations(0) { pStorage = new store::Storage; @@ -184,7 +404,6 @@ CheshireCat::CheshireCat( const udmstri & i_sName, *pStorage_Ifc, *pIdGenerator, *pGate_Locations ); - pGate_Idl = new uidl::Gate_Impl; } RepositoryCenter:: diff --git a/autodoc/source/ary/kernel/x_ary.cxx b/autodoc/source/ary/kernel/x_ary.cxx new file mode 100644 index 000000000000..5c659052abf8 --- /dev/null +++ b/autodoc/source/ary/kernel/x_ary.cxx @@ -0,0 +1,108 @@ +/************************************************************************* + * + * $RCSfile: x_ary.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: np $ $Date: 2002-11-01 17:14:13 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include <precomp.h> +#include <ary/x_ary.hxx> + + +// NOT FULLY DECLARED SERVICES + + + +namespace ary +{ + + +X_Ary::X_Ary( E_Event i_eEvent ) + : eEvent(i_eEvent) +{ +} + +void +X_Ary::GetInfo( ostream & o_rOutputMedium ) const +{ + switch (eEvent) + { + case x_MultipleRepository: + o_rOutputMedium << "Tried to create a repository instance, though there exists one already."; + break; + case x_MissingRepository: + o_rOutputMedium << "Tried to access the repository, though there exists none."; + break; + case x_EntityNotFound: + o_rOutputMedium << "Code entity not found in repository."; + break; + case x_ConflictingNames: + o_rOutputMedium << "Name of code entity occurs double in different versions."; + break; + case x_UnexpectedTypeOfObject: + o_rOutputMedium << "Name- or id-mismatch: Code entity had other type than expected."; + break; + case x_Any: + default: + o_rOutputMedium << "Unspecified exception in repository."; + } // end switch + o_rOutputMedium << Endl(); +} + + +} // namespace ary + |