![]() |
![]() |
![]() |
![]() |
![]() |
System File
The Organizer maintains a system file that contains a description of all files that are included in the system, together with all settings the user has made to this particular system. The default file name extension for a system file is .sdt.
In addition, a system window state file contains information about window positions and sizes, and it uses the extension .sdt.state.
Contents of the System File
The contents of the system file summarizes the information that the Organizer manages:
- Source Directory and Target Directory.
- Link file reference (used by the Link Manager) and information about endpoints in the Organizer view.
- All document names are listed, both with logical names and file names. The fact that document names are present means that the Organizer will have a robust recovery when files are manipulated outside the Organizer.
- Associations and dependencies are stored as indexes to other documents for a document.
- The names of all chapters and modules are listed.
- The names of all Control Unit files.
The system file may contain a mapping of directory paths on Windows and UNIX to allow the system to be accessed on both platforms. See "Windows and UNIX File Compatibility" on page 216 for more information.
A number of options are also stored in the system file, but only if they differ from the values in the preference file or if the preference Organizer*AllPreferences is on. The options are:
- Window options as set in the View Options and Set Scale dialogs
- Analyze options as set in the Analyze dialog
- Make options as set in the Make dialog
- Print options as set in the Print > Selected dialog
In addition, information about collapsed, hidden and selected documents are saved to enable the Organizer to open with the same appearance as when the system file was saved. However, simply changing which documents are collapsed, hidden and selected will not mark the system file as "dirty" in the Organizer.
Format of the System File
The system file is a line-oriented, human-readable text file. The system file is divided into sections. Each section contains lines formatted in the same way. Any lines before the first section are ignored, but saved for the next system file save. This means that it is possible to have user defined comments in the beginning of the file.
The file has the following format:
<file> ::= <comments> SDT-SYSTEM-6.3(<drives> | $)(<dir> | $) (<links> | $)(<diagram> | $) (<view> | $) (<analys> | $)(<cpp2sdl> | $) (<make> | $) (print | $)<comments> ::= <comment>*<comment> ::= Any line of ASCII characters not beginning with "SDT-SYSTEM-".<drives> ::= [DRIVES] <drive>*<drive> ::= <Windows dir> <UNIX dir><dir> ::= [SOURCE-TARGET-DIRECTORY] <option>*<links> ::= [LINKS] <option>*<diagram> ::= [DIAGRAMS] <dia>*<dia> ::= <indent> <type> <name>(<path> | <fileName> | %unconnected%)<viewState> <timeStamp> <separateName><associations> <dependencies><view> ::= [VIEWOPTIONS] <option>*<analys> ::= [ANALYSEROPTIONS] <option>*<cpp2sdl> ::= [CPP2SDLOPTIONS] <option>*<make> ::= [MAKEOPTIONS] <option>*<print> ::= [PRINTOPTIONS] <option>*<Windows dir> ::= <string>
- An Windows path. This is either a drive letter and a colon (e.g. C:) or a full path (e.g. C:\SDL). UNC paths can be used (e.g. \\MYHOST\SDL). If you include a trailing backslash you must also include a trailing slash in the corresponding <UNIX dir>.
<UNIX dir> ::= <string>
- A UNIX directory path corresponding to the <Windows dir>. If you include a trailing slash you must also include a trailing backslash in the corresponding <Windows dir>.
<indent> ::= <int>
- The indentation level. 0 is root, -1 is used for chapters.
<type> ::= <int>
- Type of document, module or chapter. If the diagram has some kind of virtuality, the value is factored with a number with the base 100. The value corresponds to the kind of virtuality. These numbers correspond to an enumerated value found in the file sdt.h. If the diagram is an instance, a value of 1000 will be added to the type.
<name> ::= <string>
- Logical name of diagram or document.
<path> ::= <string>
- File path including a directory.
<fileName> ::= <string>
- File name.
<viewState> ::= <integer>
- Viewing state, consisting of four weighted booleans for separation, expanded, shown and selected states:
Separation + 2*NotExpanded + 4*NotShown + 8*Selected.<timeStamp> ::= <integer>
- Last time the file was modified, and that the Organizer was aware of. When the Organizer reads the system file, only files with modification dates later than the time stamp are checked for correctness.
<separateName> ::= <string>
- Name of separation. Only applicable for units that are separately analyzed.
<associations> ::= <string>
- A string of space separated values referencing associated documents, e.g. "1 4 5". The values index documents in the DIAGRAMS section.
<dependencies> ::= <string>
- A string of space separated values referencing documents that this document is depending on, e.g. "1 4 5". The values index documents in the DIAGRAMS section.
<option> ::= (<option-name> = <option-value>)<option-name> ::= <string>
- Any option found in the named dialogs.
<option-value> ::= <string>
- Any valid value bound to an option.
If a section is missing entirely from the system file, a warning will be logged, except for the cpp2sdl section which is optional and only useful in batch. If no recognizable sections could be found, the file is not a valid system file.
When loading system files, warnings will be registered in the Organizer Log window if any non-recognized option is encountered, but not if an option never was initialized.
The Drives Section
The purpose of the DRIVES section in the system file is to achieve file compatibility between UNIX and Windows systems. It specifies the drive table; a mapping between Windows and UNIX directory paths. See "Windows and UNIX File Compatibility" on page 216 for more information.
The path format of the current platform is used for directory paths stored in the system file: UNIX path names on UNIX systems (i.e. starting with a slash `/' and directories separated by slashes), and Windows path names on Windows systems (i.e. starting with a drive letter "x:" and directories separated by backslashes `\', or using the UNC format "\\<host>\file").
Diagrams with file specifications in an incorrect format are marked as Invalid in the Organizer.
When reading the system file on Windows systems, file specifications in UNIX format are converted to Windows format using the mapping in the DRIVES section, if possible, including converting slashes to backslashes. When the system file is saved, the file specifications are saved in Windows format, i.e. they are not converted back to UNIX format.
On UNIX systems, file specifications in Windows format are converted to UNIX format using the mapping in the DRIVES section, if possible, including converting backslashes to slashes. When the system file is saved, the file specifications are saved in UNIX format, i.e. they are not converted back to Windows format.
The DRIVES section of the system file looks like this:
[DRIVES]C:\TEMP /tmp\\MYHOST\STORAGE /home/userThe file specification /tmp/a.ssy in the system file is converted to C:\TEMP\a.ssy.
The file specification /home/user/mydir/a.ssy is converted to
\\MYHOST\STORAGE\mydir\a.ssy.The file specification /usr/local/dir/a.ssy is converted to \usr\local\dir\a.ssy. Since no drive or host name could be matched, the file will not be found and the diagram will be marked as Invalid in the Organizer.
Options in the System File
A number of sections contain options for the Organizer, representing values that can be set in the Organizer dialogs. If an option in the file is not recognized by the Organizer, it will be ignored, and if an option is not included in the file, a default preference value will be used. A few of the options have no corresponding preference parameters.
The following tables list the Organizer options that are saved in the system file. The user should not normally need to know or change these options in the system file. However, when running the SDL Suite in batch mode on UNIX, it may be useful to change some options by editing a system file to be submitted as input to sdtbatch. See "Batch Facilities" on page 209 for more information.
The options must appear in the correct section of the system file, but the ordering of options within a section is not important. The options are stored in the system file according to the format:
NameOfOption=ValueThe option names and option values are case insensitive.
Possible and allowed values are not specified; the user should run the Preference Manager in order to obtain a reference to the permitted values.
SOURCE-TARGET-DIRECTORY Section
Organizer*AbsolutePath
Organizer*SourceDirectory
Organizer*TargetDirectory
VIEWOPTIONS Section
SDT*Scale
Organizer*ShowDashed
Organizer*ShowDependencies
Organizer*ShowDirectories
Organizer*ShowFileName
Organizer*ShowGroups
Organizer*ShowInstances
Organizer*ShowLinkFile
Organizer*ShowLinks
Organizer*ShowLongMenus
Organizer*ShowPages
Organizer*ShowPermissions
Organizer*ShowSeparators
Organizer*Statusbar
Organizer*ShowSystemFile
Organizer*Toolbar
Organizer*ShowTypeName
Organizer*ShowVirtuality
Organizer*TreeRepresentation
ANALYSEROPTIONS Section
Organizer*AllowImplicitTypeConv
Organizer*EchoAnalyzerCommands
Organizer*ErrorLimit
Organizer*ExpandPR
Organizer*ExpressionLimit
Organizer*FilterCommand
Organizer*FilterCommand
Organizer*IncludeOptionalFields
Organizer*MacroExpansion
Organizer*MissingAnswerValuesControl
Organizer*MissingElseControl
Organizer*ParameterMismatchControl
Organizer*ExternalTypeFreeControl
Organizer*OptionalParamControl
Organizer*OutputControl
Organizer*ReferenceControl
Organizer*SemanticControl
Organizer*SyntaxControl
Organizer*TerminateAnalyzer
Organizer*TrailingParamControl
Organizer*UpperCase
Organizer*UsageControl
Organizer*XRef
CPP2SDLOPTIONS Section, optional section which can be used in batch mode
MAKEOPTIONS Section
Organizer*Capitalisation
Organizer*CompileAndLink
Organizer*FileNamePrefix
Organizer*GenerateASN1Coder
Organizer*GenerateCode
Organizer*GenerateEnvFunctions
Organizer*GenerateEnvHeader
Organizer*GenerateSDLCoder
Organizer*GenerateSignalNumbers
Organizer*Kernel
Organizer*MakefileMode
Organizer*PrefixType
Organizer*Separation
Organizer*StandardKernel
Organizer*TargetLanguage
Organizer*UserKernel
Organizer*UserMakefile
Organizer*UserTemplate
Organizer*XCodeGenerator
PRINTOPTIONS Section
Print*BackwardReferences
Print*BlackAndWhite
Print*DestinationFormat
Print*FooterFile
Print*ForwardReferences
Print*FrameMakerCommand
Print*HeaderFile
Print*MarginLeft
Print*MarginLower
Print*MarginRight
Print*MarginUpper
Print*OnlyChaptersInTOC
Print*OrganizerView
Print*PageMarkers
Print*PaperFormat
Print*PrintChapter
Print*PrintCollapsed
Print*PrinterCommand
Print*TableOfContents
Print*Word*ImageFormat
Print*Word*UserDefinedHeight
Print*Word*UserDefinedWidth
System Window State File
When the system file is saved, a second file is saved as well; the system window state file. This file contains information about window positions and sizes. If an editor window is not open when the system file is saved, the last known position and size of that window is saved instead. While the system file uses the .sdt extension, the system window state file uses the .sdt.state extension.
If the Organizer finds a system window state file when opening a system file, the positions and sizes of the Organizer and editor windows are restored to the positions they had when the system file was saved. Note that the editor windows are not restored until they are opened from the Organizer.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |