Home   |   Products   |   Documentation
 

dev net revision
29 July 2008
 

 
 

What are MCD_STR and MCD_CSTR?

You will see MCD_ identifiers for strings and constant strings in the CMarkup method declarations.

MCD_STR is defined in Markup.h as a string class which, depending on your project, can be one of the following:

  • std::string (STL)
  • std::wstring (STL/UNICODE)
  • CString (MFC)
  • These string classes have built in efficiencies for passing by value, so they can be returned from functions without incurring an additional string copy or allocation.

    MCD_CSTR is a constant string argument to a CMarkup method. It is implemented in CMarkup as a struct which allows either a constant reference to a string object (const MCD_STR&) or a zero terminated string.

    MCD_PCSZ is a pointer to a constant zero terminated string.

    These were introduced with CMarkup release 9.0 in which CMarkup can be compiled for either MFC or STL strings. The MCD_ prefix stands for Markup Compiler Dependency, and is used for all of the defines for the text and string platform differences documented in Unified CMarkup for STL and MFC.

     
     

    Question or comment about this article?

    ©Copyright 2008 First Objective Software, Inc. All rights reserved.