3 #ifndef __ikp1dlayers_hpp
4 #define __ikp1dlayers_hpp
9 #include <mix/u_message.hpp>
39 T* layer (
int n)
const;
42 virtual void push (T& lay) {
43 lays.push_back(
new T(lay));
52 void insert (
int n, T& lay);
79 for (
int i=0; i<obj.
laysNum(); i++)
94 for (
int i=0; i<laysNum(); i++)
104 if (n < 0 || n >= laysNum())
107 m_name.c_str(), n, laysNum());
117 if (n < 0 || n >= laysNum())
120 m_name.c_str(), n, laysNum());
125 lays.erase(lays.begin()+n);
136 m_name.c_str(), n, laysNum());
142 m_name.c_str(), n, laysNum());
145 lays.insert(lays.begin() + n,
new T(lay));
151 for (
int i=0; i<laysNum(); i++)
154 m_name.c_str(), i+1, laysNum());
const string & getName() const
Definition: ikp1dlayers.hpp:61
static void error(const char *format,...)
virtual void push(T &lay)
Definition: ikp1dlayers.hpp:42
void insert(int n, T &lay)
Definition: ikp1dlayers.hpp:131
T * layer(int n) const
Definition: ikp1dlayers.hpp:102
void clear()
Definition: ikp1dlayers.hpp:92
string m_name
Definition: ikp1dlayers.hpp:71
std::vector< T * > lays
Definition: ikp1dlayers.hpp:68
IKP1dLayers(string name="IKP1dLayers")
Definition: ikp1dlayers.hpp:22
static void info(const char *format,...)
Definition: ikp1dlayers.hpp:17
static void warning(const char *format,...)
bool erase(int n)
Definition: ikp1dlayers.hpp:115
virtual ~IKP1dLayers()
Definition: ikp1dlayers.hpp:86
int laysNum() const
Definition: ikp1dlayers.hpp:33
void info() const
Definition: ikp1dlayers.hpp:149