You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

snfCFGmgr.inline.hpp 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // snfCFGmgr.inline.hpp
  2. //
  3. // (C) Copyright 2006 - 2009 ARM Research Labs, LLC.
  4. //
  5. // Inline functions/methods for snfCFGmgr module.
  6. //// IntegerSetHandler /////////////////////////////////////////////////////////
  7. inline bool IntegerSetHandler::isListed(int x) { // How to check if an int is listed.
  8. return (IntegerSet.end() != IntegerSet.find(x));
  9. }
  10. //// snfCFGmgr /////////////////////////////////////////////////////////////////
  11. inline snfCFGmgr::snfCFGmgr() : // We construct a CFGmgr this way...
  12. AisActive(false), // So that A is active after 1st load()
  13. InitFileName(""), // and all of the Init strings are
  14. InitLicenseId(""), // empty.
  15. InitAuthentication(""),
  16. ConfigurationPath("") {
  17. }
  18. inline void snfCFGmgr::swapCFGData() { // This swaps the active dataset.
  19. AisActive = (AisActive)?false:true;
  20. }
  21. inline snfCFGData& snfCFGmgr::ActiveData() { // This returns the active dataset.
  22. return (AisActive) ? A : B;
  23. }
  24. inline snfCFGData& snfCFGmgr::InactiveData() { // This returns the inactive dataset.
  25. return (AisActive) ? B : A;
  26. }
  27. inline string snfCFGmgr::RuleFilePath() { // Rulebase file path
  28. return ActiveData().RuleFilePath;
  29. }
  30. inline string snfCFGmgr::SecurityKey() { // Security key for rulebase
  31. return ActiveData().SecurityKey;
  32. }
  33. inline snfCFGData* snfCFGmgr::ActiveConfiguration() { // Pointer to active configuration
  34. return &(ActiveData());
  35. }