Hi Dmitri, I've now made most functions in the class virtual. However, most should work without having to derive a special class. You just should be able to use TEnv like it is: TEnv *e = new TEnv("/my/path/.myenvrc"); e->Print(); e->SetValue("bla", "-1") e->SaveLevel(kEnvLocal) I don't see any problem with using -1 as value. It works for me. Cheers, Fons. Dmitri Litvintsev wrote: > > Dear Rooters, > > I've been developing ROOT application and want read/save > application specific resources from/to a file which is not > located in $(ROOTSYS) and called differently. > > e.g. > > default file for all users to fetch at start up: > ${OUR_PROJECT}/${MY_APPLICATION}/.myenvrc > > if user modified and saved some applicaion specific resources > it should go to his ${HOME}/.myenvrc > > I see that there is a class TEnv which probably does this for the > ROOT. > > I thought of using TEnv class. > > And overide a couple of relevant methods. The trouble is > that: > Save() > SaveLevel() > SetValue() > > are not virtual. May I ask to make all methods of this class > virtual? > > regards, > Dmitri Litvintsev > > /----------------------------------------------------------\ > | Tel: (630) 840 5005 | > | FAX: (630) 840 2968 | > | office: 169-E CDF Trailers | > | E-mail: litvinse@fnal.gov | > \----------------------------------------------------------/ -- Org: CERN, European Laboratory for Particle Physics. Mail: 1211 Geneve 23, Switzerland E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248 WWW: http://root.cern.ch/~rdm/ Fax: +41 22 7677910
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:22 MET