The code snippet for this question is from the Persistance API section of the WIKI documentation for EOS. The link to this page is here...
https://github.com/EOSIO/eos/wiki/Persistence-API
In the following code snippet, it looks like the class template (or template class) is being typedef'd as service_table_type. Then a whole bunch of custom types are passed within the angle brackets of the class template and there seems to be nothing new there apart from the complexity (if i understood it correctly).
using service_table_type = multi_index<service, service_rec,
indexed_by< N(bycustomer), const_mem_fun<service_rec, account_name,
&service_rec::get_customer>>>;
My question is regarding the below line line of code that follows the above code snippet. what is going on here? it looks like a call to the function service_table() which returns a parameter of type service_table_type. From where did this function come from? If this function came from a library, how would it return the value of type service_table_type which we arbitrarily created?
service_table_type service_table( current_receiver(), mechanic );
could you provide me a stripped down generic code example of what's going on here?
Thank you kindly!