#pragma once

class MxLineTypeData
{
public:
	virtual ~MxLineTypeData(void);


	void Init();

	static MxLineTypeData&	Instance();

	McDbLinetypeTableRecord* CreateLineTypeRecord(MxString sName) const;

protected:


	struct stuLineTypeData
	{
		int iType;
		union
		{
			double			dDashLength;

			struct stuComplexText
			{
				double dLength;

				double  dScale;				
				int     rotationType;
				double  dRotation;
				double  dXoffset;
				double  dYoffset;
				MxString sText;
				MxString sTextStyle;
			};
		};

		stuLineTypeData()
		{
			iType			= 0;
			dDashLength	    = 1.0;
		}
	};

	struct stuLineType
	{
		MxString sDescription;
		std::vector<stuLineTypeData> data;

		void AddDashLength(double dLen)
		{
			stuLineTypeData tmp;
			tmp.dDashLength = dLen;
			tmp.iType = 0;
			data.push_back(tmp);
		}
	};

	MxLineTypeData(void);
private:
	
	static MxLineTypeData			s_instance;

	std::map<MxString,stuLineType*>	m_mapLineTypeData;
};
