ape  0.5.0
Audio Programming Environment
Project.h
Go to the documentation of this file.
1 /*************************************************************************************
2 
3  Audio Programming Environment - Audio Plugin - v. 0.3.0.
4 
5  Copyright (C) 2014 Janus Lynggaard Thorborg [LightBridge Studios]
6 
7  This program is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>.
19 
20  See \licenses\ for additional details on licenses associated with this program.
21 
22  **************************************************************************************
23 
24  file:Project.h
25 
26  Defines the common POD-struct CProject, that is used for transferring information
27  about current project, compilers, settings and state around.
28  Is also the C-interface between the compiler and this program.
29 
30 *************************************************************************************/
31 
32 #ifndef APE_PROJECT_H
33  #define APE_PROJECT_H
34 
35  #include "SharedInterface.h"
36 
37  struct APE_Project
38  {
39  /*
40  Interface to the API
41  Not to be deleted!
42  */
43  struct APE_SharedInterface * iface;
44  /*
45  Version of the engine of this program
46  */
47  unsigned engineVersion;
48  /*
49  Special case: Program consists of a single source strings, instead of files.
50  If this is set to non-zero, sourceString will point to a valid string that
51  contains the source. If not, sourceString is not valid.
52  */
53  unsigned isSingleString;
54  /*
55  amount of files contained in the array files
56  */
57  unsigned int nFiles;
58  /*
59  an instance-unique ID for this current project
60  */
61  unsigned int uniqueID;
62  /*
63  If isSingleString is set, this points to valid source.
64  */
65  const char * sourceString;
66  /*
67  Array of files in this project (source files)
68  */
69  char * const * files;
70  /*
71  Name of this project
72  */
73  const char * projectName;
74  /*
75  Directory of the project. Directory + \ + projectName must yield the valid path.
76  */
77  const char * workingDirectory;
78  /*
79  Root directory of ape
80  */
81  const char * rootPath;
82  /*
83  Compiler specific arguments and switches (like commandline arguments).
84  Intended that it be set in the config.
85  */
86  const char * arguments;
87  /*
88  The compiler or runtime can keep it's instance data here.
89  */
90  void * userData;
91 
95  const int * traceLines;
99  size_t numTraceLines;
100 
102 
106  int floatPrecision;
107 
112 
118  };
119 
120  #ifdef __cplusplus
121 
122  namespace ape
123  {
124  using Project = APE_Project;
125  };
126  #endif
127 #endif
APE_Project
Definition: Project.h:36
APE_Project::files
char *const * files
Definition: Project.h:96
APE_Project::workingDirectory
const char * workingDirectory
Definition: Project.h:104
APE_Project::isSingleString
unsigned isSingleString
Definition: Project.h:80
APE_Project::userData
void * userData
Definition: Project.h:117
APE_Project::iface
struct APE_SharedInterface * iface
Definition: Project.h:70
APE_Project::traceLines
const int * traceLines
Logical source lines that should be traced
Definition: Project.h:122
ape
Definition: audiofile.h:7
APE_Project::projectName
const char * projectName
Definition: Project.h:100
APE_SharedInterface
Definition: SharedInterface.h:159
APE_Optimization_Level
APE_Optimization_Level
Definition: SharedInterface.h:63
APE_Project::nativeVectorBitWidth
int nativeVectorBitWidth
The amount of bits in the native SIMD CPU registers with a complete arithmetic instruction set....
Definition: Project.h:144
APE_Project::arguments
const char * arguments
Definition: Project.h:113
APE_Project::nFiles
unsigned int nFiles
Definition: Project.h:84
APE_Project::uniqueID
unsigned int uniqueID
Definition: Project.h:88
APE_Project::reportDiagnostic
APE_ErrorFunc reportDiagnostic
Definition: Project.h:128
APE_Project::numTraceLines
size_t numTraceLines
^ number of trace lines
Definition: Project.h:126
APE_Project::floatPrecision
int floatPrecision
Suggestion to carry out floating-point operations with approximately this amount of bits.
Definition: Project.h:133
SharedInterface.h
APE_Project::sourceString
const char * sourceString
Definition: Project.h:92
APE_Project::engineVersion
unsigned engineVersion
Definition: Project.h:74
APE_Project::optimizationLevel
APE_Optimization_Level optimizationLevel
Suggested "optimization" level.
Definition: Project.h:138
APE_Project::rootPath
const char * rootPath
Definition: Project.h:108
APE_ErrorFunc
void(APE_API * APE_ErrorFunc)(APE_Project *, APE_Diagnostic, const char *)
Definition: APE.h:90