dxflib_qcad: cherry std::istream usage
upstream e0046e6dbff8148f5d8ef8e3f149ad99384c67a8
This commit is contained in:
parent
533d344e3f
commit
1703eb8494
|
@ -190,14 +190,14 @@ bool DL_Dxf::in( const std::string& file, DL_CreationInterface* creationInterfac
|
||||||
/**
|
/**
|
||||||
* Reads a DXF file from an existing stream.
|
* Reads a DXF file from an existing stream.
|
||||||
*
|
*
|
||||||
* @param stream The string stream.
|
* @param stream The input stream.
|
||||||
* @param creationInterface
|
* @param creationInterface
|
||||||
* Pointer to the class which takes care of the entities in the file.
|
* Pointer to the class which takes care of the entities in the file.
|
||||||
*
|
*
|
||||||
* @retval true If \p file could be opened.
|
* @retval true If \p file could be opened.
|
||||||
* @retval false If \p file could not be opened.
|
* @retval false If \p file could not be opened.
|
||||||
*/
|
*/
|
||||||
bool DL_Dxf::in( std::stringstream& stream,
|
bool DL_Dxf::in( std::istream& stream,
|
||||||
DL_CreationInterface* creationInterface )
|
DL_CreationInterface* creationInterface )
|
||||||
{
|
{
|
||||||
if( stream.good() )
|
if( stream.good() )
|
||||||
|
@ -258,9 +258,9 @@ bool DL_Dxf::readDxfGroups( FILE* fp, DL_CreationInterface* creationInterface )
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Same as above but for stringstreams.
|
* Same as above but for input streams.
|
||||||
*/
|
*/
|
||||||
bool DL_Dxf::readDxfGroups( std::stringstream& stream,
|
bool DL_Dxf::readDxfGroups( std::istream& stream,
|
||||||
DL_CreationInterface* creationInterface )
|
DL_CreationInterface* creationInterface )
|
||||||
{
|
{
|
||||||
static int line = 1;
|
static int line = 1;
|
||||||
|
@ -332,10 +332,10 @@ bool DL_Dxf::getStrippedLine( std::string& s, unsigned int size, FILE* fp, bool
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Same as above but for stringstreams.
|
* Same as above but for input streams.
|
||||||
*/
|
*/
|
||||||
bool DL_Dxf::getStrippedLine( std::string& s, unsigned int size,
|
bool DL_Dxf::getStrippedLine( std::string& s, unsigned int size,
|
||||||
std::stringstream& stream, bool stripSpace )
|
std::istream& stream, bool stripSpace )
|
||||||
{
|
{
|
||||||
if( !stream.eof() )
|
if( !stream.eof() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -130,12 +130,12 @@ public:
|
||||||
static bool getStrippedLine( std::string& s, unsigned int size,
|
static bool getStrippedLine( std::string& s, unsigned int size,
|
||||||
FILE* stream, bool stripSpace = true );
|
FILE* stream, bool stripSpace = true );
|
||||||
|
|
||||||
bool readDxfGroups( std::stringstream& stream,
|
bool readDxfGroups( std::istream& stream,
|
||||||
DL_CreationInterface* creationInterface );
|
DL_CreationInterface* creationInterface );
|
||||||
bool in( std::stringstream& stream,
|
bool in( std::istream& stream,
|
||||||
DL_CreationInterface* creationInterface );
|
DL_CreationInterface* creationInterface );
|
||||||
static bool getStrippedLine( std::string& s, unsigned int size,
|
static bool getStrippedLine( std::string& s, unsigned int size,
|
||||||
std::stringstream& stream, bool stripSpace = true );
|
std::istream& stream, bool stripSpace = true );
|
||||||
|
|
||||||
static bool stripWhiteSpace( char** s, bool stripSpaces = true );
|
static bool stripWhiteSpace( char** s, bool stripSpaces = true );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue