| Polaris: LongElem.h Source File | ||
|
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members
LongElem.hGo to the documentation of this file.00001 /// 00002 /// 00003 #ifndef _LONG_ELEM_H 00004 #define _LONG_ELEM_H 00005 /// 00006 /// file Long.h 00007 /// 00008 #ifdef POLARIS_GNU_PRAGMAS 00009 #pragma interface 00010 #endif 00011 /// 00012 #include "ClassNames.h" 00013 #include "Listable.h" 00014 /// 00015 class LongElem : public Listable { 00016 protected: 00017 int _val; 00018 00019 public: 00020 LongElem(int v) 00021 { 00022 #ifdef CLASS_INSTANCE_REGISTRY 00023 register_instance(LONG_ELEM, sizeof(LongElem), this); 00024 #endif 00025 00026 _val = v; } 00027 00028 virtual ~LongElem(); 00029 00030 int value() const 00031 { return _val; } 00032 00033 void value(int val) 00034 { _val = val; } 00035 00036 operator int () const 00037 { return _val; } 00038 00039 inline void print(ostream & o) const 00040 { o << _val; } 00041 00042 inline int structures_OK() const 00043 { return 1; } 00044 00045 inline Listable *listable_clone() const 00046 { return new LongElem(_val); } 00047 }; 00048 00049 #endif |
||
|