Changed the naming convention for member variables (prefix changed from "my" to "m_")

This commit is contained in:
Laurent Gomila 2012-03-09 01:22:47 +01:00
parent 15e9d999b3
commit ff5b69d312
124 changed files with 1889 additions and 1889 deletions

View file

@ -162,10 +162,10 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
priv::SoundFile* myFile; ///< Sound file
Time myDuration; ///< Music duration
std::vector<Int16> mySamples; ///< Temporary buffer of samples
Mutex myMutex; ///< Mutex protecting the data
priv::SoundFile* m_file; ///< Sound file
Time m_duration; ///< Music duration
std::vector<Int16> m_samples; ///< Temporary buffer of samples
Mutex m_mutex; ///< Mutex protecting the data
};
} // namespace sf

View file

@ -215,7 +215,7 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
const SoundBuffer* myBuffer; ///< Sound buffer bound to the source
const SoundBuffer* m_buffer; ///< Sound buffer bound to the source
};
} // namespace sf

View file

@ -279,10 +279,10 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
unsigned int myBuffer; ///< OpenAL buffer identifier
std::vector<Int16> mySamples; ///< Samples buffer
Time myDuration; ///< Sound duration
mutable SoundList mySounds; ///< List of sounds that are using this buffer
unsigned int m_buffer; ///< OpenAL buffer identifier
std::vector<Int16> m_samples; ///< Samples buffer
Time m_duration; ///< Sound duration
mutable SoundList m_sounds; ///< List of sounds that are using this buffer
};
} // namespace sf

View file

@ -88,8 +88,8 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
std::vector<Int16> mySamples; ///< Temporary sample buffer to hold the recorded data
SoundBuffer myBuffer; ///< Sound buffer that will contain the recorded data
std::vector<Int16> m_samples; ///< Temporary sample buffer to hold the recorded data
SoundBuffer m_buffer; ///< Sound buffer that will contain the recorded data
};
} // namespace sf

View file

@ -181,10 +181,10 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
Thread myThread; ///< Thread running the background recording task
std::vector<Int16> mySamples; ///< Buffer to store captured samples
unsigned int mySampleRate; ///< Sample rate
bool myIsCapturing; ///< Capturing state
Thread m_thread; ///< Thread running the background recording task
std::vector<Int16> m_samples; ///< Buffer to store captured samples
unsigned int m_sampleRate; ///< Sample rate
bool m_isCapturing; ///< Capturing state
};
} // namespace sf

View file

@ -260,7 +260,7 @@ protected :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
unsigned int mySource; ///< OpenAL source identifier
unsigned int m_source; ///< OpenAL source identifier
};
} // namespace sf

View file

@ -281,15 +281,15 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
Thread myThread; ///< Thread running the background tasks
bool myIsStreaming; ///< Streaming state (true = playing, false = stopped)
unsigned int myBuffers[BufferCount]; ///< Sound buffers used to store temporary audio data
unsigned int myChannelCount; ///< Number of channels (1 = mono, 2 = stereo, ...)
unsigned int mySampleRate; ///< Frequency (samples / second)
Uint32 myFormat; ///< Format of the internal sound buffers
bool myLoop; ///< Loop flag (true to loop, false to play once)
Uint64 mySamplesProcessed; ///< Number of buffers processed since beginning of the stream
bool myEndBuffers[BufferCount]; ///< Each buffer is marked as "end buffer" or not, for proper duration calculation
Thread m_thread; ///< Thread running the background tasks
bool m_isStreaming; ///< Streaming state (true = playing, false = stopped)
unsigned int m_buffers[BufferCount]; ///< Sound buffers used to store temporary audio data
unsigned int m_channelCount; ///< Number of channels (1 = mono, 2 = stereo, ...)
unsigned int m_sampleRate; ///< Frequency (samples / second)
Uint32 m_format; ///< Format of the internal sound buffers
bool m_loop; ///< Loop flag (true to loop, false to play once)
Uint64 m_samplesProcessed; ///< Number of buffers processed since beginning of the stream
bool m_endBuffers[BufferCount]; ///< Each buffer is marked as "end buffer" or not, for proper duration calculation
};
} // namespace sf

View file

@ -108,8 +108,8 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
float myRadius; ///< Radius of the circle
unsigned int myPointCount; ///< Number of points composing the circle
float m_radius; ///< Radius of the circle
unsigned int m_pointCount; ///< Number of points composing the circle
};
} // namespace sf

View file

@ -109,7 +109,7 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
std::vector<Vector2f> myPoints; ///< Points composing the convex polygon
std::vector<Vector2f> m_points; ///< Points composing the convex polygon
};
} // namespace sf

View file

@ -103,11 +103,11 @@ private :
/// virtual void Draw(sf::RenderTarget& target, RenderStates states) const
/// {
/// // You can draw other high-level objects
/// target.Draw(mySprite, states);
/// target.Draw(m_sprite, states);
///
/// // ... or use the low-level API
/// states.Texture = &myTexture;
/// target.Draw(myVertices, states);
/// states.Texture = &m_texture;
/// target.Draw(m_vertices, states);
///
/// // ... or draw with OpenGL directly
/// glBegin(GL_QUADS);
@ -115,9 +115,9 @@ private :
/// glEnd();
/// }
///
/// sf::Sprite mySprite;
/// sf::Texture myTexture;
/// sf::VertexArray myVertices;
/// sf::Sprite m_sprite;
/// sf::Texture m_texture;
/// sf::VertexArray m_vertices;
/// };
/// \endcode
///

View file

@ -293,12 +293,12 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
void* myLibrary; ///< Pointer to the internal library interface (it is typeless to avoid exposing implementation details)
void* myFace; ///< Pointer to the internal font face (it is typeless to avoid exposing implementation details)
void* myStreamRec; ///< Pointer to the stream rec instance (it is typeless to avoid exposing implementation details)
int* myRefCount; ///< Reference counter used by implicit sharing
mutable PageTable myPages; ///< Table containing the glyphs pages by character size
mutable std::vector<Uint8> myPixelBuffer; ///< Pixel buffer holding a glyph's pixels before being written to the texture
void* m_library; ///< Pointer to the internal library interface (it is typeless to avoid exposing implementation details)
void* m_face; ///< Pointer to the internal font face (it is typeless to avoid exposing implementation details)
void* m_streamRec; ///< Pointer to the stream rec instance (it is typeless to avoid exposing implementation details)
int* m_refCount; ///< Reference counter used by implicit sharing
mutable PageTable m_pages; ///< Table containing the glyphs pages by character size
mutable std::vector<Uint8> m_pixelBuffer; ///< Pixel buffer holding a glyph's pixels before being written to the texture
};
} // namespace sf

View file

@ -267,9 +267,9 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
unsigned int myWidth; ///< Image width
unsigned int myHeight; ///< Image Height
std::vector<Uint8> myPixels; ///< Pixels of the image
unsigned int m_width; ///< Image width
unsigned int m_height; ///< Image Height
std::vector<Uint8> m_pixels; ///< Pixels of the image
};
} // namespace sf

View file

@ -95,7 +95,7 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
Vector2f mySize; ///< Size of the rectangle
Vector2f m_size; ///< Size of the rectangle
};
} // namespace sf

View file

@ -366,9 +366,9 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
View myDefaultView; ///< Default view
View myView; ///< Current view
StatesCache myCache; ///< Render states cache
View m_defaultView; ///< Default view
View m_view; ///< Current view
StatesCache m_cache; ///< Render states cache
};
} // namespace sf

View file

@ -181,8 +181,8 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
priv::RenderTextureImpl* myImpl; ///< Platform/hardware specific implementation
Texture myTexture; ///< Target texture to draw on
priv::RenderTextureImpl* m_impl; ///< Platform/hardware specific implementation
Texture m_texture; ///< Target texture to draw on
};
} // namespace sf

View file

@ -522,9 +522,9 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
unsigned int myShaderProgram; ///< OpenGL identifier for the program
int myCurrentTexture; ///< Location of the current texture in the shader
TextureTable myTextures; ///< Texture variables in the shader, mapped to their location
unsigned int m_shaderProgram; ///< OpenGL identifier for the program
int m_currentTexture; ///< Location of the current texture in the shader
TextureTable m_textures; ///< Texture variables in the shader, mapped to their location
};
} // namespace sf

