Public Member Functions |
| | DxfParser (const vtString &sFileName, std::vector< DxfEntity > &entities, std::vector< DxfLayer > &layers) |
| bool | RetrieveEntities (bool progress_callback(int)=NULL) |
|
vtString | GetFileName () |
|
void | SetFileName (const vtString &sFileName) |
|
vtString | GetLastError () |
Protected Member Functions |
|
bool | ParseSection () |
|
bool | ReadCodeValue (DxfCodeValue &) |
|
void | SkipSection () |
|
void | ReadTableSection (bool progress_callback(int)) |
|
void | ReadEntitySection (bool progress_callback(int)) |
|
void | ReadLayer () |
|
void | ReadPoint () |
|
void | ReadText () |
|
void | ReadPolyline () |
|
void | ReadLine () |
|
void | ReadVertex (std::vector< DPoint3 > &) |
|
int | GetLayerIndex (const vtString &) |
|
void | ReadLWPolyline () |
|
void | Read3DFace () |
Protected Attributes |
|
std::vector< DxfEntity > & | m_entities |
|
std::vector< DxfLayer > & | m_layers |
|
vtString | m_sFileName |
|
FILE * | m_pFile |
|
size_t | m_iLine |
|
size_t | m_iLineCount |
|
int | m_iCounter |
|
long | m_iEndPosition |
|
vtString | m_strMessage |
This class parses the entire contents of a DXF file. It is up to the caller to go through the resulting entities and use what is desired.
- Example:
std::vector<DxfEntity> entities;
std::vector<DxfLayer> layers;
DxfParser parser(fname, entities, layers);
bool bSuccess = parser.RetrieveEntities();
if (bSuccess)
{
}