aboutsummaryrefslogtreecommitdiffstats
path: root/Types.h
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-11-24 20:23:58 +0800
committerChristian <c@ethdev.com>2014-11-24 20:24:03 +0800
commit6e6b85b58a478a7e2bc0f8bee976df97f9861b91 (patch)
tree19902870438bb0cdb76e161bd5f26319676c4600 /Types.h
parent5d75263ff15aadfcacd35334cbab396cce65d260 (diff)
downloaddexon-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.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/Types.h b/Types.h
index a8caf715..2dd4af64 100644
--- a/Types.h
+++ b/Types.h
@@ -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;
+};
+
}
}