25.01.2015 Views

Using Caché Objects - InterSystems Documentation

Using Caché Objects - InterSystems Documentation

Using Caché Objects - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Caché</strong> Classes<br />

• Class Parameters—values that customize the behavior of a class at compile time, typically<br />

through the use of method generators.<br />

4.1 Naming Conventions<br />

Class and class members (referred to as identifiers) follow specific naming conventions.<br />

These are detailed in this section.<br />

4.1.1 General Identifier Rules<br />

Every identifier must be unique within its context (i.e., no two classes can have the same<br />

name).<br />

The maximum length of the various class identifiers are listed in the following table:<br />

Class Identifier Lengths<br />

Identifier<br />

Package Name<br />

Full Class Name<br />

Class Name<br />

Member Name<br />

Limits<br />

Each package name in a project must be different somewhere in<br />

the first 189 characters from all other packages in the namespace.<br />

The full name of a class includes the package name, the class<br />

name, and the period separating the package name from the<br />

class name. It must be shorter than 220 characters.<br />

The length of a class name is not specified. For a given package<br />

name, the maximum length can be inferred from the preceding<br />

rules. Each class name within a package must be uniquely<br />

distinguished from the others in the first 60 characters.<br />

The name of a class member (property name, method name,<br />

index name, and so on) cannot be longer than 31 characters.<br />

Identifiers preserve case: you must exactly match the case of a name; at the same time, two<br />

classes cannot have names that differ only in case. For example, the identifiers “id1” and<br />

“ID1” are considered identical for purposes of uniqueness.<br />

Identifiers must start with an alphabetic character, though they may contain numeric characters<br />

after the first position. Identifiers cannot contain spaces or punctuation characters with the<br />

exception of package names which may contain the “.” character. On a Unicode system,<br />

identifiers may contain Unicode characters.<br />

26 <strong>Using</strong> <strong>Caché</strong> <strong>Objects</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!