taglists.h

Go to the documentation of this file.
00001 // $Id: taglists.h 1282 2006-06-09 09:46:49Z alex $
00002 // Defines the lists and list items used to manage tags
00003 /* @@tag:xara-cn@@ DO NOT MODIFY THIS LINE
00004 ================================XARAHEADERSTART===========================
00005  
00006                Xara LX, a vector drawing and manipulation program.
00007                     Copyright (C) 1993-2006 Xara Group Ltd.
00008        Copyright on certain contributions may be held in joint with their
00009               respective authors. See AUTHORS file for details.
00010 
00011 LICENSE TO USE AND MODIFY SOFTWARE
00012 ----------------------------------
00013 
00014 This file is part of Xara LX.
00015 
00016 Xara LX is free software; you can redistribute it and/or modify it
00017 under the terms of the GNU General Public License version 2 as published
00018 by the Free Software Foundation.
00019 
00020 Xara LX and its component source files are distributed in the hope
00021 that it will be useful, but WITHOUT ANY WARRANTY; without even the
00022 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00023 See the GNU General Public License for more details.
00024 
00025 You should have received a copy of the GNU General Public License along
00026 with Xara LX (see the file GPL in the root directory of the
00027 distribution); if not, write to the Free Software Foundation, Inc., 51
00028 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00029 
00030 
00031 ADDITIONAL RIGHTS
00032 -----------------
00033 
00034 Conditional upon your continuing compliance with the GNU General Public
00035 License described above, Xara Group Ltd grants to you certain additional
00036 rights. 
00037 
00038 The additional rights are to use, modify, and distribute the software
00039 together with the wxWidgets library, the wxXtra library, and the "CDraw"
00040 library and any other such library that any version of Xara LX relased
00041 by Xara Group Ltd requires in order to compile and execute, including
00042 the static linking of that library to XaraLX. In the case of the
00043 "CDraw" library, you may satisfy obligation under the GNU General Public
00044 License to provide source code by providing a binary copy of the library
00045 concerned and a copy of the license accompanying it.
00046 
00047 Nothing in this section restricts any of the rights you have under
00048 the GNU General Public License.
00049 
00050 
00051 SCOPE OF LICENSE
00052 ----------------
00053 
00054 This license applies to this program (XaraLX) and its constituent source
00055 files only, and does not necessarily apply to other Xara products which may
00056 in part share the same code base, and are subject to their own licensing
00057 terms.
00058 
00059 This license does not apply to files in the wxXtra directory, which
00060 are built into a separate library, and are subject to the wxWindows
00061 license contained within that directory in the file "WXXTRA-LICENSE".
00062 
00063 This license does not apply to the binary libraries (if any) within
00064 the "libs" directory, which are subject to a separate license contained
00065 within that directory in the file "LIBS-LICENSE".
00066 
00067 
00068 ARRANGEMENTS FOR CONTRIBUTION OF MODIFICATIONS
00069 ----------------------------------------------
00070 
00071 Subject to the terms of the GNU Public License (see above), you are
00072 free to do whatever you like with your modifications. However, you may
00073 (at your option) wish contribute them to Xara's source tree. You can
00074 find details of how to do this at:
00075   http://www.xaraxtreme.org/developers/
00076 
00077 Prior to contributing your modifications, you will need to complete our
00078 contributor agreement. This can be found at:
00079   http://www.xaraxtreme.org/developers/contribute/
00080 
00081 Please note that Xara will not accept modifications which modify any of
00082 the text between the start and end of this header (marked
00083 XARAHEADERSTART and XARAHEADEREND).
00084 
00085 
00086 MARKS
00087 -----
00088 
00089 Xara, Xara LX, Xara X, Xara X/Xtreme, Xara Xtreme, the Xtreme and Xara
00090 designs are registered or unregistered trademarks, design-marks, and/or
00091 service marks of Xara Group Ltd. All rights in these marks are reserved.
00092 
00093 
00094       Xara Group Ltd, Gaddesden Place, Hemel Hempstead, HP2 6EX, UK.
00095                         http://www.xara.com/
00096 
00097 =================================XARAHEADEREND============================
00098  */
00099 
00100 #ifndef INC_TAGLISTS
00101 #define INC_TAGLISTS
00102 
00103 #include "cxftags.h"
00104 //#include "list.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00105 //#include "listitem.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00106 
00107 /***********************************************************************************************
00108 
00109 >   class AtomicTagListItem : public ListItem
00110 
00111     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00112     Created:    16/8/96
00113     Purpose:    An item that appears in the AtomicTagList
00114 
00115 ***********************************************************************************************/
00116 
00117 class AtomicTagListItem : public ListItem
00118 {
00119 CC_DECLARE_MEMDUMP(AtomicTagListItem)
00120 
00121 public:
00122     AtomicTagListItem()             { Tag = TAG_UNDEFINED; }
00123     AtomicTagListItem(UINT32 ThisTag) { Tag = ThisTag; }
00124 
00125     UINT32 GetTag() { return Tag; }
00126 private:
00127     UINT32 Tag;
00128 };
00129 
00130 /***********************************************************************************************
00131 
00132 >   class EssentialTagListItem : public ListItem
00133 
00134     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00135     Created:    16/8/96
00136     Purpose:    An item that appears in the EssentialTagList
00137 
00138 ***********************************************************************************************/
00139 
00140 class EssentialTagListItem : public ListItem
00141 {
00142 CC_DECLARE_MEMDUMP(EssentialTagListItem)
00143 
00144 public:
00145     EssentialTagListItem()              { Tag = TAG_UNDEFINED; }
00146     EssentialTagListItem(UINT32 ThisTag)    { Tag = ThisTag; }
00147 
00148     UINT32 GetTag() { return Tag; }
00149 private:
00150     UINT32 Tag;
00151 };
00152 
00153 /***********************************************************************************************
00154 
00155 >   class TagDescriptionListItem : public ListItem
00156 
00157     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00158     Created:    16/8/96
00159     Purpose:    An item that appears in the TagDescriptionList
00160 
00161 ***********************************************************************************************/
00162 
00163 class TagDescriptionListItem : public ListItem
00164 {
00165 CC_DECLARE_MEMDUMP(TagDescriptionListItem)
00166 
00167 public:
00168     TagDescriptionListItem()                                    { Tag = TAG_UNDEFINED; pStr = NULL; }
00169     TagDescriptionListItem(UINT32 ThisTag, String_256* pThisStr)    { Tag = ThisTag; pStr = pThisStr; }
00170 
00171     ~TagDescriptionListItem()   { if (pStr != NULL) delete pStr; }
00172     
00173     UINT32 GetTag()         { return Tag; }
00174     String_256* GetString() { return pStr; }
00175 
00176 private:
00177     UINT32      Tag;
00178     String_256* pStr;
00179 };
00180 
00181 /***********************************************************************************************
00182 
00183 >   class AtomicTagList : public List
00184 
00185     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00186     Created:    16/8/96
00187     Purpose:    Keeps a list of all the atomic tags present in the imported file.
00188 
00189                 This only relates to new format files
00190 
00191                 An atomic tag is a tag that represents the head of a sub-tree that should be
00192                 taken as a single entity.
00193                 E.g. a TextStory tag is an atomic tag because it, and all it's children, represent
00194                 one object (same applies for mould & blend tags).
00195 
00196                 If an importer reads a record that it doesn't understand, and it's been defined as
00197                 an atomic record, then it should ignore the record AND ALL ITS CHILD RECORDS!
00198 
00199 ***********************************************************************************************/
00200 
00201 class AtomicTagList : public List
00202 {
00203 CC_DECLARE_MEMDUMP(AtomicTagList)
00204 
00205 public:
00206     AtomicTagList() {}
00207 
00208     void AddTail(AtomicTagListItem* pItem)              { List::AddTail(pItem); };
00209     AtomicTagListItem* GetHead()                        { return (AtomicTagListItem*)List::GetHead(); }
00210     AtomicTagListItem* GetNext(AtomicTagListItem* pItem){ return (AtomicTagListItem*)List::GetNext(pItem); }
00211 };
00212 
00213 
00214 /***********************************************************************************************
00215 
00216 >   class EssentialTagList : public List
00217 
00218     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00219     Created:    16/8/96
00220     Purpose:    Keeps a list of all the essential tags present in the imported file.
00221 
00222                 This only relates to new format files
00223 
00224                 An essential tag is a tag that the importer must understand in order to successfully
00225                 load the file.
00226 
00227                 If the importer does not recognise the tag, and it's defined to be essential, the importer
00228                 should abort the import.
00229 
00230                 We have no examples of such a tag.  This mechanism is in place in case we wish to prevent
00231                 old importers loading in newer versions of the file format.
00232 
00233 ***********************************************************************************************/
00234 
00235 class EssentialTagList : public List
00236 {
00237 CC_DECLARE_MEMDUMP(EssentialTagList)
00238 
00239 public:
00240     EssentialTagList() {}
00241 
00242     void AddTail(EssentialTagListItem* pItem)                   { List::AddTail(pItem); };
00243     EssentialTagListItem* GetHead()                             { return (EssentialTagListItem*)List::GetHead(); }
00244     EssentialTagListItem* GetNext(EssentialTagListItem* pItem)  { return (EssentialTagListItem*)List::GetNext(pItem); }
00245 };
00246 
00247 /***********************************************************************************************
00248 
00249 >   class TagDescriptionList : public List
00250 
00251     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00252     Created:    16/8/96
00253     Purpose:    Keeps a list of all the tag descriptions present in the imported file.
00254 
00255                 This only relates to new format files
00256 
00257                 This will only come into use in newer versions of the file format.  It allows old importers
00258                 to describe an unknown tag to the user.
00259 
00260 ***********************************************************************************************/
00261 
00262 class TagDescriptionList : public List
00263 {
00264 CC_DECLARE_MEMDUMP(TagDescriptionList)
00265 
00266 public:
00267     TagDescriptionList() {}
00268 
00269     void AddTail(TagDescriptionListItem* pItem)                     { List::AddTail(pItem); };
00270     TagDescriptionListItem* GetHead()                               { return (TagDescriptionListItem*)List::GetHead(); }
00271     TagDescriptionListItem* GetNext(TagDescriptionListItem* pItem)  { return (TagDescriptionListItem*)List::GetNext(pItem); }
00272 };
00273 
00274 #endif  // INC_TAGLISTS

Generated on Sat Nov 10 03:47:08 2007 for Camelot by  doxygen 1.4.4