rt_varspace_object.inline.h 456 B

12345678910111213141516171819
  1. #ifndef AFUN_RT_VARSPACE_OBJECT_INLINE_H
  2. #define AFUN_RT_VARSPACE_OBJECT_INLINE_H
  3. #include "rt_varspace_object.h"
  4. namespace aFunrt {
  5. size_t VarSpace::getCount() {
  6. std::unique_lock<std::mutex> mutex{lock};
  7. return var.size();
  8. }
  9. aFuncore::Object *VarSpace::findObject(const std::string &name) {
  10. Var *ret = findVar(name);
  11. return ret ? ret->getData() : nullptr;
  12. }
  13. }
  14. #endif //AFUN_RT_VARSPACE_OBJECT_INLINE_H