Skip to content
Snippets Groups Projects
ScopedClient.cpp 1.15 KiB
/*
 * This file is part of ArmarX.
 *
 * ArmarX is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * ArmarX is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 * @author     Fabian Reister ( fabian dot reister at kit dot edu )
 * @date       2021
 * @copyright  http://www.gnu.org/licenses/gpl-2.0.txt
 *             GNU General Public License
 */


#include "ScopedClient.h"

namespace armarx::viz
{

    Layer ScopedClient::layer(std::string const& name) const
    {
        layers.insert(name);

        return Client::layer(name);
    }

    ScopedClient::~ScopedClient()
    {
        for (const auto& layer : layers)
        {
            Client::commitDeleteLayer(layer);
        }
    }

}  // namespace armarx::viz