EA (class library): Difference between revisions
Appearance
Created page with "Public members of class EA: ==Constructors== There are three public constructors: EA(const IString& name, const void* buffer, unsigned long length, USHORT ..." |
|||
Line 25: | Line 25: | ||
==Data-member access functions== | ==Data-member access functions== | ||
name() | ; name() : This function returns the value of the name data-member of the EA. | ||
const IString& name() const; | |||
; value() : Returns the value of the value data-member of the given object. | |||
const IString& value() const; | |||
value() | ; type() ; Returns the value of the type data-member of the given object. | ||
USHORT type() const; | |||
; typeAsString() : Converts the value of type (resp. the value of the type data-member of the given object) to a string. If the type is not one of the predefined EAT_ types, the functions return "Unknown(xxxx)" were xxxx is the value of the type in hex. | |||
static IString typeAsString(USHORT type); | |||
IString typeAsString() const; | |||
static IString typeAsString(USHORT type); | |||
IString typeAsString() const; | |||
; flag() : This function returns the value of the flag data-member of the EA. | ; flag() : This function returns the value of the flag data-member of the EA. |
Revision as of 23:28, 16 September 2016
Public members of class EA:
Constructors
There are three public constructors:
EA(const IString& name, const void* buffer, unsigned long length, USHORT type=EAT_BINARY, BYTE flag=0); EA(const IString& name="", const IString& value="", BYTE flag=0); EA(const IString& name, const EAList& list, BYTE flag=0);
The first constructor can be used to construct EAs of any type, the second constructs an EA of type EAT_ASCII and the third converts an EAList to a MV-EA.
Predefined types are defined in <bsedos.h>. The only valid value for the flag parameter besides 0 is FEA_NEEDEA. In the latter case the EA is marked as critical and only programs explicitly supporting EAs can process the file.
Data-member access functions
- name()
- This function returns the value of the name data-member of the EA.
const IString& name() const;
- value()
- Returns the value of the value data-member of the given object.
const IString& value() const;
- type() ; Returns the value of the type data-member of the given object.
USHORT type() const;
- typeAsString()
- Converts the value of type (resp. the value of the type data-member of the given object) to a string. If the type is not one of the predefined EAT_ types, the functions return "Unknown(xxxx)" were xxxx is the value of the type in hex.
static IString typeAsString(USHORT type); IString typeAsString() const;
- flag()
- This function returns the value of the flag data-member of the EA.
BYTE flag() const;
==Functions to change data-members== setName(), setValue(), setType(), setFlag()
Functions for interaction with files
read(), write(), remove()
Functions for multi-valued EAs: codePage(), numValues()