diff options
author | Christian <c@ethdev.com> | 2014-11-24 20:23:58 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-11-24 20:24:03 +0800 |
commit | 6e6b85b58a478a7e2bc0f8bee976df97f9861b91 (patch) | |
tree | 19902870438bb0cdb76e161bd5f26319676c4600 /Types.h | |
parent | 5d75263ff15aadfcacd35334cbab396cce65d260 (diff) | |
download | dexon-solidity-6e6b85b58a478a7e2bc0f8bee976df97f9861b91.tar dexon-solidity-6e6b85b58a478a7e2bc0f8bee976df97f9861b91.tar.gz dexon-solidity-6e6b85b58a478a7e2bc0f8bee976df97f9861b91.tar.bz2 dexon-solidity-6e6b85b58a478a7e2bc0f8bee976df97f9861b91.tar.lz dexon-solidity-6e6b85b58a478a7e2bc0f8bee976df97f9861b91.tar.xz dexon-solidity-6e6b85b58a478a7e2bc0f8bee976df97f9861b91.tar.zst dexon-solidity-6e6b85b58a478a7e2bc0f8bee976df97f9861b91.zip |
Access to blockchain data.
Diffstat (limited to 'Types.h')
-rw-r--r-- | Types.h | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -327,5 +327,29 @@ private: }; +/** + * Special type for magic variables (block, msg, tx), similar to a struct but without any reference + * (it always references a global singleton by name). + */ +class MagicType: public Type +{ +public: + enum class Kind { BLOCK, MSG, TX }; //@todo should be unified with MagicVariableDeclaration::VariableKind; + virtual Category getCategory() const override { return Category::MAGIC; } + + MagicType(Kind _kind); + virtual bool operator==(Type const& _other) const; + virtual bool canBeStored() const override { return false; } + virtual bool canLiveOutsideStorage() const override { return true; } + virtual MemberList const& getMembers() const override { return m_members; } + + virtual std::string toString() const override; + +private: + Kind m_kind; + + MemberList m_members; +}; + } } |