ohcount: /Users/andy/dev/ohcount/src/sourcefile.h Source File

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

# /Users/andy/dev/ohcount/src/sourcefile.h

Go to the documentation of this file.

    00001 // sourcefile.h written by Mitchell Foral. mitchell<att>caladbolg.net.
    00002 // See COPYING for license information.
    00003
    00004 #ifndef OHCOUNT_SOURCEFILE_H
    00005 #define OHCOUNT_SOURCEFILE_H
    00006
    00007 #include "loc.h"
    00008 #include "parsed_language.h"
    00009
    00016 SourceFile *ohcount_sourcefile_new(const char *filepath);
    00017
    00025 void ohcount_sourcefile_set_diskpath(SourceFile *sourcefile,
    00026                                      const char *diskpath);
    00027
    00034 void ohcount_sourcefile_set_contents(SourceFile *sourcefile,
    00035                                      const char *contents);
    00036
    00043 char *ohcount_sourcefile_get_contents(SourceFile *sourcefile);
    00044
    00050 int ohcount_sourcefile_get_contents_size(SourceFile *sourcefile);
    00051
    00058 void ohcount_sourcefile_set_language(SourceFile *sourcefile,
    00059                                      const char *language);
    00060
    00067 const char *ohcount_sourcefile_get_language(SourceFile *sourcefile);
    00068
    00074 void ohcount_sourcefile_parse(SourceFile *sourcefile);
    00075
    00081 ParsedLanguageList *ohcount_sourcefile_get_parsed_language_list(SourceFile
    00082                                                                 *sourcefile);
    00083
    00091 void ohcount_sourcefile_parse_with_callback(SourceFile *sourcefile,
    00092                                             void (*callback) (const char *,
    00093                                                               const char *, int,
    00094                                                               int, void *),
    00095                                             void *userdata);
    00096
    00104 void ohcount_sourcefile_parse_entities_with_callback(SourceFile *sourcefile,
    00105                                                      void (*callback)
    00106                                                        (const char *,
    00107                                                         const char *, int,
    00108                                                         int, void *),
    00109                                                      void *userdata);
    00110
    00118 LicenseList *ohcount_sourcefile_get_license_list(SourceFile *sourcefile);
    00119
    00128 LocList *ohcount_sourcefile_get_loc_list(SourceFile *sourcefile);
    00129
    00139 LocDeltaList *ohcount_sourcefile_diff(SourceFile *from, SourceFile *to);
    00140
    00153 LocDelta *ohcount_sourcefile_calc_loc_delta(SourceFile *from,
    00154                                             const char *language,
    00155                                             SourceFile *to);
    00156
    00164 void ohcount_sourcefile_set_filenames(SourceFile *sourcefile,
    00165                                       char **filenames);
    00166
    00176 char **ohcount_sourcefile_get_filenames(SourceFile *sourcefile);
    00177
    00182 void ohcount_sourcefile_free(SourceFile *sourcefile);
    00183
    00190 SourceFileList *ohcount_sourcefile_list_new();
    00191
    00198 void ohcount_sourcefile_list_add_file(SourceFileList *list,
    00199                                           const char *filepath);
    00200
    00207 void ohcount_sourcefile_list_add_directory(SourceFileList *list,
    00208                                            const char *directory);
    00209
    00215 LocList *ohcount_sourcefile_list_analyze_languages(SourceFileList *list);
    00216
    00221 void ohcount_sourcefile_list_free(SourceFileList *list);
    00222
    00223 #endif