|
|
Re: add C++ #include <> headers to state model in Papyrus [message #1746293 is a reply to message #1746292] |
Wed, 26 October 2016 14:03 |
|
Hi Fariba,
There are two ways to do that with Papyrus SW designer.
(1) Use the C/C++ stereotype "Include". This has an attribute for body and header where you can explicitly add your #include (or other C++ statements).
(2) Declare a package called math (or similar) and apply the "ExternLibrary" stereotype. This stereotype has an attribute denoting the required includes. You can now declare a dependency from your class to this package or classes contained in that package. The latter is useful, if the header file defines several types that can be referenced by the user classes. For instance, in case of the pthread.h, a pre-defined designer model library defines the classes pthread, pthread_cond_t and pthread_mutex_t within a package called pthread.
In general, the 2nd approach is preferable, if some functions are frequently used.
Btw. are you using your own state-machine code generation or the state-machine code generation provided by Papyrus SW designer?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03797 seconds