⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 memtabledataeh.hpp

📁 最新的 DBGRIDEH4.0
💻 HPP
📖 第 1 页 / 共 4 页
字号:
	HIDESBASE TMTAggregateEh* __fastcall Add(void);
	Db::TDataSet* __fastcall DataSet(void);
	HIDESBASE void __fastcall Clear(void);
	void __fastcall Recalc(void);
	void __fastcall Reset(void);
	__property bool Active = {read=FActive, write=SetActive, nodefault};
	__property TMTAggregateEh* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
	__property UpdateCount ;
public:
	#pragma option push -w-inl
	/* TCollection.Destroy */ inline __fastcall virtual ~TMTAggregatesEh(void) { }
	#pragma option pop
	
};


class DELPHICLASS TMemRecViewEh;
class DELPHICLASS TMemoryTreeListEh;
class PASCALIMPLEMENTATION TMemRecViewEh : public Memtreeeh::TBaseTreeNodeEh 
{
	typedef Memtreeeh::TBaseTreeNodeEh inherited;
	
public:
	TMemRecViewEh* operator[](int Index) { return NodeItems[Index]; }
	
private:
	TMemoryRecordEh* __fastcall GetRec(void);
	HIDESBASE TMemRecViewEh* __fastcall GetItem(const int Index);
	TMemoryTreeListEh* __fastcall GetNodeOwner(void);
	TMemRecViewEh* __fastcall GetNodeParent(void);
	void __fastcall SetNodeParent(const TMemRecViewEh* Value);
	bool __fastcall GetNodeExpanded(void);
	bool __fastcall GetNodeHasChildren(void);
	int __fastcall GetNodeIndex(void);
	int __fastcall GetNodeLevel(void);
	bool __fastcall GetNodeVisible(void);
	int __fastcall GetVisibleNodesCount(void);
	int __fastcall GetVisibleNodeIndex(void);
	TMemRecViewEh* __fastcall GetVisibleNodeItem(const int Index);
	void __fastcall SetNodeExpanded(const bool Value);
	int __fastcall GetNodesCount(void);
	void __fastcall SetNodeHasChildren(const bool Value);
	
public:
	__fastcall virtual ~TMemRecViewEh(void);
	void __fastcall SortByFields(const AnsiString SortByStr);
	__property TMemoryRecordEh* Rec = {read=GetRec};
	__property TMemRecViewEh* NodeItems[int Index] = {read=GetItem/*, default*/};
	__property int NodesCount = {read=GetNodesCount, nodefault};
	__property TMemoryTreeListEh* NodeOwner = {read=GetNodeOwner};
	__property TMemRecViewEh* NodeParent = {read=GetNodeParent, write=SetNodeParent};
	__property bool NodeHasChildren = {read=GetNodeHasChildren, write=SetNodeHasChildren, nodefault};
	__property int NodeLevel = {read=GetNodeLevel, nodefault};
	__property bool NodeExpanded = {read=GetNodeExpanded, write=SetNodeExpanded, nodefault};
	__property int VisibleNodesCount = {read=GetVisibleNodesCount, nodefault};
	__property int NodeIndex = {read=GetNodeIndex, nodefault};
	__property bool NodeVisible = {read=GetNodeVisible, nodefault};
	__property TMemRecViewEh* VisibleNodeItems[int Index] = {read=GetVisibleNodeItem};
	__property int VisibleNodeIndex = {read=GetVisibleNodeIndex, nodefault};
public:
	#pragma option push -w-inl
	/* TBaseTreeNodeEh.Create */ inline __fastcall virtual TMemRecViewEh(void) : Memtreeeh::TBaseTreeNodeEh() { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TMemoryTreeListEh : public Memtreeeh::TTreeListEh 
{
	typedef Memtreeeh::TTreeListEh inherited;
	
public:
	TMemRecViewEh* operator[](int Index) { return VisibleItem[Index]; }
	
private:
	bool FDefaultNodeExpanded;
	bool FDefaultNodeHasChildren;
	TMemRecViewEh* FDefaultParentNode;
	bool FFullBuildCheck;
	Contnrs::TObjectList* FInsertedNodeStack;
	Contnrs::TObjectList* FVisibleExpandedItems;
	Contnrs::TObjectList* FVisibleItems;
	bool FVisibleItemsObsolete;
	bool FFilterNodeIfParentVisible;
	int __fastcall GetAccountableCount(void);
	TMemRecViewEh* __fastcall GetAccountableItem(const int Index);
	AnsiString __fastcall GetKeyFieldNames();
	AnsiString __fastcall GetParentFieldNames();
	
protected:
	TRecordsViewEh* FRecordsViewEh;
	int __fastcall GetVisibleCount(void);
	virtual TMemRecViewEh* __fastcall GetVisibleItem(const int Index);
	virtual void __fastcall SetChieldVisibleForVisibleParents(TMemRecViewEh* Parent);
	void __fastcall SetChieldsVisible(TMemRecViewEh* Parent, bool Visible, bool ARecurse);
	
public:
	__fastcall TMemoryTreeListEh(TRecordsViewEh* ARecordsViewEh);
	__fastcall virtual ~TMemoryTreeListEh(void);
	HIDESBASE TMemRecViewEh* __fastcall AddChild(const AnsiString Name, TMemRecViewEh* Parent, TMemoryRecordEh* MemRecord);
	TMemRecViewEh* __fastcall AddChildAtKey(const AnsiString Name, const AnsiString KeyFieldNames, const AnsiString ParentFieldNames, TMemoryRecordEh* MemRecord);
	bool __fastcall CheckReferenceLoop(TMemoryRecordEh* MemRecord, const Variant &NewRefValue);
	TMemRecViewEh* __fastcall GetChildNodesForKey(TMemRecViewEh* StartNode, const AnsiString KeyFieldNames, const AnsiString ParentFieldNames, TMemoryRecordEh* MemRecord, Contnrs::TObjectList* ChildList);
	int __fastcall GetIndexForNode(TMemoryRecordEh* Rec, TMemRecViewEh* ParentNode);
	HIDESBASE TMemRecViewEh* __fastcall GetNode(TMemRecViewEh* StartNode, TMemoryRecordEh* MemRecord);
	TMemRecViewEh* __fastcall GetNodeAtValue(TMemRecViewEh* StartNode, const AnsiString FieldNames, const Variant &Value);
	TMemRecViewEh* __fastcall GetParentNodeAtKey(TMemRecViewEh* StartNode, const AnsiString KeyFieldNames, const AnsiString ParentFieldNames, TMemoryRecordEh* MemRecord);
	TMemRecViewEh* __fastcall GetParentNodeAtKeyValue(TMemRecViewEh* StartNode, const AnsiString KeyFieldNames, const AnsiString ParentFieldNames, const Variant &RefKeyValue);
	TMemRecViewEh* __fastcall GetParentNodeForRec(TMemoryRecordEh* MemRecord);
	TMemRecViewEh* __fastcall GetParentNodeForRefValue(const Variant &RefValue);
	TMemRecViewEh* __fastcall UpdateParent(TMemRecViewEh* Node, const AnsiString KeyFieldNames, const AnsiString ParentFieldNames, TMemoryRecordEh* MemRecord, bool ReIndex);
	void __fastcall BuildVisibleItems(void);
	void __fastcall GetRecordsList(Contnrs::TObjectList* List, TMemRecViewEh* Node, bool ARecurse = true);
	virtual void __fastcall MoveTo(Memtreeeh::TBaseTreeNodeEh* Node, Memtreeeh::TBaseTreeNodeEh* Destination, Memtreeeh::TNodeAttachModeEh Mode, bool ReIndex);
	virtual void __fastcall SortData(Memtreeeh::TCompareNodesEh CompareProg, System::TObject* ParamSort, bool ARecurse = true);
	void __fastcall UpdateNodesState(TMemRecViewEh* Parent);
	void __fastcall UpdateNodeState(TMemRecViewEh* Node, bool IsUpdateParent);
	__property int AccountableCount = {read=GetAccountableCount, nodefault};
	__property TMemRecViewEh* AccountableItem[int Index] = {read=GetAccountableItem};
	__property bool DefaultNodeExpanded = {read=FDefaultNodeExpanded, write=FDefaultNodeExpanded, default=0};
	__property bool DefaultNodeHasChildren = {read=FDefaultNodeHasChildren, write=FDefaultNodeHasChildren, default=0};
	__property TMemRecViewEh* DefaultParentNode = {read=FDefaultParentNode, write=FDefaultParentNode};
	__property bool FullBuildCheck = {read=FFullBuildCheck, write=FFullBuildCheck, nodefault};
	__property bool FilterNodeIfParentVisible = {read=FFilterNodeIfParentVisible, write=FFilterNodeIfParentVisible, nodefault};
	__property AnsiString KeyFieldNames = {read=GetKeyFieldNames};
	__property AnsiString ParentFieldNames = {read=GetParentFieldNames};
	__property int VisibleCount = {read=GetVisibleCount, nodefault};
	__property TMemRecViewEh* VisibleItem[int Index] = {read=GetVisibleItem/*, default*/};
	__property Contnrs::TObjectList* VisibleItems = {read=FVisibleExpandedItems};
	__property bool VisibleItemsObsolete = {read=FVisibleItemsObsolete, nodefault};
};


class DELPHICLASS TOrderByItemEh;
class PASCALIMPLEMENTATION TOrderByItemEh : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	int FieldIndex;
	bool Desc;
	bool CaseIns;
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TOrderByItemEh(void) : System::TObject() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TOrderByItemEh(void) { }
	#pragma option pop
	
};


class DELPHICLASS TOrderByList;
class PASCALIMPLEMENTATION TOrderByList : public Contnrs::TObjectList 
{
	typedef Contnrs::TObjectList inherited;
	
public:
	TOrderByItemEh* operator[](int Index) { return Items[Index]; }
	
protected:
	HIDESBASE TOrderByItemEh* __fastcall GetItem(int Index);
	HIDESBASE void __fastcall SetItem(int Index, const TOrderByItemEh* Value);
	virtual int __fastcall FindFieldIndex(AnsiString FieldName);
	
public:
	AnsiString __fastcall GetToken(AnsiString Exp, int &FromIndex);
	void __fastcall ParseOrderByStr(AnsiString OrderByStr);
	__property TOrderByItemEh* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
public:
	#pragma option push -w-inl
	/* TObjectList.Create */ inline __fastcall TOrderByList(void)/* overload */ : Contnrs::TObjectList() { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TList.Destroy */ inline __fastcall virtual ~TOrderByList(void) { }
	#pragma option pop
	
};


class DELPHICLASS TRecordsViewOrderByList;
class PASCALIMPLEMENTATION TRecordsViewOrderByList : public TOrderByList 
{
	typedef TOrderByList inherited;
	
protected:
	TRecordsViewEh* FRecordsView;
	virtual int __fastcall FindFieldIndex(AnsiString FieldName);
	
public:
	__fastcall TRecordsViewOrderByList(TRecordsViewEh* ARecordsView);
public:
	#pragma option push -w-inl
	/* TList.Destroy */ inline __fastcall virtual ~TRecordsViewOrderByList(void) { }
	#pragma option pop
	
};


typedef bool __fastcall (__closure *TRecordsViewFilterEventEh)(TMemoryRecordEh* Rec);

typedef System::TObject* __fastcall (__closure *TParseOrderByStrEventEh)(AnsiString OrderByStr);

typedef Contnrs::TObjectList* __fastcall (__closure *TGetPrefilteredListEventEh)(void);

class PASCALIMPLEMENTATION TRecordsViewEh : public TRecordsListNotificatorEh 
{
	typedef TRecordsListNotificatorEh inherited;
	
public:
	TMemoryRecordEh* operator[](int Index) { return ViewRecord[Index]; }
	
private:
	TMTAggregatesEh* FAggregates;
	bool FCachedUpdates;
	int FCachedUpdatesLockCount;
	bool FCatchChanged;
	Contnrs::TObjectList* FFilteredRecsList;
	TCompareRecords FOnCompareRecords;
	Memtreeeh::TCompareNodesEh FOnCompareTreeNode;
	TRecordsViewFilterEventEh FOnFilterRecord;
	TGetPrefilteredListEventEh FOnGetPrefilteredList;
	TParseOrderByStrEventEh FOnParseOrderByStr;
	TRecordsListNotificatorDataEventEh FOnViewDataEvent;
	TRecordsViewOrderByList* FOrderByList;
	AnsiString FSortOrder;
	AnsiString FTreeViewKeyFieldName;
	DynamicArray<int >  FTreeViewKeyFields;
	AnsiString FTreeViewRefParentFieldName;
	DynamicArray<int >  FTreeViewRefParentFields;
	bool FViewAsTreeList;
	Db::TUpdateStatusSet FStatusFilter;
	Contnrs::TObjectList* FNotificators;
	int __fastcall CompareRecords(TMemoryRecordEh* Rec1, TMemoryRecordEh* Rec2);
	AnsiString __fastcall GetSortOrder();
	int __fastcall SearchNewPos(Contnrs::TObjectList* SortedList, TMemoryRecordEh* MemRec);
	int __fastcall SearchRec(Contnrs::TObjectList* SortedList, TMemoryRecordEh* MemRec);
	TMemoryRecordEh* __fastcall GetAccountableRecord(int Index);
	int __fastcall GetCount(void);
	TRecDataValues __fastcall GetOldRecVals(int Index);
	TMemoryRecordEh* __fastcall GetRec(int Index);
	Db::TUpdateStatusSet __fastcall GetStatusFilter(void);
	Variant __fastcall GetValue(int RecNo, int ValNo);
	bool __fastcall GetViewAsTreeList(void);
	TMemoryRecordEh* __fastcall GetViewRecord(int Index);
	void __fastcall SetRec(int Index, const TMemoryRecordEh* Value);
	void __fastcall SetSortOrder(const AnsiString Value);
	void __fastcall SetStatusFilter(const Db::TUpdateStatusSet Value);
	void __fastcall SetTreeViewKeyFieldName(const AnsiString Value);
	void __fastcall SetTreeViewRefParentFieldName(const AnsiString Value);
	void __fastcall SetValue(int RecNo, int ValNo, const Variant &Value);
	void __fastcall SetViewAsTreeList(const bool Value);
	TMemTableDataEh* __fastcall GetMemTableData(void);
	HIDESBASE void __fastcall SetMemTableData(const TMemTableDataEh* Value);
	
protected:
	Db::TDataSet* FDataSet;
	int FDisableFilterCount;
	TMemoryTreeListEh* FMemoryTreeList;
	virtual bool __fastcall FilterRecord(TMemoryRecordEh* MemRec, int Index);
	virtual void __fastcall AddNotificator(TRecordsListNotificatorEh* RecordsList);
	void __fastcall RemoveNotificator(TRecordsListNotificatorEh* RecordsList);
	void __fastcall ClearMemoryTreeList(void);
	virtual void __fastcall DataEvent(TMemoryRecordEh* MemRec, int Index, TRecordsListNotification Action);
	virtual void __fastcall Notify(TMemoryRecordEh* MemRec, int Index, TRecordsListNotification Action);
	virtual void __fastcall RecordMoved(TMemoryRecordEh* Item, int OldIndex, int NewIndex);
	virtual void __fastcall Resort(void);
	
public:
	__fastcall TRecordsViewEh(Db::TDataSet* ADataSet);
	__fastcall virtual ~TRecordsViewEh(void);
	int __fastcall AccountableItemsCount(void);
	int __fastcall AddRecord(TMemoryRecordEh* Rec);
	Variant __fastcall CalcAggrFieldFunc(AnsiString FieldName, AnsiString AggrFuncName);
	int __fastcall IndexOf(TMemoryRecordEh* Rec);
	TMemoryRecordEh* __fastcall NewRecord(void);
	int __fastcall ViewItemsCount(void);
	void __fastcall CancelUpdates(void);
	void __fastcall DeleteRecord(int Index);
	void __fastcall InsertRecord(int Index, TMemoryRecordEh* Rec);
	void __fastcall InstantDisableFilter(void);
	void __fastcall InstantEnableFilter(void);
	void __fastcall LockCachedUpdates(void);
	void __fastcall MergeChangeLog(void);
	void __fastcall RebuildMemoryTreeList(void);
	void __fastcall RefreshFilteredRecsList(void);
	void __fastcall RefreshRecord(int Index, TMemoryRecordEh* Rec);
	void __fastcall RevertRecord(int Index);
	void __fastcall UnlockCachedUpdates(void);
	virtual void __fastcall UpdateFields(void);
	void __fastcall QuickSort(int L, int R, TCompareRecords Compare, System::TObject* ParamSort);
	void __fastcall SortData(TCompareRecords Compare, System::TObject* ParamSort);
	__property TMemoryRecordEh* AccountableRecord[int Index] = {read=GetAccountableRecord};
	__property TMTAggregatesEh* Aggregates = {read=FAggregates};
	__property bool CatchChanged = {read=FCatchChanged, write=FCatchChanged, nodefault};
	__property int Count = {read=GetCount, nodefault};
	__property TMemoryTreeListEh* MemoryTreeList = {read=FMemoryTreeList};
	__property TRecDataValues OldRecVals[int Index] = {read=GetOldRecVals};
	__property TCompareRecords OnCompareRecords = {read=FOnCompareRecords, write=FOnCompareRecords};
	__property Memtreeeh::TCompareNodesEh OnCompareTreeNode = {read=FOnCompareTreeNode, write=FOnCompareTreeNode};
	__property TRecordsViewFilterEventEh OnFilterRecord = {read=FOnFilterRecord, write=FOnFilterRecord};
	__property TGetPrefilteredListEventEh OnGetPrefilteredList = {read=FOnGetPrefilteredList, write=FOnGetPrefilteredList};
	__property TParseOrderByStrEventEh OnParseOrderByStr = {read=FOnParseOrderByStr, write=FOnParseOrderByStr};
	__property TRecordsListNotificatorDataEventEh OnViewDataEvent = {read=FOnViewDataEvent, write=FOnViewDataEvent};
	__property TMemoryRecordEh* Rec[int Index] = {read=GetRec, write=SetRec};
	__property AnsiString TreeViewKeyFieldName = {read=FTreeViewKeyFieldName, write=SetTreeViewKeyFieldName};
	__property TIntArray TreeViewKeyFields = {read=FTreeViewKeyFields};
	__property AnsiString TreeViewRefParentFieldName = {read=FTreeViewRefParentFieldName, write=SetTreeViewRefParentFieldName};
	__property TIntArray TreeViewRefParentFields = {read=FTreeViewRefParentFields};
	__property Variant Value[int RecNo][int ValNo] = {read=GetValue, write=SetValue};
	__property bool ViewAsTreeList = {read=GetViewAsTreeList, write=SetViewAsTreeList, nodefault};
	__property TMemoryRecordEh* ViewRecord[int Index] = {read=GetViewRecord/*, default*/};
	__property AnsiString SortOrder = {read=GetSortOrder, write=SetSortOrder};
	__property Db::TUpdateStatusSet StatusFilter = {read=GetStatusFilter, write=SetStatusFilter, default=7};
	__property TMemTableDataEh* MemTableData = {read=GetMemTableData, write=SetMemTableData};
};


//-- var, const, procedure ---------------------------------------------------
#define mrEditStatesEh (Set<TRecordEditStateEh, resBrowseEh, resInsertEh> () << TRecordEditStateEh(1) << TRecordEditStateEh(2) )
extern PACKAGE Db::TFieldType StringDataFieldsToFields[6];
extern PACKAGE Db::TFieldType NumericDataFieldsToFields[9];
extern PACKAGE Db::TFieldType DateTimeDataFieldsToFields[3];
extern PACKAGE Db::TFieldType InterfaceDataFieldsToFields[2];
extern PACKAGE Db::TFieldType VariantDataFieldsToFields[3];
extern PACKAGE Db::TFieldType SQLTimeStampDataFieldsToFields[2];
extern PACKAGE TMetaClass* DefaultDataFieldClasses[42];
extern PACKAGE Variant __fastcall CalcAggregateValue(TMTAggregateEh* Aggregate, Db::TDataSet* DataSet, TRecordsViewEh* Records);

}	/* namespace Memtabledataeh */
using namespace Memtabledataeh;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Memtabledataeh

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -