home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / yeah09.zip / YEAH.INF (.txt) < prev    next >
OS/2 Help File  |  1996-05-25  |  70KB  |  2,391 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. About YEA.H ΓòÉΓòÉΓòÉ
  3.  
  4.  
  5. This reference introduce you to YEA.H, a C++ frame work for extended 
  6. attributes. 
  7.  
  8.       Introduction 
  9.       Licence agreement 
  10.       Trade marks 
  11.       Contacting the author 
  12.       Publishing EA classes 
  13.       Limitations 
  14.  
  15.  
  16. ΓòÉΓòÉΓòÉ 1.1. Introduction. ΓòÉΓòÉΓòÉ
  17.  
  18.  
  19. Introducing YEA.H - Your Extended Attribute Helper 
  20.  
  21. YEA.H is an Object Oriented C++ frame work making it simple for you to support 
  22. extended attributes in your software. 
  23.  
  24. YEA.H is designed to be: 
  25.  
  26.      Easy to use as a class library, to immediately gain support for some of 
  27.       the most frequently used extended attributes. 
  28.  
  29.      Easy to extend with new extended attributes, or make custom 
  30.       implementations for some of the supported attributes. 
  31.  
  32.  
  33. ΓòÉΓòÉΓòÉ 1.2. Licence agreement. ΓòÉΓòÉΓòÉ
  34.  
  35.  
  36. YEAH, its compiled library, source code, and documentation, is licensed to you 
  37. under the following license agreement. Use or distribution of YEAH constitutes 
  38. your acceptance of that agreement. 
  39.  
  40. YEAH, the compiled library, source code and, documentation, is the copyrighted 
  41. material of Bj╨ñrn Fahller. 
  42.  
  43. Under this licence, you may: 
  44.  
  45.    1. Redistribute YEAH in any way for and shape, suitable to you as long as 
  46.       the original contents remain unchanged and that the redistribution is 
  47.       free (fees to cover media and transfer costs are allowed.) 
  48.  
  49.    2. Use YEAH, in your applications, be they free, shareware, educational or 
  50.       commercial. 
  51.  
  52.    3. Write and publish additional classes to YEAH, as long as those additional 
  53.       classes are published with the same licence constraints as YEAH. 
  54.  
  55.    4. Make proprietary changes to YEAH, provided you do not redistribute YEAH 
  56.       with those changes. 
  57.  
  58.  Warranty 
  59.  
  60.  BECAUSE YEAH IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, 
  61.  TO THE EXTENT PERMITTED BY LAW. USE YEAH AT YOUR OWN RISK. 
  62.  
  63.  IN NO EVENT SHALL BJ╨⌐RN FAHLLER BE HELD LIABLE FOR ANY DAMAGE DUE TO THE USE, 
  64.  ABUSE, OR INABILITY TO USE, YEAH. 
  65.  
  66.  
  67. ΓòÉΓòÉΓòÉ 1.3. Trade Marks. ΓòÉΓòÉΓòÉ
  68.  
  69.  
  70. IBM, Visual Age C++ and Open Class Library are registered trade marks of 
  71. International Business Machines Inc. 
  72.  
  73. C++ is (I think) a registered trademark of Unix Systems Laboratories. 
  74.  
  75.  
  76. ΓòÉΓòÉΓòÉ 1.4. Contacting the Author. ΓòÉΓòÉΓòÉ
  77.  
  78.  
  79. If you have questions, suggestions, want to report bugs, include new classes in 
  80. the base package, or for other reasons would like to get in youch with Bj╨ñrn 
  81. Fahller, he can be reached in the following ways: 
  82.  
  83.  E-mail:   bjorn@algonet.se 
  84.  
  85.  Mail:     Bj╨ñrn Fahller 
  86.            Siljansv╨ögen 35 
  87.            S-120 55 ╨ƒrsta 
  88.            SWEDEN. 
  89.  
  90.  Phone:    +46 8 918297 (evenings CET) 
  91.  
  92.  Fax:      +46 8 918297 (daytime CET) 
  93.  
  94.  The newsgroup comp.os.os2.programmer.oop will also be monitored for 
  95.  discussions regarding YEA.H, but my newsfeed is very slow, often lagging up to 
  96.  a week, so this is most probably not the best way to get quick responses. 
  97.  
  98.  
  99. ΓòÉΓòÉΓòÉ 1.5. Publishing EA classes. ΓòÉΓòÉΓòÉ
  100.  
  101.  
  102. If you want to publish concrete extended attribute classes based on YEA.H, you 
  103. have 3 choises within the licence agreement. 
  104.  
  105.    1. Publish the class on your own, with the same licence constraints as 
  106.       YEA.H, i.e. free of charge and with source code. 
  107.  
  108.    2. Publish it as a "contribution" to YEA.H. Future releases of YEA.H will 
  109.       have a "contrib" subdirectory, with such classes. You will be the 
  110.       copyright holder for such a contribution, hold the full responsibility 
  111.       for it, document it as you please. The compiled library file, or object 
  112.       file, will be your responsibility too, and it will not be a part of 
  113.       YEAH.LIB. 
  114.  
  115.    3. Publish it as a part of YEAH. The difference between this and the 
  116.       previous, is that the compiled object file will be included in YEAH.LIB, 
  117.       that the documentation will be included in future versions of YEAH.INF, 
  118.       that I want to have a say about the way the class is shaped. You still 
  119.       remain the copyright holder, and hold the full responsibility for your 
  120.       classes. 
  121.  
  122.       If you have plans for such a class, or a set of such classes, please 
  123.       contact me and tell me of your plans. If some one else is also working on 
  124.       a similar class, I will introduce you to each other, so that you may 
  125.       share ideas and, if you so wish, cooperate. 
  126.  
  127.  For the latter kind, I would specifically like to see an icon class, and a C++ 
  128.  stream based binary class. Bitmap and metafile extended attribute classes 
  129.  would be most welcome too. 
  130.  
  131.  
  132. ΓòÉΓòÉΓòÉ 1.6. Limitations. ΓòÉΓòÉΓòÉ
  133.  
  134.  
  135. YEA.H can currently only be used with IBM Visual Age C++, since it makes use of 
  136. a Visual Age C++ specific #pragma directive ( #pragma 
  137. define(IKeySortedSet<EA::Name, IString>)), which expands the template, 
  138. regardless of whether it is used in your application or not. Not doing this 
  139. results in a link error. In the future, this will be removed, since the C++ 
  140. construct IKeySortedSet<EA::Name, IString>; is defined by the proposed ANSI/ISO 
  141. C++ standard to expand the template. 
  142.  
  143. As can be seen, it also makes use of classes IKeySortedSet and IString, which 
  144. are part of IBM Open Class Library. Once enough parts of the proposed ANSI/ISO 
  145. C++ standard are commonplace in compilers, a compiler independent version will 
  146. be written, since the ANSI/ISO C++ standard will include the necessary 
  147. collection classes and a string class. 
  148.  
  149.  
  150. ΓòÉΓòÉΓòÉ 2. Classes ΓòÉΓòÉΓòÉ
  151.  
  152.  
  153. These are the classes available in version 0.9 of YEA.H 
  154.  
  155.       EA. 
  156.       StringEA. 
  157.       MTSequenceEA. 
  158.       TSequenceEA<T>. 
  159.       TEA<T, EA::Identifier>. 
  160.       SequenceEA. 
  161.  
  162.  
  163. ΓòÉΓòÉΓòÉ 2.1. EA. ΓòÉΓòÉΓòÉ
  164.  
  165.  
  166. EA, Extended Attribute base class. 
  167.  
  168.       Description. 
  169.       Derivation. 
  170.       Public Interface. 
  171.       Protected Interface. 
  172.  
  173.  
  174. ΓòÉΓòÉΓòÉ <hidden> EA - Description. ΓòÉΓòÉΓòÉ
  175.  
  176.  
  177. EA is the base class for all extended attributes. Most of the use of EA 
  178. directly is through the many static functions for handling extended attributes 
  179. in general. Most use of EA, however, will be indirectly, through objects of 
  180. other classes, implementing concrete extended attributes. 
  181.  
  182.  
  183. ΓòÉΓòÉΓòÉ <hidden> EA - Derivation. ΓòÉΓòÉΓòÉ
  184.  
  185.  
  186. Inherits: 
  187.  
  188.       none. 
  189.  
  190.   Inherited by: 
  191.  
  192.       StringEA (through TEA<StringEA,EAT_ASCII>) 
  193.  
  194.       MTSequenceEA (through TEA<MTSequenceEA, EAT_MVMT>) 
  195.  
  196.       TSequenceEA<T> (through TEA<SequenceEA, EAT_MVST> and SequenceEA) 
  197.  
  198.  
  199. ΓòÉΓòÉΓòÉ <hidden> EA - Public Interface. ΓòÉΓòÉΓòÉ
  200.  
  201.  
  202. Nested types: 
  203.  
  204.       Identifier 
  205.       Creator 
  206.       CreatorIdPair 
  207.       CreatorMap 
  208.       Flagset 
  209.       Name 
  210.       NameSet 
  211.       Error 
  212.       ErrorHandler 
  213.  
  214.  Static Public Data. 
  215.  
  216.       defaultCreatorMap 
  217.       errorHandler 
  218.  
  219.  Static Public Functions. 
  220.  
  221.       namesIn 
  222.       newFrom 
  223.       remove 
  224.  
  225.  Public Instance Functions. 
  226.  
  227.       Destructor 
  228.       attributeId 
  229.       getFlags 
  230.       setFlags 
  231.       getFrom 
  232.       storeTo 
  233.       clone 
  234.       setCreatorMap 
  235.  
  236.  
  237. ΓòÉΓòÉΓòÉ <hidden> EA - Protected Interface. ΓòÉΓòÉΓòÉ
  238.  
  239.  
  240. Static Protected Functions. 
  241.  
  242.       read 
  243.       write 
  244.  
  245.  Instance Protected Functions. 
  246.  
  247.       Constructors 
  248.       Assignment Operator 
  249.       readFrom 
  250.       writeTo 
  251.  
  252.  
  253. ΓòÉΓòÉΓòÉ 2.2. StringEA. ΓòÉΓòÉΓòÉ
  254.  
  255.  
  256. StringEA, String extended attribute (EAT_ASCII). 
  257.  
  258.       Description. 
  259.       Derivation. 
  260.       Public Interface. 
  261.       Protected Interface. 
  262.  
  263.  
  264. ΓòÉΓòÉΓòÉ <hidden> StringEA - Description. ΓòÉΓòÉΓòÉ
  265.  
  266.  
  267. StringEA represents ASCII string extended attributes used, for example, in the 
  268. .SUBJECT and .LONGNAME attributes supported by the WPS. To make StringEA easy 
  269. to use, it inherits IString, and provides the full functionality of IString in 
  270. addition, of course, to being an extended attribute that can be read and 
  271. written to files. 
  272.  
  273. StringEA implements the EAT_ASCII extended attribute. 
  274.  
  275.  
  276. ΓòÉΓòÉΓòÉ <hidden> StringEA - Derivation. ΓòÉΓòÉΓòÉ
  277.  
  278.  
  279. StringEA is multiply inherited with IString, to provide full string 
  280. functionality for the extended attribute. 
  281.  
  282.  
  283. ΓòÉΓòÉΓòÉ <hidden> StringEA - Public Interface. ΓòÉΓòÉΓòÉ
  284.  
  285.  
  286. Public Instance Functions 
  287.  
  288.       Constructors 
  289.       Assignment Operator 
  290.       clone 
  291.  
  292.   Inherited Public Instance Functions. 
  293.  
  294.    From EA 
  295.  
  296.       attributeId 
  297.       getFlags 
  298.       setFlags 
  299.       getFrom 
  300.       storeTo 
  301.       setCreatorMap 
  302.  
  303.  Public Static Functions 
  304.  
  305.       - 
  306.  
  307.   Inherited Public Static Functions. 
  308.  
  309.    From TEA<StringEA, EAT_ASCII> 
  310.  
  311.       cast 
  312.       allowDynamic 
  313.       disallowDynamic 
  314.  
  315.  Class Constants 
  316.  
  317.       - 
  318.   Inherited Class Constants 
  319.  
  320.    From TEA<StringEA, EAT_ASCII> 
  321.  
  322.       id 
  323.  
  324.  
  325. ΓòÉΓòÉΓòÉ <hidden> StringEA - Protected Interface. ΓòÉΓòÉΓòÉ
  326.  
  327.  
  328. Protected Instance Functions 
  329.  
  330.       readFrom 
  331.       writeTo 
  332.  
  333.  Inherited Protected Instance Functions 
  334.  
  335.       - 
  336.  Protected Static Functions 
  337.  
  338.       - 
  339.  Inherited Protected Static Functions 
  340.  
  341.       - 
  342.  
  343.  
  344. ΓòÉΓòÉΓòÉ 2.3. MTSequenceEA. ΓòÉΓòÉΓòÉ
  345.  
  346.  
  347. MTSequenceEA, Multi Type sequence extended attribute (EAT_MVMT). 
  348.  
  349.       Description. 
  350.       Derivation. 
  351.       Public Interface. 
  352.       Protected Interface. 
  353.  
  354.  
  355. ΓòÉΓòÉΓòÉ <hidden> MTSequenceEA - Description. ΓòÉΓòÉΓòÉ
  356.  
  357.  
  358. MTSequenceEA represents multi value multi type extended attributes; an extended 
  359. attribute that is a sequence of other extended attributes. There is no 
  360. restriction on the types of the contained extended attributes. 
  361.  
  362. MTSequenceEA is, for example, used for the .KEYPHRASES, .TYPES and .ASSOCTABLE 
  363. extended attributes, supported by the WPS. 
  364.  
  365. To make MTSequenceEA offer powerful sequence manipulation, yet stay simple to 
  366. use and consistent with the other sequences in your application, it inherits 
  367. ISequence<EA*>. 
  368.  
  369. MTSequenceEA implements the EAT_MVMT extended attribute. 
  370.  
  371.  
  372. ΓòÉΓòÉΓòÉ <hidden> MTSequenceEA - Derivation. ΓòÉΓòÉΓòÉ
  373.  
  374.  
  375. MTSequenceEA multiply inherits ISequence, to provide strong sequence 
  376. manipulation that is easy to use and consistent with the rest of your 
  377. application. 
  378.  
  379.  
  380. ΓòÉΓòÉΓòÉ <hidden> MTSequenceEA - Public Interface. ΓòÉΓòÉΓòÉ
  381.  
  382.  
  383. Nested Types 
  384.  
  385.       ErrorFunction 
  386.  
  387.  Public Instance Data 
  388.  
  389.       pCreatorMap 
  390.  
  391.  Public Static Data 
  392.  
  393.       errorFunction 
  394.  
  395.  Public Instance Functions 
  396.  
  397.       Constructors 
  398.       Destructor 
  399.       Assignment Operator 
  400.       clone 
  401.       setCreatorMap 
  402.       getCodePage 
  403.       setCodePage 
  404.  
  405.   Inherited Instance Public Functions. 
  406.  
  407.    From EA 
  408.  
  409.       attributeId 
  410.       getFlags 
  411.       setFlags 
  412.       getFrom 
  413.       storeTo 
  414.  
  415.  Public Static Functions 
  416.  
  417.       - 
  418.  
  419.   Inherited Public Static Functions. 
  420.  
  421.    From TEA<MTSequenceEA, EAT_MVMT> 
  422.  
  423.       cast 
  424.       allowDynamic 
  425.       disallowDynamic 
  426.  
  427.  Class Constants 
  428.  
  429.       - 
  430.   Inherited Class Constants 
  431.  
  432.    From TEA<MTSequenceEA, EAT_MVMT> 
  433.  
  434.       id 
  435.  
  436.  
  437. ΓòÉΓòÉΓòÉ <hidden> MTSequenceEA - Protected Interface. ΓòÉΓòÉΓòÉ
  438.  
  439.  
  440. Protected Instance Functions 
  441.  
  442.       readFrom 
  443.       writeTo 
  444.  
  445.  Inherited Protected Instance Functions 
  446.  
  447.       - 
  448.  
  449.  Protected Static Functions 
  450.  
  451.       - 
  452.  
  453.  Inherited Protected Static Functions 
  454.  
  455.       - 
  456.  
  457.  
  458. ΓòÉΓòÉΓòÉ 2.4. TSequenceEA<T>. ΓòÉΓòÉΓòÉ
  459.  
  460.  
  461. TSequenceEA<T>, Typed sequence extended attribute (EAT_MVST). 
  462.  
  463.       Description. 
  464.       Derivation. 
  465.       Public Interface. 
  466.       Protected Interface. 
  467.  
  468.  
  469. ΓòÉΓòÉΓòÉ <hidden> TSequenceEA<T> - Description. ΓòÉΓòÉΓòÉ
  470.  
  471.  
  472. TSequenceEA<T> represents sequences of extended attributes with a common type; 
  473. in essense, a typed array of extended attributes. TSequenceEA<T> is 
  474. surpricingly uncommon in OS/2. Even though it could be used for attributes like 
  475. .KEYPHRASES and .TYPES, they are not. 
  476.  
  477. T must be an extended attribute class itself, such as StringEA. 
  478.  
  479. IBM Work Frame makes use of string type, typed extended attribute sequences, 
  480. for storing build support information for make files. 
  481.  
  482. TSequenceEA<T> implements the EAT_MVST extended attribute. 
  483.  
  484.  
  485. ΓòÉΓòÉΓòÉ <hidden> TSequenceEA<T> - Derivation. ΓòÉΓòÉΓòÉ
  486.  
  487.  
  488. TSequenceEA multiply inherits ISequence, to provide strong and simple sequence 
  489. manipulation that is consistent with the rest of your application. 
  490.  
  491.  
  492. ΓòÉΓòÉΓòÉ <hidden> TSequenceEA<T> - Public Interface. ΓòÉΓòÉΓòÉ
  493.  
  494.  
  495. Public Instance Functions 
  496.  
  497.       Constructors 
  498.       Assignment Operator 
  499.       Destructor 
  500.       clone 
  501.  
  502.   Inherited Public Instance Functions. 
  503.  
  504.    From SequenceEA 
  505.  
  506.       getCodePage 
  507.       setCodePage 
  508.       contentId 
  509.       setCreatorMap 
  510.  
  511.    From EA 
  512.  
  513.       attributeId 
  514.       getFlags 
  515.       setFlags 
  516.       getFrom 
  517.       storeTo 
  518.  
  519.  Static Public Functions. 
  520.  
  521.       allowDynamic 
  522.       disallowDynamic 
  523.       cast 
  524.  
  525.  Class Constants. 
  526.  
  527.       elementId 
  528.  
  529.  
  530. ΓòÉΓòÉΓòÉ <hidden> TSequenceEA<T> - Protected Interface. ΓòÉΓòÉΓòÉ
  531.  
  532.  
  533. Protected Instance Functions 
  534.  
  535.       readFrom 
  536.       writeTo 
  537.  
  538.  Inherited Protected Instance Functions 
  539.  
  540.       - 
  541.  Protected Static Functions 
  542.  
  543.       - 
  544.  Inherited Protected Static Functions 
  545.  
  546.       - 
  547.  
  548.  
  549. ΓòÉΓòÉΓòÉ 2.5. TEA<T, EA::Identifier>. ΓòÉΓòÉΓòÉ
  550.  
  551.  
  552.       Description. 
  553.       Derivation. 
  554.       Public Interface. 
  555.       Protected Interface. 
  556.  
  557.  
  558. ΓòÉΓòÉΓòÉ <hidden> TEA<T, EA::Identifier> - Description. ΓòÉΓòÉΓòÉ
  559.  
  560.  
  561. TEA<T, EA::Identifier> - Intermediate class, providing base functionality for 
  562. its descendants. You never use this class as is, but it provides a consistent 
  563. and safe interface to its descendants, at the same time as it saves time for 
  564. developers of descendants and reduce the risk for errors by removing unecessary 
  565. code duplication. 
  566.  
  567. TEA<T,EA::Identifier> hides the static member functions namesIn, newFrom and 
  568. remove from EA, since their use from any class other than directly from EA, 
  569. would be confusing. EA::newFrom, for example, can return any kind of extended 
  570. attribute object. If newFrom would be publically available to all descendants 
  571. of EA, a call to StringEA::newFrom, for example, would be legal, but is in no 
  572. way guaranteed to return a StringEA object. To avoid the confusion that would 
  573. arise was the above allowed, the functions are declared private in 
  574. TEA<T,EA::Identifier>. 
  575.  
  576. For the same reason, the types Creator, CreatorMap, CreatorIdPair, Name,Error, 
  577. ErrorHandler, Flagset, Identifier and NameSet are hidden by TEA and must be 
  578. explicitly qualified with EA:: scope when used. 
  579.  
  580.  
  581. ΓòÉΓòÉΓòÉ <hidden> TEA<T, EA::Identifier> - Derivation. ΓòÉΓòÉΓòÉ
  582.  
  583.  
  584. Inherits. 
  585.  
  586.  EA 
  587.  
  588. Inherited by: 
  589.  
  590.       StringEA 
  591.       MTSequenceEA 
  592.       SequenceEA 
  593.  
  594.  
  595. ΓòÉΓòÉΓòÉ <hidden> TEA<T, EA::Identifier> - Public Interface. ΓòÉΓòÉΓòÉ
  596.  
  597.  
  598. Class constants 
  599.  
  600.       id 
  601.  
  602.  Public Instance Methods 
  603.  
  604.       Destructor 
  605.  
  606.  Public Static Methods 
  607.  
  608.       cast 
  609.       allowDynamic 
  610.       disallowDynamic 
  611.  
  612.  
  613. ΓòÉΓòÉΓòÉ <hidden> TEA<T, EA::Identifier> - Protected Interface. ΓòÉΓòÉΓòÉ
  614.  
  615.  
  616. Protected Instance Methods 
  617.  
  618.       Constructors 
  619.       Assignment Operator 
  620.  
  621.  
  622. ΓòÉΓòÉΓòÉ 2.6. SequenceEA. ΓòÉΓòÉΓòÉ
  623.  
  624.  
  625.       Description. 
  626.       Derivation. 
  627.       Public Interface. 
  628.       Protected Interface. 
  629.  
  630.  
  631. ΓòÉΓòÉΓòÉ <hidden> SequenceEA - Description. ΓòÉΓòÉΓòÉ
  632.  
  633.  
  634. SequenceEA - Intermediate class, providing common base functionality for 
  635. TSequenceEA<T>. 
  636.  
  637. You should never work directly towards this class, but always towards 
  638. TSequenceEA<T>. If you want to write your own implementation of typed sequecene 
  639. extended attributes, SequenceEA can be a good class to inherit from. 
  640.  
  641.  
  642. ΓòÉΓòÉΓòÉ <hidden> SequenceEA - Derivation. ΓòÉΓòÉΓòÉ
  643.  
  644.  
  645. Inherits: 
  646.  
  647.       EA 
  648.  
  649.       TEA<SequenceEA, EAT_MVST> 
  650.  
  651.  Inherited by: 
  652.  
  653.       TSequenceEA<T> 
  654.  
  655.  
  656. ΓòÉΓòÉΓòÉ <hidden> SequenceEA - Public Interface. ΓòÉΓòÉΓòÉ
  657.  
  658.  
  659. Static Public Data. 
  660.  
  661.       errorFunction 
  662.  
  663.  Instance Public Functions. 
  664.  
  665.       Destructor 
  666.       getCodePage 
  667.       setCodePage 
  668.       contentId 
  669.       clone 
  670.       setCreatorMap 
  671.  
  672.  
  673. ΓòÉΓòÉΓòÉ <hidden> SequenceEA - Protected Interface. ΓòÉΓòÉΓòÉ
  674.  
  675.  
  676. Instance Protected Functions. 
  677.  
  678.       Constructors 
  679.       Assignment Operator 
  680.       writeTo 
  681.       readFrom 
  682.  
  683.  Instance Protected Data. 
  684.  
  685.       pCreatorMap 
  686.  
  687.  Static Protected Functions. 
  688.  
  689.       allowDynamic 
  690.  
  691.  
  692. ΓòÉΓòÉΓòÉ <hidden> EA::Identifier ΓòÉΓòÉΓòÉ
  693.  
  694.  
  695. typedef unsigned short Identifier; 
  696.  
  697. Identifies the type of an extended attribute. Values supported by: 
  698.  
  699.  OS/2 are:           YEA.H are: 
  700.  EAT_BINARY 
  701.  EAT_ASCII           StringEA::id 
  702.  EAT_BITMAP 
  703.  EAT_METAFILE 
  704.  EAT_EA 
  705.  EAT_MVMT            MTSequenceEA::id 
  706.  EAT_MVST            TSequenceEA<T>::id 
  707.  EAT_ASN1 
  708.  
  709.  
  710. ΓòÉΓòÉΓòÉ <hidden> EA::Creator ΓòÉΓòÉΓòÉ
  711.  
  712.  
  713. typedef EA* (*Creator)(istrstream&, EA::CreatorMap*); 
  714.  
  715. Defines a pointer to a function that creates an extended attribute object. For 
  716. the specific attributes, such functions are defined by the private static 
  717. member function  TEA<T,EA::Identifier>::createFrom 
  718.  
  719. If you write your own creator function, it should read as far into the stream 
  720. as is needed to know the type of the object to create, and then create the 
  721. object on the heap. It should not read a value into the object, though. 
  722.  
  723.  
  724. ΓòÉΓòÉΓòÉ <hidden> EA::CreatorIdPair ΓòÉΓòÉΓòÉ
  725.  
  726.  
  727. struct CreatorIdPair { 
  728.  EA::Creator c; 
  729.  EA::Identifier id; 
  730.  IMngPointer<EA::CreatorMap> pSubMap; 
  731.  
  732. Struct matching an EA::Identifier with an EA::Creator function. Used internally 
  733. by the EA::newFrom functions, and by multi value extended attributes. 
  734.  
  735. The c part is the function that will create new objects on the heap if the 
  736. element found matches that of id. pSubMap is the map passed to the creator 
  737. function, which is useful for typed collections, since the creator function 
  738. will then use that map to create its containing elements. 
  739.  
  740. For flat (non-collection extended attributes) pSubMap is 0. 
  741.  
  742.  
  743. ΓòÉΓòÉΓòÉ <hidden> EA::CreatorMap ΓòÉΓòÉΓòÉ
  744.  
  745.  
  746. typedef IMap<EA::CreatorIdPair, EA::Identifier> CreatorMap; 
  747.  
  748. Container of EA::CreatorIdPair for use internally by the creator functions, and 
  749. multi value extended attributes. 
  750.  
  751.  
  752. ΓòÉΓòÉΓòÉ <hidden> EA::Flagset ΓòÉΓòÉΓòÉ
  753.  
  754.  
  755. typedef enum { optional = 0, mandatory = 0x80 } Flagset; 
  756.  
  757. Flag used for telling whether an extended attribute is needed (i.e. must not be 
  758. discarded,) or not. The only legal values are: 
  759.  
  760.   0x00 (optional)     The extended attribute is not needed. 
  761.   0x80 (mandatory)    The extended attribute is needed. 
  762.  
  763.  
  764. ΓòÉΓòÉΓòÉ <hidden> EA::Name ΓòÉΓòÉΓòÉ
  765.  
  766.  
  767.  struct Name { 
  768.   IString name; 
  769.   EA::Flagset flags; 
  770.  }; 
  771.  
  772. Description of an extended attribute for a file. A file can be queried for what 
  773. extended attributes it has, by calling one of the EA::namesIn methods, which 
  774. returns the set of names as an EA::NameSet, which elements are of type 
  775. EA::Name. 
  776.  
  777.  
  778. ΓòÉΓòÉΓòÉ <hidden> EA::NameSet ΓòÉΓòÉΓòÉ
  779.  
  780.  
  781. typedef IKeySortedSet<EA::Name,IString> NameSet; 
  782.  
  783. Set of extended attributes. This is the return value from the EA::namesIn 
  784. functions. 
  785.  
  786.  
  787. ΓòÉΓòÉΓòÉ <hidden> EA::Error ΓòÉΓòÉΓòÉ
  788.  
  789.  
  790.  typedef enum { 
  791.   ReadError, 
  792.   WriteError, 
  793.   NoSuchEAError, 
  794.   TypeMismatchError 
  795.  } Error; 
  796.  
  797. The different kinds of errors that can occur within YEA.H. The errors codes are 
  798. used as follows: 
  799.  
  800.  Error                  Situation/Meaning 
  801.  
  802.  ReadError              The extended attribute could not be read. Issued if the 
  803.                         file to read from does not exist, or is not readable. 
  804.                         The accompanying code sent to the error handler 
  805.                         function will be the OS/2 error code. 
  806.  
  807.  WriteError             The extended attribute could not be written. Issued if 
  808.                         the file to write to does not exist, is write 
  809.                         protected, the extended attribute name was illegal, or 
  810.                         the total size of the extended attribute exceeded the 
  811.                         64Kb limit. The accompanying code sent to the error 
  812.                         handler function will be the OS/2 error code. 
  813.  
  814.  NoSuchEAError          An attempt was made to read an extended attribute with 
  815.                         a name that is not defined for the specified file. The 
  816.                         accompanying code sent to the error handler function 
  817.                         will be 0. 
  818.  
  819.  TypeMismatchError      An attempt was made to read an extended attribute of a 
  820.                         specific type, and the attribute read had another type. 
  821.                         The accompanying code sent to te error handler function 
  822.                         will be the type identifier of the attribute read. 
  823.  
  824.  
  825. ΓòÉΓòÉΓòÉ <hidden> EA::ErrorHandler ΓòÉΓòÉΓòÉ
  826.  
  827.  
  828. typedef void (*ErrorHandler)(EA::Error, unsigned long); 
  829.  
  830. Type of the error handler function. 
  831.  
  832.  
  833. ΓòÉΓòÉΓòÉ <hidden> EA::defaultCreatorMap ΓòÉΓòÉΓòÉ
  834.  
  835.  
  836. public: 
  837.  static EA::CreatorMap defaultCreatorMap; 
  838.  
  839. The CreatorMap that will be used for creating extended attribute objects with 
  840. the getFrom and newFrom functions, unless otherwise specified. 
  841.  
  842.  
  843. ΓòÉΓòÉΓòÉ <hidden> EA::errorHandler ΓòÉΓòÉΓòÉ
  844.  
  845.  
  846. public: 
  847.  static EA::ErrorHandler errorHandler; 
  848.  
  849. The ErrorHandler to call when error situations arise. To set your own error 
  850. handler, simply set this pointer to your own function. 
  851.  
  852. The default error handler throws exceptions: 
  853.  
  854.  Error                    Exception thrown 
  855.  
  856.  EA::ReadError            EAReadError("Failed to read EA") with the error code 
  857.                           given by OS/2 as its errorId. 
  858.  
  859.  EA::WriteError           EAWriteError("Failed to write EA") with the error 
  860.                           code given by OS/2 as its errorId. 
  861.  
  862.  EA::NoSuchEAError        EATypeMismatchError("Unknown EA type") with the 
  863.                           errorId set to 0. 
  864.  
  865.  EA::TypeMismatchError    EATypeMismatchError("Unexpected EA type") with the 
  866.                           type identifier as the errorId. 
  867.  
  868.  Others.                  EAError("unknown error"); 
  869.  
  870.  
  871. ΓòÉΓòÉΓòÉ <hidden> EA::namesIn ΓòÉΓòÉΓòÉ
  872.  
  873.  
  874. public: 
  875.  static EA::NameSet namesIn(const IString& file); 
  876.  static EA::NameSet namesIn(fstreambase& file); 
  877.  
  878. Get the names for the set of extended attributes defined for the file pointed 
  879. to by file. 
  880.  
  881. Possible errors are: 
  882.  
  883.  Error               Action 
  884.  EA::ReadError       EA::errorHandler called with EA::ReadError and the error 
  885.                      code given by OS/2. If errorHandler returns, the set 
  886.                      returned by namesIn will be empty. 
  887.  
  888.  
  889. ΓòÉΓòÉΓòÉ <hidden> EA::newFrom ΓòÉΓòÉΓòÉ
  890.  
  891.  
  892. public: 
  893.  static EA* newFrom(const IString& file, 
  894.            const IString& name, 
  895.            const EA::CreatorMap& = EA::defaultCreatorMap); 
  896.  
  897.  static EA* newFrom(fstreambase& file, 
  898.            const IString& name, 
  899.            const EA::CreatorMap& = EA::defaultCreatorMap); 
  900.  
  901. Create a new extended attribute object on the heap. The type will be decided 
  902. when reading the extended attribute, and the object to create will be decided 
  903. by looking up the creator map passed. 
  904.  
  905. Note:  To create an object of a class by calling newFrom, the static method 
  906.        allowDynamic must haven been called for the class on the creator map 
  907.        passed. If allowDynamic has not been called, 0 will be returned. 
  908.  
  909.  Possible errors are: 
  910.  
  911.  Error                    Action 
  912.  
  913.  EA::ReadError            Call EA::errorHandler with EA::ReadError and the 
  914.                           error code returned by OS/2. EA::errorHandler 
  915.                           returns, newFrom returns 0. 
  916.  
  917.  EA::NoSuchEAError        Call EA::errorHandler with EA::NoSuchEAError and 0. 
  918.                           If EA::errorHandler returns, newFrom returns 0. 
  919.  
  920.  Note:  In addition to the above, the extended attribute object created can 
  921.         find and report errors of its own. What errors they are, and how they 
  922.         are handled, depends on the type of extended attribute object being 
  923.         created. 
  924.  
  925.  
  926. ΓòÉΓòÉΓòÉ <hidden> EA::remove ΓòÉΓòÉΓòÉ
  927.  
  928.  
  929. public: 
  930.  static void remove(const IString& file, 
  931.            const IString& name); 
  932.  
  933.  static void remove(fstreambase& file, 
  934.            const IString& name); 
  935.  
  936. Remove the extended attribute pointed to by name from the file. After 
  937. execution, there will be no extended attribute by the specified name on the 
  938. file, unless an error occurs. 
  939.  
  940. Possible errors are: 
  941.  
  942.  Error               Action 
  943.  
  944.  EA::WriteError      Call EA::errorHandler with EA::WriteError and the error 
  945.                      code returned by OS/2. 
  946.  
  947.  
  948. ΓòÉΓòÉΓòÉ <hidden> virtual EA::~EA(void) ΓòÉΓòÉΓòÉ
  949.  
  950.  
  951. public: 
  952.  virtual ~EA(void); 
  953.  
  954. Destroy an extended attribute. 
  955.  
  956.  
  957. ΓòÉΓòÉΓòÉ <hidden> EA::attributeId ΓòÉΓòÉΓòÉ
  958.  
  959.  
  960. public: 
  961.  EA::Identifier attributeId(void) const; 
  962.  
  963. Get the attribute identifier of the extended attribute object. 
  964.  
  965. Possible errors are: 
  966.  
  967.       - 
  968.  
  969.  
  970. ΓòÉΓòÉΓòÉ <hidden> virtual EA::getFlags ΓòÉΓòÉΓòÉ
  971.  
  972.  
  973. public: 
  974.  EA::Flagset getFlags(void) const; 
  975.  
  976. Get the flags for the current object. 
  977.  
  978. Possible errors are: 
  979.  
  980.       - 
  981.  
  982.  
  983. ΓòÉΓòÉΓòÉ <hidden> virtual EA::setFlags ΓòÉΓòÉΓòÉ
  984.  
  985.  
  986. public: 
  987.  void setFlags(EA::Flagset); 
  988.  
  989. Set the flags for the current object. 
  990.  
  991. Possible errors are: 
  992.  
  993.       - 
  994.  
  995.  
  996. ΓòÉΓòÉΓòÉ <hidden> EA::getFrom ΓòÉΓòÉΓòÉ
  997.  
  998.  
  999. public: 
  1000.  void getFrom(const IString& file, 
  1001.         const IString& name); 
  1002.  
  1003.  void getFrom(fstreambase& file, 
  1004.         const IString& name); 
  1005.  
  1006. Give the extended attribute object a new value by assigning it the value read 
  1007. from the named extended attribute. 
  1008.  
  1009. Possible errors are: 
  1010.  
  1011.  Error                    Action 
  1012.  
  1013.  EA::ReadError            Call EA::errorHandler with EA::ReadError and the 
  1014.                           error code returned by OS/2. The extended attribute 
  1015.                           object itself not be changed. 
  1016.  
  1017.  EA::NoSuchEAError        Call EA::errorHandler with EA::NoSuchEAError and 0. 
  1018.                           The extended attribute object itself will not be 
  1019.                           changed. 
  1020.  
  1021.  EA::TypeMismatchError    Call EA::errorHandler with EA::TypeMismatchError and 
  1022.                           the type found. The extended attribute object itself 
  1023.                           will not be changed. 
  1024.  
  1025.  Note:  If the extended attribute object is a collection extended attribute, 
  1026.         the containing parts may themselves find and report other errors. What 
  1027.         kind they are of, and how they are reported, depends on the type. 
  1028.  
  1029.  
  1030. ΓòÉΓòÉΓòÉ <hidden> EA::storeTo ΓòÉΓòÉΓòÉ
  1031.  
  1032.  
  1033. public: 
  1034.  void storeTo(const IString& file, 
  1035.         const IString& name); 
  1036.  
  1037.  void storeTo(fstreambase& file, 
  1038.         const IString& name); 
  1039.  
  1040. Store the value of the extended attribute to the file, using the name given. 
  1041.  
  1042. Possible errors are: 
  1043.  
  1044.  Error                    Action 
  1045.  
  1046.  EA::WriteError           Call EA::errorHandler with EA::WriteError and the 
  1047.                           error code returned by OS/2. 
  1048.  
  1049.  
  1050. ΓòÉΓòÉΓòÉ <hidden> EA::clone ΓòÉΓòÉΓòÉ
  1051.  
  1052.  
  1053. public: 
  1054.  virtual EA* clone(void) const = 0; 
  1055.  
  1056. Create an exact deep copy of self. Must be overridden by all descendant 
  1057. classes. Used by the copy constructors and assignment operators of extended 
  1058. attribute collection classes such as MTSequenceEA and TSequenceEA<T> to provide 
  1059. for deep copying. 
  1060.  
  1061. To work properly with typed collection extended attributes, like TSequenceEA<T> 
  1062. the return type must be overridden. The return type for a class C, derived in 
  1063. one or several generations from EA, must be C*. 
  1064.  
  1065. clone will normally not find or report errors, but it depends on the actual 
  1066. extended attribute class if errors can occur, and how they are reported. 
  1067.  
  1068.  
  1069. ΓòÉΓòÉΓòÉ <hidden> EA::setCreatorMap ΓòÉΓòÉΓòÉ
  1070.  
  1071.  
  1072. public: 
  1073.  virtual void setCreatorMap(const EA::CreatorMap*) 
  1074.  
  1075. This default implementation of setCreatorMap does nothing at all. Collection 
  1076. classes should override it and create their children from the creator map 
  1077. passed. 
  1078.  
  1079. Possible errors are: 
  1080.  
  1081.       - 
  1082.  
  1083.  
  1084. ΓòÉΓòÉΓòÉ <hidden> EA::read ΓòÉΓòÉΓòÉ
  1085.  
  1086.  
  1087. protected: 
  1088.  static istrstream& read(EA* pea, istrstream& is) 
  1089.  
  1090. Calls pea->readFrom(is), a way to access the protected method of a sibling. Use 
  1091. when implementing multi value extended attributes, to read a value into one of 
  1092. the attributes contained. 
  1093.  
  1094. read will normally not find or report errors, but it depends on the actual 
  1095. extended attribute class if errors can occur, and how they are reported. 
  1096. Objects of collection extended attribute classes, like MTSequenceEA and 
  1097. TSequenceEA<T> might well find and report errors. 
  1098.  
  1099.  
  1100. ΓòÉΓòÉΓòÉ <hidden> EA::write ΓòÉΓòÉΓòÉ
  1101.  
  1102.  
  1103. protected: 
  1104.  static ostrstream& write(EA* pea, ostrstream& os) 
  1105.  
  1106. Calls pea->writeTo(os), a way to access the protected method of a sibling. Use 
  1107. when implementing multi value extended attributes, to save the value of one of 
  1108. the attributes contained. 
  1109.  
  1110. write will normally not find or report errors, but it depends on the actual 
  1111. extended attribute class if errors can occur, and how they are reported. 
  1112.  
  1113.  
  1114. ΓòÉΓòÉΓòÉ <hidden> EA::EA ΓòÉΓòÉΓòÉ
  1115.  
  1116.  
  1117. protected: 
  1118.  EA(EA::Identifier anId); 
  1119.  EA(const EA&); 
  1120.  
  1121. You would normally not call any of these constructors since TEA<T, 
  1122. EA::Identifier> does it for you. Would you, however, the identifier to pass is 
  1123. that used to identify the extended attribute (the EA::Identifier part of TEA.) 
  1124.  
  1125. Errors. 
  1126.  
  1127.       - 
  1128.  
  1129.  
  1130. ΓòÉΓòÉΓòÉ <hidden> EA::operator= ΓòÉΓòÉΓòÉ
  1131.  
  1132.  
  1133. protected: 
  1134.  const EA& operator=(const EA&); 
  1135.  
  1136. You would normally never call the assignment operator of EA, since TEA<T, 
  1137. EA::Identifier> does it for you. 
  1138.  
  1139. Errors. 
  1140.  
  1141.       - 
  1142.  
  1143.  
  1144. ΓòÉΓòÉΓòÉ <hidden> EA::readFrom ΓòÉΓòÉΓòÉ
  1145.  
  1146.  
  1147. protected: 
  1148.  virtual istrstream& readFrom(istrstream&) = 0; 
  1149.  
  1150. Must be overridden by all concrete extended attribute classes to read the 
  1151. content of the attribute. Upon entry, the get pointer of the stream is 
  1152. positioned so that the first byte read, will be the byte immediately following 
  1153. the type identifier. This position is not necessarily the first position in the 
  1154. stream. 
  1155.  
  1156. readFrom will normally not find or report errors, but it depends on the actual 
  1157. extended attribute class if errors can occur, and how they are reported. 
  1158. Objects of collection extended attribute classes, like MTSequenceEA and 
  1159. TSequenceEA<T> might well find and report errors. 
  1160.  
  1161.  
  1162. ΓòÉΓòÉΓòÉ <hidden> EA::writeTo ΓòÉΓòÉΓòÉ
  1163.  
  1164.  
  1165. protected: 
  1166.  virtual ostrstream& writeTo(ostrstream&) = 0; 
  1167.  
  1168. Must be overridden by all concrete extended attribute classes to write the 
  1169. content of the attribute. Upon entry the type identifier is already written. 
  1170. The first byte to write to the stream is the first byte after the identifier of 
  1171. the type for the extended attribute. 
  1172.  
  1173. writeTo will normally not find or report errors, but it depends on the actual 
  1174. extended attribute class if errors can occur, and how they are reported. 
  1175.  
  1176.  
  1177. ΓòÉΓòÉΓòÉ <hidden> StringEA::StringEA ΓòÉΓòÉΓòÉ
  1178.  
  1179.  
  1180. In addition to all the constructors valid for IString, StringEA supports: 
  1181.  
  1182. public: 
  1183.  StringEA(const StringEA& s) 
  1184.  
  1185. Initialise the StringEA object to an exact copy of s. 
  1186.  
  1187. public: 
  1188.  StringEA(const IString& filename, 
  1189.       const IString& eaname) 
  1190.  StringEA(fstreambase& file, 
  1191.       const IString& eaname) 
  1192.  
  1193. Constructs a string extended attribute, and reads its value from the extended 
  1194. attribute pointed to bu filename and eaname. 
  1195.  
  1196. Possible errors are: 
  1197.  
  1198.  Error                    Action 
  1199.  
  1200.  EA::ReadError            Call EA::errorHandler with EA::ReadError and the 
  1201.                           error code returned by OS/2. If EA::errorHandler 
  1202.                           returns, an empty StringEA object will be created. 
  1203.  
  1204.  EA::NoSuchEAError        Call EA::errorHandler with EA::NoSuchEAError and 0. 
  1205.                           If EA::errorHandler returns, an empty StringEA object 
  1206.                           will be created. 
  1207.  
  1208.  EA::TypeMismatchError    Call EA::errorHandler with EA::TypeMismatchError and 
  1209.                           the type found. If EA::errorHandler returns, an empty 
  1210.                           StringEA object will be created. 
  1211.  
  1212.  For the constructors taking the same arguments as their IString counter parts, 
  1213.  the created object will be initialized with with the flag set to EA::optional. 
  1214.  
  1215.  
  1216. ΓòÉΓòÉΓòÉ <hidden> StringEA::operator= ΓòÉΓòÉΓòÉ
  1217.  
  1218.  
  1219. public: 
  1220.  const StringEA& operator=(const StringEA& s); 
  1221.  
  1222. Make self an exact copy of s and return self reference. 
  1223.  
  1224. public: 
  1225.  const StringEA& operator=(const IString& s); 
  1226.  
  1227. Keep the extended attribute values as is, but assign a new string value to self 
  1228. and return self reference. 
  1229.  
  1230. Possible errors. 
  1231.  
  1232.       - 
  1233.  
  1234.  
  1235. ΓòÉΓòÉΓòÉ <hidden> EA::clone ΓòÉΓòÉΓòÉ
  1236.  
  1237.  
  1238. public: 
  1239.  virtual StringEA* clone(void) const 
  1240.  
  1241. Create an exact copy of self on the heap and return the pointer to it. 
  1242.  
  1243. Possible errors. 
  1244.  
  1245.       - 
  1246.  
  1247.  
  1248. ΓòÉΓòÉΓòÉ <hidden> EA::attributeId ΓòÉΓòÉΓòÉ
  1249.  
  1250.  
  1251. public: 
  1252.  EA::Identifier attributeId(void) 
  1253.  
  1254. Returns StringEA::id. 
  1255.  
  1256. Possible errors are: 
  1257.  
  1258.       - 
  1259.  
  1260.  
  1261. ΓòÉΓòÉΓòÉ <hidden> EA::getFrom ΓòÉΓòÉΓòÉ
  1262.  
  1263.  
  1264. public: 
  1265.  void getFrom(const IString& file, 
  1266.         const IString& name); 
  1267.  
  1268.  void getFrom(fstreambase& file, 
  1269.         const IString& name); 
  1270.  
  1271. Give the string extended attribute object a new value by assigning it the 
  1272. string value read from the named extended attribute. 
  1273.  
  1274. Possible errors are: 
  1275.  
  1276.  Error                    Action 
  1277.  
  1278.  EA::ReadError            Call EA::errorHandler with EA::ReadError and the 
  1279.                           error code returned by OS/2. If EA::errorHandler 
  1280.                           returns, the StringEA object will remain unchanged. 
  1281.  
  1282.  EA::NoSuchEAError        Call EA::errorHandler with EA::NoSuchEAError and 0. 
  1283.                           If EA::errorHandler returns, the StringEA object will 
  1284.                           remain unchanged. 
  1285.  
  1286.  EA::TypeMismatchError    Call EA::errorHandler with EA::TypeMismatchError and 
  1287.                           the type found. If EA::errorHandler returns, the 
  1288.                           StringEA object will remain unchanged. 
  1289.  
  1290.  
  1291. ΓòÉΓòÉΓòÉ <hidden> EA::storeTo ΓòÉΓòÉΓòÉ
  1292.  
  1293.  
  1294. public: 
  1295.  void storeTo(const IString& file, 
  1296.         const IString& name); 
  1297.  
  1298.  void storeTo(fstreambase& file, 
  1299.         const IString& name); 
  1300.  
  1301. Store the value of the string extended attribute with the name given. 
  1302.  
  1303. Possible errors are: 
  1304.  
  1305.  Error                    Action 
  1306.  
  1307.  EA::WriteError           Call EA::errorHandler with EA::WriteError and the 
  1308.                           error code returned by OS/2. 
  1309.  
  1310.  
  1311. ΓòÉΓòÉΓòÉ <hidden> StringEA::cast ΓòÉΓòÉΓòÉ
  1312.  
  1313.  
  1314. public: 
  1315.  static StringEA* cast(EA*) 
  1316.  static const StringEA* cast(const EA*) 
  1317.  
  1318. Cast pointers of EA to pointers of StringEA. Return the pointer value if, and 
  1319. only if, attributeId() of the object pointed to returns StringEA::id. Return 0 
  1320. otherwise. 
  1321.  
  1322. CAUTION:
  1323. cast is unable to distinguish between StringEA and other implementations of 
  1324. EAT_ASCII, since it compares the attribute id only. 
  1325.  
  1326. Possible errors are: 
  1327.  
  1328.       - 
  1329.  
  1330.  
  1331. ΓòÉΓòÉΓòÉ <hidden> StringEA::allowDynamic ΓòÉΓòÉΓòÉ
  1332.  
  1333.  
  1334. public: 
  1335.  static void allowDynamic(EA::CreatorMap* pCM = 
  1336.               &EA::defaultCreatorMap, 
  1337.               const EA::Creator& = 
  1338.               TEA<StringEA,StringEA::id>::createFrom) 
  1339.  
  1340. Add StringEA to the creator map, making it possible to dynamically create 
  1341. string extended attributes by calling EA::newFrom with that creator map. The 
  1342. StringEA object will be created by a call to the provided creator function. 
  1343.  
  1344. Possible errors. 
  1345.  
  1346.       - 
  1347.  
  1348.  
  1349. ΓòÉΓòÉΓòÉ <hidden> StringEA::disallowDynamic ΓòÉΓòÉΓòÉ
  1350.  
  1351.  
  1352. public: 
  1353.  static void disallowDynamic(EA::CreatorMap* pCM = 
  1354.                &EA::defaultCreatorMap) 
  1355.  
  1356. Remove StringEA from the creator map, making it impossible to dynamically 
  1357. create string extended attributes by calling EA::newFrom with that creator map. 
  1358.  
  1359. Possible errors. 
  1360.  
  1361.       - 
  1362.  
  1363.  
  1364. ΓòÉΓòÉΓòÉ <hidden> StringEA::id ΓòÉΓòÉΓòÉ
  1365.  
  1366.  
  1367. public: 
  1368.  enum { id = EAT_ASCII }; 
  1369.  
  1370. The identifier of string extended attributes. Use (if you can't avoid it,) to 
  1371. compare with attributeId() of objects. It is usually better not to make that 
  1372. comparison, but to use cast instead, and check the return value of the pointer. 
  1373.  
  1374.  
  1375. ΓòÉΓòÉΓòÉ <hidden> StringEA::readFrom ΓòÉΓòÉΓòÉ
  1376.  
  1377.  
  1378. protected: 
  1379.  virtual istrstream& readFrom(istrstream&) 
  1380.  
  1381. Overrides EA::readFrom to read the content of the extended attribute and store 
  1382. its value to the StringEA object itself. 
  1383.  
  1384. Possible errors. 
  1385.  
  1386.       - 
  1387.  
  1388.  
  1389. ΓòÉΓòÉΓòÉ <hidden> StringEA::writeTo ΓòÉΓòÉΓòÉ
  1390.  
  1391.  
  1392. protected: 
  1393.  virtual ostrstream& writeTo(ostrstream&) 
  1394.  
  1395. Overrides EA::writeTo to store the content of the StringEA object. 
  1396.  
  1397. Possible errors. 
  1398.  
  1399.       - 
  1400.  
  1401.  
  1402. ΓòÉΓòÉΓòÉ <hidden> MTSequenceEA::ErrorFunction ΓòÉΓòÉΓòÉ
  1403.  
  1404.  
  1405. public: 
  1406.  typedef EA* (*ErrorFunction)(EA::Identifier); 
  1407.  
  1408. The type of the error function called by MTSequenceEA when an extended 
  1409. attribute of unknown type is read. 
  1410.  
  1411.  
  1412. ΓòÉΓòÉΓòÉ <hidden> MTSequenceEA::pCreatorMap ΓòÉΓòÉΓòÉ
  1413.  
  1414.  
  1415. public: 
  1416.  EA::CreatorMap* pCreatorMap; 
  1417.  
  1418. Map used by MTSequenceEA when creating the containing extended attributes. It 
  1419. defaults to &EA::defaultCreatorMap. 
  1420.  
  1421.  
  1422. ΓòÉΓòÉΓòÉ <hidden> MTSequenceEA::errorFunction ΓòÉΓòÉΓòÉ
  1423.  
  1424.  
  1425. public: 
  1426.  static MTSequenceEA::ErrorFunction errorFunction; 
  1427.  
  1428. Pointer to function, called by MTSequenceEA when reading an extended attribute 
  1429. not found in the creator map. The value returned will be inserted into the 
  1430. sequence. 
  1431.  
  1432. The default function will call EA::errorHandler with TypeMismatchError and the 
  1433. type identifier of the extended attribute read. If EA::errorHandler returns, 
  1434. errorFunction will return 0. 
  1435.  
  1436. To set your own error handler, create a function of type 
  1437. MTSequenceEA::ErrorFunction and set errorFunction to point to it. 
  1438.  
  1439.  
  1440. ΓòÉΓòÉΓòÉ <hidden> MTSequenceEA::MTSequenceEA ΓòÉΓòÉΓòÉ
  1441.  
  1442.  
  1443. public: 
  1444.  MTSequenceEA(const EA::CreatorMap* = 
  1445.            &EA::defaultCreatorMap); 
  1446.  
  1447. Initialise an empty MTSequenceEA object that creates its contents with the help 
  1448. of the provided creator map. 
  1449.  
  1450. Possible errors. 
  1451.  
  1452.       - 
  1453.  
  1454.  public: 
  1455.   MTSequenceEA(const ISequence<EA*>&, 
  1456.          const EA::CreatorMap* = 
  1457.             &EA::defaultCreatorMap); 
  1458.  
  1459.  Initialise an MTSequenceEA object by copying the contents of the sequence, and 
  1460.  use the creator map provided when reading new values into it. 
  1461.  
  1462.  Possible errors. 
  1463.  
  1464.       - 
  1465.  
  1466.  public: 
  1467.   MTSequenceEA(const IString& filename, 
  1468.          const IString& eaname, 
  1469.          const EA::CreatorMap* = 
  1470.             &EA::defaultCreatorMap); 
  1471.   MTSequenceEA(fstreambase& file, 
  1472.          const IString& eaname, 
  1473.          const EA::CreatorMap* = 
  1474.             &EA::defaultCreatorMap); 
  1475.  
  1476.  Initialise an MTSequenceEA object by reading its contents from the named 
  1477.  extended attribute in the selected file, using the provided creator map when 
  1478.  creating the containing objects. 
  1479.  
  1480.  Possible errors are: 
  1481.  
  1482.  Error                    Action 
  1483.  
  1484.  EA::ReadError            Call EA::errorHandler with EA::ReadError and the 
  1485.                           error code returned by OS/2. If EA::errorHandler 
  1486.                           returns, an empty MTSequenceEA object will be 
  1487.                           created. 
  1488.  
  1489.  EA::NoSuchEAError        Call EA::errorHandler with EA::NoSuchEAError and 0. 
  1490.                           If EA::errorHandler returns, an empty MTSequenceEA 
  1491.                           object will be created. 
  1492.  
  1493.  EA::TypeMismatchError    Call EA::errorHandler with EA::TypeMismatchError and 
  1494.                           the type found. If EA::errorHandler returns, an empty 
  1495.                           MTSequenceEA object will be created. 
  1496.  
  1497.  If an unknown extended attribute is found when reading the content of the 
  1498.  sequence, MTSequenceEA::errorFunction is called with the type of the unknown 
  1499.  extended attribute. If MTSequenceEA::errorFunction returns, the value returned 
  1500.  is inserted into the sequence. 
  1501.  
  1502.  public: 
  1503.   MTSequenceEA(const MTSequenceEA& mvea); 
  1504.  
  1505.  Initialise an MTSequenceEA object by copying the content of the given sequence 
  1506.  extended attribute. 
  1507.  
  1508.  Possible errors. 
  1509.  
  1510.       - 
  1511.  
  1512.  
  1513. ΓòÉΓòÉΓòÉ <hidden> MTSequenceEA::getCodePage ΓòÉΓòÉΓòÉ
  1514.  
  1515.  
  1516. public: 
  1517.  unsigned short getCodePage(void) const 
  1518.  
  1519. Return the code page of the MTSequenceEA object. Code page 0 means the default 
  1520. code page of the system. The code page of MTSequenceEA objects defaults to 0. 
  1521.  
  1522. Possible errors. 
  1523.  
  1524.       - 
  1525.  
  1526.  
  1527. ΓòÉΓòÉΓòÉ <hidden> MTSequenceEA::setCodePage ΓòÉΓòÉΓòÉ
  1528.  
  1529.  
  1530. public: 
  1531.  void setCodePage(unsigned short cp) 
  1532.  
  1533. Set the code page of the MTSequenceEA object. By default, the code page is 0, 
  1534. meaning the default code page of the system. 
  1535.  
  1536. Possible errors. 
  1537.  
  1538.       - 
  1539.  
  1540.  
  1541. ΓòÉΓòÉΓòÉ <hidden> EA::attributeId ΓòÉΓòÉΓòÉ
  1542.  
  1543.  
  1544. public: 
  1545.  EA::Identifier attributeId(void) 
  1546.  
  1547. Returns MTSequenceEA::id. 
  1548.  
  1549. Possible errors are: 
  1550.  
  1551.       - 
  1552.  
  1553.  
  1554. ΓòÉΓòÉΓòÉ <hidden> MTSequenceEA::getFrom ΓòÉΓòÉΓòÉ
  1555.  
  1556.  
  1557. public: 
  1558.  void getFrom(const IString& file, 
  1559.         const IString& name); 
  1560.  
  1561.  void getFrom(fstreambase& file, 
  1562.         const IString& name); 
  1563.  
  1564. Give the sequence extended attribute object a new value by assigning it the 
  1565. value read from the named extended attribute. Possible errors are: 
  1566.  
  1567.  Error                    Action 
  1568.  
  1569.  EA::ReadError            Call EA::errorHandler with EA::ReadError and the 
  1570.                           error code returned by OS/2. If EA::errorHandler 
  1571.                           returns, the MTSequenceEA object will remain 
  1572.                           unchanged. 
  1573.  
  1574.  EA::NoSuchEAError        Call EA::errorHandler with EA::NoSuchEAError and 0. 
  1575.                           If EA::errorHandler returns, the MTSequenceEA object 
  1576.                           will remain unchanged. 
  1577.  
  1578.  EA::TypeMismatchError    Call EA::errorHandler with EA::TypeMismatchError and 
  1579.                           the type found. If EA::errorHandler returns, the 
  1580.                           MTSequenceEA object will remain unchanged. 
  1581.  
  1582.  If an unknown extended attribute is found when reading the content of the 
  1583.  sequence, MTSequenceEA::errorFunction is called with the type of the unknown 
  1584.  extended attribute. If MTSequenceEA::errorFunction returns, the value returned 
  1585.  is inserted into the sequence. 
  1586.  
  1587.  
  1588. ΓòÉΓòÉΓòÉ <hidden> MTSequenceEA::storeTo ΓòÉΓòÉΓòÉ
  1589.  
  1590.  
  1591. public: 
  1592.  void storeTo(const IString& file, 
  1593.         const IString& name); 
  1594.  
  1595.  void storeTo(fstreambase& file, 
  1596.         const IString& name); 
  1597.  
  1598. Store the value of the sequence extended attribute with the name given. 
  1599.  
  1600. Possible errors are: 
  1601.  
  1602.  Error                    Action 
  1603.  
  1604.  EA::WriteError           Call EA::errorHandler with EA::WriteError and the 
  1605.                           error code returned by OS/2. 
  1606.  
  1607.  
  1608. ΓòÉΓòÉΓòÉ <hidden> MTSequenceEA::cast ΓòÉΓòÉΓòÉ
  1609.  
  1610.  
  1611. public: 
  1612.  static MTSequenceEA* cast(EA*) 
  1613.  static const MTSequenceEA* cast(const EA*) 
  1614.  
  1615. Cast pointers of EA to pointers of MTSequenceEA. Return the pointer value if, 
  1616. and only if, attributeId() of the object pointed to returns MTSequenceEA::id. 
  1617. Return 0 otherwise. 
  1618.  
  1619. CAUTION:
  1620. cast is unable to distinguish between MTSequenceEA and other implementations of 
  1621. EAT_MVMT, since it compares the attribute id only. 
  1622.  
  1623. Possible errors are: 
  1624.  
  1625.       - 
  1626.  
  1627.  
  1628. ΓòÉΓòÉΓòÉ <hidden> MTSequenceEA::allowDynamic ΓòÉΓòÉΓòÉ
  1629.  
  1630.  
  1631. public: 
  1632.  static void allowDynamic(EA::CreatorMap* pCM 
  1633.               = &EA::defaultCreatorMap, 
  1634.               const EA::Creator& creator = 
  1635.               TEA<MTSequenceEA::MTSequenceEA::id>::createFrom) 
  1636.  
  1637. Add MTSequenceEA to the creator map, making it possible to dynamically create 
  1638. string extended attributes by calling EA::newFrom with that creator map. The 
  1639. MTSequenceEA object will be created with the provided creator function. 
  1640.  
  1641. Possible errors are: 
  1642.  
  1643.       - 
  1644.  
  1645.  
  1646. ΓòÉΓòÉΓòÉ <hidden> MTSequenceEA::disallowDynamic ΓòÉΓòÉΓòÉ
  1647.  
  1648.  
  1649. public: 
  1650.  static void disallowDynamic(EA::CreatorMap* pCM 
  1651.                = &EA::defaultCreatorMap) 
  1652.  
  1653. Remove MTSequenceEA from the creator map, making it impossible to dynamically 
  1654. create string extended attributes by calling EA::newFrom with that creator map. 
  1655.  
  1656. Possible errors are: 
  1657.  
  1658.       - 
  1659.  
  1660.  
  1661. ΓòÉΓòÉΓòÉ <hidden> MTSequenceEA::id ΓòÉΓòÉΓòÉ
  1662.  
  1663.  
  1664. public: 
  1665.  enum { id = EAT_MVMT }; 
  1666.  
  1667. The identifier of multi value sequence extended attributes. Use (if you can't 
  1668. avoid it,) to compare with attributeId() of objects. It is usually better not 
  1669. to make that comparison, but to use cast instead, and check the return value of 
  1670. the pointer. 
  1671.  
  1672.  
  1673. ΓòÉΓòÉΓòÉ <hidden> MTSequenceEA::readFrom ΓòÉΓòÉΓòÉ
  1674.  
  1675.  
  1676. protected: 
  1677.  virtual istrstream& readFrom(istrstream&) 
  1678.  
  1679. Overrides EA::readFrom to read the content of the extended attribute and store 
  1680. its value to the MTSequenceEA object itself. 
  1681.  
  1682. Possible errors are: 
  1683.  
  1684.  Error                         Action 
  1685.  
  1686.  Unknown type read.            Calls MTSequenceEA::errorFunction with the type 
  1687.                                of the unknown extended attribute. If 
  1688.                                MTSequenceEA::errorFunction returns, the value 
  1689.                                returned is inserted into the sequence. 
  1690.  
  1691.  
  1692. ΓòÉΓòÉΓòÉ <hidden> MTSequenceEA::writeTo ΓòÉΓòÉΓòÉ
  1693.  
  1694.  
  1695. protected: 
  1696.  virtual ostrstream& writeTo(ostrstream&) 
  1697.  
  1698. Overrides EA::writeTo to store the content of the MTSequenceEA object. 
  1699.  
  1700. Possible errors are: 
  1701.  
  1702.       - 
  1703.  
  1704.  
  1705. ΓòÉΓòÉΓòÉ <hidden> MTSequenceEA::~MTSequenceEA ΓòÉΓòÉΓòÉ
  1706.  
  1707.  
  1708. public: 
  1709.  virtual ~MTSequenceEA(void) 
  1710.  
  1711. Destroys the MTSequenceEA object and deallocates all of its contents. 
  1712.  
  1713. Note:  All EA objects pointed to by the MTSequenceEA object by the time of 
  1714.        destruction will be deallocated by a call to operator delete. If any of 
  1715.        the pointers is not to an object allocated on heap, a run time error is 
  1716.        most likely to occur. The reason for this behaviour is to avoid memory 
  1717.        leaks if an MTSequenceEA object is read when one is not expected. 
  1718.  
  1719.  Possible errors are: 
  1720.  
  1721.       - 
  1722.  
  1723.  
  1724. ΓòÉΓòÉΓòÉ <hidden> MTSequenceEA::operator= ΓòÉΓòÉΓòÉ
  1725.  
  1726.  
  1727. In order to make a copy assignment operation work without causing memory leaks, 
  1728. both versions of operator= empties the contents, thus freeing all the pointers 
  1729. in the collection, before the copy. 
  1730.  
  1731. Note:  Since operator delete will be executed on all pointers, any pointer 
  1732.        referring to an element not allocated on heap is likely to cause a run 
  1733.        time error. 
  1734.  
  1735.  public: 
  1736.   const MTSequenceEA& operator=(const MTSequenceEA& mvea); 
  1737.  
  1738.  Make self an exact copy of mvea. The contents of mvea will be cloned to avoid 
  1739.  getting several pointers to the same elements, and potential dangling pointers 
  1740.  at a later time. 
  1741.  
  1742.  Possible errors are: 
  1743.  
  1744.       - 
  1745.  
  1746.  public: 
  1747.   const MTSequenceEA& operator=(const ISequence<EA*>& isea); 
  1748.  
  1749.  Keep the state of self, except for the content of the collection, which is 
  1750.  made an exact copy of isea. The contents of isea will be cloned to avoid 
  1751.  getting several pointers to the same elements, and potential dangling pointers 
  1752.  at a later time. 
  1753.  
  1754.  Possible errors are: 
  1755.  
  1756.       - 
  1757.  
  1758.  
  1759. ΓòÉΓòÉΓòÉ <hidden> EA::clone ΓòÉΓòÉΓòÉ
  1760.  
  1761.  
  1762. public: 
  1763.  virtual MTSequenceEA* clone(void) const; 
  1764.  
  1765. Create an exact deep copy of self on the heap and return the pointer to it. 
  1766. Used by the copy constructors and assignment operators of extended attribute 
  1767. collections such as MTSequenceEA and TSequenceEA<T>. 
  1768.  
  1769. clone itself does not find or report any errors, but since it does a deep copy 
  1770. of the collection, some of its containing objects might. If and how this is 
  1771. done depends on the type of the containig objects. 
  1772.  
  1773.  
  1774. ΓòÉΓòÉΓòÉ <hidden> EA::setCreatorMap ΓòÉΓòÉΓòÉ
  1775.  
  1776.  
  1777. public: 
  1778.  virtual void setCreatorMap(const EA::CreatorMap*) 
  1779.  
  1780. Override of the empty default function in EA. It sets the 
  1781. MTSequenceEA::pCreatorMap to the map passed, to make sure children are created 
  1782. from the correct creator map. 
  1783.  
  1784. Possible errors are: 
  1785.  
  1786.       - 
  1787.  
  1788.  
  1789. ΓòÉΓòÉΓòÉ <hidden> TSequenceEA<T>::TSequenceEA ΓòÉΓòÉΓòÉ
  1790.  
  1791.  
  1792. public: 
  1793.  TSequenceEA(EA::CreatorMap* = &EA::defaultCreatorMap) 
  1794.  
  1795. Initialise a an empty TSequenceEA<T> object. 
  1796.  
  1797. public: 
  1798.  TSequenceEA(const TSequenceEA<T>& t) 
  1799.  
  1800. Copy constructor. Initialise a TSequenceEA<T> object by copying the contents 
  1801. and status of t. 
  1802.  
  1803. public: 
  1804.  TSequenceEA(const ISequence<T*>& t, 
  1805.        EA::CreatorMap* = &EA::defaultCreatorMap) 
  1806.  
  1807. Initialise a TSequenceEA<T> object, by copying the contents of the provided 
  1808. ISequence<T*> object. 
  1809.  
  1810. public: 
  1811.  TSequenceEA(const IString& filename, 
  1812.        const IString& eaname, 
  1813.        EA::CreatorMap* = &EA::defaultCreatorMap) 
  1814.  TSequenceEA(fstreambase& file, 
  1815.        const IString& eaname, 
  1816.        EA::CreatorMap* = &EA::defaultCreatorMap) 
  1817.  
  1818. Initialise a TSequenceEA<T> object by reading its contents from the named 
  1819. extended attribute of the file. 
  1820.  
  1821. Possible errors are: 
  1822.  
  1823.  Error                    Action 
  1824.  
  1825.  EA::ReadError            Call EA::errorHandler with EA::ReadError and the 
  1826.                           error code returned by OS/2. If EA::errorHandler 
  1827.                           returns, an empty TSequenceEA<T> object will be 
  1828.                           created. 
  1829.  
  1830.  EA::NoSuchEAError        Call EA::errorHandler with EA::NoSuchEAError and 0. 
  1831.                           If EA::errorHandler returns, an empty TSequenceEA<T> 
  1832.                           object will be created. 
  1833.  
  1834.  EA::TypeMismatchError    Call EA::errorHandler with EA::TypeMismatchError and 
  1835.                           the type found. If EA::errorHandler returns, an empty 
  1836.                           TSequenceEA<T> object will be created. 
  1837.  
  1838.  Note:  In addition to the above error situations, it is possible that any of 
  1839.         the containing objects read into the sequence will find and report 
  1840.         errors. If that is done, and how, depends on the type of object read. 
  1841.  
  1842.  
  1843. ΓòÉΓòÉΓòÉ <hidden> TSequenceEA<T>::operator= ΓòÉΓòÉΓòÉ
  1844.  
  1845.  
  1846. To avoid memory leaks, both versions of operator= empty the content of self, 
  1847. and deallocates all pointers, before deep copying the content of the source. 
  1848.  
  1849. Note:  Since operator delete will be executed on all pointers, any pointer 
  1850.        referring to an element not allocated on heap is likely to cause a run 
  1851.        time error. 
  1852.  
  1853.  public: 
  1854.   const TSequenceEA<T>& operator=(const TSequenceEA<T>& t) 
  1855.  
  1856.  Copy the content and status of t to self and return self reference. 
  1857.  
  1858.  Possible errors are: 
  1859.  
  1860.       - 
  1861.  
  1862.    const TSequenceEA<T>& operator=(const ISequence<T*>& t) 
  1863.  
  1864.  Keep the state of the extended attribute object as is, but assign it new 
  1865.  values from the ISequence passed. 
  1866.  
  1867.  Possible errors are: 
  1868.  
  1869.       - 
  1870.  
  1871.  Note:  It is possible that some of the contained objects will find and report 
  1872.         errors. If that happens, and how, depends on the type of the contained 
  1873.         objects. 
  1874.  
  1875.  
  1876. ΓòÉΓòÉΓòÉ <hidden> TSequenceEA<T>::~TSequenceEA ΓòÉΓòÉΓòÉ
  1877.  
  1878.  
  1879. public: 
  1880.  virtual ~TSequenceEA(void) 
  1881.  
  1882. Destructor. 
  1883.  
  1884. Note:  Unlike the destructor for ISequence, the destructor for TSequenceEA<T> 
  1885. deallocates all pointers to its contents. This is to avoid memory leaks in 
  1886. situations where a TSequenceEA<T> is read when you do not expect one. 
  1887.  
  1888. Warning: If there are extended attribute objects in the sequence that are not 
  1889. allocated on heap, when the destructor is called, a run-time error is very 
  1890. likely to occur since operator delete is called on every pointer in the 
  1891. sequence. 
  1892.  
  1893. Possible errors are: 
  1894.  
  1895.       - 
  1896.  
  1897.  Note:  It is possible that some of the contained objects will find and report 
  1898.         errors. If that happens, and how, depends on the type of the contained 
  1899.         objects. 
  1900.  
  1901.  
  1902. ΓòÉΓòÉΓòÉ <hidden> TSequenceEA<T>::allowDynamic ΓòÉΓòÉΓòÉ
  1903.  
  1904.  
  1905. public: 
  1906.  static void allowDynamic(EA::CreatorMap* pCM = 
  1907.               &EA::defaultCreatorMap, 
  1908.               const EA::Creator& creator = 
  1909.               TSequenceEA<T>::createFrom) 
  1910.  
  1911. Add TSequenceEA<T> to the creator map, making it possible to dynamically create 
  1912. typed sequence extended attributes by calling EA::newFrom with that creator 
  1913. map. The TSequenceEA<T> object will be created by a call to the provided 
  1914. creator function. 
  1915.  
  1916. Possible errors. 
  1917.  
  1918.       - 
  1919.  
  1920.  
  1921. ΓòÉΓòÉΓòÉ <hidden> TSequenceEA<T>::disallowDynamic ΓòÉΓòÉΓòÉ
  1922.  
  1923.  
  1924. public: 
  1925.  static void disallowDynamic(EA::CreatorMap* pCM = 
  1926.                &EA::defaultCreatorMap) 
  1927.  
  1928. Remove the creator of TSequenceEA<T> from the provided creator map, making it 
  1929. impossible to dynamically create TSequenceEA<T> objects from it. 
  1930.  
  1931. Possible errors are: 
  1932.  
  1933.       - 
  1934.  
  1935.  
  1936. ΓòÉΓòÉΓòÉ <hidden> TSequenceEA<T>::cast ΓòÉΓòÉΓòÉ
  1937.  
  1938.  
  1939. public: 
  1940.  static TSequenceEA<T>* cast(EA*) 
  1941.  static const TSequenceEA<T>* cast(const EA*) 
  1942.  
  1943. Cast pointers of EA to pointers of TSequenceEA<T>. Return the pointer value if, 
  1944. and only if, attributeId() of the object equals SequenceEA::id and its 
  1945. contentId() returns T::elementId. Otherwise the value returned will be 0. 
  1946.  
  1947. CAUTION:
  1948. cast is unable to distinguish between TSequenceEA<T> and other implementations 
  1949. of EAT_MVST, or TSequenceEA<T2> where T::id == T2::id for that matter, since 
  1950. only the type identifiers are compared. 
  1951.  
  1952.  
  1953. ΓòÉΓòÉΓòÉ <hidden> TSequenceEA<T>::elementId ΓòÉΓòÉΓòÉ
  1954.  
  1955.  
  1956. template <class T> 
  1957. class TSequenceEA ┬╖┬╖┬╖ 
  1958.  enum { elementId = T::id } 
  1959.  
  1960. Constant for accessing the type identifier of the class that TSequenceEA<T> is 
  1961. parametrised with. For example, TSequenceEA<StringEA>::elementId == 
  1962. StringEA::id. 
  1963.  
  1964. There is little reason to use this constant. It is used internally by 
  1965. TSequenceEA<T>::cast. 
  1966.  
  1967.  
  1968. ΓòÉΓòÉΓòÉ <hidden> EA::clone ΓòÉΓòÉΓòÉ
  1969.  
  1970.  
  1971. public: 
  1972.  virtual TSequenceEA<T>* clone(void) const 
  1973.  
  1974. Create an exact deep copy of self on the heap and return the pointer to it. 
  1975. Used by the copy constructors and assignment operators of extended attribute 
  1976. collections such as MTSequenceEA and TSequenceEA<T>. 
  1977.  
  1978. clone itself does not find or report any errors, but since it does a deep copy 
  1979. of the collection, some of the containing objects might. If and how this is 
  1980. done depends on the type of the containig objects. 
  1981.  
  1982.  
  1983. ΓòÉΓòÉΓòÉ <hidden> EA::attributeId ΓòÉΓòÉΓòÉ
  1984.  
  1985.  
  1986. public: 
  1987.  EA::Identifier attributeId(void) const 
  1988.  
  1989. Returns SequenceEA::id 
  1990.  
  1991. Possible errors. 
  1992.  
  1993.       - 
  1994.  
  1995.  
  1996. ΓòÉΓòÉΓòÉ <hidden> EA::getFrom ΓòÉΓòÉΓòÉ
  1997.  
  1998.  
  1999. public: 
  2000.  void getFrom(const IString& file, 
  2001.         const IString& name); 
  2002.  void getFrom(fstreambase& file, 
  2003.         const IString& name); 
  2004.  
  2005. Read the value of the named extended attribute for the file into the 
  2006. TSequenceEA<T> object. 
  2007.  
  2008. Possible errors are: 
  2009.  
  2010.  Error                    Action 
  2011.  
  2012.  EA::ReadError            Call EA::errorHandler with EA::ReadError and the 
  2013.                           error code returned by OS/2. If EA::errorHandler 
  2014.                           returns, the TSequenceEA<T> object will remains 
  2015.                           unchanged. 
  2016.  
  2017.  EA::NoSuchEAError        Call EA::errorHandler with EA::NoSuchEAError and 0. 
  2018.                           If EA::errorHandler returns, the TSequenceEA<T> 
  2019.                           object will remain unchanged. 
  2020.  
  2021.  EA::TypeMismatchError    Call EA::errorHandler with EA::TypeMismatchError and 
  2022.                           the type found. If EA::errorHandler returns, the 
  2023.                           TSequenceEA<T> object will remain unchanged. 
  2024.  
  2025.  TypeMismatchError is called both if the named attribute is not a typed 
  2026.  sequence extended attribute, and if the type of the content read is not that 
  2027.  of T. 
  2028.  
  2029.  Note:  In addition to the above, it is possible that some of the contained 
  2030.         objects will find and report errors. If and how that is done depends on 
  2031.         the type of the objects. 
  2032.  
  2033.  
  2034. ΓòÉΓòÉΓòÉ <hidden> EA::storeTo ΓòÉΓòÉΓòÉ
  2035.  
  2036.  
  2037. public: 
  2038.  void storeTo(const IString& file, 
  2039.         const IString& name); 
  2040.  void storeTo(fstreambase& file, 
  2041.         const IString& name); 
  2042.  
  2043. Write the value of the typed extended attribute sequence to the file using the 
  2044. name given. 
  2045.  
  2046. Possible errors are: 
  2047.  
  2048.  Error                    Action 
  2049.  
  2050.  EA::WriteError           Call EA::errorHandler with EA::WriteError and the 
  2051.                           error code returned by OS/2. 
  2052.  
  2053.  
  2054. ΓòÉΓòÉΓòÉ <hidden> TSequenceEA<T>::readFrom ΓòÉΓòÉΓòÉ
  2055.  
  2056.  
  2057. protected: 
  2058.  virtual istrstream& readFrom(istrstream& is) 
  2059.  
  2060. Overrides EA::readFrom to read the content of the typed sequence extended 
  2061. attribute and store its value in the TSequenceEA<T> 
  2062.  
  2063. Possible errors are: 
  2064.  
  2065.  Error                    Action 
  2066.  
  2067.  EA::TypeMismatchError    Call EA::errorHandler with EA::TypeMismatchError and 
  2068.                           the type found. This means that the content type of 
  2069.                           the sequence (i.e. T::id) was not the content type 
  2070.                           read from the stream. 
  2071.  
  2072.  Note:  In addition to the above, it is possible that some of the contained 
  2073.         objects will find and report errors. If and how that is done depends on 
  2074.         the type of the objects. 
  2075.  
  2076.  
  2077. ΓòÉΓòÉΓòÉ <hidden> TSequenceEA<T>::writeTo ΓòÉΓòÉΓòÉ
  2078.  
  2079.  
  2080. protected: 
  2081.  virtual ostrstream& writeTo(ostrstream& os) 
  2082.  
  2083. Overrides EA::writeTo to write the content of the typed sequence extended 
  2084. attribute. 
  2085.  
  2086. Possible errors are: 
  2087.  
  2088.       - 
  2089.  
  2090.  Note:  It is possible that some of the contained objects will find and report 
  2091.         errors. If and how that is done depends on the type of the objects. 
  2092.  
  2093.  
  2094. ΓòÉΓòÉΓòÉ <hidden> TEA<T,EA::Identifier>::id ΓòÉΓòÉΓòÉ
  2095.  
  2096.  
  2097. template <class T, EA::Identifier eaid> 
  2098. class TEA 
  2099. public: 
  2100.  struct { id = eaid; }; 
  2101. ┬╖┬╖┬╖ 
  2102. A named class constant with the value passed when instantiating TEA. 
  2103. Representing the type for the concrete extended attribute object inheriting 
  2104. from TEA. 
  2105.  
  2106.  
  2107. ΓòÉΓòÉΓòÉ <hidden> TEA<T,EA::Identifier>::cast ΓòÉΓòÉΓòÉ
  2108.  
  2109.  
  2110. template <class T,EA::Identifier eaid> 
  2111. class TEA<T,eaid> 
  2112. public: 
  2113.  static T* cast(EA*); 
  2114.  static const T* cast(const EA*); 
  2115.  ┬╖┬╖┬╖ 
  2116.  
  2117. Cast pointers to EA to pointers of class T if, and only if, the type identifier 
  2118. of the EA object is identical to the typeid TEA is instantiated with (i.e. 
  2119. T::id.) Return 0 otherwise. 
  2120.  
  2121. CAUTION:
  2122. cast is unable to differ between objects of class T and other implementation of 
  2123. T::id, since only the attribute id is compared. 
  2124.  
  2125. Possible errors are: 
  2126.  
  2127.       - 
  2128.  
  2129.  
  2130. ΓòÉΓòÉΓòÉ <hidden> TEA<T,EA::Identifier>::allowDynamic ΓòÉΓòÉΓòÉ
  2131.  
  2132.  
  2133. public: 
  2134. static void allowDynamic(EA::CreatorMap* pCM = 
  2135.              &EA::defaultCreatorMap, 
  2136.              const EA::Creator& = TEA<T,EA::Identifier>::createFrom); 
  2137.  
  2138. Add the creator of the descendant of TEA to the provided creator map. 
  2139.  
  2140. Note for designers of new classes  A default creator is provided by TEA. If you 
  2141. need a different one, you must write an allowDynamic function for your own 
  2142. class, and a special creator function for it. If you have only a specific 
  2143. creator function, override allowDynamic to take the creator function as its 
  2144. default argument, and call TEA::allowDynamic from your own override. 
  2145.  
  2146. Possible errors are: 
  2147.  
  2148.       - 
  2149.  
  2150.  
  2151. ΓòÉΓòÉΓòÉ <hidden> TEA<T,EA::Identifier>::disallowDynamic ΓòÉΓòÉΓòÉ
  2152.  
  2153.  
  2154. public: 
  2155.  static void 
  2156.   disallowDynamic(EA::CreatorMap* pCM = 
  2157.           &EA::defaultCreatorMap); 
  2158.  
  2159. Remove the creator of the descendant of TEA from the provided creator map. 
  2160.  
  2161. Possible errors are: 
  2162.  
  2163.       - 
  2164.  
  2165.  
  2166. ΓòÉΓòÉΓòÉ <hidden> TEA<T,EA::Identifier>::TEA ΓòÉΓòÉΓòÉ
  2167.  
  2168.  
  2169. protected: 
  2170.  TEA(void); 
  2171.  TEA(const TEA<T, EA::Identifier>&t); 
  2172.  
  2173. Initialise the extended attribute base object. Use when implementing descendant 
  2174. extended attribute classes. 
  2175.  
  2176. Possible errors are: 
  2177.  
  2178.       - 
  2179.  
  2180.  
  2181. ΓòÉΓòÉΓòÉ <hidden> TEA<T,EA::Identifier>::operator= ΓòÉΓòÉΓòÉ
  2182.  
  2183.  
  2184. protected: 
  2185.  const TEA<T, EA::Identifier>& operator=(const TEA<T, EA::Identifier>& t) 
  2186.  
  2187. Copy the content and status of t to self and return self reference. Use in the 
  2188. implementation of descendants from TEA<T, EA::Identifier>. 
  2189.  
  2190. Possible errors are: 
  2191.  
  2192.       - 
  2193.  
  2194.  
  2195. ΓòÉΓòÉΓòÉ <hidden> SequenceEA::errorFunction ΓòÉΓòÉΓòÉ
  2196.  
  2197.  
  2198. public: 
  2199.  static EA* (*errorFunction)(EA::Identifier); 
  2200.  
  2201. The error function called if a TSequenceEA<T>, for which allowDynamic has not 
  2202. been called (but another TSequenceEA<T> has been allowed,) is attempted to be 
  2203. read anonymously (by EA::newFrom or as an element in MTSequenceEA) The default 
  2204. function throws an EATSequenceEAInstError exception, with the identifier of the 
  2205. content type as the error code. To override this function, simply assign it 
  2206. your own. The value returned from the function (if it returns) is what 
  2207. EA::newFrom or MTSequenceEA gets. 
  2208.  
  2209.  
  2210. ΓòÉΓòÉΓòÉ <hidden> SequenceEA::~SequenceEA ΓòÉΓòÉΓòÉ
  2211.  
  2212.  
  2213. public: 
  2214.  virtual ~SequenceEA(void) 
  2215.  
  2216. Destroy the SequenceEA object. 
  2217.  
  2218. Possible errors are: 
  2219.  
  2220.       - 
  2221.  
  2222.  
  2223. ΓòÉΓòÉΓòÉ <hidden> SequenceEA::getCodePage ΓòÉΓòÉΓòÉ
  2224.  
  2225.  
  2226. public: 
  2227.  unsigned short getCodePage(void) const; 
  2228.  
  2229. Return the code page used by the TSequenceEA<T> object. Code page 0 means the 
  2230. same code page as used by the application. 
  2231.  
  2232. Possible errors are: 
  2233.  
  2234.       - 
  2235.  
  2236.  
  2237. ΓòÉΓòÉΓòÉ <hidden> SequenceEA::setCodePage ΓòÉΓòÉΓòÉ
  2238.  
  2239.  
  2240. public: 
  2241.  void setCodePage(unsigned short p) 
  2242.  
  2243. Set the code page for the instance of TSequenceEA<T>. Code page 0 means to use 
  2244. the same code page as the application. 
  2245.  
  2246. Possible errors are: 
  2247.  
  2248.       - 
  2249.  
  2250.  
  2251. ΓòÉΓòÉΓòÉ <hidden> SequenceEA::contentId ΓòÉΓòÉΓòÉ
  2252.  
  2253.  
  2254. public: 
  2255.  EA::Identifier contentId(void) const 
  2256.  
  2257. Returns the identifier of the content type, i.e. TSequenceEA<T>::contentId() 
  2258. returns T::id. Since you will normally not work with SequenceEA directly, but 
  2259. rather instances of TSequenceEA<T>, there will be little need for this 
  2260. function. It is used internally by the TSequenceEA<T> override of 
  2261. TEA<T,EA::Identifier>::cast functions. 
  2262.  
  2263. Possible errors are: 
  2264.  
  2265.       - 
  2266.  
  2267.  
  2268. ΓòÉΓòÉΓòÉ <hidden> SequenceEA::clone ΓòÉΓòÉΓòÉ
  2269.  
  2270.  
  2271. public: 
  2272.  virtual SequenceEA* clone(void) const 
  2273.  
  2274. Returns 0. This version of clone should never be called, since TSequenceEA<T> 
  2275. overrides it. 
  2276.  
  2277. Possible errors are: 
  2278.  
  2279.       - 
  2280.  
  2281.  
  2282. ΓòÉΓòÉΓòÉ <hidden> EA::setCreatorMap ΓòÉΓòÉΓòÉ
  2283.  
  2284.  
  2285. public: 
  2286.  virtual void setCreatorMap(const EA::CreatorMap*) 
  2287.  
  2288. Override of the empty default function in EA. It sets the 
  2289. SequenceEA::pCreatorMap to the map passed, to make sure children of the 
  2290. TSequenceEA<T> object are created from the correct creator map. 
  2291.  
  2292. Possible errors are: 
  2293.  
  2294.       - 
  2295.  
  2296.  
  2297. ΓòÉΓòÉΓòÉ <hidden> SequenceEA::pCreatorMap ΓòÉΓòÉΓòÉ
  2298.  
  2299.  
  2300. protected: 
  2301.  const EA::CreatorMap* pCreatorMap 
  2302.  
  2303. Creator map passed to the containing objects of the TSequenceEA<T> inheriting 
  2304. SequenceEA, as they are created, to make sure they are read from the creator 
  2305. map specified. This is only needed if the type of T is a collection class. 
  2306.  
  2307.  
  2308. ΓòÉΓòÉΓòÉ <hidden> SequenceEA::allowDynamic ΓòÉΓòÉΓòÉ
  2309.  
  2310.  
  2311. protected: 
  2312.  static void allowDynamic(EA::CreatorMap* pCM, 
  2313.               const EA::Creator& creator = SequenceEA::createFrom) 
  2314.  
  2315. Override of the default from TEA, to allow descendants of SequenceEA to allow 
  2316. creation of SequenceEA objects through the private creator function 
  2317. SequenceEA::createFrom. 
  2318.  
  2319.  
  2320. ΓòÉΓòÉΓòÉ <hidden> SequenceEA::SequenceEA ΓòÉΓòÉΓòÉ
  2321.  
  2322.  
  2323. protected: 
  2324.  SequenceEA(EA::Identifier id, 
  2325.        EA::CreatorMap* pCM = &EA::defaultCreatorMap); 
  2326.  SequenceEA(const SequenceEA& mvea); 
  2327.  
  2328. Initialise instance of SequenceEA. Used by the constructors for TSequenceEA<T>. 
  2329.  
  2330. Possible errors are: 
  2331.  
  2332.       - 
  2333.  
  2334.  
  2335. ΓòÉΓòÉΓòÉ <hidden> SequenceEA::operator= ΓòÉΓòÉΓòÉ
  2336.  
  2337.  
  2338. protected: 
  2339.  const SequenceEA& operator=(const SequenceEA& mvea); 
  2340.  
  2341. Copy content and status of mvea to self and return self reference. Used by the 
  2342. assignment operator in TSequenceEA<T> 
  2343.  
  2344. Possible errors are: 
  2345.  
  2346.       - 
  2347.  
  2348.  
  2349. ΓòÉΓòÉΓòÉ <hidden> SequenceEA::writeTo ΓòÉΓòÉΓòÉ
  2350.  
  2351.  
  2352. protected: 
  2353.  virtual ostrstream& writeTo(ostrstream& os) 
  2354.  
  2355. Override of EA::writeTo that does nothing. Should never be called since 
  2356. TSequenceEA<T> overrides it. 
  2357.  
  2358. Possible errors are: 
  2359.  
  2360.       - 
  2361.  
  2362.  
  2363. ΓòÉΓòÉΓòÉ <hidden> SequenceEA::readFrom ΓòÉΓòÉΓòÉ
  2364.  
  2365.  
  2366. protected: 
  2367.  virtual istrstream& readFrom(istrstream& is) 
  2368.  
  2369. Override of EA::readFrom that does nothing. Should never be called since 
  2370. TSequenceEA<T> overrides it. 
  2371.  
  2372. Possible errors are: 
  2373.  
  2374.       - 
  2375.  
  2376.  
  2377. ΓòÉΓòÉΓòÉ <hidden> SequenceEA::id ΓòÉΓòÉΓòÉ
  2378.  
  2379.  
  2380. public: 
  2381.  enum { id = EAT_MVST }; 
  2382.  
  2383.  
  2384. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  2385.  
  2386. Destructor for TEA. Does nothing explicit, since TEA does not have any data of 
  2387. its own.