/[usata]/usata2/src/scene-manager.cpp
ViewVC logotype

Diff of /usata2/src/scene-manager.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by skunix, Fri Dec 31 07:27:46 2004 UTC revision 1.3 by skunix, Sun Jan 2 02:41:10 2005 UTC
# Line 14  Line 14 
14    
15  #include "scene-manager.hpp"  #include "scene-manager.hpp"
16  #include <map>  #include <map>
17    #include <boost/lambda/bind.hpp>
18    #include <boost/lambda/lambda.hpp>
19  namespace  namespace
20  usata  usata
21  {  {
# Line 21  usata Line 23  usata
23    
24  namespace SM_internal  namespace SM_internal
25  {  {
26    
27    template <typename P>
28    struct FW : public std::unary_function<P,void>
29    {
30            void operator()(P t)
31            {
32                    t.second->draw();
33            }
34    };
35  struct Impl  struct Impl
36  {  {
37    
# Line 30  struct Impl Line 41  struct Impl
41          typedef std::map<std::string, Object_sp> ChildrenMap;          typedef std::map<std::string, Object_sp> ChildrenMap;
42          ChildrenMap children;          ChildrenMap children;
43          Object* get_ptr(const std::string&);          Object* get_ptr(const std::string&);
44    
45            void draw()
46            {
47                    using namespace ::boost::lambda;
48                    std::for_each(children.begin(), children.end(),
49                                    FW<ChildrenMap::value_type>());
50        }
51                                    
52          AddStatus add(const Object_sp& obj)          AddStatus add(const Object_sp& obj)
53          {          {

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26