[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/rtmp r9668: Add options for 'testing' and
From: |
rob |
Subject: |
[Gnash-commit] /srv/bzr/gnash/rtmp r9668: Add options for 'testing' and 'threading' to help with debugging and testing. |
Date: |
Tue, 28 Oct 2008 08:46:59 -0600 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9668
committer: address@hidden
branch nick: rtmp
timestamp: Tue 2008-10-28 08:46:59 -0600
message:
Add options for 'testing' and 'threading' to help with debugging and testing.
modified:
cygnal/crc.cpp
cygnal/crc.h
=== modified file 'cygnal/crc.cpp'
--- a/cygnal/crc.cpp 2008-09-07 13:30:34 +0000
+++ b/cygnal/crc.cpp 2008-10-28 14:46:59 +0000
@@ -55,7 +55,10 @@
return crcfile;
}
-CRcInitFile::CRcInitFile() : _port_offset(0)
+CRcInitFile::CRcInitFile()
+ : _port_offset(0),
+ _testing(false),
+ _threading(false)
{
// GNASH_REPORT_FUNCTION;
loadFiles();
@@ -170,14 +173,21 @@
}
bool test;
+ bool threads;
uint32_t num;
+ // Get the standard options inherited froom Gnash's config file
if ( extractSetting(test, "actionDump", variable, value) )
useParserDump(test);
else if ( extractSetting(test, "parserDump", variable, value) )
useActionDump(test);
else if ( extractNumber(num, "verbosity", variable, value) )
verbosityLevel(num);
+ // Get the options specific to Cygnal's config file.
+ else if ( extractSetting(test, "testing", variable, value) )
+ setTestingFlag(test);
+ else if ( extractSetting(threads, "threading", variable, value) )
+ setThreadingFlag(threads);
else extractNumber((uint32_t&)_port_offset, "portOffset",
variable, value);
} while (!in.eof());
@@ -197,12 +207,21 @@
}
void
-CRcInitFile::dump()
+CRcInitFile::dump(std::ostream& os) const
{
cerr << endl << "Dump CRcInitFile:" << endl;
+ cerr << "\tVerbosity Level: " << _verbosity << endl;
+ cerr << "\tDump ActionScript processing: "
+ << ((_actionDump)?"enabled":"disabled") << endl;
+ cerr << "\tDump parser info: "
+ << ((_parserDump)?"enabled":"disabled") << endl;
+ cerr << "\tActionScript coding errors verbosity: "
+ << ((_verboseASCodingErrors)?"enabled":"disabled") << endl;
cerr << "\tPort Offset: " << _port_offset << endl;
+ cerr << "\tSpecial Testing output for Gnash: "
+ << ((_testing)?"enabled":"disabled") << endl;
- RcInitFile::dump();
+// RcInitFile::dump();
}
} // end of namespace cygnal
=== modified file 'cygnal/crc.h'
--- a/cygnal/crc.h 2008-01-21 20:55:39 +0000
+++ b/cygnal/crc.h 2008-10-28 14:46:59 +0000
@@ -25,25 +25,53 @@
#include <string>
#include <vector>
+#include <iostream> // for output operator
#include "rc.h"
+/// \namespace cygnal
+///
+/// This namespace is for all the Cygnal specific classes not used by
+/// anything else in Gnash.
namespace cygnal {
-
+
+/// \class cygnal::CRcInitFile
+/// This class handles reading values from the Cygnal
+/// configuration file, .cygnalrc, and into a form we can use in
+/// Cygnal.
class DSOEXPORT CRcInitFile : public gnash::RcInitFile
{
public:
-
+ /// \brief Return the default instance of RC file,
+ static CRcInitFile& getDefaultInstance();
+
+ /// \brief Load all the configuration files.
+ /// This includes parsing the default .gnashrc file for
+ /// Gnash settings that control the swf parser and virtual
+ /// machine. These setting can be overridden in the
+ /// .cygnalrc file, plus the Cygnal specific file has
+ /// options only used by Cygnal.
bool loadFiles();
+
+ /// \brief Parse and load configuration file
bool parseFile(const std::string& filespec);
- // Return the default instance of RC file,
- static CRcInitFile& getDefaultInstance();
- void dump();
-
int getPortOffset() { return _port_offset; };
void setPortOffset(int x) { _port_offset = x; };
-
+
+ int getTestingFlag() { return _testing; };
+ void setTestingFlag(bool x) { _testing = x; };
+
+ int getThreadingFlag() { return _threading; };
+ void setThreadingFlag(bool x) { _threading = x; };
+
+ /// \brief Dump the internal data of this class in a human readable form.
+ /// @remarks This should only be used for debugging purposes.
+ void dump() const { dump(std::cerr); }
+
+ /// \overload dump(std::ostream& os) const
+ void dump(std::ostream& os) const;
+
private:
/// Construct only by getDefaultInstance()
CRcInitFile();
@@ -51,9 +79,16 @@
~CRcInitFile();
int _port_offset;
+ bool _testing;
+ bool _threading;
};
-//extern DSOEXPORT CRcInitFile crcfile;
+/// \brief Dump to the specified output stream.
+inline std::ostream& operator << (std::ostream& os, const CRcInitFile& crcini)
+{
+ crcini.dump(os);
+ return os;
+}
// End of gnash namespace
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/rtmp r9668: Add options for 'testing' and 'threading' to help with debugging and testing.,
rob <=