An API library which provides the functionality to access, manage and store device topologies. built with OOP concept using C++ language and json libraries for dealing with json files, I chose c++ because it is a powerful language for dealing with pointers and oop and I like coding with it.
- Read a topology from a given JSON file and store it in the memory.
- Write certain topology from the memory to a JSON file.
- Query about which topologies are currently in the memory.
- Delete a given topology from memory.
- Query about which devices are in a given topology.
- Query about which devices are connected to a given netlist node in a given topology.
![Class Hierarchy](https://raw.githubusercontent.com/abdelazizSalah/APITopology/main/screenshots/ClassesHirarichy.png)
- This class creates an object from the Application Manager class which is used to call the API and apply all functionalities
- It contains the main loop of the program which allows the user to select which operation to perform
This class contains the memory of the API as a map of string which is the topology ID as a key of the map and pointer to topology as a value.
-
This class contains the functions of the API :-
- ReadFromJson
- WriteToJson
- getTopologiesInMemoryQuere
- DeleteTopology
- DevicesInTopology
- NodeDevices
-
Each functionality is validated completely in case a topology/node not found for example, etc...
-
This class is used to create topologies and connect devices with each others
-
it has a vector which contains the Devices which are stored and connected in each topology
- This Class is used as an abstract class for 2 other classes which are two terminal devices and three terminal devices
- in which I have implemented the common functions for any device
- This class inherts from the Device class and derives the Resistor class
- The resistor inherits from class Two Terminal device and overrides function printDev() to add resistance as its type
- This class inherts from the Device class and derives the NMOS and PMOS
- The NMOS inherits from class Three Terminal device and overrides function printDev() to add NMOS as its type
- The PMOS inherits from class Three Terminal device and overrides function printDev() to add PMOS as its type
- This class tests each function of class API
git clone https://github.com/abdelazizSalah/APITopology
![2](https://raw.githubusercontent.com/abdelazizSalah/APITopology/main/screenshots/ReadingFromTopo.png)
![3](https://raw.githubusercontent.com/abdelazizSalah/APITopology/main/screenshots/WritingIntoJson.png)
![1](https://raw.githubusercontent.com/abdelazizSalah/APITopology/main/screenshots/CheckingTopologiesInMemory.png)
![4](https://raw.githubusercontent.com/abdelazizSalah/APITopology/main/screenshots/DeletingTopology.png)
![5](https://raw.githubusercontent.com/abdelazizSalah/APITopology/main/screenshots/CheckDevicesInCertainTopology.png)
![6](https://raw.githubusercontent.com/abdelazizSalah/APITopology/main/screenshots/CheckDevicesConnectedToCertainNode.png)
![8](https://raw.githubusercontent.com/abdelazizSalah/APITopology/main/screenshots/AutomaticTestingAllFunctionalities.png)
![8](https://raw.githubusercontent.com/abdelazizSalah/APITopology/main/screenshots/Exitted.png)