Added appendComponent() and getComponentAt() functions.
This commit is contained in:
parent
90b9650ede
commit
1d44fdfab5
@ -192,5 +192,23 @@ const bool path::isDirectParentOf(const path& p) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void path::appendComponent(const path::component& c)
|
||||||
|
{
|
||||||
|
m_list.push_back(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const path::component& path::getComponentAt(const int pos) const
|
||||||
|
{
|
||||||
|
return (m_list[pos]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
path::component& path::getComponentAt(const int pos)
|
||||||
|
{
|
||||||
|
return (m_list[pos]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} // utility
|
} // utility
|
||||||
} // vmime
|
} // vmime
|
||||||
|
@ -65,6 +65,26 @@ public:
|
|||||||
const bool operator==(const path& p) const;
|
const bool operator==(const path& p) const;
|
||||||
const bool operator!=(const path& p) const;
|
const bool operator!=(const path& p) const;
|
||||||
|
|
||||||
|
/** Append a component to the path.
|
||||||
|
*
|
||||||
|
* @param c component to add
|
||||||
|
*/
|
||||||
|
void appendComponent(const component& c);
|
||||||
|
|
||||||
|
/** Return the component at the specified position.
|
||||||
|
*
|
||||||
|
* @param pos position
|
||||||
|
* @return component at position 'pos'
|
||||||
|
*/
|
||||||
|
const component& getComponentAt(const int pos) const;
|
||||||
|
|
||||||
|
/** Return the component at the specified position.
|
||||||
|
*
|
||||||
|
* @param pos position
|
||||||
|
* @return component at position 'pos'
|
||||||
|
*/
|
||||||
|
component& getComponentAt(const int pos);
|
||||||
|
|
||||||
/** Test whether this path is empty (root).
|
/** Test whether this path is empty (root).
|
||||||
*
|
*
|
||||||
* @return true if the path is empty (no components = root)
|
* @return true if the path is empty (no components = root)
|
||||||
|
Loading…
Reference in New Issue
Block a user