Private virtual functions are now protected, so that sub-classes can call them if necessary (and they appear in the API doc :)

This commit is contained in:
Laurent Gomila 2012-04-04 22:33:53 +02:00
parent 1a8488bd7b
commit 8c776f33c1
10 changed files with 67 additions and 59 deletions

View File

@ -58,7 +58,7 @@ public :
////////////////////////////////////////////////////////////
const SoundBuffer& getBuffer() const;
private :
protected:
////////////////////////////////////////////////////////////
/// \brief Start capturing audio data
@ -85,6 +85,8 @@ private :
////////////////////////////////////////////////////////////
virtual void onStop();
private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////

View File

@ -109,8 +109,6 @@ protected :
////////////////////////////////////////////////////////////
SoundRecorder();
private :
////////////////////////////////////////////////////////////
/// \brief Start capturing audio data
///
@ -151,6 +149,8 @@ private :
////////////////////////////////////////////////////////////
virtual void onStop();
private :
////////////////////////////////////////////////////////////
/// \brief Function called as the entry point of the thread
///

View File

@ -201,17 +201,6 @@ protected :
////////////////////////////////////////////////////////////
void initialize(unsigned int channelCount, unsigned int sampleRate);
private :
////////////////////////////////////////////////////////////
/// \brief Function called as the entry point of the thread
///
/// This function starts the streaming loop, and returns
/// only when the sound is stopped.
///
////////////////////////////////////////////////////////////
void streamData();
////////////////////////////////////////////////////////////
/// \brief Request a new chunk of audio samples from the stream source
///
@ -239,6 +228,17 @@ private :
////////////////////////////////////////////////////////////
virtual void onSeek(Time timeOffset) = 0;
private :
////////////////////////////////////////////////////////////
/// \brief Function called as the entry point of the thread
///
/// This function starts the streaming loop, and returns
/// only when the sound is stopped.
///
////////////////////////////////////////////////////////////
void streamData();
////////////////////////////////////////////////////////////
/// \brief Fill a new buffer with audio samples, and append
/// it to the playing queue

View File

@ -51,7 +51,7 @@ public :
////////////////////////////////////////////////////////////
virtual ~Drawable() {}
private :
protected :
friend class RenderTarget;

View File

@ -127,7 +127,7 @@ public :
////////////////////////////////////////////////////////////
Image capture() const;
private :
protected:
////////////////////////////////////////////////////////////
/// \brief Function called after the window has been created
@ -148,6 +148,8 @@ private :
////////////////////////////////////////////////////////////
virtual void onResize();
private :
////////////////////////////////////////////////////////////
/// \brief Activate the target for rendering
///

View File

@ -208,30 +208,11 @@ public:
Packet& operator <<(const std::wstring& data);
Packet& operator <<(const String& data);
private :
protected:
friend class TcpSocket;
friend class UdpSocket;
////////////////////////////////////////////////////////////
/// Disallow comparisons between packets
///
////////////////////////////////////////////////////////////
bool operator ==(const Packet& right) const;
bool operator !=(const Packet& right) const;
////////////////////////////////////////////////////////////
/// \brief Check if the packet can extract a given number of bytes
///
/// This function updates accordingly the state of the packet.
///
/// \param size Size to check
///
/// \return True if \a size bytes can be read from the packet
///
////////////////////////////////////////////////////////////
bool checkSize(std::size_t size);
////////////////////////////////////////////////////////////
/// \brief Called before the packet is sent over the network
///
@ -271,6 +252,27 @@ private :
////////////////////////////////////////////////////////////
virtual void onReceive(const void* data, std::size_t size);
private :
////////////////////////////////////////////////////////////
/// Disallow comparisons between packets
///
////////////////////////////////////////////////////////////
bool operator ==(const Packet& right) const;
bool operator !=(const Packet& right) const;
////////////////////////////////////////////////////////////
/// \brief Check if the packet can extract a given number of bytes
///
/// This function updates accordingly the state of the packet.
///
/// \param size Size to check
///
/// \return True if \a size bytes can be read from the packet
///
////////////////////////////////////////////////////////////
bool checkSize(std::size_t size);
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////

View File

@ -423,7 +423,7 @@ public :
////////////////////////////////////////////////////////////
WindowHandle getSystemHandle() const;
private :
protected :
////////////////////////////////////////////////////////////
/// \brief Function called after the window has been created
@ -444,6 +444,8 @@ private :
////////////////////////////////////////////////////////////
virtual void onResize();
private:
////////////////////////////////////////////////////////////
/// \brief Processes an event before it is sent to the user
///

View File

@ -81,8 +81,6 @@ public :
////////////////////////////////////////////////////////////
::Display* getDisplay() const;
private :
////////////////////////////////////////////////////////////
/// \brief Get the OS-specific handle of the window
///
@ -91,12 +89,6 @@ private :
////////////////////////////////////////////////////////////
virtual WindowHandle getSystemHandle() const;
////////////////////////////////////////////////////////////
/// \brief Process incoming events from the operating system
///
////////////////////////////////////////////////////////////
virtual void processEvents();
////////////////////////////////////////////////////////////
/// \brief Get the position of the window
///
@ -171,6 +163,14 @@ private :
////////////////////////////////////////////////////////////
virtual void setKeyRepeatEnabled(bool enabled);
protected :
////////////////////////////////////////////////////////////
/// \brief Process incoming events from the operating system
///
////////////////////////////////////////////////////////////
virtual void processEvents();
private :
////////////////////////////////////////////////////////////

View File

@ -70,8 +70,6 @@ public :
////////////////////////////////////////////////////////////
~WindowImplWin32();
private :
////////////////////////////////////////////////////////////
/// \brief Get the OS-specific handle of the window
///
@ -80,12 +78,6 @@ private :
////////////////////////////////////////////////////////////
virtual WindowHandle getSystemHandle() const;
////////////////////////////////////////////////////////////
/// \brief Process incoming events from the operating system
///
////////////////////////////////////////////////////////////
virtual void processEvents();
////////////////////////////////////////////////////////////
/// \brief Get the position of the window
///
@ -160,6 +152,14 @@ private :
////////////////////////////////////////////////////////////
virtual void setKeyRepeatEnabled(bool enabled);
protected:
////////////////////////////////////////////////////////////
/// \brief Process incoming events from the operating system
///
////////////////////////////////////////////////////////////
virtual void processEvents();
private :
////////////////////////////////////////////////////////////

View File

@ -211,6 +211,12 @@ protected :
////////////////////////////////////////////////////////////
void pushEvent(const Event& event);
////////////////////////////////////////////////////////////
/// \brief Process incoming events from the operating system
///
////////////////////////////////////////////////////////////
virtual void processEvents() = 0;
private :
////////////////////////////////////////////////////////////
@ -219,12 +225,6 @@ private :
////////////////////////////////////////////////////////////
void processJoystickEvents();
////////////////////////////////////////////////////////////
/// \brief Process incoming events from the operating system
///
////////////////////////////////////////////////////////////
virtual void processEvents() = 0;
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////