Coder Social home page Coder Social logo

linksplatform / interfaces Goto Github PK

View Code? Open in Web Editor NEW
3.0 4.0 2.0 4.64 MB

LinksPlatform's Platform.Interfaces Class Library

Home Page: https://linksplatform.github.io/Interfaces

License: The Unlicense

C# 34.04% C++ 56.78% C 3.60% CMake 3.37% Shell 2.21%
linksplatform dotnet-standard dotnet-framework csharp nuget-package class-library

interfaces's Introduction

interfaces's People

Contributors

codacy-badger avatar dependabot-preview[bot] avatar dependabot[bot] avatar freephoenix888 avatar is2511 avatar janakotova avatar konard avatar linksplatform-sweepai[bot] avatar mitron57 avatar namelessptr avatar nassipkali avatar uselessgoddess avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

interfaces's Issues

Do we really need to delete projects?

- name: Remove Cpp projects
run: |
export REPOSITORY_NAME=$(basename ${{ github.repository }})
dotnet sln "Platform.$REPOSITORY_NAME.sln" remove cpp/Platform.$REPOSITORY_NAME.Tests/Platform.$REPOSITORY_NAME.TemplateLibrary.Tests.vcxproj

- name: Remove Cpp projects
run: |
dotnet sln "Platform.Interfaces.sln" remove cpp/Platform.Interfaces.Tests/Platform.Interfaces.TemplateLibrary.Tests.vcxproj

Looks like in the https://github.com/linksplatform/Exceptions repository it works without removal of projects.
If the change is required it should be applied to all repositories of LinksPlatform.

Use cmake

To set up multiplatform development environment

Sweep: Add `CLinkAddress` concept

Sweep: Add CLinkAddress concept to cpp/Platform.Interfaces/. CLinkAddress must check that argument is integral and unsigned

Checklist
  • cpp/Platform.Interfaces/CLinkAddress.h ✅ Commit 0e26908
• Include the `` and `` libraries at the beginning of the file. • Define the `Platform::Interfaces` namespace. • Inside the namespace, define the `CLinkAddress` concept that takes a single template argument `T`. • The concept should check if `T` is both integral and unsigned using `std::is_integral` and `std::is_unsigned` respectively.

[c++] include guards

Add

#pragma once

or

#ifndef INCLUDE_GUARD_MACROS_NAME
#define INCLUDE_GUARD_MACROS_NAME
/* code */
#endif  // INCLUDE_GUARD_MACROS_NAME

In all headers

Create `CLinks` concept

Member types:

  • OptionsType
  • LinkAddressType
  • LinkType
  • WriteHandlerType
  • ReadHandlerType
    Members:
  • LinksConstants<LinkAddressType> Constants
  • LinkAddressType Count(const LinkType& restriction) const
  • LinkAddressType Each(const LinkType& restriction, const ReadHandlerType& handler) const
  • LinkAddressType Create(const LinkType& restriction, const WriteHandlerType& handler) const
  • LinkAddressType Update(const LinkType& restriction, const LinkType& substitution, const WriteHandlerType& handler) const
  • LinkAddressType Delete(const LinkType& restriction, const WriteHandlerType& handler) const

Fix NuGet warnings

WARNING: NU5128: Some target frameworks declared in the dependencies group of the nuspec and the lib/ref folder do not have exact matches in the other location. Consult the list of actions below:
- Add a dependency group for native0.0 to the nuspec
WARNING: NU5048: The 'PackageIconUrl'/'iconUrl' element is deprecated. Consider using the 'PackageIcon'/'icon' element instead. Learn more at https://aka.ms/deprecateIconUrl
WARNING: The <iconUrl> element is deprecated. Consider using the <icon> element instead. https://aka.ms/deprecateIconUrl

Create DIRECT_METHOD_CALL macro

https://github.com/linksplatform/Data.Doublets/blob/22d79feaef5438c6f4684fa6105583e56129ff79/cpp/Platform.Data.Doublets/ILinksExtensions.h#L527-L531

Macro should simplify direct usage of methods for both static and dynamic polymorphism and the mix of them.
When we have concrete class we should prioritize calling exact method over calling virtual method. If we don’t do that in the case of mixed polymorphism, we can end up with a infinite recursion because call to concrete method might be interpreted as a virtual call.
When we have only abstract class we should just call its virtual method.

It is possible to use variadiac arguments for macro:
https://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html

First argument should be a type of class, the second argument should be an instance of the class, the third argument will be the name of the method and rest variadic arguments would be arguments for the method.

Macro should be placed in Macros.h file.

Should we rename this repository to Abstractions or Concepts?

Interface is a programming language specific term. For example, this term is valid in C#, but there is no such term in C++.

The second idea is to call the entire repository as Concepts.

Anyway, we need a language agnostic word to better reflect the contents of this repository.

[c++] virtual destructors

In c++ interfaces it is necessarily to add a virtual destructor

class A {
public:
virtual void foo() = 0;
/* code */
virtual ~A() = default;  // = 0;
};

otherwise there will be memory leaks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.