1
0
mirror of https://github.com/Halofreak1990/XFXFramework synced 2024-12-26 13:49:34 +01:00
Halofreak1990 40c4811c04 Got everything to compile again.
Began transforming of current API to represent XNA 4.0, which is cleaner.
Dictionary<TKey, TValue> should now work (sort of-- need to implement resizing and enumerating)
Currently hunting down GraphicsDevice initialization
Up next: (hopefully successful) rendering of primitives
2012-09-28 20:36:02 +00:00

83 lines
2.7 KiB
C++

/********************************************************
* TimeSpan.h *
* *
* XFX TimeSpan definition file *
* Copyright © XFX Team. All Rights Reserved *
********************************************************/
#ifndef _SYSTEM_TIMESPAN_
#define _SYSTEM_TIMESPAN_
#include "Interfaces.h"
namespace System
{
// Represents a time interval.
struct TimeSpan : IComparable<TimeSpan>, IEquatable<TimeSpan>, Object
{
private:
long long _ticks;
static bool CalculateTicks(int days, int hours, int minutes, int seconds, int milliseconds, bool throwExc, out long long result);
static TimeSpan Interval(double value, int scale);
public:
static const TimeSpan MaxValue;
static const TimeSpan MinValue;
static const TimeSpan Zero;
static const long long TicksPerMillisecond;
static const long long TicksPerSecond;
static const long long TicksPerMinute;
static const long long TicksPerHour;
static const long long TicksPerDay;
int Days() const;
int Hours() const;
int Milliseconds() const;
int Minutes() const;
int Seconds() const;
long long Ticks() const;
double TotalDays() const;
double TotalHours() const;
double TotalMilliseconds() const;
double TotalMinutes() const;
double TotalSeconds() const;
TimeSpan();
TimeSpan(int hours, int minutes, int seconds);
TimeSpan(int days, int hours, int minutes, int seconds);
TimeSpan(int days, int hours, int minutes, int seconds, int milliseconds);
TimeSpan(long long ticks);
TimeSpan(const TimeSpan &obj);
TimeSpan Add(const TimeSpan ts);
static int Compare(const TimeSpan t1, const TimeSpan t2);
int CompareTo(const TimeSpan ts) const;
bool Equals(const TimeSpan obj) const;
static bool Equals(const TimeSpan t1, const TimeSpan t2);
static TimeSpan FromDays(double value);
static TimeSpan FromHours(double value);
static TimeSpan FromMilliseconds(double value);
static TimeSpan FromMinutes(double value);
static TimeSpan FromSeconds(double value);
static TimeSpan FromTicks(long long value);
int GetHashCode() const;
int GetType() const;
TimeSpan Negate();
TimeSpan Parse(const String& s); //! TODO
TimeSpan Subtract(const TimeSpan ts);
const char* ToString() const; //! TODO
TimeSpan operator+(const TimeSpan other);
bool operator==(const TimeSpan other) const;
bool operator >(const TimeSpan other) const;
bool operator>=(const TimeSpan other) const;
bool operator!=(const TimeSpan other) const;
bool operator <(const TimeSpan other) const;
bool operator<=(const TimeSpan other) const;
TimeSpan operator -(const TimeSpan other);
TimeSpan operator -();
};
}
#endif //_TIMESPAN_