struct Crl / Crl
Namespace Class
Description
The CRL name space: this contains many typedefs to access the classes
without the prefix 'Crl' or 'crl_'. Further, it has some static
functions not associated with any particular type, but with the library
as such.
For importing the namespace into you own classes, simply inherit from
this class. This class does not have member non-static member functions
nor has the structure any slots.
Kinship
Immediate sub classes: CrlAnyUserData, Object, CrlAnyValue, EdgeArray, Parser, ContextNFA, ContextDFA
Type Aliases
Members
| void | | address_default_user_print_file | | (FILE *, TypeAddress const *, unsigned_t) |
| void | | address_default_user_print_vchar | | (VChar *, TypeAddress const *, unsigned_t) |
| void | | bool_default_user_print_file | | (FILE *, TypeBool const *, unsigned_t) |
| void | | bool_default_user_print_vchar | | (VChar *, TypeBool const *, unsigned_t) |
| ContextDefault * | | context_default | | () |
| void | | enum_default_user_print_file | | (FILE *, TypeEnum const *, signed_t) |
| void | | enum_default_user_print_vchar | | (VChar *, TypeEnum const *, signed_t) |
| void | | float_default_user_print_file | | (FILE *, TypeFloat const *, float_t) |
| void | | float_default_user_print_vchar | | (VChar *, TypeFloat const *, float_t) |
| crl_string2symbol_t | | get_string2symbol | | () |
| crl_string2symbol_t | | get_string2symbol_default | | () |
| crl_user_data_delete_hook_t | | get_user_data_delete_hook | | () |
| void | | gmt_default_user_print_file | | (FILE *, TypeGMT const *, unsigned_t) |
| void | | gmt_default_user_print_vchar | | (VChar *, TypeGMT const *, unsigned_t) |
| void | | identifier_default_user_print_file | | (FILE *, TypeIdentifier const *, char const *) |
| void | | identifier_default_user_print_vchar | | (VChar *, TypeIdentifier const *, char const *) |
| void | | init | | (int &, char ** &) |
| bool | | is_c_identifier | | (char const *) |
| bool | | is_initialised | | () |
| bool | | is_lowcase_identifier | | (char const *) |
| bool | | is_normalised_decimal | | (char const *) |
| symbol_t | | klass_id_to_crl_name | | (int) |
| symbol_t | | klass_id_to_name | | (int) |
| void | | set_handle_foreign_item | | (crl_handle_foreign_item_t) |
| void | | set_string2symbol | | (crl_string2symbol_t) |
| void | | set_user_data_delete_hook | | (crl_user_data_delete_hook_t) |
| void | | signed_default_user_print_file | | (FILE *, TypeSigned const *, signed_t) |
| void | | signed_default_user_print_vchar | | (VChar *, TypeSigned const *, signed_t) |
| symbol_t | | string2symbol | | (char const * c) |
| void | | string_default_user_print_file | | (FILE *, CrlTypeString const *, char const *) |
| void | | string_default_user_print_vchar | | (VChar *, CrlTypeString const *, char const *) |
| void | | symbol_default_user_print_file | | (FILE *, TypeSymbol const *, char const *) |
| void | | symbol_default_user_print_vchar | | (VChar *, TypeSymbol const *, char const *) |
| TypeAny * | | type_any | | () |
| void | | unsigned_default_user_print_file | | (FILE *, TypeUnsigned const *, unsigned_t) |
| void | | unsigned_default_user_print_vchar | | (VChar *, TypeUnsigned const *, unsigned_t) |
Detailed Descriptions
This returns the default context, which is written <*> in CRL2 syntax.
This is the context that defines all values of an attribute for
contexts not mentioned in the CRL file. See
RoutineItem::find_sym (int,symbol_t) for details on context-dependent attributes
in PAG and CRL.
static TypeAny * type_any ()
This returns the type that does not impose any constraints on the
values.
static symbol_t string2symbol (char const * c)
The C function does exist and is called crl_string2symbol(). It is not a
wrapper around this C++ function as usual, but rather the C++ function
is a wrapper that simply invokes crl_string2symbol().
The crl_string2symbol() and, therefore, string2symbol() redirect the
call to a function set via set_string2symbol(). By this, the symbol
table of Crl can synchronised with other symbol tables, so that, for
instance, your application uses only one global symbol table.
The internal default Crl symbol table access function can be queried with
get_string2symbol_default(). The currently used string2symbol function
can be queried with get_string2symbol().
Again, the C equivalent does exist and is called crl_set_string2symbol().
You can invoke this before initialising the library (with init())
to make it use another string2symbol function. By this, you can
synchronise symbol tables.
The crl-library's default string2symbol method is crl_string2symbol() (a macro!).
To get the current string2symbol function, use get_string2symbol().
Returns the current string2symbol() function.
Returns the default string2symbol() function.
Sets a user defined function that is invoked for the user_data of an
object when the corresponding object is deallocated.
Gets the function set by set_user_data_delete_hook().
static void init (int &, char ** &)
| C++: |
void Crl::init (int &, char ** &) |
| C: |
void crl_init (int *, char ** *) |
Initialise this library.
static bool is_initialised ()
| C++: |
bool Crl::is_initialised () |
| C: |
crl_bool_t crl_is_initialised (void) |
Returns whether this library is already initialised.
static symbol_t klass_id_to_crl_name (int)
e.g. CRL_ID_ROUTINE -> "routine"
Returns NULL if there is no representation name in crl or if the set of
representations is ambiguous:
- No representation
CRL_ID_OBJECT, CRL_ID_ITEM
- Ambiguous
CRL_ID_TYPE_ITEM
static symbol_t klass_id_to_name (int)
e.g. CRL_ID_ROUTINE -> "Routine". Always succeeds.
This sets the function that is invoked when the graph printing
finds a foreign item. A foreign item is one that is not part
of the graph you are currently printing. Links between graphs
may result when combining e.g. graphs from different compilation
units (like object files).
The handler set by this function adjust the foreign item or take action
to copy it into the other graph. You can also decide to print something
to make a good CRL file. To do this, return non-NULL: the caller will
then print the returned item into the corresponding stream.
The callback's prototype can be found in crl2/decls.h. It gets the
item and the graph it is printed into (which is different to the
item's own graph (because it is 'foreign')). It returns the item to
be printed or NULL. You may return a new item, too: the item will
be ref'ed and unref'ed by the caller and, therefore, correctly deallocated
when there was no reference to it.
The default function prints datas and routines without modification,
because these handle the switch from public to external automatically.
If the data/routine is not external or public, an error is signalled by
the default function. The default function also signals an error if
the foreign item is neither routine nor data. In all cases of an error,
the CRL file will be broken due to missing symbol definitions.
You should invoke this function after init().
static bool is_c_identifier (char const *)
| C++: |
bool Crl::is_c_identifier (char const *) |
| C: |
crl_bool_t crl_is_c_identifier (char const *) |
returns where s is a C-style identifier
static bool is_lowcase_identifier (char const *)
| C++: |
bool Crl::is_lowcase_identifier (char const *) |
| C: |
crl_bool_t crl_is_lowcase_identifier (char const *) |
returns where s is a C-style identifier starting
with a lowercase letter.
static bool is_normalised_decimal (char const *)
| C++: |
bool Crl::is_normalised_decimal (char const *) |
| C: |
crl_bool_t crl_is_normalised_decimal (char const *) |
returns where s is a C-style decimal number that
cannot be misinterpreted as an octal number and
that fits into signed_t. Further, it must
not contain any underbars (all Erwin strtol() equivalents
(crl_erwin_strtol/ul/ll/ull) have an extension to ignore
underbars in numbers, just like the Perl language allows).
static void string_default_user_print_vchar (VChar *, CrlTypeString const *, char const *)
| C++: |
void Crl::string_default_user_print_vchar (CrlVChar *, CrlTypeString const *, char const *) |
| C: |
void crl_string_default_user_print_vchar (CrlVChar *, crl_type_string_t const *, char const *) |
static void string_default_user_print_file (FILE *, CrlTypeString const *, char const *)
| C++: |
void Crl::string_default_user_print_file (FILE *, CrlTypeString const *, char const *) |
| C: |
void crl_string_default_user_print_file (FILE *, crl_type_string_t const *, char const *) |
static void symbol_default_user_print_vchar (VChar *, TypeSymbol const *, char const *)
| C++: |
void Crl::symbol_default_user_print_vchar (CrlVChar *, CrlTypeSymbol const *, char const *) |
| C: |
void crl_symbol_default_user_print_vchar (CrlVChar *, crl_type_symbol_t const *, char const *) |
static void symbol_default_user_print_file (FILE *, TypeSymbol const *, char const *)
| C++: |
void Crl::symbol_default_user_print_file (FILE *, CrlTypeSymbol const *, char const *) |
| C: |
void crl_symbol_default_user_print_file (FILE *, crl_type_symbol_t const *, char const *) |
static void identifier_default_user_print_vchar (VChar *, TypeIdentifier const *, char const *)
| C++: |
void Crl::identifier_default_user_print_vchar (CrlVChar *, CrlTypeIdentifier const *, char const *) |
| C: |
void crl_identifier_default_user_print_vchar (CrlVChar *, crl_type_identifier_t const *, char const *) |
static void identifier_default_user_print_file (FILE *, TypeIdentifier const *, char const *)
static void unsigned_default_user_print_vchar (VChar *, TypeUnsigned const *, unsigned_t)
| C++: |
void Crl::unsigned_default_user_print_vchar (CrlVChar *, CrlTypeUnsigned const *, crl_unsigned_t) |
| C: |
void crl_unsigned_default_user_print_vchar (CrlVChar *, crl_type_unsigned_t const *, crl_unsigned_t) |
static void unsigned_default_user_print_file (FILE *, TypeUnsigned const *, unsigned_t)
| C++: |
void Crl::unsigned_default_user_print_file (FILE *, CrlTypeUnsigned const *, crl_unsigned_t) |
| C: |
void crl_unsigned_default_user_print_file (FILE *, crl_type_unsigned_t const *, crl_unsigned_t) |
static void gmt_default_user_print_vchar (VChar *, TypeGMT const *, unsigned_t)
| C++: |
void Crl::gmt_default_user_print_vchar (CrlVChar *, CrlTypeGMT const *, crl_unsigned_t) |
| C: |
void crl_gmt_default_user_print_vchar (CrlVChar *, crl_type_gmt_t const *, crl_unsigned_t) |
static void gmt_default_user_print_file (FILE *, TypeGMT const *, unsigned_t)
| C++: |
void Crl::gmt_default_user_print_file (FILE *, CrlTypeGMT const *, crl_unsigned_t) |
| C: |
void crl_gmt_default_user_print_file (FILE *, crl_type_gmt_t const *, crl_unsigned_t) |
static void bool_default_user_print_vchar (VChar *, TypeBool const *, unsigned_t)
| C++: |
void Crl::bool_default_user_print_vchar (CrlVChar *, CrlTypeBool const *, crl_unsigned_t) |
| C: |
void crl_bool_default_user_print_vchar (CrlVChar *, crl_type_bool_t const *, crl_unsigned_t) |
static void bool_default_user_print_file (FILE *, TypeBool const *, unsigned_t)
| C++: |
void Crl::bool_default_user_print_file (FILE *, CrlTypeBool const *, crl_unsigned_t) |
| C: |
void crl_bool_default_user_print_file (FILE *, crl_type_bool_t const *, crl_unsigned_t) |
static void address_default_user_print_vchar (VChar *, TypeAddress const *, unsigned_t)
| C++: |
void Crl::address_default_user_print_vchar (CrlVChar *, CrlTypeAddress const *, crl_unsigned_t) |
| C: |
void crl_address_default_user_print_vchar (CrlVChar *, crl_type_address_t const *, crl_unsigned_t) |
static void address_default_user_print_file (FILE *, TypeAddress const *, unsigned_t)
| C++: |
void Crl::address_default_user_print_file (FILE *, CrlTypeAddress const *, crl_unsigned_t) |
| C: |
void crl_address_default_user_print_file (FILE *, crl_type_address_t const *, crl_unsigned_t) |
static void enum_default_user_print_vchar (VChar *