hi,
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
DsObject *obj = get_ds_object_ref ("Junk"); // get reference to the object
int i = obj->value; // obj is read locked and the value is copied to i variable
obj->value = i; // obj is write locked and i is copied to the field "value"
In the operator overload function is there a way to know whether the object is being read or written ? suggestions are welcome.