diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-01-27 19:37:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-27 19:37:56 +0800 |
commit | 1774e087c7a3a64d6a0f2f45b4af3926d6d286c4 (patch) | |
tree | 55f18269b78cb12ef7cce34ad4599e4471fdee41 /libsolidity/interface/InterfaceHandler.h | |
parent | ff8008cdf714a2a2e0f4ff9095158d4ef6a33cbb (diff) | |
parent | a9c6ff4ac8c271aaada1965894b34933b662c044 (diff) | |
download | dexon-solidity-1774e087c7a3a64d6a0f2f45b4af3926d6d286c4.tar dexon-solidity-1774e087c7a3a64d6a0f2f45b4af3926d6d286c4.tar.gz dexon-solidity-1774e087c7a3a64d6a0f2f45b4af3926d6d286c4.tar.bz2 dexon-solidity-1774e087c7a3a64d6a0f2f45b4af3926d6d286c4.tar.lz dexon-solidity-1774e087c7a3a64d6a0f2f45b4af3926d6d286c4.tar.xz dexon-solidity-1774e087c7a3a64d6a0f2f45b4af3926d6d286c4.tar.zst dexon-solidity-1774e087c7a3a64d6a0f2f45b4af3926d6d286c4.zip |
Merge pull request #1613 from ethereum/refactorJson
Refactor json return type generation.
Diffstat (limited to 'libsolidity/interface/InterfaceHandler.h')
-rw-r--r-- | libsolidity/interface/InterfaceHandler.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libsolidity/interface/InterfaceHandler.h b/libsolidity/interface/InterfaceHandler.h index b7e1bb00..56927d44 100644 --- a/libsolidity/interface/InterfaceHandler.h +++ b/libsolidity/interface/InterfaceHandler.h @@ -37,6 +37,8 @@ namespace solidity // Forward declarations class ContractDefinition; +class Type; +using TypePointer = std::shared_ptr<Type const>; struct DocTag; enum class DocumentationType: uint8_t; @@ -84,6 +86,14 @@ public: static Json::Value devDocumentation(ContractDefinition const& _contractDef); private: + /// @returns a json value suitable for a list of types in function input or output + /// parameters or other places. If @a _forLibrary is true, complex types are referenced + /// by name, otherwise they are anonymously expanded. + static Json::Value formatTypeList( + std::vector<std::string> const& _names, + std::vector<TypePointer> const& _types, + bool _forLibrary + ); /// @returns concatenation of all content under the given tag name. static std::string extractDoc(std::multimap<std::string, DocTag> const& _tags, std::string const& _name); }; |