code:new_target_type
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
code:new_target_type [2009/01/26 22:39] – created pkubanek | code:new_target_type [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 4: | Line 4: | ||
If you would like to introduce a new target type, you must: | If you would like to introduce a new target type, you must: | ||
- | - introduce its type identifier among types listed in //types// table. This table contains character identifiing type and short type description. | + | |
- | + | - add its description to src/ | |
- | - add its description to src/ | + | - create table which will hold target extended parameters. This table must include reference to tar_id from targets as primary key. |
- | + | - create its class as subclass of Target class in src/utils directory. You might choose to create a new file with this subclass, or add its definition to existing file. It is recommended to start a new file. You must add this file to src/ | |
- | - create table which will hold target extended parameters. This table must include reference to tar_id from targets as primary key. | + | - in subclass load method, you can add any additional select statements which will load from database additional fields. For an example, look to rts2targetgrb.ec for ::load method implementation. You can of course use any ECPG statements. Please consult ECPG documentation for details. |
- | + | - add this target type to //Target *createTarget (int _tar_id, struct ln_lnlat_posn *_obs)// in // | |
- | - create its class as subclass of Target class in src/utils directory. You might choose to create a new file with this subclass, or add its definition to existing file. It is recommended to start a new file. You must add this file to src/ | + | |
- | + | ||
- | - in subclass load method, you can add any additional select statements which will load from database additional fields. For an example, look to rts2targetgrb.ec for ::load method implementation. You can of course use any ECPG statements. Please consult ECPG documentation for details. | + | |
- | + | ||
- | - add this target type to //Target *createTarget (int _tar_id, struct ln_lnlat_posn *_obs)// in // | + | |
There is an example. Lets suppose we would like to add target for observing | There is an example. Lets suppose we would like to add target for observing | ||
Line 198: | Line 193: | ||
} | } | ||
</ | </ | ||
- |
code/new_target_type.1233005974.txt.gz · Last modified: 2009/01/26 00:00 (external edit)