Narrow width layout Medium width layout Full-screen width layout    Small text Medium text Large text    Color Palette Selector      Search
Register  |  
Forum policy    

These Discussion Forums are dedicated to discussions on Sophis products. Some are private, you shall be connected to see their content.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to Sophis products.
2. No Flaming or Trolling.
3. No Profanity, Racism, or Prejudice.
4. Publishing information for insider trades or other illegal trading is forbidden and will be reported,
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

Private messaging between users is enable. If you already put a message on forums, a registered user can send you a private message by clicking on the username link, and thus on the "Message User" link on the "Private Messaging" row. The messages can be read by clicking on the Inbox button of the toolbar.

 
Forums    
 
  Forum  Development  Enhancements  CSRScenario::Simulation
Previous Previous
 
Next Disabled
New Post 12/21/2007 11:03 AM
  Philippe Bonneau
254 posts
www.ebsys.fr
1st Level Poster


CSRScenario::Simulation 

Hi,

This method is called by Sophis Risque when launching a scenario. It could be fine to have it as virtual, this is not the case actually. For instance, on the resource ITQReplaceScenario, we have to set protected members in the Initialise method. These members are normally set in the Simulation method. 

On VS 2005, and so with the Sophis Risque v5.3 toolkit, setting protected members of the parent class in a derived class is now forbidden, as specified on the Microsoft website there - it means that ITQReplaceScenario is actually deprecated - .

Rgds,
Philippe

 
New Post 12/21/2007 2:32 PM
  Philippe Bonneau
254 posts
www.ebsys.fr
1st Level Poster


Re: CSRScenario::Simulation 
Modified By Philippe Bonneau  on 12/27/2007 8:08:54 AM)

Concerning the setting of protected members on VS 2005, a workaround can be found by using directly the memory address , like that:

#define SET_HACKING_MEMBER(object,className,memberType,memberName) \
 { \
  ##className* _object = dynamic_cast<##className*>(##object); \
  ##className* _source = dynamic_cast<##className*>(this); \
  long _offset = ((long)&##memberName) - ((long)_source); \
  ##memberType* _destination = (##memberType*)((long)_object + _offset);\
  *_destination = ##memberName;\
 }

Of course, this manner runs only on x32 architecture.

 
Previous Previous
 
Next Disabled
  Forum  Development  Enhancements  CSRScenario::Simulation
 Syndicate  

Copyright 2007-2008 by Ebsys  | Terms Of Use | Privacy Statement  | Skin by Speerio