Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Update multi_index.hpp example documentation #6520

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions contracts/eosiolib/multi_index.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -632,13 +632,16 @@ class multi_index
* EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state) )
* };
* public:
* addressbook(account_name self):contract(self) {}
* typedef eosio::multi_index< N(address), address > address_index;
* typedef name account_name;
* addressbook(account_name self, account_name code,
* datastream<const char*> ds)
* : contract(self, code, ds) {}
* typedef eosio::multi_index< name("address"), address > address_index;
* void myaction() {
* address_index addresses(_self, _self); // code, scope
* address_index addresses(_code, _code.value); // code, scope
* }
* }
* EOSIO_ABI( addressbook, (myaction) )
* }
* EOSIO_DISPATCH( addressbook, (myaction) )
* @endcode
*/
multi_index( uint64_t code, uint64_t scope )
Expand Down