PageRenderTime 46ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Examples/python/reference/example.h

#
C++ Header | 26 lines | 19 code | 6 blank | 1 comment | 0 complexity | a4c613d41f6c587138046ce6cf54ff4c MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. /* File : example.h */
  2. class Vector {
  3. private:
  4. double x,y,z;
  5. public:
  6. Vector() : x(0), y(0), z(0) { };
  7. Vector(double x, double y, double z) : x(x), y(y), z(z) { };
  8. friend Vector operator+(const Vector &a, const Vector &b);
  9. char *print();
  10. };
  11. class VectorArray {
  12. private:
  13. Vector *items;
  14. int maxsize;
  15. public:
  16. VectorArray(int maxsize);
  17. ~VectorArray();
  18. Vector &operator[](int);
  19. int size();
  20. };