Commit Graph
107 Commits
Author SHA1 Message Date
Michael Davidsaver 45265b4f9b Add FieldBuilder::begin() and Field::build()
Boilerplate reduction in structure
definition and instanciation.
2018-10-16 20:52:24 -07:00
Michael Davidsaver a02a60c658 Field::m_hash friends
Avoid additional access of m_hash by FieldCreate::Helper
which has an unclear (though I think correct) friend
relationship with Field.

Attempt to placate old gcc 3.4.4
2018-09-19 11:04:02 -07:00
Michael Davidsaver 64158376f5 PVStructure inline access to member variables 2018-07-31 16:55:15 -07:00
Michael Davidsaver 850d4ff056 PVField::copyUnchecked assert()
Field comparison is now O(0), so do this anyway
to help catch mistakes.
2018-07-31 16:55:15 -07:00
Michael Davidsaver f0cfe1c85a PVField::copy() avoid duplication with copyUnchecked() 2018-07-31 16:55:15 -07:00
Michael Davidsaver c8b615b3ee Field initialize m_hash
valgrind complain (rightly) about use of uninitialized
if Structure ctor throws (eg. duplicate field).
~Field will then try to use m_hash before it has been
initialized.  This don't hurt and the subsequent equality
tests prevent any bad behavior.
2018-07-30 14:50:19 -07:00
Michael Davidsaver e1216dfa76 move PVValueArray dtor out of line
This class has out of line members, and explicit
instanciations.  Move the dtor out of line as
well to maybe avoid emitting duplicate
typeinfo.
2018-07-12 15:38:49 -07:00
Michael Davidsaver a029455466 Thread reftrack 2018-07-11 16:30:04 -07:00
Michael Davidsaver 0406a2f614 Field de-duplication
add a global cache of Field instances to
allow O(0) comparison of types.
2018-07-06 12:01:14 -07:00
Michael Davidsaver f1553cc90e Move NOMINMAX to configure/CONFIG_SITE
The macro must be defined before MS system headers are
included.

