kim-api 2.3.0+AppleClang.AppleClang.GNU
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
Loading...
Searching...
No Matches
KIM_Collections.h
Go to the documentation of this file.
1/* */
2/* KIM-API: An API for interatomic models */
3/* Copyright (c) 2013--2022, Regents of the University of Minnesota. */
4/* All rights reserved. */
5/* */
6/* Contributors: */
7/* Ryan S. Elliott */
8/* */
9/* SPDX-License-Identifier: LGPL-2.1-or-later */
10/* */
11/* This library is free software; you can redistribute it and/or */
12/* modify it under the terms of the GNU Lesser General Public */
13/* License as published by the Free Software Foundation; either */
14/* version 2.1 of the License, or (at your option) any later version. */
15/* */
16/* This library is distributed in the hope that it will be useful, */
17/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
18/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU */
19/* Lesser General Public License for more details. */
20/* */
21/* You should have received a copy of the GNU Lesser General Public License */
22/* along with this library; if not, write to the Free Software Foundation, */
23/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
24/* */
25
26/* */
27/* Release: This file is part of the kim-api-2.3.0 package. */
28/* */
29
30
31#ifndef KIM_COLLECTIONS_H_
32#define KIM_COLLECTIONS_H_
33
34/* Forward declarations */
35#ifndef KIM_LOG_VERBOSITY_DEFINED_
36#define KIM_LOG_VERBOSITY_DEFINED_
43#endif
44
50#ifndef KIM_COLLECTION_DEFINED_
51#define KIM_COLLECTION_DEFINED_
53#endif
54
60#ifndef KIM_COLLECTION_ITEM_TYPE_DEFINED_
61#define KIM_COLLECTION_ITEM_TYPE_DEFINED_
63#endif
64
65#ifndef KIM_COLLECTIONS_DEFINED_
66#define KIM_COLLECTIONS_DEFINED_
75#endif
76
85int KIM_Collections_Create(KIM_Collections ** const collections);
86
95void KIM_Collections_Destroy(KIM_Collections ** const collections);
96
106 char const * const itemName,
107 KIM_CollectionItemType * const itemType);
108
118 KIM_Collections * const collections,
119 KIM_CollectionItemType const itemType,
120 char const * const itemName,
121 char const ** const fileName,
122 KIM_Collection * const collection);
123
133 KIM_Collections * const collections,
134 KIM_CollectionItemType const itemType,
135 char const * const itemName,
136 int * const extent);
137
148 KIM_Collections * const collections,
149 int const index,
150 char const ** const fileName,
151 unsigned int * const fileLength,
152 unsigned char const ** const fileRawData,
153 int * const availableAsString,
154 char const ** const fileString);
155
165 KIM_Collections * const collections,
166 KIM_CollectionItemType const itemType,
167 int * const extent);
168
178 int const index,
179 char const ** const itemName);
180
190 KIM_Collections * const collections,
191 KIM_Collection const collection,
192 KIM_CollectionItemType const itemType,
193 int * const extent);
194
204 KIM_Collections * const collections,
205 int const index,
206 char const ** const itemName);
207
219 KIM_Collections * const collections,
220 KIM_Collection const collection,
221 KIM_CollectionItemType const itemType,
222 char const * const itemName,
223 char const ** const fileName);
224
236 KIM_Collections * const collections,
237 KIM_Collection const collection,
238 KIM_CollectionItemType const itemType,
239 char const * const itemName,
240 int * const extent);
241
254 KIM_Collections * const collections,
255 int const index,
256 char const ** const fileName,
257 unsigned int * const fileLength,
258 unsigned char const ** const fileRawData,
259 int * const availableAsString,
260 char const ** const fileString);
261
271 KIM_Collections * const collections,
272 char const ** const projectName,
273 char const ** const semVer);
274
284 KIM_Collections * const collections,
285 KIM_CollectionItemType const itemType,
286 char const ** const name);
287
297 KIM_Collections * const collections,
298 char const ** const name,
299 char const ** const value);
300
310 KIM_Collections * const collections, char const ** const fileName);
311
321 KIM_Collections * const collections,
322 KIM_Collection const collection,
323 KIM_CollectionItemType const itemType,
324 int * const extent);
325
335 int const index,
336 char const ** const directoryName);
337
346 char const * const logID);
347
357 KIM_LogVerbosity const logVerbosity);
358
368
369#endif /* KIM_COLLECTIONS_H_ */
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_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.
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_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_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_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.
void KIM_Collections_Destroy(KIM_Collections **const collections)
Destroy a previously Collections::Create'd object.
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.
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_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_GetItemLibraryFileNameByCollectionAndType(KIM_Collections *const collections, KIM_Collection const collection, KIM_CollectionItemType const itemType, char const *const itemName, char const **const fileName)
KIM::Collections::GetItemLibraryFileNameByCollectionAndType
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.
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_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.
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...
void KIM_Collections_PopLogVerbosity(KIM_Collections *const collections)
Pop a LogVerbosity from the Collections object's Log object verbosity stack.
void KIM_Collections_SetLogID(KIM_Collections *const collections, char const *const logID)
Set the identity of the Log object associated with the Collections object.
int KIM_Collections_CacheListOfItemMetadataFilesByCollectionAndType(KIM_Collections *const collections, KIM_Collection const collection, KIM_CollectionItemType const itemType, char const *const itemName, int *const extent)
KIM::Collections::CacheListOfItemMetadataFilesByCollectionAndType
struct KIM_Collections KIM_Collections
Provides the interface to the KIM API Collections and is meant to be used by simulators.
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.
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_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.
An Extensible Enumeration for the Collection's supported by the KIM API.
An Extensible Enumeration for the CollectionItemType's supported by the KIM API.
An Extensible Enumeration for the LogVerbosity's supported by the KIM API.