~jdpipe/ascend/trunk-old

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef ASCXX_UNITS_H
#define ASCXX_UNITS_H

#include "config.h"
extern "C"{
#include <ascend/general/platform.h>
#include <ascend/compiler/fractions.h>
#include <ascend/compiler/compiler.h>
#include <ascend/compiler/dimen.h>
#include <ascend/compiler/units.h>
}

#include "symchar.h"

class Dimensions;

/**
	This class will be renamed Units for use in Python
*/
class UnitsM{
private:
	const struct Units *u;
protected:
	const struct Units *getInternalType() const;

public:
	UnitsM();
	UnitsM(const struct Units *u);
	UnitsM(const char *units);

	const SymChar getName() const;
	const Dimensions getDimensions() const;
	const double getConversion() const;
	const bool operator==(const UnitsM &other) const;
};

#endif