IBM
Contents Index Previous Next



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:

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:

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.

Caution!

The sections that describe the diagram and document structure should not be modified by the user unless absolutely necessary. Modifying these sections in a way that errors or inconsistencies are introduced may corrupt the system 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.

Example 4

The DRIVES section of the system file looks like this:

[DRIVES]
C:\TEMP /tmp
\\MYHOST\STORAGE /home/user

The 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=Value

The 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

Option Default Corresponding Preference

AbsolutePath

false

Organizer*AbsolutePath

SourceDirectory

""

Organizer*SourceDirectory

TargetDirectory

""

Organizer*TargetDirectory

VIEWOPTIONS Section

Option Default Corresponding Preference

Scale

100

SDT*Scale

ShowDashed

true

Organizer*ShowDashed

ShowDependencies

true

Organizer*ShowDependencies

ShowDirectories

true

Organizer*ShowDirectories

ShowFileNames

true

Organizer*ShowFileName

ShowGroups

true

Organizer*ShowGroups

ShowInstances

true

Organizer*ShowInstances

ShowLinkFile

false

Organizer*ShowLinkFile

ShowLinks

true

Organizer*ShowLinks

ShowLongMenus

true

Organizer*ShowLongMenus

ShowPages

false

Organizer*ShowPages

ShowPermissions

true

Organizer*ShowPermissions

ShowSeparators

true

Organizer*ShowSeparators

ShowStatusBar

true

Organizer*Statusbar

ShowSystemFile

true

Organizer*ShowSystemFile

ShowToolBar

true

Organizer*Toolbar

ShowTypeName

false

Organizer*ShowTypeName

ShowVirtuality

true

Organizer*ShowVirtuality

TreeRepresentation

List

Organizer*TreeRepresentation

ANALYSEROPTIONS Section

Option Default Corresponding Preference

AllowImplicitTypeConv

false

Organizer*AllowImplicitTypeConv

ASN1KeywordFile

false

Not available

ASN1KeywordFileName

""

Organizer*ASN1KeywordFileName

ASN1Parameter

false

Not available

CaseSensitiveSDL

false

SDT*CaseSensitive

CoderBufferInSDL


Organizer*CoderBufferInSDL

EchoAnalyzerCommands

false

Organizer*EchoAnalyzerCommands

ErrorLimit

30

Organizer*ErrorLimit

ExpandPR

false

Organizer*ExpandPR

ExpressionLimit

0

Organizer*ExpressionLimit

Filter

false

Organizer*FilterCommand

FilterCommand

""

Organizer*FilterCommand

IgnoreHidden

true

Not available

IncludeOptionalFields

false

Organizer*IncludeOptionalFields

InstanceFile

false

Not available

MacroExpansion

false

Organizer*MacroExpansion

MissingAnswerValuesControl

true

Organizer*MissingAnswerValuesControl

MissingElseControl

true

Organizer*MissingElseControl

ParameterMismatchControl

true

Organizer*ParameterMismatchControl

ExternalTypeFreeControl

true

Organizer*ExternalTypeFreeControl

OptionalParamControl

true

Organizer*OptionalParamControl

OutputControl

true

Organizer*OutputControl

ReferenceControl

true

Organizer*ReferenceControl

SemanticControl

true

Organizer*SemanticControl

SyntaxControl

true

Organizer*SyntaxControl

TerminateAnalyzer

false

Organizer*TerminateAnalyzer

TrailingParamControl

true

Organizer*TrailingParamControl

UpperCase

false

Organizer*UpperCase

UsageControl

true

Organizer*UsageControl

XRef

true

Organizer*XRef

CPP2SDLOPTIONS Section, optional section which can be used in batch mode

Option Default Corresponding Preference

InputLanguageC

false

Not available

InputLanguageCpp

true

Not available

InputLanguageMicrosoft

false

Not available

InputLanguageGNU

false

Not available

RTTI

false

Not available

RecognizeSDLsorts

false

Not available

ObjectSlicing

false

Not available

Preprocessor

""

Not available

UsePreprocessorOptions

false

Not available

PreprocessorOptions

""

Not available

PtrPrefix

ptr_

Not available

KeywordPrefix

keyword_

Not available

ArrPrefix

arr_

Not available

IncompletePrefix

incomplete_

Not available

TplPrefix

tpl_

Not available

UscoreSuffix

uscore

Not available

NoAbsolutePath

false

Not available

GenerateCPPTypes

false

Not available

OptimizeClassPointers

false

Not available

MAKEOPTIONS Section

Option Default Corresponding Preference

Capitalization

AsDefined

Organizer*Capitalisation

CCompilerDriver

false

Not available

CompileAndLink

true

Organizer*CompileAndLink

FileNamePrefix

""

Organizer*FileNamePrefix

GenerateASN1Coder

false

Organizer*GenerateASN1Coder

GenerateCode

true

Organizer*GenerateCode

GenerateEnvFunctions

false

Organizer*GenerateEnvFunctions

GenerateEnvHeader

false

Organizer*GenerateEnvHeader

GenerateSDLCoder

false

Organizer*GenerateSDLCoder

GenerateSignalNumbers

false

Organizer*GenerateSignalNumbers

Kernel

"SCTADEBCOM"

Organizer*Kernel

MakefileMode

Generate

Organizer*MakefileMode

PrefixType

Full

Organizer*PrefixType

Separation

No

Organizer*Separation

StandardKernel

true

Organizer*StandardKernel

TargetLanguage

Cbasic

Organizer*TargetLanguage

UserKernel

""

Organizer*UserKernel

UserMakefile

""

Organizer*UserMakefile

UserTemplate

""

Organizer*UserTemplate

XCodeGenerator

X

Organizer*XCodeGenerator

PRINTOPTIONS Section

Option Default Corresponding Preference

BackwardReferences

true

Print*BackwardReferences

BlackAndWhite

false

Print*BlackAndWhite

DestinationFormat

PSFile

Print*DestinationFormat

FirstPageNo

1

Not available

FooterFile

""

Print*FooterFile

ForwardReferences

true

Print*ForwardReferences

FrameMakerCommand

"imaker"

Print*FrameMakerCommand

HeaderFile

""

Print*HeaderFile

MarginLeft

100

Print*MarginLeft

MarginLower

250

Print*MarginLower

MarginRight

100

Print*MarginRight

MarginUpper

420

Print*MarginUpper

OnlyChaptersInTOC

false

Print*OnlyChaptersInTOC

OrganizerView

true

Print*OrganizerView

PageMarkers

false

Print*PageMarkers

PaperFormat

A4

Print*PaperFormat

PrintChapter

true

Print*PrintChapter

PrintCollapsed

true

Print*PrintCollapsed

PrinterCommand

"lpr -h -r"

Print*PrinterCommand

PrinterFile

""

Not available

PrintFrom


Not available

PrintTo


Not available

PrintToFile

true

Not available

TableOfContents

false

Print*TableOfContents

WordImageFormat

NormalDot

Print*Word*ImageFormat

WordUserDefinedHeight

2470

Print*Word*UserDefinedHeight

WordUserDefinedWidth

2470

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
Contents Index Previous Next