Last change
on this file since 427 was 422, checked in by dai_9181, 17 years ago |
デリゲートのパラメータや戻り値にクラス型を指定できない不具合を修正。
|
File size:
1.4 KB
|
Rev | Line | |
---|
[322] | 1 | #pragma once
|
---|
| 2 |
|
---|
| 3 | #include <Hashmap.h>
|
---|
[325] | 4 | #include <Procedure.h>
|
---|
[322] | 5 |
|
---|
[422] | 6 | class Delegates;
|
---|
| 7 |
|
---|
| 8 | class Delegate
|
---|
| 9 | : public Procedure
|
---|
| 10 | , public Jenga::Common::ObjectInHashmap<Delegate>
|
---|
[322] | 11 | {
|
---|
[422] | 12 | friend Delegates;
|
---|
| 13 |
|
---|
| 14 | std::string paramStr;
|
---|
| 15 | std::string returnTypeName;
|
---|
| 16 | int sourceIndex;
|
---|
| 17 |
|
---|
[339] | 18 | Parameters dynamicParams;
|
---|
| 19 |
|
---|
[422] | 20 | // XMLシリアライズ用
|
---|
| 21 | private:
|
---|
| 22 | friend class boost::serialization::access;
|
---|
| 23 | template<class Archive> void serialize(Archive& ar, const unsigned int version)
|
---|
| 24 | {
|
---|
| 25 | trace_for_serialize( "serializing - Delegate" );
|
---|
| 26 |
|
---|
| 27 | ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Procedure );
|
---|
| 28 | ar & BOOST_SERIALIZATION_NVP( dynamicParams );
|
---|
| 29 | }
|
---|
| 30 |
|
---|
[322] | 31 | public:
|
---|
[422] | 32 | Delegate( const NamespaceScopes &namespaceScopes, const std::string &name, Procedure::Kind procKind, const char *paramStr, const std::string &returnTypeName, int sourceIndex )
|
---|
| 33 | : Procedure( namespaceScopes, name, procKind, false )
|
---|
| 34 | , paramStr( paramStr )
|
---|
| 35 | , returnTypeName( returnTypeName )
|
---|
| 36 | , sourceIndex( sourceIndex )
|
---|
| 37 | {
|
---|
| 38 | }
|
---|
[322] | 39 | Delegate()
|
---|
| 40 | {
|
---|
| 41 | }
|
---|
| 42 |
|
---|
[422] | 43 | void RefleshParameterAndReturnType();
|
---|
| 44 |
|
---|
[322] | 45 | virtual const std::string &GetKeyName() const
|
---|
| 46 | {
|
---|
| 47 | return GetName();
|
---|
| 48 | }
|
---|
[339] | 49 |
|
---|
| 50 | const Parameters &GetDynamicParams() const
|
---|
| 51 | {
|
---|
| 52 | return dynamicParams;
|
---|
| 53 | }
|
---|
[322] | 54 | };
|
---|
| 55 |
|
---|
| 56 | class Delegates : public Jenga::Common::Hashmap<Delegate>
|
---|
| 57 | {
|
---|
| 58 | public:
|
---|
| 59 | void Collect( const BasicSource &source );
|
---|
| 60 | void GenerateSourceCode( std::string &destSource );
|
---|
[422] | 61 | void RefleshParameterAndReturnType();
|
---|
[322] | 62 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.