Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iss-25: Add initial IntervalDTO, MultiDimInterDTO, and their associated converters #37

Merged
merged 7 commits into from
Dec 16, 2024

Conversation

LucioTrincheri
Copy link
Collaborator

Add the initial implementation of IntervalDTO and it's associated converter, with the intention of having a common API for client code.
Also fixed #31, which was reproduced with @joaquinffernandez when setting a new clean environment and compiling sb-graph for the first time. Full log:

cc -I. -I../sbg-partitioner/src/3rd-party/boost/include -c sbg/interval.cpp -o obj/debug/sbg/interval.o -std=c++17 -Wall -Werror -Wno-reorder -O2 -D BOOST_PHOENIX_STL_TUPLE_H_ -D BOOST_MPL_LIMIT_LIST_SIZE=30 -D BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS -ggdb  
In file included from ./sbg/interval.hpp:38,
                 from sbg/interval.cpp:20:
./util/defs.hpp:79:14: error: ‘vector’ in namespace ‘std’ does not name a template type
 typedef std::vector<NAT> VNAT;
              ^~~~~~
./util/defs.hpp:79:9: note: ‘std::vector’ is defined in header ‘<vector>; did you forget to ‘#include <vector>’?
./util/defs.hpp:37:1:
+#include <vector>
 
./util/defs.hpp:79:9:
 typedef std::vector<NAT> VNAT;
         ^~~
./util/defs.hpp:81:16: error: ‘VNAT’ does not name a type; did you mean ‘NAT’?
   member_class(VNAT, value);
                ^~~~
./util/defs.hpp:59:3: note: in definition of macro ‘member_class’
   X Y##_;                  \
   ^
./util/defs.hpp:81:16: error: ‘VNAT’ does not name a type; did you mean ‘NAT’?
   member_class(VNAT, value);
                ^~~~
./util/defs.hpp:60:3: note: in definition of macro ‘member_class’
   X Y() const;             \
   ^
./util/defs.hpp:81:16: error: ‘VNAT’ has not been declared
   member_class(VNAT, value);
                ^~~~
./util/defs.hpp:61:16: note: in definition of macro ‘member_class’
   void set_##Y(X x);       \
                ^
./util/defs.hpp:81:16: error: ‘VNAT’ does not name a type; did you mean ‘NAT’?
   member_class(VNAT, value);
                ^~~~
./util/defs.hpp:62:3: note: in definition of macro ‘member_class’
   X &Y##_ref();
   ^
./util/defs.hpp:86:10: error: ‘VNAT’ has not been declared
   MD_NAT(VNAT::iterator b, VNAT::iterator e);
          ^~~~
./util/defs.hpp:86:24: error: expected ‘)’ before ‘b’
   MD_NAT(VNAT::iterator b, VNAT::iterator e);
         ~              ^~
                        )
./util/defs.hpp:88:11: error: ‘VNAT’ does not name a type; did you mean ‘NAT’?
   typedef VNAT::iterator iterator;
           ^~~~
           NAT
./util/defs.hpp:89:11: error: ‘VNAT’ does not name a type; did you mean ‘NAT’?
   typedef VNAT::const_iterator const_iterator;
           ^~~~
           NAT
./util/defs.hpp:90:3: error: ‘iterator’ does not name a type; did you mean ‘strerror’?
   iterator begin();
   ^~~~~~~~
   strerror
./util/defs.hpp:91:3: error: ‘iterator’ does not name a type; did you mean ‘strerror’?
   iterator end();
   ^~~~~~~~
   strerror
./util/defs.hpp:92:3: error: ‘const_iterator’ does not name a type; did you mean ‘constexpr’?
   const_iterator begin() const;
   ^~~~~~~~~~~~~~
   constexpr
./util/defs.hpp:93:3: error: ‘const_iterator’ does not name a type; did you mean ‘constexpr’?
   const_iterator end() const;
   ^~~~~~~~~~~~~~
   constexpr
./util/defs.hpp:94:16: error: ‘iterator’ has not been declared
   void emplace(iterator it, NAT x);
                ^~~~~~~~
make: *** [Makefile:41: obj/debug/sbg/interval.o] Error 1

@LucioTrincheri LucioTrincheri linked an issue Dec 12, 2024 that may be closed by this pull request

include util/Makefile.include

# Objects
SBG_OBJ=$(addprefix $(BUILD_DIR)/, $(SBG_SRC:.cpp=.o))

create-folders::
@mkdir -p $(BUILD_DIR)/$(SBG_ROOT)
@mkdir -p $(BUILD_DIR)/$(SBG_ROOT) \
@mkdir -p $(BUILD_DIR)/$(DTO_ROOT) \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll move DTO and API related sources to a separate Makefile as part of #38

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in fe8d3bb.

@joaquinffernandez
Copy link
Collaborator

Nice!! 👏 👏 Thanks for fixing #31
We will probably don't need the converter interface and a manager given that we are just going to use 3 converters, and it can be easily adapted if needed later on.

@LucioTrincheri
Copy link
Collaborator Author

#34 and #38 are resolved in this PR.

@LucioTrincheri LucioTrincheri changed the title iss-25: Add initial IntervalDTO and associated converter iss-25: Add initial IntervalDTO, MultiDimInterDTO, and their associated converters Dec 13, 2024
@LucioTrincheri LucioTrincheri merged commit 4b547a4 into iss-25-define-sbg-lib-api Dec 16, 2024
1 check passed
@LucioTrincheri LucioTrincheri deleted the iss-25/interval-dto branch December 16, 2024 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants