mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-04 13:00:33 +00:00
Merge pull request #600 from BeamNG/rename_Status
Rename Status enum for avoid conficts on Linux.
This commit is contained in:
commit
f69eccfdb4
10 changed files with 43 additions and 43 deletions
|
|
@ -31,7 +31,7 @@ class File
|
|||
{
|
||||
public:
|
||||
/// What is the status of our file handle?
|
||||
enum Status
|
||||
enum FileStatus
|
||||
{
|
||||
Ok = 0, ///< Ok!
|
||||
IOError, ///< Read or Write error
|
||||
|
|
@ -59,7 +59,7 @@ public:
|
|||
|
||||
private:
|
||||
void *handle; ///< Pointer to the file handle.
|
||||
Status currentStatus; ///< Current status of the file (Ok, IOError, etc.).
|
||||
FileStatus currentStatus; ///< Current status of the file (Ok, IOError, etc.).
|
||||
U32 capability; ///< Keeps track of file capabilities.
|
||||
|
||||
File(const File&); ///< This is here to disable the copy constructor.
|
||||
|
|
@ -72,7 +72,7 @@ public:
|
|||
/// Opens a file for access using the specified AccessMode
|
||||
///
|
||||
/// @returns The status of the file
|
||||
Status open(const char *filename, const AccessMode openMode);
|
||||
FileStatus open(const char *filename, const AccessMode openMode);
|
||||
|
||||
/// Gets the current position in the file
|
||||
///
|
||||
|
|
@ -99,7 +99,7 @@ public:
|
|||
/// @endcode
|
||||
///
|
||||
/// @returns The status of the file
|
||||
Status setPosition(S32 position, bool absolutePos = true);
|
||||
FileStatus setPosition(S32 position, bool absolutePos = true);
|
||||
|
||||
/// Returns the size of the file
|
||||
U32 getSize() const;
|
||||
|
|
@ -107,25 +107,25 @@ public:
|
|||
/// Make sure everything that's supposed to be written to the file gets written.
|
||||
///
|
||||
/// @returns The status of the file.
|
||||
Status flush();
|
||||
FileStatus flush();
|
||||
|
||||
/// Closes the file
|
||||
///
|
||||
/// @returns The status of the file.
|
||||
Status close();
|
||||
FileStatus close();
|
||||
|
||||
/// Gets the status of the file
|
||||
Status getStatus() const;
|
||||
FileStatus getStatus() const;
|
||||
|
||||
/// Reads "size" bytes from the file, and dumps data into "dst".
|
||||
/// The number of actual bytes read is returned in bytesRead
|
||||
/// @returns The status of the file
|
||||
Status read(U32 size, char *dst, U32 *bytesRead = NULL);
|
||||
FileStatus read(U32 size, char *dst, U32 *bytesRead = NULL);
|
||||
|
||||
/// Writes "size" bytes into the file from the pointer "src".
|
||||
/// The number of actual bytes written is returned in bytesWritten
|
||||
/// @returns The status of the file
|
||||
Status write(U32 size, const char *src, U32 *bytesWritten = NULL);
|
||||
FileStatus write(U32 size, const char *src, U32 *bytesWritten = NULL);
|
||||
|
||||
/// Returns whether or not this file is capable of the given function.
|
||||
bool hasCapability(Capability cap) const;
|
||||
|
|
@ -133,8 +133,8 @@ public:
|
|||
const void* getHandle() { return handle; }
|
||||
|
||||
protected:
|
||||
Status setStatus(); ///< Called after error encountered.
|
||||
Status setStatus(Status status); ///< Setter for the current status.
|
||||
FileStatus setStatus(); ///< Called after error encountered.
|
||||
FileStatus setStatus(FileStatus status); ///< Setter for the current status.
|
||||
};
|
||||
|
||||
#endif // _FILE_IO_H_
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ namespace Torque
|
|||
return mFileData->mPath;
|
||||
}
|
||||
|
||||
FileNode::Status MemFile::getStatus() const
|
||||
FileNode::NodeStatus MemFile::getStatus() const
|
||||
{
|
||||
return mStatus;
|
||||
}
|
||||
|
|
@ -502,7 +502,7 @@ namespace Torque
|
|||
return mDirectoryData->getAttributes(attr);
|
||||
}
|
||||
|
||||
FileNode::Status MemDirectory::getStatus() const
|
||||
FileNode::NodeStatus MemDirectory::getStatus() const
|
||||
{
|
||||
return mStatus;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ namespace Torque
|
|||
virtual ~MemFile();
|
||||
|
||||
Path getName() const;
|
||||
Status getStatus() const;
|
||||
NodeStatus getStatus() const;
|
||||
bool getAttributes(Attributes*);
|
||||
|
||||
U32 getPosition();
|
||||
|
|
@ -91,7 +91,7 @@ namespace Torque
|
|||
|
||||
MemFileSystem* mFileSystem;
|
||||
MemFileData* mFileData;
|
||||
Status mStatus;
|
||||
NodeStatus mStatus;
|
||||
U32 mCurrentPos;
|
||||
|
||||
bool _updateInfo();
|
||||
|
|
@ -108,7 +108,7 @@ namespace Torque
|
|||
~MemDirectory();
|
||||
|
||||
Path getName() const;
|
||||
Status getStatus() const;
|
||||
NodeStatus getStatus() const;
|
||||
bool getAttributes(Attributes*);
|
||||
|
||||
bool open();
|
||||
|
|
@ -122,7 +122,7 @@ namespace Torque
|
|||
|
||||
U32 calculateChecksum();
|
||||
|
||||
Status mStatus;
|
||||
NodeStatus mStatus;
|
||||
U32 mSearchIndex;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ Stream::Stream()
|
|||
{
|
||||
}
|
||||
|
||||
const char* Stream::getStatusString(const Status in_status)
|
||||
const char* Stream::getStatusString(const StreamStatus in_status)
|
||||
{
|
||||
switch (in_status) {
|
||||
case Ok:
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class Stream
|
|||
// Public structs and enumerations...
|
||||
public:
|
||||
/// Status constants for the stream
|
||||
enum Status {
|
||||
enum StreamStatus {
|
||||
Ok = 0, ///< Ok!
|
||||
IOError, ///< Read or Write error
|
||||
EOS, ///< End of Stream reached (mostly for reads)
|
||||
|
|
@ -74,20 +74,20 @@ public:
|
|||
|
||||
// Accessible only through inline accessors
|
||||
private:
|
||||
Status m_streamStatus;
|
||||
StreamStatus m_streamStatus;
|
||||
|
||||
// Derived accessible data modifiers...
|
||||
protected:
|
||||
void setStatus(const Status in_newStatus) { m_streamStatus = in_newStatus; }
|
||||
void setStatus(const StreamStatus in_newStatus) { m_streamStatus = in_newStatus; }
|
||||
|
||||
public:
|
||||
Stream();
|
||||
virtual ~Stream() {}
|
||||
|
||||
/// Gets the status of the stream
|
||||
Stream::Status getStatus() const { return m_streamStatus; }
|
||||
Stream::StreamStatus getStatus() const { return m_streamStatus; }
|
||||
/// Gets a printable string form of the status
|
||||
static const char* getStatusString(const Status in_status);
|
||||
static const char* getStatusString(const StreamStatus in_status);
|
||||
|
||||
// Derived classes must override these...
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public:
|
|||
}
|
||||
|
||||
virtual Path getName() const { return mZipFilename; }
|
||||
virtual Status getStatus() const
|
||||
virtual NodeStatus getStatus() const
|
||||
{
|
||||
if (mZipStream)
|
||||
{
|
||||
|
|
@ -182,7 +182,7 @@ public:
|
|||
Torque::Path getName() const { return mPath; }
|
||||
|
||||
// getStatus() doesn't appear to be used for directories
|
||||
Status getStatus() const
|
||||
NodeStatus getStatus() const
|
||||
{
|
||||
return FileNode::Open;
|
||||
}
|
||||
|
|
@ -274,7 +274,7 @@ public:
|
|||
Torque::Path getName() const { return mPath; }
|
||||
|
||||
// getStatus() doesn't appear to be used for directories
|
||||
Status getStatus() const
|
||||
NodeStatus getStatus() const
|
||||
{
|
||||
return FileNode::Open;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public:
|
|||
class FileNode : public FileBase
|
||||
{
|
||||
public:
|
||||
enum Status
|
||||
enum NodeStatus
|
||||
{
|
||||
Open, ///< In an open state
|
||||
Closed, ///< In a closed state
|
||||
|
|
@ -122,7 +122,7 @@ public:
|
|||
|
||||
// Properties
|
||||
virtual Path getName() const = 0;
|
||||
virtual Status getStatus() const = 0;
|
||||
virtual NodeStatus getStatus() const = 0;
|
||||
|
||||
virtual bool getAttributes(Attributes*) = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue