#include <rechmld.h>
Inheritance diagram for MouldRecordHandler:
Public Member Functions | |
MouldRecordHandler () | |
~MouldRecordHandler () | |
virtual UINT32 * | GetTagList () |
Provides the record handler system with a list of records handled by this handler. | |
virtual BOOL | HandleRecord (CXaraFileRecord *pCXaraFileRecord) |
Handles the given record. | |
Private Member Functions | |
CC_DECLARE_DYNAMIC (MouldRecordHandler) | |
BOOL | HandleMouldRecord (CXaraFileRecord *pCXaraFileRecord) |
Handles the given record. The record has to be a envelope or perspective mould record. | |
BOOL | HandleMouldGroupRecord (CXaraFileRecord *pCXaraFileRecord) |
Handles the given record. The record has to be a mould group record. | |
BOOL | HandleMouldPathRecord (CXaraFileRecord *pCXaraFileRecord) |
Handles the given record. The record has to be a mould path record. |
Definition at line 118 of file rechmld.h.
|
Definition at line 124 of file rechmld.h. 00124 : CamelotRecordHandler() {}
|
|
Definition at line 125 of file rechmld.h.
|
|
|
|
Provides the record handler system with a list of records handled by this handler.
Implements CXaraFileRecordHandler. Definition at line 2837 of file nodemold.cpp. 02838 { 02839 static UINT32 TagList[] = { TAG_MOULD_ENVELOPE, 02840 TAG_MOULD_PERSPECTIVE, 02841 TAG_MOULD_GROUP, 02842 TAG_MOULD_PATH, 02843 TAG_MOULD_BOUNDS, // WEBSTER - markn 10/2/97 - Mould bounds record 02844 CXFRH_TAG_LIST_END}; 02845 02846 return (UINT32*)&TagList; 02847 }
|
|
Handles the given record. The record has to be a mould group record.
Definition at line 2976 of file nodemold.cpp. 02977 { 02978 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 02979 ERROR2IF(pCXaraFileRecord->GetTag() != TAG_MOULD_GROUP,FALSE,"I don't handle this tag type"); 02980 02981 NodeMouldGroup* pMouldGroup = new NodeMouldGroup; 02982 02983 if (pMouldGroup != NULL) 02984 return InsertNode(pMouldGroup); 02985 02986 return FALSE; 02987 }
|
|
Handles the given record. The record has to be a mould path record.
Definition at line 3004 of file nodemold.cpp. 03005 { 03006 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 03007 ERROR2IF(pCXaraFileRecord->GetTag() != TAG_MOULD_PATH,FALSE,"I don't handle this tag type"); 03008 03009 BOOL ok = FALSE; 03010 03011 NodeMouldPath* pNodeMouldPath = new NodeMouldPath; 03012 03013 if (pNodeMouldPath != NULL && pNodeMouldPath->SetUpPath()) 03014 { 03015 ok = pCXaraFileRecord->ReadPath(&pNodeMouldPath->InkPath); 03016 if (ok) pNodeMouldPath->InkPath.InitialiseFlags(); // Init the path flags array to something sensible 03017 if (ok) ok = InsertNode(pNodeMouldPath); 03018 if (ok) SetLastNodePathInserted(pNodeMouldPath); // Set it as last path inserted. 03019 } 03020 03021 return ok; 03022 }
|
|
Handles the given record. The record has to be a envelope or perspective mould record.
Definition at line 2914 of file nodemold.cpp. 02915 { 02916 UINT32 Tag = pCXaraFileRecord->GetTag(); 02917 02918 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 02919 ERROR2IF(Tag != TAG_MOULD_ENVELOPE && Tag != TAG_MOULD_PERSPECTIVE,FALSE,"I don't handle this tag type"); 02920 02921 NodeMould* pMould = new NodeMould; 02922 if (pMould == NULL) 02923 return FALSE; 02924 02925 // Read in the data 02926 INT32 Threshold; 02927 BOOL ok = pCXaraFileRecord->ReadINT32(&Threshold); 02928 02929 if (ok) 02930 { 02931 MouldSpace mSpace=MOULDSPACE_UNDEFINED; 02932 02933 // Find out what type of geometry to use. 02934 switch (Tag) 02935 { 02936 case TAG_MOULD_ENVELOPE: mSpace = MOULDSPACE_ENVELOPE; break; 02937 case TAG_MOULD_PERSPECTIVE: mSpace = MOULDSPACE_PERSPECTIVE; break; 02938 default: ERROR3("Unknown geometry"); break; 02939 } 02940 02941 // Create the correct geometry. 02942 ok = pMould->CreateGeometry(mSpace); 02943 02944 if (ok) 02945 { 02946 // Find the geometry and set the threshold - then we can stick the mould node in the tree. 02947 MouldGeometry* pGeometry = pMould->GetGeometry(); 02948 if (pGeometry != NULL) 02949 { 02950 pGeometry->SetThreshold(Threshold); 02951 ok = InsertNode(pMould); 02952 } 02953 else 02954 ok = FALSE; 02955 } 02956 } 02957 02958 return ok; 02959 }
|
|
Handles the given record.
Implements CXaraFileRecordHandler. Definition at line 2863 of file nodemold.cpp. 02864 { 02865 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 02866 02867 BOOL ok = TRUE; 02868 02869 switch (pCXaraFileRecord->GetTag()) 02870 { 02871 case TAG_MOULD_ENVELOPE: 02872 case TAG_MOULD_PERSPECTIVE: 02873 ok = HandleMouldRecord(pCXaraFileRecord); 02874 break; 02875 02876 case TAG_MOULD_GROUP: 02877 ok = HandleMouldGroupRecord(pCXaraFileRecord); 02878 break; 02879 02880 case TAG_MOULD_PATH: 02881 ok = HandleMouldPathRecord(pCXaraFileRecord); 02882 break; 02883 02884 // WEBSTER - markn 10/2/97 02885 // Mould bounds record 02886 case TAG_MOULD_BOUNDS: 02887 break; 02888 02889 default: 02890 ok = FALSE; 02891 ERROR3_PF(("I don't handle records with the tag (%d)\n",pCXaraFileRecord->GetTag())); 02892 break; 02893 } 02894 02895 return ok; 02896 }
|