heres the situation im in.
_im given an object.
_i know that it is an instance of one of a number of classes i have at hand.
_i need to extract all of the attributes and write them to a file like:
...
attr#32=1
attr#33="hello"
...
_i do this because i need to recreate that object some where else. in my system an object equals an other object if they instanciate the same class and contain the same values.
heres what ive done:
_i check to find which class does this object instanciate.
_according to that i pass it to a predefined method that extracts all of the attributes of the objects of that class and saves them.
heres whats wrong with my solution:
_i am limited to a number of classes.
_if i want to do the same thing for the objects of a new class i will have to modify my source code and add a method for them.
heres what i need.
_a universal method that enables me to have access to any known or unknown object i have.
_or what ever other solution you guys can think of.
This post has been edited by jowharshamshiri: 10 January 2008 - 05:19 AM

New Topic/Question
Reply




MultiQuote







|