Improved various DTSC toPrettyString functions to be able to handle std::ostream instead of std::stringstream.
This commit is contained in:
parent
0e5d838a20
commit
dbf0b74e0a
2 changed files with 21 additions and 15 deletions
14
lib/dtsc.h
14
lib/dtsc.h
|
@ -155,7 +155,7 @@ namespace DTSC {
|
|||
long getOffset();
|
||||
void setOffset(long newOffset);
|
||||
char * getData();
|
||||
void toPrettyString(std::stringstream & str, int indent = 0);
|
||||
void toPrettyString(std::ostream & str, int indent = 0);
|
||||
private:
|
||||
///\brief Data storage for this packet.
|
||||
///
|
||||
|
@ -181,7 +181,7 @@ namespace DTSC {
|
|||
long getTime();
|
||||
void setTime(long newTime);
|
||||
char * getData();
|
||||
void toPrettyString(std::stringstream & str, int indent = 0);
|
||||
void toPrettyString(std::ostream & str, int indent = 0);
|
||||
private:
|
||||
///\brief Data storage for this packet.
|
||||
///
|
||||
|
@ -205,7 +205,7 @@ namespace DTSC {
|
|||
long getSize();
|
||||
void setSize(long newSize);
|
||||
char * getData();
|
||||
void toPrettyString(std::stringstream & str, int indent = 0);
|
||||
void toPrettyString(std::ostream & str, int indent = 0);
|
||||
private:
|
||||
char data[11];
|
||||
};
|
||||
|
@ -245,7 +245,7 @@ namespace DTSC {
|
|||
//vorbis and theora only
|
||||
std::string idHeader;
|
||||
std::string commentHeader;
|
||||
void toPrettyString(std::stringstream & str, int indent = 0, int verbosity = 0);
|
||||
void toPrettyString(std::ostream & str, int indent = 0, int verbosity = 0);
|
||||
};
|
||||
|
||||
class Track : public readOnlyTrack {
|
||||
|
@ -267,7 +267,7 @@ namespace DTSC {
|
|||
std::deque<Part> parts;
|
||||
Key & getKey(unsigned int keyNum);
|
||||
void reset();
|
||||
void toPrettyString(std::stringstream & str, int indent = 0, int verbosity = 0);
|
||||
void toPrettyString(std::ostream & str, int indent = 0, int verbosity = 0);
|
||||
};
|
||||
|
||||
class readOnlyMeta {
|
||||
|
@ -288,7 +288,7 @@ namespace DTSC {
|
|||
void writeTo(char * p);
|
||||
JSON::Value toJSON();
|
||||
bool isFixed();
|
||||
void toPrettyString(std::stringstream & str, int indent = 0, int verbosity = 0);
|
||||
void toPrettyString(std::ostream & str, int indent = 0, int verbosity = 0);
|
||||
};
|
||||
|
||||
class Meta : public readOnlyMeta {
|
||||
|
@ -305,7 +305,7 @@ namespace DTSC {
|
|||
JSON::Value toJSON();
|
||||
void reset();
|
||||
bool isFixed();
|
||||
void toPrettyString(std::stringstream & str, int indent = 0, int verbosity = 0);
|
||||
void toPrettyString(std::ostream & str, int indent = 0, int verbosity = 0);
|
||||
};
|
||||
|
||||
/// A simple wrapper class that will open a file and allow easy reading/writing of DTSC data from/to it.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue