source: dev/trunk/ab5.0/abdev/BasicCompiler_Common/include/Delegate.h@ 525

Last change on this file since 525 was 525, checked in by dai_9181, 16 years ago

デリゲート収集コードの実装をLexicalAnalyzerクラスに移動した。

File size: 1.7 KB
RevLine 
[322]1#pragma once
2
[422]3class Delegate
4 : public Procedure
5 , public Jenga::Common::ObjectInHashmap<Delegate>
[322]6{
[449]7 // importされている名前空間
8 NamespaceScopesCollection importedNamespaces;
9
[422]10 std::string paramStr;
11 std::string returnTypeName;
12 int sourceIndex;
13
[339]14 Parameters dynamicParams;
15
[422]16 // XMLシリアライズ用
17private:
18 friend class boost::serialization::access;
19 template<class Archive> void serialize(Archive& ar, const unsigned int version)
20 {
21 trace_for_serialize( "serializing - Delegate" );
22
23 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Procedure );
[449]24 ar & BOOST_SERIALIZATION_NVP( importedNamespaces );
[422]25 ar & BOOST_SERIALIZATION_NVP( dynamicParams );
26 }
27
[322]28public:
[449]29 Delegate( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const std::string &name, Procedure::Kind procKind, const char *paramStr, const std::string &returnTypeName, int sourceIndex )
[422]30 : Procedure( namespaceScopes, name, procKind, false )
[449]31 , importedNamespaces( importedNamespaces )
[422]32 , paramStr( paramStr )
33 , returnTypeName( returnTypeName )
34 , sourceIndex( sourceIndex )
35 {
36 }
[322]37 Delegate()
38 {
39 }
40
[525]41 const std::string &GetParamStr() const
42 {
43 return paramStr;
44 }
45 const std::string &GetReturnTypeName() const
46 {
47 return returnTypeName;
48 }
49
[422]50 void RefleshParameterAndReturnType();
51
[322]52 virtual const std::string &GetKeyName() const
53 {
54 return GetName();
55 }
[339]56
57 const Parameters &GetDynamicParams() const
58 {
59 return dynamicParams;
60 }
[448]61
62 /*!
63 @brief オーバーライド用にデリゲート同士が等しいかどうかをチェックする
64 @param dgt 照らし合わせるデリゲート
65 */
66 bool IsSimilar( const Delegate &dgt ) const;
[322]67};
[525]68typedef Jenga::Common::Hashmap<Delegate> Delegates;
Note: See TracBrowser for help on using the repository browser.