// file : build/name -*- C++ -*- // copyright : Copyright (c) 2014-2015 Code Synthesis Tools CC // license : MIT; see accompanying LICENSE file #ifndef BUILD_NAME #define BUILD_NAME #include #include #include #include // move() #include namespace build { // A name is what we operate on by default. Depending on the context, // it can be interpreted as a target or prerequisite name. A name // without a type and directory can be used to represent any text. // A name with directory and empty value represents a directory. // // If pair is true, then this name and the next in the list form // a pair. // struct name { explicit name (std::string v): value (std::move (v)) {} explicit name (path d): dir (std::move (d)) {} name (std::string t, path d, std::string v) : type (std::move (t)), dir (std::move (d)), value (std::move (v)) {} std::string type; path dir; std::string value; bool pair {false}; }; typedef std::vector names; std::ostream& operator<< (std::ostream&, const name&); std::ostream& operator<< (std::ostream&, const names&); } #endif // BUILD_NAME