uComment;
struct CFCFunction;
struct CFCMethod;
struct CFCVariable;
struct CFCFileSpec;
struct CFCJson;
/** Return true if the string is a valid class name.
*/
int
CFCClass_validate_class_name(const
ss *self);
/** Read host-specific data for the class from a JSON hash.
*/
void
CFCClass_read_host_data_json(CFCClass *self, struct CFCJson *hash,
const char *path);
/**
CFCJSON
#define H_CFCJSON
#ifdef __cplusplus
extern "C" {
#endif
#define CFCJSON_STRING 1
#define CFCJSON_HASH 2
#define CFCJSON_NULL 3
#define CFCJSON_BOOL 4
typedef struct CFCJson CFCJson;
CFCJson*
CFCJson_parse(const char *json);
void
CFCJson_destroy(CFCJson *self);
int
CFCJson_get_type(CFCJson *self);
const char*
CFCJson_get_string(CFCJson *self);
int
CFCJson_get_bool(CFCJson *se
lf);
size_t
CFCJson_get_num_children(CFCJson *self);
CFCJson**
CFCJson_get_children(CFCJson *self);
CFCJson*
CFCJson_find_hash_elem(CFCJson *self, const char *key);
#ifdef __cplusplus
}
#endif
#e
CFCMethod;
struct CFCType;
struct CFCClass;
struct CFCParamList;
struct CFCDocuComment;
struct CFCJson;
/**
* @param exposure See Clownfish::CFC::Model::Symbol. Defaults to "parcel"
* if not suppl
method);
/** Read host-specific data for the method from a JSON hash.
*/
void
CFCMethod_read_host_data_json(CFCMethod *self, struct CFCJson *hash,
const char *path);
/
y *self);
/** Read host-specific data for included parcels.
*/
void
CFCHierarchy_read_host_data_json(CFCHierarchy *self, const char *host_lang);
/** Visit all File objects in the hierarchy. If a p
modified.
*/
int
CFCHierarchy_propagate_modified(CFCHierarchy *self, int modified);
/** Write a JSON files with statistics about the class hierarchy. At the
* moment, this file is empty. It is only
l*
CFCParcel_new_from_file(struct CFCFileSpec *file_spec);
CFCParcel*
CFCParcel_new_from_json(const char *json, struct CFCFileSpec *file_spec);
CFCParcel*
CFCParcel_init(CFCParcel *self, const char
Parcel *parcel);
/** Read host-specific data for an included parcel from a JSON file.
*/
void
CFCParcel_read_host_data_json(CFCParcel *self, const char *host_lang);
void
CFCParcel_add_struct_sym(CF
data(CFCBindClass *self);
/** Return host-specific data for the class as JSON fragment.
*/
char*
CFCBindClass_host_data_json(CFCBindClass *self);
#ifdef __cplusplus
}
#endif
#endif /* H_CFCBINDCLA
struct CFCClass *klass);
/** Return a JSON fragment for method data specified by the host bindings
* (alias or excluded).
*/
char*
CFCBindMeth_host_data_json(struct CFCMethod *method);
#ifdef __c
archy->add_include_dir($include_dir);
}
$hierarchy->build;
$hierarchy->read_host_data_json;
# Process all Binding classes in buildlib.
local @INC = ( @INC, '.' );
my $pm_filep
$cfh_filepaths = $self->_cfh_filepaths;
my $log_filepath = catfile( $AUTOGEN_DIR, 'hierarchy.json' );
# Don't bother parsing Clownfish files if everything's up to date.
return
if
arcels => $module->{parcels},
);
}
$core_binding->write_host_data_json($inc_dir);
unless ($IS_CPAN_DIST) {
print "Writing POD...\n";
my
e the copied assets.
rmtree($_) for values %to_copy;
unlink("META.yml");
unlink("META.json");
move( "MANIFEST.bak", "MANIFEST" ) or die "move() failed: $!";
}
# Strip POD from files i
;
PPCODE:
CFCHierarchy_build(self);
void
read_host_data_json(self)
CFCHierarchy *self;
PPCODE:
CFCHierarchy_read_host_data_json(self, "perl");
int
propagate_modified(self, ...)
CFCHi
elf);
OUTPUT: RETVAL
SV*
_new_from_json(json, file_spec)
const char *json;
CFCFileSpec *file_spec;
CODE:
CFCParcel *self = CFCParcel_new_from_json(json, file_spec);
RETVAL = S_cfcbase
ers(self, dest_dir);
void
write_host_data_json(self, dest_dir)
CFCBindCore *self;
const char *dest_dir;
PPCODE:
CFCBindCore_write_host_data_json(self, dest_dir, "perl");
MODULE = Clownf
r %new_from_json_PARAMS = (
json => undef,
file_spec => undef,
);
sub new_from_json {
my ( $either, %args ) = @_;
verify_args( \%new_from_json_PARAMS, %ar
confess "no subclassing allowed" unless $either eq __PACKAGE__;
return _new_from_json( @args{qw( json file_spec )} );
}
our %new_from_file_PARAMS = (
file_spec => undef,
self, const char *dest_dir);
/* Write host-specific data to a JSON file for each source parcel.
*/
void
CFCBindCore_write_host_data_json(CFCBindCore *self, const char *dest_dir,