View file

@ -291,15 +291,15 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
const Texture* myTexture; ///< Texture of the shape
IntRect myTextureRect; ///< Rectangle defining the area of the source texture to display
Color myFillColor; ///< Fill color
Color myOutlineColor; ///< Outline color
float myOutlineThickness; ///< Thickness of the shape's outline
VertexArray myVertices; ///< Vertex array containing the fill geometry
VertexArray myOutlineVertices; ///< Vertex array containing the outline geometry
FloatRect myInsideBounds; ///< Bounding rectangle of the inside (fill)
FloatRect myBounds; ///< Bounding rectangle of the whole shape (outline + fill)
const Texture* m_texture; ///< Texture of the shape
IntRect m_textureRect; ///< Rectangle defining the area of the source texture to display
Color m_fillColor; ///< Fill color
Color m_outlineColor; ///< Outline color
float m_outlineThickness; ///< Thickness of the shape's outline
VertexArray m_vertices; ///< Vertex array containing the fill geometry
VertexArray m_outlineVertices; ///< Vertex array containing the outline geometry
FloatRect m_insideBounds; ///< Bounding rectangle of the inside (fill)
FloatRect m_bounds; ///< Bounding rectangle of the whole shape (outline + fill)
};
} // namespace sf

View file

@ -215,9 +215,9 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
Vertex myVertices[4]; ///< Vertices defining the sprite's geometry
const Texture* myTexture; ///< Texture of the sprite
IntRect myTextureRect; ///< Rectangle defining the area of the source texture to display
Vertex m_vertices[4]; ///< Vertices defining the sprite's geometry
const Texture* m_texture; ///< Texture of the sprite
IntRect m_textureRect; ///< Rectangle defining the area of the source texture to display
};
} // namespace sf

View file

@ -284,13 +284,13 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
String myString; ///< String to display
const Font* myFont; ///< Font used to display the string
unsigned int myCharacterSize; ///< Base size of characters, in pixels
Uint32 myStyle; ///< Text style (see Style enum)
Color myColor; ///< Text color
VertexArray myVertices; ///< Vertex array containing the text's geometry
FloatRect myBounds; ///< Bounding rectangle of the text (in local coordinates)
String m_string; ///< String to display
const Font* m_font; ///< Font used to display the string
unsigned int m_characterSize; ///< Base size of characters, in pixels
Uint32 m_style; ///< Text style (see Style enum)
Color m_color; ///< Text color
VertexArray m_vertices; ///< Vertex array containing the text's geometry
FloatRect m_bounds; ///< Bounding rectangle of the text (in local coordinates)
};
} // namespace sf

View file

@ -489,15 +489,15 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
unsigned int myWidth; ///< Image width
unsigned int myHeight; ///< Image Height
unsigned int myTextureWidth; ///< Actual texture width (can be greater than image width because of padding)
unsigned int myTextureHeight; ///< Actual texture height (can be greater than image height because of padding)
unsigned int myTexture; ///< Internal texture identifier
bool myIsSmooth; ///< Status of the smooth filter
bool myIsRepeated; ///< Is the texture in repeat mode?
mutable bool myPixelsFlipped; ///< To work around the inconsistency in Y orientation
Uint64 myCacheId; ///< Unique number that identifies the texture to the render target's cache
unsigned int m_width; ///< Image width
unsigned int m_height; ///< Image Height
unsigned int m_textureWidth; ///< Actual texture width (can be greater than image width because of padding)
unsigned int m_textureHeight; ///< Actual texture height (can be greater than image height because of padding)
unsigned int m_texture; ///< Internal texture identifier
bool m_isSmooth; ///< Status of the smooth filter
bool m_isRepeated; ///< Is the texture in repeat mode?
mutable bool m_pixelsFlipped; ///< To work around the inconsistency in Y orientation
Uint64 m_cacheId; ///< Unique number that identifies the texture to the render target's cache
};
} // namespace sf

View file

@ -358,7 +358,7 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
float myMatrix[16]; ///< 4x4 matrix defining the transformation
float m_matrix[16]; ///< 4x4 matrix defining the transformation
};
////////////////////////////////////////////////////////////

View file

