Mercurial > hg > svcore
comparison base/PlayParameterRepository.cpp @ 843:e802e550a1f2
Drop std:: from cout, cerr, endl -- pull these in through Debug.h
author | Chris Cannam |
---|---|
date | Tue, 26 Nov 2013 13:35:08 +0000 |
parents | 1424aa29ae95 |
children | 2d53205f70cd |
comparison
equal
deleted
inserted
replaced
842:23d3a6eca5c3 | 843:e802e550a1f2 |
---|---|
33 } | 33 } |
34 | 34 |
35 void | 35 void |
36 PlayParameterRepository::addPlayable(const Playable *playable) | 36 PlayParameterRepository::addPlayable(const Playable *playable) |
37 { | 37 { |
38 // std::cerr << "PlayParameterRepository:addPlayable " << playable << std::endl; | 38 // cerr << "PlayParameterRepository:addPlayable " << playable << endl; |
39 | 39 |
40 if (!getPlayParameters(playable)) { | 40 if (!getPlayParameters(playable)) { |
41 | 41 |
42 // Give all playables the same type of play parameters for the | 42 // Give all playables the same type of play parameters for the |
43 // moment | 43 // moment |
44 | 44 |
45 // std::cerr << "PlayParameterRepository: Adding play parameters for " << playable << std::endl; | 45 // cerr << "PlayParameterRepository: Adding play parameters for " << playable << endl; |
46 | 46 |
47 PlayParameters *params = new PlayParameters; | 47 PlayParameters *params = new PlayParameters; |
48 m_playParameters[playable] = params; | 48 m_playParameters[playable] = params; |
49 | 49 |
50 params->setPlayPluginId | 50 params->setPlayPluginId |
60 this, SLOT(playPluginIdChanged(QString))); | 60 this, SLOT(playPluginIdChanged(QString))); |
61 | 61 |
62 connect(params, SIGNAL(playPluginConfigurationChanged(QString)), | 62 connect(params, SIGNAL(playPluginConfigurationChanged(QString)), |
63 this, SLOT(playPluginConfigurationChanged(QString))); | 63 this, SLOT(playPluginConfigurationChanged(QString))); |
64 | 64 |
65 // std::cerr << "Connected play parameters " << params << " for playable " | 65 // cerr << "Connected play parameters " << params << " for playable " |
66 // << playable << " to this " << this << std::endl; | 66 // << playable << " to this " << this << endl; |
67 | 67 |
68 } | 68 } |
69 } | 69 } |
70 | 70 |
71 void | 71 void |
72 PlayParameterRepository::removePlayable(const Playable *playable) | 72 PlayParameterRepository::removePlayable(const Playable *playable) |
73 { | 73 { |
74 if (m_playParameters.find(playable) == m_playParameters.end()) { | 74 if (m_playParameters.find(playable) == m_playParameters.end()) { |
75 std::cerr << "WARNING: PlayParameterRepository::removePlayable: unknown playable " << playable << std::endl; | 75 cerr << "WARNING: PlayParameterRepository::removePlayable: unknown playable " << playable << endl; |
76 return; | 76 return; |
77 } | 77 } |
78 delete m_playParameters[playable]; | 78 delete m_playParameters[playable]; |
79 m_playParameters.erase(playable); | 79 m_playParameters.erase(playable); |
80 } | 80 } |
81 | 81 |
82 void | 82 void |
83 PlayParameterRepository::copyParameters(const Playable *from, const Playable *to) | 83 PlayParameterRepository::copyParameters(const Playable *from, const Playable *to) |
84 { | 84 { |
85 if (!getPlayParameters(from)) { | 85 if (!getPlayParameters(from)) { |
86 std::cerr << "ERROR: PlayParameterRepository::copyParameters: source playable unknown" << std::endl; | 86 cerr << "ERROR: PlayParameterRepository::copyParameters: source playable unknown" << endl; |
87 return; | 87 return; |
88 } | 88 } |
89 if (!getPlayParameters(to)) { | 89 if (!getPlayParameters(to)) { |
90 std::cerr << "WARNING: PlayParameterRepository::copyParameters: target playable unknown, adding it now" << std::endl; | 90 cerr << "WARNING: PlayParameterRepository::copyParameters: target playable unknown, adding it now" << endl; |
91 addPlayable(to); | 91 addPlayable(to); |
92 } | 92 } |
93 getPlayParameters(to)->copyFrom(getPlayParameters(from)); | 93 getPlayParameters(to)->copyFrom(getPlayParameters(from)); |
94 } | 94 } |
95 | 95 |
135 } | 135 } |
136 | 136 |
137 void | 137 void |
138 PlayParameterRepository::clear() | 138 PlayParameterRepository::clear() |
139 { | 139 { |
140 // std::cerr << "PlayParameterRepository: PlayParameterRepository::clear" << std::endl; | 140 // cerr << "PlayParameterRepository: PlayParameterRepository::clear" << endl; |
141 while (!m_playParameters.empty()) { | 141 while (!m_playParameters.empty()) { |
142 delete m_playParameters.begin()->second; | 142 delete m_playParameters.begin()->second; |
143 m_playParameters.erase(m_playParameters.begin()); | 143 m_playParameters.erase(m_playParameters.begin()); |
144 } | 144 } |
145 } | 145 } |