Telosys version : 4.3.0
To define C++ as the target language call #set( $env.language = 'C++' ) in the templates files.
The information below shows the behavior of the generator when 'C++' is the current target language.
| Model type | Default | @UnsignedType | @NotNull | @PrimitiveType | @ObjectType |
|---|---|---|---|---|---|
| string | std::string | std::string | std::string | std::string | std::string |
| byte | char | unsigned char | char | char | char |
| short | short | unsigned short | short | short | short |
| int | int | unsigned int | int | int | int |
| long | long | unsigned long | long | long | long |
| decimal | double | double | double | double | double |
| float | float | float | float | float | float |
| double | double | double | double | double | double |
| boolean | bool | bool | bool | bool | bool |
| date | std::chrono::year_month_day | std::chrono::year_month_day | std::chrono::year_month_day | std::chrono::year_month_day | std::chrono::year_month_day |
| time | std::chrono::hh_mm_ss | std::chrono::hh_mm_ss | std::chrono::hh_mm_ss | std::chrono::hh_mm_ss | std::chrono::hh_mm_ss |
| timetz | std::chrono::hh_mm_ss | std::chrono::hh_mm_ss | std::chrono::hh_mm_ss | std::chrono::hh_mm_ss | std::chrono::hh_mm_ss |
| datetime | std::chrono::local_time | std::chrono::local_time | std::chrono::local_time | std::chrono::local_time | std::chrono::local_time |
| datetimetz | std::chrono::zoned_time | std::chrono::zoned_time | std::chrono::zoned_time | std::chrono::zoned_time | std::chrono::zoned_time |
| timestamp | std::chrono::local_time | std::chrono::local_time | std::chrono::local_time | std::chrono::local_time | std::chrono::local_time |
| uuid | std::string | std::string | std::string | std::string | std::string |
| binary | std::vector | std::vector | std::vector | std::vector | std::vector |
'@UnsignedType' has effect only for char, short, int, long
'@NotNull' has no effect
'@PrimitiveType' has no effect
'@ObjectType' has no effect
| TRUE | true |
| FALSE | false |
| NULL | nullptr |
| Model type | Language type | Language full type | Language literal value example |
|---|---|---|---|
| string | std::string | std::string | "AAA" |
| byte | char | char | 1 |
| byte | unsigned char | unsigned char | 1 |
| short | short | short | 1 |
| short | unsigned short | unsigned short | 1 |
| int | int | int | 100 |
| int | unsigned int | unsigned int | 100 |
| long | long | long | 1000L |
| long | unsigned long | unsigned long | 1000L |
| decimal | double | double | 10000.77 |
| float | float | float | 1000.5f |
| double | double | double | 1000.66 |
| boolean | bool | bool | true |
| date | std::chrono::year_month_day | std::chrono::year_month_day | nullptr |
| time | std::chrono::hh_mm_ss | std::chrono::hh_mm_ss | nullptr |
| timetz | std::chrono::hh_mm_ss | std::chrono::hh_mm_ss | nullptr |
| datetime | std::chrono::local_time | std::chrono::local_time | nullptr |
| datetimetz | std::chrono::zoned_time | std::chrono::zoned_time | nullptr |
| timestamp | std::chrono::local_time | std::chrono::local_time | nullptr |
| uuid | std::string | std::string | "2b5c5638-b675-4981-9396-b9d2dfcc3a44" |
| binary | std::vector | std::vector | nullptr |