diff options
Diffstat (limited to 'autodoc/inc/ary/cpp')
26 files changed, 3576 insertions, 0 deletions
diff --git a/autodoc/inc/ary/cpp/c_builtintype.hxx b/autodoc/inc/ary/cpp/c_builtintype.hxx new file mode 100644 index 000000000000..0fff94d1e5fc --- /dev/null +++ b/autodoc/inc/ary/cpp/c_builtintype.hxx @@ -0,0 +1,100 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_C_BUILTINTYPE_HXX +#define ARY_CPP_C_BUILTINTYPE_HXX + + + +// USED SERVICES + // BASE CLASSES +#include <ary/cpp/c_type.hxx> + // COMPONENTS + // PARAMETERS + + +namespace ary +{ +namespace cpp +{ + + +/** Represents types like void, int, double. +*/ +class BuiltInType : public Type +{ + public: + enum E_ClassId { class_id = 1200 }; + + BuiltInType( + const String & i_sName, + E_TypeSpecialisation + i_Specialisation ); + + String SpecializedName() const; + + static String SpecializedName_( + const char * i_sName, + E_TypeSpecialisation + i_eTypeSpecialisation ); + private: + // Interface csv::ConstProcessorClient + virtual void do_Accept( + csv::ProcessorIfc & io_processor ) const; + // Interface Object: + virtual ClassId get_AryClass() const; + + // Interface Type: + virtual bool inq_IsConst() const; + virtual void inq_Get_Text( + StreamStr & o_rPreName, + StreamStr & o_rName, + StreamStr & o_rPostName, + const Gate & i_rGate ) const; + // DATA + String sName; + E_TypeSpecialisation + eSpecialisation; +}; + + + +inline String +BuiltInType::SpecializedName() const +{ + return SpecializedName_(sName, eSpecialisation); +} + + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/c_ce.hxx b/autodoc/inc/ary/cpp/c_ce.hxx new file mode 100644 index 000000000000..5f7e6353e90a --- /dev/null +++ b/autodoc/inc/ary/cpp/c_ce.hxx @@ -0,0 +1,106 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_C_CE_HXX +#define ARY_CPP_C_CE_HXX + + +// USED SERVICES + // BASE CLASSES +#include <ary/cpp/c_cppentity.hxx> + // COMPONENTS +#include <ary/doc/d_docu.hxx> + // PARAMETERS +#include <ary/cpp/c_types4cpp.hxx> +#include <ary/cpp/c_traits.hxx> +#include <ary/loc/loc_types4loc.hxx> + + +namespace ary +{ +namespace cpp +{ + +typedef loc::Le_id Lid; + + + +/** Represents a C++ code entity. +*/ +class CodeEntity : public ary::cpp::CppEntity +{ + public: + typedef Ce_Traits traits_t; + + // LIFECYCLE + virtual ~CodeEntity() {} + + // INQUIRY + Ce_id CeId() const { return Ce_id(Id()); } + const String & LocalName() const; + Cid Owner() const; + Lid Location() const; + bool IsVisible() const; + + // ACCESS + void Set_InVisible() { bIsVisible = false; } + + protected: + CodeEntity() : bIsVisible(true) {} + + private: + // Locals + virtual const String & + inq_LocalName() const = 0; + virtual Cid inq_Owner() const = 0; + virtual Lid inq_Location() const = 0; + + // DATA + mutable bool bIsVisible; +}; + + +// IMPLEMENTATION +inline const String & +CodeEntity::LocalName() const + { return inq_LocalName(); } +inline Cid +CodeEntity::Owner() const + { return inq_Owner(); } +inline Lid +CodeEntity::Location() const + { return inq_Location(); } + + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/c_class.hxx b/autodoc/inc/ary/cpp/c_class.hxx new file mode 100644 index 000000000000..49b75b72902f --- /dev/null +++ b/autodoc/inc/ary/cpp/c_class.hxx @@ -0,0 +1,248 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_C_CLASS_HXX +#define ARY_CPP_C_CLASS_HXX + + + +// USED SERVICES + // BASE CLASSES +#include <ary/cpp/c_ce.hxx> +#include <ary/arygroup.hxx> + // OTHER +#include <ary/symtreenode.hxx> +#include <ary/cessentl.hxx> +#include <ary/sequentialids.hxx> +#include <ary/cpp/c_types4cpp.hxx> +#include <ary/cpp/c_slntry.hxx> + +namespace ary +{ +namespace cpp +{ + class Enum; + class Typedef; + class Function; + class Variable; +} +} + + + +namespace ary +{ +namespace cpp +{ + + +/** A C++ class. +*/ +class Class : public CodeEntity, + public AryGroup +{ + public: + enum E_ClassId { class_id = 1001 }; + + enum E_Slots + { + SLOT_Bases = 1, + SLOT_NestedClasses, + SLOT_Enums, + SLOT_Typedefs, + SLOT_Operations, + SLOT_StaticOperations, + SLOT_Data, + SLOT_StaticData, + SLOT_FriendClasses, + SLOT_FriendOperations + }; + + typedef ::ary::symtree::Node<CeNode_Traits> node_t; + + + // LIFECYCLE + Class( + const String & i_sLocalName, + Ce_id i_nOwner, + E_Protection i_eProtection, + loc::Le_id i_nFile, + E_ClassKey i_eClassKey ); + ~Class(); + + // OPERATIONS + void Add_BaseClass( + const S_Classes_Base & + i_rBaseClass ); + void Add_TemplateParameterType( + const String & i_sLocalName, + Type_id i_nIdAsType ); + void Add_KnownDerivative( + Ce_id i_nId ) + { aKnownDerivatives.Add(i_nId); } + + void Add_LocalClass( + const String & i_sLocalName, + Cid i_nId ); + void Add_LocalEnum( + const String & i_sLocalName, + Cid i_nId ); + void Add_LocalTypedef( + const String & i_sLocalName, + Cid i_nId ); + void Add_LocalOperation( + const String & i_sLocalName, + Cid i_nId ); + void Add_LocalStaticOperation( + const String & i_sLocalName, + Cid i_nId ); + void Add_LocalData( + const String & i_sLocalName, + Cid i_nId ); + void Add_LocalStaticData( + const String & i_sLocalName, + Cid i_nId ); + + void UpdateVirtuality( + E_Virtuality i_eVirtuality ) + { if ( int(i_eVirtuality) > int(eVirtuality) ) + eVirtuality = i_eVirtuality; } + const List_TplParam & + TemplateParameters() const + { return aTemplateParameterTypes; } + const List_Bases & BaseClasses() const { return aBaseClasses; } + const SequentialIds<Ce_id> & + KnownDerivatives() const + { return aKnownDerivatives; } + + // INQUIRY + E_ClassKey ClassKey() const; + E_Protection Protection() const; + E_Virtuality Virtuality() const { return eVirtuality; } + + Ce_id Search_Child( + const String & i_key ) const; + Rid Search_LocalClass( + const String & i_sName ) const; + const node_t & AsNode() const; + + // ACCESS + node_t & AsNode(); + + private: + NON_COPYABLE(Class); + + // Interface csv::ConstProcessorClient + virtual void do_Accept( + csv::ProcessorIfc & io_processor ) const; + + // Interface ary::cpp::CodeEntity + virtual const String & + inq_LocalName() const; + virtual Cid inq_Owner() const; + virtual loc::Le_id inq_Location() const; + + // Interface ary::cpp::CppEntity + virtual ClassId get_AryClass() const; + + // Interface ary::AryGroup + virtual Gid inq_Id_Group() const; + virtual const cpp::CppEntity & + inq_RE_Group() const; + virtual const group::SlotList & + inq_Slots() const; + virtual DYN Slot * inq_Create_Slot( + SlotAccessId i_nSlot ) const; + // Local + typedef List_LocalCe::const_iterator CIterator_Locals; + typedef List_LocalCe::iterator Iterator_Locals; + typedef SequentialIds<Ce_id> IdSequence; + + CIterator_Locals PosOfName( + const List_LocalCe& i_rList, + const String & i_sName ) const; + // DATA + CeEssentials aEssentials; + node_t aAssignedNode; + + List_Bases aBaseClasses; + List_TplParam aTemplateParameterTypes; + + List_LocalCe aClasses; + List_LocalCe aEnums; + List_LocalCe aTypedefs; + List_LocalCe aOperations; + List_LocalCe aStaticOperations; + List_LocalCe aData; + List_LocalCe aStaticData; + + IdSequence aFriendClasses; + IdSequence aFriendOperations; + IdSequence aKnownDerivatives; + + E_ClassKey eClassKey; + E_Protection eProtection; + E_Virtuality eVirtuality; +}; + + + + +// IMPLEMENTATION +inline E_ClassKey +Class::ClassKey() const +{ + return eClassKey; +} + +inline E_Protection +Class::Protection() const +{ + return eProtection; +} + +inline const Class::node_t & +Class::AsNode() const +{ + return aAssignedNode; +} + +inline Class::node_t & +Class::AsNode() +{ + return aAssignedNode; +} + + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/c_cppentity.hxx b/autodoc/inc/ary/cpp/c_cppentity.hxx new file mode 100644 index 000000000000..fab3d2f728fe --- /dev/null +++ b/autodoc/inc/ary/cpp/c_cppentity.hxx @@ -0,0 +1,94 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_C_CPPENTITY_HXX +#define ARY_CPP_C_CPPENTITY_HXX + + + +// USED SERVICES + // BASE CLASSES +#include <ary/entity.hxx> + // OTHER +#include <ary/doc/d_docu.hxx> + + + +namespace ary +{ +namespace cpp +{ + + +/** A C++ code entity as parsed by Autodoc. +*/ +class CppEntity : public Entity +{ + public: + // LIFECYCLE + virtual ~CppEntity() {} + + // OPERATIONS + + // INQUIRY + const ary::doc::Documentation & + Docu() const; + // ACCESS + void Set_Docu( + DYN ary::doc::Node & + pass_docudata ); + private: + // DATA + ary::doc::Documentation + aDocu; +}; + + + + +// IMPLEMENTATION +inline const doc::Documentation & +CppEntity::Docu() const +{ + return aDocu; +} + +inline void +CppEntity::Set_Docu(ary::doc::Node & pass_docudata) +{ + aDocu.Set_Data(pass_docudata); +} + + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/c_de.hxx b/autodoc/inc/ary/cpp/c_de.hxx new file mode 100644 index 000000000000..8426222ab3b4 --- /dev/null +++ b/autodoc/inc/ary/cpp/c_de.hxx @@ -0,0 +1,107 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_C_DE_HXX +#define ARY_CPP_C_DE_HXX + + + +// USED SERVICES + // BASE CLASSES +#include <ary/cpp/c_cppentity.hxx> + // OTHER +#include <ary/loc/loc_types4loc.hxx> +#include <ary/cpp/c_traits.hxx> + + + + +namespace ary +{ +namespace cpp +{ + + +/** Describes a C/C++ #define statement. May be a define or a macro, for which + two cases the two different constructors are to be used. + + This class is used by cpp::PreProcessor. +*/ +class DefineEntity : public ary::cpp::CppEntity +{ + public: + typedef Def_Traits traits_t; + + virtual ~DefineEntity() {} + + // INQUIRY + De_id DefId() const { return De_id(Id()); } + const String & LocalName() const; + loc::Le_id Location() const; + const StringVector & + DefinitionText() const; + // ACCESS + protected: + DefineEntity( + const String & i_name, + loc::Le_id i_declaringFile ); + private: + // Locals + virtual const StringVector & + inq_DefinitionText() const = 0; + + // DATA + String sName; + loc::Le_id nLocation; +}; + + + + +// IMPLEMENTATION +inline const String & +DefineEntity::LocalName() const + { return sName; } + +inline loc::Le_id +DefineEntity::Location() const + { return nLocation; } + +inline const StringVector & +DefineEntity::DefinitionText() const + { return inq_DefinitionText(); } + + + + + +} // end namespace cpp +} // end namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/c_define.hxx b/autodoc/inc/ary/cpp/c_define.hxx new file mode 100644 index 000000000000..460ddb79ac1b --- /dev/null +++ b/autodoc/inc/ary/cpp/c_define.hxx @@ -0,0 +1,85 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_C_DEFINE_HXX +#define ARY_CPP_C_DEFINE_HXX + + +// USED SERVICES + // BASE CLASSES +#include <ary/cpp/c_de.hxx> + // OTHER + + + + +namespace ary +{ +namespace cpp +{ + + +/** A C/C++ #define ("#define DEF") statement, but no macro. + + @see Macro +*/ +class Define : public DefineEntity +{ + public: + enum E_ClassId { class_id = 1601 }; + + Define( /// Used for: #define DEFINE xyz + const String & i_name, + const StringVector & + i_definition, + loc::Le_id i_declaringFile ); + virtual ~Define(); + private: + // Interface csv::ConstProcessorClient + virtual void do_Accept( + csv::ProcessorIfc & io_processor ) const; + + // Interface ary::Object: + virtual ClassId get_AryClass() const; + + // Interface DefineEntity: + virtual const StringVector & + inq_DefinitionText() const; + // DATA + StringVector aDefinition; +}; + + + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/c_enum.hxx b/autodoc/inc/ary/cpp/c_enum.hxx new file mode 100644 index 000000000000..4704c700773f --- /dev/null +++ b/autodoc/inc/ary/cpp/c_enum.hxx @@ -0,0 +1,119 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_C_ENUM_HXX +#define ARY_CPP_C_ENUM_HXX + + + +// USED SERVICES + // BASE CLASSES +#include <ary/cpp/c_ce.hxx> +#include <ary/arygroup.hxx> + // OTHER +#include <ary/cessentl.hxx> +#include <ary/cpp/c_types4cpp.hxx> +#include <ary/sequentialids.hxx> + + + + + +namespace ary +{ +namespace cpp +{ + + +/** A C++ enum declaration. +*/ +class Enum : public CodeEntity, + public AryGroup +{ + public: + enum E_ClassId { class_id = 1002 }; + + enum E_Slots + { + SLOT_Values = 1 + }; + + // LIFECYCLE + Enum( + const String & i_sLocalName, + Ce_id i_nOwner, + E_Protection i_eProtection, + Lid i_nFile ); + ~Enum(); + + // OPERATIONS + void Add_Value( + Ce_id i_nId ); + + // INQUIRY + E_Protection Protection() const { return eProtection; } + + private: + // Interface csv::ConstProcessorClient + virtual void do_Accept( + csv::ProcessorIfc & io_processor ) const; + + // Interface ary::cpp::CodeEntity + virtual const String & + inq_LocalName() const; + virtual Cid inq_Owner() const; + virtual Lid inq_Location() const; + + // Interface ary::cpp::CppEntity + virtual ClassId get_AryClass() const; + + // Interface ary::AryGroup + virtual Gid inq_Id_Group() const; + virtual const cpp::CppEntity & + inq_RE_Group() const; + virtual const group::SlotList & + inq_Slots() const; + virtual DYN Slot * inq_Create_Slot( + SlotAccessId i_nSlot ) const; + + // DATA + CeEssentials aEssentials; + SequentialIds<Ce_id> + aValues; + E_Protection eProtection; +}; + + + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/c_enuval.hxx b/autodoc/inc/ary/cpp/c_enuval.hxx new file mode 100644 index 000000000000..3ed523baa3f3 --- /dev/null +++ b/autodoc/inc/ary/cpp/c_enuval.hxx @@ -0,0 +1,99 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_C_ENUVAL_HXX +#define ARY_CPP_C_ENUVAL_HXX + + +// USED SERVICES + // BASE CLASSES +#include <ary/cpp/c_ce.hxx> + // OTHER +#include <ary/cessentl.hxx> +#include <ary/cpp/c_types4cpp.hxx> + + + +namespace ary +{ +namespace cpp +{ + + + +/** A C++ enum value declaration and definition. +*/ +class EnumValue : public CodeEntity +{ + public: + enum E_ClassId { class_id = 1006 }; + + // LIFECYCLE + EnumValue( + const String & i_sLocalName, + Ce_id i_nOwner, + String i_sInitialisation ); + ~EnumValue(); + // INQUIRY + const String & Initialisation() const; + + private: + // Interface csv::ConstProcessorClient + virtual void do_Accept( + csv::ProcessorIfc & io_processor ) const; + + // Interface ary::cpp::CodeEntity + virtual const String & + inq_LocalName() const; + virtual Cid inq_Owner() const; + virtual Lid inq_Location() const; + + // Interface ary::cpp::CppEntity + virtual ClassId get_AryClass() const; + + // DATA + CeEssentials aEssentials; + String sInitialisation; +}; + + + + +// IMPLEMENTATION +inline const String & +EnumValue::Initialisation() const + { return sInitialisation; } + + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/c_funct.hxx b/autodoc/inc/ary/cpp/c_funct.hxx new file mode 100644 index 000000000000..917ff823f151 --- /dev/null +++ b/autodoc/inc/ary/cpp/c_funct.hxx @@ -0,0 +1,152 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_C_FUNCT_HXX +#define ARY_CPP_C_FUNCT_HXX + + + +// USED SERVICES + // BASE CLASSES +#include <ary/cpp/c_ce.hxx> + // OTHER +#include <ary/cessentl.hxx> +#include <ary/cpp/c_types4cpp.hxx> +#include <ary/cpp/c_slntry.hxx> +#include <ary/cpp/c_vfflag.hxx> +#include <ary/cpp/c_osigna.hxx> + + + + +namespace ary +{ +namespace cpp +{ + + + +/** A C++ function declaration. +*/ +class Function : public CodeEntity +{ + public: + enum E_ClassId { class_id = 1004 }; + + Function( + const String & i_sLocalName, + Ce_id i_nOwner, + E_Protection i_eProtection, + loc::Le_id i_nFile, + Type_id i_nReturnType, + const std::vector<S_Parameter> & + i_parameters, + E_ConVol i_conVol, + E_Virtuality i_eVirtuality, + FunctionFlags i_aFlags, + bool i_bThrowExists, + const std::vector<Type_id> & + i_rExceptions ); + ~Function(); + + + // OPERATIONS + void Add_TemplateParameterType( + const String & i_sLocalName, + Type_id i_nIdAsType ); + + // INQUIRY + const OperationSignature & + Signature() const; + Type_id ReturnType() const; + E_Protection Protection() const { return eProtection; } + E_Virtuality Virtuality() const { return eVirtuality; } + const FunctionFlags & + Flags() const { return aFlags; } + const StringVector & + ParamInfos() const { return aParameterInfos; } + const std::vector<Type_id> * + Exceptions() const { return pExceptions.Ptr(); } + + const List_TplParam & + TemplateParameters() const + { return aTemplateParameterTypes; } + bool IsIdentical( + const Function & i_f ) const; + + private: + // Interface csv::ConstProcessorClient + virtual void do_Accept( + csv::ProcessorIfc & io_processor ) const; + + // Interface ary::cpp::CodeEntity + virtual const String & + inq_LocalName() const; + virtual Cid inq_Owner() const; + virtual Lid inq_Location() const; + + // Interface ary::cpp::CppEntity + virtual ClassId get_AryClass() const; + + // Local Types + typedef StringVector ParameterInfoList; + typedef std::vector<Type_id> ExceptionTypeList; + + // DATA + CeEssentials aEssentials; + List_TplParam aTemplateParameterTypes; + OperationSignature aSignature; + Type_id nReturnType; + E_Protection eProtection; + E_Virtuality eVirtuality; + FunctionFlags aFlags; + ParameterInfoList aParameterInfos; + Dyn<ExceptionTypeList> + pExceptions; // if (NOT pExceptions) there is no throw, + // else, there is one, but the list still may be empty. +}; + + + + +// IMPLEMENTATION +inline const OperationSignature & +Function::Signature() const + { return aSignature; } +inline Type_id +Function::ReturnType() const + { return nReturnType; } + + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/c_gate.hxx b/autodoc/inc/ary/cpp/c_gate.hxx new file mode 100644 index 000000000000..df0af5afbd19 --- /dev/null +++ b/autodoc/inc/ary/cpp/c_gate.hxx @@ -0,0 +1,124 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_C_GATE_HXX +#define ARY_CPP_C_GATE_HXX + + +// USED SERVICES + // BASE CLASSES + // OTHER +#include <ary/cpp/c_types4cpp.hxx> + + + +namespace autodoc +{ + class Options; +} +namespace ary +{ + class Entity; + +namespace cpp +{ + class CodeEntity; + class CppEntity; + class CePilot; + class DefPilot; + class TypePilot; +} +namespace loc +{ + class LocationPilot; +} +} + + + + + +namespace ary +{ +namespace cpp +{ + + + +/** Acess to all stored objcts in the repository, which are + relevant to C++. +*/ +class Gate +{ + public: + // LIFECYCLE + virtual ~Gate() {} + + + // OPERATIONS + virtual void Calculate_AllSecondaryInformation() = 0; +// const ::autodoc::Options & +// i_options ) = 0; + + // INQUIRY + virtual const String & + RepositoryTitle() const = 0; + virtual const CodeEntity * + Search_RelatedCe( + Type_id i_type ) const = 0; + virtual const ::ary::cpp::CppEntity * + Search_Entity( + GlobalId i_id ) const = 0; + virtual uintt Get_AlphabeticalList( + List_GlobalIds & o_result, + const char * i_begin, + const char * i_end ) const = 0; + virtual const CePilot & + Ces() const = 0; + virtual const DefPilot & + Defs() const = 0; + virtual const TypePilot & + Types() const = 0; + virtual const loc::LocationPilot & + Locations() const = 0; + + // ACCESS + virtual CePilot & Ces() = 0; + virtual DefPilot & Defs() = 0; + virtual TypePilot & Types() = 0; + virtual loc::LocationPilot & + Locations() = 0; +}; + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/c_macro.hxx b/autodoc/inc/ary/cpp/c_macro.hxx new file mode 100644 index 000000000000..8740c2e94015 --- /dev/null +++ b/autodoc/inc/ary/cpp/c_macro.hxx @@ -0,0 +1,87 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_C_MACRO_HXX +#define ARY_CPP_C_MACRO_HXX + + +// USED SERVICES + // BASE CLASSES +#include <ary/cpp/c_de.hxx> + + + +namespace ary +{ +namespace cpp +{ + + +/** A C/C++ macro ("#define ABC(a,b)") statement, but no simple define. + + @see Define +*/ +class Macro : public DefineEntity +{ + public: + enum E_ClassId { class_id = 1602 }; + + Macro(); + Macro( /// Used for: #define DEFINE xyz + const String & i_name, + const StringVector & + i_params, + const StringVector & + i_definition, + loc::Le_id i_declaringFile ); + ~Macro(); + const StringVector & Params() const { return aParams; } + + private: + // Interface csv::ConstProcessorClient + virtual void do_Accept( + csv::ProcessorIfc & io_processor ) const; + // Interface ary::Object + virtual ClassId get_AryClass() const; + + // Interface DefineEntity: + virtual const StringVector & + inq_DefinitionText() const; + // DATA + StringVector aParams; + StringVector aDefinition; +}; + + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/c_namesp.hxx b/autodoc/inc/ary/cpp/c_namesp.hxx new file mode 100644 index 000000000000..d15c526394f3 --- /dev/null +++ b/autodoc/inc/ary/cpp/c_namesp.hxx @@ -0,0 +1,197 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_C_NAMESP_HXX +#define ARY_CPP_C_NAMESP_HXX + + + +// USED SERVICES + // BASE CLASSES +#include <ary/cpp/c_ce.hxx> +#include <ary/arygroup.hxx> + // OTHER +#include <ary/symtreenode.hxx> +#include <ary/cessentl.hxx> +#include <ary/cpp/c_types4cpp.hxx> +#include <ary/cpp/c_slntry.hxx> + +namespace ary +{ +namespace cpp +{ + class Gate; + class OperationSignature; +} +} + + + +namespace ary +{ +namespace cpp +{ + + + +/** A C++ namespace. +*/ +class Namespace : public CodeEntity, + public AryGroup +{ + public: + enum E_ClassId { class_id = 1000 }; + + enum E_Slots + { + SLOT_SubNamespaces = 1, + SLOT_Classes, + SLOT_Enums, + SLOT_Typedefs, + SLOT_Operations, + SLOT_Variables, + SLOT_Constants + }; + + typedef ::ary::symtree::Node<CeNode_Traits> node_t; + + Namespace(); + Namespace( + const String & i_sName, + Namespace & i_rParent ); + ~Namespace(); + // OPERATIONS + void Add_LocalNamespace( + Namespace & io_rLocalNamespace ); + void Add_LocalClass( + const String & i_sLocalName, + Cid i_nId ); + void Add_LocalEnum( + const String & i_sLocalName, + Cid i_nId ); + void Add_LocalTypedef( + const String & i_sLocalName, + Cid i_nId ); + void Add_LocalOperation( + const String & i_sLocalName, + Cid i_nId ); + void Add_LocalVariable( + const String & i_sLocalName, + Cid i_nId ); + void Add_LocalConstant( + const String & i_sLocalName, + Cid i_nId ); + + // INQUIRY + virtual uintt Depth() const; + Namespace * Parent() const; + + Ce_id Search_Child( + const String & i_key ) const; + Namespace * Search_LocalNamespace( + const String & i_sLocalName ) const; + uintt Get_SubNamespaces( + std::vector< const Namespace* > & + o_rResultList ) const; + Ce_id Search_LocalClass( + const String & i_sName ) const; + void Search_LocalOperations( + std::vector<Ce_id> & + o_result, + const String & i_sName ) const; + const node_t & AsNode() const; + + // ACCESS + node_t & AsNode(); + + private: + NON_COPYABLE(Namespace); + + // Interface csv::ConstProcessorClient + virtual void do_Accept( + csv::ProcessorIfc & io_processor ) const; + + // Interface CodeEntity + virtual const String & + inq_LocalName() const; + virtual Cid inq_Owner() const; + virtual Lid inq_Location() const; + + // Interface ary::cpp::CppEntity + virtual ClassId get_AryClass() const; + + // Interface AryGroup + virtual Gid inq_Id_Group() const; + virtual const cpp::CppEntity & + inq_RE_Group() const; + virtual const ary::group::SlotList & + inq_Slots() const; + virtual DYN Slot * inq_Create_Slot( + SlotAccessId i_nSlot ) const; + // Local + typedef std::multimap<String, Ce_id> Map_Operations; + + // DATA + CeEssentials aEssentials; + node_t aAssignedNode; + + Map_NamespacePtr aLocalNamespaces; + Map_LocalCe aLocalClasses; + Map_LocalCe aLocalEnums; + Map_LocalCe aLocalTypedefs; + Map_Operations aLocalOperations; + Map_LocalCe aLocalVariables; + Map_LocalCe aLocalConstants; + + Namespace * pParent; + uintt nDepth; +}; + + + +// IMPLEMENTATION +inline const Namespace::node_t & +Namespace::AsNode() const +{ + return aAssignedNode; +} + +inline Namespace::node_t & +Namespace::AsNode() +{ + return aAssignedNode; +} + + + + +} // namespace cpp +} // ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/c_osigna.hxx b/autodoc/inc/ary/cpp/c_osigna.hxx new file mode 100644 index 000000000000..4434f65b877e --- /dev/null +++ b/autodoc/inc/ary/cpp/c_osigna.hxx @@ -0,0 +1,125 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_C_OSIGNA_HXX +#define ARY_CPP_C_OSIGNA_HXX + +// USED SERVICES + // BASE CLASSES + // OTHER +#include <ary/cpp/c_types4cpp.hxx> + +namespace ary +{ +namespace cpp +{ + class Gate; +} +} + + + +namespace ary +{ +namespace cpp +{ + + +/** The signature of a C++ function. That is: parameter types and + const/volatile modifiers. +*/ +class OperationSignature +{ + public: + typedef std::vector<Type_id> ParameterTypeList; + + OperationSignature( + ParameterTypeList i_parameterTypes, // Non const, because it will be swapped with aParameterTypes. + E_ConVol i_conVol ); + + bool operator==( + const OperationSignature & + i_rSig ) const; + bool operator<( + const OperationSignature & + i_rSig ) const; + + // INQUIRY + const ParameterTypeList & + Parameters() const; + E_ConVol ConVol() const; + + /** Compares the signatures by length an then by ids of + parameter types. So the result is not always human + reconstructable. + @return like in strcmp(). + */ + int Compare( + const OperationSignature & + i_rSig ) const; + private: + // DATA + ParameterTypeList aParameterTypes; + E_ConVol eConVol; +}; + + + + +// IMPLEMENTATION +inline bool +OperationSignature::operator==( const OperationSignature & i_rSign ) const +{ + return Compare(i_rSign) == 0; +} + +inline bool +OperationSignature::operator<( const OperationSignature & i_rSign ) const +{ + return Compare(i_rSign) < 0; +} + +inline const OperationSignature::ParameterTypeList & +OperationSignature::Parameters() const +{ + return aParameterTypes; +} + +inline E_ConVol +OperationSignature::ConVol() const +{ + return eConVol; +} + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/c_slntry.hxx b/autodoc/inc/ary/cpp/c_slntry.hxx new file mode 100644 index 000000000000..3ce842494304 --- /dev/null +++ b/autodoc/inc/ary/cpp/c_slntry.hxx @@ -0,0 +1,113 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_C_SLNTRY_HXX +#define ARY_CPP_C_SLNTRY_HXX +// KORR_DEPRECATED_3.0 + +// USED SERVICES +#include <ary/cpp/c_types4cpp.hxx> +#include <ary/namesort.hxx> + + +namespace ary +{ +namespace cpp +{ + class Namespace; + + + +typedef Namespace * NamespacePtr; +struct Less_NamespacePtr +{ + bool operator()( /// @return true if (i_p1->Name() < i_p2->Name()) . + const NamespacePtr& i_p1, + const NamespacePtr& i_p2 ); +}; + + + + +struct S_Classes_Base +{ + Type_id nId; + E_Protection eProtection; + E_Virtuality eVirtuality; + String sComment; + + S_Classes_Base() + : nId(0), + eProtection(PROTECT_global), + eVirtuality(VIRTUAL_none) + // sComment + { } +}; + +struct S_TplParam +{ + String sName; + Type_id nId; + + S_TplParam( + String i_sName, + Type_id i_nId ) + : sName(i_sName), nId(i_nId) {} + const String & Name() const { return sName; } +}; + + +struct S_LocalCe +{ + String sLocalName; + Ce_id nId; + + S_LocalCe() : nId(0) {} + S_LocalCe( + const String & i_sLocalName, + Cid i_nId ) + : sLocalName(i_sLocalName), nId(i_nId) {} + bool operator<( + const S_LocalCe & i_rCe ) const + { return LesserName()(sLocalName,i_rCe.sLocalName); } +}; + +typedef std::vector< S_LocalCe > List_LocalCe; + + +typedef std::map<String, NamespacePtr> Map_NamespacePtr; +typedef std::vector< S_Classes_Base > List_Bases; +typedef std::vector< S_TplParam > List_TplParam; + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/c_traits.hxx b/autodoc/inc/ary/cpp/c_traits.hxx new file mode 100644 index 000000000000..060b0d2ea0ce --- /dev/null +++ b/autodoc/inc/ary/cpp/c_traits.hxx @@ -0,0 +1,219 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_C_TRAITS_HXX +#define ARY_CPP_C_TRAITS_HXX + + + +// USED SERVICES + // BASE CLASSES + // OTHER +#include <ary/cpp/c_types4cpp.hxx> + + + +namespace ary +{ +namespace symtree +{ + template <class X> class Node; +} +} + + + + +namespace ary +{ +namespace cpp +{ + + +/** Basic traits for derived ones of ->CodeEntity. +*/ +struct Ce_Traits +{ + typedef CodeEntity entity_base_type; + typedef Ce_id id_type; + + static entity_base_type & + EntityOf_( + id_type i_id ); +}; + + +/** An instance of SYMBOL_TRAITS for ->::ary::SortedIds<>. + + @see ::ary::SortedIds<> +*/ +struct CeNode_Traits : public Ce_Traits +{ + static const symtree::Node<CeNode_Traits> * + NodeOf_( + const entity_base_type & + i_entity ); + static symtree::Node<CeNode_Traits> * + NodeOf_( + entity_base_type & i_entity ); + static entity_base_type * + ParentOf_( + const entity_base_type & + i_entity ); + template <class KEY> + static id_type Search_( + const entity_base_type & + i_entity, + const KEY & i_localKey ); +}; + + +/** An instance of COMPARE for ->::ary::SortedIds<>. + + @see ::ary::SortedIds<> +*/ +struct Ce_Compare : public Ce_Traits +{ + typedef String key_type; + + static const key_type & + KeyOf_( + const entity_base_type & + i_entity ); + static bool Lesser_( + const key_type & i_1, + const key_type & i_2 ); +}; + +/** An instance of COMPARE for ->::ary::SortedIds<>. + + @see ::ary::SortedIds<> +*/ +struct Ce_GlobalCompare : public Ce_Traits +{ + typedef entity_base_type key_type; + + static const key_type & + KeyOf_( + const entity_base_type & + i_entity ) + { return i_entity; } + static bool Lesser_( + const key_type & i_1, + const key_type & i_2 ); +}; + + +/** Basic traits for derivd ones of ->DefineEntity. +*/ +struct Def_Traits +{ + typedef DefineEntity entity_base_type; + typedef De_id id_type; + + static entity_base_type & + EntityOf_( + id_type i_id ); +}; + + +/** An instance of COMPARE for ->::ary::SortedIds<>. + + @see ::ary::SortedIds<> +*/ +struct Def_Compare : public Def_Traits +{ + typedef String key_type; + + static const key_type & + KeyOf_( + const entity_base_type & + i_entity ); + static bool Lesser_( + const key_type & i_1, + const key_type & i_2 ); +}; + +/** Basic traits for derivd ones of ->Type. +*/ +struct Type_Traits +{ + typedef Type entity_base_type; + typedef Type_id id_type; + + static entity_base_type & + EntityOf_( + id_type i_id ); +}; + +/** An instance of COMPARE for ->::ary::SortedIds<>. + + @see ::ary::SortedIds<> +*/ +struct UsedType_Compare : public Type_Traits +{ + typedef UsedType key_type; + + static const key_type & + KeyOf_( + const entity_base_type & + i_entity ); + static bool Lesser_( + const key_type & i_1, + const key_type & i_2 ); +}; + + + + + + +// IMPLEMENTATION + +/// Implementation helper for ->CeNode_Traits::Search_ . +Ce_id CeNode_Search( + const CodeEntity & i_entity, + const String & i_localKey ); + + +template <class KEY> +Ce_Traits::id_type +CeNode_Traits::Search_( const entity_base_type & i_entity, + const KEY & i_localKey ) +{ + return CeNode_Search(i_entity, i_localKey); +} + + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/c_tydef.hxx b/autodoc/inc/ary/cpp/c_tydef.hxx new file mode 100644 index 000000000000..eefbda569484 --- /dev/null +++ b/autodoc/inc/ary/cpp/c_tydef.hxx @@ -0,0 +1,103 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_C_TYDEF_HXX +#define ARY_CPP_C_TYDEF_HXX + + + +// USED SERVICES + // BASE CLASSES +#include <ary/cpp/c_ce.hxx> + // OTHER +#include <ary/cessentl.hxx> +#include <ary/cpp/c_types4cpp.hxx> + + + +namespace ary +{ +namespace cpp +{ + + +/** A C++ typedef declaration. +*/ +class Typedef : public CodeEntity +{ + public: + // LIFECYCLE + enum E_ClassId { class_id = 1003 }; + + Typedef( + const String & i_sLocalName, + Ce_id i_nOwner, + E_Protection i_eProtection, + Lid i_nFile, + Type_id i_nDescribingType ); + ~Typedef(); + // INQUIRY + Type_id DescribingType() const; + E_Protection Protection() const { return eProtection; } + + private: + // Interface csv::ConstProcessorClient + virtual void do_Accept( + csv::ProcessorIfc & io_processor ) const; + + // Interface ary::cpp::CodeEntity + virtual const String & + inq_LocalName() const; + virtual Cid inq_Owner() const; + virtual Lid inq_Location() const; + + // Interface ary::cpp::CppEntity + virtual ClassId get_AryClass() const; + + // DATA + CeEssentials aEssentials; + Type_id nDescribingType; + E_Protection eProtection; +}; + + + +// IMPLEMENTATION +inline Type_id +Typedef::DescribingType() const +{ + return nDescribingType; +} + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/c_type.hxx b/autodoc/inc/ary/cpp/c_type.hxx new file mode 100644 index 000000000000..513ec0cefb5f --- /dev/null +++ b/autodoc/inc/ary/cpp/c_type.hxx @@ -0,0 +1,136 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_C_TYPE_HXX +#define ARY_CPP_C_TYPE_HXX + + + +// USED SERVICES + // BASE CLASSES +#include <ary/entity.hxx> + // OTHER +#include <ary/cpp/c_types4cpp.hxx> +#include <ary/cpp/c_traits.hxx> + + +namespace ary +{ +namespace cpp +{ + class Gate; +} +} + + + + + +namespace ary +{ +namespace cpp +{ + + + +/** Base of all C++ types +*/ +class Type : public ::ary::Entity +{ + public: + typedef Type_Traits traits_t; + + virtual ~Type() {} + + Type_id TypeId() const { return Type_id(Id()); } + Ce_id RelatedCe() const; + bool IsConst() const; + void Get_Text( + StreamStr & o_rOut, + const Gate & i_rGate ) const; + + /** It is guaranteed, that the output is correct, also, + if all three output-streams are the same instance. + */ + void Get_Text( + StreamStr & o_rPreName, + StreamStr & o_rName, + StreamStr & o_rPostName, + const Gate & i_rGate ) const; + + private: + virtual Rid inq_RelatedCe() const; // Defaulted to 0. Implemented in c_builtintype.cxx. + virtual bool inq_IsConst() const = 0; + virtual void inq_Get_Text( + StreamStr & o_rPreName, + StreamStr & o_rName, + StreamStr & o_rPostName, + const Gate & i_rGate ) const = 0; +}; + + + + +// IMPLEMENTATION +inline Ce_id +Type::RelatedCe() const +{ + return Ce_id(inq_RelatedCe()); +} + +inline bool +Type::IsConst() const +{ + return inq_IsConst(); +} + +inline void +Type::Get_Text( StreamStr & o_rOut, + const Gate & i_rGate ) const +{ + inq_Get_Text( o_rOut, o_rOut, o_rOut, i_rGate ); +} + +inline void +Type::Get_Text( StreamStr & o_rPreName, + StreamStr & o_rName, + StreamStr & o_rPostName, + const Gate & i_rGate ) const +{ + inq_Get_Text( o_rPreName,o_rName,o_rPostName, i_rGate ); +} + + + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/c_types4cpp.hxx b/autodoc/inc/ary/cpp/c_types4cpp.hxx new file mode 100644 index 000000000000..2d39819ae458 --- /dev/null +++ b/autodoc/inc/ary/cpp/c_types4cpp.hxx @@ -0,0 +1,137 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_C_TYPES4CPP_HXX +#define ARY_CPP_C_TYPES4CPP_HXX + + + +// USED SERVICES + // BASE CLASSES + // OTHER +#include <cosv/tpl/range.hxx> +#include <ary/types.hxx> + + + +namespace ary +{ +namespace cpp +{ + +class Namespace; +class CodeEntity; +class Type; +class DefineEntity; +class Gate; +class CePilot; +class TypePilot; +class SecondariesPilot; +class Ce_Storage; +class Def_Storage; +class Type_Storage; +class UsedType; + + +typedef TypedId< ::ary::cpp::CodeEntity > Ce_id; +typedef TypedId< ::ary::cpp::Type > Type_id; +typedef TypedId< ::ary::cpp::DefineEntity > De_id; + + +typedef std::vector<Ce_id> CesList; +typedef std::vector<De_id> DefsList; +typedef std::vector<Type_id> TypesList; + +typedef std::vector<Ce_id>::const_iterator CesConstIterator; +typedef std::vector<De_id>::const_iterator DefsConstIterator; +typedef std::vector<Type_id>::const_iterator TypesConstIterator; + +typedef csv::range< CesConstIterator > CesResultList; +typedef csv::range< DefsConstIterator > DefsResultList; +typedef csv::range< TypesConstIterator > TypesResultList; + + +typedef std::map<String, Ce_id> Map_LocalCe; + + + +enum E_Protection +{ + PROTECT_global = 0, + PROTECT_local, /// within Functions + PROTECT_public, + PROTECT_protected, + PROTECT_private +}; + +/** The sequence of E_Virtuality's values must not be changed, + because they are used in int-comparisons. +*/ +enum E_Virtuality +{ + VIRTUAL_none = 0, + VIRTUAL_virtual, + VIRTUAL_abstract +}; + +enum E_ClassKey +{ + CK_class, + CK_struct, + CK_union +}; + +enum E_TypeSpecialisation +{ + TYSP_none = 0, + TYSP_unsigned, + TYSP_signed +}; + +enum E_ConVol +{ + CONVOL_none = 0, + CONVOL_const = 0x0001, + CONVOL_volatile = 0x0002, + CONVOL_both = 0x0003 +}; + + + +// Backwards compatibility: +typedef Ce_id Cid; +typedef Type_id Tid; + + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/c_vari.hxx b/autodoc/inc/ary/cpp/c_vari.hxx new file mode 100644 index 000000000000..e8b2e442486e --- /dev/null +++ b/autodoc/inc/ary/cpp/c_vari.hxx @@ -0,0 +1,117 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_C_VARI_HXX +#define ARY_CPP_C_VARI_HXX + + +// USED SERVICES + // BASE CLASSES +#include <ary/cpp/c_ce.hxx> + // OTHER +#include <ary/cessentl.hxx> +#include <ary/cpp/c_types4cpp.hxx> +#include <ary/cpp/c_vfflag.hxx> + + + +namespace ary +{ +namespace cpp +{ + + +/** A C++ variable or constant declaration. +*/ +class Variable : public CodeEntity +{ + public: + // LIFECYCLE + enum E_ClassId { class_id = 1005 }; + + Variable( + const String & i_sLocalName, + Ce_id i_nOwner, + E_Protection i_eProtection, + loc::Le_id i_nFile, + Type_id i_nType, + VariableFlags i_aFlags, + const String & i_sArraySize, + const String & i_sInitValue ); + ~Variable(); + + + // INQUIRY + Type_id Type() const; + const String & ArraySize() const; + const String & Initialisation() const; + E_Protection Protection() const { return eProtection; } + + private: + // Interface csv::ConstProcessorClient + virtual void do_Accept( + csv::ProcessorIfc & io_processor ) const; + + // Interface ary::cpp::CodeEntity + virtual const String & + inq_LocalName() const; + virtual Cid inq_Owner() const; + virtual Lid inq_Location() const; + + // Interface ary::cpp::CppEntity + virtual ClassId get_AryClass() const; + + // DATA + CeEssentials aEssentials; + Type_id nType; + E_Protection eProtection; + VariableFlags aFlags; + String sArraySize; + String sInitialisation; +}; + + + +// IMPLEMENTATION +inline Type_id +Variable::Type() const + { return nType; } +inline const String & +Variable::ArraySize() const + { return sArraySize; } +inline const String & +Variable::Initialisation() const + { return sInitialisation; } + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/c_vfflag.hxx b/autodoc/inc/ary/cpp/c_vfflag.hxx new file mode 100644 index 000000000000..c198dac67267 --- /dev/null +++ b/autodoc/inc/ary/cpp/c_vfflag.hxx @@ -0,0 +1,154 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_C_VFFLAG_HXX +#define ARY_CPP_C_VFFLAG_HXX + +// USED SERVICES + + +namespace ary +{ +namespace cpp +{ + + +/** Properties of C++ variables. +*/ +struct VariableFlags +{ + public: + enum E_Flags + { + f_static_local = 0x0001, + f_static_member = 0x0002, + f_extern = 0x0004, + f_mutable = 0x0008 + }; + + VariableFlags( + UINT16 i_nFlags = 0 ) + : nFlags(i_nFlags) {} + + void Reset() { nFlags = 0; } + + void SetStaticLocal() { nFlags |= f_static_local; } + void SetStaticMember() { nFlags |= f_static_member; } + void SetExtern() { nFlags |= f_extern; } + void SetMutable() { nFlags |= f_mutable; } + + bool IsStaticLocal() const { return (nFlags & f_static_local) != 0; } + bool IsStaticMember() const { return (nFlags & f_static_member) != 0; } + bool IsExtern() const { return (nFlags & f_extern) != 0; } + bool IsMutable() const { return (nFlags & f_mutable) != 0; } + + private: + UINT16 nFlags; +}; + + +/** Properties of C++ functions. +*/ +struct FunctionFlags +{ + public: + enum E_Flags + { + f_static_local = 0x0001, + f_static_member = 0x0002, + f_extern = 0x0004, + f_externC = 0x0008, + f_mutable = 0x0010, + f_inline = 0x0100, + f_register = 0x0200, + f_explicit = 0x0400 + }; + + FunctionFlags( + UINT16 i_nFlags = 0 ) + : nFlags(i_nFlags) {} + + bool operator==( + const FunctionFlags & + i_ff ) const + { return nFlags == i_ff.nFlags; } + bool operator!=( + const FunctionFlags & + i_ff ) const + { return NOT operator==(i_ff); } + + void Reset() { nFlags = 0; } + + void SetStaticLocal() { nFlags |= f_static_local; } + void SetStaticMember() { nFlags |= f_static_member; } + void SetExtern() { nFlags |= f_extern; } + void SetExternC() { nFlags |= f_externC; } + void SetMutable() { nFlags |= f_mutable; } + void SetInline() { nFlags |= f_inline; } + void SetRegister() { nFlags |= f_register; } + void SetExplicit() { nFlags |= f_explicit; } + + bool IsStaticLocal() const { return (nFlags & f_static_local) != 0; } + bool IsStaticMember() const { return (nFlags & f_static_member) != 0; } + bool IsExtern() const { return (nFlags & f_extern) != 0; } + bool IsExternC() const { return (nFlags & f_externC) != 0; } + bool IsMutable() const { return (nFlags & f_mutable) != 0; } + bool IsInline() const { return (nFlags & f_inline) != 0; } + bool IsRegister() const { return (nFlags & f_register) != 0; } + bool IsExplicit() const { return (nFlags & f_explicit) != 0; } + + private: + UINT16 nFlags; +}; + + +/** A C++ function parameter. +*/ +struct S_Parameter +{ + String sName; + String sSizeExpression; + String sInitExpression; + Type_id nType; + + S_Parameter() : nType(0) {} + ~S_Parameter() {} + void Empty() { nType = Type_id(0); + sName.clear(); + sSizeExpression.clear(); + sInitExpression.clear(); } +}; + + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/cp_ce.hxx b/autodoc/inc/ary/cpp/cp_ce.hxx new file mode 100644 index 000000000000..cb86e44b17d4 --- /dev/null +++ b/autodoc/inc/ary/cpp/cp_ce.hxx @@ -0,0 +1,176 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_CP_CE_HXX +#define ARY_CPP_CP_CE_HXX + + +// USED SERVICES + // BASE CLASSES + // OTHER +#include <ary/cpp/c_types4cpp.hxx> + +namespace ary +{ + class QualifiedName; + +namespace cpp +{ + class Class; + class CodeEntity; + class Enum; + class EnumValue; + class Function; + class InputContext; + class Namespace; + class OperationSignature; + class Typedef; + class Variable; + + struct FunctionFlags; + struct S_Parameter; + struct VariableFlags; +} +} + + + + + +namespace ary +{ +namespace cpp +{ + + + +/** Acess to all declared C++ code entites (types, variables, operations) + in the repository. +*/ +class CePilot +{ + public: + // LIFECYCLE + virtual ~CePilot() {} + + // OPERATIONS + virtual Namespace & + CheckIn_Namespace( + const InputContext & + i_context, + const String & i_localName ) = 0; + virtual Class & Store_Class( + const InputContext & + i_context, + const String & i_localName, + E_ClassKey i_classKey ) = 0; + virtual Enum & Store_Enum( + const InputContext & + i_context, + const String & i_localName ) = 0; + virtual Typedef & Store_Typedef( + const InputContext & + i_context, + const String & i_localName, + Type_id i_referredType ) = 0; + + /// @return 0, if the function is duplicate. + virtual Function * Store_Operation( + const InputContext & + i_context, + const String & i_localName, + Type_id i_returnType, + const std::vector<S_Parameter> & + i_parameters, + E_Virtuality i_virtuality, + E_ConVol i_conVol, + FunctionFlags i_flags, + bool i_throwExists, + const std::vector<Tid> & + i_exceptions ) = 0; + virtual Variable & Store_Variable( + const InputContext & + i_context, + const String & i_localName, + Type_id i_type, + VariableFlags i_flags, + const String & i_arraySize, + const String & i_initValue ) = 0; + virtual EnumValue & Store_EnumValue( + const InputContext & + i_context, + const String & i_localName, + const String & i_initValue ) = 0; + // INQUIRY + virtual const Namespace & + GlobalNamespace() const = 0; + virtual const CodeEntity & + Find_Ce( + Ce_id i_id ) const = 0; + virtual const CodeEntity * + Search_Ce( + Ce_id i_id ) const = 0; + + /// It's assumed that i_rSearchedName is an absolute name. + virtual const CodeEntity * + Search_CeAbsolute( + const CodeEntity & i_curScope, + const QualifiedName & + i_absoluteName ) const = 0; + virtual const CodeEntity * + Search_CeLocal( + const String & i_relativeName, + bool i_isFunction, + const Namespace & i_curNamespace, + const Class * i_curClass ) const = 0; + virtual void Get_QualifiedName( + StreamStr & o_result, + const String & i_localName, + Ce_id i_owner, + const char * i_delimiter = "::" ) const = 0; + virtual void Get_SignatureText( + StreamStr & o_rOut, + const OperationSignature & + i_signature, + const StringVector * + i_sParameterNames = 0 ) const = 0; + virtual CesResultList + Search_TypeName( + const String & i_sName ) const = 0; + // ACCESS + virtual Namespace & GlobalNamespace() = 0; +}; + + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/cp_def.hxx b/autodoc/inc/ary/cpp/cp_def.hxx new file mode 100644 index 000000000000..8fd44074523b --- /dev/null +++ b/autodoc/inc/ary/cpp/cp_def.hxx @@ -0,0 +1,102 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_CP_DEF_HXX +#define ARY_CPP_CP_DEF_HXX + + +// USED SERVICES + // BASE CLASSES + // OTHER +#include <ary/cpp/c_types4cpp.hxx> + +namespace ary +{ +namespace cpp +{ + class Define; + class InputContext; + class Macro; +} +} + + + + +namespace ary +{ +namespace cpp +{ + + + +/** Acess to C++ defines and macros in the repository. +*/ +class DefPilot +{ + public: + typedef DefsList::const_iterator DefsIterator; + + + + // LIFECYCLE + virtual ~DefPilot() {} + + + // OPERATIONS + virtual Define & Store_Define( + const InputContext& i_rContext, + const String & i_sName, + const StringVector & + i_rDefinition ) = 0; + virtual Macro & Store_Macro( + const InputContext& i_rContext, + const String & i_sName, + const StringVector & + i_rParams, + const StringVector & + i_rDefinition ) = 0; + // INQUIRY + virtual const DefineEntity & + Find_Def( + De_id i_id ) const = 0; + virtual DefsResultList + AllDefines() const = 0; + virtual DefsResultList + AllMacros() const = 0; +}; + + + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/cp_type.hxx b/autodoc/inc/ary/cpp/cp_type.hxx new file mode 100644 index 000000000000..edc536fcea71 --- /dev/null +++ b/autodoc/inc/ary/cpp/cp_type.hxx @@ -0,0 +1,99 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_CP_TYPE_HXX +#define ARY_CPP_CP_TYPE_HXX + + +// USED SERVICES + // BASE CLASSES + // OTHER +#include <ary/cpp/c_types4cpp.hxx> + +namespace ary +{ +namespace cpp +{ + class InputContext; + class Type; + class UsedType; +} +} + + + + + +namespace ary +{ +namespace cpp +{ + + + + +/** Acess to all found C++ types (as they are used in declarations) + in the repository. +*/ +class TypePilot +{ + public: + + // LIFECYCLE + virtual ~TypePilot() {} + + + // OPERATIONS + virtual const Type & + CheckIn_UsedType( + const InputContext & + i_context, + DYN UsedType & pass_type ) = 0; + // INQUIRY + virtual const Type & + Find_Type( + Type_id i_type ) const = 0; + virtual bool Get_TypeText( + StreamStr & o_result, + Type_id i_type ) const = 0; + virtual bool Get_TypeText( + StreamStr & o_preName, /// ::ary::cpp:: + StreamStr & o_name, /// MyClass + StreamStr & o_postName, /// <TplArgument> * const & + Type_id i_type ) const = 0; + virtual Type_id Tid_Ellipse() const = 0; +}; + + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/inpcontx.hxx b/autodoc/inc/ary/cpp/inpcontx.hxx new file mode 100644 index 000000000000..9fea2e2053b7 --- /dev/null +++ b/autodoc/inc/ary/cpp/inpcontx.hxx @@ -0,0 +1,219 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_INPCONTX_HXX +#define ARY_CPP_INPCONTX_HXX + + + +// USED SERVICES + // BASE CLASSES + // OTHER +#include <ary/cpp/c_types4cpp.hxx> + + + +namespace ary +{ +namespace loc +{ + class File; +} +namespace cpp +{ + class Gate; + class Namespace; + class Class; + class Enum; + + class OperationSignature; +} +} + + + +namespace ary +{ +namespace cpp +{ + + +/** The context of a CodeEntity, which is going to be stored in the + repository. The information is used mainly by ->ary::cpp::CeAdmin. +*/ +class InputContext +{ + public: + class Owner + { + public: + // LIFECYCLE + virtual ~Owner() {} + + // OPERATIONS + /// Adds Class data to current inner scope (Namespace or Class). + void Add_Class( + const String & i_sLocalName, + Cid i_nId ); + /// Adds Enum data to current inner scope (Namespace or Class). + void Add_Enum( + const String & i_sLocalName, + Cid i_nId ); + /// Adds Typedef data to current inner scope (Namespace or Class). + void Add_Typedef( + const String & i_sLocalName, + Cid i_nId ); + /// Adds Operation data to current inner scope (Namespace or Class). + void Add_Operation( + const String & i_sLocalName, + Cid i_nId, + bool i_bIsStaticMember ); /// True only for static class members. + /// Adds Variable data to current inner scope (Namespace or Class). + void Add_Variable( + const String & i_sLocalName, + Cid i_nId, + bool i_bIsConst, + bool i_bIsStaticMember ); /// True only for static class members. + // INQUIRY + Ce_id CeId() const; + + /** @attention Must only be used by ary::cpp::GatePilot! + Will work nowhere else! + */ + virtual bool HasClass( + const String & i_sLocalName ) = 0; + private: + virtual void do_Add_Class( + const String & i_sLocalName, + Cid i_nId ) = 0; + virtual void do_Add_Enum( + const String & i_sLocalName, + Cid i_nId ) = 0; + virtual void do_Add_Typedef( + const String & i_sLocalName, + Cid i_nId ) = 0; + virtual void do_Add_Operation( + const String & i_sLocalName, + Cid i_nId, + bool i_bIsStatic ) = 0; + virtual void do_Add_Variable( + const String & i_sLocalName, + Cid i_nId, + bool i_bIsConst, + bool i_bIsStatic ) = 0; + virtual Ce_id inq_CeId() const = 0; + }; + + // LIFECYCLE + virtual ~InputContext() {} + + // OPERATIONS + + // INQUIRY + loc::File & CurFile() const; + + Namespace & CurNamespace() const; + Class * CurClass() const; + Enum * CurEnum() const; + + Owner & CurOwner() const; + E_Protection CurProtection() const; + + private: + virtual loc::File & inq_CurFile() const = 0; + + virtual Namespace & inq_CurNamespace() const = 0; + virtual Class * inq_CurClass() const = 0; + virtual Enum * inq_CurEnum() const = 0; + + virtual Owner & inq_CurOwner() const = 0; + virtual E_Protection + inq_CurProtection() const = 0; +}; + + + + +// IMPLEMENTATION +inline loc::File & +InputContext::CurFile() const + { return inq_CurFile(); } + +inline Namespace & +InputContext::CurNamespace() const + { return inq_CurNamespace(); } +inline Class * +InputContext::CurClass() const + { return inq_CurClass(); } +inline Enum * +InputContext::CurEnum() const + { return inq_CurEnum(); } +inline InputContext::Owner & +InputContext::CurOwner() const + { return inq_CurOwner(); } +inline E_Protection +InputContext::CurProtection() const + { return inq_CurProtection(); } + + +inline void +InputContext::Owner::Add_Class( const String & i_sLocalName, + Cid i_nId ) + { do_Add_Class(i_sLocalName, i_nId); } +inline void +InputContext::Owner::Add_Enum( const String & i_sLocalName, + Cid i_nId ) + { do_Add_Enum(i_sLocalName, i_nId); } +inline void +InputContext::Owner::Add_Typedef( const String & i_sLocalName, + Cid i_nId ) + { do_Add_Typedef(i_sLocalName, i_nId); } +inline void +InputContext::Owner::Add_Operation( const String & i_sLocalName, + Cid i_nId, + bool i_bIsStatic ) + { do_Add_Operation( i_sLocalName, i_nId, i_bIsStatic ); } +inline void +InputContext::Owner::Add_Variable( const String & i_sLocalName, + Cid i_nId, + bool i_bIsConst, + bool i_bIsStatic ) + { do_Add_Variable( i_sLocalName, i_nId, i_bIsConst, i_bIsStatic ); } +inline Ce_id +InputContext::Owner::CeId() const + { return inq_CeId(); } + + + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/namechain.hxx b/autodoc/inc/ary/cpp/namechain.hxx new file mode 100644 index 000000000000..9e85b4ee4b0d --- /dev/null +++ b/autodoc/inc/ary/cpp/namechain.hxx @@ -0,0 +1,143 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_NAMECHAI_HXX +#define ARY_CPP_NAMECHAI_HXX + + +// USED SERVICES + // BASE CLASSES + // OTHER + + +namespace ary +{ +namespace cpp +{ + class Gate; + +namespace ut +{ + class List_TplParameter; + +class NameSegment +{ + public: + NameSegment( + const char * i_sName ); + /** @precond MPT pTemplate. + This cannot be used, except of inserting a new element + in the segment list of ary::cpp::ut::NameChain. In that + case, the template parameter list doe snot yet exist. + */ + NameSegment( + const NameSegment & i_rSeg ); + ~NameSegment(); + + // OPERATIONS + List_TplParameter & AddTemplate(); + + // INQUIRY + const String & Name() const; + + /// @return as strcmp(). + intt Compare( + const NameSegment & i_rOther ) const; + void Get_Text_AsScope( + StreamStr & o_rOut, + const ary::cpp::Gate & + i_rGate ) const; + void Get_Text_AsMainType( + StreamStr & o_rName, + StreamStr & o_rPostName, + const ary::cpp::Gate & + i_rGate ) const; + + NameSegment& operator=(const NameSegment&); + private: + String sName; + Dyn<List_TplParameter> + pTemplate; +}; + +class NameChain +{ + public: + typedef std::vector<NameSegment>::const_iterator + const_iterator; + + NameChain(); + ~NameChain(); + + // OPERATIONS + void Add_Segment( + const char * i_sSeg ); + /** @precond aSegments.size() > 0. + Which means: Add_Segment() has to be called at least once before. + */ + List_TplParameter & Templatize_LastSegment(); + + // INQUIRY + const_iterator begin() const { return aSegments.begin(); } + const_iterator end() const { return aSegments.end(); } + + /// @return like strcmp. + intt Compare( + const NameChain & i_rChain ) const; + /// @ATTENTION Return value is volatile. Not reentrance enabled. + const String & LastSegment() const; + + void Get_Text( + StreamStr & o_rPreName, + StreamStr & o_rName, + StreamStr & o_rPostName, + const ary::cpp::Gate & + i_rGate ) const; + private: + std::vector< NameSegment > + aSegments; +}; + + + +// IMPLEMENTATION +inline const String & +NameSegment::Name() const + { return sName; } + + + + + + +} // namespace ut +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/inc/ary/cpp/usedtype.hxx b/autodoc/inc/ary/cpp/usedtype.hxx new file mode 100644 index 000000000000..b7f6d68ac4cc --- /dev/null +++ b/autodoc/inc/ary/cpp/usedtype.hxx @@ -0,0 +1,215 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ARY_CPP_USEDTYPE_HXX +#define ARY_CPP_USEDTYPE_HXX + +// USED SERVICES + // BASE CLASSES +#include <ary/cpp/c_type.hxx> + // OTHER +#include <ary/cpp/namechain.hxx> + +namespace ary +{ +namespace cpp +{ + class CePilot; + +namespace ut +{ + class List_TplParameter; +} +} +} + + + + +namespace ary +{ +namespace cpp +{ + + +/** This class represents a type in textual form, like it is parsed out of + source code as a variable type or function return type. +*/ +class UsedType : public Type +{ + public: + enum E_ClassId { class_id = 1203 }; + + explicit UsedType( + Ce_id i_scope ); + ~UsedType(); + // OPERATORS + bool operator<( + const UsedType & i_rType ) const; + // OPERATIONS + + // Operations to build up the used type from parsing: + void Set_Absolute(); /// "::" is in front. + void Add_NameSegment( + const char * i_sSeg ); + ut::List_TplParameter & + Enter_Template(); + void Set_Unsigned(); + void Set_Signed(); + void Set_BuiltIn( + const char * i_sType ); + void Set_Const(); /// Sets CV to the type or the present pointer level, whatever is highest. + void Set_Volatile(); /// Sets CV to the type or the present pointer level, whatever is highest. + void Add_PtrLevel(); /// For an '*'. + void Set_Reference(); /// For an '&'. + + // Operations to find the relating CodeEntity: + /** This needs to be called only one time. After that + RelatedCe() will return the value. + + When connectiing all parsed types, there are three steps: + 1. Find related types in the same scope and namespaces above. + 2. Then all classes can be connected to their base classes. + 3. Lastly types can be connected to Ces only known via their base + classes. This is not possible at step 1. + + @see Connect2CeOnlyKnownViaBaseClass() + */ + void Connect2Ce( + const CePilot & i_ces ); + + /** @see Connect2Ce() + */ + void Connect2CeOnlyKnownViaBaseClass( + const Gate & i_gate ); + + // INQUIRY + /** @return True, if type consists of one built-in typename and + nothing else. + */ + bool IsBuiltInType() const; + /** @return the full local name, including template instantiation, but without + '*','&' or modifiers. + */ + const String & LocalName() const; + E_TypeSpecialisation + TypeSpecialisation() const; + + private: + // Interface csv::ConstProcessorClient + virtual void do_Accept( + csv::ProcessorIfc & io_processor ) const; + + // Interface ary::Object: + virtual ClassId get_AryClass() const; + + // Interface ary::cpp::Type: + virtual Rid inq_RelatedCe() const; + virtual bool inq_IsConst() const; + virtual void inq_Get_Text( + StreamStr & o_rPreName, + StreamStr & o_rName, + StreamStr & o_rPostName, + const ary::cpp::Gate & + i_rGate ) const; + // Local + typedef std::vector< ary::cpp::E_ConVol > PtrLevelVector; + + uintt PtrLevel() const { return uintt(aPtrLevels.size()); } + Ce_id RecursiveSearchCe_InBaseClassesOf( + const CodeEntity & i_mayBeClass, + const StringVector & + i_myQualification, + const String & i_myName, + const Gate & i_gate ) const; + void Get_NameParts( + StringVector & o_qualification, + String & o_name ); + + // Forbidden functions + UsedType( + const UsedType & i_rType ); + bool operator=( + const UsedType & i_rType ); + + // DATA + ut::NameChain aPath; + PtrLevelVector aPtrLevels; + ary::cpp::E_ConVol eConVol_Type; + bool bIsReference; + bool bIsAbsolute; + bool bRefers2BuiltInType; + E_TypeSpecialisation + eTypeSpecialisation; + Ce_id nRelatedCe; + + /// Namespace or class scope where the type occurred. + Ce_id nScope; +}; + + +namespace ut +{ + class TemplateParameter; + +class List_TplParameter +{ + public: + typedef std::vector< DYN TemplateParameter * >::const_iterator const_iterator; + + List_TplParameter(); + ~List_TplParameter(); + + void AddParam_Type( + Type_id i_nType ); + /// puts "< " TemplateArgumentList " >" to o_rOut. + void Get_Text( + StreamStr & o_rOut, + const ary::cpp::Gate & + i_rGate ) const; + /// @return as strcmp(). + intt Compare( + const List_TplParameter & + i_rOther ) const; + + private: + typedef std::vector< DYN TemplateParameter * > Vector_TplArgument; + + Vector_TplArgument aTplParameters; +}; + +} // namespace ut + + + + +} // namespace cpp +} // namespace ary +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |