UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
AdjInfo.h
1 /* AdjInfo.h */
2 /* $Id: AdjInfo.h,v 1.5 2003/04/01 13:56:49 vlad Exp $ */
3 #ifndef __AdjInfo_h
4 #define __AdjInfo_h
5 
6 #include <ldb/vsp_trace.h>
7 #include <tv/VisualTS.h>
8 
9 
10 /* Filename for storing stamp information list */
11 #define ADJINFO_STAMP_FILENAME "stamp.thi"
12 
13 /* Filename for storing hint information list */
14 #define ADJINFO_HINT_FILENAME "hint.thi"
15 
16 
17 /***********************************************************************
18  * Adjustable information id. TraceAttrId + additional identifiers.
19  * Use TA_* plus listed below
20  ***********************************************************************/
21 #define AI_Base -1000
22 #define AI_TraceIndex (AI_Base+0)
23 #define AI_InterpTime (AI_Base+1)
24 #define AI_RealAmpl (AI_Base+2)
25 #define AI_RealTime (AI_Base+3)
26 
27 typedef int AdjInfoId;
28 
29 /***********************************************************************
30  * Maximum number of information ids that can be viewed
31  * simultaneously.
32  ***********************************************************************/
33 #define MaxAdjInfoNumber 10
34 
35 
36 #ifdef __cplusplus
37 extern "C"
38 {
39 #endif /* C++ */
40 
41 /***********************************************************************
42  * Build adjustable information string for given trace and point at
43  * it. Return dynamically allocated string (free() it late) or NULL
44  * on error.
45  ***********************************************************************/
46 char* BuildInfoString (VisualTraceSet vts,
47  AdjInfoId* pInfoList, int nInfoList,
48  int index, float time);
49 
50 /***********************************************************************
51  * Show dialog window and ask user to select interesting header fields
52  * to view on info.
53  ***********************************************************************/
54 ErrCode AdjustInfo (Widget wParent, const char* szTitle,
55  AdjInfoId* pInfoList, int* nInfoList);
56 
57 
58 /***********************************************************************
59  * Save the list of AdjInfoIds to the given file in given directory.
60  ***********************************************************************/
61 void SaveInfoList (const char* szDir, const char* szFileName,
62  const AdjInfoId* aii_list, int aii_n);
63 
64 /***********************************************************************
65  * Load the list of AdjInfoIds from the given file in given directory.
66  * *aii_n on input contains maximum allowed number of items in the
67  * aii_list. On output *aii_n contains real number items in the aii_list.
68  ***********************************************************************/
69 ErrCode LoadInfoList (const char* szDir, const char* szFileName,
70  AdjInfoId* aii_list, int* aii_n);
71 
72 
73 #ifdef __cplusplus
74 };
75 #endif /* C++ */
76 
77 
78 #ifdef __AdjInfoVars
79 
80 /* Default hint information */
81 AdjInfoId pHintInfoList[MaxAdjInfoNumber] = {
82  AI_InterpTime, AI_RealAmpl, AI_RealTime
83 };
84 int nHintInfoList = 3;
85 
86 /* Default stamp information */
87 AdjInfoId pStampInfoList[MaxAdjInfoNumber] = {
88  AI_TraceIndex, TA_HCAB, TA_COMP, TA_TYPE, TA_NMGL, TA_NTR
89 };
90 int nStampInfoList = 6;
91 
92 #else
93 
94 extern AdjInfoId pHintInfoList[], pStampInfoList[];
95 extern int nHintInfoList, nStampInfoList;
96 
97 #endif /* __AdjInfoVars */
98 
99 #endif /* AdjInfo.h */
Definition: VisualTS.h:157