#include <ngsentry.h>
Inheritance diagram for NodeSetSentinel:
Public Member Functions | |
NodeSetSentinel () | |
See Node::GetDebugDetails See Node::ShowDebugTreeDetails Default constructor for a NodeSetSentinel, a parent node of all the cloned Wix object name attributes. | |
NodeSetSentinel (Node *pContext, AttachNodeDirection eDir) | |
Constructor for a NodeSetSentinel, a parent node of all the cloned Wix object name attributes. | |
virtual BOOL | IsSetCandidate () const |
See Node::IsSetCandidate. | |
TemplateAttribute * | GetNameAttr (const StringBase &strName) const |
NodeSetProperty * | FindPropertyNode (const StringBase &strName) const |
NodeSetProperty * | CreatePropertyNode (const StringBase &strName) |
NodeBarProperty * | FindBarProperty () |
BOOL | TargetsExist () const |
BOOL | OnLoadName (BaseCamelotFilter *pFilter, TemplateAttribute *pImportedName) |
Attaches duplicates of newly inserted Wix ObjectName attributes as children of the sentinel when the web importer is in operation, as the web exporter doesn't export children of the sentinel (ie. it discards editing information for the sake of compactness). | |
virtual BOOL | AllowOp (ObjChangeParam *pParam, BOOL SetOpPermissionState, BOOL DoPreTriggerEdit) |
Virtual override of Node::AllowOp(), to prevent an AllowOp call to this node from chaining up the tree. AllowOp chains usually originate somewhere beneath a Layer node in the tree, propagate up to the Layer node and stop there. | |
Protected Member Functions | |
virtual BOOL | WritePreChildrenNative (BaseCamelotFilter *) |
Writes out a SetSentinel record. | |
virtual BOOL | CanWriteChildrenWeb (BaseCamelotFilter *) |
Prevents children of the sentinel being written out in the web format. | |
virtual BOOL | WritePreChildrenWeb (BaseCamelotFilter *) |
Web files don't write out SetSentinel records. This code assumes the document will only contain one SetSentinel. | |
virtual BOOL | WriteBeginChildRecordsWeb (BaseCamelotFilter *) |
Begins the child record sequence for SetSentinel in the web format. Web export doesn't write out SetSentinel records or children of the sentinel, so this overrides the default behaviour in Node by ensuring the DOWN record does not get written. | |
virtual BOOL | WriteEndChildRecordsWeb (BaseCamelotFilter *) |
Ends the child record sequence for SetSentinel in the web format. Web export doesn't write out SetSentinel records or children of the sentinel, so this overrides the default behaviour in Node by ensuring the UP record does not get written. | |
virtual UINT32 | GetNodeSize () const |
See Node::GetNodeSize. | |
virtual Node * | SimpleCopy () |
See Node::SimpleCopy. | |
Private Member Functions | |
CC_DECLARE_DYNAMIC (NodeSetSentinel) |
Definition at line 273 of file ngsentry.h.
|
See Node::GetDebugDetails See Node::ShowDebugTreeDetails Default constructor for a NodeSetSentinel, a parent node of all the cloned Wix object name attributes.
Definition at line 966 of file ngsentry.cpp.
|
|
Constructor for a NodeSetSentinel, a parent node of all the cloned Wix object name attributes.
Definition at line 984 of file ngsentry.cpp. 00985 : Node(pContext, eDir) 00986 { 00987 // Empty. 00988 }
|
|
Virtual override of Node::AllowOp(), to prevent an AllowOp call to this node from chaining up the tree. AllowOp chains usually originate somewhere beneath a Layer node in the tree, propagate up to the Layer node and stop there.
Reimplemented from Node. Definition at line 1369 of file ngsentry.cpp. 01370 { 01371 return TRUE; 01372 }
|
|
Prevents children of the sentinel being written out in the web format.
Reimplemented from Node. Definition at line 1244 of file ngsentry.cpp. 01245 { 01246 return FALSE; 01247 }
|
|
|
|
Definition at line 1090 of file ngsentry.cpp. 01091 { 01092 // I commented this out since I call this function after I have added an action 01093 // that deletes the older copy of the properties, but this error3 finds them and 01094 // wont let me create the new version! 01095 // ERROR3IF(FindPropertyNode(strName) != 0, 01096 // "NodeSetSentinel::CreatePropertyNode: NodeSetProperty already exists"); 01097 01098 NodeSetProperty* pPropNode = new NodeSetProperty(strName); 01099 if (pPropNode == 0) return 0; 01100 pPropNode->AttachNode(FindLastChild(), PREV); 01101 return pPropNode; 01102 }
|
|
Definition at line 1065 of file ngsentry.cpp. 01066 { 01067 // Search children for the given property. 01068 Node *pNode; 01069 for ( pNode = FindLastChild(); 01070 pNode != 0; 01071 pNode = pNode->FindPrevious()) 01072 if (IS_A(pNode, NodeBarProperty)) 01073 break; 01074 01075 return (NodeBarProperty*) pNode; 01076 }
|
|
Definition at line 1042 of file ngsentry.cpp. 01043 { 01044 // Search children for the given property. 01045 for (Node* pNode = FindLastChild(); 01046 pNode != 0; 01047 pNode = pNode->FindPrevious()) 01048 if (IS_A(pNode, NodeSetProperty) && 01049 ((NodeSetProperty*) pNode)->GetName() == strName) 01050 return (NodeSetProperty*) pNode; 01051 01052 // Not found. 01053 return NULL; 01054 }
|
|
Definition at line 1020 of file ngsentry.cpp. 01021 { 01022 Node *pn; 01023 for ( pn = FindFirstChild(); pn != 0; pn = pn->FindNext()) 01024 if (pn->IsAnObjectName() && ((TemplateAttribute*) pn)->GetParam() == strName) 01025 break; 01026 01027 return (TemplateAttribute*) pn; 01028 }
|
|
See Node::GetNodeSize.
Reimplemented from Node. Definition at line 1318 of file ngsentry.cpp.
|
|
See Node::IsSetCandidate.
Reimplemented from Node. Definition at line 1002 of file ngsentry.cpp. 01003 { 01004 return TRUE; 01005 }
|
|
Attaches duplicates of newly inserted Wix ObjectName attributes as children of the sentinel when the web importer is in operation, as the web exporter doesn't export children of the sentinel (ie. it discards editing information for the sake of compactness).
Definition at line 1155 of file ngsentry.cpp. 01157 { 01158 // If it's not the web filter, or we already have this name, there's nothing to do. 01159 if (!pFilter->IsWebFilter() || GetNameAttr(pImportedName->GetParam()) != 0) 01160 return TRUE; 01161 01162 // Try to clone the attribute and attach the clone as a child, preserving the order. 01163 TemplateAttribute* pCopy = (TemplateAttribute*) pImportedName->SimpleCopy(); 01164 ERRORIF(pCopy == 0, _R(IDE_NOMORE_MEMORY), FALSE); 01165 pCopy->AttachNode(this, FIRSTCHILD); 01166 01167 // Create default properties for the new set name. 01168 NodeSetProperty* pProp = new NodeSetProperty(pImportedName->GetParam()); 01169 ERRORIF(pProp == 0 || !pProp->CreateDefaults(), _R(IDE_NOMORE_MEMORY), FALSE); 01170 pProp->AttachNode(FindLastChild(), PREV); 01171 01172 // If importing into a document, rather than loading, then try to create undo 01173 // actions for the new attachments. 01174 if (pFilter->IsImporting() && pFilter->GetImportSelOp() != 0) 01175 { 01176 // Attach and create an action to hide the new attribute when we Undo. 01177 HideNodeAction* pHideAct; 01178 if (AC_FAIL == HideNodeAction::Init(pFilter->GetImportSelOp(), 01179 pFilter->GetImportSelOp()->GetUndoActions(), 01180 pCopy, TRUE, (Action**) &pHideAct)) 01181 { 01182 // Tidy up on fail. 01183 pCopy->UnlinkNodeFromTree(); 01184 delete pCopy; 01185 return FALSE; 01186 } 01187 01188 // Ditto for the set property. 01189 if (AC_FAIL == HideNodeAction::Init(pFilter->GetImportSelOp(), 01190 pFilter->GetImportSelOp()->GetUndoActions(), 01191 pProp, TRUE, (Action**) &pHideAct)) 01192 { 01193 // Tidy up on fail. 01194 pProp->UnlinkNodeFromTree(); 01195 delete pProp; 01196 return FALSE; 01197 } 01198 } 01199 01200 // Success. 01201 return TRUE; 01202 }
|
|
See Node::SimpleCopy.
Reimplemented from Node. Definition at line 1337 of file ngsentry.cpp. 01338 { 01339 NodeSetSentinel* pCopy = new NodeSetSentinel; 01340 ERRORIF(pCopy == 0, _R(IDE_NOMORE_MEMORY), 0); 01341 CopyNodeContents(pCopy); 01342 return pCopy; 01343 }
|
|
Definition at line 1117 of file ngsentry.cpp. 01118 { 01119 // Search children for a trigger stretching property. 01120 for (Node* pNode = FindLastChild(); 01121 pNode != 0; 01122 pNode = pNode->FindPrevious()) 01123 if (IS_A(pNode, NodeSetProperty)) 01124 { 01125 NamedStretchProp* pProp = (NamedStretchProp*) 01126 ((NodeSetProperty*) pNode)->GetProperty(NamedStretchProp::nIndex); 01127 01128 // if any are ticked and any have a tigger defined then a target exists 01129 if (pProp->GetState() && !pProp->GetTriggers().empty()) 01130 return TRUE; 01131 } 01132 01133 // None found. 01134 return FALSE; 01135 }
|
|
Begins the child record sequence for SetSentinel in the web format. Web export doesn't write out SetSentinel records or children of the sentinel, so this overrides the default behaviour in Node by ensuring the DOWN record does not get written.
Reimplemented from Node. Definition at line 1282 of file ngsentry.cpp. 01283 { 01284 return TRUE; 01285 }
|
|
Ends the child record sequence for SetSentinel in the web format. Web export doesn't write out SetSentinel records or children of the sentinel, so this overrides the default behaviour in Node by ensuring the UP record does not get written.
Reimplemented from Node. Definition at line 1302 of file ngsentry.cpp. 01303 { 01304 return TRUE; 01305 }
|
|
Writes out a SetSentinel record.
Reimplemented from Node. Definition at line 1216 of file ngsentry.cpp. 01217 { 01218 #ifdef DO_EXPORT 01219 CXaraFileRecord rec(TAG_SETSENTINEL, TAG_SETSENTINEL_SIZE); 01220 if (!rec.Init() || !pFilter->Write(&rec)) 01221 { 01222 pFilter->GotError(_R(IDE_FILE_WRITE_ERROR)); 01223 return FALSE; 01224 } 01225 01226 return TRUE; 01227 #else 01228 return FALSE; 01229 #endif 01230 }
|
|
Web files don't write out SetSentinel records. This code assumes the document will only contain one SetSentinel.
Reimplemented from Node. Definition at line 1262 of file ngsentry.cpp. 01263 { 01264 return FALSE; 01265 }
|