@ -316,14 +316,14 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
Vector2f myOrigin; ///< Origin of translation/rotation/scaling of the object
Vector2f myPosition; ///< Position of the object in the 2D world
float myRotation; ///< Orientation of the object, in degrees
Vector2f myScale; ///< Scale of the object
mutable Transform myTransform; ///< Combined transformation of the object
mutable bool myTransformNeedUpdate; ///< Does the transform need to be recomputed?
mutable Transform myInverseTransform; ///< Combined transformation of the object
mutable bool myInverseTransformNeedUpdate; ///< Does the transform need to be recomputed?
Vector2f m_origin; ///< Origin of translation/rotation/scaling of the object
Vector2f m_position; ///< Position of the object in the 2D world
float m_rotation; ///< Orientation of the object, in degrees
Vector2f m_scale; ///< Scale of the object
mutable Transform m_transform; ///< Combined transformation of the object
mutable bool m_transformNeedUpdate; ///< Does the transform need to be recomputed?
mutable Transform m_inverseTransform; ///< Combined transformation of the object
mutable bool m_inverseTransformNeedUpdate; ///< Does the transform need to be recomputed?
};
} // namespace sf

View file

@ -187,8 +187,8 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
std::vector<Vertex> myVertices; ///< Vertices contained in the array
PrimitiveType myPrimitiveType; ///< Type of primitives to draw
std::vector<Vertex> m_vertices; ///< Vertices contained in the array
PrimitiveType m_primitiveType; ///< Type of primitives to draw
};
} // namespace sf

View file

@ -269,14 +269,14 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
Vector2f myCenter; ///< Center of the view, in scene coordinates
Vector2f mySize; ///< Size of the view, in scene coordinates
float myRotation; ///< Angle of rotation of the view rectangle, in degrees
FloatRect myViewport; ///< Viewport rectangle, expressed as a factor of the render-target's size
mutable Transform myTransform; ///< Precomputed projection transform corresponding to the view
mutable Transform myInverseTransform; ///< Precomputed inverse projection transform corresponding to the view
mutable bool myTransformUpdated; ///< Internal state telling if the transform needs to be updated
mutable bool myInvTransformUpdated; ///< Internal state telling if the inverse transform needs to be updated
Vector2f m_center; ///< Center of the view, in scene coordinates
Vector2f m_size; ///< Size of the view, in scene coordinates
float m_rotation; ///< Angle of rotation of the view rectangle, in degrees
FloatRect m_viewport; ///< Viewport rectangle, expressed as a factor of the render-target's size
mutable Transform m_transform; ///< Precomputed projection transform corresponding to the view
mutable Transform m_inverseTransform; ///< Precomputed inverse projection transform corresponding to the view
mutable bool m_transformUpdated; ///< Internal state telling if the transform needs to be updated
mutable bool m_invTransformUpdated; ///< Internal state telling if the inverse transform needs to be updated
};
} // namespace sf

View file

@ -177,8 +177,8 @@ public :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
Status myStatus; ///< Status code returned from the server
std::string myMessage; ///< Last message received from the server
Status m_status; ///< Status code returned from the server
std::string m_message; ///< Last message received from the server
};
////////////////////////////////////////////////////////////
@ -210,7 +210,7 @@ public :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
std::string myDirectory; ///< Directory extracted from the response message
std::string m_directory; ///< Directory extracted from the response message
};
@ -244,7 +244,7 @@ public :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
std::vector<std::string> myFilenames; ///< Filenames extracted from the data
std::vector<std::string> m_filenames; ///< Filenames extracted from the data
};
@ -517,7 +517,7 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
TcpSocket myCommandSocket; ///< Socket holding the control connection with the server
TcpSocket m_commandSocket; ///< Socket holding the control connection with the server
};
} // namespace sf

View file

