Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::IO Namespace Reference

Low-level IO code. More...

Namespaces

namespace  Resource
 
namespace  Sandbox
 

Classes

class  BasicInputStream
 This is the class that most users should inherit, to provide their own streams. More...
 
class  BasicOutputStream
 This is the class that most users should inherit, to provide their own output streams. More...
 
class  BasicReader
 This class and its descendants are for unicode character-oriented input. More...
 
class  BasicWriter
 This class and its descendants are for unicode character-oriented output. More...
 
class  BufferInputStream
 This class is for reading character from a DOMString. More...
 
class  BufferOutputStream
 This class is for sending a stream to a character buffer. More...
 
class  FileInputStream
 This class is for receiving a stream of data from a file. More...
 
class  FileOutputStream
 This class is for sending a stream to a destination file. More...
 
class  GzipInputStream
 This class is for deflating a gzip-compressed InputStream source. More...
 
class  GzipOutputStream
 This class is for gzip-compressing data going to the destination OutputStream. More...
 
class  InputStream
 This interface is the base of all input stream classes. More...
 
class  InputStreamReader
 Class for placing a Reader on an open InputStream. More...
 
class  OutputStream
 This interface is the base of all input stream classes. More...
 
class  OutputStreamWriter
 Class for placing a Writer on an open OutputStream. More...
 
class  Reader
 This interface and its descendants are for unicode character-oriented input. More...
 
class  StdInputStream
 Convenience class for reading from standard input. More...
 
class  StdOutputStream
 Convenience class for writing to standard output. More...
 
class  StdReader
 Convenience class for reading formatted from standard input. More...
 
class  StdWriter
 Convenience class for writing to standard output. More...
 
class  StreamException
 
class  StringInputStream
 This class is for reading character from a Glib::ustring. More...
 
class  StringOutputStream
 This class is for sending a stream to a Glib::ustring. More...
 
class  TempFilename
 
class  Writer
 This interface and its descendants are for unicode character-oriented output. More...
 
class  XsltInputStream
 This class is for transforming stream input by a given stylesheet. More...
 
class  XsltOutputStream
 This class is for transforming stream output by a given stylesheet. More...
 
class  XsltStyleSheet
 This is a container for reusing a loaded stylesheet. More...
 

Functions

std::string find_original_file (Glib::StdStringView const filepath, Glib::StdStringView const name)
 Takes an absolute file path and returns a second file at the same directory location, if and only if the filename exists and is a file.
 
void pipeStream (InputStream &source, OutputStream &dest)
 
static bool getLong (Glib::ustring &str, long *val)
 
static bool getULong (Glib::ustring &str, unsigned long *val)
 
static bool getDouble (Glib::ustring &str, double *val)
 
Writeroperator<< (Writer &writer, char val)
 
Writeroperator<< (Writer &writer, Glib::ustring &val)
 
Writeroperator<< (Writer &writer, std::string &val)
 
Writeroperator<< (Writer &writer, char const *val)
 
Writeroperator<< (Writer &writer, bool val)
 
Writeroperator<< (Writer &writer, short val)
 
Writeroperator<< (Writer &writer, unsigned short val)
 
Writeroperator<< (Writer &writer, int val)
 
Writeroperator<< (Writer &writer, unsigned int val)
 
Writeroperator<< (Writer &writer, long val)
 
Writeroperator<< (Writer &writer, unsigned long val)
 
Writeroperator<< (Writer &writer, float val)
 
Writeroperator<< (Writer &writer, double val)
 
void dump_fopen_call (char const *utf8name, char const *id)
 
FILE * fopen_utf8name (char const *utf8name, char const *mode)
 Open a file with g_fopen().
 
bool file_test (char const *utf8name, GFileTest test)
 
bool file_is_writable (char const *utf8name)
 
Glib::ustring sanitizeString (char const *str)
 
Glib::ustring get_file_extension (Glib::ustring const &path)
 
std::string get_file_extension (std::string const &path)
 
void remove_file_extension (std::string &path)
 Removes a file extension, if found, from the given path.
 

Detailed Description

Low-level IO code.

This namespace contains low level IO-related code, including a homegrown streams implementation, routines for formatting SVG output, and some file handling utility functions.

Function Documentation

◆ dump_fopen_call()

◆ file_is_writable()

bool Inkscape::IO::file_is_writable ( char const *  utf8name)

Definition at line 149 of file sys.cpp.

Referenced by Inkscape::Extension::save().

