libcm is a C development framework with an emphasis on audio signal processing applications.
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #ifndef cmSymTbl_h
  2. #define cmSymTbl_h
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. //( { file_desc:"Symbol table object." kw:[base] }
  7. typedef cmHandle_t cmSymTblH_t;
  8. extern cmSymTblH_t cmSymTblNullHandle;
  9. // Create a new symbol table.
  10. // 'parentH' is a parent table embedded in this table and is optional. Set this
  11. // value to 'cmSymTblNullHandle'. if the table does not have a parent.
  12. //
  13. // All symbol searches will include this table however all symbols registered with
  14. // this table will be inserted in this table not the parent.
  15. //
  16. // 'baseSymId' is the minimum symbol id used by this table and will be returned
  17. // as the value of the first symbol registered with this table. Subsequent symbols
  18. // will increment this value. Internal assertions prevent the symbol id range
  19. // of this table from overlapping with its parent.
  20. cmSymTblH_t cmSymTblCreate( cmSymTblH_t parentH, unsigned baseSymId, cmCtx_t* ctx );
  21. // Destroy and release the resources associated with a symbol table created by
  22. // an earlier call to cmSymTblCreate().
  23. void cmSymTblDestroy( cmSymTblH_t* hp );
  24. // Register a symbol label. Set 'staticFl' to true if the label is allocated statically.
  25. unsigned cmSymTblRegister( cmSymTblH_t h, const char* label, bool staticFl );
  26. unsigned cmSymTblRegisterSymbol( cmSymTblH_t h, const char* label );
  27. unsigned cmSymTblRegisterStaticSymbol( cmSymTblH_t h, const char* label );
  28. unsigned cmSymTblRegisterVFmt( cmSymTblH_t h, const cmChar_t* fmt, va_list vl );
  29. unsigned cmSymTblRegisterFmt( cmSymTblH_t h, const cmChar_t* fmt, ... );
  30. bool cmSymTblRemove( cmSymTblH_t h, unsigned symId );
  31. // Given a symbol id return the associated label.
  32. const char* cmSymTblLabel( cmSymTblH_t h, unsigned symId );
  33. // Given a symbol label return the associated id or cmInvalidId if the symbol could not be found.
  34. unsigned cmSymTblId( cmSymTblH_t h, const char* label );
  35. // Returns true if the symbol table handle is not valid otherwise returns false.
  36. bool cmSymTblIsValid( cmSymTblH_t h );
  37. // Returns true if 'symId' is stored in this symbol table or its parent otherwise returns false.
  38. bool cmSymTblIsValidId( cmSymTblH_t h, unsigned symId );
  39. // Print thes symbol table (but not its parent).
  40. void cmSymTblReport( cmSymTblH_t h );
  41. // Symbol table test stub.
  42. void cmSymTblTest(cmCtx_t* ctx);
  43. //)
  44. #ifdef __cplusplus
  45. }
  46. #endif
  47. #endif