@ -176,12 +176,12 @@ public :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
FieldTable myFields; ///< Fields of the header associated to their value
Method myMethod; ///< Method to use for the request
std::string myURI; ///< Target URI of the request
unsigned int myMajorVersion; ///< Major HTTP version
unsigned int myMinorVersion; ///< Minor HTTP version
std::string myBody; ///< Body of the request
FieldTable m_fields; ///< Fields of the header associated to their value
Method m_method; ///< Method to use for the request
std::string m_uRI; ///< Target URI of the request
unsigned int m_majorVersion; ///< Major HTTP version
unsigned int m_minorVersion; ///< Minor HTTP version
std::string m_body; ///< Body of the request
};
////////////////////////////////////////////////////////////
@ -324,11 +324,11 @@ public :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
FieldTable myFields; ///< Fields of the header
Status myStatus; ///< Status code
unsigned int myMajorVersion; ///< Major HTTP version
unsigned int myMinorVersion; ///< Minor HTTP version
std::string myBody; ///< Body of the response
FieldTable m_fields; ///< Fields of the header
Status m_status; ///< Status code
unsigned int m_majorVersion; ///< Major HTTP version
unsigned int m_minorVersion; ///< Minor HTTP version
std::string m_body; ///< Body of the response
};
////////////////////////////////////////////////////////////
@ -395,10 +395,10 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
TcpSocket myConnection; ///< Connection to the host
IpAddress myHost; ///< Web host address
std::string myHostName; ///< Web host name
unsigned short myPort; ///< Port used for connection with host
TcpSocket m_connection; ///< Connection to the host
IpAddress m_host; ///< Web host address
std::string m_hostName; ///< Web host name
unsigned short m_port; ///< Port used for connection with host
};
} // namespace sf

View file

@ -190,7 +190,7 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
Uint32 myAddress; ///< Address stored as an unsigned 32 bits integer
Uint32 m_address; ///< Address stored as an unsigned 32 bits integer
};
////////////////////////////////////////////////////////////

View file

@ -272,9 +272,9 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
std::vector<char> myData; ///< Data stored in the packet
std::size_t myReadPos; ///< Current reading position in the packet
bool myIsValid; ///< Reading state of the packet
std::vector<char> m_data; ///< Data stored in the packet
std::size_t m_readPos; ///< Current reading position in the packet
bool m_isValid; ///< Reading state of the packet
};
} // namespace sf

View file

@ -172,9 +172,9 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
Type myType; ///< Type of the socket (TCP or UDP)
SocketHandle mySocket; ///< Socket descriptor
bool myIsBlocking; ///< Current blocking mode of the socket
Type m_type; ///< Type of the socket (TCP or UDP)
SocketHandle m_socket; ///< Socket descriptor
bool m_isBlocking; ///< Current blocking mode of the socket
};
} // namespace sf

View file

@ -157,7 +157,7 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
SocketSelectorImpl* myImpl; ///< Opaque pointer to the implementation (which requires OS-specific types)
SocketSelectorImpl* m_impl; ///< Opaque pointer to the implementation (which requires OS-specific types)
};
} // namespace sf

View file

@ -204,7 +204,7 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
PendingPacket myPendingPacket; ///< Temporary data of the packet currently being received
PendingPacket m_pendingPacket; ///< Temporary data of the packet currently being received
};
} // namespace sf

View file

@ -187,7 +187,7 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
std::vector<char> myBuffer; ///< Temporary buffer holding the received data in Receive(Packet)
std::vector<char> m_buffer; ///< Temporary buffer holding the received data in Receive(Packet)
};
} // namespace sf

View file

@ -78,7 +78,7 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
Time myStartTime; ///< Time of last reset, in microseconds
Time m_startTime; ///< Time of last reset, in microseconds
};
} // namespace sf

View file

@ -67,7 +67,7 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
Mutex& myMutex; ///< Mutex to lock / unlock
Mutex& m_mutex; ///< Mutex to lock / unlock
};
} // namespace sf

View file

@ -85,7 +85,7 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
priv::MutexImpl* myMutexImpl; ///< OS-specific implementation
priv::MutexImpl* m_mutexImpl; ///< OS-specific implementation
};
} // namespace sf

View file

@ -400,7 +400,7 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
std::basic_string<Uint32> myString; ///< Internal string of UTF-32 characters
std::basic_string<Uint32> m_string; ///< Internal string of UTF-32 characters
};
////////////////////////////////////////////////////////////

View file

@ -186,8 +186,8 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
priv::ThreadImpl* myImpl; ///< OS-specific implementation of the thread
priv::ThreadFunc* myEntryPoint; ///< Abstraction of the function to run
priv::ThreadImpl* m_impl; ///< OS-specific implementation of the thread
priv::ThreadFunc* m_entryPoint; ///< Abstraction of the function to run
};
#include <SFML/System/Thread.inl>