◆ file_test()

◆ find_original_file()

std::string Inkscape::IO::find_original_file ( Glib::StdStringView const  filepath,
Glib::StdStringView const  name 
)

Takes an absolute file path and returns a second file at the same directory location, if and only if the filename exists and is a file.

Returns the empty string if the new file is not found.

Definition at line 150 of file file.cpp.

References name.

Referenced by InkscapeApplication::document_open().

◆ fopen_utf8name()

◆ get_file_extension() [1/2]

◆ get_file_extension() [2/2]

std::string Inkscape::IO::get_file_extension ( std::string const &  path)

Definition at line 224 of file sys.cpp.

◆ getDouble()

static bool Inkscape::IO::getDouble ( Glib::ustring &  str,
double *  val 
)
static

◆ getLong()

static bool Inkscape::IO::getLong ( Glib::ustring &  str,
long *  val 
)
static

◆ getULong()

static bool Inkscape::IO::getULong ( Glib::ustring &  str,
unsigned long *  val 
)
static

◆ operator<<() [1/13]

Writer & Inkscape::IO::operator<< ( Writer writer,
bool  val 
)

Definition at line 676 of file inkscapestream.cpp.

References Inkscape::IO::Writer::writeBool().

◆ operator<<() [2/13]

Writer & Inkscape::IO::operator<< ( Writer writer,
char const *  val 
)

Definition at line 673 of file inkscapestream.cpp.

References Inkscape::IO::Writer::writeString().

◆ operator<<() [3/13]

Writer & Inkscape::IO::operator<< ( Writer writer,
char  val 
)

Definition at line 664 of file inkscapestream.cpp.

References Inkscape::IO::Writer::writeChar().

◆ operator<<() [4/13]

Writer & Inkscape::IO::operator<< ( Writer writer,
double  val 
)

Definition at line 700 of file inkscapestream.cpp.

References Inkscape::IO::Writer::writeDouble().

◆ operator<<() [5/13]

Writer & Inkscape::IO::operator<< ( Writer writer,
float  val 
)

Definition at line 697 of file inkscapestream.cpp.

References Inkscape::IO::Writer::writeFloat().

◆ operator<<() [6/13]

Writer & Inkscape::IO::operator<< ( Writer writer,
Glib::ustring &  val 
)

Definition at line 667 of file inkscapestream.cpp.

References Inkscape::IO::Writer::writeUString().

◆ operator<<() [7/13]

Writer & Inkscape::IO::operator<< ( Writer writer,
int  val 
)

Definition at line 685 of file inkscapestream.cpp.

References Inkscape::IO::Writer::writeInt().

◆ operator<<() [8/13]

Writer & Inkscape::IO::operator<< ( Writer writer,
long  val 
)

Definition at line 691 of file inkscapestream.cpp.

References Inkscape::IO::Writer::writeLong().

◆ operator<<() [9/13]

Writer & Inkscape::IO::operator<< ( Writer writer,
short  val 
)

Definition at line 679 of file inkscapestream.cpp.

References Inkscape::IO::Writer::writeShort().

◆ operator<<() [10/13]

Writer & Inkscape::IO::operator<< ( Writer writer,
std::string &  val 
)

Definition at line 670 of file inkscapestream.cpp.

References Inkscape::IO::Writer::writeStdString().

◆ operator<<() [11/13]

Writer & Inkscape::IO::operator<< ( Writer writer,
unsigned int  val 
)

Definition at line 688 of file inkscapestream.cpp.

References Inkscape::IO::Writer::writeUnsignedInt().

◆ operator<<() [12/13]

Writer & Inkscape::IO::operator<< ( Writer writer,
unsigned long  val 
)

Definition at line 694 of file inkscapestream.cpp.

References Inkscape::IO::Writer::writeUnsignedLong().

◆ operator<<() [13/13]

Writer & Inkscape::IO::operator<< ( Writer writer,
unsigned short  val 
)

Definition at line 682 of file inkscapestream.cpp.

References Inkscape::IO::Writer::writeUnsignedShort().

◆ pipeStream()

◆ remove_file_extension()

void Inkscape::IO::remove_file_extension ( std::string &  path)

Removes a file extension, if found, from the given path.

Definition at line 233 of file sys.cpp.

References get_file_extension().

Referenced by Inkscape::UI::Dialog::BatchExport::getBatchName().

◆ sanitizeString()

Glib::ustring Inkscape::IO::sanitizeString ( char const *  str)