Changes between Version 33 and Version 34 of FDORfc34
- Timestamp:
- 08/26/09 19:02:28 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
FDORfc34
v33 v34 601 601 A high level class diagram of existing reader related interfaces in FDO is as illustrated below. 602 602 603 Both FdoISqlReader and FdoIDataReader have the function to get the column name or property name according to the index. With this capability, it should be pretty easy to provide default implementation for all indexed accessfunctions. Take FdoIDataReader as an example:603 Both FdoISqlReader and FdoIDataReader have the function to get the column name or property name according to the index. With this capability, it should be pretty easy to provide default implementation for all access by index functions. Take FdoIDataReader as an example: 604 604 605 605 class FdoIDataReader: public FdoIReader 606 606 { 607 607 public: 608 virtual FdoInt32 GetInt32(FdoInt32 index); 608 virtual FdoInt32 GetInt32(FdoInt32 index) 609 { 610 FdoStringP propName = GetPropertyName(index); 611 return GetInt32(propName); 612 } 609 613 } 610 611 An implementation file (IDataReader.cpp) needs to be added:612 613 FdoInt32 FdoIDataReader::GetInt32(FdoInt32 index)614 {615 FdoStringP propName = GetPropertyName(index);616 return GetInt32(propName);617 }618 619 Note here, FdoIDataReader is overriding the GetInt32(FdoInt32 index) derived from FdoIReader. So providers can inherit the default implementation automatically without changing any codes. It only needs a recompile. Off course, providers can choose to override the default implementation by theirs if they like.620 614 621 615 In order to make it work in all cases, FdoIFeatureReader also needs to expose a function of FdoString* GetPropertyName(FdoInt32 index) and each provider needs to override it. It has been illustrated in above updated FdoIFeatureReader interface. This work is avoidless that each provider has to know how to map between property name and index for the default implementation. … … 655 649 All pure virtual functions for access by index are overrided with the default implementation in a similar way. e.g. 656 650 {{{ 657 FdoBoolean FdoIFeatureReaderByIndex 651 FdoBoolean FdoIFeatureReaderByIndex::IsNull(FdoInt32 index) 658 652 { 659 653 FdoStringP propName = GetPropertyName(index); … … 669 663 } 670 664 }}} 671 It is expected that resourcing will be supplied to modify all the existing FDO Open Source providers. Unless there are noticeable performance complaints, all of the open source providers will use the default implementation for this release.665 It is expected that resourcing will be supplied to modify all the existing FDO Open Source providers. Unless there are noticeable performance complaints, all of the open source providers will use the default implementation for this time. 672 666 673 667 == Test Plan ==