diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-11-02 13:57:52 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-11-02 13:57:52 +0000 |
commit | 1a584970e47a078a3284114e68484b3e182216aa (patch) | |
tree | c3d713eb7b26237b159a5afb81c9e461180f5f13 /autodoc/inc/ary | |
parent | 6f92139fea89b889676ded2f664f52e107afcd7f (diff) |
INTEGRATION: CWS adc18 (1.2.56); FILE MERGED
2007/10/18 13:06:35 np 1.2.56.1: #i81775#
Diffstat (limited to 'autodoc/inc/ary')
-rw-r--r-- | autodoc/inc/ary/cpp/c_class.hxx | 154 | ||||
-rw-r--r-- | autodoc/inc/ary/cpp/c_define.hxx | 52 | ||||
-rw-r--r-- | autodoc/inc/ary/cpp/c_enum.hxx | 61 | ||||
-rw-r--r-- | autodoc/inc/ary/cpp/c_enuval.hxx | 59 | ||||
-rw-r--r-- | autodoc/inc/ary/cpp/c_macro.hxx | 52 | ||||
-rw-r--r-- | autodoc/inc/ary/cpp/c_osigna.hxx | 72 | ||||
-rw-r--r-- | autodoc/inc/ary/cpp/c_vari.hxx | 76 | ||||
-rw-r--r-- | autodoc/inc/ary/cpp/c_vfflag.hxx | 40 | ||||
-rw-r--r-- | autodoc/inc/ary/cpp/usedtype.hxx | 120 | ||||
-rw-r--r-- | autodoc/inc/ary/udmhost.hxx | 9 | ||||
-rw-r--r-- | autodoc/inc/ary/x_ary.hxx | 16 |
11 files changed, 391 insertions, 320 deletions
diff --git a/autodoc/inc/ary/cpp/c_class.hxx b/autodoc/inc/ary/cpp/c_class.hxx index e4816a0a06af..0ab7d3d9b694 100644 --- a/autodoc/inc/ary/cpp/c_class.hxx +++ b/autodoc/inc/ary/cpp/c_class.hxx @@ -4,9 +4,9 @@ * * $RCSfile: c_class.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: rt $ $Date: 2005-09-07 15:57:00 $ + * last change: $Author: hr $ $Date: 2007-11-02 14:46:14 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -40,19 +40,14 @@ // USED SERVICES // BASE CLASSES -#include <ary/ce.hxx> -#include <ary/cpp/ca_type.hxx> +#include <ary/cpp/c_ce.hxx> #include <ary/arygroup.hxx> -#include <ary/re.hxx> - // COMPONENTS + // OTHER +#include <ary/symtreenode.hxx> #include <ary/cessentl.hxx> -#include <ary/cpp/c_idlist.hxx> -#include <ary/opertype.hxx> -#include <ary/cpp/c_etypes.hxx> - // PARAMETERS -#include <ary/idlists.hxx> - - +#include <ary/sequentialids.hxx> +#include <ary/cpp/c_types4cpp.hxx> +#include <ary/cpp/c_slntry.hxx> namespace ary { @@ -62,13 +57,25 @@ namespace cpp 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, @@ -83,14 +90,16 @@ class Class : public CodeEntity, SLOT_FriendOperations }; + typedef ::ary::symtree::Node<CeNode_Traits> node_t; + + // LIFECYCLE Class(); Class( - Cid i_nId, - const udmstri & i_sLocalName, - Cid i_nOwner, + const String & i_sLocalName, + Ce_id i_nOwner, E_Protection i_eProtection, - Lid i_nFile, + loc::Le_id i_nFile, E_ClassKey i_eClassKey ); ~Class(); @@ -99,34 +108,32 @@ class Class : public CodeEntity, const S_Classes_Base & i_rBaseClass ); void Add_TemplateParameterType( - const udmstri & i_sLocalName, - Tid i_nIdAsType ); + const String & i_sLocalName, + Type_id i_nIdAsType ); void Add_KnownDerivative( - Rid i_nId ) - { aKnownDerivatives.push_back(i_nId); } + Ce_id i_nId ) + { aKnownDerivatives.Add(i_nId); } void Add_LocalClass( - const udmstri & i_sLocalName, + const String & i_sLocalName, Cid i_nId ); void Add_LocalEnum( - const udmstri & i_sLocalName, + const String & i_sLocalName, Cid i_nId ); void Add_LocalTypedef( - const udmstri & i_sLocalName, + const String & i_sLocalName, Cid i_nId ); void Add_LocalOperation( - const udmstri & i_sLocalName, - OSid i_nOS, + const String & i_sLocalName, Cid i_nId ); void Add_LocalStaticOperation( - const udmstri & i_sLocalName, - OSid i_nOS, + const String & i_sLocalName, Cid i_nId ); void Add_LocalData( - const udmstri & i_sLocalName, + const String & i_sLocalName, Cid i_nId ); void Add_LocalStaticData( - const udmstri & i_sLocalName, + const String & i_sLocalName, Cid i_nId ); void UpdateVirtuality( @@ -137,39 +144,43 @@ class Class : public CodeEntity, TemplateParameters() const { return aTemplateParameterTypes; } const List_Bases & BaseClasses() const { return aBaseClasses; } - const List_Rid & KnownDerivatives() const + const SequentialIds<Ce_id> & + KnownDerivatives() const { return aKnownDerivatives; } // INQUIRY - static RCid RC_() { return 0x1002; } - 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 udmstri & i_sName ) const; + const String & i_sName ) const; + const node_t & AsNode() const; + + // ACCESS + node_t & AsNode(); private: - // Interface ary::CodeEntity - virtual Cid inq_Id() const; - virtual const udmstri & + 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 Lid inq_Location() const; - - // Interface ary::RepositoryEntity - virtual void do_StoreAt( - ary::Display & o_rOut ) const; - virtual RCid inq_RC() const; - virtual const ary::Documentation & - inq_Info() const; - virtual void do_Add_Documentation( - DYN ary::Documentation & - let_drInfo ); + 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 RepositoryEntity & + virtual const cpp::CppEntity & inq_RE_Group() const; virtual const group::SlotList & inq_Slots() const; @@ -178,15 +189,17 @@ class Class : public CodeEntity, // 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 udmstri & i_sName ) const; + const String & i_sName ) const; Iterator_Locals PosOfName( List_LocalCe & io_rList, - const udmstri & i_sName ); + const String & i_sName ); // DATA CeEssentials aEssentials; + node_t aAssignedNode; List_Bases aBaseClasses; List_TplParam aTemplateParameterTypes; @@ -194,13 +207,14 @@ class Class : public CodeEntity, List_LocalCe aClasses; List_LocalCe aEnums; List_LocalCe aTypedefs; - List_LocalOperation aOperations; - List_LocalOperation aStaticOperations; + List_LocalCe aOperations; + List_LocalCe aStaticOperations; List_LocalCe aData; List_LocalCe aStaticData; - List_Rid aFriendClasses; - List_Rid aFriendOperations; - List_Rid aKnownDerivatives; + + IdSequence aFriendClasses; + IdSequence aFriendOperations; + IdSequence aKnownDerivatives; E_ClassKey eClassKey; E_Protection eProtection; @@ -209,19 +223,35 @@ class Class : public CodeEntity, -// IMPLEMENTATION +// IMPLEMENTATION inline E_ClassKey Class::ClassKey() const - { return eClassKey; } +{ + return eClassKey; +} + inline E_Protection Class::Protection() const - { return eProtection; } +{ + 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 +} // namespace cpp +} // namespace ary +#endif diff --git a/autodoc/inc/ary/cpp/c_define.hxx b/autodoc/inc/ary/cpp/c_define.hxx index caee27994827..a43b22b66b09 100644 --- a/autodoc/inc/ary/cpp/c_define.hxx +++ b/autodoc/inc/ary/cpp/c_define.hxx @@ -4,9 +4,9 @@ * * $RCSfile: c_define.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: rt $ $Date: 2005-09-07 15:57:17 $ + * last change: $Author: hr $ $Date: 2007-11-02 14:47:11 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -39,9 +39,9 @@ // USED SERVICES // BASE CLASSES -#include <ary/cpp/cpp_defs.hxx> - // COMPONENTS - // PARAMETERS +#include <ary/cpp/c_de.hxx> + // OTHER + @@ -51,46 +51,44 @@ namespace cpp { -/** Describes a C/C++ #define <DEFINE_BUT_NO_MACRO> statement. +/** A C/C++ #define ("#define DEF") statement, but no macro. + + @see Macro */ -class Define : public CppDefinition +class Define : public DefineEntity { public: + enum E_ClassId { class_id = 1601 }; + Define( /// Used for: #define DEFINE xyz - Did i_nId, - const udmstri & i_sName, - const str_vector & i_rDefinition, - Lid i_nDeclaringFile ); - ~Define(); + const String & i_name, + const StringVector & + i_definition, + loc::Le_id i_declaringFile ); + virtual ~Define(); // INQUIRY void GetText( csv::StreamStr & o_rText ) const; - private: - // Interface RepositoryEntity: - virtual void do_StoreAt( - ary::Display & o_rOut ) const; - virtual RCid inq_RC() const; + // Interface csv::ConstProcessorClient + virtual void do_Accept( + csv::ProcessorIfc & io_processor ) const; - // Interface CppDefinition: - virtual const str_vector & - inq_DefinitionText() const; + // Interface ary::Object: + virtual ClassId get_AryClass() const; + // Interface DefineEntity: + virtual const StringVector & + inq_DefinitionText() const; // DATA - str_vector aDefinition; + StringVector aDefinition; }; -// IMPLEMENTATION - } // namespace cpp } // namespace ary - - - #endif - diff --git a/autodoc/inc/ary/cpp/c_enum.hxx b/autodoc/inc/ary/cpp/c_enum.hxx index 8282d71d4da8..7a8289aa7ec0 100644 --- a/autodoc/inc/ary/cpp/c_enum.hxx +++ b/autodoc/inc/ary/cpp/c_enum.hxx @@ -4,9 +4,9 @@ * * $RCSfile: c_enum.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: rt $ $Date: 2005-09-07 15:57:58 $ + * last change: $Author: hr $ $Date: 2007-11-02 14:47:51 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -40,13 +40,16 @@ // USED SERVICES // BASE CLASSES -#include <ary/ce.hxx> +#include <ary/cpp/c_ce.hxx> #include <ary/arygroup.hxx> - // COMPONENTS + // OTHER #include <ary/cessentl.hxx> -#include <ary/idlists.hxx> -#include <ary/cpp/c_etypes.hxx> - // PARAMETERS +#include <ary/cpp/c_types4cpp.hxx> +#include <ary/sequentialids.hxx> + + + + namespace ary { @@ -54,10 +57,14 @@ 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 @@ -66,42 +73,36 @@ class Enum : public CodeEntity, // LIFECYCLE Enum(); Enum( - Cid i_nId, - const udmstri & i_sLocalName, - Cid i_nOwner, + const String & i_sLocalName, + Ce_id i_nOwner, E_Protection i_eProtection, Lid i_nFile ); ~Enum(); // OPERATIONS void Add_Value( - Cid i_nId ); + Ce_id i_nId ); // INQUIRY - static RCid RC_() { return 0x1003; } - E_Protection Protection() const { return eProtection; } private: - // Interface ary::CodeEntity - virtual Cid inq_Id() const; - virtual const udmstri & + // 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::RepositoryEntity - virtual void do_StoreAt( - ary::Display & o_rOut ) const; - virtual RCid inq_RC() const; - virtual const ary::Documentation & - inq_Info() const; - virtual void do_Add_Documentation( - DYN ary::Documentation & - let_drInfo ); + // Interface ary::cpp::CppEntity + virtual ClassId get_AryClass() const; + // Interface ary::AryGroup virtual Gid inq_Id_Group() const; - virtual const RepositoryEntity & + virtual const cpp::CppEntity & inq_RE_Group() const; virtual const group::SlotList & inq_Slots() const; @@ -110,15 +111,15 @@ class Enum : public CodeEntity, // DATA CeEssentials aEssentials; - List_Rid aValues; + SequentialIds<Ce_id> + aValues; E_Protection eProtection; }; -} // namespace cpp -} // namespace ary +} // namespace cpp +} // namespace ary #endif - diff --git a/autodoc/inc/ary/cpp/c_enuval.hxx b/autodoc/inc/ary/cpp/c_enuval.hxx index ed104e29b88b..7297ac452397 100644 --- a/autodoc/inc/ary/cpp/c_enuval.hxx +++ b/autodoc/inc/ary/cpp/c_enuval.hxx @@ -4,9 +4,9 @@ * * $RCSfile: c_enuval.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: rt $ $Date: 2005-09-07 15:58:16 $ + * last change: $Author: hr $ $Date: 2007-11-02 14:48:10 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -39,11 +39,10 @@ // USED SERVICES // BASE CLASSES -#include <ary/ce.hxx> - // COMPONENTS +#include <ary/cpp/c_ce.hxx> + // OTHER #include <ary/cessentl.hxx> -#include <ary/cpp/c_etypes.hxx> - // PARAMETERS +#include <ary/cpp/c_types4cpp.hxx> @@ -53,58 +52,54 @@ namespace cpp { + +/** A C++ enum value declaration and definition. +*/ class EnumValue : public CodeEntity { public: + enum E_ClassId { class_id = 1006 }; + // LIFECYCLE EnumValue(); EnumValue( - Cid i_nId, - const udmstri & i_sLocalName, - Cid i_nOwner, - udmstri i_sInitialisation ); + const String & i_sLocalName, + Ce_id i_nOwner, + String i_sInitialisation ); ~EnumValue(); // INQUIRY - static RCid RC_() { return 0x1007; } - - const udmstri & Initialisation() const; - + const String & Initialisation() const; private: - // Interface ary::CodeEntity - virtual Cid inq_Id() const; - virtual const udmstri & + // 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::RepositoryEntity - virtual void do_StoreAt( - ary::Display & o_rOut ) const; - virtual RCid inq_RC() const; - virtual const ary::Documentation & - inq_Info() const; - virtual void do_Add_Documentation( - DYN ary::Documentation & - let_drInfo ); + // Interface ary::cpp::CppEntity + virtual ClassId get_AryClass() const; // DATA CeEssentials aEssentials; - udmstri sInitialisation; + String sInitialisation; }; -// IMPLEMENTATION -inline const udmstri & +// IMPLEMENTATION +inline const String & EnumValue::Initialisation() const { return sInitialisation; } -} // namespace cpp -} // namespace ary +} // namespace cpp +} // namespace ary #endif - diff --git a/autodoc/inc/ary/cpp/c_macro.hxx b/autodoc/inc/ary/cpp/c_macro.hxx index 049662c5ecd9..3f889180df29 100644 --- a/autodoc/inc/ary/cpp/c_macro.hxx +++ b/autodoc/inc/ary/cpp/c_macro.hxx @@ -4,9 +4,9 @@ * * $RCSfile: c_macro.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: rt $ $Date: 2005-09-07 15:59:49 $ + * last change: $Author: hr $ $Date: 2007-11-02 14:50:26 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -39,53 +39,54 @@ // USED SERVICES // BASE CLASSES -#include <ary/cpp/cpp_defs.hxx> - // COMPONENTS - // PARAMETERS +#include <ary/cpp/c_de.hxx> namespace ary { - namespace cpp { +/** A C/C++ macro ("#define ABC(a,b)") statement, but no simple define. -/** Describes a C/C++ #define MACRO(a,b, ...) statement. + @see Define */ -class Macro : public CppDefinition +class Macro : public DefineEntity { public: + enum E_ClassId { class_id = 1602 }; + Macro(); Macro( /// Used for: #define DEFINE xyz - Did i_nId, - const udmstri & i_sName, - const str_vector & i_rParams, - const str_vector & i_rDefinition, - Lid i_nDeclaringFile ); + const String & i_name, + const StringVector & + i_params, + const StringVector & + i_definition, + loc::Le_id i_declaringFile ); ~Macro(); // INQUIRY void GetText( csv::StreamStr & o_rText, const StringVector & i_rGivenArguments ) const; - const str_vector & Params() const { return aParams; } + const StringVector & Params() const { return aParams; } private: - // Interface RepositoryEntity: - virtual void do_StoreAt( - ary::Display & o_rOut ) const; - virtual RCid inq_RC() const; - - // Interface CppDefinition: - virtual const str_vector & + // 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 - str_vector aParams; - str_vector aDefinition; + StringVector aParams; + StringVector aDefinition; }; @@ -93,7 +94,4 @@ class Macro : public CppDefinition } // namespace cpp } // namespace ary - - #endif - diff --git a/autodoc/inc/ary/cpp/c_osigna.hxx b/autodoc/inc/ary/cpp/c_osigna.hxx index 972ced7d5cfa..faded12a8510 100644 --- a/autodoc/inc/ary/cpp/c_osigna.hxx +++ b/autodoc/inc/ary/cpp/c_osigna.hxx @@ -4,9 +4,9 @@ * * $RCSfile: c_osigna.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: rt $ $Date: 2005-09-07 16:00:26 $ + * last change: $Author: hr $ $Date: 2007-11-02 14:50:56 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -36,33 +36,43 @@ #ifndef ARY_CPP_C_OSIGNA_HXX #define ARY_CPP_C_OSIGNA_HXX - - // USED SERVICES // BASE CLASSES - // COMPONENTS -#include <ary/ids.hxx> -#include <ary/cpp/c_etypes.hxx> - // PARAMETERS + // 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<Tid> ParameterTypeList; + typedef std::vector<Type_id> ParameterTypeList; OperationSignature(); OperationSignature( - std::vector<Tid> & i_rParameterTypes, // Non const, because it will be swapped with aParameterTypes. - E_ConVol i_eConVol ); + 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; @@ -81,43 +91,41 @@ class OperationSignature const OperationSignature & i_rSig ) const; private: - // DATA ParameterTypeList aParameterTypes; E_ConVol eConVol; }; -#if 0 // Vielleicht noch gebraucht, vielleicht auch nicht. DO NOT delete! -struct S_VariableInfo -{ - udmstri sName; - udmstri sSizeExpression; - udmstri sInitExpression; - - void Empty() - { sName.clear(); - sSizeExpression.clear(); - sInitExpression.clear(); } -}; -#endif + // 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; } +{ + return Compare(i_rSign) < 0; +} + inline const OperationSignature::ParameterTypeList & OperationSignature::Parameters() const - { return aParameterTypes; } +{ + return aParameterTypes; +} + inline E_ConVol OperationSignature::ConVol() const - { return eConVol; } +{ + return eConVol; +} + } // namespace cpp } // namespace ary - - #endif - diff --git a/autodoc/inc/ary/cpp/c_vari.hxx b/autodoc/inc/ary/cpp/c_vari.hxx index 0fc7978f249f..fd534fd8948f 100644 --- a/autodoc/inc/ary/cpp/c_vari.hxx +++ b/autodoc/inc/ary/cpp/c_vari.hxx @@ -4,9 +4,9 @@ * * $RCSfile: c_vari.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: rt $ $Date: 2005-09-07 16:01:40 $ + * last change: $Author: hr $ $Date: 2007-11-02 14:52:45 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -39,95 +39,85 @@ // USED SERVICES // BASE CLASSES -#include <ary/ce.hxx> - // COMPONENTS +#include <ary/cpp/c_ce.hxx> + // OTHER #include <ary/cessentl.hxx> -#include <ary/cpp/c_etypes.hxx> +#include <ary/cpp/c_types4cpp.hxx> #include <ary/cpp/c_vfflag.hxx> - // PARAMETERS namespace ary { - namespace cpp { +/** A C++ variable or constant declaration. +*/ class Variable : public CodeEntity { public: // LIFECYCLE + enum E_ClassId { class_id = 1005 }; + Variable(); Variable( - Cid i_nId, - const udmstri & i_sLocalName, - Cid i_nOwner, + const String & i_sLocalName, + Ce_id i_nOwner, E_Protection i_eProtection, - Lid i_nFile, - Tid i_nType, + loc::Le_id i_nFile, + Type_id i_nType, VariableFlags i_aFlags, - const udmstri & i_sArraySize, - const udmstri & i_sInitValue ); + const String & i_sArraySize, + const String & i_sInitValue ); ~Variable(); // INQUIRY - static RCid RC_() { return 0x1006; } - - Tid Type() const; - const udmstri & ArraySize() const; - const udmstri & Initialisation() const; + Type_id Type() const; + const String & ArraySize() const; + const String & Initialisation() const; E_Protection Protection() const { return eProtection; } - // ACCESS - private: - // Interface ary::CodeEntity - virtual Cid inq_Id() const; - virtual const udmstri & + // 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::RepositoryEntity - virtual void do_StoreAt( - ary::Display & o_rOut ) const; - virtual RCid inq_RC() const; - virtual const ary::Documentation & - inq_Info() const; - virtual void do_Add_Documentation( - DYN ary::Documentation & - let_drInfo ); + // Interface ary::cpp::CppEntity + virtual ClassId get_AryClass() const; // DATA CeEssentials aEssentials; - Tid nType; + Type_id nType; E_Protection eProtection; VariableFlags aFlags; - udmstri sArraySize; - udmstri sInitialisation; + String sArraySize; + String sInitialisation; }; // IMPLEMENTATION - -inline Tid +inline Type_id Variable::Type() const { return nType; } -inline const udmstri & +inline const String & Variable::ArraySize() const { return sArraySize; } -inline const udmstri & +inline const String & Variable::Initialisation() const { return sInitialisation; } + } // namespace cpp } // namespace ary - - #endif - diff --git a/autodoc/inc/ary/cpp/c_vfflag.hxx b/autodoc/inc/ary/cpp/c_vfflag.hxx index 2f64e26129d5..f57bf1adf88b 100644 --- a/autodoc/inc/ary/cpp/c_vfflag.hxx +++ b/autodoc/inc/ary/cpp/c_vfflag.hxx @@ -4,9 +4,9 @@ * * $RCSfile: c_vfflag.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: rt $ $Date: 2005-09-07 16:01:58 $ + * last change: $Author: hr $ $Date: 2007-11-02 14:53:01 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -36,13 +36,7 @@ #ifndef ARY_CPP_C_VFFLAG_HXX #define ARY_CPP_C_VFFLAG_HXX - - // USED SERVICES - // BASE CLASSES - // COMPONENTS - // PARAMETERS - namespace ary @@ -51,6 +45,8 @@ namespace cpp { +/** Properties of C++ variables. +*/ struct VariableFlags { public: @@ -83,6 +79,8 @@ struct VariableFlags }; +/** Properties of C++ functions. +*/ struct FunctionFlags { public: @@ -102,6 +100,15 @@ struct 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; } @@ -126,16 +133,19 @@ struct FunctionFlags UINT16 nFlags; }; + +/** A C++ function parameter. +*/ struct S_Parameter { - udmstri sName; - udmstri sSizeExpression; - udmstri sInitExpression; - Tid nType; + String sName; + String sSizeExpression; + String sInitExpression; + Type_id nType; S_Parameter() : nType(0) {} ~S_Parameter() {} - void Empty() { nType = 0; + void Empty() { nType = Type_id(0); sName.clear(); sSizeExpression.clear(); sInitExpression.clear(); } @@ -143,9 +153,7 @@ struct S_Parameter + } // namespace cpp } // namespace ary - - #endif - diff --git a/autodoc/inc/ary/cpp/usedtype.hxx b/autodoc/inc/ary/cpp/usedtype.hxx index f8bdfc4308f1..d12153faa613 100644 --- a/autodoc/inc/ary/cpp/usedtype.hxx +++ b/autodoc/inc/ary/cpp/usedtype.hxx @@ -4,9 +4,9 @@ * * $RCSfile: usedtype.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: rt $ $Date: 2005-09-07 16:05:43 $ + * last change: $Author: hr $ $Date: 2007-11-02 14:57:52 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -36,25 +36,33 @@ #ifndef ARY_CPP_USEDTYPE_HXX #define ARY_CPP_USEDTYPE_HXX - // USED SERVICES // BASE CLASSES -#include <ary/cpp/ca_type.hxx> - // COMPONENTS - // PARAMETERS +#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 { - namespace ut - { - class List_TplParameter; - } - class DisplayGate; - class Gate; /** This class represents a type in textual form, like it is parsed out of source code as a variable type or function return type. @@ -62,7 +70,10 @@ namespace cpp class UsedType : public Type { public: - UsedType(); + enum E_ClassId { class_id = 1203 }; + + explicit UsedType( + Ce_id i_scope ); ~UsedType(); // OPERATORS bool operator<( @@ -70,8 +81,6 @@ class UsedType : public Type // OPERATIONS // Operations to build up the used type from parsing: - void Set_Id( - Tid i_nId ); void Set_Absolute(); /// "::" is in front. void Add_NameSegment( const char * i_sSeg ); @@ -91,9 +100,22 @@ class UsedType : public Type // 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() */ - Rid Connect2Ce( - const Gate & i_rGate ); + 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 @@ -103,36 +125,60 @@ class UsedType : public Type /** @return the full local name, including template instantiation, but without '*','&' or modifiers. */ - const udmstri & LocalName() const; + const String & LocalName() const; E_TypeSpecialisation TypeSpecialisation() const; private: - // Forbidden functions - UsedType( - const UsedType & i_rType ); - bool operator=( - const UsedType & i_rType ); + // Interface csv::ConstProcessorClient + virtual void do_Accept( + csv::ProcessorIfc & io_processor ) const; - // Interface ary::cpp::Type - virtual Tid inq_Id_Type() 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::DisplayGate & + const ary::cpp::Gate & i_rGate ) const; // Local - struct CheshireCat; + 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 ); - bool DoesMatch_Ce( - Rid i_nId, - const Gate & i_rGate ) const; + // Forbidden functions + UsedType( + const UsedType & i_rType ); + bool operator=( + const UsedType & i_rType ); // DATA - Dyn<CheshireCat> pi; + 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; }; @@ -149,9 +195,9 @@ class List_TplParameter ~List_TplParameter(); void AddParam_Type( - Tid i_nType ); + Type_id i_nType ); void AddParam_Constant( - const udmstri & i_sConst ); + const String & i_sConst ); const_iterator Begin() const; const_iterator End() const; @@ -159,7 +205,7 @@ class List_TplParameter /// puts "< " TemplateArgumentList " >" to o_rOut. void Get_Text( StreamStr & o_rOut, - const ary::cpp::DisplayGate & + const ary::cpp::Gate & i_rGate ) const; /// @return as strcmp(). intt Compare( @@ -172,15 +218,11 @@ class List_TplParameter Vector_TplArgument aTplParameters; }; - } // namespace ut + } // namespace cpp } // namespace ary - - - #endif - diff --git a/autodoc/inc/ary/udmhost.hxx b/autodoc/inc/ary/udmhost.hxx index 3889394d5622..fda297b10bb0 100644 --- a/autodoc/inc/ary/udmhost.hxx +++ b/autodoc/inc/ary/udmhost.hxx @@ -4,9 +4,9 @@ * * $RCSfile: udmhost.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: rt $ $Date: 2005-09-07 15:56:05 $ + * last change: $Author: hr $ $Date: 2007-11-02 14:44:25 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -35,6 +35,7 @@ #ifndef ARY_UDMHOST_HXX #define ARY_UDMHOST_HXX +// KORR_DEPRECATED_3.0 @@ -48,6 +49,7 @@ namespace ary { + class UdmHost : public Host { public: @@ -62,8 +64,7 @@ class UdmHost : public Host }; -} // namespace ary +} // namespace ary #endif - diff --git a/autodoc/inc/ary/x_ary.hxx b/autodoc/inc/ary/x_ary.hxx index cc992a6d5541..415d307a89b5 100644 --- a/autodoc/inc/ary/x_ary.hxx +++ b/autodoc/inc/ary/x_ary.hxx @@ -4,9 +4,9 @@ * * $RCSfile: x_ary.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: rt $ $Date: 2005-09-07 15:56:27 $ + * last change: $Author: hr $ $Date: 2007-11-02 14:44:38 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -36,14 +36,15 @@ #ifndef ARY_X_ARY_HXX #define ARY_X_ARY_HXX -// VERSION: Autodoc 2.2 + // USED SERVICES // BASE CLASSES #include <cosv/x.hxx> - // COMPONENTS - // PARAMETERS + // OTHER + + namespace ary { @@ -70,7 +71,7 @@ class X_Ary : public csv::Exception // INQUIRY E_Event GetEvent() const; virtual void GetInfo( - ostream & o_rOutputMedium ) const; + std::ostream & o_rOutputMedium ) const; private: E_Event eEvent; }; @@ -81,8 +82,7 @@ X_Ary::GetEvent() const { return eEvent; } -} // namespace ary +} // namespace ary #endif - |