title: overloading dereference operator
body: <p>I am new to C++ and i have a question on overloading dereference operator. I am building a in memory object store which is to be used by the applications. The data store is mapped in to the applications memory space and applications can directly read/modify the object using dereference operator . I plan to provide an interface described below </p>
  
  <pre><code>       DsObject *obj = get_ds_object_ref ("Junk"); // get reference to the object
         int  i = obj-&gt;value; // obj is read locked and the value is copied to i variable
         obj-&gt;value = i; // obj is write locked and i is copied to the field "value"
  </code></pre>
  
  <p>In the operator overload function is there a way to know whether the object is being read or written ? suggestions are welcome.</p>