git://scientific.zcu.cz
/
jra1mw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e1b8a5a
)
added operator< to jobid
author
Michal Voců
<michal@ruk.cuni.cz>
Tue, 29 Jan 2008 18:25:32 +0000
(18:25 +0000)
committer
Michal Voců
<michal@ruk.cuni.cz>
Tue, 29 Jan 2008 18:25:32 +0000
(18:25 +0000)
org.glite.jobid.api-cpp/interface/JobId.h
patch
|
blob
|
blame
|
history
diff --git
a/org.glite.jobid.api-cpp/interface/JobId.h
b/org.glite.jobid.api-cpp/interface/JobId.h
index
d07e622
..
2e1e8e7
100755
(executable)
--- a/
org.glite.jobid.api-cpp/interface/JobId.h
+++ b/
org.glite.jobid.api-cpp/interface/JobId.h
@@
-76,7
+76,7
@@
public:
//@}
- //@ Conversions, assignments
+ //@ Conversions, assignments
, comparisons
//@{
/**
@@
-107,6
+107,12
@@
public:
*/
std::string toString() const;
+
+ /**
+ * Comparison given by lexicographical ordering of string representations.
+ * @return Result of comparison.
+ */
+ int operator< (const JobId &j) const;
//@}
@@
-262,6
+268,17
@@
JobId::toString() const
inline
+int
+JobId::operator< (const JobId &j) const
+{
+ std::string me(toString());
+ std::string js(j.toString());
+
+ return(me < js);
+}
+
+
+inline
std::string
JobId::server() const
{