ITK Function Reference

(V10000.1.0.60_20160308.00)
nr.h
Go to the documentation of this file.
1 /*==============================================================================
2  Copyright (c) 2003-2005 UGS Corporation
3  Unpublished - All Rights Reserved
4  ==============================================================================*/
5 
6 /* */
7 
8 #ifndef NR_H
9 #define NR_H
10 
11 #include <tc/tc_startup.h>
12 #include <fclasses/tc_stdio.h>
13 #include <fclasses/tc_stdlib.h>
14 #include <tccore/workspaceobject.h>
15 #include <property/libproperty_exports.h>
16 
40 #define NR_CASE_MIXED 0
41 #define NR_CASE_LOWER 1
42 #define NR_CASE_UPPER 2
43 
44 #ifdef __cplusplus
45  extern "C"{
46 #endif
47 
51 extern PROPERTY_API int NR_rule_extent(
52  int* n_tags,
53  tag_t** rule_tags
54  );
55 
59 extern PROPERTY_API int NR_find(
60  char* rule_name,
61  tag_t* rule_tag
62  );
63 
67 extern PROPERTY_API int NR_field_extent(
68  int* n_tags,
69  tag_t** field_tags
70  );
71 
79 extern PROPERTY_API int NR_rule_desc(
80  tag_t rule_tag,
81  char rule_name[WSO_name_size_c + 1],
82  int* n_patterns,
83  char*** patterns,
84  logical* autogen,
87  int* n_counters,
88  tag_t** counter_tags
89  );
90 
91 
96 extern PROPERTY_API int NR_rule_desc2(
97  tag_t rule_tag,
98  char **rule_name,
99  int* n_patterns,
100  char*** patterns,
101  logical* autogen,
104  int* n_counters,
105  tag_t** counter_tags
106  );
107 
112 extern PROPERTY_API int NR_ask_counter_values(
113  tag_t counter_tag,
114  char** counter_name,
115  int* no_of_chars,
116  int* start_pos,
117  char** char_type,
118  char** start_value,
119  char** max_value,
120  char** next_id
121  );
122 
126 extern PROPERTY_API int NR_field_desc(
127  tag_t field_tag,
128  char** type_name,
129  char** property_name,
130  tag_t* rule_tag,
131  int* field_case
133  );
134 
138 extern PROPERTY_API int NR_ask_rule_and_case(
139  char* type_name,
140  char* property_name,
141  tag_t* rule_tag,
142  int* field_case
144  );
145 
162 extern PROPERTY_API int NR_next_item_id(
163  const char* type_name,
164  char** next_id
165  );
166 
174 extern PROPERTY_API int NR_next_rev_id(
175  const char* type_name,
176  tag_t item_tag,
177  char** next_id
178  );
179 
184 extern PROPERTY_API int NR_next_rev_id_from_alt_rule(
185  const char* type_name,
186  const char* rule_suffix,
187  tag_t item_tag,
188  const char* base_rev_id,
189  char** next_id
190  );
191 
196 extern PROPERTY_API int NR_next_alt_id(
197  const char* preferred_type_name,
198  const char* default_type_name,
199  tag_t parent_tag,
200  char** next_id
201  );
202 
210 extern PROPERTY_API int NR_next_dataset_id(
211  const char* ds_type,
212  char** next_id
213  );
214 
222 extern PROPERTY_API int NR_next_dataset_rev_id(
223  const char* ds_type,
224  const char* ds_id,
225  char** next_id
226  );
227 
235 extern PROPERTY_API int NR_validate_field(
236  const char* type_name,
237  const char* property_name,
238  char* field_value
240  );
241 
246 extern PROPERTY_API logical NR_match_revid_altrule(
247  const char* type_name,
248  const char* revid,
249  const char* suffixrule
250  );
251 
252 extern PROPERTY_API int NR_is_name_matching_pattern(
253  const char *pattern, /* <I> */
254  const char *string, /* <I> */
255  logical *is_matched /* <O> */
256  );
257 
281 extern PROPERTY_API int NR_next_value(
282  const char* typeName,
283  const char* propertyName,
284  const tag_t itemTag,
285  const char* dsId,
286  const char* preferredTypeName,
287  const char* defaultTypeName,
288  const tag_t parentTag,
289  const char* ruleSuffix,
290  const char* baseRevId,
291  char** nextId
292  );
293 
313 extern PROPERTY_API int NR_next_values(
314  const char* typeName,
315  int quantity,
316  const char* propertyName,
317  const tag_t itemTag,
318  const char* dsId,
319  const char* preferredTypeName,
320  const char* defaultTypeName,
321  const tag_t parentTag,
322  const char* ruleSuffix,
323  const char* baseRevId,
324  char*** nextId,
325  logical* isNRWithoutAutogen
326  );
327 
352 extern PROPERTY_API int NR_next_value2(
353  const char* typeName,
354  const char* propertyName,
355  const tag_t itemTag,
356  const char* dsId,
357  const char* preferredTypeName,
358  const char* defaultTypeName,
359  const tag_t parentTag,
360  const char* ruleSuffix,
361  const char* baseRevId,
362  char** nextId,
363  logical* isNRWithoutAutogen
364  );
365 
379 extern PROPERTY_API int NR_pattern_next_value(
380  const char* typeName,
381  const char* propertyName,
382  const tag_t itemTag,
383  const char* dsId,
384  const char* preferredTypeName,
385  const char* defaultTypeName,
386  const tag_t parentTag,
387  const char* ruleSuffix,
388  const char* baseRevId,
389  const char* pattern,
390  char** nextId
391  );
392 
406 extern PROPERTY_API int NR_pattern_next_values(
407  const char* typeName,
408  int quantity,
409  const char* propertyName,
410  const tag_t itemTag,
411  const char* dsId,
412  const char* preferredTypeName,
413  const char* defaultTypeName,
414  const tag_t parentTag,
415  const char* ruleSuffix,
416  const char* baseRevId,
417  const char* pattern,
418  char*** nextIds
419  );
420 
430 extern PROPERTY_API int NR_rule_desc_with_counters(
431  tag_t rule_tag,
432  char rule_name[WSO_name_size_c + 1],
433  int *n_patterns,
434  char ***patterns,
435  logical **autogen,
436  int **n_counters,
437  tag_t ***counter_tags
438  );
439 
440 
444 extern PROPERTY_API int NR_rule_desc_with_counters2(
445  tag_t rule_tag,
446  char **rule_name,
447  int *n_patterns,
448  char ***patterns,
449  logical **autogen,
450  int **n_counters,
451  tag_t ***counter_tags
452  );
453 
454 
458 extern PROPERTY_API int NR_ask_counter_details (
459  tag_t counter_tag,
460  char** counter_name,
461  int* no_of_chars,
462  int* start_pos,
463  char** char_type,
464  char** start_value,
465  char** max_value
466  );
467 
474 extern PROPERTY_API int NR_revision_naming_rule_desc(
475  tag_t rule_tag,
476  char rule_name[WSO_name_size_c + 1],
477  logical* exclude_skip_letters,
478  int* init_rev_type,
479  char** init_rev_start,
480  char** init_rev_desc,
481  int* sec_rev_type,
482  char** sec_rev_start,
483  char** sec_rev_desc,
484  int* suppl_rev_format,
485  char** suppl_rev_desc
486  );
487 
488 
492 extern PROPERTY_API int NR_revision_naming_rule_desc2(
493  tag_t rule_tag,
494  char **rule_name,
495  logical* exclude_skip_letters,
496  int* init_rev_type,
497  char** init_rev_start,
498  char** init_rev_desc,
499  int* sec_rev_type,
500  char** sec_rev_start,
501  char** sec_rev_desc,
502  int* suppl_rev_format,
503  char** suppl_rev_desc
504  );
505 
509 extern PROPERTY_API int NR_revision_naming_rule_extent(
510  int* n_tags,
511  tag_t** rule_tags
512  );
513 
517 extern PROPERTY_API int NR_find_revision_naming_rule(
518  char* rule_name,
519  tag_t* rule_tag
520  );
521 
525 extern PROPERTY_API int NR_revision_naming_rule_attach_extent(
526  int* n_tags,
527  tag_t** field_tags
528  );
529 
533 extern PROPERTY_API int NR_revision_name_rule_attach_desc(
534  tag_t attach_tag,
535  char** type_name,
536  tag_t* rule_tag,
537  int* field_case
539  );
543 extern PROPERTY_API int NR_ask_revision_naming_rule_and_case(
544  char* type_name,
545  tag_t* rule_tag,
546  int* field_case
549  );
553 extern PROPERTY_API int NR_next_rev_options (
554  char* item_type,
555  tag_t item_rev,
556  char** init_rev_option,
557  char** sec_rev_option,
558  char** suppl_rev_option
559  );
560 /*
561  Get the revNameRuleAttachTag if the type name is specified
562  */
563 extern PROPERTY_API int NR_get_rev_rule_attach (
564  const char* type_name,
565  tag_t* revNameRuleAttachTag
566  );
567 /*
568  Function to validate the revision id if a Revision Name Rule is attached to the property "item_revision_id"*/
569 extern PROPERTY_API int NR_validate_rev_id_field(
570  const char* type_name, /* (I) The Item Type that the rule applies to */
571  const char* property_name, /* (I) Property name, i.e. "item_id", "item_revision_id", "object_name"*/
572  char* field_value, /* (I) The field to be tested and, if the case is wrong,
573  converted to the rules field_case specification. */
574  const char* item_id /* (I) The item_id of the current item*/
575  );
576 
577 /*
578  This ITK function is used to validate the revision id of a new Item Revision that is going to be created
579  if a Revision Name Rule is attached to the property "item_revision_id" of the Item Revision type
580 */
581 extern PROPERTY_API int NR_validate_rev_id_field2(
582  const char* type_name, /* (I) The Item Type that the rule applies to */
583  const char* property_name, /* (I) Property name, i.e. "item_id", "item_revision_id", "object_name"*/
584  char* field_value, /* (I) The field to be tested and, if the case is wrong,
585  converted to the rules field_case specification. */
586  const tag_t item_tag /* (I) The tag of the current item*/
587  );
588 
593 #ifdef __cplusplus
594 }
595 #endif
596 
597 #include <property/libproperty_undef.h>
598 
599 #endif