You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.5 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

//////////////////////////////////////////////////////////////////////////////
//文件: FormatReader.h
//主要功能:
// 双狐格式读写插件标准接口文件头定义,用户可以从该类扩展类进行格式转换
//生成的DLL文件复制到所在目录下的plugin目录下即可使用时调用DFDraw
//文件菜单中的“从插件打开”即可。
//
//程序编写: 2009-4-16
//
//
/////////////////////////////////////////////////////////////////////////////
#if !defined ( __DF_FORMAT_READER_BASE_H__ )
#define __DF_FORMAT_READER_BASE_H__
#include "dfPluginBase.h"
namespace NPluginFormat
{
class CFormatReaderBase
{
public:
CFormatReaderBase(void);
~CFormatReaderBase(void);
public:
void SetReader(dfPluginFormatReader* pReader);
//合并双狐图件如符号库等bMemeryData为TRUE表示strFileNameOrData中直接为DFD格式的串否则为文件名称
bool MergeFile( const char* strFileNameOrData, BOOL bMemeryData );
bool SetCurrentLayer( const char* strLayer ); //设置当前层
bool SetProjection( const char* strProjection ); //设置投影格式为双狐DFD格式
bool AddPline( const dfPluginPline* pp ); //插入曲线
bool AddRect( const dfPluginPlineRect* pp ); //插入曲线矩形,可以使用曲线修饰
bool AddText( const dfPluginText* pp ); //插入文本
bool AddPoint( dfPluginPoint dp, const char* strName, double angle );//插入点类文字,如井位等,在双狐中可使用修饰控制
bool AddEllipse( const dfPluginEllipse* pp ); //插入圆或椭圆
bool AddArc( const dfPluginArc* pp ); //插入弧
bool AddImage( const dfPluginImage* pp); //插入图像
bool AddImageFile( const char* strFileName, dfPluginRect rect); //插入图像
bool AddImageBuffer( const dfPluginImageBuffer* pp); //插入图像
bool AddSurface( const dfPluginSurface* pp ); //插入曲面
bool AddXyz( double x, double y, double z ); //插入散点文字
bool AddGriding( const dfPluginGriding* pp ); //插入坐标网
bool AddFrame( const dfPluginFrame* pp ); //插入坐标网
bool AddMark( const dfPluginMark* pp ); //插入符号
//在开始生成一个符号后,后期所有的元素将增加到该符号中,直到结束该符号生成
//符号可以嵌套使用,必须成对出现
bool CreateMarkBegin(const char* strMarkName); //开始符号生成,开始与结束两个函数必须成对出现
bool CreateMarkEnd(void); //结束符号生成
bool SaveFile(const char* strFileName, int nSaveType); //将内容保存为指定扩展名的文件nSaveType:1=dfd、2=dfb、3=dml
bool ClearAll( void ); //清空当前的内容
protected:
dfPluginFormatReader* m_pFormatReader;
};
};
using namespace NPluginFormat;
#endif //__DF_FORMAT_READER_BASE_H__