AtomicSharp.cpp 608 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #include "CSComponent.h"
  2. #include "AtomicSharp.h"
  3. namespace Atomic
  4. {
  5. /// Register AtomicSharp library objects.
  6. void ATOMIC_API RegisterAtomicSharpLibrary(Context* context);
  7. WeakPtr<Context> AtomicSharp::csContext_;
  8. WeakPtr<AtomicSharp> AtomicSharp::instance_;
  9. AtomicSharp::AtomicSharp(Context* context) :
  10. Object(context)
  11. {
  12. RegisterAtomicSharpLibrary(context_);
  13. assert(!instance_);
  14. instance_ = this;
  15. csContext_ = context;
  16. }
  17. AtomicSharp::~AtomicSharp()
  18. {
  19. instance_ = NULL;
  20. }
  21. void RegisterAtomicSharpLibrary(Context* context)
  22. {
  23. CSComponent::RegisterObject(context);
  24. }
  25. }