Support stream output by SGPath directly.
This commit is contained in:
parent
2fb13c76f5
commit
59ecf48b72
@ -27,7 +27,7 @@ using std::endl;
|
||||
void test_dir()
|
||||
{
|
||||
simgear::Dir temp = simgear::Dir::tempDir("foo");
|
||||
cout << "created:" << temp.path().str() << endl;
|
||||
cout << "created:" << temp.path() << endl;
|
||||
|
||||
VERIFY(temp.exists());
|
||||
VERIFY(temp.path().isDir());
|
||||
|
@ -236,6 +236,13 @@ private:
|
||||
mutable time_t _modTime;
|
||||
};
|
||||
|
||||
/// Output to an ostream
|
||||
template<typename char_type, typename traits_type>
|
||||
inline
|
||||
std::basic_ostream<char_type, traits_type>&
|
||||
operator<<(std::basic_ostream<char_type, traits_type>& s, const SGPath& p)
|
||||
{ return s << "Path \"" << p.str() << "\""; }
|
||||
|
||||
|
||||
/**
|
||||
* Split a directory string into a list of it's parent directories.
|
||||
|
Loading…
Reference in New Issue
Block a user