2
0

nodeTransitionCache.I 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // Filename: nodeTransitionCache.I
  2. // Created by: drose (20Mar00)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. ////////////////////////////////////////////////////////////////////
  6. // Function: NodeTransitionCache::set_transition
  7. // Access: Public
  8. // Description: This flavor of set_transition() accepts a pointer to
  9. // a NodeTransition only. It infers the type of the
  10. // NodeTransition from the pointer. However, it is not
  11. // valid to pass a NULL pointer to this flavor of
  12. // set_transition; if the pointer might be NULL, use the
  13. // above flavor instead (or just call clear_transition).
  14. ////////////////////////////////////////////////////////////////////
  15. INLINE_GRAPH PT(NodeTransition) NodeTransitionCache::
  16. set_transition(NodeTransition *trans) {
  17. nassertr(trans != (NodeTransition *)NULL, NULL);
  18. nassertr(trans->get_handle() != TypeHandle::none(), NULL);
  19. return set_transition(trans->get_handle(), trans);
  20. }
  21. ////////////////////////////////////////////////////////////////////
  22. // Function: NodeTransitionCache::size
  23. // Access: Public
  24. // Description:
  25. ////////////////////////////////////////////////////////////////////
  26. INLINE_GRAPH NodeTransitionCache::size_type NodeTransitionCache::
  27. size() const {
  28. return _cache.size();
  29. }
  30. ////////////////////////////////////////////////////////////////////
  31. // Function: NodeTransitionCache::begin
  32. // Access: Public
  33. // Description:
  34. ////////////////////////////////////////////////////////////////////
  35. INLINE_GRAPH NodeTransitionCache::const_iterator NodeTransitionCache::
  36. begin() const {
  37. return _cache.begin();
  38. }
  39. ////////////////////////////////////////////////////////////////////
  40. // Function: NodeTransitionCache::end
  41. // Access: Public
  42. // Description:
  43. ////////////////////////////////////////////////////////////////////
  44. INLINE_GRAPH NodeTransitionCache::const_iterator NodeTransitionCache::
  45. end() const {
  46. return _cache.end();
  47. }
  48. INLINE_GRAPH ostream &operator << (ostream &out, const NodeTransitionCache &ntc) {
  49. ntc.output(out);
  50. return out;
  51. }