MyDXFFile Class Reference

DXF file class. More...

#include <mydxffile.hpp>

List of all members.

Public Member Functions

 MyDXFFile ()
 Construct empty DXF file.
 MyDXFFile (const std::string &filename)
 Construct by reading a DXF file.
 ~MyDXFFile ()
 Destructor.
void read (const std::string &filename)
 Read DXF file.
void write (const std::string &filename)
 Write DXF file.
void set_warning_level (int wlevel)
 Set the level of warning messages.
int wlevel (void)
 Get the level of warning messages.
void write_group (int code, const char *data)
 Write string group to output file.
void write_group (int code, double data)
 Write double group to output file.
void write_group (int code, bool data)
 Write bool group to output file.
void write_group (int code, int8_t data)
 Write int8_t group to output file.
void write_group (int code, int16_t data)
 Write int16_t group to output file.
void write_group (int code, int32_t data)
 Write int32_t group to output file.
void write_group (int code, int64_t data)
 Write int64_t group to output file.
int read_group (void)
 Read next group from open file and return group code.
int group_get_code (void) const
 Get code of the last group read.
std::string group_get_string (void) const
 Get the value of the last group read assuming it is a string.
double group_get_double (void) const
 Get the value of the last group read assuming it is a double.
bool group_get_bool (void) const
 Get the value of the last group read assuming it is a bool.
int8_t group_get_int8 (void) const
 Get the value of the last group read assuming it is a int8.
int16_t group_get_int16 (void) const
 Get the value of the last group read assuming it is a int16.
int32_t group_get_int32 (void) const
 Get the value of the last group read assuming it is a int32.
int64_t group_get_int64 (void) const
 Get the value of the last group read assuming it is a int64.
int linec (void) const
 Get the current line number in DXF file during read.
MyDXFEntitiesget_entities (void)
 Get a pointer to the entities of DXF file.
MyDXFEntitiesget_entities (void) const
 Get a const pointer to the entities of DXF file.
MyDXFBlocksget_blocks (void)
 Get a pointer to the blocks of DXF file.
MyDXFBlocksget_blocks (void) const
 Get a const pointer to the blocks of DXF file.
void debug_print (std::ostream &os) const
 Print debugging information to os.


Detailed Description

DXF file class.

This class is a memory representation of a dxf file read from the disc. The class can be used to read a dxf file. All supported features are saved to the hierarchy, all others are silently ignored.


Constructor & Destructor Documentation

MyDXFFile::MyDXFFile (  ) 

Construct empty DXF file.

MyDXFFile::MyDXFFile ( const std::string &  filename  ) 

Construct by reading a DXF file.

MyDXFFile::~MyDXFFile (  ) 

Destructor.


Member Function Documentation

void MyDXFFile::debug_print ( std::ostream &  os  )  const

Print debugging information to os.

class MyDXFBlocks* MyDXFFile::get_blocks ( void   )  const [inline]

Get a const pointer to the blocks of DXF file.

class MyDXFBlocks* MyDXFFile::get_blocks ( void   )  [inline]

Get a pointer to the blocks of DXF file.

class MyDXFEntities* MyDXFFile::get_entities ( void   )  const [inline]

Get a const pointer to the entities of DXF file.

class MyDXFEntities* MyDXFFile::get_entities ( void   )  [inline]

Get a pointer to the entities of DXF file.

bool MyDXFFile::group_get_bool ( void   )  const

Get the value of the last group read assuming it is a bool.

An error is thrown if group type does not match.

int MyDXFFile::group_get_code ( void   )  const

Get code of the last group read.

double MyDXFFile::group_get_double ( void   )  const

Get the value of the last group read assuming it is a double.

An error is thrown if group type does not match.

int16_t MyDXFFile::group_get_int16 ( void   )  const

Get the value of the last group read assuming it is a int16.

An error is thrown if group type does not match.

int32_t MyDXFFile::group_get_int32 ( void   )  const

Get the value of the last group read assuming it is a int32.

An error is thrown if group type does not match.

int64_t MyDXFFile::group_get_int64 ( void   )  const

Get the value of the last group read assuming it is a int64.

An error is thrown if group type does not match.

int8_t MyDXFFile::group_get_int8 ( void   )  const

Get the value of the last group read assuming it is a int8.

An error is thrown if group type does not match.

std::string MyDXFFile::group_get_string ( void   )  const

Get the value of the last group read assuming it is a string.

An error is thrown if group type does not match.

int MyDXFFile::linec ( void   )  const [inline]

Get the current line number in DXF file during read.

void MyDXFFile::read ( const std::string &  filename  ) 

Read DXF file.

int MyDXFFile::read_group ( void   ) 

Read next group from open file and return group code.

Returns the group code read or -1 on EOF. An error is thrown on all other errors.

void MyDXFFile::set_warning_level ( int  wlevel  )  [inline]

Set the level of warning messages.

If wlevel is set to zero, no warnings will be printed. With increasing wlevel more warning messages are printed to standard output. With wlevel = 1 all unsupported features are reported.

int MyDXFFile::wlevel ( void   )  [inline]

Get the level of warning messages.

void MyDXFFile::write ( const std::string &  filename  ) 

Write DXF file.

void MyDXFFile::write_group ( int  code,
int64_t  data 
)

Write int64_t group to output file.

void MyDXFFile::write_group ( int  code,
int32_t  data 
)

Write int32_t group to output file.

void MyDXFFile::write_group ( int  code,
int16_t  data 
)

Write int16_t group to output file.

void MyDXFFile::write_group ( int  code,
int8_t  data 
)

Write int8_t group to output file.

void MyDXFFile::write_group ( int  code,
bool  data 
)

Write bool group to output file.

void MyDXFFile::write_group ( int  code,
double  data 
)

Write double group to output file.

void MyDXFFile::write_group ( int  code,
const char *  data 
)

Write string group to output file.


The documentation for this class was generated from the following file:
Generated on Thu Apr 21 13:39:22 2011 for IBSimu by  doxygen 1.4.7