[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: [xmlblaster] i got a question about Global in cpp client



Michele Laghi,hello!

	I had checked Global.h from cvs. I wrote like these:
	  Global& globTMP = Global::getInstance();
	  Global& glob=globTMP;
      glob.initialize(args_1, argv_1);

	  Global& glob1=globTMP;
      glob1.initialize(args_2, argv_2);
And runtime error is:
      WARN  Global ::initialize: the global is already initialized. 
      Ignoring this initialization
    
    please give me more advise.

======= 2004-05-19 16:49:51 has been wrote:=======

>Hi,
>I made the Global copy constructor public (the code is on the cvs). Note
>that you are responsible for the management of the "copy" Global. You
>must ensure in your code to delete this "copy" Global before the
>mananged Global (i.e. the one which you get with getInstance).
>
>Saluti
>Michele
>
>
>pikaiyuan wrote:
>> Hi,everybody
>> 
>> 	There has a getClone() method in Global.java to get a deep copy of
>> the global instance,but there miss in cpp code.
>> 
>>     I want to get a deep copy of the global object in my cpp client,but
>> the Global in cpp client is singleton instance, and changing the singleton
>> model looks like unwise, can you me any suggestion?
>> 
>> 
>> regards
>> 			   pikaiyuan
>> 			   2004-05-17	   
>> 
>> 
>
>
>-- 
>Michele Laghi
>mailto:laghi at swissinfo.org
>tel. +46 8 7492952 / mob. +46 70 4103964
>http://eclettic.tripod.com
>http://www.xmlBlaster.org
>
>.

= = = = = = = = = = = = = = = = = = = =
			

     
 
				 
pikaiyuan
pikaiyuan at 163.com
2004-05-20