diff options
author | Christian <c@ethdev.com> | 2014-12-12 23:49:26 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-12-15 20:05:18 +0800 |
commit | 2f64c56ef3a49f7551a708f63c4ed836efce7b73 (patch) | |
tree | 6dd2a10b9ef7b0a67206991416dd0a74639f66ea /Types.h | |
parent | c8586996059c3d2ae3c7025c2d4247073468ed73 (diff) | |
download | dexon-solidity-2f64c56ef3a49f7551a708f63c4ed836efce7b73.tar.gz dexon-solidity-2f64c56ef3a49f7551a708f63c4ed836efce7b73.tar.zst dexon-solidity-2f64c56ef3a49f7551a708f63c4ed836efce7b73.zip |
Create contracts.
Diffstat (limited to 'Types.h')
-rw-r--r-- | Types.h | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -39,6 +39,7 @@ namespace solidity // @todo realMxN, dynamic strings, text, arrays class Type; // forward +class FunctionType; // forward using TypePointer = std::shared_ptr<Type const>; using TypePointers = std::vector<TypePointer>; @@ -249,10 +250,16 @@ public: virtual MemberList const& getMembers() const override; + /// Returns the function type of the constructor. Note that the location part of the function type + /// is not used, as this type cannot be the type of a variable or expression. + std::shared_ptr<FunctionType const> const& getConstructorType() const; + unsigned getFunctionIndex(std::string const& _functionName) const; private: ContractDefinition const& m_contract; + /// Type of the constructor, @see getConstructorType. Lazily initialized. + mutable std::shared_ptr<FunctionType const> m_constructorType; /// List of member types, will be lazy-initialized because of recursive references. mutable std::unique_ptr<MemberList> m_members; }; @@ -339,8 +346,8 @@ public: virtual std::string toString() const override; virtual bool canLiveOutsideStorage() const override { return false; } - TypePointer getKeyType() const { return m_keyType; } - TypePointer getValueType() const { return m_valueType; } + TypePointer const& getKeyType() const { return m_keyType; } + TypePointer const& getValueType() const { return m_valueType; } private: TypePointer m_keyType; |