Giter Site home page Giter Site logo

ifc-reader's People

Contributors

andreyg avatar aytey avatar fireflyforlife avatar tapika avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ifc-reader's Issues

Allow reflifc types to be assignable.

Currently I see that most types have a reference back to their file as ifc::File const&. This is considered bad practice because it makes the type not copy/move assignable. I suggest keeping the references in the constructor to keep the invariance, but store a pointer in the class.

This is also backed up by the C++ Core Guidelines C.12.

Remove boost dependency

Currently ifc-reader depends on boost-iostreams for memory mapping the ifc file.

I propose letting this be application defined, and which means they can use boost-iostreams themselves, or use something more lightweight like mio, or just reading a file the normal way.

Then the ifc-reader would only need to accept a const char*, similar to raw_pdb for example.

We could still have boost-iostreams as a dependency for our examples & unit tests. Just have it not be required for any applications that want to use this as a library.

Let me know what you think!

Make reflifc types hashable and Comparable.

For my use cases I really need to cache declarations etc to avoid circular dependencies. While traversing all types.

Most of the reflifc types are build as: ifc::File* + ifc::SomeIndex or ifc::PartitionData*.
Those two numbers can easily be hashed together with a hash combine. But I cannot do it outside the library as the members are private.

Would you like me to work on a pull request for this? Or would you prefer to put it in yourself.

Ability to get reflifc::Module from any reflifc object.

All reflifc types combine the ifc::File and some pointer/index, however the file is never exposed.

This might be partly a design decision, but for my current use case I need to check if a certain type/declaration from a certain module (so ifc::File, or reflifc::Module). To determine if a type is visibility or reachable.

Do you have any concerns with adding this to the API?

`d.json` suffix doesn't match MSVC

With cl.exe @ 19.30.30705.0, compiling the following:

cl.exe /W4 /WX /experimental:module /interface /sourceDependencies . /std:c++latest /EHsc /MD /c mod_moo.cpp

where the argument to /sourceDependencies is ., then MSVC gives you:

mod_moo.cpp.json

There are two things here:

  1. ifc-reader looks for the suffix .d.json, but the output from MSVC is just .json
  2. ifc-reader looks for <ifc_name>.<suffix> but MSVC generates <src_file_name>.<suffix> (that is, the name of the output file is the name of the source file and not the name of the IFC file)

Maybe a suggested fix here should be that ifc-reader could take an additional argument for the path to the source dependencies file?

License

Hi @AndreyG,

Thanks for the great work you've done on this project so far, it looks seriously awesome!

I'd be interested in playing around with some of your code, but I'm hesitant to do so without their being a license on the repo -- would you be able to add one? MIT would be awesome, if you'd be happy with that.

Thanks!

Unit testing

It would be good to have some unit tests to maintain the library, as you mentioned too.

The simple approach would be to upload a bunch of .ifc files for specific tests.

However, I'd argue it's also important to build those .ifc's from source code. So you are verifying a platform instead of just the platform of the developer who uploaded that specific .ifc file. So I prefer this approach.

My issue is I am not aware of a reliable way to get the path to a .ifc file from a .ixx file.
Eg Visual Studo Open Folder (so with Ninja as the build system) will follow relative subfolders to the .ifc file, and a .sln build will plonk everything in the intermediate directory.

Do you think this be abstracted in the MSVCEnvironment? we could have different defines identifying if we are running from CMake, Visual Studio, Ninja or MSBuild for example.

(Incidently this linking of an .ixx to it's .ifc file is something I need to solve for my own side project too.

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.