summaryrefslogtreecommitdiff
path: root/autodoc/source/ary/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'autodoc/source/ary/cpp')
-rw-r--r--autodoc/source/ary/cpp/c_class.cxx396
-rw-r--r--autodoc/source/ary/cpp/c_define.cxx152
-rw-r--r--autodoc/source/ary/cpp/c_enum.cxx207
-rw-r--r--autodoc/source/ary/cpp/c_enuval.cxx159
-rw-r--r--autodoc/source/ary/cpp/c_funct.cxx189
-rw-r--r--autodoc/source/ary/cpp/c_macro.cxx171
-rw-r--r--autodoc/source/ary/cpp/c_namesp.cxx360
-rw-r--r--autodoc/source/ary/cpp/c_osigna.cxx120
-rw-r--r--autodoc/source/ary/cpp/c_slots.cxx152
-rw-r--r--autodoc/source/ary/cpp/c_slots.hxx122
-rw-r--r--autodoc/source/ary/cpp/c_tydef.cxx167
-rw-r--r--autodoc/source/ary/cpp/c_vari.cxx171
-rw-r--r--autodoc/source/ary/cpp/ca_type.cxx313
-rw-r--r--autodoc/source/ary/cpp/makefile.mk116
-rw-r--r--autodoc/source/ary/cpp/tplparam.cxx138
-rw-r--r--autodoc/source/ary/cpp/tplparam.hxx142
-rw-r--r--autodoc/source/ary/cpp/usedtype.cxx602
17 files changed, 3677 insertions, 0 deletions
diff --git a/autodoc/source/ary/cpp/c_class.cxx b/autodoc/source/ary/cpp/c_class.cxx
new file mode 100644
index 00000000..242bf4a4
--- /dev/null
+++ b/autodoc/source/ary/cpp/c_class.cxx
@@ -0,0 +1,396 @@
+/*************************************************************************
+ *
+ * $RCSfile: c_class.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: np $ $Date: 2002-03-08 14:45:18 $
+ *
+ * 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/cpp/c_class.hxx>
+
+
+// NOT FULLY DECLARED SERVICES
+#include "rcids.hxx"
+#include <ary/cpp/cpp_disp.hxx>
+#include <slots.hxx>
+#include "c_slots.hxx"
+
+
+
+
+namespace ary
+{
+namespace cpp
+{
+
+Class::Class()
+ : // aEssentials,
+ // aBaseClasses,
+ // aClasses,
+ // aOperations,
+ // aData,
+ eClassKey(CK_class),
+ eProtection(PROTECT_global),
+ eVirtuality(VIRTUAL_none)
+{
+}
+
+Class::Class( Cid i_nId,
+ const udmstri & i_sLocalName,
+ Cid i_nOwner,
+ E_Protection i_eProtection,
+ Lid i_nFile,
+ E_ClassKey i_eClassKey )
+ : aEssentials( i_nId,
+ i_sLocalName,
+ i_nOwner,
+ i_nFile ),
+ // aBaseClasses,
+ // aClasses,
+ // aOperations,
+ // aData,
+ eClassKey(i_eClassKey),
+ eProtection(i_eProtection),
+ eVirtuality(VIRTUAL_none)
+{
+}
+
+Class::~Class()
+{
+}
+
+void
+Class::Add_BaseClass( const S_Classes_Base & i_rBaseClass )
+{
+ aBaseClasses.push_back(i_rBaseClass);
+}
+
+void
+Class::Add_TemplateParameterType( const udmstri & i_sLocalName,
+ Tid i_nIdAsType )
+{
+ aTemplateParameterTypes.push_back(
+ List_TplParam::value_type(i_sLocalName,i_nIdAsType) );
+}
+
+void
+Class::Add_LocalClass( const udmstri & i_sLocalName,
+ Cid i_nId )
+{
+ aClasses.push_back( S_LocalCe(i_sLocalName, i_nId) );
+}
+
+void
+Class::Add_LocalEnum( const udmstri & i_sLocalName,
+ Cid i_nId )
+{
+ aEnums.push_back( S_LocalCe(i_sLocalName, i_nId) );
+}
+
+void
+Class::Add_LocalTypedef( const udmstri & i_sLocalName,
+ Cid i_nId )
+{
+ aTypedefs.push_back( S_LocalCe(i_sLocalName, i_nId) );
+}
+
+void
+Class::Add_LocalOperation( const udmstri & i_sLocalName,
+ OSid i_nOS,
+ Cid i_nId )
+{
+ aOperations.push_back( S_LocalOperation(i_sLocalName, i_nOS, i_nId) );
+}
+
+void
+Class::Add_LocalStaticOperation( const udmstri & i_sLocalName,
+ OSid i_nOS,
+ Cid i_nId )
+{
+ aStaticOperations.push_back( S_LocalOperation(i_sLocalName, i_nOS, i_nId) );
+}
+
+void
+Class::Add_LocalData( const udmstri & i_sLocalName,
+ Cid i_nId )
+{
+ aData.push_back( S_LocalCe(i_sLocalName, i_nId) );
+}
+
+void
+Class::Add_LocalStaticData( const udmstri & i_sLocalName,
+ Cid i_nId )
+{
+ aStaticData.push_back( S_LocalCe(i_sLocalName, i_nId) );
+}
+
+Rid
+Class::Search_LocalClass( const udmstri & i_sName ) const
+{
+ CIterator_Locals itFound = PosOfName(aClasses, i_sName);
+ if (itFound != aClasses.end())
+ return (*itFound).nId;
+ return 0;
+}
+
+Cid
+Class::inq_Id() const
+{
+ return aEssentials.Id();
+}
+
+const udmstri &
+Class::inq_LocalName() const
+{
+ return aEssentials.LocalName();
+}
+
+Cid
+Class::inq_Owner() const
+{
+ return aEssentials.Owner();
+}
+
+Lid
+Class::inq_Location() const
+{
+ return aEssentials.Location();
+}
+
+void
+Class::do_StoreAt( ary::Display & o_rOut ) const
+{
+ ary::cpp::Display * pD = dynamic_cast< ary::cpp::Display* >(&o_rOut);
+ if (pD != 0)
+ {
+ pD->Display_Class(*this);
+ }
+}
+
+RCid
+Class::inq_RC() const
+{
+ return RC_();
+}
+
+
+const ary::Documentation &
+Class::inq_Info() const
+{
+ return aEssentials.Info();
+}
+
+void
+Class::do_Add_Documentation( DYN ary::Documentation & let_drInfo )
+{
+ aEssentials.SetInfo(let_drInfo);
+}
+
+Gid
+Class::inq_Id_Group() const
+{
+ return static_cast<Gid>(aEssentials.Id());
+}
+
+const RepositoryEntity &
+Class::inq_RE_Group() const
+{
+ return *this;
+}
+
+const group::SlotList &
+Class::inq_Slots() const
+{
+ static const SlotAccessId aProjectSlotData[]
+ = { SLOT_Bases,
+ SLOT_NestedClasses,
+ SLOT_Enums,
+ SLOT_Typedefs,
+ SLOT_Operations,
+ SLOT_StaticOperations,
+ SLOT_Data,
+ SLOT_StaticData,
+ SLOT_FriendClasses,
+ SLOT_FriendOperations };
+ static const std::vector< SlotAccessId >
+ aSlots( &aProjectSlotData[0],
+ &aProjectSlotData[0]
+ + sizeof aProjectSlotData / sizeof (SlotAccessId) );
+ return aSlots;
+}
+
+
+DYN Slot *
+Class::inq_Create_Slot( SlotAccessId i_nSlot ) const
+{
+ switch ( i_nSlot )
+ {
+ case SLOT_Bases: return new Slot_BaseClass(aBaseClasses);
+ case SLOT_NestedClasses: return new Slot_ListLocalCe(aClasses);
+ case SLOT_Enums: return new Slot_ListLocalCe(aEnums);
+ case SLOT_Typedefs: return new Slot_ListLocalCe(aTypedefs);
+ case SLOT_Operations: return new Slot_OperationList(aOperations);
+ case SLOT_StaticOperations: return new Slot_OperationList(aStaticOperations);
+ case SLOT_Data: return new Slot_ListLocalCe(aData);
+ case SLOT_StaticData: return new Slot_ListLocalCe(aStaticData);
+ case SLOT_FriendClasses: return new Slot_RidList(aFriendClasses);
+ case SLOT_FriendOperations: return new Slot_RidList(aFriendOperations);
+ default:
+ return new Slot_Null;
+ } // end switch
+}
+
+
+#if 0
+uintt
+Class::Get_LocalClasses( ary::List_Rid & o_rResultList ) const
+{
+ for ( CIterator_Locals it = aClasses.begin();
+ it != aClasses.end();
+ ++it )
+ {
+ o_rResultList.push_back((*it).nId);
+ }
+ return o_rResultList.size();
+}
+
+uintt
+Class::Get_LocalFunctions( ary::List_Rid & o_rResultList ) const
+{
+ for ( List_LocalOperation::const_iterator its = aStaticOperations.begin();
+ its != aStaticOperations.end();
+ ++its )
+ {
+ o_rResultList.push_back((*its).nId);
+ }
+ for ( List_LocalOperation::const_iterator it = aOperations.begin();
+ it != aOperations.end();
+ ++it )
+ {
+ o_rResultList.push_back((*it).nId);
+ }
+ return o_rResultList.size();
+}
+
+const udmstri &
+Class::LocalNameOfOwner() const
+{
+ return LocalName();
+}
+#endif // 0
+
+#if 0
+Cid
+Class::Find_LocalClass( const udmstri & i_sLocalName ) const
+{
+ CIterator_Locals ret = PosOfName(aClasses, i_sLocalName);
+ if (ret != aTypes.end())
+ return static_cast<Cid>( (*ret).nId );
+ return 0;
+}
+
+Tid
+Class::Find_LocalType( const udmstri & i_sLocalName ) const
+{
+ CIterator_Locals ret = PosOfName(aEnums, i_sLocalName);
+ if (ret != aEnums.end())
+ return (*ret).nId;
+ ret = PosOfName(aTypedefs, i_sLocalName);
+ if (ret != aTypedefs.end())
+ return (*ret).nId;
+ ret = PosOfName(aClasses, i_sLocalName);
+ if (ret != aClasses.end())
+ return (*ret).nId;
+ return 0;
+}
+#endif // 0
+
+
+Class::CIterator_Locals
+Class::PosOfName( const List_LocalCe & i_rList,
+ const udmstri & i_sName ) const
+{
+ for ( CIterator_Locals ret = i_rList.begin();
+ ret != i_rList.end();
+ ++ret )
+ {
+ if ( (*ret).sLocalName == i_sName )
+ return ret;
+ }
+ return i_rList.end();
+}
+
+Class::Iterator_Locals
+Class::PosOfName( List_LocalCe & i_rList,
+ const udmstri & i_sName )
+{
+ for ( Iterator_Locals ret = i_rList.begin();
+ ret != i_rList.end();
+ ++ret )
+ {
+ if ( (*ret).sLocalName == i_sName )
+ return ret;
+ }
+ return i_rList.end();
+}
+
+
+} // namespace cpp
+} // namespace ary
+
+
+
diff --git a/autodoc/source/ary/cpp/c_define.cxx b/autodoc/source/ary/cpp/c_define.cxx
new file mode 100644
index 00000000..2d2fb67b
--- /dev/null
+++ b/autodoc/source/ary/cpp/c_define.cxx
@@ -0,0 +1,152 @@
+/*************************************************************************
+ *
+ * $RCSfile: c_define.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: np $ $Date: 2002-03-08 14:45:18 $
+ *
+ * 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/cpp/c_define.hxx>
+
+
+// NOT FULLY DECLARED SERVICES
+#include "rcids.hxx"
+#include <ary/cpp/cpp_disp.hxx>
+#include <ary/cpp/prpr.hxx>
+
+
+
+
+namespace ary
+{
+namespace cpp
+{
+
+
+Define::Define( Did i_nId,
+ const udmstri & i_sName,
+ const str_vector & i_rDefinition,
+ Lid i_nDeclaringFile )
+ : CppDefinition(i_nId, i_sName, i_nDeclaringFile),
+ aDefinition(i_rDefinition)
+{
+}
+
+Define::~Define()
+{
+}
+
+void
+Define::do_StoreAt( ary::Display & o_rOut ) const
+{
+ ary::cpp::Display * pD = dynamic_cast< ary::cpp::Display* >(&o_rOut);
+ if (pD != 0)
+ {
+ pD->Display_Define(*this);
+ }
+}
+
+RCid
+Define::inq_RC() const
+{
+ return RCID_DEFINE;
+}
+
+const CppDefinition::str_vector &
+Define::inq_DefinitionText() const
+{
+ return aDefinition;
+}
+
+void
+Define::GetText( StreamStr & o_rText ) const
+{
+ if ( aDefinition.begin() == aDefinition.end() )
+ return;
+
+
+ bool bSwitch_Stringify = false;
+ bool bSwitch_Concatenate = false;
+
+ for ( str_vector::const_iterator it = aDefinition.begin();
+ it != aDefinition.end();
+ ++it )
+ {
+ if ( HandleOperatorsBeforeTextItem( o_rText,
+ bSwitch_Stringify,
+ bSwitch_Concatenate,
+ *it ) )
+ {
+ continue;
+ }
+
+ o_rText << (*it);
+
+ Do_bStringify_end(o_rText, bSwitch_Stringify);
+ o_rText << " ";
+ }
+ o_rText.seekp(-1, csv::cur);
+}
+
+
+
+
+} // namespace cpp
+} // namespace ary
+
+
+
diff --git a/autodoc/source/ary/cpp/c_enum.cxx b/autodoc/source/ary/cpp/c_enum.cxx
new file mode 100644
index 00000000..2759bcab
--- /dev/null
+++ b/autodoc/source/ary/cpp/c_enum.cxx
@@ -0,0 +1,207 @@
+/*************************************************************************
+ *
+ * $RCSfile: c_enum.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: np $ $Date: 2002-03-08 14:45:18 $
+ *
+ * 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/cpp/c_enum.hxx>
+
+
+// NOT FULLY DECLARED SERVICES
+#include "rcids.hxx"
+#include <ary/cpp/cpp_disp.hxx>
+#include <slots.hxx>
+#include "c_slots.hxx"
+
+
+
+
+namespace ary
+{
+namespace cpp
+{
+
+
+Enum::Enum()
+ : // aEssentials,
+ // aValues,
+ eProtection(PROTECT_global)
+{
+}
+
+Enum::Enum( Cid i_nId,
+ const udmstri & i_sLocalName,
+ Cid i_nOwner,
+ E_Protection i_eProtection,
+ Lid i_nFile )
+ : aEssentials( i_nId,
+ i_sLocalName,
+ i_nOwner,
+ i_nFile ),
+ // aValues
+ eProtection(i_eProtection)
+{
+
+}
+
+Enum::~Enum()
+{
+}
+
+void
+Enum::Add_Value( Cid i_nId )
+{
+ aValues.push_back( i_nId );
+}
+
+Cid
+Enum::inq_Id() const
+{
+ return aEssentials.Id();
+}
+
+const udmstri &
+Enum::inq_LocalName() const
+{
+ return aEssentials.LocalName();
+}
+
+Cid
+Enum::inq_Owner() const
+{
+ return aEssentials.Owner();
+}
+
+Lid
+Enum::inq_Location() const
+{
+ return aEssentials.Location();
+}
+
+void
+Enum::do_StoreAt( ary::Display & o_rOut ) const
+{
+ ary::cpp::Display * pD = dynamic_cast< ary::cpp::Display* >(&o_rOut);
+ if (pD != 0)
+ {
+ pD->Display_Enum(*this);
+ }
+}
+
+RCid
+Enum::inq_RC() const
+{
+ return RC_();
+}
+
+
+const ary::Documentation &
+Enum::inq_Info() const
+{
+ return aEssentials.Info();
+}
+
+void
+Enum::do_Add_Documentation( DYN ary::Documentation & let_drInfo )
+{
+ aEssentials.SetInfo(let_drInfo);
+}
+
+Gid
+Enum::inq_Id_Group() const
+{
+ return static_cast<Gid>(Id());
+}
+
+const RepositoryEntity &
+Enum::inq_RE_Group() const
+{
+ return *this;
+}
+
+const group::SlotList &
+Enum::inq_Slots() const
+{
+ static const SlotAccessId aProjectSlotData[]
+ = { SLOT_Values };
+ static const std::vector< SlotAccessId >
+ aSlots( &aProjectSlotData[0],
+ &aProjectSlotData[0]
+ + sizeof aProjectSlotData / sizeof (SlotAccessId) );
+ return aSlots;
+}
+
+DYN Slot *
+Enum::inq_Create_Slot( SlotAccessId i_nSlot ) const
+{
+ switch ( i_nSlot )
+ {
+ case SLOT_Values: return new Slot_RidList(aValues);
+ default:
+ return new Slot_Null;
+ } // end switch
+}
+
+
+
+} // namespace cpp
+} // namespace ary
+
+
+
diff --git a/autodoc/source/ary/cpp/c_enuval.cxx b/autodoc/source/ary/cpp/c_enuval.cxx
new file mode 100644
index 00000000..de6fb826
--- /dev/null
+++ b/autodoc/source/ary/cpp/c_enuval.cxx
@@ -0,0 +1,159 @@
+/*************************************************************************
+ *
+ * $RCSfile: c_enuval.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: np $ $Date: 2002-03-08 14:45:18 $
+ *
+ * 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/cpp/c_enuval.hxx>
+
+
+// NOT FULLY DECLARED SERVICES
+#include "rcids.hxx"
+#include <ary/cpp/cpp_disp.hxx>
+
+
+
+
+namespace ary
+{
+namespace cpp
+{
+
+
+EnumValue::EnumValue()
+// : aEssentials,
+ // sInitialisation
+{
+}
+
+EnumValue::EnumValue( Cid i_nId,
+ const udmstri & i_sLocalName,
+ Cid i_nOwner,
+ udmstri i_sInitialisation )
+ : aEssentials( i_nId,
+ i_sLocalName,
+ i_nOwner,
+ 0 ),
+ sInitialisation(i_sInitialisation)
+{
+}
+
+EnumValue::~EnumValue()
+{
+}
+
+Cid
+EnumValue::inq_Id() const
+{
+ return aEssentials.Id();
+}
+
+const udmstri &
+EnumValue::inq_LocalName() const
+{
+ return aEssentials.LocalName();
+}
+
+Cid
+EnumValue::inq_Owner() const
+{
+ return aEssentials.Owner();
+}
+
+Lid
+EnumValue::inq_Location() const
+{
+ return aEssentials.Location();
+}
+
+void
+EnumValue::do_StoreAt( ary::Display & o_rOut ) const
+{
+ ary::cpp::Display * pD = dynamic_cast< ary::cpp::Display* >(&o_rOut);
+ if (pD != 0)
+ {
+ pD->Display_EnumValue(*this);
+ }
+}
+
+RCid
+EnumValue::inq_RC() const
+{
+ return RC_();
+}
+
+
+const ary::Documentation &
+EnumValue::inq_Info() const
+{
+ return aEssentials.Info();
+}
+
+void
+EnumValue::do_Add_Documentation( DYN ary::Documentation & let_drInfo )
+{
+ aEssentials.SetInfo(let_drInfo);
+}
+
+
+} // namespace cpp
+} // namespace ary
+
+
+
diff --git a/autodoc/source/ary/cpp/c_funct.cxx b/autodoc/source/ary/cpp/c_funct.cxx
new file mode 100644
index 00000000..49a1ea5f
--- /dev/null
+++ b/autodoc/source/ary/cpp/c_funct.cxx
@@ -0,0 +1,189 @@
+/*************************************************************************
+ *
+ * $RCSfile: c_funct.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: np $ $Date: 2002-03-08 14:45:18 $
+ *
+ * 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/cpp/c_funct.hxx>
+
+
+
+// NOT FULLY DECLARED SERVICES
+#include "rcids.hxx"
+#include <ary/cpp/cpp_disp.hxx>
+
+
+
+namespace ary
+{
+namespace cpp
+{
+
+Function::Function()
+ : // aEssentials,
+ nSignature(0),
+ nReturnType(0),
+ eProtection(PROTECT_global),
+ eVirtuality(VIRTUAL_none)
+ // aFlags,
+ // aParameterInfos,
+ // pExceptions
+{
+}
+
+Function::Function( Cid i_nId,
+ const udmstri & i_sLocalName,
+ Cid i_nOwner,
+ E_Protection i_eProtection,
+ Lid i_nFile,
+ Tid i_nReturnType,
+ OSid i_nSignature,
+ StringVector & i_rNonType_ParameterInfos,
+ E_Virtuality i_eVirtuality,
+ FunctionFlags i_aFlags,
+ bool i_bThrowExists,
+ const std::vector<Tid> & i_rExceptions )
+
+ : aEssentials( i_nId,
+ i_sLocalName,
+ i_nOwner,
+ i_nFile ),
+ // aTemplateParameterTypes
+ nSignature(i_nSignature),
+ nReturnType(i_nReturnType),
+ eProtection(i_eProtection),
+ eVirtuality(i_eVirtuality),
+ aFlags(i_aFlags),
+ // aParameterInfos,
+ pExceptions( i_bThrowExists ? new ExceptionTypeList(i_rExceptions) : 0 )
+{
+ std::swap( aParameterInfos, i_rNonType_ParameterInfos );
+}
+
+Function::~Function()
+{
+}
+
+void
+Function::Add_TemplateParameterType( const udmstri & i_sLocalName,
+ Tid i_nIdAsType )
+{
+ aTemplateParameterTypes.push_back(
+ List_TplParam::value_type(i_sLocalName, i_nIdAsType) );
+}
+
+
+Cid
+Function::inq_Id() const
+{
+ return aEssentials.Id();
+}
+
+const udmstri &
+Function::inq_LocalName() const
+{
+ return aEssentials.LocalName();
+}
+
+Cid
+Function::inq_Owner() const
+{
+ return aEssentials.Owner();
+}
+
+Lid
+Function::inq_Location() const
+{
+ return aEssentials.Location();
+}
+
+void
+Function::do_StoreAt( ary::Display & o_rOut ) const
+{
+ ary::cpp::Display * pD = dynamic_cast< ary::cpp::Display* >(&o_rOut);
+ if (pD != 0)
+ {
+ pD->Display_Function(*this);
+ }
+}
+
+RCid
+Function::inq_RC() const
+{
+ return RC_();
+}
+
+
+const ary::Documentation &
+Function::inq_Info() const
+{
+ return aEssentials.Info();
+}
+
+void
+Function::do_Add_Documentation( DYN ary::Documentation & let_drInfo )
+{
+ aEssentials.SetInfo(let_drInfo);
+}
+
+
+
+} // namespace cpp
+} // namespace ary
+
diff --git a/autodoc/source/ary/cpp/c_macro.cxx b/autodoc/source/ary/cpp/c_macro.cxx
new file mode 100644
index 00000000..469dcf91
--- /dev/null
+++ b/autodoc/source/ary/cpp/c_macro.cxx
@@ -0,0 +1,171 @@
+/*************************************************************************
+ *
+ * $RCSfile: c_macro.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: np $ $Date: 2002-03-08 14:45:18 $
+ *
+ * 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/cpp/c_macro.hxx>
+
+
+// NOT FULLY DECLARED SERVICES
+#include "rcids.hxx"
+#include <ary/cpp/cpp_disp.hxx>
+#include <ary/cpp/prpr.hxx>
+
+
+
+
+
+namespace ary
+{
+namespace cpp
+{
+
+
+Macro::Macro( Did i_nId,
+ const udmstri & i_sName,
+ const str_vector & i_rParams,
+ const str_vector & i_rDefinition,
+ Lid i_nDeclaringFile )
+ : CppDefinition(i_nId, i_sName, i_nDeclaringFile),
+ aParams(i_rParams),
+ aDefinition(i_rDefinition)
+{
+}
+
+Macro::~Macro()
+{
+}
+
+void
+Macro::do_StoreAt( ary::Display & o_rOut ) const
+{
+ ary::cpp::Display * pD = dynamic_cast< ary::cpp::Display* >(&o_rOut);
+ if (pD != 0)
+ {
+ pD->Display_Macro(*this);
+ }
+}
+
+RCid
+Macro::inq_RC() const
+{
+ return RCID_MACRO;
+}
+
+const CppDefinition::str_vector &
+Macro::inq_DefinitionText() const
+{
+ return aDefinition;
+}
+
+void
+Macro::GetText( StreamStr & o_rText,
+ const StringVector & i_rGivenArguments ) const
+{
+ bool bSwitch_Stringify = false;
+ bool bSwitch_Concatenate = false;
+ intt nActiveParamNr = -1;
+
+ if ( aDefinition.begin() == aDefinition.end() )
+ return;
+
+ for ( str_vector::const_iterator it = aDefinition.begin();
+ it != aDefinition.end();
+ ++it )
+ {
+ if ( HandleOperatorsBeforeTextItem( o_rText,
+ bSwitch_Stringify,
+ bSwitch_Concatenate,
+ *it ) )
+ {
+ continue;
+ }
+
+ for ( str_vector::const_iterator param_it = aParams.begin();
+ param_it != aParams.end() AND nActiveParamNr == -1;
+ ++param_it )
+ {
+ if ( strcmp(*it, *param_it) == 0 )
+ nActiveParamNr = param_it - aParams.begin();
+ }
+ if ( nActiveParamNr == -1 )
+ {
+ o_rText << (*it);
+ }
+ else
+ {
+ o_rText << i_rGivenArguments[nActiveParamNr];
+ nActiveParamNr = -1;
+ }
+
+ Do_bStringify_end(o_rText, bSwitch_Stringify);
+ o_rText << " ";
+ }
+ o_rText.seekp(-1, csv::cur);
+}
+
+
+
+
+} // namespace cpp
+} // namespace ary
+
+
+
diff --git a/autodoc/source/ary/cpp/c_namesp.cxx b/autodoc/source/ary/cpp/c_namesp.cxx
new file mode 100644
index 00000000..2688dbb5
--- /dev/null
+++ b/autodoc/source/ary/cpp/c_namesp.cxx
@@ -0,0 +1,360 @@
+/*************************************************************************
+ *
+ * $RCSfile: c_namesp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: np $ $Date: 2002-03-08 14:45:18 $
+ *
+ * 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/cpp/c_namesp.hxx>
+
+
+// NOT FULLY DECLARED SERVICES
+#include <cosv/template/tpltools.hxx>
+#include "rcids.hxx"
+#include <ary/cpp/cpp_disp.hxx>
+#include <slots.hxx>
+#include "c_slots.hxx"
+
+
+namespace ary
+{
+namespace cpp
+{
+
+
+
+Namespace::Namespace()
+ : // aEssentials,
+ // aLocalNamespaces,
+ // aLocalClasses,
+ // aLocalEnums,
+ // aLocalTypedefs,
+ // aLocalOperations,
+ // aLocalVariables,
+ // aLocalConstants,
+ pParent(0),
+ nDepth(0)
+{
+}
+
+Namespace::Namespace( Rid i_nId )
+ : aEssentials( i_nId, udmstri::Null_(), 0, 0 ),
+ // aLocalNamespaces,
+ // aLocalClasses,
+ // aLocalEnums,
+ // aLocalTypedefs,
+ // aLocalOperations,
+ // aLocalVariables,
+ // aLocalConstants,
+ pParent(0),
+ nDepth(0)
+{
+}
+
+Namespace::Namespace( Cid i_nId,
+ const udmstri & i_sLocalName,
+ Namespace & i_rParent )
+ : aEssentials( i_nId,
+ i_sLocalName,
+ i_rParent.Id(),
+ 0 ),
+ // aLocalNamespaces,
+ // aLocalClasses,
+ // aLocalEnums,
+ // aLocalTypedefs,
+ // aLocalOperations,
+ // aLocalVariables,
+ // aLocalConstants,
+ pParent(&i_rParent),
+ nDepth(i_rParent.Depth()+1)
+{
+}
+
+Namespace::~Namespace()
+{
+}
+
+void
+Namespace::Add_LocalNamespace( DYN Namespace & io_rLocalNamespace )
+{
+ aLocalNamespaces[io_rLocalNamespace.LocalName()] = &io_rLocalNamespace;
+}
+
+void
+Namespace::Add_LocalClass( const udmstri & i_sLocalName,
+ Cid i_nId )
+{
+ aLocalClasses[i_sLocalName] = i_nId;
+}
+
+void
+Namespace::Add_LocalEnum( const udmstri & i_sLocalName,
+ Cid i_nId )
+{
+ aLocalEnums[i_sLocalName] = i_nId;
+}
+
+void
+Namespace::Add_LocalTypedef( const udmstri & i_sLocalName,
+ Cid i_nId )
+{
+ aLocalTypedefs[i_sLocalName] = i_nId;
+}
+
+void
+Namespace::Add_LocalOperation( const udmstri & i_sLocalName,
+ OSid i_nOS,
+ Cid i_nId )
+{
+ aLocalOperations.insert(
+ S_LocalOperation(i_sLocalName, i_nOS, i_nId) );
+}
+
+
+void
+Namespace::Add_LocalVariable( const udmstri & i_sLocalName,
+ Cid i_nId )
+{
+ aLocalVariables[i_sLocalName] = i_nId;
+}
+
+void
+Namespace::Add_LocalConstant( const udmstri & i_sLocalName,
+ Cid i_nId )
+{
+ aLocalConstants[i_sLocalName] = i_nId;
+}
+
+uintt
+Namespace::Depth() const
+{
+ return nDepth;
+}
+
+Namespace *
+Namespace::Parent() const
+{
+ return pParent;
+}
+
+Namespace *
+Namespace::Search_LocalNamespace( const udmstri & i_sLocalName ) const
+{
+ return csv::value_from_map(aLocalNamespaces, i_sLocalName);
+}
+
+uintt
+Namespace::Get_SubNamespaces( std::vector< const Namespace* > & o_rResultList ) const
+{
+ for ( Map_NamespacePtr::const_iterator it = aLocalNamespaces.begin();
+ it != aLocalNamespaces.end();
+ ++it )
+ {
+ o_rResultList.push_back( (*it).second );
+ }
+ return o_rResultList.size();
+}
+
+Rid
+Namespace::Search_LocalClass( const udmstri & i_sName ) const
+{
+ return csv::value_from_map(aLocalClasses, i_sName);
+}
+
+Cid
+Namespace::inq_Id() const
+{
+ return aEssentials.Id();
+}
+
+const udmstri &
+Namespace::inq_LocalName() const
+{
+ return aEssentials.LocalName();
+}
+
+Cid
+Namespace::inq_Owner() const
+{
+ return aEssentials.Owner();
+}
+
+Lid
+Namespace::inq_Location() const
+{
+ return 0;
+}
+
+void
+Namespace::do_StoreAt( ary::Display & o_rOut ) const
+{
+ ary::cpp::Display * pD = dynamic_cast< ary::cpp::Display* >(&o_rOut);
+ if (pD != 0)
+ {
+ pD->Display_Namespace(*this);
+ }
+}
+
+RCid
+Namespace::inq_RC() const
+{
+ return RC_();
+}
+
+
+const ary::Documentation &
+Namespace::inq_Info() const
+{
+ return aEssentials.Info();
+}
+
+void
+Namespace::do_Add_Documentation( DYN ary::Documentation & let_drInfo )
+{
+ aEssentials.SetInfo(let_drInfo);
+}
+
+Gid
+Namespace::inq_Id_Group() const
+{
+ return static_cast<Gid>(aEssentials.Id());
+}
+
+const RepositoryEntity &
+Namespace::inq_RE_Group() const
+{
+ return *this;
+}
+
+const ary::group::SlotList &
+Namespace::inq_Slots() const
+{
+ static const SlotAccessId aProjectSlotData[]
+ = { SLOT_SubNamespaces, SLOT_Classes, SLOT_Enums, SLOT_Typedefs, SLOT_Operations,
+ SLOT_Variables, SLOT_Constants };
+ static const std::vector< SlotAccessId >
+ aSlots( &aProjectSlotData[0],
+ &aProjectSlotData[0]
+ + sizeof aProjectSlotData / sizeof (SlotAccessId) );
+ return aSlots;
+}
+
+DYN Slot *
+Namespace::inq_Create_Slot( SlotAccessId i_nSlot ) const
+{
+ switch ( i_nSlot )
+ {
+ case SLOT_SubNamespaces: return new Slot_SubNamespaces(aLocalNamespaces);
+ case SLOT_Classes: return new Slot_MapLocalCe(aLocalClasses);
+ case SLOT_Enums: return new Slot_MapLocalCe(aLocalEnums);
+ case SLOT_Typedefs: return new Slot_MapLocalCe(aLocalTypedefs);
+ case SLOT_Operations: return new Slot_OperationSet(aLocalOperations);
+ case SLOT_Variables: return new Slot_MapLocalCe(aLocalVariables);
+ case SLOT_Constants: return new Slot_MapLocalCe(aLocalConstants);
+ default:
+ return new Slot_Null;
+ } // end switch
+}
+
+
+} // namespace cpp
+} // namespace ary
+
+
+
+#if 0
+/*
+uintt
+Namespace::Get_LocalNamespaces( ary::List_Cid& o_rResultList ) const
+{
+ for ( Map_NamespacePtr::const_iterator it = aLocalNamespaces.begin();
+ it != aLocalNamespaces.end();
+ ++it )
+ {
+ o_rResultList.push_back((*it).second->Id());
+ }
+ return o_rResultList.size();
+}
+
+uintt
+Namespace::Get_LocalClasses( ary::List_Cid& o_rResultList ) const
+{
+ for ( Map_LocalCe::const_iterator it = aLocalClasses.begin();
+ it != aLocalClasses.end();
+ ++it )
+ {
+ o_rResultList.push_back((*it).second);
+ }
+ return o_rResultList.size();
+}
+
+uintt
+Namespace::Get_LocalFunctions( ary::List_Cid & o_rResultList ) const
+{
+ for ( Set_LocalOperation::const_iterator it = aLocalOperations.begin();
+ it != aLocalOperations.end();
+ ++it )
+ {
+ o_rResultList.push_back((*it).nId);
+ }
+ return o_rResultList.size();
+}
+*/
+#endif // 0
+
+
diff --git a/autodoc/source/ary/cpp/c_osigna.cxx b/autodoc/source/ary/cpp/c_osigna.cxx
new file mode 100644
index 00000000..1857329e
--- /dev/null
+++ b/autodoc/source/ary/cpp/c_osigna.cxx
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * $RCSfile: c_osigna.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: np $ $Date: 2002-03-08 14:45:18 $
+ *
+ * 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/cpp/c_osigna.hxx>
+
+
+// NOT FULLY DEFINED SERVICES
+
+
+namespace ary
+{
+namespace cpp
+{
+
+
+OperationSignature::OperationSignature()
+ : // aParameterTypes,
+ eConVol(CONVOL_none)
+{
+}
+
+OperationSignature::OperationSignature( std::vector<Tid> & i_rParameterTypes,
+ E_ConVol i_eConVol )
+ : // aParameterTypes,
+ eConVol(i_eConVol)
+{
+ std::swap( aParameterTypes, i_rParameterTypes );
+}
+
+int
+OperationSignature::Compare( const OperationSignature & i_rSig ) const
+{
+ if ( aParameterTypes.size() < i_rSig.aParameterTypes.size() )
+ return -1;
+ else if ( i_rSig.aParameterTypes.size() < aParameterTypes.size() )
+ return 1;
+
+ ParameterTypeList::const_iterator iMe = aParameterTypes.begin();
+ ParameterTypeList::const_iterator iOther = i_rSig.aParameterTypes.begin();
+ for ( ; iMe != aParameterTypes.end(); ++iMe, ++iOther )
+ {
+ if ( *iMe < *iOther )
+ return -1;
+ else if ( *iOther < *iMe )
+ return 1;
+ }
+
+ if ( eConVol < i_rSig.eConVol )
+ return -1;
+ else if ( eConVol != i_rSig.eConVol )
+ return 1;
+
+ return 0;
+}
+
+
+} // namespace cpp
+} // namespace ary
+
+
diff --git a/autodoc/source/ary/cpp/c_slots.cxx b/autodoc/source/ary/cpp/c_slots.cxx
new file mode 100644
index 00000000..d208929b
--- /dev/null
+++ b/autodoc/source/ary/cpp/c_slots.cxx
@@ -0,0 +1,152 @@
+/*************************************************************************
+ *
+ * $RCSfile: c_slots.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: np $ $Date: 2002-03-08 14:45:18 $
+ *
+ * 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 <c_slots.hxx>
+
+
+// NOT FULLY DEFINED SERVICES
+#include <ary/cpp/cpp_disp.hxx>
+
+
+
+namespace ary
+{
+namespace cpp
+{
+
+
+
+//*********************** Slot_SubNamespaces ********************//
+
+
+Slot_SubNamespaces::Slot_SubNamespaces( const Map_NamespacePtr & i_rData )
+ : pData( &i_rData )
+{
+}
+
+Slot_SubNamespaces::~Slot_SubNamespaces()
+{
+}
+
+uintt
+Slot_SubNamespaces::Size() const
+{
+ return pData->size();
+}
+
+void
+Slot_SubNamespaces::StoreEntries( ary::Display & o_rDestination ) const
+{
+ ary::cpp::Display * pDisp
+ = dynamic_cast< ary::cpp::Display* >( &o_rDestination );
+ if ( pDisp == 0 )
+ return;
+
+ for ( Map_NamespacePtr::const_iterator it = pData->begin();
+ it != pData->end();
+ ++it )
+ {
+ pDisp->Display_Namespace( *(*it).second );
+ }
+}
+
+
+//*********************** Slot_BaseClass ********************//
+
+Slot_BaseClass::Slot_BaseClass( const List_Bases & i_rData )
+ : pData( &i_rData )
+{
+}
+
+Slot_BaseClass::~Slot_BaseClass()
+{
+}
+
+uintt
+Slot_BaseClass::Size() const
+{
+ return pData->size();
+}
+
+void
+Slot_BaseClass::StoreEntries( ary::Display & o_rDestination ) const
+{
+ ary::cpp::Display * pDisp
+ = dynamic_cast< ary::cpp::Display* >( &o_rDestination );
+ if ( pDisp == 0 )
+ return;
+
+ for ( List_Bases::const_iterator it = pData->begin();
+ it != pData->end();
+ ++it )
+ {
+ pDisp->DisplaySlot_BaseClass( *it );
+ }
+}
+
+
+
+} // namespace cpp
+} // namespace ary
+
+
diff --git a/autodoc/source/ary/cpp/c_slots.hxx b/autodoc/source/ary/cpp/c_slots.hxx
new file mode 100644
index 00000000..211b791f
--- /dev/null
+++ b/autodoc/source/ary/cpp/c_slots.hxx
@@ -0,0 +1,122 @@
+/*************************************************************************
+ *
+ * $RCSfile: c_slots.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: np $ $Date: 2002-03-08 14:45:18 $
+ *
+ * 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_CPP_C_SLOTS_HXX
+#define ARY_CPP_C_SLOTS_HXX
+
+
+// USED SERVICES
+ // BASE CLASSES
+#include <ary/ceslot.hxx>
+ // COMPONENTS
+#include <ary/cpp/c_idlist.hxx>
+ // PARAMETERS
+
+
+
+namespace ary
+{
+namespace cpp
+{
+
+class Slot_SubNamespaces : public ary::Slot
+{
+ public:
+ Slot_SubNamespaces(
+ const Map_NamespacePtr &
+ i_rData );
+ virtual ~Slot_SubNamespaces();
+
+ virtual uintt Size() const;
+
+ private:
+ virtual void StoreEntries(
+ ary::Display & o_rDestination ) const;
+ // DATA
+ const Map_NamespacePtr *
+ pData;
+};
+
+class Slot_BaseClass : public ary::Slot
+{
+ public:
+ Slot_BaseClass(
+ const List_Bases & i_rData );
+ virtual ~Slot_BaseClass();
+
+ virtual uintt Size() const;
+
+ private:
+ virtual void StoreEntries(
+ ary::Display & o_rDestination ) const;
+ // DATA
+ const List_Bases * pData;
+};
+
+
+} // namespace cpp
+} // namespace ary
+
+
+#endif
+
+
+
diff --git a/autodoc/source/ary/cpp/c_tydef.cxx b/autodoc/source/ary/cpp/c_tydef.cxx
new file mode 100644
index 00000000..5a9f4fcd
--- /dev/null
+++ b/autodoc/source/ary/cpp/c_tydef.cxx
@@ -0,0 +1,167 @@
+/*************************************************************************
+ *
+ * $RCSfile: c_tydef.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: np $ $Date: 2002-03-08 14:45:18 $
+ *
+ * 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/cpp/c_tydef.hxx>
+
+
+// NOT FULLY DECLARED SERVICES
+#include "rcids.hxx"
+#include <ary/cpp/cpp_disp.hxx>
+#include <slots.hxx>
+#include "c_slots.hxx"
+
+
+
+
+namespace ary
+{
+namespace cpp
+{
+
+
+Typedef::Typedef()
+ : // aEssentials,
+ nDescribingType(0),
+ eProtection(PROTECT_global)
+{
+}
+
+Typedef::Typedef( Cid i_nId,
+ const udmstri & i_sLocalName,
+ Cid i_nOwner,
+ E_Protection i_eProtection,
+ Lid i_nFile,
+ Tid i_nDescribingType )
+ : aEssentials( i_nId,
+ i_sLocalName,
+ i_nOwner,
+ i_nFile ),
+ nDescribingType(i_nDescribingType),
+ eProtection(i_eProtection)
+{
+}
+
+Typedef::~Typedef()
+{
+
+}
+
+Cid
+Typedef::inq_Id() const
+{
+ return aEssentials.Id();
+}
+
+const udmstri &
+Typedef::inq_LocalName() const
+{
+ return aEssentials.LocalName();
+}
+
+Cid
+Typedef::inq_Owner() const
+{
+ return aEssentials.Owner();
+}
+
+Lid
+Typedef::inq_Location() const
+{
+ return aEssentials.Location();
+}
+
+void
+Typedef::do_StoreAt( ary::Display & o_rOut ) const
+{
+ ary::cpp::Display * pD = dynamic_cast< ary::cpp::Display* >(&o_rOut);
+ if (pD != 0)
+ {
+ pD->Display_Typedef(*this);
+ }
+}
+
+RCid
+Typedef::inq_RC() const
+{
+ return RC_();
+}
+
+
+const ary::Documentation &
+Typedef::inq_Info() const
+{
+ return aEssentials.Info();
+}
+
+void
+Typedef::do_Add_Documentation( DYN ary::Documentation & let_drInfo )
+{
+ aEssentials.SetInfo(let_drInfo);
+}
+
+
+
+} // namespace cpp
+} // namespace ary
+
+
+
diff --git a/autodoc/source/ary/cpp/c_vari.cxx b/autodoc/source/ary/cpp/c_vari.cxx
new file mode 100644
index 00000000..7a191354
--- /dev/null
+++ b/autodoc/source/ary/cpp/c_vari.cxx
@@ -0,0 +1,171 @@
+/*************************************************************************
+ *
+ * $RCSfile: c_vari.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: np $ $Date: 2002-03-08 14:45:18 $
+ *
+ * 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/cpp/c_vari.hxx>
+
+
+// NOT FULLY DECLARED SERVICES
+#include "rcids.hxx"
+#include <ary/cpp/cpp_disp.hxx>
+
+
+
+
+namespace ary
+{
+namespace cpp
+{
+
+
+Variable::Variable()
+ : // aEssentials,
+ nType(0),
+ eProtection(PROTECT_global)
+ // aFlags
+{
+}
+
+Variable::Variable( Cid i_nId,
+ const udmstri & i_sLocalName,
+ Cid i_nOwner,
+ E_Protection i_eProtection,
+ Lid i_nFile,
+ Tid i_nType,
+ VariableFlags i_aFlags,
+ const udmstri & i_sArraySize,
+ const udmstri & i_sInitValue )
+ : aEssentials( i_nId,
+ i_sLocalName,
+ i_nOwner,
+ i_nFile ),
+ nType(i_nType),
+ eProtection(i_eProtection),
+ aFlags(i_aFlags),
+ sArraySize(i_sArraySize),
+ sInitialisation(i_sInitValue)
+{
+}
+
+Variable::~Variable()
+{
+}
+
+Cid
+Variable::inq_Id() const
+{
+ return aEssentials.Id();
+}
+
+const udmstri &
+Variable::inq_LocalName() const
+{
+ return aEssentials.LocalName();
+}
+
+Cid
+Variable::inq_Owner() const
+{
+ return aEssentials.Owner();
+}
+
+Lid
+Variable::inq_Location() const
+{
+ return aEssentials.Location();
+}
+
+void
+Variable::do_StoreAt( ary::Display & o_rOut ) const
+{
+ ary::cpp::Display * pD = dynamic_cast< ary::cpp::Display* >(&o_rOut);
+ if (pD != 0)
+ {
+ pD->Display_Variable(*this);
+ }
+}
+
+RCid
+Variable::inq_RC() const
+{
+ return RC_();
+}
+
+
+const ary::Documentation &
+Variable::inq_Info() const
+{
+ return aEssentials.Info();
+}
+
+void
+Variable::do_Add_Documentation( DYN ary::Documentation & let_drInfo )
+{
+ aEssentials.SetInfo(let_drInfo);
+}
+
+
+
+} // namespace cpp
+} // namespace ary
+
+
+
diff --git a/autodoc/source/ary/cpp/ca_type.cxx b/autodoc/source/ary/cpp/ca_type.cxx
new file mode 100644
index 00000000..167fb136
--- /dev/null
+++ b/autodoc/source/ary/cpp/ca_type.cxx
@@ -0,0 +1,313 @@
+/*************************************************************************
+ *
+ * $RCSfile: ca_type.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: np $ $Date: 2002-03-08 14:45:17 $
+ *
+ * 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/cpp/ca_type.hxx>
+
+
+// NOT FULLY DEFINED SERVICES
+
+
+namespace ary
+{
+namespace cpp
+{
+
+
+
+
+//********************** Type **************************//
+Rid
+Type::inq_RelatedCe() const
+{
+ return 0;
+}
+
+
+//********************** BuiltInType **************************//
+
+BuiltInType::BuiltInType( Tid i_nId,
+ const udmstri & i_sName,
+ E_TypeSpecialisation i_eSpecialisation )
+ : nId( i_nId ),
+ sName( i_sName ),
+ eSpecialisation( i_eSpecialisation )
+{
+}
+
+Tid
+BuiltInType::inq_Id_Type() const
+{
+ return nId;
+}
+
+bool
+BuiltInType::inq_IsConst() const
+{
+ return false;
+}
+
+void
+BuiltInType::inq_Get_Text( StreamStr & o_rPreName,
+ StreamStr & o_rName,
+ StreamStr & o_rPostName,
+ const DisplayGate & i_rGate ) const
+{
+ switch (eSpecialisation)
+ {
+ case TYSP_unsigned: o_rName << "unsigned "; break;
+ case TYSP_signed: o_rName << "signed "; break;
+
+ // default: Does nothing.
+ }
+ o_rName << sName;
+}
+
+
+//********************** NullType **************************//
+
+Tid
+NullType::inq_Id_Type() const
+{
+ return 0;
+}
+
+bool
+NullType::inq_IsConst() const
+{
+ return false;
+}
+
+void
+NullType::inq_Get_Text( StreamStr & o_rPreName,
+ StreamStr & o_rName,
+ StreamStr & o_rPostName,
+ const DisplayGate & i_rGate ) const
+{
+}
+
+
+
+
+#if 0
+void
+NamedType::GetText( StreamStr & o_rOut,
+ const Gate & i_rGate ) const
+{
+ i_rGate.Get_QualifiedName(o_rOut, Name(), "::");
+}
+
+
+BuiltInType::BuiltInType( const S_InitData & i_rData )
+ : nId(i_rData.nId),
+ aName(i_rData.aName)
+{
+}
+
+Tid
+BuiltInType::IdAsType() const
+{
+ return nId;
+}
+
+const QName &
+BuiltInType::Name() const
+{
+ return aName;
+}
+
+#if 0
+PredeclaredType::PredeclaredType( Tid i_nId,
+ const char * i_sName,
+ Cid i_nOwner )
+ : nId(i_nId),
+ aName(i_sName,i_nOwner)
+{
+}
+
+Tid
+PredeclaredType::IdAsType() const
+{
+ return nId;
+}
+
+const QName &
+PredeclaredType::Name() const
+{
+ return aName;
+}
+#endif // 0
+
+Tid
+ReferingType::IdAsType() const
+{
+ return nId;
+}
+
+Tid
+ReferingType::ReferedType() const
+{
+ return nReferedType;
+}
+
+ReferingType::ReferingType( Tid i_nId,
+ Tid i_nReferedType )
+ : nId(i_nId),
+ nReferedType(i_nReferedType)
+{
+}
+
+ConstType::ConstType( Tid nId,
+ Tid nReferedType )
+ : ReferingType(nId, nReferedType)
+{
+}
+
+void
+ConstType::GetText( ostream & o_rOut,
+ const Gate & i_rGate ) const
+{
+ i_rGate.Get_TypeText(o_rOut,ReferedType());
+ o_rOut << " const";
+}
+
+VolatileType::VolatileType( Tid nId,
+ Tid nReferedType )
+ : ReferingType(nId, nReferedType)
+{
+}
+
+void
+VolatileType::GetText( ostream & o_rOut,
+ const Gate & i_rGate ) const
+{
+ i_rGate.Get_TypeText(o_rOut,ReferedType());
+ o_rOut << " volatile";
+}
+
+PtrType::PtrType( Tid nId,
+ Tid nReferedType )
+ : ReferingType(nId, nReferedType)
+{
+}
+
+void
+PtrType::GetText( ostream & o_rOut,
+ const Gate & i_rGate ) const
+{
+ i_rGate.Get_TypeText(o_rOut,ReferedType());
+ o_rOut << " *";
+}
+
+RefType::RefType( Tid nId,
+ Tid nReferedType )
+ : ReferingType(nId, nReferedType)
+{
+}
+
+void
+RefType::GetText( ostream & o_rOut,
+ const Gate & i_rGate ) const
+{
+ i_rGate.Get_TypeText(o_rOut,ReferedType());
+ o_rOut << " &";
+}
+
+TemplateInstance::TemplateInstance( Tid i_nId,
+ Cid i_nReferedClass,
+ const char * i_sInstantiation )
+ : nId(i_nId),
+ nReferedClass(i_nReferedClass),
+ sInstantiation(i_sInstantiation)
+{
+}
+
+bool
+TemplateInstance::operator<( const TemplateInstance & i_r ) const
+{
+ if ( nReferedClass < i_r.nReferedClass )
+ return true;
+ if ( nReferedClass == i_r.nReferedClass
+ AND sInstantiation < i_r.sInstantiation )
+ return true;
+ return false;
+}
+
+Tid
+TemplateInstance::IdAsType() const
+{
+ return nId;
+}
+
+void
+TemplateInstance::GetText( ostream & o_rOut,
+ const Gate & i_rGate ) const
+{
+ i_rGate.Get_TypeText(o_rOut,nReferedClass);
+ o_rOut << "< " << sInstantiation << " >";
+}
+#endif // 0
+
+
+} // namespace cpp
+} // namespace ary
+
diff --git a/autodoc/source/ary/cpp/makefile.mk b/autodoc/source/ary/cpp/makefile.mk
new file mode 100644
index 00000000..fba387a4
--- /dev/null
+++ b/autodoc/source/ary/cpp/makefile.mk
@@ -0,0 +1,116 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: np $ $Date: 2002-03-08 14:45:18 $
+#
+# 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_cpp
+
+
+
+# --- Settings -----------------------------------------------------
+
+ENABLE_EXCEPTIONS=true
+PRJINC=$(PRJ)$/source
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
+
+
+# --- Files --------------------------------------------------------
+
+
+OBJFILES= \
+ $(OBJ)$/c_class.obj \
+ $(OBJ)$/c_define.obj \
+ $(OBJ)$/c_enum.obj \
+ $(OBJ)$/c_enuval.obj \
+ $(OBJ)$/c_funct.obj \
+ $(OBJ)$/c_gate.obj \
+ $(OBJ)$/c_macro.obj \
+ $(OBJ)$/c_namesp.obj \
+ $(OBJ)$/c_osigna.obj \
+ $(OBJ)$/c_slots.obj \
+ $(OBJ)$/c_tydef.obj \
+ $(OBJ)$/c_vari.obj \
+ $(OBJ)$/ca_type.obj \
+ $(OBJ)$/cdf_gate.obj \
+ $(OBJ)$/cg_file.obj \
+ $(OBJ)$/cg_gate.obj \
+ $(OBJ)$/cg_proj.obj \
+ $(OBJ)$/cpp_defs.obj \
+ $(OBJ)$/cpp_disp.obj \
+ $(OBJ)$/namechai.obj \
+ $(OBJ)$/predecla.obj \
+ $(OBJ)$/prpr.obj \
+ $(OBJ)$/tplparam.obj \
+ $(OBJ)$/usedtype.obj
+
+
+
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+
+
diff --git a/autodoc/source/ary/cpp/tplparam.cxx b/autodoc/source/ary/cpp/tplparam.cxx
new file mode 100644
index 00000000..30d35a4b
--- /dev/null
+++ b/autodoc/source/ary/cpp/tplparam.cxx
@@ -0,0 +1,138 @@
+/*************************************************************************
+ *
+ * $RCSfile: tplparam.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: np $ $Date: 2002-03-08 14:45:18 $
+ *
+ * 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 "tplparam.hxx"
+
+
+// NOT FULLY DEFINED SERVICES
+#include <cpp/c_gate.hxx>
+
+
+namespace ary
+{
+namespace cpp
+{
+namespace ut
+{
+
+TplParameter_Type::TplParameter_Type( Tid i_nType )
+ : nType(i_nType)
+{
+}
+
+TplParameter_Type::~TplParameter_Type()
+{
+}
+
+intt
+TplParameter_Type::Compare( const TemplateParameter & i_rOther ) const
+{
+ const TplParameter_Type * pOther
+ = dynamic_cast< const TplParameter_Type* >( &i_rOther );
+ if (pOther == 0)
+ return -1;
+
+ return nType - pOther->nType;
+}
+
+void
+TplParameter_Type::Get_Text( StreamStr & o_rOut,
+ const ary::cpp::DisplayGate & i_rGate ) const
+{
+ i_rGate.Get_TypeText( o_rOut, nType );
+}
+
+TplParameter_Const::TplParameter_Const( const udmstri & i_sConst )
+ : sConstant(i_sConst)
+{
+}
+
+TplParameter_Const::~TplParameter_Const()
+{
+}
+
+intt
+TplParameter_Const::Compare( const TemplateParameter & i_rOther ) const
+{
+ const TplParameter_Const * pOther
+ = dynamic_cast< const TplParameter_Const* >( &i_rOther );
+ if (pOther == 0)
+ return +1;
+
+ return strcmp( sConstant.c_str(), pOther->sConstant.c_str() );
+}
+
+void
+TplParameter_Const::Get_Text( StreamStr & o_rOut,
+ const ary::cpp::DisplayGate & i_rGate ) const
+{
+ o_rOut << sConstant;
+}
+
+
+
+} // namespace ut
+} // namespace cpp
+} // namespace ary
+
+
diff --git a/autodoc/source/ary/cpp/tplparam.hxx b/autodoc/source/ary/cpp/tplparam.hxx
new file mode 100644
index 00000000..6fc0ace1
--- /dev/null
+++ b/autodoc/source/ary/cpp/tplparam.hxx
@@ -0,0 +1,142 @@
+/*************************************************************************
+ *
+ * $RCSfile: tplparam.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: np $ $Date: 2002-03-08 14:45:18 $
+ *
+ * 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_CPP_TPLPARAM_HXX
+#define ARY_CPP_TPLPARAM_HXX
+
+
+// USED SERVICES
+ // BASE CLASSES
+ // COMPONENTS
+ // PARAMETERS
+#include <ary/ids.hxx>
+
+
+
+namespace ary
+{
+namespace cpp
+{
+ class UsedType;
+ class DisplayGate;
+
+namespace ut
+{
+
+class TemplateParameter
+{
+ public:
+ virtual ~TemplateParameter() {}
+
+ virtual intt Compare(
+ const TemplateParameter &
+ i_rOther ) const = 0;
+ virtual void Get_Text(
+ StreamStr & o_rOut,
+ const ary::cpp::DisplayGate &
+ i_rGate ) const = 0;
+};
+
+
+class TplParameter_Type : public TemplateParameter
+{
+ public:
+ TplParameter_Type(
+ Tid i_nType );
+ ~TplParameter_Type();
+
+ virtual intt Compare(
+ const TemplateParameter &
+ i_rOther ) const;
+ virtual void Get_Text(
+ StreamStr & o_rOut,
+ const ary::cpp::DisplayGate &
+ i_rGate ) const;
+ private:
+ Tid nType;
+};
+
+class TplParameter_Const : public TemplateParameter
+{
+ public:
+ TplParameter_Const(
+ const udmstri & i_sConst );
+ ~TplParameter_Const();
+
+ virtual intt Compare(
+ const TemplateParameter &
+ i_rOther ) const;
+ virtual void Get_Text(
+ StreamStr & o_rOut,
+ const ary::cpp::DisplayGate &
+ i_rGate ) const;
+ private:
+ udmstri sConstant;
+};
+
+} // namespace ut
+} // namespace cpp
+} // namespace ary
+
+
+
+#endif
+
diff --git a/autodoc/source/ary/cpp/usedtype.cxx b/autodoc/source/ary/cpp/usedtype.cxx
new file mode 100644
index 00000000..92036b8b
--- /dev/null
+++ b/autodoc/source/ary/cpp/usedtype.cxx
@@ -0,0 +1,602 @@
+/*************************************************************************
+ *
+ * $RCSfile: usedtype.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: np $ $Date: 2002-03-08 14:45:18 $
+ *
+ * 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/cpp/usedtype.hxx>
+
+
+// NOT FULLY DEFINED SERVICES
+#include <cosv/template/tpltools.hxx>
+#include <ary/ce.hxx>
+#include <ary/cpp/c_etypes.hxx>
+#include <cpp/c_gate.hxx>
+#include <instlist.hxx>
+#include "namechai.hxx"
+#include "tplparam.hxx"
+
+
+
+namespace ary
+{
+namespace cpp
+{
+
+typedef std::vector< ary::cpp::E_ConVol > PtrLevelVector;
+
+struct UsedType::CheshireCat
+{
+
+ ut::NameChain aPath;
+ PtrLevelVector aPtrLevels;
+ ary::cpp::E_ConVol eConVol_Type;
+ bool bIsReference;
+ bool bIsAbsolute;
+ bool bRefers2BuiltInType;
+ E_TypeSpecialisation
+ eTypeSpecialisation;
+ Tid nId;
+ Rid nRelatedCe;
+
+ // Operations
+ uintt PtrLevel() const { return uintt(aPtrLevels.size()); }
+
+ CheshireCat();
+};
+
+
+
+UsedType::
+CheshireCat::CheshireCat()
+ : // aPath,
+ // aPtrLevels,
+ eConVol_Type(CONVOL_none),
+ bIsReference(false),
+ bIsAbsolute(false),
+ bRefers2BuiltInType(false),
+ eTypeSpecialisation(TYSP_none),
+ nId(0),
+ nRelatedCe(0)
+{
+}
+
+UsedType::UsedType()
+ : pi(new CheshireCat)
+{
+}
+
+UsedType::~UsedType()
+{
+}
+
+namespace
+{
+
+inline bool
+result2bool( intt i_nResult )
+ { return i_nResult < 0; }
+
+intt compare_PtrLevelVector(
+ const PtrLevelVector &
+ i_r1,
+ const PtrLevelVector &
+ i_r2 );
+inline intt
+compare_ConVol( E_ConVol i_e1,
+ E_ConVol i_e2 )
+ { return intt(i_e1) - intt(i_e2); }
+
+inline intt
+compare_bool( bool i_b1,
+ bool i_b2 )
+ { return i_b1 == i_b2
+ ? 0
+ : NOT i_b1
+ ? -1
+ : +1; }
+inline intt
+compare_Specialisation( E_TypeSpecialisation i_e1,
+ E_TypeSpecialisation i_e2 )
+ { return intt(i_e1) - intt(i_e2); }
+
+inline bool
+is_const( E_ConVol i_eCV )
+ { return ( intt(i_eCV) & intt(CONVOL_const) ) != 0; }
+
+inline bool
+is_volatile( E_ConVol i_eCV )
+ { return ( intt(i_eCV) & intt(CONVOL_volatile) ) != 0; }
+
+
+intt
+compare_PtrLevelVector( const PtrLevelVector & i_r1,
+ const PtrLevelVector & i_r2 )
+{
+ intt nResult = i_r1.size() - i_r2.size();
+ if ( nResult != 0 )
+ return nResult;
+
+ PtrLevelVector::const_iterator it1 = i_r1.begin();
+ PtrLevelVector::const_iterator it1End = i_r1.end();
+ PtrLevelVector::const_iterator it2 = i_r2.begin();
+
+ for ( ; it1 != it1End; ++it1, ++it2 )
+ {
+ nResult = compare_ConVol(*it1, *it2);
+ if ( nResult != 0 )
+ return nResult;
+ }
+
+ return 0;
+}
+
+} // anonymous namespace
+
+bool
+UsedType::operator<( const UsedType & i_rType ) const
+{
+ intt nResult = pi->aPath.Compare( i_rType.pi->aPath );
+ if ( nResult != 0 )
+ return result2bool(nResult);
+
+ nResult = compare_ConVol( pi->eConVol_Type, i_rType.pi->eConVol_Type );
+ if ( nResult != 0 )
+ return result2bool(nResult);
+
+ nResult = compare_PtrLevelVector( pi->aPtrLevels, i_rType.pi->aPtrLevels );
+ if ( nResult != 0 )
+ return result2bool(nResult);
+
+ nResult = compare_bool( pi->bIsReference, i_rType.pi->bIsReference );
+ if ( nResult != 0 )
+ return result2bool(nResult);
+
+ nResult = compare_bool( pi->bIsAbsolute, i_rType.pi->bIsAbsolute );
+ if ( nResult != 0 )
+ return result2bool(nResult);
+
+ nResult = compare_Specialisation( pi->eTypeSpecialisation, i_rType.pi->eTypeSpecialisation );
+ if ( nResult != 0 )
+ return result2bool(nResult);
+
+ return false;
+}
+
+void
+UsedType::Set_Id( Tid i_nId )
+{
+ pi->nId = i_nId;
+}
+
+void
+UsedType::Set_Absolute()
+{
+ pi->bIsAbsolute = true;
+}
+
+void
+UsedType::Add_NameSegment( const char * i_sSeg )
+{
+ pi->aPath.Add_Segment(i_sSeg);
+}
+
+ut::List_TplParameter &
+UsedType::Enter_Template()
+{
+ return pi->aPath.Templatize_LastSegment();
+}
+
+void
+UsedType::LeaveTemplate()
+{
+}
+
+void
+UsedType::Set_Unsigned()
+{
+ pi->eTypeSpecialisation = TYSP_unsigned;
+}
+
+void
+UsedType::Set_Signed()
+{
+ pi->eTypeSpecialisation = TYSP_signed;
+}
+
+void
+UsedType::Set_BuiltIn( const char * i_sType )
+{
+ pi->aPath.Add_Segment(i_sType);
+ pi->bRefers2BuiltInType = true;
+}
+
+void
+UsedType::Set_Const()
+{
+ if (pi->PtrLevel() == 0)
+ pi->eConVol_Type = E_ConVol(pi->eConVol_Type | CONVOL_const);
+ else
+ pi->aPtrLevels.back() = E_ConVol(pi->aPtrLevels.back() | CONVOL_const);
+}
+
+void
+UsedType::Set_Volatile()
+{
+ if (pi->PtrLevel() == 0)
+ pi->eConVol_Type = E_ConVol(pi->eConVol_Type | CONVOL_volatile);
+ else
+ pi->aPtrLevels.back() = E_ConVol(pi->aPtrLevels.back() | CONVOL_volatile);
+}
+
+void
+UsedType::Add_PtrLevel()
+{
+ pi->aPtrLevels.push_back(CONVOL_none);
+}
+
+void
+UsedType::Set_Reference()
+{
+ pi->bIsReference = true;
+}
+
+Rid
+UsedType::Connect2Ce( const Gate & i_rGate )
+{
+ Rid ret = 0;
+ const InstanceList &
+ rInstances = i_rGate.Search_TypeName( LocalName() );
+ if ( rInstances.empty() )
+ return 0;
+
+ uintt nMatchCounter = 0;
+ for ( InstanceList::const_iterator it = rInstances.begin();
+ it != rInstances.end() AND nMatchCounter < 2;
+ ++it )
+ {
+ if ( DoesMatch_Ce(*it, i_rGate) )
+ {
+ ret = *it;
+ nMatchCounter++;
+ }
+ } // end for
+ if ( nMatchCounter == 1 )
+ {
+ pi->nRelatedCe = ret;
+ return ret;
+ }
+ if ( nMatchCounter > 1 )
+ {
+#if 0 // Only for debugging, yet.
+ Cerr() << "Warning: Type "
+ << LocalName()
+ << " found more than one time."
+ << Endl();
+#endif // 0
+ pi->nRelatedCe = ret;
+ return ret;
+ }
+
+ return 0;
+}
+
+bool
+UsedType::IsBuiltInType() const
+{
+ return pi->bRefers2BuiltInType
+ AND pi->aPtrLevels.size() == 0
+ AND NOT pi->bIsReference
+ AND pi->eConVol_Type == ary::cpp::CONVOL_none;
+}
+
+const udmstri &
+UsedType::LocalName() const
+{
+ return pi->aPath.LastSegment();
+}
+
+E_TypeSpecialisation
+UsedType::TypeSpecialisation() const
+{
+ return pi->eTypeSpecialisation;
+}
+
+Rid
+UsedType::inq_RelatedCe() const
+{
+ return pi->nRelatedCe;
+}
+
+
+Tid
+UsedType::inq_Id_Type() const
+{
+ return pi->nId;
+}
+
+bool
+UsedType::inq_IsConst() const
+{
+ if ( is_const(pi->eConVol_Type) )
+ return true;
+ for ( PtrLevelVector::const_iterator it = pi->aPtrLevels.begin();
+ it != pi->aPtrLevels.end();
+ ++it )
+ {
+ if ( is_const(*it) )
+ return true;
+ }
+
+ return false;
+}
+
+void
+UsedType::inq_Get_Text( StreamStr & o_rPreName,
+ StreamStr & o_rName,
+ StreamStr & o_rPostName,
+ const DisplayGate & i_rGate ) const
+{
+ if ( is_const(pi->eConVol_Type) )
+ o_rPreName << "const ";
+ if ( is_volatile(pi->eConVol_Type) )
+ o_rPreName << "volatile ";
+ if ( pi->bIsAbsolute )
+ o_rPreName << "::";
+
+ pi->aPath.Get_Text( o_rPreName, o_rName, o_rPostName, i_rGate );
+
+ for ( PtrLevelVector::const_iterator it = pi->aPtrLevels.begin();
+ it != pi->aPtrLevels.end();
+ ++it )
+ {
+ o_rPostName << " *";
+ if ( is_const(*it) )
+ o_rPostName << " const";
+ if ( is_volatile(*it) )
+ o_rPostName << " volatile";
+ }
+ if ( pi->bIsReference )
+ o_rPostName << " &";
+}
+
+
+namespace
+{
+
+class NameScope_const_iterator
+{
+ public:
+ NameScope_const_iterator(
+ Rid i_nId,
+ const Gate & i_rGate );
+
+ operator bool() const { return pCe != 0; }
+ const udmstri & operator*() const;
+
+ void go_up();
+
+ private:
+ const CodeEntity * pCe;
+ const Gate * pGate;
+};
+
+
+NameScope_const_iterator::NameScope_const_iterator( Rid i_nId,
+ const Gate & i_rGate )
+ : pCe(i_rGate.Find_Ce(i_nId)),
+ pGate(&i_rGate)
+{
+}
+
+const udmstri &
+NameScope_const_iterator::operator*() const
+{
+ return pCe ? pCe->LocalName()
+ : udmstri::Null_();
+}
+
+void
+NameScope_const_iterator::go_up()
+{
+ if (pCe == 0)
+ return;
+ pCe = pGate->Find_Ce(pCe->Owner());
+
+ if (pCe != 0 ? pCe->Owner() == 0 : false)
+ pCe = 0; // Global namespace provides no scope name.
+}
+
+
+
+} // anonymous namespace
+
+
+
+bool
+UsedType::DoesMatch_Ce( Rid i_nId,
+ const Gate & i_rGate ) const
+{
+ NameScope_const_iterator
+ itScope( i_nId, i_rGate );
+ ut::NameChain::const_iterator
+ itPath = pi->aPath.end();
+ if ( itPath == pi->aPath.begin() )
+ return false;
+ itPath--;
+ if (itPath == pi->aPath.begin())
+ {
+ if ( NOT pi->bIsAbsolute )
+ return true;
+ itScope.go_up();
+ return NOT itScope;
+ }
+
+ for ( itScope.go_up(), --itPath;
+ itScope ;
+ itScope.go_up(), --itPath )
+ {
+ if ( (*itPath).Name() != *itScope )
+ return false;
+ if ( itPath == pi->aPath.begin() )
+ {
+ if ( NOT pi->bIsAbsolute )
+ return true;
+ itScope.go_up();
+ return NOT itScope;
+ }
+ }
+ return false;
+}
+
+
+
+
+
+namespace ut
+{
+
+List_TplParameter::List_TplParameter()
+// : aTplParameters
+{
+}
+
+List_TplParameter::~List_TplParameter()
+{
+ csv::erase_container_of_heap_ptrs(aTplParameters);
+}
+
+void
+List_TplParameter::AddParam_Type( Tid i_nType )
+{
+ aTplParameters.push_back( new TplParameter_Type(i_nType) );
+}
+
+void
+List_TplParameter::AddParam_Constant( const udmstri & i_sConst )
+{
+ aTplParameters.push_back( new TplParameter_Const(i_sConst) );
+}
+
+List_TplParameter::const_iterator
+List_TplParameter::Begin() const
+{
+ return aTplParameters.begin();
+}
+
+List_TplParameter::const_iterator
+List_TplParameter::End() const
+{
+ return aTplParameters.end();
+}
+
+void
+List_TplParameter::Get_Text( StreamStr & o_rOut,
+ const ary::cpp::DisplayGate & i_rGate ) const
+{
+ Vector_TplArgument::const_iterator it = aTplParameters.begin();
+ Vector_TplArgument::const_iterator itEnd = aTplParameters.end();
+
+ if ( it == itEnd )
+ {
+ o_rOut << "<>";
+ return;
+ }
+
+ o_rOut << "< ";
+
+ (*it)->Get_Text( o_rOut, i_rGate );
+
+ for ( ++it; it != itEnd; ++it )
+ {
+ o_rOut << ", ";
+ (*it)->Get_Text( o_rOut, i_rGate );
+ }
+
+ o_rOut << " >";
+}
+
+intt
+List_TplParameter::Compare( const List_TplParameter & i_rOther ) const
+{
+ intt nResult = intt(aTplParameters.size()) - intt(i_rOther.aTplParameters.size());
+
+ if (nResult != 0)
+ return nResult;
+
+ Vector_TplArgument::const_iterator it1 = aTplParameters.begin();
+ Vector_TplArgument::const_iterator it1End = aTplParameters.end();
+ Vector_TplArgument::const_iterator it2 = i_rOther.aTplParameters.begin();
+
+ for ( ; it1 != it1End; ++it1, ++it2 )
+ {
+ nResult = (*it1)->Compare( *(*it2) );
+ if (nResult != 0)
+ return nResult;
+ }
+
+ return 0;
+}
+
+
+} // namespace ut
+} // namespace cpp
+} // namespace ary
+