Add a convenience constructeur to SGPath
This commit is contained in:
@@ -86,6 +86,15 @@ SGPath::SGPath( const std::string& p )
|
||||
fix();
|
||||
}
|
||||
|
||||
// create a path based on "path" and a "subpath"
|
||||
SGPath::SGPath( const SGPath& p, const std::string& r )
|
||||
: path(p.path),
|
||||
_cached(false)
|
||||
{
|
||||
append(r);
|
||||
fix();
|
||||
}
|
||||
|
||||
SGPath::SGPath(const SGPath& p) :
|
||||
path(p.path),
|
||||
_cached(p._cached),
|
||||
|
||||
@@ -58,6 +58,7 @@ public:
|
||||
/** Default constructor */
|
||||
SGPath();
|
||||
|
||||
/** Copy contructor */
|
||||
SGPath(const SGPath& p);
|
||||
|
||||
SGPath& operator=(const SGPath& p);
|
||||
@@ -68,6 +69,13 @@ public:
|
||||
*/
|
||||
SGPath( const std::string& p );
|
||||
|
||||
/**
|
||||
* Construct a path based on the starting path provided and a relative subpath
|
||||
* @param p initial path
|
||||
* @param r relative subpath
|
||||
*/
|
||||
SGPath( const SGPath& p, const std::string& r );
|
||||
|
||||
/** Destructor */
|
||||
~SGPath();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user