OCR SDK Knowledge Base

Article ID: 714 | Category: Programming Aspects | Type: How To | Last Modified: 9/18/2015

Read-only properties in raw C++


How can I edit read-only object properties in raw C++?


Certain ABBYY FineReader Engine objects (for example, ILayout::Blocks) have read-only object properties. Such properties cannot be changed directly in raw C++. If you want to change one of these properties, you need to pass a reference to the property object to a new variable, and then use this variable to change it. Below you can see a C++ sample for the ILayout::Blocks property which is represented by a read-only collection:

  ILayout* pLayout = 0;
  ILayoutBlocks* pLayoutBlocks = 0;
  long blockIndex;
  // The pLayoutBlocks variable receives a reference to the block collection from Layout
  pLayout->get_Blocks( &pLayoutBlocks );
  // Remove an element from the blocks collection
  pLayoutBlocks->Remove( blockIndex );

See also FREngine 10 read-only properties list.

679 people think this is helpful.
Was this information helpful to you?