kim-api  2.1.4-git+v2.1.3-git-1-g7847914a.GNU
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
KIM_Collections.h
Go to the documentation of this file.
1 /* */
2 /* CDDL HEADER START */
3 /* */
4 /* The contents of this file are subject to the terms of the Common */
5 /* Development and Distribution License Version 1.0 (the "License"). */
6 /* */
7 /* You can obtain a copy of the license at */
8 /* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
9 /* specific language governing permissions and limitations under the License. */
10 /* */
11 /* When distributing Covered Code, include this CDDL HEADER in each file and */
12 /* include the License file in a prominent location with the name */
13 /* LICENSE.CDDL. */
14 /* If applicable, add the following below this CDDL HEADER, with the fields */
15 /* enclosed by brackets "[]" replaced with your own identifying information: */
16 /* */
17 /* Portions Copyright (c) [yyyy] [name of copyright owner]. */
18 /* All rights reserved. */
19 /* */
20 /* CDDL HEADER END */
21 /* */
22 
23 /* */
24 /* Copyright (c) 2016--2019, Regents of the University of Minnesota. */
25 /* All rights reserved. */
26 /* */
27 /* Contributors: */
28 /* Ryan S. Elliott */
29 /* */
30 
31 /* */
32 /* Release: This file is part of the kim-api.git repository. */
33 /* */
34 
35 
36 #ifndef KIM_COLLECTIONS_H_
37 #define KIM_COLLECTIONS_H_
38 
39 /* Forward declarations */
40 #ifndef KIM_LOG_VERBOSITY_DEFINED_
41 #define KIM_LOG_VERBOSITY_DEFINED_
42 
48 #endif
49 
55 #ifndef KIM_COLLECTION_DEFINED_
56 #define KIM_COLLECTION_DEFINED_
58 #endif
59 
65 #ifndef KIM_COLLECTION_ITEM_TYPE_DEFINED_
66 #define KIM_COLLECTION_ITEM_TYPE_DEFINED_
68 #endif
69 
70 #ifndef KIM_COLLECTIONS_DEFINED_
71 #define KIM_COLLECTIONS_DEFINED_
72 
80 #endif
81 
90 int KIM_Collections_Create(KIM_Collections ** const collections);
91 
100 void KIM_Collections_Destroy(KIM_Collections ** const collections);
101 
110 int KIM_Collections_GetItemType(KIM_Collections * const collections,
111  char const * const itemName,
112  KIM_CollectionItemType * const itemType);
113 
123  KIM_Collections * const collections,
124  KIM_CollectionItemType const itemType,
125  char const * const itemName,
126  char const ** const fileName,
127  KIM_Collection * const collection);
128 
138  KIM_Collections * const collections,
139  KIM_CollectionItemType const itemType,
140  char const * const itemName,
141  int * const extent);
142 
153  KIM_Collections * const collections,
154  int const index,
155  char const ** const fileName,
156  unsigned int * const fileLength,
157  unsigned char const ** const fileRawData,
158  int * const availableAsString,
159  char const ** const fileString);
160 
170  KIM_Collections * const collections,
171  KIM_CollectionItemType const itemType,
172  int * const extent);
173 
182 int KIM_Collections_GetItemNameByType(KIM_Collections * const collections,
183  int const index,
184  char const ** const itemName);
185 
195  KIM_Collections * const collections,
196  KIM_Collection const collection,
197  KIM_CollectionItemType const itemType,
198  int * const extent);
199 
209  KIM_Collections * const collections,
210  int const index,
211  char const ** const itemName);
212 
224  KIM_Collections * const collections,
225  KIM_Collection const collection,
226  KIM_CollectionItemType const itemType,
227  char const * const itemName,
228  char const ** const fileName);
229 
241  KIM_Collections * const collections,
242  KIM_Collection const collection,
243  KIM_CollectionItemType const itemType,
244  char const * const itemName,
245  int * const extent);
246 
259  KIM_Collections * const collections,
260  int const index,
261  char const ** const fileName,
262  unsigned int * const fileLength,
263  unsigned char const ** const fileRawData,
264  int * const availableAsString,
265  char const ** const fileString);
266 
276  KIM_Collections * const collections,
277  char const ** const projectName,
278  char const ** const semVer);
279 
289  KIM_Collections * const collections,
290  KIM_CollectionItemType const itemType,
291  char const ** const name);
292 
302  KIM_Collections * const collections,
303  char const ** const name,
304  char const ** const value);
305 
315  KIM_Collections * const collections, char const ** const fileName);
316 
326  KIM_Collections * const collections,
327  KIM_Collection const collection,
328  KIM_CollectionItemType const itemType,
329  int * const extent);
330 
339 int KIM_Collections_GetDirectoryName(KIM_Collections * const collections,
340  int const index,
341  char const ** const directoryName);
342 
350 void KIM_Collections_SetLogID(KIM_Collections * const collections,
351  char const * const logID);
352 
361 void KIM_Collections_PushLogVerbosity(KIM_Collections * const collections,
362  KIM_LogVerbosity const logVerbosity);
363 
372 void KIM_Collections_PopLogVerbosity(KIM_Collections * const collections);
373 
374 #endif /* KIM_COLLECTIONS_H_ */
int KIM_Collections_CacheListOfItemMetadataFilesByCollectionAndType(KIM_Collections *const collections, KIM_Collection const collection, KIM_CollectionItemType const itemType, char const *const itemName, int *const extent)
Cache a list of an item's metadata files.
void KIM_Collections_PushLogVerbosity(KIM_Collections *const collections, KIM_LogVerbosity const logVerbosity)
Push a new LogVerbosity onto the Collections object's Log object verbosity stack. ...
int KIM_Collections_CacheListOfDirectoryNames(KIM_Collections *const collections, KIM_Collection const collection, KIM_CollectionItemType const itemType, int *const extent)
Cache a list of directory names where a specific KIM API collection stores library files for a specif...
int KIM_Collections_GetItemMetadataFile(KIM_Collections *const collections, int const index, char const **const fileName, unsigned int *const fileLength, unsigned char const **const fileRawData, int *const availableAsString, char const **const fileString)
Get the name and content of one of an item's metadata files.
int KIM_Collections_GetEnvironmentVariableName(KIM_Collections *const collections, KIM_CollectionItemType const itemType, char const **const name)
Get the names of environment variables that store configuration settings for the KIM::COLLECTION::env...
void KIM_Collections_PopLogVerbosity(KIM_Collections *const collections)
Pop a LogVerbosity from the Collections object's Log object verbosity stack.
int KIM_Collections_GetItemMetadataFileByCollectionAndType(KIM_Collections *const collections, int const index, char const **const fileName, unsigned int *const fileLength, unsigned char const **const fileRawData, int *const availableAsString, char const **const fileString)
Get the name and content of one of an item's metadata files.
int KIM_Collections_GetItemNameByType(KIM_Collections *const collections, int const index, char const **const itemName)
Get the name of an item from the cached list.
An Extensible Enumeration for the Collection's supported by the KIM API.
int KIM_Collections_CacheListOfItemMetadataFiles(KIM_Collections *const collections, KIM_CollectionItemType const itemType, char const *const itemName, int *const extent)
Cache a list of an item's metadata files.
int KIM_Collections_GetItemLibraryFileNameAndCollection(KIM_Collections *const collections, KIM_CollectionItemType const itemType, char const *const itemName, char const **const fileName, KIM_Collection *const collection)
Get the item's library file name and its KIM::Collection.
int KIM_Collections_GetItemType(KIM_Collections *const collections, char const *const itemName, KIM_CollectionItemType *const itemType)
Get the KIM::CollectionItemType of the item in the KIM API collections with a specific name...
void KIM_Collections_SetLogID(KIM_Collections *const collections, char const *const logID)
Set the identity of the Log object associated with the Collections object.
void KIM_Collections_GetConfigurationFileName(KIM_Collections *const collections, char const **const fileName)
Get the absolute file and path name of the KIM API user configuration file.
int KIM_Collections_GetDirectoryName(KIM_Collections *const collections, int const index, char const **const directoryName)
Get the name of a directory from the cached list.
int KIM_Collections_CacheListOfItemNamesByType(KIM_Collections *const collections, KIM_CollectionItemType const itemType, int *const extent)
Cache a list of all item names of a specific type in the KIM API collections.
void KIM_Collections_GetProjectNameAndSemVer(KIM_Collections *const collections, char const **const projectName, char const **const semVer)
Get the KIM API project name and full Semantic Version string.
An Extensible Enumeration for the LogVerbosity's supported by the KIM API.
int KIM_Collections_CacheListOfItemNamesByCollectionAndType(KIM_Collections *const collections, KIM_Collection const collection, KIM_CollectionItemType const itemType, int *const extent)
Cache a list of all item names of a specific type in a specific collection.
void KIM_Collections_Destroy(KIM_Collections **const collections)
Destroy a previously Collections::Create'd object.
void KIM_Collections_GetConfigurationFileEnvironmentVariable(KIM_Collections *const collections, char const **const name, char const **const value)
Get the name and value of the environment variable that stores the name of the KIM API user configura...
int KIM_Collections_GetItemLibraryFileNameByCollectionAndType(KIM_Collections *const collections, KIM_Collection const collection, KIM_CollectionItemType const itemType, char const *const itemName, char const **const fileName)
Get the item's library file name.
struct KIM_Collections KIM_Collections
Provides the interface to the KIM API Collections and is meant to be used by simulators.
int KIM_Collections_Create(KIM_Collections **const collections)
Create a new KIM API Collections object.
int KIM_Collections_GetItemNameByCollectionAndType(KIM_Collections *const collections, int const index, char const **const itemName)
Get the name of an item from the cached list.
An Extensible Enumeration for the CollectionItemType's supported by the KIM API.