Conditionally selecting Target or Simulation transition code

Category |  Purpose |  Intended Audience |  Applicable to |  Description |  Limitations |  See also


Category:

Top

C++


Purpose:

Top

Because of difference in SimulationRTS and TargetRTS implementations, user code may need a different implementation for each. The compiler directive __RTSInternal__ lets the user code distinguish between the RTS's.


Intended Audience:

Top

C++ Developers


Applicable to:

Top

All Versions


Description:

Top

Is there a compilation flag which we can use in our user (e.g., transition) code to differentiate between SimulationRTS and TargetRTS compiles?

Yes, if the flag __RTSInternal__ is defined then it is a compilaton for the SimulationRTS, otherwise it is a target compile.

For example:

  #ifdef __RTSInternal__
    //SimulationRTS
  #else
    //TargetRTS
  #endif

See page 91 of the 4.3 C++ guide, or page 360 of the 5.0 C++ guide for details on using __RTSInternal__.


Limitations:

Top

None


See also:

Top

C++ guide (ObjecTime4.3 pg 91, ObjecTime5.0 pg 360)


 

Copyright © 1999, ObjecTime Limited.