[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ./ChangeLog server/Movie.cpp server/Movie.h
From: |
Bastiaan Jacques |
Subject: |
[Gnash-commit] gnash ./ChangeLog server/Movie.cpp server/Movie.h |
Date: |
Sun, 23 Apr 2006 11:20:40 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Branch:
Changes by: Bastiaan Jacques <address@hidden> 06/04/23 11:20:40
Modified files:
. : ChangeLog
server : Movie.cpp Movie.h
Log message:
* server/Movie.h: make movie_def_impl a friend of import_info.
* server/Movie.cpp: adjust the users of import_info to match
changes to Movie.h.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/ChangeLog.diff?tr1=1.225&tr2=1.226&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/Movie.cpp.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/Movie.h.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
Patches:
Index: gnash/ChangeLog
diff -u gnash/ChangeLog:1.225 gnash/ChangeLog:1.226
--- gnash/ChangeLog:1.225 Sun Apr 23 02:51:44 2006
+++ gnash/ChangeLog Sun Apr 23 11:20:40 2006
@@ -1,3 +1,9 @@
+2006-04-23 Bastiaan Jacques <address@hidden>
+
+ * server/Movie.h: make movie_def_impl a friend of import_info.
+ * server/Movie.cpp: adjust the users of import_info to match
+ changes to Movie.h.
+
2006-04-22 Rob Savoye <address@hidden>
* doc/omf.make: Rename omf-hook to be more consistant.
Index: gnash/server/Movie.cpp
diff -u gnash/server/Movie.cpp:1.14 gnash/server/Movie.cpp:1.15
--- gnash/server/Movie.cpp:1.14 Sat Apr 22 19:22:00 2006
+++ gnash/server/Movie.cpp Sun Apr 23 11:20:40 2006
@@ -154,7 +154,7 @@
{
for (int i = 0, n = m_imports.size(); i < n; i++)
{
- if (m_imports[i].get_character_id() == character_id)
+ if (m_imports[i].m_character_id == character_id)
{
return true;
}
@@ -168,14 +168,12 @@
for (int i = 0, n = m_imports.size(); i < n; i++)
{
- import_info& inf = m_imports[i];
- if (visited.find(inf.get_source_url()) == visited.end())
+ const import_info& inf = m_imports[i];
+ if (visited.find(inf.m_source_url) == visited.end())
{
// Call back the visitor.
- tu_string tmp = inf.get_source_url();
-
- visitor->visit(tmp.c_str());
- visited[tmp] = true;
+ visitor->visit(inf.m_source_url.c_str());
+ visited[inf.m_source_url] = true;
}
}
}
@@ -192,33 +190,33 @@
for (int i = m_imports.size() - 1; i >= 0; i--)
{
const import_info& inf = m_imports[i];
- if (inf.get_source_url() == source_url)
+ if (inf.m_source_url == source_url)
{
// Do the import.
- smart_ptr<resource> res =
def->get_exported_resource(inf.get_symbol());
+ smart_ptr<resource> res =
def->get_exported_resource(inf.m_symbol);
bool imported = true;
if (res == NULL)
{
log_error("import error: resource '%s' is not
exported from movie '%s'\n",
- inf.get_symbol().c_str(), source_url);
+ inf.m_symbol.c_str(), source_url);
}
else if (font* f = res->cast_to_font())
{
// Add this shared font to our fonts.
- add_font(inf.get_character_id(), f);
+ add_font(inf.m_character_id, f);
imported = true;
}
else if (character_def* ch = res->cast_to_character_def())
{
// Add this character to our characters.
- add_character(inf.get_character_id(), ch);
+ add_character(inf.m_character_id, ch);
imported = true;
}
else
{
log_error("import error: resource '%s' from movie
'%s' has unknown type\n",
- inf.get_symbol().c_str(), source_url);
+ inf.m_symbol.c_str(), source_url);
}
if (imported)
Index: gnash/server/Movie.h
diff -u gnash/server/Movie.h:1.11 gnash/server/Movie.h:1.12
--- gnash/server/Movie.h:1.11 Sat Apr 22 19:22:00 2006
+++ gnash/server/Movie.h Sun Apr 23 11:20:40 2006
@@ -80,7 +80,12 @@
//
class import_info
{
- public:
+ friend class movie_def_impl;
+
+ tu_string m_source_url;
+ int m_character_id;
+ tu_string m_symbol;
+
import_info()
:
m_character_id(-1)
@@ -89,25 +94,11 @@
import_info(const char* source, int id, const char* symbol)
:
- m_character_id(id),
m_source_url(source),
+ m_character_id(id),
m_symbol(symbol)
{
}
-
- const int& get_character_id() const { return m_character_id; }
- const tu_string& get_source_url() const { return m_source_url; }
- const tu_string& get_symbol() const { return m_symbol; }
-#if 0
- /* These are unused currently. */
- void set_source_url(const tu_string url) {m_source_url =
url; }
- void set_character_id(const int id) {m_character_id = id;
}
- void set_symbol(const tu_string sbl) {m_symbol =
sbl; }
-#endif
- private:
- int m_character_id;
- tu_string m_source_url;
- tu_string m_symbol;
};
/// Client program's interface to the definition of a movie