uses data.String
/* {"description" : "Basic information about a compiled Dana component."} */
data ObjectInfo{
/* {"@description" : "The size of the compiled code, in bytes."} */
int textSize
/* {"@description" : "How many info sections are in the compiled file."} */
int infoSectionCount
/* {"@description" : "How many relocations are needed for the compiled code after loading it into memory."} */
int relocationCount
}
/* {"description" : "Details of an information section from a compiled Dana component file."} */
data InfoSection{
/* {"@description" : "The type of this information section."} */
char sectionType[]
/* {"@description" : "The type of the content held in this information section."} */
char contentType[]
/* {"@description" : "The content held in this information section."} */
byte content[]
}
/*
{"description" : "Utility to inspect compiled Dana components. This is primarily used to examine and modify 'info sections' in these components such as the list of interfaces that a component has.", "@deprecated" : "true", "@deprecatedBy" : "util.ObjectFile", "@deprecatedOn" : "2020/01/01"}
*/
interface ObjectWriter{
/*
{"@description" : "The file path of the object file being operated on."}
*/
transfer char objectPath[]
/*
{"@description" : "Create an ObjectWriter for a given compiled component file."}
*/
ObjectWriter(char path[])
/*
{"@description" : "Get general information about the object file."}
*/
ObjectInfo getInfo()
/*
{"@description" : "Get the list of info section names contained in the object file (excluding their content)."}
*/
InfoSection[] getInfoSections()
/*
{"@description" : "Get the details (including contents) of a specific info section from the object file.",
"type": "The section type to search for.",
"cType" : "The content type to search for (if null, the first matching section type is returned)."}
*/
InfoSection getInfoSection(char type[], char cType[])
/*
{"@description" : "Add a new info section to the object file. Note that the name and type fields are a maximum of 4 characters (any additional characters are truncated)."}
*/
void addInfoSection(InfoSection newSection)
/*
{"@description" : "Delete the first occurence of an info section from the object file.",
"type": "The section type to search for.",
"cType" : "The content type to search for (if null, the first matching section type is deleted)."}
*/
void deleteInfoSection(char type[], char cType[])
}
To propose a new revision to this entity, use dana source put -ut your/new/version.dn -n composition.ObjectWriter -m "reason for update" -u yourUsername
Version 1 (this version) by barry
Notes for this version: Standard Library Initialisation