FLAM® Issue Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000448FL54. Element, Byte, Record or other APIpublic2014-05-21 12:322014-05-23 12:16
ReporterFalk Reichbott 
Assigned ToFalk Reichbott 
PriorityhighSeverityfeatureReproducibilityN/A
StatusresolvedResolutionfixed 
PlatformGeneralOSGeneralOS VersionGeneral
Product Version5.0 
Target Version5.0Fixed in Version5.0 
Summary0000448: Add get and set function to FLUC byte and record interface to manage the current state
DescriptionIf the FLUC byte or record interface used the internal state of FLUC is empty if a open for write done. Means the write knows nothing from open read. In this case it would be useful to define the internal state. If this not possible, the file attribute of a flamfile member are not known (still on defaults) fr example. For this a set function are required to define the internal state structure for FLUC.

On the other side it would also be usefull to get the internal state values after an open for read. To know all the attributes for father actions. If the open for read and the open for write done over the byte or record interface, then the same internal state must be used automatically.
Additional InformationNew functions on byte interface:

extern char *fcbgetstate(void);
extern int fcbsetstate(const char*);

Example to use:

pi=fcbopen("read.text(file='test.txt')","format.text()");
fcbsetstate(fcbgetstate()); //optional statement
po=fcbopen("write.record()","format.text()")
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000469)
Falk Reichbott (administrator)
2014-05-23 12:16

The state management was not solved by additional getter and setter. The solution was a new fcbopen2() function, which an addtional pointer of pointer to char. If this pointer !=NULL at read, the pointer is set to a string descripting the state. For the state a new object (STATE()) was defined. For write operation, the state string can be provided by the calle of fcbopen2("write.") or taken from fcbopen("read.").

Example:

 1. Write only
 char* state="STATE(file='test.txt')"
 void* wrt=fcbopen2("write.text(comp.gzip())","format.text()",&state);

 2. Read and write
 char* state=NULL;
 void* red=fcbopen2("read.text(file='test.txt')","format.text()",&state);
 void* wrt=fcbopen2("write.text(comp.gzip())","format.text()",&state);
 
For the record interface the state string was add as new parameter to FCROPN. The record interface is brand to make this kind of change ossible.

- Issue History
Date Modified Username Field Change
2014-05-21 12:32 Falk Reichbott New Issue
2014-05-21 12:32 Falk Reichbott Status new => assigned
2014-05-21 12:32 Falk Reichbott Assigned To => Falk Reichbott
2014-05-23 12:16 Falk Reichbott Note Added: 0000469
2014-05-23 12:16 Falk Reichbott Status assigned => resolved
2014-05-23 12:16 Falk Reichbott Fixed in Version => 5.0
2014-05-23 12:16 Falk Reichbott Resolution open => fixed
2014-12-02 07:43 Falk Reichbott Category 4. Element, Byte or Record API => 4. Element, Byte, Record or other API


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker