Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
blast_util.h
Go to the documentation of this file.
1 /*
2 ** Copyright 2014-2016 The Earlham Institute
3 **
4 ** Licensed under the Apache License, Version 2.0 (the "License");
5 ** you may not use this file except in compliance with the License.
6 ** You may obtain a copy of the License at
7 **
8 ** http://www.apache.org/licenses/LICENSE-2.0
9 **
10 ** Unless required by applicable law or agreed to in writing, software
11 ** distributed under the License is distributed on an "AS IS" BASIS,
12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ** See the License for the specific language governing permissions and
14 ** limitations under the License.
15 */
16 
22 /*
23  * blast_util.h
24  *
25  * Created on: 19 Oct 2016
26  * Author: billy
27  */
28 
29 #ifndef SERVER_SRC_SERVICES_BLAST_INCLUDE_BLAST_UTIL_H_
30 #define SERVER_SRC_SERVICES_BLAST_INCLUDE_BLAST_UTIL_H_
31 
32 
33 #include "args_processor.hpp"
34 #include "blast_service_api.h"
35 #include "byte_buffer.h"
36 #include "parameter_set.h"
37 
38 
39 #ifdef __cplusplus
40 extern "C"
41 {
42 #endif
43 
44 
59 BLAST_SERVICE_LOCAL bool GetAndAddBlastArgs (const ParameterSet *param_set_p, const char *param_name_s, bool required_flag, ArgsProcessor *ap_p);
60 
61 
75 BLAST_SERVICE_LOCAL bool AddBlastArgs (const Parameter *param_p, ArgsProcessor *ap_p);
76 
77 
90 BLAST_SERVICE_LOCAL bool AddArg (const char *arg_s, ArgsProcessor *ap_p, bool hyphen_flag);
91 
92 
93 
106 BLAST_SERVICE_LOCAL bool AddArgsPair (const char *key_s, const char *value_s, ArgsProcessor *ap_p);
107 
108 
126 BLAST_SERVICE_LOCAL bool AddArgsPairFromIntegerParameter (const ParameterSet *params_p, const char * const param_name_s, const char *key_s, ArgsProcessor *ap_p, const bool unsigned_flag, const bool required_flag);
127 
128 
145 BLAST_SERVICE_LOCAL bool AddArgsPairFromStringParameter (const ParameterSet *params_p, const char * const param_name_s, const char *key_s, ArgsProcessor *ap_p, const bool required_flag);
146 
147 
148 
149 
150 BLAST_SERVICE_LOCAL bool WriteCommandLineToFile (const char *command_line_s, const char *filename_s);
151 
152 
153 BLAST_SERVICE_LOCAL char *GetBlastJobFilename (const char * const prefix_s, const char *job_id_s, const char * const suffix_s);
154 
155 
156 BLAST_SERVICE_LOCAL char *GetBlastJobFilenameByUuid (const char * const prefix_s, const uuid_t id, const char * const suffix_s);
157 
158 
159 #ifdef __cplusplus
160 }
161 #endif
162 
163 
164 #endif /* SERVER_SRC_SERVICES_BLAST_INCLUDE_BLAST_UTIL_H_ */
Parameter
The datatype that stores all of the information about a Parameter.
Definition: parameter.h:121
ArgsProcessor::AddArgsPairFromIntegerParameter
bool AddArgsPairFromIntegerParameter(const ParameterSet *params_p, const char *const param_name_s, const char *key_s, ArgsProcessor *ap_p, const bool unsigned_flag, const bool required_flag)
Get the value of an integer-based Parameter and add it as key-value pair to the command line argument...
ArgsProcessor::AddBlastArgs
bool AddBlastArgs(const Parameter *param_p, ArgsProcessor *ap_p)
Add an argument derived from the current value of a Parameter to an ArgsProcessor.
ArgsProcessor::AddArgsPair
bool AddArgsPair(const char *key_s, const char *value_s, ArgsProcessor *ap_p)
Add a pair of arguments to the command line arguments stored in a ByteBuffer.
parameter_set.h
WriteCommandLineToFile
bool WriteCommandLineToFile(const char *command_line_s, const char *filename_s)
AddArg
bool AddArg(const char *arg_s, ArgsProcessor *ap_p, bool hyphen_flag)
Add the argument to the command line arguments stored in a ByteBuffer.
blast_service_api.h
GetBlastJobFilename
char * GetBlastJobFilename(const char *const prefix_s, const char *job_id_s, const char *const suffix_s)
GetBlastJobFilenameByUuid
char * GetBlastJobFilenameByUuid(const char *const prefix_s, const uuid_t id, const char *const suffix_s)
args_processor.hpp
BLAST_SERVICE_LOCAL
#define BLAST_SERVICE_LOCAL
Definition: blast_service_api.h:48
byte_buffer.h
ArgsProcessor::GetAndAddBlastArgs
bool GetAndAddBlastArgs(const ParameterSet *param_set_p, const char *param_name_s, bool required_flag, ArgsProcessor *ap_p)
Get the named Parameter from a ParameterSet and add it to an ArgsProcessor.
ArgsProcessor::AddArgsPairFromStringParameter
bool AddArgsPairFromStringParameter(const ParameterSet *params_p, const char *const param_name_s, const char *key_s, ArgsProcessor *ap_p, const bool required_flag)
Get the value of an string-based Parameter and add it as key-value pair to the command line arguments...
ParameterSet
A set of Parameters along with an optional name and description.
Definition: parameter_set.h:46
ArgsProcessor
An ArgsProcessor is a class to abstract out how a particular BlastTool stores a value when an argumen...
Definition: args_processor.hpp:46
uuid_t
Definition: windows_uuid.h:43