Pointwise Plugin SDK
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
apiPWPUtils.cxx
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * Pointwise Plugin utility functions
4  *
5  * (C) 2021 Cadence Design Systems, Inc. All rights reserved worldwide.
6  *
7  ***************************************************************************/
8 
9 #include <map>
10 #include <sstream>
11 #include <string>
12 #include <utility>
13 
14 #include <string.h>
15 #include "apiPWP.h"
16 #include "apiPWPUtils.h"
17 
18 typedef std::string PwuString;
19 
20 
21 /*------------------------------------*/
22 static PWU_RTITEM*
23 PwuFindAPI(const char api[], PWP_UINT32 cnt)
24 {
25  PWU_RTITEM *ret = 0;
26  if (api && api[0]) {
27  PWP_UINT32 ii;
28  for (ii=0; ii < cnt; ++ii) {
29  if (0 == strcmp(pwpRtItem[ii].apiInfo.name, api)) {
30  ret = &(pwpRtItem[ii]);
31  break;
32  }
33  }
34  }
35  return ret;
36 }
37 
38 /**************************************/
40 PwuFindTotalAPI(const char api[])
41 {
42  return PwuFindAPI(api, totalApiCnt);
43 }
44 
45 /**************************************/
47 PwuFindPublishedAPI(const char api[])
48 {
49  return PwuFindAPI(api, publishedApiCnt);
50 }
51 
52 /**************************************/
54 PwuFindApiMsgCB(const char api[])
55 {
56  PWU_RTITEM *pApiInfo = PwuFindTotalAPI(api);
57  return (pApiInfo? pApiInfo->msgCB : 0);
58 }
59 
60 
61 //***********************************************************************
62 //***********************************************************************
63 // send a generic message back to framework
64 //***********************************************************************
65 //***********************************************************************
66 
67 /**************************************/
69 PwuSendMsg(const char api[], PWP_ENUM_MSGID id, void *pMsg)
70 {
71  PWP_UINT32 ret = 0;
72  PWP_MESSAGECB msgCB = PwuFindApiMsgCB(api);
73  if (!msgCB) {
74  // api does NOT have a CB, use default CB
76  }
77 
78  // invoke CB if defined
79  if (msgCB) {
80  ret = msgCB(api, id, pMsg);
81  }
82 
83  // always invoke spy CB if defined. ignore ret.
85  if (msgCB) {
86  msgCB(api, id, pMsg);
87  }
88  return ret;
89 }
90 
91 //***********************************************************************
92 //***********************************************************************
93 // bundle and send a text message back to framework
94 //***********************************************************************
95 //***********************************************************************
96 
97 /*------------------------------------*/
98 static void
99 PwuSendTextMsg(const char api[], PWP_ENUM_MSGID id, const char txt[], PWP_UINT32 code)
100 {
101  PWP_MSG_TEXT msg;
102  msg.code = code;
103  msg.text = (txt ? txt : "");
104  PwuSendMsg(api, id, (void*)&msg);
105 }
106 
107 /**************************************/
108 void
109 PwuSendDebugMsg(const char api[], const char txt[], PWP_UINT32 code)
110 {
111  PwuSendTextMsg(api, PWP_MSGID_DEBUG, txt, code);
112 }
113 
114 /**************************************/
115 void
116 PwuSendInfoMsg(const char api[], const char txt[], PWP_UINT32 code)
117 {
118  PwuSendTextMsg(api, PWP_MSGID_INFO, txt, code);
119 }
120 
121 /**************************************/
122 void
123 PwuSendWarningMsg(const char api[], const char txt[], PWP_UINT32 code)
124 {
125  PwuSendTextMsg(api, PWP_MSGID_WARNING, txt, code);
126 }
127 
128 /**************************************/
129 void
130 PwuSendErrorMsg(const char api[], const char txt[], PWP_UINT32 code)
131 {
132  PwuSendTextMsg(api, PWP_MSGID_ERROR, txt, code);
133 }
134 
135 //***********************************************************************
136 //***********************************************************************
137 // bundle and send a progress message back to framework
138 //***********************************************************************
139 //***********************************************************************
140 
141 /*------------------------------------*/
142 static PWP_UINT32
143 PwuSendProgressMsg (const char api[], PWP_ENUM_MSGID id, PWP_UINT32 value)
144 {
145  PWP_MSG_PROGRESS msg;
146  msg.value = value;
147  return PwuSendMsg(api, id, (void*)&msg);
148 }
149 
150 /**************************************/
151 PWP_BOOL
152 PwuProgressBegin (const char api[], PWP_UINT32 totalSteps)
153 {
154  //For Message id msg.value = return
155  //-------------------- ---------------- ---------------------
156  //PWP_MSGID_PROGBEGIN total steps >0 if op can continue
157  return PwuSendProgressMsg (api, PWP_MSGID_PROGBEGIN, totalSteps)
158  ? PWP_TRUE : PWP_FALSE;
159 }
160 
161 /**************************************/
162 void
163 PwuProgressEnd (const char api[], PWP_BOOL ok)
164 {
165  //For Message id msg.value = return
166  //-------------------- ---------------- ---------------------
167  //PWP_MSGID_PROGEND 0=fail/>0=ok nothing
168  PwuSendProgressMsg (api, PWP_MSGID_PROGEND, (ok ? 1 : 0));
169 }
170 
171 /**************************************/
172 PWP_BOOL
173 PwuProgressStatus (const char api[], PWP_UINT32 complete, PWP_UINT32 total)
174 {
175  //For Message id msg.value = return
176  //-------------------- ---------------- ---------------------
177  //PWP_MSGID_PROGSTATUS 0-100 >0 if op can continue
178  PWP_UINT32 percent = 100;
179  if ((0 != total) && (complete < total)) {
180  percent = (PWP_UINT32)((PWP_FLOAT)100 * (PWP_FLOAT)complete
181  / (PWP_FLOAT)total);
182  }
183  return PwuSendProgressMsg (api, PWP_MSGID_PROGSTATUS, percent)
184  ? PWP_TRUE : PWP_FALSE;
185 }
186 
187 /**************************************/
188 PWP_BOOL
189 PwuProgressNextStep (const char api[])
190 {
191  //For Message id msg.value = return
192  //-------------------- ---------------- ---------------------
193  //PWP_MSGID_PROGSTATUS -1 >0 if op can continue
195  ? PWP_TRUE : PWP_FALSE;
196 }
197 
198 /**************************************/
199 PWP_BOOL
200 PwuProgressQuit (const char api[])
201 {
202  //For Message id msg.value = return
203  //-------------------- ---------------- ---------------------
204  //PWP_MSGID_PROGQUIT not used >0 if op canceled
205  return PwuSendProgressMsg (api, PWP_MSGID_PROGQUIT, 0)
206  ? PWP_TRUE : PWP_FALSE;
207 }
208 
209 
210 //***********************************************************************
211 //***********************************************************************
212 // Endian Data I/O helper functions
213 //***********************************************************************
214 //***********************************************************************
215 
216 /**************************************/
219 {
220  union endian_test_t {
221  PWP_UINT32 uint;
222  unsigned char ch[sizeof(PWP_UINT32)];
223  }
224  const etest = { 0xAABBCCDD };
225  return (0xAA == etest.ch[0]) ? PWP_ENDIAN_BIG : PWP_ENDIAN_LITTLE;
226 }
227 
228 
229 const void*
230 PwuApplyEndianness(PWP_ENDIANNESS endianness, const void *buf, size_t size)
231 {
232 # define ENDIAN_MAXSIZE 32
233  const void *ret = 0;
234  // buf size must be 1 or even
235  if (0 == buf) {
236  // bad
237  }
238  else if (1 == size) {
239  ret = buf; // just write the byte
240  }
241  else if (!(size & 0x1) && (ENDIAN_MAXSIZE >= size)) {
242  PWP_ENDIANNESS osEndianness = PwuGetOsEndianness();
243  switch (endianness) {
244  case PWP_ENDIAN_LITTLE:
245  case PWP_ENDIAN_BIG:
246  if (osEndianness == endianness) {
247  // no need to do swap
248  ret = buf;
249  break;
250  }
251  // drop through
252 
253  case PWP_ENDIAN_FOREIGN: {
254  // must swap data order
255  static unsigned char tmpBuf[ENDIAN_MAXSIZE];
256  const char *cbuf = (const char *)buf;
257  size_t hNdx = 0;
258  size_t tNdx = size-1;
259  while (hNdx < tNdx) {
260  tmpBuf[hNdx] = cbuf[tNdx];
261  tmpBuf[tNdx--] = cbuf[hNdx++];
262  }
263  // ret only valid until next call to PwuApplyEndianness()
264  ret = tmpBuf;
265  break; }
266 
267  case PWP_ENDIAN_NATIVE:
268  // no need to do swap
269  ret = buf;
270  break;
271 
272  case PWP_ENDIAN_ERROR:
273  default:
274  // huh?
275  break;
276  }
277  }
278  return ret;
279 # undef ENDIAN_MAXSIZE
280 }
281 
282 
283 //***********************************************************************
284 //***********************************************************************
285 // unformatted file I/O helper functions
286 //***********************************************************************
287 //***********************************************************************
288 
289 #define STAT_MASK ((PWP_UINT32)(0xFFFFFFF0))
290 #define STAT_BASE ((PWP_UINT32)(0x9ABCDEF0))
291 #define STAT_OPEN ((PWP_UINT32)(STAT_BASE | 0x1))
292 #define STAT_CLOSED ((PWP_UINT32)(STAT_BASE | 0x0))
293 
294 #define UDATA_ISINIT(pUD) (STAT_BASE == (STAT_MASK & (pUD)->status))
295 #define UDATA_ISOPEN(pUD) ((pUD) && (STAT_OPEN == (pUD)->status) && (pUD)->fp && !(pUD)->hadError)
296 #define UDATA_INREC(pUD) (UDATA_ISOPEN(pUD) && (pUD)->inRec)
297 #define UDATA_ISCLOSED(pUD) ((pUD) && (STAT_CLOSED == (pUD)->status))
298 
299 
300 /*------------------------------------*/
301 static PWP_BOOL
303 {
304  if (pUData) {
305  memset(pUData, 0, sizeof(PWU_UNFDATA));
306  pUData->status = STAT_OPEN;
307  pUData->endianness = PWP_ENDIAN_NATIVE;
308  }
309  return pUData ? PWP_TRUE : PWP_FALSE;
310 }
311 
312 /*------------------------------------*/
313 static PWP_BOOL
315 {
316  PWP_BOOL ret = PWP_FALSE;
317  if (UDATA_INREC(pUData)) {
318  const void *p = PwuApplyEndianness(pUData->endianness,
319  &(pUData->recBytes), sizeof(pUData->recBytes));
320  size_t cnt = pwpFileWrite(p, sizeof(pUData->recBytes), 1, pUData->fp);
321  if (1 == cnt) {
322  ret = PWP_TRUE;
323  }
324  if (!ret) {
325  pUData->hadError = PWP_TRUE;
326  }
327  }
328  return ret;
329 }
330 
331 
332 /***************************************************************************/
333 /***************************************************************************/
334 /* UNFORMATTED FORTRAN FILE UTILS */
335 /***************************************************************************/
336 /***************************************************************************/
337 
338 /**************************************/
341 {
343  if (UDATA_ISOPEN(pUData) && (PWP_ENDIAN_ERROR != endianness)) {
344  ret = pUData->endianness;
345  pUData->endianness = endianness;
346  }
347  return ret;
348 }
349 
350 /**************************************/
353 {
354  return pUData ? pUData->endianness : PWP_ENDIAN_ERROR;
355 }
356 
357 /**************************************/
358 PWP_BOOL
359 PwuUnfFileBegin(FILE *fp, PWU_UNFDATA *pUData)
360 {
361  PWP_BOOL ret = PWP_FALSE;
362  if (unfUDataInit(pUData) && fp) {
363  pUData->fp = fp;
364  ret = PWP_TRUE;
365  }
366  return ret;
367 }
368 
369 /**************************************/
370 PWP_BOOL
372 {
373  PWP_BOOL ret = PWP_FALSE;
374  if (0 == pUData) {
375  // fail
376  }
377  else if (!UDATA_INREC(pUData)) {
378  // silently ignore
379  ret = PWP_TRUE;
380  }
381  else {
382  if (!unfHdrLenWrite(pUData)) {
383  // could not write rec len value to footer
384  }
385  else if (0 == pUData->fixedBytes) {
386  // Not a fixed length record
387  sysFILEPOS fPosSave;
388  if (pwpFileGetpos(pUData->fp, &fPosSave)) {
389  // could not save current file pos
390  }
391  else if (pwpFileSetpos(pUData->fp, &(pUData->fPos))) {
392  // could not move pos to saved rec header location
393  }
394  else if (!unfHdrLenWrite(pUData)) {
395  // could not write rec len value to header
396  }
397  else if (0 == pwpFileSetpos(pUData->fp, &fPosSave)) {
398  // file pos restored to saved location
399  ret = PWP_TRUE;
400  }
401  }
402  else if (pUData->fixedBytes == pUData->recBytes) {
403  // The fixed length record bytes match the actual bytes written!
404  ret = PWP_TRUE;
405  }
406 
407  if (ret) {
408  // update running totals
409  pUData->totRecBytes += pUData->recBytes;
410  ++pUData->recCnt;
411  }
412  else {
413  pUData->hadError = PWP_TRUE;
414  }
415 
416  // clear for next rec
417  pUData->inRec = PWP_FALSE;
418  }
419 
420  // Do NOT reset pUData->recBytes here so that PwuUnfRecBytes() has access to
421  // this record's byte count.
422 
423  return ret;
424 }
425 
426 /**************************************/
427 PWP_BOOL
429 {
430  PWP_BOOL ret = PWP_FALSE;
431  if (UDATA_ISOPEN(pUData)) {
432  // auto-close rec (if any)
433  PwuUnfRecEnd(pUData);
434  // PwuUnfRecEnd() does NOT reset recBytes.
435  // We do not know the fixed record size.
436  pUData->recBytes = pUData->fixedBytes = 0;
437  // save current file pos. will write the final rec length later
438  if (0 == pwpFileGetpos (pUData->fp, &(pUData->fPos))) {
439  // must be true for call to unfHdrLenWrite()
440  pUData->inRec = PWP_TRUE;
441  // write dummy value... will set final value in PwuUnfRecEnd()
442  ret = pUData->inRec = unfHdrLenWrite(pUData);
443  }
444  if (!ret) {
445  pUData->hadError = PWP_TRUE;
446  }
447  }
448  return ret;
449 }
450 
451 /**************************************/
452 PWP_BOOL
454 {
455  PWP_BOOL ret = PWP_FALSE;
456  if (UDATA_ISOPEN(pUData)) {
457  // auto-close rec (if any)
458  PwuUnfRecEnd(pUData);
459  // set recBytes for unfHdrLenWrite()
460  // Caller provided the known (fixed) record size!
461  pUData->recBytes = pUData->fixedBytes = bytes * count;
462  // must be true for call to unfHdrLenWrite()
463  pUData->inRec = PWP_TRUE;
464  // write known recBytes value...
465  ret = pUData->inRec = unfHdrLenWrite(pUData);
466  // set recBytes back to zero to track actual bytes written
467  pUData->recBytes = 0;
468  if (!ret) {
469  pUData->hadError = PWP_TRUE;
470  }
471  }
472  return ret;
473 }
474 
475 /**************************************/
476 PWP_BOOL
477 PwuUnfRecWriteArr(PWU_UNFDATA *pUData, const void *arr, size_t itemSize,
478  size_t itemCnt)
479 {
480  PWP_BOOL ret = PWP_FALSE;
481  if (UDATA_INREC(pUData)) {
482  if (itemCnt == pwpFileWrite(arr, itemSize, itemCnt, pUData->fp)) {
483  pUData->recBytes += (PWP_UINT32)(itemCnt * itemSize);
484  ret = PWP_TRUE;
485  }
486  }
487  if (!ret) {
488  pUData->hadError = PWP_TRUE;
489  }
490  return ret;
491 }
492 
493 /**************************************/
494 PWP_BOOL
495 PwuUnfRecWriteBuf(PWU_UNFDATA *pUData, const void *buf, size_t size)
496 {
497  return PwuUnfRecWriteArr(pUData, buf, size, 1);
498 }
499 
500 /**************************************/
501 PWP_BOOL
502 PwuUnfRecWriteEndianBuf(PWU_UNFDATA *pUData, const void *buf, size_t size)
503 {
504  const void *p = PwuApplyEndianness(pUData->endianness, buf, size);
505  return PwuUnfRecWriteArr(pUData, p, size, 1);
506 }
507 
508 /**************************************/
509 PWP_BOOL
511 {
512  return PwuUnfRecWriteEndianBuf(pUData, &val, sizeof(val));
513 }
514 
515 /**************************************/
516 PWP_BOOL
518 {
519  return PwuUnfRecWriteEndianBuf(pUData, &val, sizeof(val));
520 }
521 
522 /**************************************/
523 PWP_BOOL
525 {
526  return PwuUnfRecWriteBuf(pUData, &val, sizeof(val));
527 }
528 
529 /**************************************/
530 PWP_BOOL
532 {
533  return PwuUnfRecWriteBuf(pUData, &val, sizeof(val));
534 }
535 
536 /**************************************/
537 PWP_BOOL
539 {
540  return PwuUnfRecWriteEndianBuf(pUData, &val, sizeof(val));
541 }
542 
543 /**************************************/
544 PWP_BOOL
546 {
547  return PwuUnfRecWriteEndianBuf(pUData, &val, sizeof(val));
548 }
549 
550 /**************************************/
551 PWP_BOOL
553 {
554  return PwuUnfRecWriteEndianBuf(pUData, &val, sizeof(val));
555 }
556 
557 /**************************************/
558 PWP_BOOL
560 {
561  return PwuUnfRecWriteEndianBuf(pUData, &val, sizeof(val));
562 }
563 
564 /**************************************/
565 PWP_BOOL
567 {
568  return PwuUnfRecWriteEndianBuf(pUData, &val, sizeof(val));
569 }
570 
571 /**************************************/
572 PWP_BOOL
574 {
575  return PwuUnfRecWriteEndianBuf(pUData, &val, sizeof(val));
576 }
577 
578 /**************************************/
579 PWP_BOOL
581 {
582  return PwuUnfRecWriteEndianBuf(pUData, &val, sizeof(val));
583 }
584 
585 /**************************************/
586 PWP_BOOL
588 {
589  return PwuUnfRecWriteEndianBuf(pUData, &val, sizeof(val));
590 }
591 
592 /**************************************/
593 PWP_BOOL
595 {
596  PWP_BOOL ret = PWP_FALSE;
597  if (pUData) {
598  // make sure rec is closed
599  PwuUnfRecEnd(pUData);
600  pUData->fp = 0;
601  pUData->status = STAT_CLOSED;
602  ret = !pUData->hadError;
603  }
604  return ret;
605 }
606 
607 /**************************************/
608 PWP_BOOL
610 {
611  return UDATA_ISINIT(pUData) && pUData->hadError;
612 }
613 
614 /**************************************/
617 {
618  return UDATA_ISINIT(pUData) ? pUData->recBytes : 0;
619 }
620 
621 /**************************************/
624 {
625  return UDATA_ISINIT(pUData) ? pUData->totRecBytes : 0;
626 }
627 
628 /**************************************/
631 {
632  return UDATA_ISINIT(pUData) ? pUData->recCnt : 0;
633 }
634 
635 
636 /***************************************************************************/
637 /***************************************************************************/
638 /***************************************************************************/
639 /***************************************************************************/
640 /***************************************************************************/
641 
642 
643 /***************************************************************************/
644 static const char *
646 {
647  const char *ret = "Unknown";
648  switch(type) {
649  case PWP_VALTYPE_STRING: ret = "String"; break;
650  case PWP_VALTYPE_INT: ret = "Int"; break;
651  case PWP_VALTYPE_UINT: ret = "UInt"; break;
652  case PWP_VALTYPE_REAL: ret = "Real"; break;
653  case PWP_VALTYPE_ENUM: ret = "Enum"; break;
654  case PWP_VALTYPE_BOOL: ret = "Bool"; break;
655  case PWP_VALTYPE_SIZE: break; // silence compiler warning
656  }
657  return ret;
658 }
659 
660 
661 /***************************************************************************/
663 
664  typedef std::map<PwuString, PwuString> NameStrMap;
665  typedef std::pair<NameStrMap::iterator, bool> NameStrMapInsertRet;
666 
667 public:
669  data_()
670  {
671  }
673  {
674  }
675 
676  void set(const PwuString &name, const PwuString &value) {
677  NameStrMap::iterator it = data_.find(name);
678  if (data_.end() != it) {
679  // set existing value
680  it->second = value;
681  }
682  else {
683  // set new value
684  data_.insert(NameStrMap::value_type(name, value));
685  }
686  }
687 
688  PwuString &
689  get(const PwuString &name, PwuString &value, const PwuString &defVal,
690  bool &isDefVal) {
691  NameStrMap::const_iterator it = data_.find(name);
692  if (data_.end() != it) {
693  value = it->second; // return existing value
694  isDefVal = false;
695  }
696  else {
697  value = defVal; // return default value
698  isDefVal = true;
699  }
700  return value;
701  }
702 
703  PwuString &
704  operator[](const PwuString &name) {
705  return data_[name];
706  }
707 
708  void erase(const PwuString &name) {
709  NameStrMap::iterator it = data_.find(name);
710  if (data_.end() != it) {
711  // found it - erase it
712  data_.erase(it);
713  }
714  // else not found - silently ignore
715  }
716 
717  bool exists(const PwuString &name) {
718  return (data_.end() != data_.find(name));
719  }
720 
721 protected:
723 };
724 
726 
727 
728 /**************************************/
729 PwuString
730 PwuJoin(const PwuString &j1, const PwuString &j2, char sepChar = '.')
731 {
732  PwuString res;
733  if (j1.empty()) {
734  res = j2;
735  }
736  else if (j2.empty()) {
737  res = j1;
738  }
739  else { // both j1 and j2 are NOT empty
740  bool j1EndsWithDot = (sepChar == j1[j1.size() - 1]);
741  bool j2StartsWithDot = (sepChar == j2[0]);
742  res = j1;
743  if (j1EndsWithDot && j2StartsWithDot) {
744  // j1. += [.]j2
745  res.append(j2.begin() + 1, j2.end());
746  }
747  else if (j1EndsWithDot) {
748  res.append(j2); // j1. += j2
749  }
750  else if (j2StartsWithDot) {
751  res.append(j2); // j1 += .j2
752  }
753  else {
754  res.append(1, sepChar); // j1 += .
755  res.append(j2); // j1 += j2
756  }
757  }
758  return res;
759 }
760 
761 /**************************************/
762 PwuString
763 PwuJoin(const PwuString &j1, const PwuString &j2, const PwuString &j3,
764  char sepChar = '.')
765 {
766  return PwuJoin(PwuJoin(j1, j2), j3, sepChar);
767 }
768 
769 /**************************************/
770 PwuString
771 PwuJoin(const PwuString &j1, const PwuString &j2, const PwuString &j3,
772  const PwuString &j4, char sepChar = '.')
773 {
774  return PwuJoin(PwuJoin(j1, j2), PwuJoin(j3, j4), sepChar);
775 }
776 
777 /**************************************/
778 static PwuString
779 PwuValueNamesGroup(const PwuString &rootGroup)
780 {
781  // <rootGroup>.ValNames
782  return PwuJoin(rootGroup, PWU_PUBLISH_NAMES_STR, '.');
783 }
784 
785 /**************************************/
786 static PwuString
787 PwuValueDefnsGroup(const PwuString &rootGroup)
788 {
789  // <rootGroup>.ValDefs
790  return PwuJoin(rootGroup, PWU_PUBLISH_DEFNS_STR, '.');
791 }
792 
793 /**************************************/
794 static PwuString
795 PwuValueDefnAttrGroup(const PwuString &rootGroup, const PwuString &valName)
796 {
797  // <rootGroup>.ValDefs.<valName>
798  return PwuJoin(PwuValueDefnsGroup(rootGroup), valName, '.');
799 }
800 
801 /**************************************/
802 static PwuString
803 PwuValueDefnNameKey(const PwuString &rootGroup, const PwuString &valName)
804 {
805  // <rootGroup>.ValDefs.<valName>.<PWU_VALUE_DEFN_TYPE_STR>
806  return PwuJoin(PwuValueDefnAttrGroup(rootGroup, valName),
808 }
809 
810 /**************************************/
811 static PwuString
812 PwuValueDefnTypeKey(const PwuString &rootGroup, const PwuString &valName)
813 {
814  // <rootGroup>.ValDefs.<valName>.<PWU_VALUE_DEFN_TYPE_STR>
815  return PwuJoin(PwuValueDefnAttrGroup(rootGroup, valName),
817 }
818 
819 /**************************************/
820 static PwuString
821 PwuValueDefnAccessKey(const PwuString &rootGroup, const PwuString &valName)
822 {
823  // <rootGroup>.ValDefs.<valName>.<PWU_VALUE_DEFN_ACCESS_STR>
824  return PwuJoin(PwuValueDefnAttrGroup(rootGroup, valName),
826 }
827 
828 /**************************************/
829 static PwuString
830 PwuValueDefnDescKey(const PwuString &rootGroup, const PwuString &valName)
831 {
832  // <rootGroup>.ValDefs.<valName>.<PWU_VALUE_DEFN_DESC_STR>
833  return PwuJoin(PwuValueDefnAttrGroup(rootGroup, valName),
835 }
836 
837 /**************************************/
838 static PwuString
839 PwuValueDefnDefaultKey(const PwuString &rootGroup, const PwuString &valName)
840 {
841  // <rootGroup>.ValDefs.<valName>.<PWU_VALUE_DEFN_DEFAULT_STR>
842  return PwuJoin(PwuValueDefnAttrGroup(rootGroup, valName),
844 }
845 
846 /**************************************/
847 static PwuString
848 PwuValueDefnRangeKey(const PwuString &rootGroup, const PwuString &valName)
849 {
850  // <rootGroup>.ValDefs.<valName>.<PWU_VALUE_DEFN_RANGE_STR>
851  return PwuJoin(PwuValueDefnAttrGroup(rootGroup, valName),
853 }
854 
855 /**************************************/
856 PWP_BOOL PwuAssignValue(const char group[], const char name[],
857  const char value[], bool createIfNotExists)
858 {
859  PWP_BOOL ret = PWP_FALSE;
860  if (group && group[0] && name && name[0]) {
861  PwuString key = PwuJoin(group, name);
862  if (0 == value) {
863  namedStrings.erase(key); // delete name/value pair!
864  ret = PWP_TRUE;
865  }
866  else if (createIfNotExists || namedStrings.exists(key)) {
867  namedStrings[key] = value;
868  ret = PWP_TRUE;
869  }
870  }
871  return ret;
872 }
873 
874 /**************************************/
875 PWP_BOOL PwuAssignValueInt(const char group[], const char name[],
876  PWP_INT value, bool createIfNotExists)
877 {
878  std::ostringstream buf;
879  buf << value << std::ends;
880  return PwuAssignValue(group, name, buf.str().c_str(), createIfNotExists);
881 }
882 
883 /**************************************/
884 PWP_BOOL PwuAssignValueUInt(const char group[], const char name[],
885  PWP_UINT value, bool createIfNotExists)
886 {
887  std::ostringstream buf;
888  buf << value << std::ends;
889  return PwuAssignValue(group, name, buf.str().c_str(), createIfNotExists);
890 }
891 
892 /**************************************/
893 PWP_BOOL PwuAssignValueReal(const char group[], const char name[],
894  PWP_REAL value, bool createIfNotExists)
895 {
896  std::ostringstream buf;
897  buf << value << std::ends;
898  return PwuAssignValue(group, name, buf.str().c_str(), createIfNotExists);
899 }
900 
901 /**************************************/
902 PWP_BOOL PwuAssignValueEnum(const char group[], const char name[],
903  const char value[], bool createIfNotExists)
904 {
905  return PwuAssignValue(group, name, value, createIfNotExists);
906 }
907 
908 /**************************************/
909 PWP_BOOL PwuPublishValueDefinition(const char group[], const char name[],
910  PWP_ENUM_VALTYPE type, const char value[], const char access[],
911  const char desc[], const char range[])
912 {
913  // value definition attributes value
914  // ---------------------------------- ---------
915  // <group>.ValNames += |<name>
916  // <group>.ValDefs.<name>.type <type>
917  // <group>.ValDefs.<name>.access <access>
918  // <group>.ValDefs.<name>.description <desc>
919  // <group>.ValDefs.<name>.default <value>
920  // <group>.ValDefs.<name>.range <range>
921  //
922  PWP_BOOL ret = PWP_FALSE;
923  if (group && group[0] && name && name[0]) {
924  PwuString varDefKeyName = PwuValueDefnNameKey(group, name);
925 
926  // Check if "<group>.ValDefs.<name>.type" exists
927  if (!namedStrings.exists(varDefKeyName)) {
928  // name is a new name
929  PwuString &varNames = namedStrings[PwuValueNamesGroup(group)];
930  // Append name to the string ref'ed by varNames
931  varNames = PwuJoin(varNames, name, '|');
932  }
933 
934  PwuString varDefKeyType = PwuValueDefnTypeKey(group, name);
935  PwuString varDefKeyAccess = PwuValueDefnAccessKey(group, name);
936  PwuString varDefKeyDesc = PwuValueDefnDescKey(group, name);
937  PwuString varDefKeyDefault = PwuValueDefnDefaultKey(group, name);
938  PwuString varDefKeyRange = PwuValueDefnRangeKey(group, name);
939 
940  namedStrings[varDefKeyName] = name;
941  namedStrings[varDefKeyType] = typeToString(type);
942  namedStrings[varDefKeyAccess] = access;
943  namedStrings[varDefKeyDesc] = desc;
944  namedStrings[varDefKeyDefault] = value;
945  namedStrings[varDefKeyRange] = range;
946  ret = PWP_TRUE;
947  }
948  return ret;
949 }
950 
951 /**************************************/
952 PWP_BOOL
953 PwuGetValue(const char group[], const char name[], PWP_HVALUE hVal)
954 {
955  bool isDefault;
956  PwuString str;
957  namedStrings.get(PwuJoin(group, name), str, "", isDefault);
958  if (!isDefault) {
959  PwuValueSetString(hVal, str.c_str());
960  }
961  return PWP_CAST_BOOL(!isDefault);
962 }
963 
964 /**************************************/
965 template<typename T, PWP_ENUM_VALTYPE TId>
966 static PWP_BOOL
967 PwuValueSetter(PWP_HVALUE hVal, T * val)
968 {
969  PWP_BOOL ret = PWP_FALSE;
970  PWP_HVALUE_IMPL *impl = PWP_HVALUE_GET_IMPL(hVal);
971  if (val && impl && impl->PwpValueCB_(impl->dest_, TId, val, 0)) {
972  ret = PWP_TRUE;
973  }
974  return ret;
975 }
976 
977 /**************************************/
978 PWP_BOOL
979 PwuValueSetString(PWP_HVALUE hVal, const char *val)
980 {
981  return PwuValueSetter<const char, PWP_VALTYPE_STRING>(hVal, val);
982 }
983 
984 /**************************************/
985 PWP_BOOL
986 PwuValueSetInt(PWP_HVALUE hVal, PWP_INT val)
987 {
988  return PwuValueSetter<PWP_INT, PWP_VALTYPE_INT>(hVal, &val);
989 }
990 
991 /**************************************/
992 PWP_BOOL
993 PwuValueSetUInt(PWP_HVALUE hVal, PWP_UINT val)
994 {
995  return PwuValueSetter<PWP_UINT, PWP_VALTYPE_UINT>(hVal, &val);
996 }
997 
998 /**************************************/
999 PWP_BOOL
1000 PwuValueSetReal(PWP_HVALUE hVal, PWP_REAL val)
1001 {
1002  return PwuValueSetter<PWP_REAL, PWP_VALTYPE_REAL>(hVal, &val);
1003 }
1004 
1005 /**************************************/
1006 PWP_BOOL
1007 PwuValueSetEnum(PWP_HVALUE hVal, const char *val)
1008 {
1009  return PwuValueSetter<const char, PWP_VALTYPE_ENUM>(hVal, val);
1010 }
1011 
1012 /**************************************/
1013 PWP_BOOL
1014 PwuValueSetBool(PWP_HVALUE hVal, PWP_BOOL val)
1015 {
1016  return PwuValueSetter<PWP_BOOL, PWP_VALTYPE_BOOL>(hVal, &val);
1017 }
PwuString PwuJoin(const PwuString &j1, const PwuString &j2, char sepChar= '.')
#define PWP_MESSAGECB_DEFAULT
Special API name used to register the default message handler.
Definition: apiPWP.h:568
#define UDATA_ISOPEN(pUD)
The data sent by plugins for progress messages.
Definition: apiPWP.h:612
static NamedStrings namedStrings
unsigned char PWP_UINT8
8-bit unsigned integer
Definition: apiPWP.h:170
PWP_BOOL PwuUnfRecBeginFixed(PWU_UNFDATA *pUData, PWP_UINT32 bytes, PWP_UINT32 count)
Prepares a PWU_UNFDATA block for writing a new unformatted data record when the amount of data being ...
PWP_MESSAGECB msgCB
The API&#39;s assigned message callback.
Definition: apiPWPUtils.h:55
PWP_BOOL PwuValueSetReal(PWP_HVALUE hVal, PWP_REAL val)
PWP_UINT32 code
API defined message code.
Definition: apiPWP.h:641
PWP_UINT32 recCnt
of records written
Definition: apiPWPUtils.h:352
PWP_ENUM_VALTYPE
Supported PWP-API getValue() transfer types.
Definition: apiPWP.h:696
PWP_BOOL PwuUnfRecWriteUINT16(PWU_UNFDATA *pUData, PWP_UINT16 val)
Write a PWP_UINT16 value to the current record with endian order applied.
std::map< PwuString, PwuString > NameStrMap
static PwuString PwuValueNamesGroup(const PwuString &rootGroup)
transfer value is a PWP_REAL
Definition: apiPWP.h:700
unsigned long long PWP_UINT64
64-bit unsigned integer
Definition: apiPWP.h:243
static PWP_BOOL unfHdrLenWrite(PWU_UNFDATA *pUData)
static PwuString PwuValueDefnRangeKey(const PwuString &rootGroup, const PwuString &valName)
static PwuString PwuValueDefnDescKey(const PwuString &rootGroup, const PwuString &valName)
unsigned int PWP_UINT32
32-bit unsigned integer
Definition: apiPWP.h:210
PWP_BOOL PwuValueSetUInt(PWP_HVALUE hVal, PWP_UINT val)
transfer value is a PWP_INT
Definition: apiPWP.h:698
#define UDATA_ISINIT(pUD)
Pointwise Plugin API (PWP-API)
PwpValue_t * PwpValueCB_
Callback function used to marshall a plugin value into dest_.
Definition: apiPWP.h:736
PWP_BOOL PwuPublishValueDefinition(const char group[], const char name[], PWP_ENUM_VALTYPE type, const char value[], const char access[], const char desc[], const char range[])
Create a value.
Information text message id (see PWP_MSG_TEXT)
Definition: apiPWP.h:511
PWP_BOOL PwuValueSetEnum(PWP_HVALUE hVal, const char *val)
PWP_BOOL PwuAssignValue(const char group[], const char name[], const char value[], bool createIfNotExists)
Assign or create a value.
void PwuSendInfoMsg(const char api[], const char txt[], PWP_UINT32 code)
Send an info text message (PWP_MSGID_INFO) to the framework.
PWP_BOOL PwuValueSetInt(PWP_HVALUE hVal, PWP_INT val)
const char * text
API defined message string.
Definition: apiPWP.h:644
PWP_BOOL PwuAssignValueInt(const char group[], const char name[], PWP_INT value, bool createIfNotExists)
PWP_BOOL PwuUnfRecWriteBuf(PWU_UNFDATA *pUData, const void *buf, size_t size)
Write a data buffer to the current record.
PWP_BOOL inRec
&quot;in record&quot; flag
Definition: apiPWPUtils.h:349
PWP_BOOL PwuProgressBegin(const char api[], PWP_UINT32 totalSteps)
Send a progress begin message (PWP_MSGID_PROGBEGIN) to the framework.
#define STAT_OPEN
static PWP_BOOL PwuValueSetter(PWP_HVALUE hVal, T *val)
PWP_UINT32 PwuUnfRecBytes(PWU_UNFDATA *pUData)
Get the running total number of bytes written to the current record during an unformatted file I/O se...
PWP_ENDIANNESS PwuUnfFileSetEndianness(PWU_UNFDATA *pUData, PWP_ENDIANNESS endianness)
Set the output endianness.
PWP_BOOL hadError
error flag
Definition: apiPWPUtils.h:348
int pwpFileSetpos(FILE *fp, const sysFILEPOS *pos)
Set the current file position.
transfer value is a const char*
Definition: apiPWP.h:697
PWP_ENUM_MSGID
Supported PWP-API message ids.
Definition: apiPWP.h:504
Query progress quit message id (see PWP_MSG_PROGRESS)
Definition: apiPWP.h:536
PWP_UINT32 PwuSendMsg(const char api[], PWP_ENUM_MSGID id, void *pMsg)
Send a message from an api.
Definition: apiPWPUtils.cxx:69
static const char * typeToString(PWP_ENUM_VALTYPE type)
Begin progress message id (see PWP_MSG_PROGRESS)
Definition: apiPWP.h:524
static void PwuSendTextMsg(const char api[], PWP_ENUM_MSGID id, const char txt[], PWP_UINT32 code)
Definition: apiPWPUtils.cxx:99
PWP_BOOL PwuUnfFileBegin(FILE *fp, PWU_UNFDATA *pUData)
Prepares a PWU_UNFDATA block for a new unformatted file I/O session.
PWP_BOOL PwuValueSetString(PWP_HVALUE hVal, const char *val)
Set the value of a variable handle.
PWP_UINT32 PwuUnfRecCount(PWU_UNFDATA *pUData)
Get the running total number of finalized records written during an unformatted file I/O session...
#define PWP_CAST_BOOL(v)
Cast a value to a PWP_BOOL value (PWP_TRUE or PWP_FALSE)
Definition: apiPWP.h:312
#define PWP_TRUE
PWP_BOOL logical &quot;true&quot; value.
Definition: apiPWP.h:309
PWP_BOOL PwuUnfRecWriteINT(PWU_UNFDATA *pUData, PWP_INT val)
Write a PWP_INT value to the current record with endian order applied.
static PWU_RTITEM * PwuFindAPI(const char api[], PWP_UINT32 cnt)
Definition: apiPWPUtils.cxx:23
#define UDATA_INREC(pUD)
PwuString & get(const PwuString &name, PwuString &value, const PwuString &defVal, bool &isDefVal)
PWP_BOOL PwuUnfFileEnd(PWU_UNFDATA *pUData)
Finalize an unformatted file I/O session.
static PWP_BOOL unfUDataInit(PWU_UNFDATA *pUData)
PWP_BOOL PwuProgressQuit(const char api[])
Send a progress query-quit message (PWP_MSGID_PROGQUIT) to the framework.
PWP_UINT32 totalApiCnt
The total # of published and unpublished entries in pwpRtItem[].
Definition: apiPWP.cxx:47
PWP_UINT32 value
The progress value.
Definition: apiPWP.h:630
fpos_t sysFILEPOS
File position data type.
Definition: pwpPlatform.h:51
PWP_BOOL PwuUnfRecWriteEndianBuf(PWU_UNFDATA *pUData, const void *buf, size_t size)
Write a data buffer to the current record with endian order applied.
PWP_BOOL PwuGetValue(const char group[], const char name[], PWP_HVALUE hVal)
Implementation of the PwpGetValue() API function.
PWU_RTITEM pwpRtItem[]
The runtime array of PWU_RTITEM items.
Definition: apiPWP.cxx:29
#define STAT_CLOSED
FILE * fp
file pointer
Definition: apiPWPUtils.h:346
float PWP_FLOAT
32-bit real
Definition: apiPWP.h:261
PWP_BOOL PwuUnfRecWriteUINT(PWU_UNFDATA *pUData, PWP_UINT val)
Write a PWP_UINT value to the current record with endian order applied.
const void * PwuApplyEndianness(PWP_ENDIANNESS endianness, const void *buf, size_t size)
Apply specified byte order to buf containing size bytes.
static PwuString PwuValueDefnsGroup(const PwuString &rootGroup)
PWP_BOOL PwuValueSetBool(PWP_HVALUE hVal, PWP_BOOL val)
Debug text message id (see PWP_MSG_TEXT)
Definition: apiPWP.h:507
#define PWU_VALUE_DEFN_ACCESS_STR
Definition: apiPWP.h:1078
unsigned short PWP_UINT16
16-bit unsigned integer
Definition: apiPWP.h:190
PWP_MESSAGECB PwuFindApiMsgCB(const char api[])
Search pwpRtItem[] for an API&#39;s messageCB.
Definition: apiPWPUtils.cxx:54
static PwuString PwuValueDefnAccessKey(const PwuString &rootGroup, const PwuString &valName)
Unformatted file data block.
Definition: apiPWPUtils.h:344
End progress message id (see PWP_MSG_PROGRESS)
Definition: apiPWP.h:528
PWP_BOOL PwuUnfRecWriteArr(PWU_UNFDATA *pUData, const void *arr, size_t itemSize, size_t itemCnt)
Write an array of data to the current record.
PWP_UINT32 PwuUnfTotRecBytes(PWU_UNFDATA *pUData)
Get the running total number of bytes written to all records during an unformatted file I/O session...
PWP_UINT32 fixedBytes
user provided # record bytes
Definition: apiPWPUtils.h:354
PWP_BOOL PwuUnfRecWriteREAL(PWU_UNFDATA *pUData, PWP_REAL val)
Write a PWP_REAL value to the current record with endian order applied.
PWP_BOOL PwuUnfHadError(PWU_UNFDATA *pUData)
Check if an unformatted file I/O session has detected any errors.
transfer value is a PWP_BOOL
Definition: apiPWP.h:702
PWP_UINT32(* PWP_MESSAGECB)(const char api[], PWP_ENUM_MSGID id, void *pMsg)
Message handler callback function signature.
Definition: apiPWP.h:555
PWP_BOOL PwuUnfRecWriteINT32(PWU_UNFDATA *pUData, PWP_INT32 val)
Write a PWP_INT32 value to the current record with endian order applied.
Status progress message id (see PWP_MSG_PROGRESS)
Definition: apiPWP.h:532
PWP_UINT32 recBytes
bytes written to current record
Definition: apiPWPUtils.h:350
PWP_BOOL PwuAssignValueEnum(const char group[], const char name[], const char value[], bool createIfNotExists)
sysFILEPOS fPos
file position value
Definition: apiPWPUtils.h:347
void PwuSendWarningMsg(const char api[], const char txt[], PWP_UINT32 code)
Send a warning text message (PWP_MSGID_WARNING) to the framework.
static PWP_UINT32 PwuSendProgressMsg(const char api[], PWP_ENUM_MSGID id, PWP_UINT32 value)
PWP_BOOL PwuUnfRecWriteUINT32(PWU_UNFDATA *pUData, PWP_UINT32 val)
Write a PWP_UINT32 value to the current record with endian order applied.
short PWP_INT16
16-bit integer
Definition: apiPWP.h:187
PWP_BOOL PwuUnfRecEnd(PWU_UNFDATA *pUData)
Finalize the current record write.
signed char PWP_INT8
8-bit integer
Definition: apiPWP.h:167
Non-fatal error text message id (see PWP_MSG_TEXT)
Definition: apiPWP.h:515
void * dest_
Pointer to the opaque value destination.
Definition: apiPWP.h:733
int PWP_BOOL
logical value
Definition: apiPWP.h:303
long long PWP_INT64
64-bit integer
Definition: apiPWP.h:240
int pwpFileGetpos(FILE *fp, sysFILEPOS *pos)
Query the current file position.
PWP_UINT32 publishedApiCnt
The total # of published entries in pwpRtItem[].
Definition: apiPWP.cxx:48
PWP_BOOL PwuUnfRecWriteINT16(PWU_UNFDATA *pUData, PWP_INT16 val)
Write a PWP_INT16 value to the current record with endian order applied.
transfer value is a PWP_UINT
Definition: apiPWP.h:699
NameStrMap data_
void PwuSendDebugMsg(const char api[], const char txt[], PWP_UINT32 code)
Send a debug text message (PWP_MSGID_DEBUG) to the framework.
transfer value is a const char*
Definition: apiPWP.h:701
#define PWU_PUBLISH_DEFNS_STR
Definition: apiPWP.h:1074
PWP_UINT32 totRecBytes
total # bytes written to all records
Definition: apiPWPUtils.h:351
The runtime data representing a PWP-API suported by a plugin.
Definition: apiPWPUtils.h:42
void erase(const PwuString &name)
void PwuSendErrorMsg(const char api[], const char txt[], PWP_UINT32 code)
Send an error text message (PWP_MSGID_ERROR) to the framework.
#define PWP_HVALUE_GET_IMPL(h)
obtains the underlying PWP_HVALUE_IMPL ptr from the handle
Definition: apiPWP.h:462
size_t pwpFileWrite(const void *buf, size_t size, size_t count, FILE *fp)
Write an collection of data items to a file.
Fatal error text message id (see PWP_MSG_TEXT)
Definition: apiPWP.h:519
#define ENDIAN_MAXSIZE
#define PWU_VALUE_DEFN_RANGE_STR
Definition: apiPWP.h:1081
#define PWU_VALUE_DEFN_NAME_STR
Definition: apiPWP.h:1076
std::pair< NameStrMap::iterator, bool > NameStrMapInsertRet
PWP_ENDIANNESS endianness
write data using this endianness
Definition: apiPWPUtils.h:353
#define PWU_VALUE_DEFN_DESC_STR
Definition: apiPWP.h:1079
std::string PwuString
Definition: apiPWPUtils.cxx:18
PWP_BOOL PwuAssignValueReal(const char group[], const char name[], PWP_REAL value, bool createIfNotExists)
#define PWU_VALUE_DEFN_TYPE_STR
Definition: apiPWP.h:1077
#define PWP_MESSAGECB_SPY
Special API name used to register the spy message handler.
Definition: apiPWP.h:581
PWP_BOOL PwuAssignValueUInt(const char group[], const char name[], PWP_UINT value, bool createIfNotExists)
PWU_RTITEM * PwuFindPublishedAPI(const char api[])
Find a published api in pwpRtItem[].
Definition: apiPWPUtils.cxx:47
PWP_UINT32 PWP_UINT
unsigned integer same size as void*
Definition: apiPWP.h:285
void PwuProgressEnd(const char api[], PWP_BOOL ok)
Send a progress end message (PWP_MSGID_PROGEND) to the framework.
PWP_BOOL PwuUnfRecBegin(PWU_UNFDATA *pUData)
Prepares a PWU_UNFDATA block for writing a new unformatted data record.
PWP_BOOL PwuUnfRecWriteUINT64(PWU_UNFDATA *pUData, PWP_UINT64 val)
Write a PWP_UINT64 value to the current record with endian order applied.
PWP_ENDIANNESS PwuUnfFileGetEndianness(PWU_UNFDATA *pUData)
Get the output endianness setting for this PWU_UNFDATA block.
PWP_BOOL PwuUnfRecWriteFLOAT(PWU_UNFDATA *pUData, PWP_FLOAT val)
Write a PWP_FLOAT value to the current record with endian order applied.
PWP_ENDIANNESS
Flags used to indicate endianness or control endian behaviors in functions.
Definition: apiPWP.h:822
bool exists(const PwuString &name)
static PwuString PwuValueDefnNameKey(const PwuString &rootGroup, const PwuString &valName)
PWP_UINT32 status
current file status
Definition: apiPWPUtils.h:345
PWP_INT32 PWP_INT
integer same size as void*
Definition: apiPWP.h:282
static PwuString PwuValueDefnTypeKey(const PwuString &rootGroup, const PwuString &valName)
static PwuString PwuValueDefnAttrGroup(const PwuString &rootGroup, const PwuString &valName)
static PwuString PwuValueDefnDefaultKey(const PwuString &rootGroup, const PwuString &valName)
The data sent by plugins for text messages.
Definition: apiPWP.h:638
PWP_BOOL PwuProgressStatus(const char api[], PWP_UINT32 complete, PWP_UINT32 total)
Send a progress status message (PWP_MSGID_PROGSTATUS, value &gt;= 0) to the framework.
PWP_ENDIANNESS PwuGetOsEndianness(void)
Query the OS&#39;s native endianness.
PWP_BOOL PwuUnfRecWriteUINT8(PWU_UNFDATA *pUData, PWP_UINT8 val)
Write a PWP_UINT8 value to the current record with endian order applied.
PWP_BOOL PwuProgressNextStep(const char api[])
Send a progress &quot;next step&quot; message (PWP_MSGID_PROGSTATUS, value = -1) to the framework.
#define PWU_VALUE_DEFN_DEFAULT_STR
Definition: apiPWP.h:1080
PWP_BOOL PwuUnfRecWriteINT8(PWU_UNFDATA *pUData, PWP_INT8 val)
Write a PWP_INT8 value to the current record with endian order applied.
#define PWU_PUBLISH_NAMES_STR
Definition: apiPWP.h:1073
double PWP_REAL
64-bit real
Definition: apiPWP.h:264
PwuString & operator[](const PwuString &name)
#define PWP_FALSE
PWP_BOOL logical &quot;false&quot; value.
Definition: apiPWP.h:306
PWP_BOOL PwuUnfRecWriteINT64(PWU_UNFDATA *pUData, PWP_INT64 val)
Write a PWP_INT64 value to the current record with endian order applied.
int PWP_INT32
32-bit integer
Definition: apiPWP.h:207
PWU_RTITEM * PwuFindTotalAPI(const char api[])
Find any api in pwpRtItem[].
Definition: apiPWPUtils.cxx:40
void set(const PwuString &name, const PwuString &value)
Data and functions useful to PWP-API compliant plugins.