diff --git a/pdal/Stage.hpp b/pdal/Stage.hpp index 64f24178b4..3b3ca1ce7c 100644 --- a/pdal/Stage.hpp +++ b/pdal/Stage.hpp @@ -138,12 +138,13 @@ class PDAL_DLL Stage { return false; } /** - Determine if a pipeline with this stage as a sink is streamable. + Return a pointer to a pipeline's first non-streamable stage, + if one exists. - \return Nullptr if the stage is streamable, a pointer to this stage + \return nullptr if the stage is streamable, a pointer to this stage otherwise. */ - virtual const Stage *checkStreamable() const + virtual const Stage *findNonstreamable() const { return this; } /** diff --git a/pdal/Streamable.cpp b/pdal/Streamable.cpp index 749d47696f..bbf4c6cbf6 100644 --- a/pdal/Streamable.cpp +++ b/pdal/Streamable.cpp @@ -53,13 +53,13 @@ bool Streamable::pipelineStreamable() const } -const Stage *Streamable::checkStreamable() const +const Stage *Streamable::findNonstreamable() const { const Stage *nonstreamable; for (const Stage *s : m_inputs) { - nonstreamable = s->checkStreamable(); + nonstreamable = s->findNonstreamable(); if (nonstreamable) return nonstreamable; } @@ -114,7 +114,7 @@ void Streamable::execute(StreamPointTable& table) } }; - const Stage *nonstreaming = checkStreamable(); + const Stage *nonstreaming = findNonstreamable(); if (nonstreaming) nonstreaming->throwError("Attempting to use stream mode with a " "stage that doesn't support streaming."); diff --git a/pdal/Streamable.hpp b/pdal/Streamable.hpp index f8d378acdf..e2daea4d5e 100644 --- a/pdal/Streamable.hpp +++ b/pdal/Streamable.hpp @@ -109,12 +109,12 @@ class PDAL_DLL Streamable : public virtual Stage {} /** - Determine if a pipeline is streamable. + Find the first nonstreamable stage in a pipeline. - \return NULL if the pipeline is streamable, otherwise returns - a pointer to a stage that's not streamable. + \return NULL if the pipeline is streamable, otherwise return + a pointer to the first found stage that's not streamable. */ - const Stage *checkStreamable() const; + const Stage *findNonstreamable() const; }; } // namespace pdal