Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Sep 10, 2025

Summary

This PR translates the ICli interface from C# to C++ as requested in issue #99.

Changes Made

  • ICli.h: New interface with Run method that takes command line arguments and returns exit code
  • CCli.h: Concept for compile-time verification of CLI implementations
  • Platform.Interfaces.h: Updated to include the new interface and concept
  • Tests: Added comprehensive unit test following the project's testing patterns

Implementation Details

  • Translated params string[] args to const std::vector<std::string>& args for C++ compatibility
  • Preserved bilingual documentation (English/Russian) matching C# version
  • Followed existing project patterns and conventions
  • Added virtual destructor following interface best practices
  • Includes compile-time concept checking with static assertions

Test Plan

  • Compiles successfully with g++ and C++20 standard
  • Static assertions verify concept implementation
  • Unit test follows existing project test patterns
  • Interface matches C# functionality and documentation

Fixes #99

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #99
@konard konard self-assigned this Sep 10, 2025
konard and others added 2 commits September 10, 2025 18:26
- Add ICli interface following project patterns and conventions
- Add CCli concept for compile-time interface verification
- Update main Platform.Interfaces.h to include new interface and concept
- Add comprehensive unit test for the CLI interface and concept
- Preserve bilingual documentation (English and Russian)
- Use std::vector<std::string> for command arguments to replace C# params string[]

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] [CPP] Translate interfaces from [CPP] Translate ICli interface from C# Sep 10, 2025
@konard konard marked this pull request as ready for review September 10, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CPP] Translate ICli interfaces from C#

2 participants