Changes between Version 34 and Version 35 of FDORfc34


Ignore:
Timestamp:
Aug 26, 2009, 7:04:27 PM (15 years ago)
Author:
klain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FDORfc34

    v34 v35  
    601601A high level class diagram of existing reader related interfaces in FDO is as illustrated below.
    602602 
    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 
    605 class FdoIDataReader: public FdoIReader
    606 {
    607 public:
    608     virtual FdoInt32 GetInt32(FdoInt32 index)
    609     {
    610         FdoStringP propName = GetPropertyName(index);
    611         return GetInt32(propName);
    612     }
     603Both 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 GetInt32() as an example:
     604
     605{{{
     606FdoInt32 GetInt32(FdoInt32 index)
     607{
     608    FdoStringP propName = GetPropertyName(index);
     609    return GetInt32(propName);
    613610}
     611}}}
    614612
    615613In 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.