pmc/include/pmc.h
author Markus Bröker <mbroeker@largo.dyndns.tv>
Thu, 16 Apr 2009 12:49:11 +0200
changeset 34 4a35f239fe5b
parent 9 c3fecc82ade6
permissions -rw-r--r--
the good, old programming error: * spoon= alloc(data, spoon); * free(spoon); -> there is a spoon (missing) Code indent with my buggy GNU Indent * -> PLEASE GUYS, FIX IT!! committer: Markus Bröker <mbroeker@largo.homelinux.org>

/**
 * test/demos/pmc/include/pmc.h
 * Copyright (C) 2008 Markus Broeker
 */

#ifndef PMC_H
#define PMC_H

#include <iostream>
#include <object.h>

namespace pmc {
    class Vector:public Object {
      private:
        int x;
        int y;
        int z;

      public:
        enum Mode { DEG, RAD, GRAD };

        Vector (int xx = 0, int yy = 0, int zz = 0);
        virtual ~ Vector ();

        int X ();
        int Y ();
        int Z ();

        Vector operator+ (Vector);
        Vector operator- (Vector);
        int operator* (Vector);
        double abs ();

        void vector ();
        double angle (Vector);
        void setMode (Mode m = RAD);

      private:
          Mode mode;
    };
}
#endif