|
Last change
on this file since 438 was 422, checked in by dai_9181, 18 years ago |
|
デリゲートのパラメータや戻り値にクラス型を指定できない不具合を修正。
|
|
File size:
1.4 KB
|
| Line | |
|---|
| 1 | #pragma once
|
|---|
| 2 |
|
|---|
| 3 | #include <Hashmap.h>
|
|---|
| 4 | #include <Procedure.h>
|
|---|
| 5 |
|
|---|
| 6 | class Delegates;
|
|---|
| 7 |
|
|---|
| 8 | class Delegate
|
|---|
| 9 | : public Procedure
|
|---|
| 10 | , public Jenga::Common::ObjectInHashmap<Delegate>
|
|---|
| 11 | {
|
|---|
| 12 | friend Delegates;
|
|---|
| 13 |
|
|---|
| 14 | std::string paramStr;
|
|---|
| 15 | std::string returnTypeName;
|
|---|
| 16 | int sourceIndex;
|
|---|
| 17 |
|
|---|
| 18 | Parameters dynamicParams;
|
|---|
| 19 |
|
|---|
| 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 |
|
|---|
| 31 | public:
|
|---|
| 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 | }
|
|---|
| 39 | Delegate()
|
|---|
| 40 | {
|
|---|
| 41 | }
|
|---|
| 42 |
|
|---|
| 43 | void RefleshParameterAndReturnType();
|
|---|
| 44 |
|
|---|
| 45 | virtual const std::string &GetKeyName() const
|
|---|
| 46 | {
|
|---|
| 47 | return GetName();
|
|---|
| 48 | }
|
|---|
| 49 |
|
|---|
| 50 | const Parameters &GetDynamicParams() const
|
|---|
| 51 | {
|
|---|
| 52 | return dynamicParams;
|
|---|
| 53 | }
|
|---|
| 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 );
|
|---|
| 61 | void RefleshParameterAndReturnType();
|
|---|
| 62 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.