{"id":28717185,"url":"https://github.com/amrtamertech/clsstack_library-cpp","last_synced_at":"2025-06-27T15:07:57.381Z","repository":{"id":298016224,"uuid":"998585109","full_name":"AmrTamerTech/clsStack_Library-CPP","owner":"AmrTamerTech","description":"A C++ template-based stack library (clsMyStack) built on top of a queue and doubly linked list, offering classic LIFO operations with extra flexibility.","archived":false,"fork":false,"pushed_at":"2025-06-09T00:04:57.000Z","size":26286,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-09T00:24:54.679Z","etag":null,"topics":["cpp","data-structures","doubly-linked-list","generic-programming","inheritance","oop","stack","templates"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AmrTamerTech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-08T23:14:46.000Z","updated_at":"2025-06-09T00:05:06.000Z","dependencies_parsed_at":"2025-06-09T00:35:07.573Z","dependency_job_id":null,"html_url":"https://github.com/AmrTamerTech/clsStack_Library-CPP","commit_stats":null,"previous_names":["amrtamertech/clsstack_library-cpp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AmrTamerTech/clsStack_Library-CPP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmrTamerTech%2FclsStack_Library-CPP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmrTamerTech%2FclsStack_Library-CPP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmrTamerTech%2FclsStack_Library-CPP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmrTamerTech%2FclsStack_Library-CPP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AmrTamerTech","download_url":"https://codeload.github.com/AmrTamerTech/clsStack_Library-CPP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmrTamerTech%2FclsStack_Library-CPP/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259914931,"owners_count":22931334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","data-structures","doubly-linked-list","generic-programming","inheritance","oop","stack","templates"],"created_at":"2025-06-15T03:13:36.272Z","updated_at":"2025-06-15T03:13:53.560Z","avatar_url":"https://github.com/AmrTamerTech.png","language":"C++","readme":"# 📌 clsStack_Library-cpp\n\nA reusable and extensible C++ stack implementation (`clsMyStack`) built using a doubly linked list via inheritance from a queue class. This generic class supports core stack operations along with additional list-based manipulations.\n\n---\n\n## 🌟 Overview\n\nThe `clsMyStack` class extends `clsMyQueue\u003cT\u003e` and leverages a custom `clsDblLinkedList\u003cT\u003e` for efficient memory usage and flexible data handling. It implements **Last-In-First-Out (LIFO)** behavior and is templated to work with any data type.\n\n---\n\n## 🚀 Features\n\n### ✅ Basic Stack Operations:\n- `Push(T value)` → Adds a new element to the top of the stack.\n- `Top()` → Returns the top (most recently added) element.\n- `Bottom()` → Returns the bottom (least recently added) element.\n- `Pop()` → Removes the top element (inherited from `clsMyQueue`).\n- `Size()` → Returns number of elements.\n- `IsEmpty()` → Checks if the stack is empty.\n- `Clear()` → Clears all stack elements.\n- `Print()` → Prints all elements in stack order.\n\n### ✨ Advanced (Inherited) List Operations:\n- `GetItem(index)`\n- `UpdateItem(index, newValue)`\n- `InsertAfter(index, value)`\n- `InsertAtBack(value)` – Useful for queue-style operations.\n- `Reverse()` – Reverses the entire stack.\n- `InsertAtFront(value)` – Used by `Push()` to maintain LIFO.\n\n---\n\n## 🛠 Technologies Used\n\n- **Language**: C++\n- **Data Structure**: Doubly Linked List\n- **Concepts**: Templates, Inheritance, OOP, Dynamic Memory\n\n---\n\n## 📚 Learning Outcomes\n✅Implementing custom data structures with inheritance\n\n✅Using doubly linked lists in C++\n\n✅Applying generic programming with templates\n\n✅Managing memory with pointer-based collections\n\n---\n## 🔧 How to Run\n\n1. **Clone the repository:**\n```bash\ngit clone https://github.com/your-username/clsStack_Library-cpp.git\ncd clsStack_Library-cpp\n```\n2. **Build your test file (e.g. main.cpp):**\n\n```bash\ng++ main.cpp -o stackApp\n./stackApp\n```\n3. **Include in your project:**\n```bash\n#include \"clsMyStack.h\"\n#include \"clsMyQueue.h\"\n#include \"clsDblLinkedList.h\"\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famrtamertech%2Fclsstack_library-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famrtamertech%2Fclsstack_library-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famrtamertech%2Fclsstack_library-cpp/lists"}