gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash/server textformat.cpp textformat.h asobj/...


From: Markus Gothe
Subject: [Gnash-commit] gnash/server textformat.cpp textformat.h asobj/...
Date: Sun, 08 Apr 2007 15:00:12 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Markus Gothe <nihilus>  07/04/08 15:00:12

Modified files:
        server         : textformat.cpp textformat.h 
Removed files:
        server/asobj   : TextFormat.cpp TextFormat.h 

Log message:
        Removed duplicates and added Id-tags to existing. Closing bug #19549

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/server/textformat.cpp?cvsroot=gnash&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/gnash/server/textformat.h?cvsroot=gnash&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/TextFormat.cpp?cvsroot=gnash&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/TextFormat.h?cvsroot=gnash&r1=1.1&r2=0

Patches:
Index: textformat.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/textformat.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- textformat.cpp      4 Apr 2007 20:30:45 -0000       1.22
+++ textformat.cpp      8 Apr 2007 15:00:12 -0000       1.23
@@ -15,7 +15,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 // 
-//
+// $Id: textformat.cpp,v 1.23 2007/04/08 15:00:12 nihilus Exp $
 //
 
 #include "log.h"

Index: textformat.h
===================================================================
RCS file: /sources/gnash/gnash/server/textformat.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- textformat.h        19 Mar 2007 17:11:14 -0000      1.13
+++ textformat.h        8 Apr 2007 15:00:12 -0000       1.14
@@ -15,7 +15,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 // 
-//
+// $Id: textformat.h,v 1.14 2007/04/08 15:00:12 nihilus Exp $
 //
 
 #ifndef __TEXTFORMAT_H__

Index: asobj/TextFormat.cpp
===================================================================
RCS file: asobj/TextFormat.cpp
diff -N asobj/TextFormat.cpp
--- asobj/TextFormat.cpp        5 Apr 2007 01:28:40 -0000       1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,108 +0,0 @@
-// 
-//   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-/* $Id: TextFormat.cpp,v 1.1 2007/04/05 01:28:40 nihilus Exp $ */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "TextFormat.h"
-#include "as_object.h" // for inheritance
-#include "log.h"
-#include "fn_call.h"
-#include "smart_ptr.h" // for boost intrusive_ptr
-#include "builtin_function.h" // need builtin_function
-
-
-as_value textformat_tostring(const fn_call& fn);
-as_value textformat_ctor(const fn_call& fn);
-
-static void
-attachTextFormatInterface(as_object& o)
-{
-       // is this really needed ? shouldn't toString be
-       // derived from Object inheritance ?
-       o.init_member("toString", new builtin_function(textformat_tostring));
-}
-
-static as_object*
-getTextFormatInterface()
-{
-       static boost::intrusive_ptr<as_object> o;
-       if ( ! o )
-       {
-               o = new as_object();
-               attachTextFormatInterface(*o);
-       }
-       return o.get();
-}
-
-class textformat_as_object: public as_object
-{
-
-public:
-
-       textformat_as_object()
-               :
-               as_object(getTextFormatInterface())
-       {}
-
-       // override from as_object ?
-       //const char* get_text_value() const { return "TextFormat"; }
-
-       // override from as_object ?
-       //double get_numeric_value() const { return 0; }
-};
-
-as_value textformat_tostring(const fn_call& /*fn*/) {
-    log_warning("%s: unimplemented \n", __FUNCTION__);
-    return as_value();
-}
-
-as_value
-textformat_ctor(const fn_call& /* fn */)
-{
-       boost::intrusive_ptr<as_object> obj = new textformat_as_object;
-       
-       return as_value(obj.get()); // will keep alive
-}
-
-// extern (used by Global.cpp)
-void textformat_class_init(as_object& global)
-{
-       // This is going to be the global TextFormat "class"/"function"
-       static boost::intrusive_ptr<builtin_function> cl;
-
-       if ( cl == NULL )
-       {
-               cl=new builtin_function(&textformat_ctor, 
getTextFormatInterface());
-               // replicate all interface to class, to be able to access
-               // all methods as static functions
-               attachTextFormatInterface(*cl);
-                    
-       }
-
-       // Register _global.TextFormat
-       global.init_member("TextFormat", cl.get());
-
-}
-
-
-} // end of gnash namespace
-

Index: asobj/TextFormat.h
===================================================================
RCS file: asobj/TextFormat.h
diff -N asobj/TextFormat.h
--- asobj/TextFormat.h  5 Apr 2007 01:28:40 -0000       1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,45 +0,0 @@
-// 
-//   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-/* $Id: TextFormat.h,v 1.1 2007/04/05 01:28:40 nihilus Exp $ */
-
-#ifndef __GNASH_ASOBJ_TEXTFORMAT_H__
-#define __GNASH_ASOBJ_TEXTFORMAT_H__
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-
-#include <memory> // for auto_ptr
-
-namespace gnash {
-
-class as_object;
-
-/// Initialize the global Boolean class
-void textformat_class_init(as_object& global);
-
-/// Return a TextFormat instance (in case the core lib needs it)
-//std::auto_ptr<as_object> init_textformat_instance();
-  
-} // end of gnash namespace
-
-// __GNASH_ASOBJ_BOOLEAN_H__
-#endif
-




reply via email to

[Prev in Thread] Current Thread [Next in Thread]