diff options
author | Christian <c@ethdev.com> | 2015-02-10 21:57:01 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-02-12 18:33:09 +0800 |
commit | 79aec95228f5c766daaa9d04a3800be99ded8015 (patch) | |
tree | d1b36cff889710ea9d895722a28d6aeb67fe3761 /Types.h | |
parent | 20b4c6900982302fd07df12e2a1f6f0e15886834 (diff) | |
download | dexon-solidity-79aec95228f5c766daaa9d04a3800be99ded8015.tar.gz dexon-solidity-79aec95228f5c766daaa9d04a3800be99ded8015.tar.zst dexon-solidity-79aec95228f5c766daaa9d04a3800be99ded8015.zip |
Simple copy of bytes to storage.
Diffstat (limited to 'Types.h')
-rw-r--r-- | Types.h | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -285,13 +285,20 @@ public: enum class Location { Storage, CallData, Memory }; virtual Category getCategory() const override { return Category::ByteArray; } - ByteArrayType(Location _location, u256 const& _offset, u256 const& _length, bool _dynamicLength): + explicit ByteArrayType(Location _location, u256 const& _offset = 0, u256 const& _length = 0, + bool _dynamicLength = false): m_location(_location), m_offset(_offset), m_length(_length), m_dynamicLength(_dynamicLength) {} virtual bool isImplicitlyConvertibleTo(Type const& _convertTo) const override; + virtual TypePointer unaryOperatorResult(Token::Value _operator) const override; virtual bool operator==(const Type& _other) const override; - virtual unsigned getSizeOnStack() const override { return 1; /* TODO */ } + virtual unsigned getSizeOnStack() const override; virtual std::string toString() const override { return "bytes"; } + Location getLocation() const { return m_location; } + u256 const& getOffset() const { return m_offset; } + u256 const& getLength() const { return m_length; } + bool hasDynamicLength() const { return m_dynamicLength; } + private: Location m_location; u256 m_offset; |