View file

@ -35,29 +35,29 @@ struct ThreadFunc
template <typename T>
struct ThreadFunctor : ThreadFunc
{
ThreadFunctor(T functor) : myFunctor(functor) {}
virtual void Run() {myFunctor();}
T myFunctor;
ThreadFunctor(T functor) : m_functor(functor) {}
virtual void Run() {m_functor();}
T m_functor;
};
// Specialization using a functor (including free functions) with one argument
template <typename F, typename A>
struct ThreadFunctorWithArg : ThreadFunc
{
ThreadFunctorWithArg(F function, A arg) : myFunction(function), myArg(arg) {}
virtual void Run() {myFunction(myArg);}
F myFunction;
A myArg;
ThreadFunctorWithArg(F function, A arg) : m_function(function), m_arg(arg) {}
virtual void Run() {m_function(m_arg);}
F m_function;
A m_arg;
};
// Specialization using a member function
template <typename C>
struct ThreadMemberFunc : ThreadFunc
{
ThreadMemberFunc(void(C::*function)(), C* object) : myFunction(function), myObject(object) {}
virtual void Run() {(myObject->*myFunction)();}
void(C::*myFunction)();
C* myObject;
ThreadMemberFunc(void(C::*function)(), C* object) : m_function(function), m_object(object) {}
virtual void Run() {(m_object->*m_function)();}
void(C::*m_function)();
C* m_object;
};
} // namespace priv
@ -66,8 +66,8 @@ struct ThreadMemberFunc : ThreadFunc
////////////////////////////////////////////////////////////
template <typename F>
Thread::Thread(F functor) :
myImpl (NULL),
myEntryPoint(new priv::ThreadFunctor<F>(functor))
m_impl (NULL),
m_entryPoint(new priv::ThreadFunctor<F>(functor))
{
}
@ -75,8 +75,8 @@ myEntryPoint(new priv::ThreadFunctor<F>(functor))
////////////////////////////////////////////////////////////
template <typename F, typename A>
Thread::Thread(F function, A argument) :
myImpl (NULL),
myEntryPoint(new priv::ThreadFunctorWithArg<F, A>(function, argument))
m_impl (NULL),
m_entryPoint(new priv::ThreadFunctorWithArg<F, A>(function, argument))
{
}
@ -84,7 +84,7 @@ myEntryPoint(new priv::ThreadFunctorWithArg<F, A>(function, argument))
////////////////////////////////////////////////////////////
template <typename C>
Thread::Thread(void(C::*function)(), C* object) :
myImpl (NULL),
myEntryPoint(new priv::ThreadMemberFunc<C>(function, object))
m_impl (NULL),
m_entryPoint(new priv::ThreadMemberFunc<C>(function, object))
{
}

View file

@ -83,7 +83,7 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
priv::ThreadLocalImpl* myImpl; ///< Pointer to the OS specific implementation
priv::ThreadLocalImpl* m_impl; ///< Pointer to the OS specific implementation
};
} // namespace sf

View file

@ -106,7 +106,7 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
Int64 myMicroseconds; ///< Time value stored as microseconds
Int64 m_microseconds; ///< Time value stored as microseconds
};
////////////////////////////////////////////////////////////

View file

@ -95,7 +95,7 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
priv::GlContext* myContext; ///< Internal OpenGL context
priv::GlContext* m_context; ///< Internal OpenGL context
};
} // namespace sf

View file

@ -467,10 +467,10 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
priv::WindowImpl* myImpl; ///< Platform-specific implementation of the window
priv::GlContext* myContext; ///< Platform-specific implementation of the OpenGL context
Clock myClock; ///< Clock for measuring the elapsed time between frames
Time myFrameTimeLimit; ///< Current framerate limit
priv::WindowImpl* m_impl; ///< Platform-specific implementation of the window
priv::GlContext* m_context; ///< Platform-specific implementation of the OpenGL context
Clock m_clock; ///< Clock for measuring the elapsed time between frames
Time m_frameTimeLimit; ///< Current framerate limit
};
} // namespace sf