kim-api  2.1.2+v2.1.2.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-2.1.2 package. */
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 
82 #endif
83 
92 int KIM_Collections_Create(KIM_Collections ** const collections);
93 
102 void KIM_Collections_Destroy(KIM_Collections ** const collections);
103 
112 int KIM_Collections_GetItemType(KIM_Collections * const collections,
113  char const * const itemName,
114  KIM_CollectionItemType * const itemType);
115 
125  KIM_Collections * const collections,
126  KIM_CollectionItemType const itemType,
127  char const * const itemName,
128  char const ** const fileName,
129  KIM_Collection * const collection);
130 
140  KIM_Collections * const collections,
141  KIM_CollectionItemType const itemType,
142  char const * const itemName,
143  int * const extent);
144 
155  KIM_Collections * const collections,
156  int const index,
157  char const ** const fileName,
158  unsigned int * const fileLength,
159  unsigned char const ** const fileRawData,
160  int * const availableAsString,
161  char const ** const fileString);
162 
172  KIM_Collections * const collections,
173  KIM_CollectionItemType const itemType,
174  int * const extent);
175 
184 int KIM_Collections_GetItemNameByType(KIM_Collections * const collections,
185  int const index,
186  char const ** const itemName);
187 
197  KIM_Collections * const collections,
198  KIM_Collection const collection,
199  KIM_CollectionItemType const itemType,
200  int * const extent);
201 
211  KIM_Collections * const collections,
212  int const index,
213  char const ** const itemName);
214 
226  KIM_Collections * const collections,
227  KIM_Collection const collection,
228  KIM_CollectionItemType const itemType,
229  char const * const itemName,
230  char const ** const fileName);
231 
243  KIM_Collections * const collections,
244  KIM_Collection const collection,
245  KIM_CollectionItemType const itemType,
246  char const * const itemName,
247  int * const extent);
248 
261  KIM_Collections * const collections,
262  int const index,
263  char const ** const fileName,
264  unsigned int * const fileLength,
265  unsigned char const ** const fileRawData,
266  int * const availableAsString,
267  char const ** const fileString);
268 
278  KIM_Collections * const collections,
279  char const ** const projectName,
280  char const ** const semVer);
281 
291  KIM_Collections * const collections,
292  KIM_CollectionItemType const itemType,
293  char const ** const name);
294 
304  KIM_Collections * const collections,
305  char const ** const name,
306  char const ** const value);
307 
317  KIM_Collections * const collections, char const ** const fileName);
318 
328  KIM_Collections * const collections,
329  KIM_Collection const collection,
330  KIM_CollectionItemType const itemType,
331  int * const extent);
332 
341 int KIM_Collections_GetDirectoryName(KIM_Collections * const collections,
342  int const index,
343  char const ** const directoryName);
344 
352 void KIM_Collections_SetLogID(KIM_Collections * const collections,
353  char const * const logID);
354 
363 void KIM_Collections_PushLogVerbosity(KIM_Collections * const collections,
364  KIM_LogVerbosity const logVerbosity);
365 
374 void KIM_Collections_PopLogVerbosity(KIM_Collections * const collections);
375 
376 #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.