Classes and methods providing commonly used utilites. More...
|
Classes | |
| class | HGL::Common::Application |
| Base class of a typical HGL Suite application. More... | |
| class | HGL::Common::combine_iterator< Iterator, CombineFunction > |
| A pairwise stepping and result combining input iterator adaptor. More... | |
| class | HGL::Type::DefaultProjectFactory |
| Convenience class for implementing HGL::Type::IProjectFactory. More... | |
| interface | HGL::Common::IApplication |
| Interface to a typical HGL Suite application. More... | |
| interface | HGL::Common::IApplicationObserver |
| Interface to provide access to HGL::Common::Application. More... | |
| interface | HGL::Common::IParser< ProjectInterface, Factory > |
| Interface to a parsing subsystem. More... | |
| interface | HGL::Type::IProjectFactory |
| Interface to a factory creating types. More... | |
| class | HGL::Common::Logger |
Console logger (to std::wclog). More... | |
| class | HGL::Common::PoptTableBuilder |
| Builds a POPT table structure. More... | |
| class | HGL::Common::Q24 |
| Class to represent a float as 24bit integer in the Q number format. More... | |
| class | HGL::Common::RAIIFactory< T, arrayDel, Container, capacity > |
| Template to implement a RAII factory. More... | |
| class | HGL::Common::RegexInitializer |
| Initializes an extended regular expression. More... | |
| class | HGL::Common::Singleton< T > |
| Template providing the singleton pattern. More... | |
| class | HGL::Common::ThreadPool< Worker, Task, NUM_THREADS > |
| Template providing a thread pool for asynchronous tasks. More... | |
| class | HGL::Common::URI |
| Class to access files locally and remote. More... | |
| class | HGL::Common::Util |
| Miscellaneous utility functions. More... | |
Functions | |
| template<class Iterator , typename Arg1 , typename Arg2 , typename Result > | |
| combine_iterator< Iterator, std::pointer_to_binary_function < Arg1, Arg2, Result > > | HGL::Common::combiner (const Iterator &first, const Iterator &last, Result(*b)(Arg1, Arg2), const typename combine_iterator< Iterator, std::pointer_to_binary_function< Arg1, Arg2, Result > >::base_value_type &d=typename combine_iterator< Iterator, std::pointer_to_binary_function< Arg1, Arg2, Result > >::base_value_type()) |
A creator utility function for combine_iterator. | |
| template<class InputIterator , class OutputIterator , class UnaryPredicate > | |
| OutputIterator | HGL::Common::copy_until (InputIterator src, OutputIterator dst, UnaryPredicate pred) |
Copies src into dst until the predicate pred is true. | |
| template<class InputIterator , class OutputIterator , class UnaryPredicate > | |
| OutputIterator | HGL::Common::copy_while (InputIterator src, OutputIterator dst, UnaryPredicate pred) |
Copies src into dst while the predicate pred is true. | |
| template<class ProjectInterface , class Factory > | |
| ProjectInterface * | HGL::Common::createProject (const HGL::Common::IParser< ProjectInterface, Factory > *const parser, Factory *const fac, HGL::Common::URI *const infile, ProjectInterface *const lib=0L) throw (HGL::Exception::ParserException, HGL::Exception::IOException) |
| template<class ProjectInterface , class Factory > | |
| ProjectInterface * | HGL::Common::createProject (const std::string &progdesc, const std::string &version, const std::string &buildnode, const std::string &buildhost, const std::string &target, const std::string &builddate, int argc, const char **argv, const HGL::Common::IParser< ProjectInterface, Factory > *const parser, Factory *const fac, struct::poptOption *const progOpts, char **const outputFilename, const char *suffix, ProjectInterface *const lib=0L) throw (HGL::Exception::ParserException, HGL::Exception::IOException, HGL::Exception::PoptExitException) |
| Creates a project. | |
| template<typename MapType , typename KeyArgType , typename ValueFunction > | |
| MapType::value_type::second_type | HGL::Common::lookupInsert (MapType &m, const KeyArgType &k, const ValueFunction &v) |
| Looks up a value in a lookup map and if neccessary creates the value first. | |
Classes and methods providing commonly used utilites.
| combine_iterator<Iterator, std::pointer_to_binary_function<Arg1, Arg2, Result> > HGL::Common::combiner | ( | const Iterator & | first, | |
| const Iterator & | last, | |||
| Result(*)(Arg1, Arg2) | b, | |||
| const typename combine_iterator< Iterator, std::pointer_to_binary_function< Arg1, Arg2, Result > >::base_value_type & | d = typename combine_iterator < Iterator, std::pointer_to_binary_function<Arg1, Arg2, Result> >::base_value_type() | |||
| ) |
A creator utility function for combine_iterator.
| Iterator | the underlying iterator to visit | |
| Arg1 | first argument of the combining function | |
| Arg2 | second argument of the combining function (usually the same type like Arg1) | |
| Result | the type of the combined result |
| first | the underlying iterator to visit | |
| last | the last (exclusive) element to visit | |
| b | the combining function with signatore Result Fun(Arg, Arg) | |
| d | the (optional) default value to use if the container contains an odd amount of elements |
| OutputIterator HGL::Common::copy_until | ( | InputIterator | src, | |
| OutputIterator | dst, | |||
| UnaryPredicate | pred | |||
| ) |
Copies src into dst until the predicate pred is true.
| InputIterator | an InputIterator | |
| OutputIterator | an OutputIterator | |
| UnaryPredicate | a predicate |
| src | the InputIterator | |
| dst | the OutputIterator | |
| pred | the predicate |
| OutputIterator HGL::Common::copy_while | ( | InputIterator | src, | |
| OutputIterator | dst, | |||
| UnaryPredicate | pred | |||
| ) |
Copies src into dst while the predicate pred is true.
| InputIterator | an InputIterator | |
| OutputIterator | an OutputIterator | |
| UnaryPredicate | a predicate |
| src | the InputIterator | |
| dst | the OutputIterator | |
| pred | the predicate |
| ProjectInterface * HGL::Common::createProject | ( | const HGL::Common::IParser< ProjectInterface, Factory > *const | parser, | |
| Factory *const | fac, | |||
| HGL::Common::URI *const | infile, | |||
| ProjectInterface *const | lib = 0L | |||
| ) | throw (HGL::Exception::ParserException, HGL::Exception::IOException) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| ProjectInterface * HGL::Common::createProject | ( | const std::string & | progdesc, | |
| const std::string & | version, | |||
| const std::string & | buildnode, | |||
| const std::string & | buildhost, | |||
| const std::string & | target, | |||
| const std::string & | builddate, | |||
| int | argc, | |||
| const char ** | argv, | |||
| const HGL::Common::IParser< ProjectInterface, Factory > *const | parser, | |||
| Factory *const | fac, | |||
| struct::poptOption *const | progOpts, | |||
| char **const | outputFilename, | |||
| const char * | suffix, | |||
| ProjectInterface *const | lib = 0L | |||
| ) | throw (HGL::Exception::ParserException, HGL::Exception::IOException, HGL::Exception::PoptExitException) |
Creates a project.
Parses and creates the internal tree of a HGL Suite project
| ProjectInterface | type of the project interface | |
| Factory | type of the project factory |
| progdesc | name of the component, i.e. interpreter, compiler, svg2hgl | |
| version | version of the component | |
| buildnode | name of the node where it was built | |
| buildhost | the platform on which the HGL Suite was compiled | |
| target | the platform for which the HGL Suite was compiled | |
| builddate | date of the build | |
| argc | the comandline argument count | |
| argv | the command line arguments | |
| parser | the parser to use for parsing the input | |
| fac | the factory to use for building the types | |
| progOpts | tbw | |
| outputFilename | the name of the output file | |
| suffix | suffix to append to outputFilename if omitted or NULL | |
| lib | the stdlib or 0L if the project is the stdlib itself |
| MapType::value_type::second_type HGL::Common::lookupInsert | ( | MapType & | m, | |
| const KeyArgType & | k, | |||
| const ValueFunction & | v | |||
| ) |
Looks up a value in a lookup map and if neccessary creates the value first.
| MapType | the type of the lookup map | |
| KeyArgType | they type of the lookup key | |
| ValueFunction | a function to create a value if not already in the lookup map |
| m | the lookup map | |
| k | the key to look up | |
| v | a value creating function which gets called only if the value isn't yet in the map |
1.6.1