12 #ifndef __CH_Collection_h__
13 #define __CH_Collection_h__
75 #define CAST_OPCHANNELS(collection) ((collection) ? (collection)->castToOPChannels() : nullptr)
100 virtual int64 getMemoryUsage(
bool inclusive)
const;
107 virtual int canAccess(
uint mask)
const;
127 int getChannelNames(
CH_NameList &list,
int scope=0)
const;
128 int getChannelCount(
int scoped = 0)
const;
151 virtual int rename(
const char *from_name,
const char *to_name,
152 const char *to_alias);
154 const char *to_alias);
157 int deleteChannels();
163 bool no_disabling ,
int thread);
165 fpreal *vals,
int nsamples,
167 bool use_cache ,
int thread);
176 void unresolveLocalVars(
int thread);
184 bool use_alias=
false)
const;
186 bool use_alias=
false)
const
189 getFullPath(chp, s, use_alias);
199 void *
data =
nullptr)
const;
203 void findString(
const char *word,
bool fullword,
205 void *
data =
nullptr);
206 int findString(
const char *word,
bool fullword,
207 bool usewildcards)
const;
208 int changeString(
const char *from,
const char *to,
209 bool fullword,
int thread);
217 virtual int getUniqueId()
const;
229 virtual const void *getOwner()
const = 0;
230 virtual void *getOwner() = 0;
238 virtual bool getVariableValue(
UT_String &str,
241 virtual bool getVariableValue(
fpreal &
val,
250 int save(std::ostream &os,
bool binary,
bool compiled,
251 bool scoped,
bool pending_state,
253 int saveToFile(
const char *nm)
const;
255 template <
typename FPREAL_TYPE>
259 bool delete_keys =
false);
260 int loadFromFile(
const char *nm);
269 virtual void saveChannelForUndo(
CH_Channel *chp) = 0;
277 void setExpose(
bool onoff );
283 void clearAndDestroy();
288 { myVariables[0] =
table; }
291 {
return myManager->getGlobalStart(); }
293 {
return myManager->getGlobalEnd(); }
301 bool &timedep,
int thread);
304 { myVariables[3] =
table; }
310 void addedParamDependency();
311 void removeParamDependency();
322 {
return myExternal; }
324 { myExternal = yesno; }
341 static bool isValidChannelName(
const char *
s);
349 virtual void addLocalVarDependency(
int table,
int index,
365 int err = ev_GetErrNo(thread);
367 evaluationError(chp, err, thread);
371 { myVariables[2] =
table; }
378 virtual void notifyChannelRenameDependents(
const char *old_name,
379 const char *new_name);
390 myChannelAliasesTable;
396 char myParamDependent;
403 void evaluationError(
const CH_Channel *chp,
int err,
408 template <
typename FPREAL_TYPE>
CH_Manager * getManager() const
#define SETUPCLASSPACKETID(classname)
CE_API bool evaluate(const CE_OSDRefinement &topo, const CE_OSDEvaluator &eval, const cl::Buffer &coarse, const CE_OSDPatchCoords &patch_coords, const CE_FloatArray *refined_data, cl::Buffer &out, cl::Buffer *du, cl::Buffer *dv)
GT_API const UT_StringHolder time
void setExternal(bool yesno)
const GLuint GLenum const void * binary
GLsizei const GLchar *const * path
virtual double chWithinExternal(const char *channelpath, fpreal time) const
void updateGlobalVariables(CH_LocalVariable *table)
virtual UT_StringHolder chsWithinExternal(const char *channelpath, fpreal time) const
**But if you need a result
void addLocalVariables(CH_LocalVariable *table)
void addDynamicVariables(CH_LocalVariable *table)
GU_API GA_Offset getParent(const GU_Detail *gdp, const GA_Offset &node)
const CH_Channel * getChannel(int idx) const
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
fpreal getGlobalEnd() const
GU_API GA_OffsetArray getChildren(const GU_Detail *gdp, const GA_Offset &node, bool recurse=false)
PXL_API const char * getName(const ColorSpace *space)
Return the name of the color space.
void getFullPath(const CH_Channel *chp, UT_String &p, bool use_alias=false) const
CH_Channel * getChannel(int idx)
fpreal getTolerance() const
const CH_ChannelList * getChannels() const
GLuint const GLchar * name
CH_API void CHcollectionsToOPchannels(CH_CollectionList const &collections, UT_ValArray< OP_Channels * > &op_channels)
virtual OP_Channels * castToOPChannels()
GLenum GLenum GLsizei void * table
SYS_FORCE_INLINE void checkEvaluationError(const CH_Channel *chp, int thread) const
fpreal getGlobalStart() const
static const char * theValidChannelNameWordBreaks
**Note that the tasks the is the thread number *for the or if it s being executed by a non pool thread(this *can happen in cases where the whole pool is occupied and the calling *thread contributes to running the work load).**Thread pool.Have fun
int(*)(CH_Collection *grp, CH_Channel *chp, void *) CHfindCallBack
UT_ArrayStringMap< CH_Channel * > CH_ChannelMap
PcpNodeRef_ChildrenIterator begin(const PcpNodeRef::child_const_range &r)
Support for range-based for loops for PcpNodeRef children ranges.
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
virtual const OP_Channels * castToOPChannels() const
ImageBuf OIIO_API channels(const ImageBuf &src, int nchannels, cspan< int > channelorder, cspan< float > channelvalues={}, cspan< std::string > newchannelnames={}, bool shuffle_channel_names=false, int nthreads=0)