summaryrefslogtreecommitdiff
path: root/autodoc/source/ary/cpp
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2007-11-02 14:26:30 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2007-11-02 14:26:30 +0000
commit75e017cacec33b6fcf5f867020f3b439f51ef1d3 (patch)
treedbb6906af5450a2063b2fe991f16b11a4da9f888 /autodoc/source/ary/cpp
parentbb998ac75bf6b8e77ff012a100b3afd9caff2e7e (diff)
INTEGRATION: CWS adc18 (1.4.2); FILE MERGED
2007/10/18 13:27:00 np 1.4.2.1: #i81775#
Diffstat (limited to 'autodoc/source/ary/cpp')
-rw-r--r--autodoc/source/ary/cpp/c_class.cxx244
-rw-r--r--autodoc/source/ary/cpp/c_define.cxx42
-rw-r--r--autodoc/source/ary/cpp/c_enum.cxx67
-rw-r--r--autodoc/source/ary/cpp/c_enuval.cxx58
-rw-r--r--autodoc/source/ary/cpp/c_funct.cxx205
-rw-r--r--autodoc/source/ary/cpp/c_macro.cxx52
-rw-r--r--autodoc/source/ary/cpp/c_osigna.cxx16
7 files changed, 330 insertions, 354 deletions
diff --git a/autodoc/source/ary/cpp/c_class.cxx b/autodoc/source/ary/cpp/c_class.cxx
index f59e43bd43c5..4fe0dec6d1b3 100644
--- a/autodoc/source/ary/cpp/c_class.cxx
+++ b/autodoc/source/ary/cpp/c_class.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: c_class.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: vg $ $Date: 2007-09-18 13:24:24 $
+ * last change: $Author: hr $ $Date: 2007-11-02 15:23:54 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -38,49 +38,65 @@
// NOT FULLY DECLARED SERVICES
-#include "rcids.hxx"
-#include <ary/cpp/cpp_disp.hxx>
#include <slots.hxx>
#include "c_slots.hxx"
-
namespace ary
{
namespace cpp
{
+
Class::Class()
- : // aEssentials,
- // aBaseClasses,
- // aClasses,
- // aOperations,
- // aData,
+ : aEssentials(),
+ aAssignedNode(),
+ aBaseClasses(),
+ aTemplateParameterTypes(),
+ aClasses(),
+ aEnums(),
+ aTypedefs(),
+ aOperations(),
+ aStaticOperations(),
+ aData(),
+ aStaticData(),
+ aFriendClasses(),
+ aFriendOperations(),
+ aKnownDerivatives(),
eClassKey(CK_class),
eProtection(PROTECT_global),
eVirtuality(VIRTUAL_none)
{
+ aAssignedNode.Assign_Entity(*this);
}
-Class::Class( Cid i_nId,
- const udmstri & i_sLocalName,
- Cid i_nOwner,
+Class::Class( const String & i_sLocalName,
+ Ce_id i_nOwner,
E_Protection i_eProtection,
- Lid i_nFile,
+ loc::Le_id i_nFile,
E_ClassKey i_eClassKey )
- : aEssentials( i_nId,
- i_sLocalName,
+ : aEssentials( i_sLocalName,
i_nOwner,
i_nFile ),
- // aBaseClasses,
- // aClasses,
- // aOperations,
- // aData,
+ aAssignedNode(),
+ aBaseClasses(),
+ aTemplateParameterTypes(),
+ aClasses(),
+ aEnums(),
+ aTypedefs(),
+ aOperations(),
+ aStaticOperations(),
+ aData(),
+ aStaticData(),
+ aFriendClasses(),
+ aFriendOperations(),
+ aKnownDerivatives(),
eClassKey(i_eClassKey),
eProtection(i_eProtection),
eVirtuality(VIRTUAL_none)
{
+ aAssignedNode.Assign_Entity(*this);
}
Class::~Class()
@@ -94,80 +110,110 @@ Class::Add_BaseClass( const S_Classes_Base & i_rBaseClass )
}
void
-Class::Add_TemplateParameterType( const udmstri & i_sLocalName,
- Tid i_nIdAsType )
+Class::Add_TemplateParameterType( const String & i_sLocalName,
+ Type_id i_nIdAsType )
{
aTemplateParameterTypes.push_back(
List_TplParam::value_type(i_sLocalName,i_nIdAsType) );
}
void
-Class::Add_LocalClass( const udmstri & i_sLocalName,
+Class::Add_LocalClass( const String & i_sLocalName,
Cid i_nId )
{
aClasses.push_back( S_LocalCe(i_sLocalName, i_nId) );
}
void
-Class::Add_LocalEnum( const udmstri & i_sLocalName,
+Class::Add_LocalEnum( const String & i_sLocalName,
Cid i_nId )
{
aEnums.push_back( S_LocalCe(i_sLocalName, i_nId) );
}
void
-Class::Add_LocalTypedef( const udmstri & i_sLocalName,
+Class::Add_LocalTypedef( const String & i_sLocalName,
Cid i_nId )
{
aTypedefs.push_back( S_LocalCe(i_sLocalName, i_nId) );
}
void
-Class::Add_LocalOperation( const udmstri & i_sLocalName,
- OSid i_nOS,
+Class::Add_LocalOperation( const String & i_sLocalName,
Cid i_nId )
{
- aOperations.push_back( S_LocalOperation(i_sLocalName, i_nOS, i_nId) );
+ aOperations.push_back( S_LocalCe(i_sLocalName, i_nId) );
}
void
-Class::Add_LocalStaticOperation( const udmstri & i_sLocalName,
- OSid i_nOS,
+Class::Add_LocalStaticOperation( const String & i_sLocalName,
Cid i_nId )
{
- aStaticOperations.push_back( S_LocalOperation(i_sLocalName, i_nOS, i_nId) );
+ aStaticOperations.push_back( S_LocalCe(i_sLocalName, i_nId) );
}
void
-Class::Add_LocalData( const udmstri & i_sLocalName,
+Class::Add_LocalData( const String & i_sLocalName,
Cid i_nId )
{
aData.push_back( S_LocalCe(i_sLocalName, i_nId) );
}
void
-Class::Add_LocalStaticData( const udmstri & i_sLocalName,
+Class::Add_LocalStaticData( const String & i_sLocalName,
Cid i_nId )
{
aStaticData.push_back( S_LocalCe(i_sLocalName, i_nId) );
}
+
+struct find_name
+{
+ find_name(
+ const String & i_name )
+ : sName(i_name) {}
+
+ bool operator()(
+ const S_LocalCe & i_lce ) const
+ { return i_lce.sLocalName == sName; }
+ private:
+ String sName;
+};
+
+Ce_id
+Class::Search_Child(const String & i_key) const
+{
+ Ce_id
+ ret = Ce_id(Search_LocalClass(i_key));
+ if (ret.IsValid())
+ return ret;
+
+ CIterator_Locals
+ itret = std::find_if(aEnums.begin(), aEnums.end(), find_name(i_key));
+ if (itret != aEnums.end())
+ return (*itret).nId;
+ itret = std::find_if(aTypedefs.begin(), aTypedefs.end(), find_name(i_key));
+ if (itret != aTypedefs.end())
+ return (*itret).nId;
+ itret = std::find_if(aData.begin(), aData.end(), find_name(i_key));
+ if (itret != aData.end())
+ return (*itret).nId;
+ itret = std::find_if(aStaticData.begin(), aStaticData.end(), find_name(i_key));
+ if (itret != aStaticData.end())
+ return (*itret).nId;
+ return Ce_id(0);
+}
+
Rid
-Class::Search_LocalClass( const udmstri & i_sName ) const
+Class::Search_LocalClass( const String & i_sName ) const
{
CIterator_Locals itFound = PosOfName(aClasses, i_sName);
if (itFound != aClasses.end())
- return (*itFound).nId;
+ return (*itFound).nId.Value();
return 0;
}
-Cid
-Class::inq_Id() const
-{
- return aEssentials.Id();
-}
-
-const udmstri &
+const String &
Class::inq_LocalName() const
{
return aEssentials.LocalName();
@@ -179,48 +225,31 @@ Class::inq_Owner() const
return aEssentials.Owner();
}
-Lid
+loc::Le_id
Class::inq_Location() const
{
return aEssentials.Location();
}
void
-Class::do_StoreAt( ary::Display & o_rOut ) const
+Class::do_Accept(csv::ProcessorIfc & io_processor) const
{
- ary::cpp::Display * pD = dynamic_cast< ary::cpp::Display* >(&o_rOut);
- if (pD != 0)
- {
- pD->Display_Class(*this);
- }
+ csv::CheckedCall(io_processor,*this);
}
-RCid
-Class::inq_RC() const
+ClassId
+Class::get_AryClass() const
{
- return RC_();
-}
-
-
-const ary::Documentation &
-Class::inq_Info() const
-{
- return aEssentials.Info();
-}
-
-void
-Class::do_Add_Documentation( DYN ary::Documentation & let_drInfo )
-{
- aEssentials.SetInfo(let_drInfo);
+ return class_id;
}
Gid
Class::inq_Id_Group() const
{
- return static_cast<Gid>(aEssentials.Id());
+ return static_cast<Gid>(Id());
}
-const RepositoryEntity &
+const ary::cpp::CppEntity &
Class::inq_RE_Group() const
{
return *this;
@@ -257,86 +286,20 @@ Class::inq_Create_Slot( SlotAccessId i_nSlot ) const
case SLOT_NestedClasses: return new Slot_ListLocalCe(aClasses);
case SLOT_Enums: return new Slot_ListLocalCe(aEnums);
case SLOT_Typedefs: return new Slot_ListLocalCe(aTypedefs);
- case SLOT_Operations: return new Slot_OperationList(aOperations);
- case SLOT_StaticOperations: return new Slot_OperationList(aStaticOperations);
+ case SLOT_Operations: return new Slot_ListLocalCe(aOperations);
+ case SLOT_StaticOperations: return new Slot_ListLocalCe(aStaticOperations);
case SLOT_Data: return new Slot_ListLocalCe(aData);
case SLOT_StaticData: return new Slot_ListLocalCe(aStaticData);
- case SLOT_FriendClasses: return new Slot_RidList(aFriendClasses);
- case SLOT_FriendOperations: return new Slot_RidList(aFriendOperations);
+ case SLOT_FriendClasses: return new Slot_SequentialIds<Ce_id>(aFriendClasses);
+ case SLOT_FriendOperations: return new Slot_SequentialIds<Ce_id>(aFriendOperations);
default:
return new Slot_Null;
} // end switch
}
-
-#if 0
-uintt
-Class::Get_LocalClasses( ary::List_Rid & o_rResultList ) const
-{
- for ( CIterator_Locals it = aClasses.begin();
- it != aClasses.end();
- ++it )
- {
- o_rResultList.push_back((*it).nId);
- }
- return o_rResultList.size();
-}
-
-uintt
-Class::Get_LocalFunctions( ary::List_Rid & o_rResultList ) const
-{
- for ( List_LocalOperation::const_iterator its = aStaticOperations.begin();
- its != aStaticOperations.end();
- ++its )
- {
- o_rResultList.push_back((*its).nId);
- }
- for ( List_LocalOperation::const_iterator it = aOperations.begin();
- it != aOperations.end();
- ++it )
- {
- o_rResultList.push_back((*it).nId);
- }
- return o_rResultList.size();
-}
-
-const udmstri &
-Class::LocalNameOfOwner() const
-{
- return LocalName();
-}
-#endif // 0
-
-#if 0
-Cid
-Class::Find_LocalClass( const udmstri & i_sLocalName ) const
-{
- CIterator_Locals ret = PosOfName(aClasses, i_sLocalName);
- if (ret != aTypes.end())
- return static_cast<Cid>( (*ret).nId );
- return 0;
-}
-
-Tid
-Class::Find_LocalType( const udmstri & i_sLocalName ) const
-{
- CIterator_Locals ret = PosOfName(aEnums, i_sLocalName);
- if (ret != aEnums.end())
- return (*ret).nId;
- ret = PosOfName(aTypedefs, i_sLocalName);
- if (ret != aTypedefs.end())
- return (*ret).nId;
- ret = PosOfName(aClasses, i_sLocalName);
- if (ret != aClasses.end())
- return (*ret).nId;
- return 0;
-}
-#endif // 0
-
-
Class::CIterator_Locals
Class::PosOfName( const List_LocalCe & i_rList,
- const udmstri & i_sName ) const
+ const String & i_sName ) const
{
for ( CIterator_Locals ret = i_rList.begin();
ret != i_rList.end();
@@ -350,7 +313,7 @@ Class::PosOfName( const List_LocalCe & i_rList,
Class::Iterator_Locals
Class::PosOfName( List_LocalCe & i_rList,
- const udmstri & i_sName )
+ const String & i_sName )
{
for ( Iterator_Locals ret = i_rList.begin();
ret != i_rList.end();
@@ -365,6 +328,3 @@ Class::PosOfName( List_LocalCe & i_rList,
} // namespace cpp
} // namespace ary
-
-
-
diff --git a/autodoc/source/ary/cpp/c_define.cxx b/autodoc/source/ary/cpp/c_define.cxx
index 064990efe25a..3807b068dbbc 100644
--- a/autodoc/source/ary/cpp/c_define.cxx
+++ b/autodoc/source/ary/cpp/c_define.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: c_define.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: vg $ $Date: 2007-09-18 13:24:39 $
+ * last change: $Author: hr $ $Date: 2007-11-02 15:24:23 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -38,9 +38,7 @@
// NOT FULLY DECLARED SERVICES
-#include "rcids.hxx"
-#include <ary/cpp/cpp_disp.hxx>
-#include <ary/cpp/prpr.hxx>
+#include <prprpr.hxx>
@@ -51,12 +49,12 @@ namespace cpp
{
-Define::Define( Did i_nId,
- const udmstri & i_sName,
- const str_vector & i_rDefinition,
- Lid i_nDeclaringFile )
- : CppDefinition(i_nId, i_sName, i_nDeclaringFile),
- aDefinition(i_rDefinition)
+
+Define::Define( const String & i_name,
+ const StringVector & i_definition,
+ loc::Le_id i_declaringFile)
+ : DefineEntity(i_name, i_declaringFile),
+ aDefinition(i_definition)
{
}
@@ -65,22 +63,18 @@ Define::~Define()
}
void
-Define::do_StoreAt( ary::Display & o_rOut ) const
+Define::do_Accept(csv::ProcessorIfc & io_processor) const
{
- ary::cpp::Display * pD = dynamic_cast< ary::cpp::Display* >(&o_rOut);
- if (pD != 0)
- {
- pD->Display_Define(*this);
- }
+ csv::CheckedCall(io_processor, *this);
}
-RCid
-Define::inq_RC() const
+ClassId
+Define::get_AryClass() const
{
- return RCID_DEFINE;
+ return class_id;
}
-const CppDefinition::str_vector &
+const StringVector &
Define::inq_DefinitionText() const
{
return aDefinition;
@@ -96,7 +90,7 @@ Define::GetText( StreamStr & o_rText ) const
bool bSwitch_Stringify = false;
bool bSwitch_Concatenate = false;
- for ( str_vector::const_iterator it = aDefinition.begin();
+ for ( StringVector::const_iterator it = aDefinition.begin();
it != aDefinition.end();
++it )
{
@@ -118,9 +112,5 @@ Define::GetText( StreamStr & o_rText ) const
-
} // namespace cpp
} // namespace ary
-
-
-
diff --git a/autodoc/source/ary/cpp/c_enum.cxx b/autodoc/source/ary/cpp/c_enum.cxx
index 2cd24fda1105..554ca9c3296c 100644
--- a/autodoc/source/ary/cpp/c_enum.cxx
+++ b/autodoc/source/ary/cpp/c_enum.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: c_enum.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: vg $ $Date: 2007-09-18 13:24:54 $
+ * last change: $Author: hr $ $Date: 2007-11-02 15:24:37 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -38,8 +38,6 @@
// NOT FULLY DECLARED SERVICES
-#include "rcids.hxx"
-#include <ary/cpp/cpp_disp.hxx>
#include <slots.hxx>
#include "c_slots.hxx"
@@ -53,25 +51,22 @@ namespace cpp
Enum::Enum()
- : // aEssentials,
- // aValues,
+ : aEssentials(),
+ aValues(),
eProtection(PROTECT_global)
{
}
-Enum::Enum( Cid i_nId,
- const udmstri & i_sLocalName,
- Cid i_nOwner,
+Enum::Enum( const String & i_sLocalName,
+ Ce_id i_nOwner,
E_Protection i_eProtection,
Lid i_nFile )
- : aEssentials( i_nId,
- i_sLocalName,
+ : aEssentials( i_sLocalName,
i_nOwner,
i_nFile ),
- // aValues
+ aValues(),
eProtection(i_eProtection)
{
-
}
Enum::~Enum()
@@ -79,18 +74,12 @@ Enum::~Enum()
}
void
-Enum::Add_Value( Cid i_nId )
-{
- aValues.push_back( i_nId );
-}
-
-Cid
-Enum::inq_Id() const
+Enum::Add_Value( Ce_id i_nId )
{
- return aEssentials.Id();
+ aValues.Add( i_nId );
}
-const udmstri &
+const String &
Enum::inq_LocalName() const
{
return aEssentials.LocalName();
@@ -109,32 +98,15 @@ Enum::inq_Location() const
}
void
-Enum::do_StoreAt( ary::Display & o_rOut ) const
+Enum::do_Accept(csv::ProcessorIfc & io_processor) const
{
- ary::cpp::Display * pD = dynamic_cast< ary::cpp::Display* >(&o_rOut);
- if (pD != 0)
- {
- pD->Display_Enum(*this);
- }
+ csv::CheckedCall(io_processor,*this);
}
-RCid
-Enum::inq_RC() const
+ClassId
+Enum::get_AryClass() const
{
- return RC_();
-}
-
-
-const ary::Documentation &
-Enum::inq_Info() const
-{
- return aEssentials.Info();
-}
-
-void
-Enum::do_Add_Documentation( DYN ary::Documentation & let_drInfo )
-{
- aEssentials.SetInfo(let_drInfo);
+ return class_id;
}
Gid
@@ -143,7 +115,7 @@ Enum::inq_Id_Group() const
return static_cast<Gid>(Id());
}
-const RepositoryEntity &
+const ary::cpp::CppEntity &
Enum::inq_RE_Group() const
{
return *this;
@@ -166,7 +138,7 @@ Enum::inq_Create_Slot( SlotAccessId i_nSlot ) const
{
switch ( i_nSlot )
{
- case SLOT_Values: return new Slot_RidList(aValues);
+ case SLOT_Values: return new Slot_SequentialIds<Ce_id>(aValues);
default:
return new Slot_Null;
} // end switch
@@ -176,6 +148,3 @@ Enum::inq_Create_Slot( SlotAccessId i_nSlot ) const
} // namespace cpp
} // namespace ary
-
-
-
diff --git a/autodoc/source/ary/cpp/c_enuval.cxx b/autodoc/source/ary/cpp/c_enuval.cxx
index af6de0c350f2..44420bdca322 100644
--- a/autodoc/source/ary/cpp/c_enuval.cxx
+++ b/autodoc/source/ary/cpp/c_enuval.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: c_enuval.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: vg $ $Date: 2007-09-18 13:25:08 $
+ * last change: $Author: hr $ $Date: 2007-11-02 15:24:50 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -38,10 +38,6 @@
// NOT FULLY DECLARED SERVICES
-#include "rcids.hxx"
-#include <ary/cpp/cpp_disp.hxx>
-
-
namespace ary
@@ -56,14 +52,12 @@ EnumValue::EnumValue()
{
}
-EnumValue::EnumValue( Cid i_nId,
- const udmstri & i_sLocalName,
- Cid i_nOwner,
- udmstri i_sInitialisation )
- : aEssentials( i_nId,
- i_sLocalName,
+EnumValue::EnumValue( const String & i_sLocalName,
+ Ce_id i_nOwner,
+ String i_sInitialisation )
+ : aEssentials( i_sLocalName,
i_nOwner,
- 0 ),
+ Lid(0) ),
sInitialisation(i_sInitialisation)
{
}
@@ -72,13 +66,7 @@ EnumValue::~EnumValue()
{
}
-Cid
-EnumValue::inq_Id() const
-{
- return aEssentials.Id();
-}
-
-const udmstri &
+const String &
EnumValue::inq_LocalName() const
{
return aEssentials.LocalName();
@@ -97,37 +85,17 @@ EnumValue::inq_Location() const
}
void
-EnumValue::do_StoreAt( ary::Display & o_rOut ) const
+EnumValue::do_Accept(csv::ProcessorIfc & io_processor) const
{
- ary::cpp::Display * pD = dynamic_cast< ary::cpp::Display* >(&o_rOut);
- if (pD != 0)
- {
- pD->Display_EnumValue(*this);
- }
+ csv::CheckedCall(io_processor,*this);
}
-RCid
-EnumValue::inq_RC() const
+ClassId
+EnumValue::get_AryClass() const
{
- return RC_();
-}
-
-
-const ary::Documentation &
-EnumValue::inq_Info() const
-{
- return aEssentials.Info();
-}
-
-void
-EnumValue::do_Add_Documentation( DYN ary::Documentation & let_drInfo )
-{
- aEssentials.SetInfo(let_drInfo);
+ return class_id;
}
} // namespace cpp
} // namespace ary
-
-
-
diff --git a/autodoc/source/ary/cpp/c_funct.cxx b/autodoc/source/ary/cpp/c_funct.cxx
index 7267bab2c683..994d31f440bc 100644
--- a/autodoc/source/ary/cpp/c_funct.cxx
+++ b/autodoc/source/ary/cpp/c_funct.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: c_funct.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: vg $ $Date: 2007-09-18 13:25:22 $
+ * last change: $Author: hr $ $Date: 2007-11-02 15:25:07 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -39,9 +39,49 @@
// NOT FULLY DECLARED SERVICES
-#include "rcids.hxx"
-#include <ary/cpp/cpp_disp.hxx>
+#include <algorithm>
+#include <ary/cpp/c_funct.hxx>
+
+
+
+
+
+namespace
+{
+using namespace ::ary::cpp;
+
+
+class Parameter_2_NonTypeParamInfo
+{
+ public:
+ String operator()(
+ const S_Parameter & i_rParam ) const;
+};
+
+class Parameter_2_Type
+{
+ public:
+ Type_id operator()(
+ const S_Parameter & i_rParam ) const
+ { return i_rParam.nType; }
+};
+/** @return
+ A vector with Strings like this:
+ "ParamName" or "ParamName[ArraySize]" or "ParamName = InitValue".
+*/
+StringVector Create_NonTypeParameterInfos(
+ const std::vector<S_Parameter> &
+ i_rParameters );
+/** @return
+ A vector of the parameters' type ids.
+*/
+std::vector<Type_id>
+ Create_ParameterTypeList(
+ const std::vector<S_Parameter> &
+ i_rParameters );
+
+} // namspace anonymous
namespace ary
@@ -50,66 +90,88 @@ namespace cpp
{
Function::Function()
- : // aEssentials,
- nSignature(0),
+ : aEssentials(),
+ aTemplateParameterTypes(),
+ aSignature(),
nReturnType(0),
eProtection(PROTECT_global),
- eVirtuality(VIRTUAL_none)
- // aFlags,
- // aParameterInfos,
- // pExceptions
+ eVirtuality(VIRTUAL_none),
+ aFlags(),
+ aParameterInfos(),
+ pExceptions()
{
}
-Function::Function( Cid i_nId,
- const udmstri & i_sLocalName,
- Cid i_nOwner,
+Function::Function( const String & i_sLocalName,
+ Ce_id i_nOwner,
E_Protection i_eProtection,
Lid i_nFile,
- Tid i_nReturnType,
- OSid i_nSignature,
- StringVector & i_rNonType_ParameterInfos,
+ 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<Tid> & i_rExceptions )
-
- : aEssentials( i_nId,
- i_sLocalName,
+ const std::vector<Type_id> &
+ i_rExceptions )
+ : aEssentials( i_sLocalName,
i_nOwner,
i_nFile ),
- // aTemplateParameterTypes
- nSignature(i_nSignature),
+ aTemplateParameterTypes(),
+ aSignature( Create_ParameterTypeList(i_parameters),
+ i_conVol ),
nReturnType(i_nReturnType),
eProtection(i_eProtection),
eVirtuality(i_eVirtuality),
aFlags(i_aFlags),
- // aParameterInfos,
+ aParameterInfos( Create_NonTypeParameterInfos(i_parameters) ),
pExceptions( i_bThrowExists ? new ExceptionTypeList(i_rExceptions) : 0 )
{
- std::swap( aParameterInfos, i_rNonType_ParameterInfos );
}
Function::~Function()
{
}
+bool
+Function::IsIdentical( const Function & i_f ) const
+{
+ return
+ LocalName() == i_f.LocalName()
+ AND
+ Owner() == i_f.Owner()
+ AND
+ aSignature == i_f.aSignature
+ AND
+ nReturnType == i_f.nReturnType
+ AND
+ eProtection == i_f.eProtection
+ AND
+ eVirtuality == i_f.eVirtuality
+ AND
+ aFlags == i_f.aFlags
+ AND
+ ( NOT pExceptions AND NOT i_f.pExceptions
+ OR
+ ( pExceptions AND i_f.pExceptions
+ ? *pExceptions == *i_f.pExceptions
+ : false )
+ )
+ AND
+ aTemplateParameterTypes.size() == i_f.aTemplateParameterTypes.size();
+}
+
void
-Function::Add_TemplateParameterType( const udmstri & i_sLocalName,
- Tid i_nIdAsType )
+Function::Add_TemplateParameterType( const String & i_sLocalName,
+ Type_id i_nIdAsType )
{
aTemplateParameterTypes.push_back(
List_TplParam::value_type(i_sLocalName, i_nIdAsType) );
}
-Cid
-Function::inq_Id() const
-{
- return aEssentials.Id();
-}
-
-const udmstri &
+const String &
Function::inq_LocalName() const
{
return aEssentials.LocalName();
@@ -128,36 +190,79 @@ Function::inq_Location() const
}
void
-Function::do_StoreAt( ary::Display & o_rOut ) const
+Function::do_Accept(csv::ProcessorIfc & io_processor) const
{
- ary::cpp::Display * pD = dynamic_cast< ary::cpp::Display* >(&o_rOut);
- if (pD != 0)
- {
- pD->Display_Function(*this);
- }
+ csv::CheckedCall(io_processor,*this);
}
-RCid
-Function::inq_RC() const
+ClassId
+Function::get_AryClass() const
{
- return RC_();
+ return class_id;
}
-const ary::Documentation &
-Function::inq_Info() const
+
+} // namespace cpp
+} // namespace ary
+
+
+
+namespace
{
- return aEssentials.Info();
+
+String
+Parameter_2_NonTypeParamInfo::operator()( const ary::cpp::S_Parameter & i_rParam ) const
+{
+ static StreamStr aParamName_(1020);
+ aParamName_.seekp(0);
+
+ aParamName_ << i_rParam.sName;
+ if ( i_rParam.sSizeExpression.length() > 0 )
+ {
+ aParamName_ << '['
+ << i_rParam.sSizeExpression
+ << ']';
+ }
+ if ( i_rParam.sInitExpression.length() > 0 )
+ {
+ aParamName_ << " = "
+ << i_rParam.sInitExpression;
+ }
+
+ return aParamName_.c_str();
}
-void
-Function::do_Add_Documentation( DYN ary::Documentation & let_drInfo )
+
+StringVector
+Create_NonTypeParameterInfos( const std::vector<S_Parameter> & i_rParameters )
{
- aEssentials.SetInfo(let_drInfo);
+ static Parameter_2_NonTypeParamInfo
+ aTransformFunction_;
+
+ StringVector
+ ret(i_rParameters.size(), String::Null_());
+ std::transform( i_rParameters.begin(), i_rParameters.end(),
+ ret.begin(),
+ aTransformFunction_ );
+ return ret;
+}
+
+std::vector<Type_id>
+Create_ParameterTypeList( const std::vector<S_Parameter> & i_rParameters )
+{
+ static Parameter_2_Type
+ aTransformFunction_;
+
+ std::vector<Type_id>
+ ret(i_rParameters.size(), Type_id(0));
+ std::transform( i_rParameters.begin(), i_rParameters.end(),
+ ret.begin(),
+ aTransformFunction_ );
+ return ret;
}
-} // namespace cpp
-} // namespace ary
+} // namespace anonymous
diff --git a/autodoc/source/ary/cpp/c_macro.cxx b/autodoc/source/ary/cpp/c_macro.cxx
index 09d1e6075787..005eae1501f7 100644
--- a/autodoc/source/ary/cpp/c_macro.cxx
+++ b/autodoc/source/ary/cpp/c_macro.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: c_macro.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: vg $ $Date: 2007-09-18 13:25:51 $
+ * last change: $Author: hr $ $Date: 2007-11-02 15:25:55 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -38,11 +38,7 @@
// NOT FULLY DECLARED SERVICES
-#include "rcids.hxx"
-#include <ary/cpp/cpp_disp.hxx>
-#include <ary/cpp/prpr.hxx>
-
-
+#include <prprpr.hxx>
@@ -52,14 +48,13 @@ namespace cpp
{
-Macro::Macro( Did i_nId,
- const udmstri & i_sName,
- const str_vector & i_rParams,
- const str_vector & i_rDefinition,
- Lid i_nDeclaringFile )
- : CppDefinition(i_nId, i_sName, i_nDeclaringFile),
- aParams(i_rParams),
- aDefinition(i_rDefinition)
+Macro::Macro( const String & i_name,
+ const StringVector & i_params,
+ const StringVector & i_definition,
+ loc::Le_id i_declaringFile )
+ : DefineEntity(i_name, i_declaringFile),
+ aParams(i_params),
+ aDefinition(i_definition)
{
}
@@ -68,22 +63,20 @@ Macro::~Macro()
}
void
-Macro::do_StoreAt( ary::Display & o_rOut ) const
+Macro::do_Accept(csv::ProcessorIfc & io_processor) const
{
- ary::cpp::Display * pD = dynamic_cast< ary::cpp::Display* >(&o_rOut);
- if (pD != 0)
- {
- pD->Display_Macro(*this);
- }
+ csv::CheckedCall(io_processor,*this);
}
-RCid
-Macro::inq_RC() const
+ClassId
+Macro::get_AryClass() const
{
- return RCID_MACRO;
+ return class_id;
+
+ // return RCID_MACRO;
}
-const CppDefinition::str_vector &
+const StringVector &
Macro::inq_DefinitionText() const
{
return aDefinition;
@@ -100,7 +93,7 @@ Macro::GetText( StreamStr & o_rText,
if ( aDefinition.begin() == aDefinition.end() )
return;
- for ( str_vector::const_iterator it = aDefinition.begin();
+ for ( StringVector::const_iterator it = aDefinition.begin();
it != aDefinition.end();
++it )
{
@@ -112,7 +105,7 @@ Macro::GetText( StreamStr & o_rText,
continue;
}
- for ( str_vector::const_iterator param_it = aParams.begin();
+ for ( StringVector::const_iterator param_it = aParams.begin();
param_it != aParams.end() AND nActiveParamNr == -1;
++param_it )
{
@@ -136,10 +129,5 @@ Macro::GetText( StreamStr & o_rText,
}
-
-
} // namespace cpp
} // namespace ary
-
-
-
diff --git a/autodoc/source/ary/cpp/c_osigna.cxx b/autodoc/source/ary/cpp/c_osigna.cxx
index 94c640de0240..468fdbd9cc2d 100644
--- a/autodoc/source/ary/cpp/c_osigna.cxx
+++ b/autodoc/source/ary/cpp/c_osigna.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: c_osigna.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: vg $ $Date: 2007-09-18 13:26:19 $
+ * last change: $Author: hr $ $Date: 2007-11-02 15:26:30 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -33,7 +33,6 @@
*
************************************************************************/
-
#include <precomp.h>
#include <ary/cpp/c_osigna.hxx>
@@ -53,12 +52,11 @@ OperationSignature::OperationSignature()
{
}
-OperationSignature::OperationSignature( std::vector<Tid> & i_rParameterTypes,
- E_ConVol i_eConVol )
- : // aParameterTypes,
- eConVol(i_eConVol)
+OperationSignature::OperationSignature( std::vector<Type_id> i_parameterTypes,
+ E_ConVol i_conVol )
+ : aParameterTypes(i_parameterTypes),
+ eConVol(i_conVol)
{
- std::swap( aParameterTypes, i_rParameterTypes );
}
int
@@ -90,5 +88,3 @@ OperationSignature::Compare( const OperationSignature & i_rSig ) const
} // namespace cpp
} // namespace ary
-
-