This rev. remove #define NOMINMAX from public headers,
but no public headers use min()/max() and this was
never the correct way to use this macro as by convention
library headers are included after system headers,
which is too late to have an effect.
2018-05-28 11:24:49 -07:00
Michael Davidsaver 810ae15991 printer.cpp avoid alloc of spaces
No need to allocate a std::string
just to repeat spaces.
2018-05-21 11:21:01 -07:00
Michael Davidsaver 271fec7f5e printer.cpp: clean whitespace 2018-05-21 11:21:01 -07:00
Michael Davidsaver 7e8c49f0a0 don't use shared_ptr::get() for null test
unnecesarily verbose
2018-02-21 11:17:49 -08:00
Michael Davidsaver 786575c3de a little bit of cleanup and minor opt 2018-02-06 10:02:08 -08:00
Michael Davidsaver 43ee4b9cb6 thread safe getFieldCreate() and getPVDataCreate()
Fully thread safe and ctor order safe on all targets
(not just c++11).  Never destroyed to avoid global
dtor order issues.
2017-12-28 11:52:47 -06:00
Michael Davidsaver 207c24a4fd deprecate LOCAL_STATIC_LOCK
This construct is fairly useless.
Doesn't prevent ctor ordering problems.
2017-12-28 11:52:47 -06:00
Michael Davidsaver e79c49019d quiet warning 2017-12-11 21:08:59 -06:00
Michael Davidsaver 5bc081a3af skip unnecessary inclusion of localStaticLock.h 2017-12-11 21:08:59 -06:00
Michael Davidsaver a88d491012 win64 one more time, move explicit instantiations after all definitions. 2017-10-06 11:06:23 +02:00
Michael Davidsaver fd34d68933 another win64 attempt, explicitly instanciate 2017-10-05 16:24:45 +02:00
Michael Davidsaver 215e3aab7b one more attempt to appease win64 2017-10-05 15:32:31 +02:00
Michael Davidsaver 9b1e789e62 PVUnion: get() const propagation, add guess(), and inline trival 2017-09-30 13:43:50 -05:00
Michael Davidsaver 406b163bcc factory methods avoid creating unnecessary temporaries
Avoid some ref. counter activity (still have global mutex...)
2017-09-30 11:09:52 -05:00
Michael Davidsaver 6f2cae95e1 PVField: getParent() const propagation and inline trival 2017-09-30 11:00:37 -05:00
Michael Davidsaver 27f2f87e29 reftrack class Field 2017-09-29 15:30:50 -05:00
Michael Davidsaver 822173979c FieldBuilder::add() ignore exact duplicates 2017-09-21 13:41:11 -05:00
Michael Davidsaver 9bce66f307 FieldBuilder edit union/structureArray/unionArray
Allow appending fields to existing types
to allow structure-like types
2017-09-21 13:41:11 -05:00
Michael Davidsaver 72fe0ca3e7 minor 2017-09-21 13:41:11 -05:00
Michael Davidsaver 9ae221ca0c apply reftrack to PVField 2017-08-30 11:13:10 -05:00
Michael Davidsaver 3597fbe382 avoid unnecessary temp shared_ptr
avoid some extra ref. counter operations.
2017-08-16 17:49:17 +02:00
Michael Davidsaver 0b262baf97 fix getSubField() by index 2017-08-16 16:29:06 +02:00
Michael Davidsaver 78b51ebe59 c++98 compatible, but still reduced, number of getSubField() specializations 2017-08-16 11:22:42 +02:00
Michael Davidsaver b84ed964f9 reduce # of PVStructure::getSubField overloads 2017-08-15 18:35:54 +02:00
Michael Davidsaver ceb9f795cb whitespace: quiet gcc6 indentation warning 2017-07-17 16:25:00 +02:00
Michael Davidsaver 9fa5028f6c PVStructure::getStructure() avoid creation of temporary
avoid some ref-counter activity
2017-07-07 14:39:25 +02:00
Michael Davidsaver 6cf9fa2208 fix "hides overloaded virtual function" warning 2017-06-14 13:22:06 +02:00
Michael Davidsaver 6e62e123e8 FieldBuilder allow append to Structure
Helpful to allow a new definition to be created
as an extension of an existing definition.
2017-05-15 12:46:32 -04:00
Michael Davidsaver 81cdf071a8 FieldBuilder detect duplicate field names 2017-05-12 13:24:37 -04:00
Michael Davidsaver fb232896a8 avoid unnecessary globals 2017-05-10 15:00:55 -04:00
Michael Davidsaver 225f3ab125 Remove hidden sub-class
collapse Base* and Default* classes
into parents.
2017-05-10 15:00:55 -04:00
Michael Davidsaver a01885536c PVUnion fixups
select(int32)

throw for variant w/ other than UNDEFINED_INDEX.
Now same behavior for variant and discriminating,
which is to clear contents.
Fix selector range check.

set(int32)

Fix set(UNDEFINED_INDEX, NULL) for discriminating.
Fix selector range check.
2017-04-15 16:19:23 -04:00
Michael Davidsaver f7343674ee make PVUnion::UNDEFINED_INDEX const 2017-04-15 16:19:23 -04:00
Dave Hickin d9072402db Update source boilerplate for new LICENSE file 2016-07-22 15:56:43 +01:00
Dave Hickin 028076e79c Add char* overload for non-template getSubField 2016-07-04 14:59:56 +01:00
Andrew Johnson b18b4f236f Make the PVScalarValue explicit specializations inline
Microsoft's compiler seems to prefer this when building a static library.
2016-04-11 17:16:43 -05:00
Andrew Johnson 605d4e99b9 Remove remaining 'undef epicsExportSharedSymbols' stuff 2016-04-11 15:24:46 -05:00
Andrew Johnson 5c16357fe2 Don't redefine NOMINMAX (clean up MinGW warnings) 2016-03-28 16:41:28 -05:00
Michael Davidsaver d2fc922ee7 remove unnecessary const_cast 2016-03-18 14:53:24 -04:00
Michael Davidsaver 4f499aed01 remove PVField::notImplemented
An unused waste of space in every instance...
2016-02-26 12:13:23 -05:00
Michael DavidsaverandDave Hickin de3c2656ef INC += pv/ 2016-02-10 14:40:29 +00:00