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

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



Hi,
I made now all constructors public. You can now use them but you are
responsible for cleaning up additional instances of Global.

The static global_ member of Global is just the first instance and is
not used internally.


Michele


pikaiyuan wrote:
> pikaiyuan,hello!
> 
> 	There only has definition of your copy constructor,where
> is your implementation?
>     And the private global is a static pointer,even if you define the
> copy constructor, a static pointer means that it is single in the memory.
> 
> ======= 2004-05-20 17:45:31 has been wrote:=======
> 
> 
>>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
>>
>>
>>.
> 
> 
> = = = = = = = = = = = = = = = = = = = =
> 			
> 
>      
>  
> 				 
> pikaiyuan
> pikaiyuan at 163.com
> 2004-05-26
> 
> 
> 
> 


-- 
Michele Laghi
mailto:laghi at swissinfo.org
tel. +46 8 7492952 / mob. +46 70 4103964
http://eclettic.tripod.com
http://www.xmlBlaster.org