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

stilheader.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002  * Copyright (c) 2006 International Business Machines Corporation
00003  * All rights reserved. This program and the accompanying materials
00004  * are made available under the terms of the Common Public License v1.0
00005  * which accompanies this distribution, and is available at
00006  * http://www.opensource.org/licenses/cpl1.0.php
00007  *
00008  * Contributors:
00009  *    Douglas Sprague, Joel Wheeler - initial API and implementation
00010  *
00011  *****************************************************************************/
00012 
00013 #ifndef STILHeader_H
00014 #define STILHeader_H
00015 
00016 #include "stilcomstr.h"
00017 
00018 
00019 #include "stilcom.h"               
00020 #include "stilblock.h"         
00021 #include "stilhistory.h"       
00022 
00023 //---------------------------------------------------------------------------
00030 //---------------------------------------------------------------------------
00031 class STILHeader : public STILBlock {
00032 
00033   // - Public members
00034   public:
00035 
00036     // - Default Constructor
00037     STILHeader();
00038 
00039     // - Copy Constructor
00040     STILHeader(const STILHeader &);
00041 
00042     // - Destructor
00043     virtual ~STILHeader();
00044 
00045     // - Assignment operator
00046     STILHeader & operator=(const STILHeader &);
00047 
00048     // - Initialize this STILHeader object.
00049     void        init();
00050 
00051     // - Write out Header to a given FILE
00052     virtual void write(FILE * pOutFile, LONG indentation=0) const;
00053 
00054 
00055     // - Get/Set the current Title
00056     const sstring & getTitle() const;
00057     void        setTitle(const sstring &);
00058 
00059     // - Get/Set the current Date
00060     const sstring & getDate() const;
00061     void           setDate(const sstring &);
00062 
00063     // - Get/Set the current Source
00064     const sstring & getSource() const;
00065     void           setSource(const sstring &);
00066 
00067     // - Get/New the History block (new used for writing)
00068     const STILHistory * getHistory() const;
00069     void                setHistory(const STILHistory &);
00070 
00071 
00072   // Private members
00073   private:
00074 
00075     sstring                 m_title;           // STIL Header::Title
00076     sstring                 m_date  ;          // STIL Header::Date
00077     sstring                 m_source;          // STIL Header::Source
00078     STILHistory             m_history;         // STIL Header::History
00079 
00080 }; // end STILHeader class
00081 
00082 // Inline functions
00083 //--------------------------------------------------------------------------
00091 //--------------------------------------------------------------------------
00092 inline const sstring & STILHeader::getTitle() const { return m_title; }
00093 
00094 //--------------------------------------------------------------------------
00102 //--------------------------------------------------------------------------
00103 inline void           STILHeader::setTitle(const sstring & t) {
00104   m_title = t;
00105   addEntity(Title,"Title",t);
00106 }
00107 
00108 //--------------------------------------------------------------------------
00116 //--------------------------------------------------------------------------
00117 inline const sstring & STILHeader::getDate() const { return m_date; }
00118 
00119 //--------------------------------------------------------------------------
00127 //--------------------------------------------------------------------------
00128 inline void           STILHeader::setDate(const sstring & d) {
00129   m_date = d;
00130   addEntity(Date,"Date",d);
00131 }
00132 
00133 //--------------------------------------------------------------------------
00141 //--------------------------------------------------------------------------
00142 inline const sstring & STILHeader::getSource() const { return m_source; }
00143 
00144 //--------------------------------------------------------------------------
00152 //--------------------------------------------------------------------------
00153 inline void           STILHeader::setSource(const sstring & s) {
00154   m_source = s;
00155   addEntity(Source,"Source",s);
00156 }
00157 
00158 //--------------------------------------------------------------------------
00166 //--------------------------------------------------------------------------
00167 inline const STILHistory *  STILHeader::getHistory() const{ return &m_history; }
00168 
00169 
00170 
00171 #endif

This page last updated on 6 Jul 2007

SourceForge.net Logo