Update of /cvsroot/pclasses/pclasses2/include/pclasses
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23953/include/pclasses
Modified Files:
Date.h DateTime.h Time.h
Log Message:
Added export macros.
Index: Date.h
===================================================================
RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/Date.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Date.h 19 Jan 2005 16:25:58 -0000 1.3
+++ Date.h 20 Jan 2005 22:49:40 -0000 1.4
@@ -21,6 +21,7 @@
#ifndef P_Date_h
#define P_Date_h
+#include <pclasses/Export.h>
#include <pclasses/Exception.h>
#include <pclasses/TimeSpan.h>
#include <iostream>
@@ -35,7 +36,7 @@
};
//! Date class
-class Date {
+class PCORE_EXPORT Date {
public:
//! Enumeration of weekdays
enum weekDay_t {
@@ -104,8 +105,8 @@
Date& operator+=(const TimeSpan& sp) throw();
Date& operator-=(const TimeSpan& sp) throw();
- friend Date operator+(const Date& d, const TimeSpan& sp) throw();
- friend Date operator-(const Date& d, const TimeSpan& sp) throw();
+ friend PCORE_EXPORT Date operator+(const Date& d, const TimeSpan& sp) throw();
+ friend PCORE_EXPORT Date operator-(const Date& d, const TimeSpan& sp) throw();
//! Returns the number of days in month
static unsigned int daysInMonth(unsigned int month, unsigned int year)
@@ -114,7 +115,7 @@
//! Test if the given year is a leap year
static bool isLeapYear(unsigned int year) throw();
- friend std::ostream& operator << (std::ostream& os, const Date& d);
+ friend PCORE_EXPORT std::ostream& operator << (std::ostream& os, const Date& d);
private:
unsigned short _year;
Index: Time.h
===================================================================
RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/Time.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Time.h 19 Jan 2005 18:49:38 -0000 1.3
+++ Time.h 20 Jan 2005 22:49:40 -0000 1.4
@@ -21,6 +21,7 @@
#ifndef P_Time_h
#define P_Time_h
+#include <pclasses/Export.h>
#include <pclasses/Exception.h>
#include <pclasses/TimeSpan.h>
#include <iostream>
@@ -35,7 +36,7 @@
};
//! Time class
-class Time {
+class PCORE_EXPORT Time {
public:
Time(unsigned int hour = 0, unsigned int minute = 0,
unsigned int second = 0, unsigned int usec = 0) throw(InvalidTime);
@@ -68,10 +69,10 @@
Time& operator+=(const TimeSpan& sp) throw();
Time& operator-=(const TimeSpan& sp) throw();
- friend Time operator+(const Time& t, const TimeSpan& sp) throw();
- friend Time operator-(const Time& t, const TimeSpan& sp) throw();
+ friend PCORE_EXPORT Time operator+(const Time& t, const TimeSpan& sp) throw();
+ friend PCORE_EXPORT Time operator-(const Time& t, const TimeSpan& sp) throw();
- friend std::ostream& operator << (std::ostream& os, const Time& t);
+ friend PCORE_EXPORT std::ostream& operator << (std::ostream& os, const Time& t);
private:
unsigned char _hour;
Index: DateTime.h
===================================================================
RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/DateTime.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- DateTime.h 27 Dec 2004 06:57:05 -0000 1.3
+++ DateTime.h 20 Jan 2005 22:49:40 -0000 1.4
@@ -21,6 +21,7 @@
#ifndef P_DateTime_h
#define P_DateTime_h
+#include <pclasses/Export.h>
#include <pclasses/Date.h>
#include <pclasses/Time.h>
@@ -31,7 +32,7 @@
namespace P {
//! Date/time class
-class DateTime: public Date, public Time {
+class PCORE_EXPORT DateTime: public Date, public Time {
public:
DateTime();
DateTime(const Date& d, const Time& t, const std::string& tzname = "");
@@ -57,7 +58,7 @@
static DateTime fromTime_t(time_t t) throw();
- friend std::ostream& operator << (std::ostream& os, const DateTime& dt);
+ friend PCORE_EXPORT std::ostream& operator << (std::ostream& os, const DateTime& dt);
private:
std::string _tzname;
|