Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/headers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29764/adobe-source/adobe/test/visual/headers
Modified Files:
express_viewer.hpp ui_core.hpp
Log Message:
Adding error diagnostics to xstr; beginning metrics work on Mac Begin
Index: ui_core.hpp
===================================================================
RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/headers/ui_core.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** ui_core.hpp 10 Apr 2005 01:24:35 -0000 1.5
--- ui_core.hpp 12 Apr 2005 17:24:46 -0000 1.6
***************
*** 15,18 ****
--- 15,19 ----
#include <boost/operators.hpp>
+ #include <adobe/config.hpp>
#include <adobe/value.hpp>
#include <adobe/dictionary.hpp>
***************
*** 249,253 ****
#if ADOBE_PLATFORM_MAC
return format<adobe::value_t>(adobe::value_t(x));
! #elif defined(BOOST_MSVC)
// Stub for now because the above produces and internal compiler error in MSVC.
std::stringstream stream;
--- 250,254 ----
#if ADOBE_PLATFORM_MAC
return format<adobe::value_t>(adobe::value_t(x));
! #elif ADOBE_PLATFORM_WIN
// Stub for now because the above produces and internal compiler error in MSVC.
std::stringstream stream;
***************
*** 262,266 ****
#if ADOBE_PLATFORM_MAC
return parse<adobe::value_t>(str, adobe::value_t(Numeric())).template get<Numeric>();
! #elif defined(BOOST_MSVC)
return Numeric(std::atof(str.c_str())); // Stub for now because the above produces and internal compiler error in MSVC.
#endif
--- 263,267 ----
#if ADOBE_PLATFORM_MAC
return parse<adobe::value_t>(str, adobe::value_t(Numeric())).template get<Numeric>();
! #elif ADOBE_PLATFORM_WIN
return Numeric(std::atof(str.c_str())); // Stub for now because the above produces and internal compiler error in MSVC.
#endif
Index: express_viewer.hpp
===================================================================
RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/headers/express_viewer.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** express_viewer.hpp 23 Mar 2005 18:51:58 -0000 1.2
--- express_viewer.hpp 12 Apr 2005 17:24:45 -0000 1.3
***************
*** 14,19 ****
--- 14,21 ----
#include "client_assembler.hpp"
#include <adobe/adam.hpp>
+ #include <adobe/config.hpp>
#include <string>
+ #include <iostream>
/****************************************************************************************************/
***************
*** 24,27 ****
--- 26,62 ----
//
+ /// The stream_sucker is used to extract the data available from a stream and
+ /// deposit it into a string. This is not very efficient but works for a
+ /// demo application.
+ ///
+ /// \param stream the stream to extract data from.
+ /// \return all of the data in the stream.
+ //
+ template<typename InputStream>
+ std::string stream_sucker( InputStream& stream )
+ {
+ std::string result;
+
+ if ( stream.is_open() )
+ {
+ std::istream::char_type c( 0 );
+ //
+ // Read from the stream character by character until we
+ // reach the end.
+ //
+ while( !stream.eof() )
+ {
+ stream.get( c );
+ if ( c == '\n' ) c = '\r';
+ if ( !stream.eof() ) result += c;
+ }
+ }
+
+ return result;
+ }
+
+ /****************************************************************************************************/
+
+ //
/// The simpleApplication class is implemented in express_viewer.cpp and defines
/// the basic application operation. The simpleApplication class is a singleton,
***************
*** 87,90 ****
--- 122,134 ----
void _editor_op( adobe::name_t name, const adobe::value_t& value );
+ #if ADOBE_PLATFORM_MAC
+ //
+ /// The Mac has inherently bad metric information provided to us from the OS
+ /// So here we load up an xstr glossary that contains for us metric information
+ /// on the various platform widgets.
+ //
+ void _load_metrics_glossary();
+ #endif
+
public:
//
|