Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

field.h

Go to the documentation of this file.
00001 // field.h --
00002 // $Id: field.h,v 1.7 2003/11/23 01:42:51 wcvs Exp $
00003 // This is part of Metakit, see https://www.equi4.com/metakit/
00004 
00009 #ifndef __FIELD_H__
00010 #define __FIELD_H__
00011 
00012 #ifndef __K4CONF_H__
00013 #error Please include "k4conf.h" before this header file
00014 #endif
00015   
00017 
00018 class c4_Field
00019 {
00020   c4_PtrArray _subFields;
00021   c4_String _name;
00022   char _type;
00023   c4_Field* _indirect;
00024 
00025 public: 
00026 /* Construction / destruction */
00027   c4_Field (const char*&, c4_Field* =0);
00028     //: Constructs a new field.
00029   ~c4_Field ();
00030 
00031 /* Repeating and compound fields */
00032   int NumSubFields() const; 
00033     //: Returns the number of subfields.
00034   c4_Field& SubField(int) const;
00035     //: Returns the description of each subfield.
00036   bool IsRepeating() const;
00037     //: Returns true if this field contains subtables.
00038   
00039 /* Field name and description */
00040   const c4_String& Name() const;
00041     //: Returns name of this field.
00042   char Type() const;
00043     //: Returns the type description of this field, if any.
00044   char OrigType() const;
00045     //: Similar, but report types which were originall 'M' as well.
00046   c4_String Description(bool anonymous_ =false) const;
00047     //: Describes the structure, omit names if anonymous.
00048   c4_String DescribeSubFields(bool anonymous_ =false) const;
00049     //: Describes just the subfields, omit names if anonymous.
00050   
00051 private:
00052   c4_Field (const c4_Field&);     // not implemented
00053   void operator= (const c4_Field&); // not implemented
00054 };
00055 
00057 
00058 #if q4_INLINE
00059 #include "field.inl"
00060 #endif
00061 
00063 
00064 #endif


Metakit C++ API Reference - https://www.equi4.com/metakit.html - extracted with Doxygen