sentinel-stack.icc File Reference
(Revision: 7358)
Go to the source code of this file.
Namespaces | |
namespace | Gecode |
namespace | Gecode::Support |
Classes | |
class | Gecode::Support::SentinelStack< T > |
A simple stack that uses a sentinel element. More... | |
Defines | |
#define | GECODE_AUTOSTACK(T, S, X, N) |
Simple sentinel stack using automatic memory. |
Define Documentation
#define GECODE_AUTOSTACK | ( | T, | |||
S, | |||||
X, | |||||
N | ) |
Value:
int __GECODE__AS__ ## X ## __LINE__ ## n = (N); \ GECODE_AUTOARRAY(T,__GECODE__AS__ ## X ## __LINE__,(__GECODE__AS__ ## X ## __LINE__ ## n) + 1); \ Gecode::Support::SentinelStack<T> X(__GECODE__AS__ ## X ## __LINE__,(S),__GECODE__AS__ ## X ## __LINE__ ## n);
Allocates automatic memory for a sentinel stack X with N objects of type T with sentinel S.
As soon as the current scope is left, the memory is freed.
Definition at line 134 of file sentinel-stack.icc.