//
//	Copyright © 2006 Nemetschek North America 
//	All Rights Reserved.
//
// Created by Vladislav Stanev

#ifndef VECTORWORKS_STRING_CONVERTOR__H
#define VECTORWORKS_STRING_CONVERTOR__H

#pragma once

namespace VWFC
{
	namespace Tools
	{
		class VWStringConv
		{
		public:
							VWStringConv(const TXString& str);
							VWStringConv(double value);
			virtual			~VWStringConv();

		public:
			double			GetScale() const;
			TXString		GetScaleString(double dEpsilon = kNearlyEqualEpsilonForDoubles) const;

			double			GetDimCoord() const;
			// uses SDK call for converting to dim string
			TXString		GetDimCoordString() const;
			// uses general SDK call for covnerting to dim string
			TXString		GetDimGeneralCoordString() const;

			double			GetAngleDeg() const;
			TXString		GetAngleDegString() const;

			double			GetArea() const;
			//debug
			// additional parameter: if the number is to be preserved or is to be converted in document units
			TXString		GetAreaString(bool bPreserveNumber = false) const;

			double			GetVolume() const;
			TXString		GetVolumeString() const;

			// converts the value to match the current document's number formatting
			double			GetVWDocumentDouble(TNumStyleClass style) const;
			TXString		GetVWDocumentDoubleString(TNumStyleClass style, UInt8 accuracy, UInt8 format) const;

		protected:
			bool				fbIsString;
			TXString			fTheString;
			double				fdValue;
		};
	}
}

#endif // VECTORWORKS_STRING_CONVERTOR__H