Dummy.cpp 1009 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* ----------------------------------------------------------------------------
  2. * GTSAM Copyright 2010, Georgia Tech Research Corporation,
  3. * Atlanta, Georgia 30332-0415
  4. * All Rights Reserved
  5. * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
  6. * See LICENSE for the license information
  7. * -------------------------------------------------------------------------- */
  8. /**
  9. * @file Dummy.h
  10. * @brief Dummy class for testing MATLAB memory allocation
  11. * @author Andrew Melim
  12. * @author Frank Dellaert
  13. * @date June 14, 2012
  14. */
  15. #include <gtsam_unstable/base/Dummy.h>
  16. #include <iostream>
  17. namespace gtsam {
  18. static size_t gDummyCount = 0;
  19. Dummy::Dummy():id(++gDummyCount) {
  20. std::cout << "Dummy constructor " << id << std::endl;
  21. }
  22. Dummy::~Dummy() {
  23. std::cout << "Dummy destructor " << id << std::endl;
  24. }
  25. void Dummy::print(const std::string& s) const {
  26. std::cout << s << "Dummy " << id << std::endl;
  27. }
  28. unsigned char Dummy::dummyTwoVar(unsigned char a) const {
  29. return a;
  30. }
  31. }