BeamAdapter
Loading...
Searching...
No Matches
deprecatedcomponent.h
1/******************************************************************************
2* BeamAdapter plugin *
3* (c) 2006 Inria, University of Lille, CNRS *
4* *
5* This program is free software; you can redistribute it and/or modify it *
6* under the terms of the GNU Lesser General Public License as published by *
7* the Free Software Foundation; either version 2.1 of the License, or (at *
8* your option) any later version. *
9* *
10* This program is distributed in the hope that it will be useful, but WITHOUT *
11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License *
13* for more details. *
14* *
15* You should have received a copy of the GNU Lesser General Public License *
16* along with this program. If not, see <http://www.gnu.org/licenses/>. *
17*******************************************************************************
18* Authors: see Authors.md *
19* *
20* Contact information: contact@sofa-framework.org *
21******************************************************************************/
22#pragma once
23
24#include <sofa/core/objectmodel/BaseComponent.h>
25
26
27namespace sofa::component
28{
29using sofa::core::objectmodel::BaseComponent ;
30using sofa::core::objectmodel::BaseContext ;
31using sofa::core::objectmodel::BaseObjectDescription ;
32
33class DeprecatedComponent : public BaseComponent
34{
35public:
36 SOFA_CLASS(DeprecatedComponent, BaseComponent) ;
37
39 template<class T>
40 static bool canCreate(T* obj, BaseContext* /*context*/, BaseObjectDescription* /*arg*/)
41 {
42 obj->serr << "[Deprecated component]: " << obj->getName() ;
43 return false;
44 }
45private:
46} ;
47
48} // namespace sofa::component
49
50
Definition deprecatedcomponent.h:34
static bool canCreate(T *obj, BaseContext *, BaseObjectDescription *)
Pre-construction check method called by ObjectFactory.
Definition deprecatedcomponent.h:40