implement event class
This commit is contained in:
		| @@ -2,5 +2,4 @@ | |||||||
|  |  | ||||||
| # TODO | # TODO | ||||||
| * implement vector file parsing | * implement vector file parsing | ||||||
| * develop pQueue class |  | ||||||
| * define all classes more completely | * define all classes more completely | ||||||
|   | |||||||
| @@ -0,0 +1,13 @@ | |||||||
|  | #include "event.h" | ||||||
|  |  | ||||||
|  | using namespace std; | ||||||
|  |  | ||||||
|  | event::event(event, value, setTime, wire) : evNum(event), evValue(value), | ||||||
|  | 	evTime(setTime), wireNum(wire) {} | ||||||
|  |  | ||||||
|  | bool event::operator<(const event &e1, const event &e2) { | ||||||
|  | 	if(e1.evTime == e2.evTime) { | ||||||
|  | 		return e1.evNum > e2.evNum; | ||||||
|  | 	} | ||||||
|  | 	return e1.evTime > e2.evTime; | ||||||
|  | } | ||||||
|   | |||||||
							
								
								
									
										11
									
								
								src/event.h
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								src/event.h
									
									
									
									
									
								
							| @@ -2,12 +2,11 @@ | |||||||
| #define EVENT | #define EVENT | ||||||
|  |  | ||||||
| class event { | class event { | ||||||
| 	/* TODO: | 	public: | ||||||
| 	 * event number | 		event(event, value, setTime, wire); | ||||||
| 	 * value | 		bool operator<(const event &e1, const event &e2); | ||||||
| 	 * time | 	private: | ||||||
| 	 * wire number | 		int evNum, evValue, evTime, wireNum; | ||||||
| 	 */ |  | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif // !EVENT | #endif // !EVENT | ||||||
|   | |||||||
| @@ -1 +0,0 @@ | |||||||
| #include "pQueue.h" |  | ||||||
| @@ -1,8 +0,0 @@ | |||||||
| #ifndef pQUEUE |  | ||||||
| #define pQUEUE |  | ||||||
|  |  | ||||||
| class pQueue { |  | ||||||
| 	//TODO |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| #endif // !pQUEUE |  | ||||||
		Reference in New Issue
	
	Block a user
	 Joel Beckmeyer
					Joel Beckmeyer