www.digitalmars.com         C & C++   DMDScript  

c++.stlsoft - [XMLSTL] Status update

reply "Matthew" <nowhere noaddress.co.us> writes:
I know this project seems like total vapourware, but there have been some 
relevant movements recently. Specifically:

1. The next STLSoft 1.9.1 beta will include the new comstl components: bstr, 
variant and ole_object. bstr is a thin wrapper for BSTR, variant is a thin 
wrapper for VARIANT. ole_object is scripting driver, that allows you to 
drive an automation server's scripting interface from C++. A sample from one 
of the test drivers is included below. The current version of XMLSTL relied 
on Synesis Software components (BStr and Variant), which brought DLLs into 
the picture. Getting rid of all that makes a distributable form now much 
more straightforward.

2. My next book (after Extended STL; http://extendedstl.com/) is going to be 
about how to make C++ facades and libraries play nice. XMLSTL is going to be 
one of the cases studies. So I plan to strip it back to nothing and do a 
complete rewrite, and documenting it as I go. I plan to release it in an 
incremental fashion during that process, both in order to solicit useful 
feedback, and to trial the principles that'll be espoused in the new book. 
This process should start in September, I hope. (There will also be some 
other case studies carried out, probably including a DbSTL wrapper library 
for SQLite3.) If anyone wants to volunteer for any of these, just post a 
note or drop me a line (via http://imperfectcplusplus.com/) and I'll get in 
touch when the work starts.



  LPDISPATCH  pdisp;
  HRESULT     hr  = comstl::co_create_instance(L"openrj.com.Database", 
//  HRESULT   hr  = 

    ::fprintf(stderr, "Failed: %s\n", winstl::error_desc(hr).c_str());
    using comstl::bstr;
    using comstl::ole_object;

    ole_object  database(pdisp, false);

    ole_object  DatabaseFlags = 

    LPCOLESTR fileName  = 

    long      flags     = 

    database.invoke_method_v(L"OpenFile", fileName, flags);

    stlsoft::ref_ptr<IUnknown>  _Enum = 
database.get_property(of_type<stlsoft::ref_ptr<IUnknown> >(), 

    bstr    DocString = database.get_property<bstr>(L"DocString");

    bstr    File    = database.get_property<bstr>(L"File");
    long    NumFields = database.get_property<long>(L"NumFields");
    long    NumRecords  = database.get_property<long>(L"Count");

    { for(long i = 0; i < NumRecords; ++i)
      ole_object  record        = database[i];
      long        Count = record.get_property<long>(L"Count");
      bstr        Comment       = record.get_property<bstr>(L"Comment");

      { for(long j = 0; j < Count; ++j)
        ole_object  field = record[j];
        bstr    Name  = field.get_property<bstr>(L"Name");
        bstr    Value = field.get_property<bstr>(L"Value");

Aug 12 2006
parent Cesar Rabak <crabak acm.org> writes:
Matthew escreveu:
 I know this project seems like total vapourware, but there have been some 
 relevant movements recently. Specifically:

Mathew, it is 'dryiceware': you see some fumes but in core there is substance!! Keep going with this nice work :-)
Aug 13 2006