Method | Description | |
---|---|---|
AddCustomField ( string className, string fieldName, CellarPropertyType fieldType, int destinationClass ) : int |
Add a user-defined custom field. If 'fieldType' is a basic property type, then 'destinationClass' is ignored. If 'fieldType' is an object type (owning/reference and atomic/collection/sequence) property, then 'destinationClass' must match a class in the model. |
|
AddCustomField ( string className, string fieldName, CellarPropertyType fieldType, int destinationClass, string fieldHelp, int fieldWs, System.Guid fieldListRoot ) : int | ||
AddVirtualProp ( string bstrClass, string bstrField, int luFlid, int type ) : void |
Note a virtual property. The type is the simulated type, one of the original types, NOT with the virtual bit OR'd in.
|
|
ClassExists ( string className ) : bool | ||
DeleteCustomField ( int flid ) : void | ||
FieldExists ( int flid ) : bool | ||
FieldExists ( int classId, string fieldName, bool includeBaseClasses ) : bool | ||
FieldExists ( string className, string fieldName, bool includeBaseClasses ) : bool | ||
GetAbstract ( int luClid ) : bool |
Indicates whether a class is abstract or concrete.
|
|
GetAllSubclasses ( int clid ) : int[] |
Get all of the subclass Ids, including the given class Id.
|
|
GetAllSubclasses ( int luClid, int cluMax, int &cluOut, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr rgluSubclasses ) : void |
Gets all subclasses of the given class, including itself (which is always the first result in the list, so it can easily be skipped if desired). The list is therefore a complete list of the classes which are valid to store in a property whose signature is the class identified by luClid.
|
|
GetBaseClsId ( int luClid ) : int |
Gets the base class id for a given class.
|
|
GetBaseClsName ( int luClid ) : string |
Gets the name of the base class for a given class.
|
|
GetClassId ( string bstrClassName ) : int |
:>:> Reverse access methods :> Get the ID of the class having the specified name. Returns 0 if not found.
|
|
GetClassIds ( ) : int[] |
Gets the list of class identification numbers (in no particular order).
|
|
GetClassIds ( int cclid, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr rgclid ) : void |
Gets the list of class identification numbers (in no particular order). If the array provided is too small, only an arbitrary subset of cclid values is returned. If the array provided is too large, the excess entries are set to zero.
|
|
GetClassName ( int luClid ) : string |
Gets the name of the class.
|
|
GetDirectSubclasses ( int clid ) : int[] |
Get the class Ids of the direct subclasses of the specified class Id.
|
|
GetDirectSubclasses ( int luClid, int cluMax, int &cluOut, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr rgluSubclasses ) : void |
Gets the direct subclasses of the given class (not including itself).
|
|
GetDstClsId ( int luFlid ) : int |
Gets the "Id" of the destination class that corresponds to this field. This is the "Id" of the class that is either owned or referred to by another class.
|
|
GetDstClsName ( int luFlid ) : string |
Gets the name of the destination class that corresponds to this field. This is the name of the class that is either owned or referred to by another class.
|
|
GetFieldHelp ( int luFlid ) : string |
Gets the help string of a field.
|
|
GetFieldId ( string bstrClassName, string bstrFieldName, bool fIncludeBaseClasses ) : int |
Gets the field ID given the class and field names. Returns 0 if not found. Searches superclasses as well as actual class given.
|
|
GetFieldId2 ( int luClid, string bstrFieldName, bool fIncludeBaseClasses ) : int |
This is more efficient if the client already has the classID specified classID and field name. Returns 0 if not found. Searches superclasses as well as actual class given.
|
|
GetFieldIds ( ) : int[] |
Gets the list of field identification numbers (in no particular order).
|
|
GetFieldIds ( int cflid, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr rgflid ) : void |
Gets the list of field identification numbers (in no particular order). If the array provided is too small, only an arbitrary set of cflid values is returned. If the array provided is too large, the excess entries are set to zero.
|
|
GetFieldLabel ( int luFlid ) : string |
Gets the user label of a field.
|
|
GetFieldListRoot ( int luFlid ) : System.Guid | ||
GetFieldName ( int luFlid ) : string |
Gets the name of a field.
|
|
GetFieldNameOrNull ( int luFlid ) : string |
Gets the name of a field.
|
|
GetFieldType ( int luFlid ) : int |
Gets the type of the field. This value indicates if the field is a primitive data type or a MultiStr/MultiTxt value or describes the relationship between two classes (i.e. owning/reference and atomic/collection/sequence). These numeric values are defined in the ~FWROOT\src\cellar\lib\CmTypes.h file.
|
|
GetFieldWs ( int luFlid ) : int |
Gets the Ws of the field.
|
|
GetFieldXml ( int luFlid ) : string |
Gets the Xml UI of a field.
|
|
GetFields ( int luClid, bool fIncludeSuperclasses, int grfcpt, int cflidMax, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr rgflid ) : int |
Gets a list of the fields for the specified class. Gets all fields whose types match the specified argument, which should be a combination of the fcpt values defined in CmTypes.h, e.g., to get all owning properties pass kfcptOwningCollection | kfcptOwningAtom | kfcptOwningSequence. Returns E_FAIL if the array is too small. cflidMax 0 may be passed to obtain the required size. Fields of superclasses are also returned, if the relevant flag is true. [Note: The special CmObject fields are not returned, for now, but the plan to include them before too long.]
|
|
GetFields ( int clid, bool includeSuperclasses, int fieldTypes ) : int[] |
Get the field Ids for the specified class, and optionally its superclasses.
|
|
GetIncomingFields ( int clid ) : IEnumerable |
||
GetIncomingFields ( int clid, int fieldTypes ) : IEnumerable |
||
GetOwnClsId ( int luFlid ) : int |
Gets the "Id" value of the class that contains this field.
|
|
GetOwnClsName ( int luFlid ) : string |
Gets the name of the class that contains this field.
|
|
InitXml ( string bstrPathname, bool fClearPrevCache ) : void |
Alternative way to initialize, passing an XML file (like Ling.cm). <class num="int" id="className" base="baseClassName" abstract="true"> <props> <basic num="int" id="FieldName" sig="Boolean/Integer/Time/String/MultiString/MultiUnicode" /> <rel/owning num="int" id="FieldName" card="atomic/seq/col" sig="classname"/> currently doesn't initialize some less essential stuff like help strings and labels. Set fClearPrevCache to false to read in multiple XML files. Enhance JohnT: support attributes to handle these.
|
|
IsCustom ( int flid ) : bool |
Check if the given flid is Custom, or not.
|
|
IsValueType ( CellarPropertyType type ) : bool |
Should return true for value types; but not implemented
|
|
UpdateCustomField ( int flid, string fieldHelp, int fieldWs, string userLabel ) : void | ||
get_IsValidClass ( int luFlid, int luClid ) : bool |
Given a field id and a class id, this returns true it it is legal to store this class of object in the field.
|
|
get_IsVirtual ( int luFlid ) : bool |
|
Method | Description | |
---|---|---|
AddClass ( int clsid, string className, string superclassName, List |
Add some nice fake class information.
|
|
AddField ( int flid, string fieldName, CellarPropertyType cpt, int destClsid ) : void | ||
IsSupportedFieldType ( CellarPropertyType fieldType ) : bool |
public AddCustomField ( string className, string fieldName, CellarPropertyType fieldType, int destinationClass ) : int | ||
className | string | Class that gets the new custom field. |
fieldName | string | Field name for the custom field. |
fieldType | CellarPropertyType | Data type for the custom field. |
destinationClass | int | Class Id for object type custom properties |
return | int |
public AddCustomField ( string className, string fieldName, CellarPropertyType fieldType, int destinationClass, string fieldHelp, int fieldWs, System.Guid fieldListRoot ) : int | ||
className | string | |
fieldName | string | |
fieldType | CellarPropertyType | |
destinationClass | int | |
fieldHelp | string | |
fieldWs | int | |
fieldListRoot | System.Guid | |
return | int |
public AddVirtualProp ( string bstrClass, string bstrField, int luFlid, int type ) : void | ||
bstrClass | string | |
bstrField | string | |
luFlid | int | |
type | int | |
return | void |
public ClassExists ( string className ) : bool | ||
className | string | |
return | bool |
public FieldExists ( int classId, string fieldName, bool includeBaseClasses ) : bool | ||
classId | int | |
fieldName | string | |
includeBaseClasses | bool | |
return | bool |
public FieldExists ( string className, string fieldName, bool includeBaseClasses ) : bool | ||
className | string | |
fieldName | string | |
includeBaseClasses | bool | |
return | bool |
public GetAbstract ( int luClid ) : bool | ||
luClid | int | Class identification number. In the database, this corresponds to "Id" /// column in the Class$ table. |
return | bool |
public GetAllSubclasses ( int clid ) : int[] | ||
clid | int | Class Id to get subclass Ids of. |
return | int[] |
public GetAllSubclasses ( int luClid, int cluMax, int &cluOut, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr rgluSubclasses ) : void | ||
luClid | int | |
cluMax | int | |
cluOut | int | |
rgluSubclasses | SIL.FieldWorks.Common.COMInterfaces.ArrayPtr | |
return | void |
public GetBaseClsId ( int luClid ) : int | ||
luClid | int | Class identification number. In the database, this corresponds to "Id" /// column in the Class$ table. |
return | int |
public GetBaseClsName ( int luClid ) : string | ||
luClid | int | Class identification number. In the database, this corresponds to "Id" /// column in the Class$ table. |
return | string |
public GetClassId ( string bstrClassName ) : int | ||
bstrClassName | string | |
return | int |
public GetClassIds ( int cclid, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr rgclid ) : void | ||
cclid | int | The size of the output array. |
rgclid | SIL.FieldWorks.Common.COMInterfaces.ArrayPtr | An integer array for returning the class identification numbers. |
return | void |
public GetClassName ( int luClid ) : string | ||
luClid | int | Class identification number. In the database, this corresponds to "Id" /// column in the Class$ table. |
return | string |
public GetDirectSubclasses ( int clid ) : int[] | ||
clid | int | Class Id to get the subclass Ids of. |
return | int[] |
public GetDirectSubclasses ( int luClid, int cluMax, int &cluOut, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr rgluSubclasses ) : void | ||
luClid | int | |
cluMax | int | |
cluOut | int | |
rgluSubclasses | SIL.FieldWorks.Common.COMInterfaces.ArrayPtr | |
return | void |
public GetDstClsId ( int luFlid ) : int | ||
luFlid | int | Field identification number. In the database, this corresponds to the "Id" /// column in the Field$ table. |
return | int |
public GetDstClsName ( int luFlid ) : string | ||
luFlid | int | Field identification number. In the database, this corresponds to the "Id" /// column in the Field$ table. |
return | string |
public GetFieldHelp ( int luFlid ) : string | ||
luFlid | int | Field identification number. In the database, this corresponds to the "Id" /// column in the Field$ table. |
return | string |
public GetFieldId ( string bstrClassName, string bstrFieldName, bool fIncludeBaseClasses ) : int | ||
bstrClassName | string | |
bstrFieldName | string | |
fIncludeBaseClasses | bool | |
return | int |
public GetFieldId2 ( int luClid, string bstrFieldName, bool fIncludeBaseClasses ) : int | ||
luClid | int | |
bstrFieldName | string | |
fIncludeBaseClasses | bool | |
return | int |
public GetFieldIds ( int cflid, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr rgflid ) : void | ||
cflid | int | The size of the output array. |
rgflid | SIL.FieldWorks.Common.COMInterfaces.ArrayPtr | An integer array for returning the field identification numbers. |
return | void |
public GetFieldLabel ( int luFlid ) : string | ||
luFlid | int | Field identification number. In the database, this corresponds to the "Id" /// column in the Field$ table. |
return | string |
public GetFieldListRoot ( int luFlid ) : System.Guid | ||
luFlid | int | |
return | System.Guid |
public GetFieldName ( int luFlid ) : string | ||
luFlid | int | Field identification number. In the database, this corresponds to the "Id" /// column in the Field$ table. |
return | string |
public GetFieldNameOrNull ( int luFlid ) : string | ||
luFlid | int | Field identification number. In the database, this corresponds to the "Id" /// column in the Field$ table. |
return | string |
public GetFieldType ( int luFlid ) : int | ||
luFlid | int | Field identification number. In the database, this corresponds to the "Id" /// column in the Field$ table. /// Historical note: at one point, the result could include the virtual bit, kcptVirtual, or'd /// with one of the other kcpt values. This caused endless bugs and has been removed. |
return | int |
public GetFieldWs ( int luFlid ) : int | ||
luFlid | int | Field identification number. In the database, this corresponds to the "Id" /// column in the Field$ table. |
return | int |
public GetFieldXml ( int luFlid ) : string | ||
luFlid | int | Field identification number. In the database, this corresponds to the "Id" /// column in the Field$ table. |
return | string |
public GetFields ( int luClid, bool fIncludeSuperclasses, int grfcpt, int cflidMax, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr rgflid ) : int | ||
luClid | int | |
fIncludeSuperclasses | bool | |
grfcpt | int | |
cflidMax | int | |
rgflid | SIL.FieldWorks.Common.COMInterfaces.ArrayPtr | |
return | int |
public GetFields ( int clid, bool includeSuperclasses, int fieldTypes ) : int[] | ||
clid | int | Class identification number. |
includeSuperclasses | bool | 'True' to also get superclass fields. |
fieldTypes | int | /// Gets all fields whose types match the specified argument, /// which should be a combination of the fcpt values defined in CmTypes.h, e.g., /// to get all owning properties pass kfcptOwningCollection | kfcptOwningAtom | kfcptOwningSequence. /// |
return | int[] |
public GetIncomingFields ( int clid ) : IEnumerable |
||
clid | int | |
return | IEnumerable |
public GetIncomingFields ( int clid, int fieldTypes ) : IEnumerable |
||
clid | int | |
fieldTypes | int | |
return | IEnumerable |
public GetOwnClsId ( int luFlid ) : int | ||
luFlid | int | Field identification number. In the database, this corresponds to the "Id" /// column in the Field$ table. |
return | int |
public GetOwnClsName ( int luFlid ) : string | ||
luFlid | int | Field identification number. In the database, this corresponds to the "Id" /// column in the Field$ table. |
return | string |
public InitXml ( string bstrPathname, bool fClearPrevCache ) : void | ||
bstrPathname | string | |
fClearPrevCache | bool | |
return | void |
public IsCustom ( int flid ) : bool | ||
flid | int | Field identifier to check. |
return | bool |
public IsValueType ( CellarPropertyType type ) : bool | ||
type | CellarPropertyType | |
return | bool |
public UpdateCustomField ( int flid, string fieldHelp, int fieldWs, string userLabel ) : void | ||
flid | int | |
fieldHelp | string | |
fieldWs | int | |
userLabel | string | |
return | void |
public get_IsValidClass ( int luFlid, int luClid ) : bool | ||
luFlid | int | Field identification number. |
luClid | int | Class identification number. |
return | bool |